From 17b295871f6c702f5f5cd0ea26e12e9345068372 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 14 Nov 2022 00:05:57 +1100 Subject: [PATCH] Outpainting tab loads to empty canvas instead of upload --- .../{index.205e5ea1.js => index.7f5e02f1.js} | 70 +++++++++---------- frontend/dist/index.html | 4 ++ frontend/src/app/socketio/emitters.ts | 2 +- .../features/canvas/IAICanvasBoundingBox.tsx | 20 ++++-- .../src/features/canvas/IAICanvasResizer.tsx | 6 +- frontend/src/features/canvas/canvasSlice.ts | 22 +++--- .../tabs/Outpainting/OutpaintingDisplay.tsx | 10 ++- 7 files changed, 77 insertions(+), 57 deletions(-) rename frontend/dist/assets/{index.205e5ea1.js => index.7f5e02f1.js} (66%) diff --git a/frontend/dist/assets/index.205e5ea1.js b/frontend/dist/assets/index.7f5e02f1.js similarity index 66% rename from frontend/dist/assets/index.205e5ea1.js rename to frontend/dist/assets/index.7f5e02f1.js index cbc7acfa14..e14d954227 100644 --- a/frontend/dist/assets/index.205e5ea1.js +++ b/frontend/dist/assets/index.7f5e02f1.js @@ -1,4 +1,4 @@ -function Zq(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 gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function AC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Yt={};/** +function Zq(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 gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xq(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var C={exports:{}},Yt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function Zq(e,t){for(var n=0;n>>1,me=W[X];if(0>>1;Xi(He,Q))jei(ct,He)?(W[X]=ct,W[je]=Q,X=je):(W[X]=He,W[Se]=Q,X=Se);else if(jei(ct,Q))W[X]=ct,W[je]=Q,X=je;else break e}}return q}function i(W,q){var Q=W.sortIndex-q.sortIndex;return Q!==0?Q:W.id-q.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 L(W){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=W)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(W){if(w=!1,L(W),!b)if(n(l)!==null)b=!0,le(O);else{var q=n(u);q!==null&&G(I,q.startTime-W)}}function O(W,q){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var Q=m;try{for(L(q),g=n(l);g!==null&&(!(g.expirationTime>q)||W&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var R=!1,D=null,z=-1,$=5,V=-1;function Y(){return!(e.unstable_now()-V<$)}function de(){if(D!==null){var W=e.unstable_now();V=W;var q=!0;try{q=D(!0,W)}finally{q?j():(R=!1,D=null)}}else R=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ie=te.port2;te.port1.onmessage=de,j=function(){ie.postMessage(null)}}else j=function(){E(de,0)};function le(W){D=W,R||(R=!0,j())}function G(W,q){z=E(function(){W(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,le(O))},e.unstable_forceFrameRate=function(W){0>W||125X?(W.sortIndex=Q,t(u,W),n(l)===null&&W===n(u)&&(w?(P(z),z=-1):w=!0,G(I,Q-X))):(W.sortIndex=me,t(l,W),b||v||(b=!0,le(O))),W},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(W){var q=m;return function(){var Q=m;m=q;try{return W.apply(this,arguments)}finally{m=Q}}}})(hM);(function(e){e.exports=hM})(Yp);/** + */(function(e){function t(W,q){var Q=W.length;W.push(q);e:for(;0>>1,me=W[X];if(0>>1;Xi(He,Q))jei(ct,He)?(W[X]=ct,W[je]=Q,X=je):(W[X]=He,W[Se]=Q,X=Se);else if(jei(ct,Q))W[X]=ct,W[je]=Q,X=je;else break e}}return q}function i(W,q){var Q=W.sortIndex-q.sortIndex;return Q!==0?Q:W.id-q.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 L(W){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=W)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function I(W){if(w=!1,L(W),!b)if(n(l)!==null)b=!0,le(O);else{var q=n(u);q!==null&&G(I,q.startTime-W)}}function O(W,q){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var Q=m;try{for(L(q),g=n(l);g!==null&&(!(g.expirationTime>q)||W&&!Y());){var X=g.callback;if(typeof X=="function"){g.callback=null,m=g.priorityLevel;var me=X(g.expirationTime<=q);q=e.unstable_now(),typeof me=="function"?g.callback=me:g===n(l)&&r(l),L(q)}else r(l);g=n(l)}if(g!==null)var ye=!0;else{var Se=n(u);Se!==null&&G(I,Se.startTime-q),ye=!1}return ye}finally{g=null,m=Q,v=!1}}var R=!1,D=null,z=-1,$=5,V=-1;function Y(){return!(e.unstable_now()-V<$)}function de(){if(D!==null){var W=e.unstable_now();V=W;var q=!0;try{q=D(!0,W)}finally{q?j():(R=!1,D=null)}}else R=!1}var j;if(typeof k=="function")j=function(){k(de)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ie=te.port2;te.port1.onmessage=de,j=function(){ie.postMessage(null)}}else j=function(){E(de,0)};function le(W){D=W,R||(R=!0,j())}function G(W,q){z=E(function(){W(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,le(O))},e.unstable_forceFrameRate=function(W){0>W||125X?(W.sortIndex=Q,t(u,W),n(l)===null&&W===n(u)&&(w?(P(z),z=-1):w=!0,G(I,Q-X))):(W.sortIndex=me,t(l,W),b||v||(b=!0,le(O))),W},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(W){var q=m;return function(){var Q=m;m=q;try{return W.apply(this,arguments)}finally{m=Q}}}})(fM);(function(e){e.exports=fM})(Yp);/** * @license React * react-dom.production.min.js * @@ -22,14 +22,14 @@ function Zq(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[: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]*$/,rE={},iE={};function pK(e){return N6.call(iE,e)?!0:N6.call(rE,e)?!1:hK.test(e)?iE[e]=!0:(rE[e]=!0,!1)}function gK(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 mK(e,t,n,r){if(t===null||typeof t>"u"||gK(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 so(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 so(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 so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(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 so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var NC=/[\-:]([a-z])/g;function DC(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(NC,DC);Oi[t]=new so(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(NC,DC);Oi[t]=new so(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(NC,DC);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function zC(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N6=Object.prototype.hasOwnProperty,hK=/^[: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]*$/,nE={},rE={};function pK(e){return N6.call(rE,e)?!0:N6.call(nE,e)?!1:hK.test(e)?rE[e]=!0:(nE[e]=!0,!1)}function gK(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 mK(e,t,n,r){if(t===null||typeof t>"u"||gK(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 so(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 so(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 so(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new so(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new so(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 so(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new so(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new so(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new so(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new so(e,5,!1,e.toLowerCase(),null,!1,!1)});var N8=/[\-:]([a-z])/g;function D8(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(N8,D8);Oi[t]=new so(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(N8,D8);Oi[t]=new so(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(N8,D8);Oi[t]=new so(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new so("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new so(e,1,!1,e.toLowerCase(),null,!0,!0)});function z8(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{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vg(e):""}function vK(e){switch(e.tag){case 5:return Vg(e.type);case 16:return Vg("Lazy");case 13:return Vg("Suspense");case 19:return Vg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(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 Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case BC:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vM:return(e.displayName||"Context")+".Consumer";case mM:return(e._context.displayName||"Context")+".Provider";case FC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $C:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(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 F6(t);case 8:return t===BC?"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 bM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=bM(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 G2(e){e._valueTracker||(e._valueTracker=bK(e))}function xM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(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 $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aE(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 SM(e,t){t=t.checked,t!=null&&zC(e,"checked",t,!1)}function H6(e,t){SM(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")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sE(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 W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ug=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=q2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var am={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},xK=["Webkit","ms","Moz","O"];Object.keys(am).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),am[t]=am[e]})});function kM(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||am.hasOwnProperty(e)&&am[e]?(""+t).trim():t+"px"}function EM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=kM(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=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 j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(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 q6=null;function HC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function cE(e){if(e=Tv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function PM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function LM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,cE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var K2=64,Y2=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 Y3(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 Pv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(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=lm),bE=String.fromCharCode(32),xE=!1;function KM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return YM(t);case"keypress":return t.which!==32?null:(xE=!0,bE);case"textInput":return e=t.data,e===bE&&xE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!YC&&KM(e,t)?(e=GM(),o3=GC=Fc=null,Np=!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=_E(n)}}function JM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eO(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function ZC(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 CY(e){var t=eO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&JM(n.ownerDocument.documentElement,n)){if(r!==null&&ZC(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=kE(n,o);var a=kE(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,Dp=null,ew=null,cm=null,tw=!1;function EE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&ZC(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}),cm&&Vm(cm,r)||(cm=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function qn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(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 To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function OE(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));qn(Vi,t),qn(Lo,n)}function uO(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(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,qn(Vi,e),qn(Lo,Lo.current),!0}function RE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=uO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),qn(Vi,e)):Xn(Lo),qn(Lo,n)}var ou=null,p5=!1,aS=!1;function cO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,cO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case j2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&HE(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Ug(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ny(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=yO(!0),bO=yO(!1),Av={},yl=hd(Av),qm=hd(Av),Km=hd(Av);function If(e){if(e===Av)throw Error(Oe(174));return e}function o8(e,t){switch(qn(Km,t),qn(qm,e),qn(yl,Av),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),qn(yl,t)}function L0(){Xn(yl),Xn(qm),Xn(Km)}function xO(e){If(Km.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(qn(qm,e),qn(yl,n))}function a8(e){qm.current===e&&(Xn(yl),Xn(qm))}var cr=hd(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 sS=[];function s8(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function DO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zO(e))BO(t,n);else if(n=pO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),FO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zO(e))BO(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,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,r8(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=pO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),FO(n,t,r))}}function zO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function BO(e,t){dm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,VC(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:VE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,IO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();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=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:WE,useDebugValue:f8,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=WE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||CO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,VE(kO.bind(null,r,o,e),[e]),r.flags|=2048,Xm(9,_O.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ym++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{jx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vg(e):""}function vK(e){switch(e.tag){case 5:return Vg(e.type);case 16:return Vg("Lazy");case 13:return Vg("Suspense");case 19:return Vg("SuspenseList");case 0:case 2:case 15:return e=Gx(e.type,!1),e;case 11:return e=Gx(e.type.render,!1),e;case 1:return e=Gx(e.type,!0),e;default:return""}}function F6(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 Rp:return"Fragment";case Op:return"Portal";case D6:return"Profiler";case B8:return"StrictMode";case z6:return"Suspense";case B6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mM:return(e.displayName||"Context")+".Consumer";case gM:return(e._context.displayName||"Context")+".Provider";case F8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $8:return t=e.displayName||null,t!==null?t:F6(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return F6(e(t))}catch{}}return null}function yK(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 F6(t);case 8:return t===B8?"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 yM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bK(e){var t=yM(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 G2(e){e._valueTracker||(e._valueTracker=bK(e))}function bM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function j3(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 $6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oE(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 xM(e,t){t=t.checked,t!=null&&z8(e,"checked",t,!1)}function H6(e,t){xM(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")?W6(e,t.type,n):t.hasOwnProperty("defaultValue")&&W6(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aE(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 W6(e,t,n){(t!=="number"||j3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ug=Array.isArray;function Zp(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=q2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var am={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},xK=["Webkit","ms","Moz","O"];Object.keys(am).forEach(function(e){xK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),am[t]=am[e]})});function _M(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||am.hasOwnProperty(e)&&am[e]?(""+t).trim():t+"px"}function kM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_M(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SK=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 j6(e,t){if(t){if(SK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function G6(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 q6=null;function H8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var K6=null,Xp=null,Qp=null;function uE(e){if(e=Tv(e)){if(typeof K6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=h5(t),K6(e.stateNode,e.type,t))}}function EM(e){Xp?Qp?Qp.push(e):Qp=[e]:Xp=e}function PM(){if(Xp){var e=Xp,t=Qp;if(Qp=Xp=null,uE(e),t)for(e=0;e>>=0,e===0?32:31-(MK(e)/OK|0)|0}var K2=64,Y2=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 Y3(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 Pv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vs(t),e[t]=n}function zK(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=lm),yE=String.fromCharCode(32),bE=!1;function qM(e,t){switch(e){case"keyup":return dY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Np=!1;function hY(e,t){switch(e){case"compositionend":return KM(t);case"keypress":return t.which!==32?null:(bE=!0,yE);case"textInput":return e=t.data,e===yE&&bE?null:e;default:return null}}function pY(e,t){if(Np)return e==="compositionend"||!Y8&&qM(e,t)?(e=jM(),o3=G8=Fc=null,Np=!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=CE(n)}}function QM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JM(){for(var e=window,t=j3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=j3(e.document)}return t}function Z8(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 CY(e){var t=JM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QM(n.ownerDocument.documentElement,n)){if(r!==null&&Z8(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=_E(n,o);var a=_E(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,Dp=null,ew=null,cm=null,tw=!1;function kE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tw||Dp==null||Dp!==j3(r)||(r=Dp,"selectionStart"in r&&Z8(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}),cm&&Vm(cm,r)||(cm=r,r=Q3(ew,"onSelect"),0Fp||(e.current=sw[Fp],sw[Fp]=null,Fp--)}function qn(e,t){Fp++,sw[Fp]=e.current,e.current=t}var rd={},Vi=hd(rd),Lo=hd(!1),jf=rd;function k0(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 To(e){return e=e.childContextTypes,e!=null}function e4(){Xn(Lo),Xn(Vi)}function ME(e,t,n){if(Vi.current!==rd)throw Error(Oe(168));qn(Vi,t),qn(Lo,n)}function lO(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(Oe(108,yK(e)||"Unknown",i));return hr({},n,r)}function t4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,jf=Vi.current,qn(Vi,e),qn(Lo,Lo.current),!0}function OE(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=lO(e,t,jf),r.__reactInternalMemoizedMergedChildContext=e,Xn(Lo),Xn(Vi),qn(Vi,e)):Xn(Lo),qn(Lo,n)}var ou=null,p5=!1,aS=!1;function uO(e){ou===null?ou=[e]:ou.push(e)}function NY(e){p5=!0,uO(e)}function pd(){if(!aS&&ou!==null){aS=!0;var e=0,t=Tn;try{var n=ou;for(Tn=1;e>=a,i-=a,lu=1<<32-vs(t)+i|n<z?($=D,D=null):$=D.sibling;var V=m(P,D,L[z],I);if(V===null){D===null&&(D=$);break}e&&D&&V.alternate===null&&t(P,D),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V,D=$}if(z===L.length)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;zz?($=D,D=null):$=D.sibling;var Y=m(P,D,V.value,I);if(Y===null){D===null&&(D=$);break}e&&D&&Y.alternate===null&&t(P,D),k=o(Y,k,z),R===null?O=Y:R.sibling=Y,R=Y,D=$}if(V.done)return n(P,D),rr&&yf(P,z),O;if(D===null){for(;!V.done;z++,V=L.next())V=g(P,V.value,I),V!==null&&(k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return rr&&yf(P,z),O}for(D=r(P,D);!V.done;z++,V=L.next())V=v(D,P,z,V.value,I),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?z:V.key),k=o(V,k,z),R===null?O=V:R.sibling=V,R=V);return e&&D.forEach(function(de){return t(P,de)}),rr&&yf(P,z),O}function E(P,k,L,I){if(typeof L=="object"&&L!==null&&L.type===Rp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case j2:e:{for(var O=L.key,R=k;R!==null;){if(R.key===O){if(O=L.type,O===Rp){if(R.tag===7){n(P,R.sibling),k=i(R,L.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pc&&$E(O)===R.type){n(P,R.sibling),k=i(R,L.props),k.ref=xg(P,R,L),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}L.type===Rp?(k=zf(L.props.children,P.mode,I,L.key),k.return=P,P=k):(I=h3(L.type,L.key,L.props,null,P.mode,I),I.ref=xg(P,k,L),I.return=P,P=I)}return a(P);case Op:e:{for(R=L.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){n(P,k.sibling),k=i(k,L.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=pS(L,P.mode,I),k.return=P,P=k}return a(P);case Pc:return R=L._init,E(P,k,R(L._payload),I)}if(Ug(L))return b(P,k,L,I);if(gg(L))return w(P,k,L,I);ny(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,L),k.return=P,P=k):(n(P,k),k=hS(L,P.mode,I),k.return=P,P=k),a(P)):n(P,k)}return E}var P0=vO(!0),yO=vO(!1),Av={},yl=hd(Av),qm=hd(Av),Km=hd(Av);function If(e){if(e===Av)throw Error(Oe(174));return e}function oC(e,t){switch(qn(Km,t),qn(qm,e),qn(yl,Av),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U6(t,e)}Xn(yl),qn(yl,t)}function L0(){Xn(yl),Xn(qm),Xn(Km)}function bO(e){If(Km.current);var t=If(yl.current),n=U6(t,e.type);t!==n&&(qn(qm,e),qn(yl,n))}function aC(e){qm.current===e&&(Xn(yl),Xn(qm))}var cr=hd(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 sS=[];function sC(){for(var e=0;en?n:4,e(!0);var r=lS.transition;lS.transition={};try{e(!1),t()}finally{Tn=n,lS.transition=r}}function NO(){return za().memoizedState}function FY(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DO(e))zO(t,n);else if(n=hO(e,t,n,r),n!==null){var i=oo();ys(n,e,r,i),BO(n,t,r)}}function $Y(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DO(e))zO(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,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,rC(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hO(e,t,i,r),n!==null&&(i=oo(),ys(n,e,r,i),BO(n,t,r))}}function DO(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function zO(e,t){dm=l4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function BO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V8(e,n)}}var u4={readContext:Da,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},HY={readContext:Da,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:WE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,u3(4194308,4,AO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return u3(4194308,4,e,t)},useInsertionEffect:function(e,t){return u3(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();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=FY.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:HE,useDebugValue:fC,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=HE(!1),t=e[0];return e=BY.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=al();if(rr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),di===null)throw Error(Oe(349));(qf&30)!==0||wO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,WE(_O.bind(null,r,o,e),[e]),r.flags|=2048,Xm(9,CO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=di.identifierPrefix;if(rr){var n=uu,r=lu;n=(r&~(1<<32-vs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ym++,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[fl]=t,e[Gm]=r,KO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(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),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(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):(Fi(t),null);case 22:case 23:return y8(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(QC(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),s8(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return a8(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return n8(t.type._context),null;case 22:case 23:return y8(),null;case 24:return null;default:return null}}var iy=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(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 bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var QE=!1;function XY(e,t){if(nw=Z3,e=eO(),ZC(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(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;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:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=QE,QE=!1,b}function fm(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&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(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 xw(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 XO(e){var t=e.alternate;t!==null&&(e.alternate=null,XO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Gm],delete t[aw],delete t[OY],delete t[RY])),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 QO(e){return e.tag===5||e.tag===3||e.tag===4}function JE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||QO(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 Sw(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=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(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(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)JO(e,t,n),n=n.sibling}function JO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),Hm(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(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)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(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)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(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*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-m8?Df(e,0):g8|=n),Ao(e,t)}function sR(e,t){t===0&&((e.mode&1)===0?t=1:(t=Y2,Y2<<=1,(Y2&130023424)===0&&(Y2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Pv(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sR(e,n)}function aZ(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(Oe(314))}r!==null&&r.delete(t),sR(e,n)}var lR;lR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&dO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=u8(null,t,r,e,i,n);var o=c8();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,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i8(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&XC(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=YE(null,t,r,e,n);break e;case 11:t=qE(null,t,r,e,n);break e;case 14:t=KE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),YE(e,t,r,i,n);case 3:e:{if(jO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,gO(e,t),a4(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=T0(Error(Oe(423)),t),t=ZE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=ZE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=bO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return xO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),UO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return GO(e,t,n);case 4:return o8(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),qE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(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(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(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=du(-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),cw(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(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(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}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),KE(e,t,r,i,n);case 15:return WO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),vO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return qO(e,t,n);case 22:return VO(e,t,n)}throw Error(Oe(156,t.tag))};function uR(e,t){return NM(e,t)}function sZ(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 Ma(e,t,n,r){return new sZ(e,t,n,r)}function x8(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return x8(e)?1:0;if(e!=null){if(e=e.$$typeof,e===FC)return 11;if(e===$C)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(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 h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x8(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case BC:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case yM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mM:a=10;break e;case vM:a=9;break e;case FC:a=11;break e;case $C:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=yM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(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=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function S8(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},i8(o),e}function cZ(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=da})(Al);const sy=AC(Al.exports);var lP=Al.exports;U3.createRoot=lP.createRoot,U3.hydrateRoot=lP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function dS(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hw(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UY=typeof WeakMap=="function"?WeakMap:Map;function FO(e,t,n){n=du(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){d4||(d4=!0,Cw=r),hw(e,t)},n}function $O(e,t,n){n=du(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hw(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){hw(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function VE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UY;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=iZ.bind(null,e,t,n),t.then(e,e))}function UE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function jE(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=du(-1,1),t.tag=2,Yc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var jY=Cu.ReactCurrentOwner,Po=!1;function no(e,t,n,r){t.child=e===null?yO(t,null,n,r):P0(t,e.child,n,r)}function GE(e,t,n,r,i){n=n.render;var o=t.ref;return e0(t,i),r=uC(e,t,n,r,o,i),n=cC(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gu(e,t,i)):(rr&&n&&X8(t),t.flags|=1,no(e,t,r,i),t.child)}function qE(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!xC(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,HO(e,t,o,r,i)):(e=h3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Vm,n(a,r)&&e.ref===t.ref)return gu(e,t,i)}return t.flags|=1,e=Qc(o,r),e.ref=t.ref,e.return=t,t.child=e}function HO(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Vm(o,r)&&e.ref===t.ref)if(Po=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Po=!0);else return t.lanes=e.lanes,gu(e,t,i)}return pw(e,t,n,r,i)}function WO(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qn(Up,ea),ea|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qn(Up,ea),ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,qn(Up,ea),ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,qn(Up,ea),ea|=r;return no(e,t,i,n),t.child}function VO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pw(e,t,n,r,i){var o=To(n)?jf:Vi.current;return o=k0(t,o),e0(t,i),n=uC(e,t,n,r,o,i),r=cC(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gu(e,t,i)):(rr&&r&&X8(t),t.flags|=1,no(e,t,n,i),t.child)}function KE(e,t,n,r,i){if(To(n)){var o=!0;t4(t)}else o=!1;if(e0(t,i),t.stateNode===null)c3(e,t),mO(t,n,r),fw(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Da(u):(u=To(n)?jf:Vi.current,u=k0(t,u));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&FE(t,a,r,u),Lc=!1;var m=t.memoizedState;a.state=m,a4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Lo.current||Lc?(typeof h=="function"&&(dw(t,n,h,r),l=t.memoizedState),(s=Lc||BE(t,n,s,r,m,l,u))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,pO(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ds(t.type,s),a.props=u,g=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Da(l):(l=To(n)?jf:Vi.current,l=k0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==g||m!==l)&&FE(t,a,r,l),Lc=!1,m=t.memoizedState,a.state=m,a4(t,r,a,i);var b=t.memoizedState;s!==g||m!==b||Lo.current||Lc?(typeof v=="function"&&(dw(t,n,v,r),b=t.memoizedState),(u=Lc||BE(t,n,u,r,m,b,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return gw(e,t,n,r,o,i)}function gw(e,t,n,r,i,o){VO(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&OE(t,n,!1),gu(e,t,o);r=t.stateNode,jY.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=P0(t,e.child,null,o),t.child=P0(t,null,s,o)):no(e,t,s,o),t.memoizedState=r.state,i&&OE(t,n,!0),t.child}function UO(e){var t=e.stateNode;t.pendingContext?ME(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ME(e,t.context,!1),oC(e,t.containerInfo)}function YE(e,t,n,r,i){return E0(),J8(i),t.flags|=256,no(e,t,n,r),t.child}var mw={dehydrated:null,treeContext:null,retryLane:0};function vw(e){return{baseLanes:e,cachePool:null,transitions:null}}function jO(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),qn(cr,i&1),e===null)return uw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=b5(a,r,0,null),e=zf(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=vw(n),t.memoizedState=mw,e):hC(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return GY(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qc(s,o):(o=zf(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?vw(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=mw,r}return o=e.child,e=o.sibling,r=Qc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function hC(e,t){return t=b5({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ry(e,t,n,r){return r!==null&&J8(r),P0(t,e.child,null,n),e=hC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GY(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=dS(Error(Oe(422))),ry(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=b5({mode:"visible",children:r.children},i,0,null),o=zf(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&P0(t,e.child,null,a),t.child.memoizedState=vw(a),t.memoizedState=mw,o);if((t.mode&1)===0)return ry(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Oe(419)),r=dS(o,r,void 0),ry(e,t,a,r)}if(s=(a&e.childLanes)!==0,Po||s){if(r=di,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,pu(e,i),ys(r,e,i,-1))}return bC(),r=dS(Error(Oe(421))),ry(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=oZ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,na=Kc(i.nextSibling),ra=t,rr=!0,ps=null,e!==null&&(Pa[La++]=lu,Pa[La++]=uu,Pa[La++]=Gf,lu=e.id,uu=e.overflow,Gf=t),t=hC(t,r.children),t.flags|=4096,t)}function ZE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cw(e.return,t,n)}function fS(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function GO(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(no(e,t,r.children,n),r=cr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ZE(e,n,t);else if(e.tag===19)ZE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(qn(cr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&s4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fS(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&s4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fS(t,!0,n,null,o);break;case"together":fS(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function c3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kf|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,n=Qc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qY(e,t,n){switch(t.tag){case 3:UO(t),E0();break;case 5:bO(t);break;case 1:To(t.type)&&t4(t);break;case 4:oC(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;qn(i4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(qn(cr,cr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?jO(e,t,n):(qn(cr,cr.current&1),e=gu(e,t,n),e!==null?e.sibling:null);qn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return GO(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,WO(e,t,n)}return gu(e,t,n)}var qO,yw,KO,YO;qO=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yw=function(){};KO=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,If(yl.current);var o=null;switch(n){case"input":i=$6(e,i),r=$6(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=V6(e,i),r=V6(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=J3)}j6(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Dm.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Dm.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Yn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};YO=function(e,t,n,r){n!==r&&(t.flags|=4)};function Sg(e,t){if(!rr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function KY(e,t,n){var r=t.pendingProps;switch(Q8(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fi(t),null;case 1:return To(t.type)&&e4(),Fi(t),null;case 3:return r=t.stateNode,L0(),Xn(Lo),Xn(Vi),sC(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ty(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ps!==null&&(Ew(ps),ps=null))),yw(e,t),Fi(t),null;case 5:aC(t);var i=If(Km.current);if(n=t.type,e!==null&&t.stateNode!=null)KO(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Oe(166));return Fi(t),null}if(e=If(yl.current),ty(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[fl]=t,r[Gm]=o,e=(t.mode&1)!==0,n){case"dialog":Yn("cancel",r),Yn("close",r);break;case"iframe":case"object":case"embed":Yn("load",r);break;case"video":case"audio":for(i=0;i<\/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[fl]=t,e[Gm]=r,qO(e,t,!1,!1),t.stateNode=e;e:{switch(a=G6(n,r),n){case"dialog":Yn("cancel",e),Yn("close",e),i=r;break;case"iframe":case"object":case"embed":Yn("load",e),i=r;break;case"video":case"audio":for(i=0;iA0&&(t.flags|=128,r=!0,Sg(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),Sg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!rr)return Fi(t),null}else 2*Rr()-o.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Sg(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):(Fi(t),null);case 22:case 23:return yC(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function YY(e,t){switch(Q8(t),t.tag){case 1:return To(t.type)&&e4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return L0(),Xn(Lo),Xn(Vi),sC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return aC(t),null;case 13:if(Xn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));E0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(cr),null;case 4:return L0(),null;case 10:return nC(t.type._context),null;case 22:case 23:return yC(),null;case 24:return null;default:return null}}var iy=!1,Wi=!1,ZY=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Vp(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 bw(e,t,n){try{n()}catch(r){wr(e,t,r)}}var XE=!1;function XY(e,t){if(nw=Z3,e=JM(),Z8(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(rw={focusedElem:e,selectionRange:n},Z3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;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:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(I){wr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return b=XE,XE=!1,b}function fm(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&&bw(t,n,o)}i=i.next}while(i!==r)}}function v5(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 xw(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 ZO(e){var t=e.alternate;t!==null&&(e.alternate=null,ZO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fl],delete t[Gm],delete t[aw],delete t[OY],delete t[RY])),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 XO(e){return e.tag===5||e.tag===3||e.tag===4}function QE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XO(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 Sw(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=J3));else if(r!==4&&(e=e.child,e!==null))for(Sw(e,t,n),e=e.sibling;e!==null;)Sw(e,t,n),e=e.sibling}function ww(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(ww(e,t,n),e=e.sibling;e!==null;)ww(e,t,n),e=e.sibling}var Li=null,fs=!1;function vc(e,t,n){for(n=n.child;n!==null;)QO(e,t,n),n=n.sibling}function QO(e,t,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(u5,n)}catch{}switch(n.tag){case 5:Wi||Vp(n,t);case 6:var r=Li,i=fs;Li=null,vc(e,t,n),Li=r,fs=i,Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(fs?(e=Li,n=n.stateNode,e.nodeType===8?oS(e.parentNode,n):e.nodeType===1&&oS(e,n),Hm(e)):oS(Li,n.stateNode));break;case 4:r=Li,i=fs,Li=n.stateNode.containerInfo,fs=!0,vc(e,t,n),Li=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(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)&&bw(n,t,a),i=i.next}while(i!==r)}vc(e,t,n);break;case 1:if(!Wi&&(Vp(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)}vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,vc(e,t,n),Wi=r):vc(e,t,n);break;default:vc(e,t,n)}}function JE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZY),t.forEach(function(r){var i=aZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function os(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*JY(r/1960))-r,10e?16:e,$c===null)var r=!1;else{if(e=$c,$c=null,f4=0,(an&6)!==0)throw Error(Oe(331));var i=an;for(an|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-mC?Df(e,0):gC|=n),Ao(e,t)}function aR(e,t){t===0&&((e.mode&1)===0?t=1:(t=Y2,Y2<<=1,(Y2&130023424)===0&&(Y2=4194304)));var n=oo();e=pu(e,t),e!==null&&(Pv(e,t,n),Ao(e,n))}function oZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aR(e,n)}function aZ(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(Oe(314))}r!==null&&r.delete(t),aR(e,n)}var sR;sR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lo.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,qY(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,rr&&(t.flags&1048576)!==0&&cO(t,r4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c3(e,t),e=t.pendingProps;var i=k0(t,Vi.current);e0(t,n),i=uC(null,t,r,e,i,n);var o=cC();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,To(r)?(o=!0,t4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iC(t),i.updater=g5,t.stateNode=i,i._reactInternals=t,fw(t,r,e,n),t=gw(null,t,r,!0,o,n)):(t.tag=0,rr&&o&&X8(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lZ(r),e=ds(r,e),i){case 0:t=pw(null,t,r,e,n);break e;case 1:t=KE(null,t,r,e,n);break e;case 11:t=GE(null,t,r,e,n);break e;case 14:t=qE(null,t,r,ds(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),pw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),KE(e,t,r,i,n);case 3:e:{if(UO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pO(e,t),a4(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=T0(Error(Oe(423)),t),t=YE(e,t,r,n,i);break e}else if(r!==i){i=T0(Error(Oe(424)),t),t=YE(e,t,r,n,i);break e}else for(na=Kc(t.stateNode.containerInfo.firstChild),ra=t,rr=!0,ps=null,n=yO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(E0(),r===i){t=gu(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return bO(t),e===null&&uw(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iw(r,i)?a=null:o!==null&&iw(r,o)&&(t.flags|=32),VO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&uw(t),null;case 13:return jO(e,t,n);case 4:return oC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=P0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),GE(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(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(i4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!Lo.current){t=gu(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=du(-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),cw(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(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),cw(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}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,e0(t,n),i=Da(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),qE(e,t,r,i,n);case 15:return HO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),c3(e,t),t.tag=1,To(r)?(e=!0,t4(t)):e=!1,e0(t,n),mO(t,r,i),fw(t,r,i,n),gw(null,t,r,!0,e,n);case 19:return GO(e,t,n);case 22:return WO(e,t,n)}throw Error(Oe(156,t.tag))};function lR(e,t){return RM(e,t)}function sZ(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 Ma(e,t,n,r){return new sZ(e,t,n,r)}function xC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lZ(e){if(typeof e=="function")return xC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F8)return 11;if(e===$8)return 14}return 2}function Qc(e,t){var n=e.alternate;return n===null?(n=Ma(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 h3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")xC(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rp:return zf(n.children,i,o,t);case B8:a=8,i|=8;break;case D6:return e=Ma(12,n,t,i|2),e.elementType=D6,e.lanes=o,e;case z6:return e=Ma(13,n,t,i),e.elementType=z6,e.lanes=o,e;case B6:return e=Ma(19,n,t,i),e.elementType=B6,e.lanes=o,e;case vM:return b5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gM:a=10;break e;case mM:a=9;break e;case F8:a=11;break e;case $8:a=14;break e;case Pc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=Ma(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zf(e,t,n,r){return e=Ma(7,e,r,t),e.lanes=n,e}function b5(e,t,n,r){return e=Ma(22,e,r,t),e.elementType=vM,e.lanes=n,e.stateNode={isHidden:!1},e}function hS(e,t,n){return e=Ma(6,e,null,t),e.lanes=n,e}function pS(e,t,n){return t=Ma(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uZ(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=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function SC(e,t,n,r,i,o,a,s,l){return e=new uZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ma(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iC(o),e}function cZ(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=da})(Al);const sy=A8(Al.exports);var sP=Al.exports;U3.createRoot=sP.createRoot,U3.hydrateRoot=sP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,_5={exports:{}},k5={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,14 +37,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var gZ=C.exports,mZ=Symbol.for("react.element"),vZ=Symbol.for("react.fragment"),yZ=Object.prototype.hasOwnProperty,bZ=gZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xZ={key:!0,ref:!0,__self:!0,__source:!0};function hR(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)yZ.call(t,r)&&!xZ.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:mZ,type:e,key:o,ref:a,props:i,_owner:bZ.current}}k5.Fragment=vZ;k5.jsx=hR;k5.jsxs=hR;(function(e){e.exports=k5})(_5);const Hn=_5.exports.Fragment,x=_5.exports.jsx,ee=_5.exports.jsxs,SZ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Hn,jsx:x,jsxs:ee},Symbol.toStringTag,{value:"Module"}));var k8=C.exports.createContext({});k8.displayName="ColorModeContext";function Iv(){const e=C.exports.useContext(k8);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var ly={light:"chakra-ui-light",dark:"chakra-ui-dark"};function wZ(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?ly.dark:ly.light),document.body.classList.remove(r?ly.light:ly.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 CZ="chakra-ui-color-mode";function _Z(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 kZ=_Z(CZ),uP=()=>{};function cP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function pR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>cP(a,s)),[h,g]=C.exports.useState(()=>cP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);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 L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?uP:k,setColorMode:t?uP:P,forced:t!==void 0}),[E,k,P,t]);return x(k8.Provider,{value:L,children:n})}pR.displayName="ColorModeProvider";var Pw={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]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Vn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Vn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(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 Vn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Vn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(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",PZ=e=>/!(important)?$/.test(e),dP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=dP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=dP(s),i?`${s} !important`:s};function Jm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var uy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Jm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Jm({scale:n,compose:r}):r}}var gR=["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 AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...gR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...gR].join(" ")}var MZ={"--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(" ")},OZ={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 RZ(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 NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},mR="& > :not(style) ~ :not(style)",DZ={[mR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[mR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"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"},BZ=new Set(Object.values(Tw)),vR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||vR.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(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=yR(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 yR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(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}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():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(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||yR(e)||vR.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}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",uy(rn.vh,rn.px)),spaceT:as("space",uy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Jm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",uy(rn.vh,rn.px)),sizesT:as("sizes",uy(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={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(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={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(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={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)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Jm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Jm({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(g4,{flexDir:g4.flexDirection});var bR={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},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={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(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(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}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},gm={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(gm,{insetStart:gm.insetInlineStart,insetEnd:gm.insetInlineEnd});var eX={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")},Zn={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(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 tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={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")},rX={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")},iX={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"}},oX={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 xR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(xR).join(` ${e} `).replace(/calc/g,""),fP=(...e)=>`calc(${E5("+",...e)})`,hP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,pP=(...e)=>`calc(${E5("/",...e)})`,gP=e=>{const t=xR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(fP(e,...t)),subtract:(...t)=>kf(hP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(pP(e,...t)),negate:()=>kf(gP(e)),toString:()=>e.toString()}),{add:fP,subtract:hP,multiply:Iw,divide:pP,negate:gP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var SR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E8=e=>Object.fromEntries(Object.entries(e).sort(SR));function mP(e){const t=E8(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(E8(e));return new Set(t)}function vP(e){if(!e)return e;e=Mw(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 qg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=mP(e),n=Object.entries(e).sort(SR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?vP(u):void 0,{_minW:vP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:qg(null,u),minWQuery:qg(a),minMaxQuery:qg(a,u)}}),r=gX(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:E8(e),asArray:mP(e),details:n,media:[null,...t.map(o=>qg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(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 Ci={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}`},yc=e=>wR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>wR(t=>e(t,"~ &"),"[data-peer]",".peer"),wR=(e,...t)=>t.map(e).join(", "),P5={_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:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.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]"},vX=Object.keys(P5);function yP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=yP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=kf.negate(s),P=kf.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}=yP(b,t?.cssVarPrefix);return E},g=xs(s)?s:{default:s};n=gl(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=P5)==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 bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(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:mX(n.breakpoints)}),n}var P8=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,bR,JZ,gm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,bR,gm),LX=Object.keys(PX),TX=[...Object.keys(P8),...vX],AX={...P8,...P5},IX=e=>e in AX,MX=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=xs(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"&&!RX(t),DX=(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]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},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=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var CR=e=>t=>zX({theme:t,pseudos:P5,configs:P8})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||tv($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Mv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Mv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!tv(bl());)ia();return Mv(e,Oo)}function iQ(e){return TR(v3("",null,null,null,[""],e=LR(e),0,[0],e))}function v3(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,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:cy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&cy(v>32?xP(D+";",r,n,g-1):xP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(cy(R=bP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&cy(bP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function bP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=A8(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?L8:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,_R,L5(QX()),ev(e,2,-2),0)}function xP(e,t,n,r){return A5(e,t,n,T8,ev(e,0,r),ev(e,r+1,-1),r)}function n0(e,t){for(var n="",r=A8(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?IR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case T8:t.return=IR(t.value,t.length);break;case kR:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case L8:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],MR=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||gQ,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{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?ly.dark:ly.light),document.body.classList.remove(r?ly.light:ly.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 CZ="chakra-ui-color-mode";function _Z(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 kZ=_Z(CZ),lP=()=>{};function uP(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=kZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>uP(a,s)),[h,g]=C.exports.useState(()=>uP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>wZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(I=>{const O=I==="system"?m():I;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);bs(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const I=a.get();if(I){P(I);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 L=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?lP:k,setColorMode:t?lP:P,forced:t!==void 0}),[E,k,P,t]);return x(kC.Provider,{value:L,children:n})}hR.displayName="ColorModeProvider";var Pw={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]",L="[object Proxy]",I="[object RegExp]",O="[object Set]",R="[object String]",D="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",V="[object DataView]",Y="[object Float32Array]",de="[object Float64Array]",j="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",le="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",q="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ye={};ye[Y]=ye[de]=ye[j]=ye[te]=ye[ie]=ye[le]=ye[G]=ye[W]=ye[q]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[V]=ye[g]=ye[m]=ye[v]=ye[w]=ye[E]=ye[k]=ye[I]=ye[O]=ye[R]=ye[z]=!1;var Se=typeof gs=="object"&&gs&&gs.Object===Object&&gs,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Se||He||Function("return this")(),ct=t&&!t.nodeType&&t,qe=ct&&!0&&e&&!e.nodeType&&e,dt=qe&&qe.exports===ct,Xe=dt&&Se.process,it=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),It=it&&it.isTypedArray;function wt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Te(U,ne){for(var pe=-1,Ze=Array(U);++pe-1}function d1(U,ne){var pe=this.__data__,Ze=ja(pe,U);return Ze<0?(++this.size,pe.push([U,ne])):pe[Ze][1]=ne,this}Ro.prototype.clear=Pd,Ro.prototype.delete=c1,Ro.prototype.get=Mu,Ro.prototype.has=Ld,Ro.prototype.set=d1;function Is(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,mt=zt>2?pe[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&kh(pe[0],pe[1],mt)&&(dn=zt<3?void 0:dn,zt=1),ne=Object(ne);++Ze-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function zu(U){if(U!=null){try{return En.call(U)}catch{}try{return U+""}catch{}}return""}function ma(U,ne){return U===ne||U!==U&&ne!==ne}var Od=Dl(function(){return arguments}())?Dl:function(U){return Vn(U)&&yn.call(U,"callee")&&!Fe.call(U,"callee")},Fl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Fu(U)}function Eh(U){return Vn(U)&&Ht(U)}var Bu=Qt||_1;function Fu(U){if(!Bo(U))return!1;var ne=Os(U);return ne==v||ne==b||ne==u||ne==L}function Ph(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 Vn(U){return U!=null&&typeof U=="object"}function Rd(U){if(!Vn(U)||Os(U)!=k)return!1;var ne=sn(U);if(ne===null)return!0;var pe=yn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&En.call(pe)==Xt}var Lh=It?ft(It):Ru;function Nd(U){return jr(U,Th(U))}function Th(U){return Ht(U)?S1(U,!0):Rs(U)}var ln=Ga(function(U,ne,pe,Ze){No(U,ne,pe,Ze)});function Wt(U){return function(){return U}}function Ah(U){return U}function _1(){return!1}e.exports=ln})(Pw,Pw.exports);const gl=Pw.exports;function xs(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",PZ=e=>/!(important)?$/.test(e),cP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Lw=(e,t)=>n=>{const r=String(t),i=PZ(r),o=cP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=cP(s),i?`${s} !important`:s};function Jm(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=Lw(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var uy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function as(e,t){return n=>{const r={property:n,scale:e};return r.transform=Jm({scale:e,transform:t}),r}}var LZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function TZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:LZ(t),transform:n?Jm({scale:n,compose:r}):r}}var pR=["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 AZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pR].join(" ")}function IZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pR].join(" ")}var MZ={"--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(" ")},OZ={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 RZ(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 NZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},gR="& > :not(style) ~ :not(style)",DZ={[gR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},zZ={[gR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Tw={"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"},BZ=new Set(Object.values(Tw)),mR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),FZ=e=>e.trim();function $Z(e,t){var n;if(e==null||mR.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(FZ).filter(Boolean);if(l?.length===0)return e;const u=s in Tw?Tw[s]:s;l.unshift(u);const h=l.map(g=>{if(BZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=vR(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 vR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),HZ=(e,t)=>$Z(e,t??{});function WZ(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}},nl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:MZ},backdropFilter(e){return e!=="auto"?e:OZ},ring(e){return RZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?AZ():e==="auto-gpu"?IZ():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(WZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:HZ,blur:nl("blur"),opacity:nl("opacity"),brightness:nl("brightness"),contrast:nl("contrast"),dropShadow:nl("drop-shadow"),grayscale:nl("grayscale"),hueRotate:nl("hue-rotate"),invert:nl("invert"),saturate:nl("saturate"),sepia:nl("sepia"),bgImage(e){return e==null||vR(e)||mR.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}=NZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:as("borderWidths"),borderStyles:as("borderStyles"),colors:as("colors"),borders:as("borders"),radii:as("radii",rn.px),space:as("space",uy(rn.vh,rn.px)),spaceT:as("space",uy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Jm({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:as("sizes",uy(rn.vh,rn.px)),sizesT:as("sizes",uy(rn.vh,rn.fraction)),shadows:as("shadows"),logical:TZ,blur:as("blur",rn.blur)},p3={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(p3,{bgImage:p3.backgroundImage,bgImg:p3.backgroundImage});var hn={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(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var UZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Aw={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Aw,{shadow:Aw.boxShadow});var jZ={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)},g4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:DZ,transform:Jm({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:zZ,transform:Jm({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(g4,{flexDir:g4.flexDirection});var yR={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},GZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ea={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(Ea,{w:Ea.width,h:Ea.height,minW:Ea.minWidth,maxW:Ea.maxWidth,minH:Ea.minHeight,maxH:Ea.maxHeight,overscroll:Ea.overscrollBehavior,overscrollX:Ea.overscrollBehaviorX,overscrollY:Ea.overscrollBehaviorY});var qZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function KZ(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}},ZZ=YZ(KZ),XZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gS=(e,t,n)=>{const r={},i=ZZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},JZ={srOnly:{transform(e){return e===!0?XZ:e==="focusable"?QZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gS(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gS(t,e,n)}},gm={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(gm,{insetStart:gm.insetInlineStart,insetEnd:gm.insetInlineEnd});var eX={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")},Zn={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(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 tX={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},nX={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")},rX={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")},iX={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"}},oX={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 bR(e){return xs(e)&&e.reference?e.reference:String(e)}var E5=(e,...t)=>t.map(bR).join(` ${e} `).replace(/calc/g,""),dP=(...e)=>`calc(${E5("+",...e)})`,fP=(...e)=>`calc(${E5("-",...e)})`,Iw=(...e)=>`calc(${E5("*",...e)})`,hP=(...e)=>`calc(${E5("/",...e)})`,pP=e=>{const t=bR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Iw(t,-1)},kf=Object.assign(e=>({add:(...t)=>kf(dP(e,...t)),subtract:(...t)=>kf(fP(e,...t)),multiply:(...t)=>kf(Iw(e,...t)),divide:(...t)=>kf(hP(e,...t)),negate:()=>kf(pP(e)),toString:()=>e.toString()}),{add:dP,subtract:fP,multiply:Iw,divide:hP,negate:pP});function aX(e,t="-"){return e.replace(/\s+/g,t)}function sX(e){const t=aX(e.toString());return uX(lX(t))}function lX(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function uX(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function cX(e,t=""){return[t,e].filter(Boolean).join("-")}function dX(e,t){return`var(${e}${t?`, ${t}`:""})`}function fX(e,t=""){return sX(`--${cX(e,t)}`)}function ei(e,t,n){const r=fX(e,n);return{variable:r,reference:dX(r,t)}}function hX(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function pX(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Mw(e){if(e==null)return e;const{unitless:t}=pX(e);return t||typeof e=="number"?`${e}px`:e}var xR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,EC=e=>Object.fromEntries(Object.entries(e).sort(xR));function gP(e){const t=EC(e);return Object.assign(Object.values(t),t)}function gX(e){const t=Object.keys(EC(e));return new Set(t)}function mP(e){if(!e)return e;e=Mw(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 qg(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Mw(e)})`),t&&n.push("and",`(max-width: ${Mw(t)})`),n.join(" ")}function mX(e){if(!e)return null;e.base=e.base??"0px";const t=gP(e),n=Object.entries(e).sort(xR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?mP(u):void 0,{_minW:mP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:qg(null,u),minWQuery:qg(a),minMaxQuery:qg(a,u)}}),r=gX(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:EC(e),asArray:gP(e),details:n,media:[null,...t.map(o=>qg(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;hX(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 Ci={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}`},yc=e=>SR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jl=e=>SR(t=>e(t,"~ &"),"[data-peer]",".peer"),SR=(e,...t)=>t.map(e).join(", "),P5={_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:yc(Ci.hover),_peerHover:Jl(Ci.hover),_groupFocus:yc(Ci.focus),_peerFocus:Jl(Ci.focus),_groupFocusVisible:yc(Ci.focusVisible),_peerFocusVisible:Jl(Ci.focusVisible),_groupActive:yc(Ci.active),_peerActive:Jl(Ci.active),_groupDisabled:yc(Ci.disabled),_peerDisabled:Jl(Ci.disabled),_groupInvalid:yc(Ci.invalid),_peerInvalid:Jl(Ci.invalid),_groupChecked:yc(Ci.checked),_peerChecked:Jl(Ci.checked),_groupFocusWithin:yc(Ci.focusWithin),_peerFocusWithin:Jl(Ci.focusWithin),_peerPlaceholderShown:Jl(Ci.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]"},vX=Object.keys(P5);function vP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function yX(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=kf.negate(s),P=kf.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=xs(s)?s:{default:s};n=gl(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=P5)==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 bX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xX(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var SX=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function wX(e){return xX(e,SX)}function CX(e){return e.semanticTokens}function _X(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function kX({tokens:e,semanticTokens:t}){const n=Object.entries(Ow(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Ow(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Ow(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(Ow(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function EX(e){var t;const n=_X(e),r=wX(n),i=CX(n),o=kX({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=yX(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:mX(n.breakpoints)}),n}var PC=gl({},p3,hn,UZ,g4,Ea,jZ,eX,GZ,yR,JZ,gm,Aw,Zn,oX,iX,tX,nX,qZ,rX),PX=Object.assign({},Zn,Ea,g4,yR,gm),LX=Object.keys(PX),TX=[...Object.keys(PC),...vX],AX={...PC,...P5},IX=e=>e in AX,MX=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=xs(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"&&!RX(t),DX=(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]=OX(t);return t=n(i)??r(o)??r(t),t};function zX(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=MX(l)(r);let h={};for(let g in u){const m=u[g];let v=Mf(m,r);g in n&&(g=n[g]),NX(g,v)&&(v=DX(r,v));let b=t[g];if(b===!0&&(b={property:g}),xs(v)){h[g]=h[g]??{},h[g]=gl({},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=Mf(b?.property,r);if(!a&&b?.static){const P=Mf(b.static,r);h=gl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=gl({},h,w):h[E]=w;continue}if(xs(w)){h=gl({},h,w);continue}h[g]=w}return h};return i}var wR=e=>t=>zX({theme:t,pseudos:P5,configs:PC})(e);function ir(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function BX(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function FX(e,t){for(let n=t+1;n{gl(u,{[L]:m?k[L]:{[P]:k[L]}})});continue}if(!v){m?gl(u,k):u[P]=k;continue}u[P]=k}}return u}}function HX(e){return t=>{const{variant:n,size:r,theme:i}=t,o=$X(i);return gl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function WX(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return bX(e,["styleConfig","size","variant","colorScheme"])}function VX(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(q0,--Oo):0,I0--,$r===10&&(I0=1,T5--),$r}function ia(){return $r=Oo2||tv($r)>3?"":" "}function tQ(e,t){for(;--t&&ia()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Mv(e,g3()+(t<6&&bl()==32&&ia()==32))}function Nw(e){for(;ia();)switch($r){case e:return Oo;case 34:case 39:e!==34&&e!==39&&Nw($r);break;case 40:e===41&&Nw(e);break;case 92:ia();break}return Oo}function nQ(e,t){for(;ia()&&e+$r!==47+10;)if(e+$r===42+42&&bl()===47)break;return"/*"+Mv(t,Oo-1)+"*"+L5(e===47?e:ia())}function rQ(e){for(;!tv(bl());)ia();return Mv(e,Oo)}function iQ(e){return LR(v3("",null,null,null,[""],e=PR(e),0,[0],e))}function v3(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,L="",I=i,O=o,R=r,D=L;E;)switch(b=k,k=ia()){case 40:if(b!=108&&Ti(D,g-1)==58){Rw(D+=wn(m3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=m3(k);break;case 9:case 10:case 13:case 32:D+=eQ(b);break;case 92:D+=tQ(g3()-1,7);continue;case 47:switch(bl()){case 42:case 47:cy(oQ(nQ(ia(),g3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=cl(D)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(D)-g&&cy(v>32?bP(D+";",r,n,g-1):bP(wn(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(cy(R=yP(D,t,n,u,h,i,s,L,I=[],O=[],g),o),k===123)if(h===0)v3(D,t,R,R,I,o,g,s,O);else switch(m===99&&Ti(D,3)===110?100:m){case 100:case 109:case 115:v3(e,R,R,r&&cy(yP(e,R,R,0,0,i,s,L,i,I=[],g),O),i,O,g,s,r?I:O);break;default:v3(D,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,L=D="",g=a;break;case 58:g=1+cl(D),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&JX()==125)continue}switch(D+=L5(k),k*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(cl(D)-1)*P,P=1;break;case 64:bl()===45&&(D+=m3(ia())),m=bl(),h=g=cl(L=D+=rQ(g3())),k++;break;case 45:b===45&&cl(D)==2&&(w=0)}}return o}function yP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=AC(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=L);return A5(e,t,n,i===0?LC:s,l,u,h)}function oQ(e,t,n){return A5(e,t,n,CR,L5(QX()),ev(e,2,-2),0)}function bP(e,t,n,r){return A5(e,t,n,TC,ev(e,0,r),ev(e,r+1,-1),r)}function n0(e,t){for(var n="",r=AC(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+m4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?AR(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,cl(e)-3-(~Rw(e,"!important")&&10))){case 107:return wn(e,":",":"+pn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+$i+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+$i+e+e}return e}var pQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case TC:t.return=AR(t.value,t.length);break;case _R:return n0([Cg(t,{value:wn(t.value,"@","@"+pn)})],i);case LC:if(t.length)return XX(t.props,function(o){switch(ZX(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return n0([Cg(t,{props:[wn(o,/:(read-\w+)/,":"+m4+"$1")]})],i);case"::placeholder":return n0([Cg(t,{props:[wn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,":"+m4+"$1")]}),Cg(t,{props:[wn(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},gQ=[pQ],IR=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||gQ,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 EQ={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},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,FR=function(t){return t.charCodeAt(1)===45},CP=function(t){return t!=null&&typeof t!="boolean"},mS=AR(function(e){return FR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),_P=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!FR(t)&&typeof n=="number"&&n!==0?n+"px":n};function nv(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 dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,nv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(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}},qR=GQ(jQ);function KR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var YR=e=>KR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function ZR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(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 XQ=/^((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)-.*))$/,QQ=AR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},LP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},TP=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},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return zR(n,r,i),IQ(function(){return BR(n,r,i)}),null},nJ=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=TP(t,n,r),l=s||LP(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 iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(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 dy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function XR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function AP(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 IJ(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=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function IP(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 Fw={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 DJ(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=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=fy(e.s),i=fy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=fy(e.s),o=fy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=XR(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 zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),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 FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:OP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:OP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.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 eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Ov=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=NJ(t)),this.originalInput=t;var i=DJ(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=XR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=IP(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=IP(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=AP(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=AP(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),MP(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),OJ(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="#"+MP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);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=dy(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=dy(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=dy(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=dy(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(QR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Ov(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=JR(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 v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(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 v4([r,i],n.seed)}function VJ(e,t){for(var n=JR(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 UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=tN.find(function(a){return a.name===e});if(n){var r=eN(n);if(r.hueRange)return r.hueRange}var i=new Ov(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function JR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=tN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(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 tN=[{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 jJ(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=jJ(e,`colors.${t}`,t),{isValid:i}=new Ov(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Ov(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Ov(r).setAlpha(t).toRgbString()};function RP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + */var hi=typeof Symbol=="function"&&Symbol.for,IC=hi?Symbol.for("react.element"):60103,MC=hi?Symbol.for("react.portal"):60106,I5=hi?Symbol.for("react.fragment"):60107,M5=hi?Symbol.for("react.strict_mode"):60108,O5=hi?Symbol.for("react.profiler"):60114,R5=hi?Symbol.for("react.provider"):60109,N5=hi?Symbol.for("react.context"):60110,OC=hi?Symbol.for("react.async_mode"):60111,D5=hi?Symbol.for("react.concurrent_mode"):60111,z5=hi?Symbol.for("react.forward_ref"):60112,B5=hi?Symbol.for("react.suspense"):60113,mQ=hi?Symbol.for("react.suspense_list"):60120,F5=hi?Symbol.for("react.memo"):60115,$5=hi?Symbol.for("react.lazy"):60116,vQ=hi?Symbol.for("react.block"):60121,yQ=hi?Symbol.for("react.fundamental"):60117,bQ=hi?Symbol.for("react.responder"):60118,xQ=hi?Symbol.for("react.scope"):60119;function ha(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case IC:switch(e=e.type,e){case OC:case D5:case I5:case O5:case M5:case B5:return e;default:switch(e=e&&e.$$typeof,e){case N5:case z5:case $5:case F5:case R5:return e;default:return t}}case MC:return t}}}function OR(e){return ha(e)===D5}Mn.AsyncMode=OC;Mn.ConcurrentMode=D5;Mn.ContextConsumer=N5;Mn.ContextProvider=R5;Mn.Element=IC;Mn.ForwardRef=z5;Mn.Fragment=I5;Mn.Lazy=$5;Mn.Memo=F5;Mn.Portal=MC;Mn.Profiler=O5;Mn.StrictMode=M5;Mn.Suspense=B5;Mn.isAsyncMode=function(e){return OR(e)||ha(e)===OC};Mn.isConcurrentMode=OR;Mn.isContextConsumer=function(e){return ha(e)===N5};Mn.isContextProvider=function(e){return ha(e)===R5};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===IC};Mn.isForwardRef=function(e){return ha(e)===z5};Mn.isFragment=function(e){return ha(e)===I5};Mn.isLazy=function(e){return ha(e)===$5};Mn.isMemo=function(e){return ha(e)===F5};Mn.isPortal=function(e){return ha(e)===MC};Mn.isProfiler=function(e){return ha(e)===O5};Mn.isStrictMode=function(e){return ha(e)===M5};Mn.isSuspense=function(e){return ha(e)===B5};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===I5||e===D5||e===O5||e===M5||e===B5||e===mQ||typeof e=="object"&&e!==null&&(e.$$typeof===$5||e.$$typeof===F5||e.$$typeof===R5||e.$$typeof===N5||e.$$typeof===z5||e.$$typeof===yQ||e.$$typeof===bQ||e.$$typeof===xQ||e.$$typeof===vQ)};Mn.typeOf=ha;(function(e){e.exports=Mn})(MR);var RR=MR.exports,SQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},wQ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},NR={};NR[RR.ForwardRef]=SQ;NR[RR.Memo]=wQ;var CQ=!0;function _Q(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var DR=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||CQ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},zR=function(t,n,r){DR(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function kQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EQ={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},PQ=/[A-Z]|^ms/g,LQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BR=function(t){return t.charCodeAt(1)===45},wP=function(t){return t!=null&&typeof t!="boolean"},mS=TR(function(e){return BR(e)?e:e.replace(PQ,"-$&").toLowerCase()}),CP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(LQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return EQ[t]!==1&&!BR(t)&&typeof n=="number"&&n!==0?n+"px":n};function nv(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 dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return TQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,nv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function TQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function jQ(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}},GR=GQ(jQ);function qR(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var KR=e=>qR(e,t=>t!=null);function qQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KQ=qQ();function YR(e,...t){return VQ(e)?e(...t):e}function YQ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function ZQ(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 XQ=/^((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)-.*))$/,QQ=TR(function(e){return XQ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JQ=QQ,eJ=function(t){return t!=="theme"},PP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JQ:eJ},LP=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},tJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DR(n,r,i),IQ(function(){return zR(n,r,i)}),null},nJ=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=LP(t,n,r),l=s||PP(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 iJ=In("accordion").parts("root","container","button","panel").extend("icon"),oJ=In("alert").parts("title","description","container").extend("icon","spinner"),aJ=In("avatar").parts("label","badge","container").extend("excessLabel","group"),sJ=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var lJ=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var uJ=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cJ=In("editable").parts("preview","input","textarea"),dJ=In("form").parts("container","requiredIndicator","helperText"),fJ=In("formError").parts("text","icon"),hJ=In("input").parts("addon","field","element"),pJ=In("list").parts("container","item","icon"),gJ=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),mJ=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vJ=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var yJ=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),bJ=In("progress").parts("label","filledTrack","track"),xJ=In("radio").parts("container","control","label"),SJ=In("select").parts("field","icon"),wJ=In("slider").parts("container","track","thumb","filledTrack","mark"),CJ=In("stat").parts("container","label","helpText","number","icon"),_J=In("switch").parts("container","track","thumb"),kJ=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),EJ=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),PJ=In("tag").parts("container","label","closeButton");function Mi(e,t){LJ(e)&&(e="100%");var n=TJ(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 dy(e){return Math.min(1,Math.max(0,e))}function LJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function TJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ZR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function AJ(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function TP(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 IJ(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=vS(s,a,e+1/3),i=vS(s,a,e),o=vS(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function AP(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 Fw={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 DJ(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=FJ(e)),typeof e=="object"&&(eu(e.r)&&eu(e.g)&&eu(e.b)?(t=AJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):eu(e.h)&&eu(e.s)&&eu(e.v)?(r=fy(e.s),i=fy(e.v),t=MJ(e.h,r,i),a=!0,s="hsv"):eu(e.h)&&eu(e.s)&&eu(e.l)&&(r=fy(e.s),o=fy(e.l),t=IJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ZR(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 zJ="[-\\+]?\\d+%?",BJ="[-\\+]?\\d*\\.\\d+%?",Hc="(?:".concat(BJ,")|(?:").concat(zJ,")"),yS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),bS="[\\s|\\(]+(".concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")[,|\\s]+(").concat(Hc,")\\s*\\)?"),us={CSS_UNIT:new RegExp(Hc),rgb:new RegExp("rgb"+yS),rgba:new RegExp("rgba"+bS),hsl:new RegExp("hsl"+yS),hsla:new RegExp("hsla"+bS),hsv:new RegExp("hsv"+yS),hsva:new RegExp("hsva"+bS),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 FJ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Fw[e])e=Fw[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=us.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=us.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=us.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=us.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=us.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=us.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=us.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:MP(n[4]),format:t?"name":"hex8"}:(n=us.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=us.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:MP(n[4]+n[4]),format:t?"name":"hex8"}:(n=us.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 eu(e){return Boolean(us.CSS_UNIT.exec(String(e)))}var Ov=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=NJ(t)),this.originalInput=t;var i=DJ(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=ZR(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=AP(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=AP(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=TP(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=TP(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),IP(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),OJ(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="#"+IP(this.r,this.g,this.b,!1),n=0,r=Object.entries(Fw);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=dy(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=dy(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=dy(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=dy(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(XR(e));return e.count=t,n}var r=$J(e.hue,e.seed),i=HJ(r,e),o=WJ(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Ov(a)}function $J(e,t){var n=UJ(e),r=v4(n,t);return r<0&&(r=360+r),r}function HJ(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return v4([0,100],t.seed);var n=QR(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 v4([r,i],t.seed)}function WJ(e,t,n){var r=VJ(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 v4([r,i],n.seed)}function VJ(e,t){for(var n=QR(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 UJ(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=eN.find(function(a){return a.name===e});if(n){var r=JR(n);if(r.hueRange)return r.hueRange}var i=new Ov(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function QR(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=eN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function v4(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 JR(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 eN=[{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 jJ(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=jJ(e,`colors.${t}`,t),{isValid:i}=new Ov(r);return i?r:n},qJ=e=>t=>{const n=Ai(t,e);return new Ov(n).isDark()?"dark":"light"},KJ=e=>t=>qJ(e)(t)==="dark",M0=(e,t)=>n=>{const r=Ai(n,e);return new Ov(r).setAlpha(t).toRgbString()};function OP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( 45deg, ${t} 25%, transparent 25%, @@ -53,12 +53,12 @@ Error generating stack: `+o.message+` ${t} 75%, transparent 75%, transparent - )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=QR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(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 XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function D8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function nN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(nN).join(` ${e} `).replace(/calc/g,""),NP=(...e)=>`calc(${V5("+",...e)})`,DP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,zP=(...e)=>`calc(${V5("/",...e)})`,BP=e=>{const t=nN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(NP(e,...t)),subtract:(...t)=>su(DP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(zP(e,...t)),negate:()=>su(BP(e)),toString:()=>e.toString()}),{add:NP,subtract:DP,multiply:$w,divide:zP,negate:BP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function rN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,rN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${rN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Rv,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Rv({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function z8(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Rv(e=>{const{colorScheme:t}=e,n=z8(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Rv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),iN={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"},wee={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"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...iN,...wee,container:Cee},oN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:aN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},FP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:FP.reference,"&:not([data-loaded])":{[FP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=aN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?oN[e]:void 0;return aN({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 Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},vm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={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"}}},sN=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=M0(`${t}.200`,.12)(n),i=M0(`${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)}}},Uee=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(sN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=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`}=jee[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)}}},qee=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)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:sN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={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"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),ym=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:ym.reference,h:ym.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)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[ym.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[ym.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[ym.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),bm=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[bm.reference],h:[bm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[bm.variable]:"sizes.10",fontSize:"md"},md:{[bm.variable]:"sizes.8",fontSize:"xs"},sm:{[bm.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=vm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"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}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={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"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function B8(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 rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(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=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(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)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B8(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"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=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"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=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"}),xne=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"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=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)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={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"}},lN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:uN}=ir(vJ.keys),F8=ji("number-input-stepper-width"),cN=ji("number-input-input-padding"),$ne=su(F8).add("0.5rem").toString(),Hne={[F8.variable]:"sizes.6",[cN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[F8.reference]},Une=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"}}),jne=uN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function hy(e){var t,n;const r=(t=gn.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=lN.fontSizes[o];return uN({field:{...r.field,paddingInlineEnd:cN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:hy("xs"),sm:hy("sm"),md:hy("md"),lg:hy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),$P,Kne={...($P=gn.baseStyle)==null?void 0:$P.field,textAlign:"center"},Yne={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"}},HP,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((HP=gn.variants)==null?void 0:HP.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),py=ji("popper-bg"),ere=ji("popper-arrow-bg"),WP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[py.variable]:"colors.white",bg:py.reference,[ere.variable]:py.reference,[WP.variable]:"colors.gray.200",_dark:{[py.variable]:"colors.gray.700",[WP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:Kg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(RP(),RP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + )`,backgroundSize:`${e} ${e}`}}function YJ(e){const t=XR().toHexString();return!e||GJ(e)?t:e.string&&e.colors?XJ(e.string,e.colors):e.string&&!e.colors?ZJ(e.string):e.colors&&!e.string?QJ(e.colors):t}function ZJ(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 XJ(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function DC(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function JJ(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function tN(e){return JJ(e)&&e.reference?e.reference:String(e)}var V5=(e,...t)=>t.map(tN).join(` ${e} `).replace(/calc/g,""),RP=(...e)=>`calc(${V5("+",...e)})`,NP=(...e)=>`calc(${V5("-",...e)})`,$w=(...e)=>`calc(${V5("*",...e)})`,DP=(...e)=>`calc(${V5("/",...e)})`,zP=e=>{const t=tN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$w(t,-1)},su=Object.assign(e=>({add:(...t)=>su(RP(e,...t)),subtract:(...t)=>su(NP(e,...t)),multiply:(...t)=>su($w(e,...t)),divide:(...t)=>su(DP(e,...t)),negate:()=>su(zP(e)),toString:()=>e.toString()}),{add:RP,subtract:NP,multiply:$w,divide:DP,negate:zP});function eee(e){return!Number.isInteger(parseFloat(e.toString()))}function tee(e,t="-"){return e.replace(/\s+/g,t)}function nN(e){const t=tee(e.toString());return t.includes("\\.")?e:eee(e)?t.replace(".","\\."):e}function nee(e,t=""){return[t,nN(e)].filter(Boolean).join("-")}function ree(e,t){return`var(${nN(e)}${t?`, ${t}`:""})`}function iee(e,t=""){return`--${nee(e,t)}`}function ji(e,t){const n=iee(e,t?.prefix);return{variable:n,reference:ree(n,oee(t?.fallback))}}function oee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:aee,defineMultiStyleConfig:see}=ir(iJ.keys),lee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},uee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},cee={pt:"2",px:"4",pb:"5"},dee={fontSize:"1.25em"},fee=aee({container:lee,button:uee,panel:cee,icon:dee}),hee=see({baseStyle:fee}),{definePartsStyle:Rv,defineMultiStyleConfig:pee}=ir(oJ.keys),oa=ei("alert-fg"),mu=ei("alert-bg"),gee=Rv({container:{bg:mu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:oa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function zC(e){const{theme:t,colorScheme:n}=e,r=M0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var mee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark}}}}),vee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:oa.reference}}}),yee=Rv(e=>{const{colorScheme:t}=e,n=zC(e);return{container:{[oa.variable]:`colors.${t}.500`,[mu.variable]:n.light,_dark:{[oa.variable]:`colors.${t}.200`,[mu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:oa.reference}}}),bee=Rv(e=>{const{colorScheme:t}=e;return{container:{[oa.variable]:"colors.white",[mu.variable]:`colors.${t}.500`,_dark:{[oa.variable]:"colors.gray.900",[mu.variable]:`colors.${t}.200`},color:oa.reference}}}),xee={subtle:mee,"left-accent":vee,"top-accent":yee,solid:bee},See=pee({baseStyle:gee,variants:xee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),rN={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"},wee={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"},Cee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_ee={...rN,...wee,container:Cee},iN=_ee,kee=e=>typeof e=="function";function fi(e,...t){return kee(e)?e(...t):e}var{definePartsStyle:oN,defineMultiStyleConfig:Eee}=ir(aJ.keys),r0=ei("avatar-border-color"),xS=ei("avatar-bg"),Pee={borderRadius:"full",border:"0.2em solid",[r0.variable]:"white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference},Lee={[xS.variable]:"colors.gray.200",_dark:{[xS.variable]:"colors.whiteAlpha.400"},bgColor:xS.reference},BP=ei("avatar-background"),Tee=e=>{const{name:t,theme:n}=e,r=t?YJ({string:t}):"colors.gray.400",i=KJ(r)(n);let o="white";return i||(o="gray.800"),{bg:BP.reference,"&:not([data-loaded])":{[BP.variable]:r},color:o,[r0.variable]:"colors.white",_dark:{[r0.variable]:"colors.gray.800"},borderColor:r0.reference,verticalAlign:"top"}},Aee=oN(e=>({badge:fi(Pee,e),excessLabel:fi(Lee,e),container:fi(Tee,e)}));function bc(e){const t=e!=="100%"?iN[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 Iee={"2xs":bc(4),xs:bc(6),sm:bc(8),md:bc(12),lg:bc(16),xl:bc(24),"2xl":bc(32),full:bc("100%")},Mee=Eee({baseStyle:Aee,sizes:Iee,defaultProps:{size:"md"}}),Oee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},i0=ei("badge-bg"),ml=ei("badge-color"),Ree=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.500`,.6)(n);return{[i0.variable]:`colors.${t}.500`,[ml.variable]:"colors.white",_dark:{[i0.variable]:r,[ml.variable]:"colors.whiteAlpha.800"},bg:i0.reference,color:ml.reference}},Nee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.16)(n);return{[i0.variable]:`colors.${t}.100`,[ml.variable]:`colors.${t}.800`,_dark:{[i0.variable]:r,[ml.variable]:`colors.${t}.200`},bg:i0.reference,color:ml.reference}},Dee=e=>{const{colorScheme:t,theme:n}=e,r=M0(`${t}.200`,.8)(n);return{[ml.variable]:`colors.${t}.500`,_dark:{[ml.variable]:r},color:ml.reference,boxShadow:`inset 0 0 0px 1px ${ml.reference}`}},zee={solid:Ree,subtle:Nee,outline:Dee},vm={baseStyle:Oee,variants:zee,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bee,definePartsStyle:Fee}=ir(sJ.keys),$ee={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Hee=Fee({link:$ee}),Wee=Bee({baseStyle:Hee}),Vee={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"}}},aN=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=M0(`${t}.200`,.12)(n),i=M0(`${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)}}},Uee=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(aN,e)}},jee={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gee=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`}=jee[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)}}},qee=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)}}},Kee={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yee={ghost:aN,outline:Uee,solid:Gee,link:qee,unstyled:Kee},Zee={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"}},Xee={baseStyle:Vee,variants:Yee,sizes:Zee,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:y3,defineMultiStyleConfig:Qee}=ir(lJ.keys),ym=ei("checkbox-size"),Jee=e=>{const{colorScheme:t}=e;return{w:ym.reference,h:ym.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)}}},ete={_disabled:{cursor:"not-allowed"}},tte={userSelect:"none",_disabled:{opacity:.4}},nte={transitionProperty:"transform",transitionDuration:"normal"},rte=y3(e=>({icon:nte,container:ete,control:fi(Jee,e),label:tte})),ite={sm:y3({control:{[ym.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:y3({control:{[ym.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:y3({control:{[ym.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},y4=Qee({baseStyle:rte,sizes:ite,defaultProps:{size:"md",colorScheme:"blue"}}),bm=ji("close-button-size"),_g=ji("close-button-bg"),ote={w:[bm.reference],h:[bm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_g.variable]:"colors.blackAlpha.100",_dark:{[_g.variable]:"colors.whiteAlpha.100"}},_active:{[_g.variable]:"colors.blackAlpha.200",_dark:{[_g.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_g.reference},ate={lg:{[bm.variable]:"sizes.10",fontSize:"md"},md:{[bm.variable]:"sizes.8",fontSize:"xs"},sm:{[bm.variable]:"sizes.6",fontSize:"2xs"}},ste={baseStyle:ote,sizes:ate,defaultProps:{size:"md"}},{variants:lte,defaultProps:ute}=vm,cte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},dte={baseStyle:cte,variants:lte,defaultProps:ute},fte={w:"100%",mx:"auto",maxW:"prose",px:"4"},hte={baseStyle:fte},pte={opacity:.6,borderColor:"inherit"},gte={borderStyle:"solid"},mte={borderStyle:"dashed"},vte={solid:gte,dashed:mte},yte={baseStyle:pte,variants:vte,defaultProps:{variant:"solid"}},{definePartsStyle:Hw,defineMultiStyleConfig:bte}=ir(uJ.keys),SS=ei("drawer-bg"),wS=ei("drawer-box-shadow");function vp(e){return Hw(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var xte={bg:"blackAlpha.600",zIndex:"overlay"},Ste={display:"flex",zIndex:"modal",justifyContent:"center"},wte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[SS.variable]:"colors.white",[wS.variable]:"shadows.lg",_dark:{[SS.variable]:"colors.gray.700",[wS.variable]:"shadows.dark-lg"},bg:SS.reference,boxShadow:wS.reference}},Cte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_te={position:"absolute",top:"2",insetEnd:"3"},kte={px:"6",py:"2",flex:"1",overflow:"auto"},Ete={px:"6",py:"4"},Pte=Hw(e=>({overlay:xte,dialogContainer:Ste,dialog:fi(wte,e),header:Cte,closeButton:_te,body:kte,footer:Ete})),Lte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},Tte=bte({baseStyle:Pte,sizes:Lte,defaultProps:{size:"xs"}}),{definePartsStyle:Ate,defineMultiStyleConfig:Ite}=ir(cJ.keys),Mte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ote={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nte=Ate({preview:Mte,input:Ote,textarea:Rte}),Dte=Ite({baseStyle:Nte}),{definePartsStyle:zte,defineMultiStyleConfig:Bte}=ir(dJ.keys),o0=ei("form-control-color"),Fte={marginStart:"1",[o0.variable]:"colors.red.500",_dark:{[o0.variable]:"colors.red.300"},color:o0.reference},$te={mt:"2",[o0.variable]:"colors.gray.600",_dark:{[o0.variable]:"colors.whiteAlpha.600"},color:o0.reference,lineHeight:"normal",fontSize:"sm"},Hte=zte({container:{width:"100%",position:"relative"},requiredIndicator:Fte,helperText:$te}),Wte=Bte({baseStyle:Hte}),{definePartsStyle:Vte,defineMultiStyleConfig:Ute}=ir(fJ.keys),a0=ei("form-error-color"),jte={[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gte={marginEnd:"0.5em",[a0.variable]:"colors.red.500",_dark:{[a0.variable]:"colors.red.300"},color:a0.reference},qte=Vte({text:jte,icon:Gte}),Kte=Ute({baseStyle:qte}),Yte={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Zte={baseStyle:Yte},Xte={fontFamily:"heading",fontWeight:"bold"},Qte={"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}},Jte={baseStyle:Xte,sizes:Qte,defaultProps:{size:"xl"}},{definePartsStyle:cu,defineMultiStyleConfig:ene}=ir(hJ.keys),tne=cu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),xc={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"}},nne={lg:cu({field:xc.lg,addon:xc.lg}),md:cu({field:xc.md,addon:xc.md}),sm:cu({field:xc.sm,addon:xc.sm}),xs:cu({field:xc.xs,addon:xc.xs})};function BC(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 rne=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(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=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(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)}}}),one=cu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=BC(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"}}}),ane=cu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),sne={outline:rne,filled:ine,flushed:one,unstyled:ane},gn=ene({baseStyle:tne,sizes:nne,variants:sne,defaultProps:{size:"md",variant:"outline"}}),lne=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"}),une={baseStyle:lne},cne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},dne={baseStyle:cne},{defineMultiStyleConfig:fne,definePartsStyle:hne}=ir(pJ.keys),pne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},gne=hne({icon:pne}),mne=fne({baseStyle:gne}),{defineMultiStyleConfig:vne,definePartsStyle:yne}=ir(gJ.keys),bne=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"}),xne=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"}}),Sne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},wne={opacity:.6},Cne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_ne={transitionProperty:"common",transitionDuration:"normal"},kne=yne(e=>({button:_ne,list:fi(bne,e),item:fi(xne,e),groupTitle:Sne,command:wne,divider:Cne})),Ene=vne({baseStyle:kne}),{defineMultiStyleConfig:Pne,definePartsStyle:Ww}=ir(mJ.keys),Lne={bg:"blackAlpha.600",zIndex:"modal"},Tne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ane=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)}},Ine={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mne={position:"absolute",top:"2",insetEnd:"3"},One=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rne={px:"6",py:"4"},Nne=Ww(e=>({overlay:Lne,dialogContainer:fi(Tne,e),dialog:fi(Ane,e),header:Ine,closeButton:Mne,body:fi(One,e),footer:Rne}));function ss(e){return Ww(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Dne={xs:ss("xs"),sm:ss("sm"),md:ss("md"),lg:ss("lg"),xl:ss("xl"),"2xl":ss("2xl"),"3xl":ss("3xl"),"4xl":ss("4xl"),"5xl":ss("5xl"),"6xl":ss("6xl"),full:ss("full")},zne=Pne({baseStyle:Nne,sizes:Dne,defaultProps:{size:"md"}}),Bne={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"}},sN=Bne,{defineMultiStyleConfig:Fne,definePartsStyle:lN}=ir(vJ.keys),FC=ji("number-input-stepper-width"),uN=ji("number-input-input-padding"),$ne=su(FC).add("0.5rem").toString(),Hne={[FC.variable]:"sizes.6",[uN.variable]:$ne},Wne=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},Vne={width:[FC.reference]},Une=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"}}),jne=lN(e=>({root:Hne,field:fi(Wne,e)??{},stepperGroup:Vne,stepper:fi(Une,e)??{}}));function hy(e){var t,n;const r=(t=gn.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=sN.fontSizes[o];return lN({field:{...r.field,paddingInlineEnd:uN.reference,verticalAlign:"top"},stepper:{fontSize:su(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gne={xs:hy("xs"),sm:hy("sm"),md:hy("md"),lg:hy("lg")},qne=Fne({baseStyle:jne,sizes:Gne,variants:gn.variants,defaultProps:gn.defaultProps}),FP,Kne={...(FP=gn.baseStyle)==null?void 0:FP.field,textAlign:"center"},Yne={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"}},$P,Zne={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:(($P=gn.variants)==null?void 0:$P.unstyled.field)??{}},Xne={baseStyle:Kne,sizes:Yne,variants:Zne,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Qne,definePartsStyle:Jne}=ir(yJ.keys),py=ji("popper-bg"),ere=ji("popper-arrow-bg"),HP=ji("popper-arrow-shadow-color"),tre={zIndex:10},nre={[py.variable]:"colors.white",bg:py.reference,[ere.variable]:py.reference,[HP.variable]:"colors.gray.200",_dark:{[py.variable]:"colors.gray.700",[HP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rre={px:3,py:2,borderBottomWidth:"1px"},ire={px:3,py:2},ore={px:3,py:2,borderTopWidth:"1px"},are={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sre=Jne({popper:tre,content:nre,header:rre,body:ire,footer:ore,closeButton:are}),lre=Qne({baseStyle:sre}),{defineMultiStyleConfig:ure,definePartsStyle:Kg}=ir(bJ.keys),cre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(OP(),OP("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}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=Kg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:Kg({track:{h:"1"}}),sm:Kg({track:{h:"2"}}),md:Kg({track:{h:"3"}}),lg:Kg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.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"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.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)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),gy={paddingInlineEnd:"8"},VP,UP,jP,GP,qP,KP,YP,ZP,Pre={lg:{...(VP=gn.sizes)==null?void 0:VP.lg,field:{...(UP=gn.sizes)==null?void 0:UP.lg.field,...gy}},md:{...(jP=gn.sizes)==null?void 0:jP.md,field:{...(GP=gn.sizes)==null?void 0:GP.md.field,...gy}},sm:{...(qP=gn.sizes)==null?void 0:qP.sm,field:{...(KP=gn.sizes)==null?void 0:KP.sm.field,...gy}},xs:{...(YP=gn.sizes)==null?void 0:YP.xs,field:{...(ZP=gn.sizes)==null?void 0:ZP.xs.field,...gy},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=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{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),ov=ei("slider-thumb-size"),av=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...D8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...D8({orientation:e.orientation,horizontal:{h:av.reference},vertical:{w:av.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...D8({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:ov.reference,h:ov.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"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[ov.variable]:"sizes.4",[av.variable]:"sizes.1"}}),Wre=U5({container:{[ov.variable]:"sizes.3.5",[av.variable]:"sizes.1"}}),Vre=U5({container:{[ov.variable]:"sizes.2.5",[av.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:dN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=dN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:dN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),xm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(xm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[xm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[xm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[xm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[xm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=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"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},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}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={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"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=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}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(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"}}}}}),kie=xl(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"}}}),Eie=xl(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"}}}),Pie=xl(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`)}}}}),Lie=xl(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)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={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}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),XP,$ie={...(XP=gn.baseStyle)==null?void 0:XP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},QP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((QP=gn.variants)==null?void 0:QP.unstyled.field)??{}},JP,eL,tL,nL,Wie={xs:((JP=gn.sizes)==null?void 0:JP.xs.field)??{},sm:((eL=gn.sizes)==null?void 0:eL.sm.field)??{},md:((tL=gn.sizes)==null?void 0:tL.md.field)??{},lg:((nL=gn.sizes)==null?void 0:nL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},my=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:my.reference,color:kS.reference,[my.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[my.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:my.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:vm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={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"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={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"},roe=noe,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"},ooe={"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)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={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},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...lN,sizes:oN,shadows:roe,space:iN,borders:Yie,transition:loe},poe={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"}}},goe={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"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(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(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&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(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&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(woe&&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(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(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 K0(){const e=C.exports.useContext(rv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function fN(){const e=Iv(),t=K0();return{...e,theme:t}}function _oe(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 koe(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 Eoe(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 _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Iv();return x(H5,{styles:t=>{const n=qR(t,"styles.global"),r=ZR(n,{theme:t,colorMode:e});return r?CR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=KR(a,(g,m)=>IX(m)),l=ZR(e,t),u=Object.assign({},i,l,YR(s),o),h=CR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Iv();return re.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function hN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=fN(),a=e?qR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},YR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return hN(e,t)}function Ri(e,t={}){return hN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(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??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(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 $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function rL(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 Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function iL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function oL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=rL(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=iL(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=iL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=oL(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=oL(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=rL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,pN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=pN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function gN(){return[x4(Hoe),()=>x4(pN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),aL={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"},pa=Pe((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??aL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??aL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(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(pa,{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 j5(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 $8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,mN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(mN),a=C.exports.useContext(Y0),s=C.exports.useContext($8).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 S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(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 sv(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>sv(e[t]))}function vN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sv(n)?n:void 0,animate:sv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[sL(t),sL(n)])}function sL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),lv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?lv.projectionNodeConstructor=e[t]:lv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(Sm.hasEverUpdated)return Zoe++})}const H8=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const yN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($8),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(mN).strict,P=C.exports.useContext(yN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||lv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(H8).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(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 rae=["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 W8(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nv=new Set(C4);function bN(e,{layout:t,layoutId:n}){return Nv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[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 xN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,SN=(e,t)=>n=>Math.max(Math.min(n,t),e),wm=e=>e%1?Number(e.toFixed(5)):e,uv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[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,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cm=Object.assign(Object.assign({},ih),{transform:SN(0,1)}),vy=Object.assign(Object.assign({},ih),{default:1}),zv=e=>({test:t=>Dv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=zv("deg"),Sl=zv("%"),St=zv("px"),cae=zv("vh"),dae=zv("vw"),lL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),V8=(e,t)=>n=>Boolean(Dv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),wN=(e,t,n)=>r=>{if(!Dv(r))return r;const[i,o,a,s]=r.match(uv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:V8("hsl","hue"),parse:wN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(wm(t))+", "+Sl.transform(wm(n))+", "+wm(Cm.transform(r))+")"},fae=SN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:V8("rgb","red"),parse:wN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+wm(Cm.transform(r))+")"};function hae(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 Gw={test:V8("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Dv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},CN="${c}",_N="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Dv(e)&&((n=(t=e.match(uv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function kN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,CN),t.push(...r.map(to.parse)));const i=e.match(uv);return i&&(e=e.replace(uv,_N),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function EN(e){return kN(e).values}function PN(e){const{values:t,numColors:n,tokenised:r}=kN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=EN(e);return PN(e)(t.map(gae))}const vu={test:pae,parse:EN,createTransformer:PN,getAnimatableNone:mae},vae=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(uv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),uL={...ih,transform:Math.round},LN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:vy,scaleX:vy,scaleY:vy,scaleZ:vy,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:Cm,originX:lL,originY:lL,originZ:St,zIndex:uL,fillOpacity:Cm,strokeOpacity:Cm,numOctaves:uL};function U8(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(xN(m)){o[m]=v;continue}const b=LN[m],w=lae(v,b);if(Nv.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=sae(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 j8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function TN(e,t,n){for(const r in t)!Ss(t[r])&&!bN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j8();return U8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return TN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(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 Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=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",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let AN=e=>!_4(e);function Lae(e){!e||(AN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(AN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=cL(t,e.x,e.width),i=cL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function G8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){U8(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=Aae(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&&Oae(g,o,a,s,!1)}const IN=()=>({...j8(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=IN();return G8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};TN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(W8(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const MN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ON(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 RN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function NN(e,t,n,r){ON(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(RN.has(i)?i:MN(i),t.attrs[i])}function q8(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||bN(r,e))&&(n[r]=t[r]);return n}function DN(e){const t=q8(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K8(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 cv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),zN=e=>cv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const BN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(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 g=h?s:a;return g&&typeof g!="boolean"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=K8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:BN({scrapeMotionValuesFromProps:DN,createRenderState:IN,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}}G8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),NN(t,n)}})},$ae={useVisualState:BN({scrapeMotionValuesFromProps:q8,createRenderState:j8})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...W8(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function FN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function $N(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Y8(e,t="page"){return{point:$N(e)?jae(e,t):Gae(e,t)}}const HN=(e,t=!1)=>{const n=r=>e(r,Y8(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function WN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,WN(t),HN(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,WN(t),n&&HN(n,t==="pointerdown"),r)}function VN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const dL=VN("dragHorizontal"),fL=VN("dragVertical");function UN(e){let t=!1;if(e==="y")t=fL();else if(e==="x")t=dL();else{const n=dL(),r=fL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function jN(){const e=UN(!0);return e?(e(),!1):!0}function hL(e,t,n){return(r,i)=>{!FN(r)||jN()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?hL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?hL(r,!1,t):void 0,{passive:!t})}const GN=(e,t)=>t?e===t?!0:GN(e,t.parentElement):!1;function Z8(e){return C.exports.useEffect(()=>()=>e(),[])}function qN(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),LS=.001,ese=.01,pL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=pL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,pL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-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=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(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 ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!gL(e,sse)&&gL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function X8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=qN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=mL,b=mL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}X8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const mL=e=>0,dv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(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 vL({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=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],yL=e=>cse.find(t=>t.test(e)),KN=(e,t)=>{let n=yL(e),r=yL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=vL(i),n=Wc),r===Rf&&(o=vL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function YN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?KN(e,t):XN(e,t)}const ZN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>YN(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]=YN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function bL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=bL(e),i=bL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(ZN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?KN:XN;if(Array.isArray(e))return ZN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(dv(e,t,r))}function vse(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=dv(e[o],e[o+1],i);return t[o](s)}}function QN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!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=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),Q8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),JN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=JN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},eD=1.525,xse=4/11,Sse=8/11,wse=9/10,J8=e=>e,e7=yse(2),Cse=Q5(e7),tD=Q8(e7),nD=e=>1-Math.sin(Math.acos(e)),t7=Q5(nD),_se=Q8(t7),n7=JN(eD),kse=Q5(n7),Ese=Q8(n7),Pse=bse(eD),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||tD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({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=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return QN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({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 xL={keyframes:C3,spring:X8,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(xL[e.type])return xL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?X8:C3}const rD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),iD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),rD);function Fse(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]=Fse(()=>fv=!0),e),{}),Hse=Bv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(fv||Use(),n.schedule(r,i,o)),e},{}),Wse=Bv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});Bv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),oD=e=>{fv=!1,u0.delta=Xw?rD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,Bv.forEach(Vse),Qw=!1,fv&&(Xw=!1,iD(oD))},Use=()=>{fv=!0,Xw=!0,Qw||iD(oD)},jse=()=>u0;function aD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?aD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function sD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=qN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=QN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=aD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function lD(e,t){return t?e*(1e3/t):0}function Yse({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(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=lD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),SL=e=>Jw(e)&&e.hasOwnProperty("z"),yy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return yy(e,t);if(Jw(e)&&Jw(t)){const n=yy(e.x,t.x),r=yy(e.y,t.y),i=SL(e)&&SL(t)?yy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const uD=(e,t)=>1-3*t+3*e,cD=(e,t)=>3*t-6*e,dD=e=>3*e,T4=(e,t,n)=>((uD(t,n)*e+cD(t,n))*e+dD(t))*e,fD=(e,t,n)=>3*uD(t,n)*e*e+2*cD(t,n)*e+dD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+by,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({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(Gn.Tap,!1),!jN()}function g(b,w){!h()||(GN(i.getInstance(),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=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),Z8(u)}const ile="production",hD=typeof process>"u"||process.env===void 0?ile:"production",wL=new Set;function pD(e,t,n){e||wL.has(t)||(console.warn(t),n&&console.warn(n),wL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({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"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(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:cle[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(Gn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(hD!=="production"&&pD(!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(Gn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);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 ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function gD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:J8,easeIn:e7,easeInOut:tD,easeOut:Cse,circIn:nD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},CL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",_L=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),kL={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:xy,scaleY:xy,scale:xy,opacity:IS,backgroundColor:IS,color:IS,default:xy},ble=(e,t)=>{let n;return cv(t)?n=yle:n=kL[e]||kL.default,{to:t,...n(t)}},xle={...LN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},mD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),vD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),mD);function Cle(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]=Cle(()=>hv=!0),e),{}),ws=Fv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(hv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Fv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Fv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),yD=e=>{hv=!1,c0.delta=t9?mD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Fv.forEach(kle),n9=!1,hv&&(t9=!1,vD(yD))},Ele=()=>{hv=!0,t9=!0,n9||vD(yD)},r9=()=>c0;function bD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({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 Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(CL):CL(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 Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=_L(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):EL(a)&&typeof n=="string"?a=PL(n):!Array.isArray(n)&&EL(n)&&typeof a=="string"&&(n=PL(a));const l=_L(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"?Yse({...g,...o}):sD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=zN(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 EL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function PL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=bD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _m{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(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 Dle{constructor(t){this.version="7.6.4",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}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.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=()=>ws.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=Nle(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?lD(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 O0(e){return new Dle(e)}const xD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},SD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>SD.find(xD(e)),Ble=[...SD,to,vu],Fle=e=>Ble.find(xD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return K8(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=zN(o[a]);Wle(e,a,s)}}function Ule(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;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=wD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>wD(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 Kle(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 wD(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&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Nv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(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(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(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 Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?cv(G)&&cv(W)?!gD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),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 tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[Gn.Animate]:gf(!0),[Gn.InView]:gf(),[Gn.Hover]:gf(),[Gn.Tap]:gf(),[Gn.Drag]:gf(),[Gn.Focus]:gf(),[Gn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class CD{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=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();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=OS(h,this.transformPagePoint),FN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},$N(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=Y8(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function LL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:LL(e,_D(t)),offset:LL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function _D(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=_D(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(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 la(e){return e.max-e.min}function TL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(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 lue(e,{top:t,left:n,bottom:r,right:i}){return{x:OL(e.x,n,i),y:OL(e.y,t,r)}}function RL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=dv(t.min,t.max-r,e.min):r>i&&(n=dv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(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 o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:NL(e,"left","right"),y:NL(e,"top","bottom")}}function NL(e,t,n){return{min:DL(e,t),max:DL(e,n)}}function DL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const zL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pm=()=>({x:zL(),y:zL()}),BL=()=>({min:0,max:0}),ki=()=>({x:BL(),y:BL()});function sl(e){return[e("x"),e("y")]}function kD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(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 NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||ED(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ED(e){return FL(e.x)||FL(e.y)}function FL(e){return e&&e!=="0%"}function M4(e,t,n){const r=e-n,i=t*r;return n+i}function $L(e,t,n,r,i){return i!==void 0&&(e=M4(e,i,r)),M4(e,n,r)+t}function s9(e,t=0,n=1,r,i){e.min=$L(e.min,t,n,r,i),e.max=$L(e.max,t,n,r,i)}function PD(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(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(Y8(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=UN(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),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.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=Sue(v),this.currentDirection!==null&&g?.(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 CD(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(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Sy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(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=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(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=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=kD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!Sy(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 l7(t,r,0,n)}stopAnimation(){sl(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){sl(n=>{const{drag:r}=this.getProps();if(!Sy(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]-_r(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};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({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(),sl(s=>{if(!Sy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(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=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].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=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Sy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({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($8),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 CD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),Z8(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},TD={current:!1};function kue(){if(TD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const wy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=wy.map(()=>new _m),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{wy.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"+wy[i]]=o=>r.add(o),n["notify"+wy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(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,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const AD=Object.keys(lv),Lue=AD.length,ID=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=vN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),TD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=K8(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),RD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(RD),ND=(e,t)=>{e.set(t,!1),e.set(t)},WL=e=>e===ih||e===St;var VL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(VL||(VL={}));const UL=(e,t)=>parseFloat(e.split(", ")[t]),jL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return UL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?UL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.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 GL={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:jL(4,13),y:jL(5,14)},zue=(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]=GL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);ND(h,s[u]),e[u]=GL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(RD);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=Eg(h);const m=t[l];let v;if(cv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const DD={treeType:"dom",readValueFromInstance(e,t){if(Nv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(xN(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 LD(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=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q8,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),U8(t,n,r,i.transformTemplate)},render:ON},Wue=ID(DD),Vue=ID({...DD,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Nv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=RN.has(t)?t:MN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:DN,build(e,t,n,r,i){G8(t,n,r,i.transformTemplate)},render:NN}),Uue=(e,t)=>W8(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function qL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=qL(e,t.target.x),r=qL(e,t.target.y);return`${n}% ${r}%`}},KL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(OD,v=>(o.push(v),KL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.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=_r(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(KL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),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()})),Sm.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()||ws.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 que(e){const[t,n]=i7(),r=C.exports.useContext(H8);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(yN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const zD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=zD.length,YL=e=>typeof e=="string"?parseFloat(e):e,ZL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((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(dv(e,t,r))}function QL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){QL(e.x,t.x),QL(e.y,t.y)}function JL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=JL(e.min,t,n,s,i),e.max=JL(e.max,t,n,s,i)}function eT(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function tT(e,t,n,r){eT(e.x,t,nce,n?.x,r?.x),eT(e.y,t,rce,n?.y,r?.y)}function nT(e){return e.translate===0&&e.scale===1}function FD(e){return nT(e.x)&&nT(e.y)}function $D(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 rT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(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 ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iT(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===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const oT=["","X","Y","Z"],aT=1e3;function HD({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(hce),this.nodes.forEach(pce)},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=bD(v,250),Sm.hasAnimatedSinceResize&&(Sm.hasAnimatedSinceResize=!1,this.nodes.forEach(lT))})}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,L,I;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:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!$D(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&lT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));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,Zf.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(gce))}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));fT(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 k;const L=P/1e3;uT(m.x,a.x,L),uT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Em(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},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&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{Sm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,aT,{...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,aT),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&&WD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),km(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),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(sT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(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"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):WD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Pm();km(l,o,i.layout);const u=Pm();i.isShared?km(u,e.applyTransform(a,!0),i.measured):km(u,o,i.layout);const h=!FD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Em(b,i.layout,m.layout);const w=ki();Em(w,o,v.actual),$D(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function sT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function lT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function uT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){cT(e.x,t.x,n.x,r),cT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(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 dT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function fT(e){dT(e.x),dT(e.y)}function WD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(rT(t),rT(n),.2)}const Sce=HD({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=HD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function VD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=VD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce 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 Ece({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(` + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},dre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},fre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),hre=e=>({transitionProperty:"common",transitionDuration:"slow",...cre(e)}),pre=Kg(e=>({label:dre,filledTrack:hre(e),track:fre(e)})),gre={xs:Kg({track:{h:"1"}}),sm:Kg({track:{h:"2"}}),md:Kg({track:{h:"3"}}),lg:Kg({track:{h:"4"}})},mre=ure({sizes:gre,baseStyle:pre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:vre,definePartsStyle:b3}=ir(xJ.keys),yre=e=>{var t;const n=(t=fi(y4.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"}}}},bre=b3(e=>{var t,n,r,i;return{label:(n=(t=y4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=y4).baseStyle)==null?void 0:i.call(r,e).container,control:yre(e)}}),xre={md:b3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:b3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:b3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sre=vre({baseStyle:bre,sizes:xre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wre,definePartsStyle:Cre}=ir(SJ.keys),_re=e=>{var t;return{...(t=gn.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)}}},kre={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ere=Cre(e=>({field:_re(e),icon:kre})),gy={paddingInlineEnd:"8"},WP,VP,UP,jP,GP,qP,KP,YP,Pre={lg:{...(WP=gn.sizes)==null?void 0:WP.lg,field:{...(VP=gn.sizes)==null?void 0:VP.lg.field,...gy}},md:{...(UP=gn.sizes)==null?void 0:UP.md,field:{...(jP=gn.sizes)==null?void 0:jP.md.field,...gy}},sm:{...(GP=gn.sizes)==null?void 0:GP.sm,field:{...(qP=gn.sizes)==null?void 0:qP.sm.field,...gy}},xs:{...(KP=gn.sizes)==null?void 0:KP.xs,field:{...(YP=gn.sizes)==null?void 0:YP.xs.field,...gy},icon:{insetEnd:"1"}}},Lre=wre({baseStyle:Ere,sizes:Pre,variants:gn.variants,defaultProps:gn.defaultProps}),Tre=ei("skeleton-start-color"),Are=ei("skeleton-end-color"),Ire=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{[Tre.variable]:a,[Are.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Mre={baseStyle:Ire},CS=ei("skip-link-bg"),Ore={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[CS.variable]:"colors.white",_dark:{[CS.variable]:"colors.gray.700"},bg:CS.reference}},Rre={baseStyle:Ore},{defineMultiStyleConfig:Nre,definePartsStyle:U5}=ir(wJ.keys),ov=ei("slider-thumb-size"),av=ei("slider-track-size"),Mc=ei("slider-bg"),Dre=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...DC({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},zre=e=>({...DC({orientation:e.orientation,horizontal:{h:av.reference},vertical:{w:av.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Bre=e=>{const{orientation:t}=e;return{...DC({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:ov.reference,h:ov.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"}}},Fre=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},$re=U5(e=>({container:Dre(e),track:zre(e),thumb:Bre(e),filledTrack:Fre(e)})),Hre=U5({container:{[ov.variable]:"sizes.4",[av.variable]:"sizes.1"}}),Wre=U5({container:{[ov.variable]:"sizes.3.5",[av.variable]:"sizes.1"}}),Vre=U5({container:{[ov.variable]:"sizes.2.5",[av.variable]:"sizes.0.5"}}),Ure={lg:Hre,md:Wre,sm:Vre},jre=Nre({baseStyle:$re,sizes:Ure,defaultProps:{size:"md",colorScheme:"blue"}}),Ef=ji("spinner-size"),Gre={width:[Ef.reference],height:[Ef.reference]},qre={xs:{[Ef.variable]:"sizes.3"},sm:{[Ef.variable]:"sizes.4"},md:{[Ef.variable]:"sizes.6"},lg:{[Ef.variable]:"sizes.8"},xl:{[Ef.variable]:"sizes.12"}},Kre={baseStyle:Gre,sizes:qre,defaultProps:{size:"md"}},{defineMultiStyleConfig:Yre,definePartsStyle:cN}=ir(CJ.keys),Zre={fontWeight:"medium"},Xre={opacity:.8,marginBottom:"2"},Qre={verticalAlign:"baseline",fontWeight:"semibold"},Jre={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},eie=cN({container:{},label:Zre,helpText:Xre,number:Qre,icon:Jre}),tie={md:cN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},nie=Yre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rie,definePartsStyle:x3}=ir(_J.keys),xm=ji("switch-track-width"),Bf=ji("switch-track-height"),_S=ji("switch-track-diff"),iie=su.subtract(xm,Bf),Vw=ji("switch-thumb-x"),kg=ji("switch-bg"),oie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[xm.reference],height:[Bf.reference],transitionProperty:"common",transitionDuration:"fast",[kg.variable]:"colors.gray.300",_dark:{[kg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[kg.variable]:`colors.${t}.500`,_dark:{[kg.variable]:`colors.${t}.200`}},bg:kg.reference}},aie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bf.reference],height:[Bf.reference],_checked:{transform:`translateX(${Vw.reference})`}},sie=x3(e=>({container:{[_S.variable]:iie,[Vw.variable]:_S.reference,_rtl:{[Vw.variable]:su(_S).negate().toString()}},track:oie(e),thumb:aie})),lie={sm:x3({container:{[xm.variable]:"1.375rem",[Bf.variable]:"sizes.3"}}),md:x3({container:{[xm.variable]:"1.875rem",[Bf.variable]:"sizes.4"}}),lg:x3({container:{[xm.variable]:"2.875rem",[Bf.variable]:"sizes.6"}})},uie=rie({baseStyle:sie,sizes:lie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cie,definePartsStyle:s0}=ir(kJ.keys),die=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"}}),b4={"&[data-is-numeric=true]":{textAlign:"end"}},fie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),hie=s0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...b4},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}}}}}}),pie={simple:fie,striped:hie,unstyled:{}},gie={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"}})},mie=cie({baseStyle:die,variants:pie,sizes:gie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:vie,definePartsStyle:xl}=ir(EJ.keys),yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},bie=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}}},xie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Sie={p:4},wie=xl(e=>({root:yie(e),tab:bie(e),tablist:xie(e),tabpanel:Sie})),Cie={sm:xl({tab:{py:1,px:4,fontSize:"sm"}}),md:xl({tab:{fontSize:"md",py:2,px:4}}),lg:xl({tab:{fontSize:"lg",py:3,px:4}})},_ie=xl(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"}}}}}),kie=xl(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"}}}),Eie=xl(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"}}}),Pie=xl(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`)}}}}),Lie=xl(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)}}}}),Tie=xl({}),Aie={line:_ie,enclosed:kie,"enclosed-colored":Eie,"soft-rounded":Pie,"solid-rounded":Lie,unstyled:Tie},Iie=vie({baseStyle:wie,sizes:Cie,variants:Aie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:Ff}=ir(PJ.keys),Oie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Rie={lineHeight:1.2,overflow:"visible"},Nie={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}},Die=Ff({container:Oie,label:Rie,closeButton:Nie}),zie={sm:Ff({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ff({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ff({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Bie={subtle:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.subtle(e)}}),solid:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.solid(e)}}),outline:Ff(e=>{var t;return{container:(t=vm.variants)==null?void 0:t.outline(e)}})},Fie=Mie({variants:Bie,baseStyle:Die,sizes:zie,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ZP,$ie={...(ZP=gn.baseStyle)==null?void 0:ZP.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},XP,Hie={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((XP=gn.variants)==null?void 0:XP.unstyled.field)??{}},QP,JP,eL,tL,Wie={xs:((QP=gn.sizes)==null?void 0:QP.xs.field)??{},sm:((JP=gn.sizes)==null?void 0:JP.sm.field)??{},md:((eL=gn.sizes)==null?void 0:eL.md.field)??{},lg:((tL=gn.sizes)==null?void 0:tL.lg.field)??{}},Vie={baseStyle:$ie,sizes:Wie,variants:Hie,defaultProps:{size:"md",variant:"outline"}},my=ji("tooltip-bg"),kS=ji("tooltip-fg"),Uie=ji("popper-arrow-bg"),jie={bg:my.reference,color:kS.reference,[my.variable]:"colors.gray.700",[kS.variable]:"colors.whiteAlpha.900",_dark:{[my.variable]:"colors.gray.300",[kS.variable]:"colors.gray.900"},[Uie.variable]:my.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gie={baseStyle:jie},qie={Accordion:hee,Alert:See,Avatar:Mee,Badge:vm,Breadcrumb:Wee,Button:Xee,Checkbox:y4,CloseButton:ste,Code:dte,Container:hte,Divider:yte,Drawer:Tte,Editable:Dte,Form:Wte,FormError:Kte,FormLabel:Zte,Heading:Jte,Input:gn,Kbd:une,Link:dne,List:mne,Menu:Ene,Modal:zne,NumberInput:qne,PinInput:Xne,Popover:lre,Progress:mre,Radio:Sre,Select:Lre,Skeleton:Mre,SkipLink:Rre,Slider:jre,Spinner:Kre,Stat:nie,Switch:uie,Table:mie,Tabs:Iie,Tag:Fie,Textarea:Vie,Tooltip:Gie},Kie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yie=Kie,Zie={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xie=Zie,Qie={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"}},Jie=Qie,eoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},toe=eoe,noe={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"},roe=noe,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"},ooe={"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)"},aoe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},soe={property:ioe,easing:ooe,duration:aoe},loe=soe,uoe={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},coe=uoe,doe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},foe=doe,hoe={breakpoints:Xie,zIndices:coe,radii:toe,blur:foe,colors:Jie,...sN,sizes:iN,shadows:roe,space:rN,borders:Yie,transition:loe},poe={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"}}},goe={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"}}},moe="ltr",voe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},yoe={semanticTokens:poe,direction:moe,...hoe,components:qie,styles:goe,config:voe},boe=typeof Element<"u",xoe=typeof Map=="function",Soe=typeof Set=="function",woe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function S3(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(!S3(e[r],t[r]))return!1;return!0}var o;if(xoe&&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(!S3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Soe&&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(woe&&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(boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!S3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Coe=function(t,n){try{return S3(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 K0(){const e=C.exports.useContext(rv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function dN(){const e=Iv(),t=K0();return{...e,theme:t}}function _oe(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 koe(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 Eoe(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 _oe(o,l,a[u]??l);const h=`${e}.${l}`;return koe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Poe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>EX(n),[n]);return ee(RQ,{theme:i,children:[x(Loe,{root:t}),r]})}function Loe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(H5,{styles:n=>({[t]:n.__cssVars})})}ZQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Toe(){const{colorMode:e}=Iv();return x(H5,{styles:t=>{const n=GR(t,"styles.global"),r=YR(n,{theme:t,colorMode:e});return r?wR(r)(t):void 0}})}var Aoe=new Set([...TX,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ioe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Moe(e){return Ioe.has(e)||!Aoe.has(e)}var Ooe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=qR(a,(g,m)=>IX(m)),l=YR(e,t),u=Object.assign({},i,l,KR(s),o),h=wR(u)(t.theme);return r?[h,r]:h};function ES(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Moe);const i=Ooe({baseStyle:n}),o=Bw(e,r)(i);return re.forwardRef(function(l,u){const{colorMode:h,forced:g}=Iv();return re.createElement(o,{ref:u,"data-theme":g?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}=dN(),a=e?GR(i,`components.${e}`):void 0,s=n||a,l=gl({theme:i,colorMode:o},s?.defaultProps??{},KR(UQ(r,["children"]))),u=C.exports.useRef({});if(s){const g=HX(s)(l);Coe(u.current,g)||(u.current=g)}return u.current}function lo(e,t={}){return fN(e,t)}function Ri(e,t={}){return fN(e,t)}function Roe(){const e=new Map;return new Proxy(ES,{apply(t,n,r){return ES(...r)},get(t,n){return e.has(n)||e.set(n,ES(n)),e.get(n)}})}var we=Roe();function Noe(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??Noe(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Doe(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 $n(...e){return t=>{e.forEach(n=>{Doe(n,t)})}}function zoe(...e){return C.exports.useMemo(()=>$n(...e),e)}function nL(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 Boe=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function rL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function iL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Uw=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,x4=e=>e,Foe=class{descendants=new Map;register=e=>{if(e!=null)return Boe(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=nL(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=rL(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=rL(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=iL(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=iL(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=nL(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function $oe(){const e=C.exports.useRef(new Foe);return Uw(()=>()=>e.current.destroy()),e.current}var[Hoe,hN]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Woe(e){const t=hN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Uw(()=>()=>{!i.current||t.unregister(i.current)},[]),Uw(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=x4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function pN(){return[x4(Hoe),()=>x4(hN()),()=>$oe(),i=>Woe(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),oL={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"},pa=Pe((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??oL.viewBox;if(n&&typeof n!="string")return re.createElement(we.svg,{as:n,...m,...u});const b=a??oL.path;return re.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});pa.displayName="Icon";function st(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(pa,{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 j5(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 $C=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),G5=C.exports.createContext({});function Voe(){return C.exports.useContext(G5).visualElement}const Y0=C.exports.createContext(null),rh=typeof document<"u",S4=rh?C.exports.useLayoutEffect:C.exports.useEffect,gN=C.exports.createContext({strict:!1});function Uoe(e,t,n,r){const i=Voe(),o=C.exports.useContext(gN),a=C.exports.useContext(Y0),s=C.exports.useContext($C).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 S4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),S4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function joe(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 sv(e){return typeof e=="string"||Array.isArray(e)}function q5(e){return typeof e=="object"&&typeof e.start=="function"}const Goe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K5(e){return q5(e.animate)||Goe.some(t=>sv(e[t]))}function mN(e){return Boolean(K5(e)||e.variants)}function qoe(e,t){if(K5(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sv(n)?n:void 0,animate:sv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Koe(e){const{initial:t,animate:n}=qoe(e,C.exports.useContext(G5));return C.exports.useMemo(()=>({initial:t,animate:n}),[aL(t),aL(n)])}function aL(e){return Array.isArray(e)?e.join(" "):e}const tu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),lv={measureLayout:tu(["layout","layoutId","drag"]),animation:tu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:tu(["exit"]),drag:tu(["drag","dragControls"]),focus:tu(["whileFocus"]),hover:tu(["whileHover","onHoverStart","onHoverEnd"]),tap:tu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:tu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:tu(["whileInView","onViewportEnter","onViewportLeave"])};function Yoe(e){for(const t in e)t==="projectionNodeConstructor"?lv.projectionNodeConstructor=e[t]:lv[t].Component=e[t]}function Y5(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zoe=1;function Xoe(){return Y5(()=>{if(Sm.hasEverUpdated)return Zoe++})}const HC=C.exports.createContext({});class Qoe extends re.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const vN=C.exports.createContext({}),Joe=Symbol.for("motionComponentSymbol");function eae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Yoe(e);function a(l,u){const h={...C.exports.useContext($C),...l,layoutId:tae(l)},{isStatic:g}=h;let m=null;const v=Koe(l),b=g?void 0:Xoe(),w=i(l,g);if(!g&&rh){v.visualElement=Uoe(o,w,h,t);const E=C.exports.useContext(gN).strict,P=C.exports.useContext(vN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||lv.projectionNodeConstructor,P))}return ee(Qoe,{visualElement:v.visualElement,props:h,children:[m,x(G5.Provider,{value:v,children:r(o,l,b,joe(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Joe]=o,s}function tae({layoutId:e}){const t=C.exports.useContext(HC).id;return t&&e!==void 0?t+"-"+e:e}function nae(e){function t(r,i={}){return eae(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 rae=["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 WC(e){return typeof e!="string"||e.includes("-")?!1:!!(rae.indexOf(e)>-1||/[A-Z]/.test(e))}const w4={};function iae(e){Object.assign(w4,e)}const C4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nv=new Set(C4);function yN(e,{layout:t,layoutId:n}){return Nv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!w4[e]||e==="opacity")}const Ss=e=>!!e?.getVelocity,oae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aae=(e,t)=>C4.indexOf(e)-C4.indexOf(t);function sae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(aae);for(const s of t)a+=`${oae[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 bN(e){return e.startsWith("--")}const lae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xN=(e,t)=>n=>Math.max(Math.min(n,t),e),wm=e=>e%1?Number(e.toFixed(5)):e,uv=/(-)?([\d]*\.?[\d])+/g,jw=/(#[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,uae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dv(e){return typeof e=="string"}const ih={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cm=Object.assign(Object.assign({},ih),{transform:xN(0,1)}),vy=Object.assign(Object.assign({},ih),{default:1}),zv=e=>({test:t=>Dv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wc=zv("deg"),Sl=zv("%"),St=zv("px"),cae=zv("vh"),dae=zv("vw"),sL=Object.assign(Object.assign({},Sl),{parse:e=>Sl.parse(e)/100,transform:e=>Sl.transform(e*100)}),VC=(e,t)=>n=>Boolean(Dv(n)&&uae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!Dv(r))return r;const[i,o,a,s]=r.match(uv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Rf={test:VC("hsl","hue"),parse:SN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sl.transform(wm(t))+", "+Sl.transform(wm(n))+", "+wm(Cm.transform(r))+")"},fae=xN(0,255),PS=Object.assign(Object.assign({},ih),{transform:e=>Math.round(fae(e))}),Wc={test:VC("rgb","red"),parse:SN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+wm(Cm.transform(r))+")"};function hae(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 Gw={test:VC("#"),parse:hae,transform:Wc.transform},to={test:e=>Wc.test(e)||Gw.test(e)||Rf.test(e),parse:e=>Wc.test(e)?Wc.parse(e):Rf.test(e)?Rf.parse(e):Gw.parse(e),transform:e=>Dv(e)?e:e.hasOwnProperty("red")?Wc.transform(e):Rf.transform(e)},wN="${c}",CN="${n}";function pae(e){var t,n,r,i;return isNaN(e)&&Dv(e)&&((n=(t=e.match(uv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(jw))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function _N(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(jw);r&&(n=r.length,e=e.replace(jw,wN),t.push(...r.map(to.parse)));const i=e.match(uv);return i&&(e=e.replace(uv,CN),t.push(...i.map(ih.parse))),{values:t,numColors:n,tokenised:e}}function kN(e){return _N(e).values}function EN(e){const{values:t,numColors:n,tokenised:r}=_N(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function mae(e){const t=kN(e);return EN(e)(t.map(gae))}const vu={test:pae,parse:kN,createTransformer:EN,getAnimatableNone:mae},vae=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(uv)||[];if(!r)return e;const i=n.replace(r,"");let o=vae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const bae=/([a-z-]*)\(.*?\)/g,qw=Object.assign(Object.assign({},vu),{getAnimatableNone:e=>{const t=e.match(bae);return t?t.map(yae).join(" "):e}}),lL={...ih,transform:Math.round},PN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:vy,scaleX:vy,scaleY:vy,scaleZ:vy,skew:wc,skewX:wc,skewY:wc,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:Cm,originX:sL,originY:sL,originZ:St,zIndex:lL,fillOpacity:Cm,strokeOpacity:Cm,numOctaves:lL};function UC(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(bN(m)){o[m]=v;continue}const b=PN[m],w=lae(v,b);if(Nv.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=sae(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 jC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function LN(e,t,n){for(const r in t)!Ss(t[r])&&!yN(r,n)&&(e[r]=t[r])}function xae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=jC();return UC(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sae(e,t,n){const r=e.style||{},i={};return LN(i,r,e),Object.assign(i,xae(e,t,n)),e.transformValues?e.transformValues(i):i}function wae(e,t,n){const r={},i=Sae(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 Cae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],_ae=["whileTap","onTap","onTapStart","onTapCancel"],kae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Eae=["whileInView","onViewportEnter","onViewportLeave","viewport"],Pae=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",...Eae,..._ae,...Cae,...kae]);function _4(e){return Pae.has(e)}let TN=e=>!_4(e);function Lae(e){!e||(TN=t=>t.startsWith("on")?!_4(t):e(t))}try{Lae(require("@emotion/is-prop-valid").default)}catch{}function Tae(e,t,n){const r={};for(const i in e)(TN(i)||n===!0&&_4(i)||!t&&!_4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function uL(e,t,n){return typeof e=="string"?e:St.transform(t+n*e)}function Aae(e,t,n){const r=uL(t,e.x,e.width),i=uL(n,e.y,e.height);return`${r} ${i}`}const Iae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mae={offset:"strokeDashoffset",array:"strokeDasharray"};function Oae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Iae:Mae;e[o.offset]=St.transform(-r);const a=St.transform(t),s=St.transform(n);e[o.array]=`${a} ${s}`}function GC(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){UC(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=Aae(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&&Oae(g,o,a,s,!1)}const AN=()=>({...jC(),attrs:{}});function Rae(e,t){const n=C.exports.useMemo(()=>{const r=AN();return GC(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};LN(r,e.style,e),n.style={...r,...n.style}}return n}function Nae(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(WC(n)?Rae:wae)(r,a,s),g={...Tae(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const IN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function MN(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 ON=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function RN(e,t,n,r){MN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ON.has(i)?i:IN(i),t.attrs[i])}function qC(e){const{style:t}=e,n={};for(const r in t)(Ss(t[r])||yN(r,e))&&(n[r]=t[r]);return n}function NN(e){const t=qC(e);for(const n in e)if(Ss(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function KC(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 cv=e=>Array.isArray(e),Dae=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),DN=e=>cv(e)?e[e.length-1]||0:e;function w3(e){const t=Ss(e)?e.get():e;return Dae(t)?t.toValue():t}function zae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Bae(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const zN=e=>(t,n)=>{const r=C.exports.useContext(G5),i=C.exports.useContext(Y0),o=()=>zae(e,t,r,i);return n?o():Y5(o)};function Bae(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=w3(o[m]);let{initial:a,animate:s}=e;const l=K5(e),u=mN(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"&&!q5(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=KC(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let L=P[k];if(Array.isArray(L)){const I=h?L.length-1:0;L=L[I]}L!==null&&(i[k]=L)}for(const k in w)i[k]=w[k]}),i}const Fae={useVisualState:zN({scrapeMotionValuesFromProps:NN,createRenderState:AN,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}}GC(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),RN(t,n)}})},$ae={useVisualState:zN({scrapeMotionValuesFromProps:qC,createRenderState:jC})};function Hae(e,{forwardMotionProps:t=!1},n,r,i){return{...WC(e)?Fae:$ae,preloadedFeatures:n,useRender:Nae(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function Z5(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kw(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return Z5(i,t,n,r)},[e,t,n,r])}function Wae({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Kw(t,"focus",e?r:void 0),Kw(t,"blur",e?i:void 0)}function BN(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function FN(e){return!!e.touches}function Vae(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Uae={pageX:0,pageY:0};function jae(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Uae;return{x:r[t+"X"],y:r[t+"Y"]}}function Gae(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function YC(e,t="page"){return{point:FN(e)?jae(e,t):Gae(e,t)}}const $N=(e,t=!1)=>{const n=r=>e(r,YC(r));return t?Vae(n):n},qae=()=>rh&&window.onpointerdown===null,Kae=()=>rh&&window.ontouchstart===null,Yae=()=>rh&&window.onmousedown===null,Zae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Xae={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function HN(e){return qae()?e:Kae()?Xae[e]:Yae()?Zae[e]:e}function l0(e,t,n,r){return Z5(e,HN(t),$N(n,t==="pointerdown"),r)}function k4(e,t,n,r){return Kw(e,HN(t),n&&$N(n,t==="pointerdown"),r)}function WN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const cL=WN("dragHorizontal"),dL=WN("dragVertical");function VN(e){let t=!1;if(e==="y")t=dL();else if(e==="x")t=cL();else{const n=cL(),r=dL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function UN(){const e=VN(!0);return e?(e(),!1):!0}function fL(e,t,n){return(r,i)=>{!BN(r)||UN()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function Qae({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){k4(r,"pointerenter",e||n?fL(r,!0,e):void 0,{passive:!e}),k4(r,"pointerleave",t||n?fL(r,!1,t):void 0,{passive:!t})}const jN=(e,t)=>t?e===t?!0:jN(e,t.parentElement):!1;function ZC(e){return C.exports.useEffect(()=>()=>e(),[])}function GN(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),LS=.001,ese=.01,hL=10,tse=.05,nse=1;function rse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Jae(e<=hL*1e3);let a=1-t;a=P4(tse,nse,a),e=P4(ese,hL,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=Yw(u,a),b=Math.exp(-g);return LS-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=Yw(Math.pow(u,2),a);return(-i(u)+LS>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-LS+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=ose(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 ose(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function lse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!pL(e,sse)&&pL(e,ase)){const n=rse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function XC(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=GN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=lse(o),v=gL,b=gL;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),L=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const I=Yw(L,k);v=O=>{const R=Math.exp(-k*L*O);return n-R*((E+k*L*P)/I*Math.sin(I*O)+P*Math.cos(I*O))},b=O=>{const R=Math.exp(-k*L*O);return k*L*R*(Math.sin(I*O)*(E+k*L*P)/I+P*Math.cos(I*O))-R*(Math.cos(I*O)*(E+k*L*P)-I*P*Math.sin(I*O))}}else if(k===1)v=I=>n-Math.exp(-L*I)*(P+(E+L*P)*I);else{const I=L*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*L*O),D=Math.min(I*O,300);return n-R*((E+k*L*P)*Math.sinh(D)+I*P*Math.cosh(D))/I}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,L=Math.abs(k)<=r,I=Math.abs(n-P)<=i;a.done=L&&I}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}XC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const gL=e=>0,dv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_r=(e,t,n)=>-n*e+n*t+e;function TS(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 mL({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=TS(l,s,e+1/3),o=TS(l,s,e),a=TS(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const use=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},cse=[Gw,Wc,Rf],vL=e=>cse.find(t=>t.test(e)),qN=(e,t)=>{let n=vL(e),r=vL(t),i=n.parse(e),o=r.parse(t);n===Rf&&(i=mL(i),n=Wc),r===Rf&&(o=mL(o),r=Wc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=use(i[l],o[l],s));return a.alpha=_r(i.alpha,o.alpha,s),n.transform(a)}},Zw=e=>typeof e=="number",dse=(e,t)=>n=>t(e(n)),X5=(...e)=>e.reduce(dse);function KN(e,t){return Zw(e)?n=>_r(e,t,n):to.test(e)?qN(e,t):ZN(e,t)}const YN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>KN(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]=KN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function yL(e){const t=vu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=vu.createTransformer(t),r=yL(e),i=yL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?X5(YN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},hse=(e,t)=>n=>_r(e,t,n);function pse(e){if(typeof e=="number")return hse;if(typeof e=="string")return to.test(e)?qN:ZN;if(Array.isArray(e))return YN;if(typeof e=="object")return fse}function gse(e,t,n){const r=[],i=n||pse(e[0]),o=e.length-1;for(let a=0;an(dv(e,t,r))}function vse(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=dv(e[o],e[o+1],i);return t[o](s)}}function XN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;E4(o===t.length),E4(!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=gse(t,r,i),s=o===2?mse(e,a):vse(e,a);return n?l=>s(P4(e[0],e[o-1],l)):s}const Q5=e=>t=>1-e(1-t),QC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yse=e=>t=>Math.pow(t,e),QN=e=>t=>t*t*((e+1)*t-e),bse=e=>{const t=QN(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},JN=1.525,xse=4/11,Sse=8/11,wse=9/10,JC=e=>e,e7=yse(2),Cse=Q5(e7),eD=QC(e7),tD=e=>1-Math.sin(Math.acos(e)),t7=Q5(tD),_se=QC(t7),n7=QN(JN),kse=Q5(n7),Ese=QC(n7),Pse=bse(JN),Lse=4356/361,Tse=35442/1805,Ase=16061/1805,L4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-L4(1-e*2)):.5*L4(e*2-1)+.5;function Ose(e,t){return e.map(()=>t||eD).splice(0,e.length-1)}function Rse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Nse(e,t){return e.map(n=>n*t)}function C3({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=Nse(r&&r.length===a.length?r:Rse(a),i);function l(){return XN(s,a,{ease:Array.isArray(n)?n:Ose(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Dse({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 bL={keyframes:C3,spring:XC,decay:Dse};function zse(e){if(Array.isArray(e.to))return C3;if(bL[e.type])return bL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?C3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?XC:C3}const nD=1/60*1e3,Bse=typeof performance<"u"?()=>performance.now():()=>Date.now(),rD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Bse()),nD);function Fse(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]=Fse(()=>fv=!0),e),{}),Hse=Bv.reduce((e,t)=>{const n=J5[t];return e[t]=(r,i=!1,o=!1)=>(fv||Use(),n.schedule(r,i,o)),e},{}),Wse=Bv.reduce((e,t)=>(e[t]=J5[t].cancel,e),{});Bv.reduce((e,t)=>(e[t]=()=>J5[t].process(u0),e),{});const Vse=e=>J5[e].process(u0),iD=e=>{fv=!1,u0.delta=Xw?nD:Math.max(Math.min(e-u0.timestamp,$se),1),u0.timestamp=e,Qw=!0,Bv.forEach(Vse),Qw=!1,fv&&(Xw=!1,rD(iD))},Use=()=>{fv=!0,Xw=!0,Qw||rD(iD)},jse=()=>u0;function oD(e,t,n=0){return e-t-n}function Gse(e,t,n=0,r=!0){return r?oD(t+-e,t,n):t-(e-t)+n}function qse(e,t,n,r){return r?e>=t+n:e<=-n}const Kse=e=>{const t=({delta:n})=>e(n);return{start:()=>Hse.update(t,!0),stop:()=>Wse.update(t)}};function aD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Kse,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=GN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,L=w.duration,I,O=!1,R=!0,D;const z=zse(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=XN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function V(){k++,l==="reverse"?(R=k%2===0,a=Gse(a,L,u,R)):(a=oD(a,L,u),l==="mirror"&&$.flipTarget()),O=!1,v&&v()}function Y(){P.stop(),m&&m()}function de(te){if(R||(te=-te),a+=te,!O){const ie=$.next(Math.max(0,a));I=ie.value,D&&(I=D(I)),O=R?ie.done:a<=0}b?.(I),O&&(k===0&&(L??(L=a)),k{g?.(),P.stop()}}}function sD(e,t){return t?e*(1e3/t):0}function Yse({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(L){return n!==void 0&&Lr}function E(L){return n===void 0?r:r===void 0||Math.abs(n-L){var O;g?.(I),(O=L.onUpdate)===null||O===void 0||O.call(L,I)},onComplete:m,onStop:v}))}function k(L){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},L))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let L=i*t+e;typeof u<"u"&&(L=u(L));const I=E(L),O=I===n?-1:1;let R,D;const z=$=>{R=D,D=$,t=sD($-R,jse().delta),(O===1&&$>I||O===-1&&$b?.stop()}}const Jw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),xL=e=>Jw(e)&&e.hasOwnProperty("z"),yy=(e,t)=>Math.abs(e-t);function r7(e,t){if(Zw(e)&&Zw(t))return yy(e,t);if(Jw(e)&&Jw(t)){const n=yy(e.x,t.x),r=yy(e.y,t.y),i=xL(e)&&xL(t)?yy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const lD=(e,t)=>1-3*t+3*e,uD=(e,t)=>3*t-6*e,cD=e=>3*e,T4=(e,t,n)=>((lD(t,n)*e+uD(t,n))*e+cD(t))*e,dD=(e,t,n)=>3*lD(t,n)*e*e+2*uD(t,n)*e+cD(t),Zse=1e-7,Xse=10;function Qse(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=T4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Zse&&++s=ele?tle(a,g,e,n):m===0?g:Qse(a,s,s+by,e,n)}return a=>a===0||a===1?a:T4(o(a),t,r)}function rle({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(Gn.Tap,!1),!UN()}function g(b,w){!h()||(jN(i.getInstance(),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=X5(l0(window,"pointerup",g,l),l0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(b,w))}k4(i,"pointerdown",o?v:void 0,l),ZC(u)}const ile="production",fD=typeof process>"u"||process.env===void 0?ile:"production",SL=new Set;function hD(e,t,n){e||SL.has(t)||(console.warn(t),n&&console.warn(n),SL.add(t))}const e9=new WeakMap,AS=new WeakMap,ole=e=>{const t=e9.get(e.target);t&&t(e)},ale=e=>{e.forEach(ole)};function sle({root:e,...t}){const n=e||document;AS.has(n)||AS.set(n,{});const r=AS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ale,{root:e,...t})),r[i]}function lle(e,t,n){const r=sle(t);return e9.set(e,n),r.observe(e),()=>{e9.delete(e),r.unobserve(e)}}function ule({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"?fle:dle)(a,o.current,e,i)}const cle={some:0,all:1};function dle(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:cle[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(Gn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return lle(n.getInstance(),s,l)},[e,r,i,o])}function fle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(fD!=="production"&&hD(!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(Gn.InView,!0)}))},[e])}const Vc=e=>t=>(e(t),null),hle={inView:Vc(ule),tap:Vc(rle),focus:Vc(Wae),hover:Vc(Qae)};function i7(){const e=C.exports.useContext(Y0);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 ple(){return gle(C.exports.useContext(Y0))}function gle(e){return e===null?!0:e.isPresent}function pD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,mle={linear:JC,easeIn:e7,easeInOut:eD,easeOut:Cse,circIn:tD,circInOut:_se,circOut:t7,backIn:n7,backInOut:Ese,backOut:kse,anticipate:Pse,bounceIn:Ise,bounceInOut:Mse,bounceOut:L4},wL=e=>{if(Array.isArray(e)){E4(e.length===4);const[t,n,r,i]=e;return nle(t,n,r,i)}else if(typeof e=="string")return mle[e];return e},vle=e=>Array.isArray(e)&&typeof e[0]!="number",CL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&vu.test(t)&&!t.startsWith("url(")),pf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IS=()=>({type:"keyframes",ease:"linear",duration:.3}),yle=e=>({type:"keyframes",duration:.8,values:e}),_L={x:pf,y:pf,z:pf,rotate:pf,rotateX:pf,rotateY:pf,rotateZ:pf,scaleX:xy,scaleY:xy,scale:xy,opacity:IS,backgroundColor:IS,color:IS,default:xy},ble=(e,t)=>{let n;return cv(t)?n=yle:n=_L[e]||_L.default,{to:t,...n(t)}},xle={...PN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:qw,WebkitFilter:qw},o7=e=>xle[e];function a7(e,t){var n;let r=o7(e);return r!==qw&&(r=vu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Sle={current:!1},gD=1/60*1e3,wle=typeof performance<"u"?()=>performance.now():()=>Date.now(),mD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wle()),gD);function Cle(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]=Cle(()=>hv=!0),e),{}),ws=Fv.reduce((e,t)=>{const n=eb[t];return e[t]=(r,i=!1,o=!1)=>(hv||Ele(),n.schedule(r,i,o)),e},{}),Zf=Fv.reduce((e,t)=>(e[t]=eb[t].cancel,e),{}),MS=Fv.reduce((e,t)=>(e[t]=()=>eb[t].process(c0),e),{}),kle=e=>eb[e].process(c0),vD=e=>{hv=!1,c0.delta=t9?gD:Math.max(Math.min(e-c0.timestamp,_le),1),c0.timestamp=e,n9=!0,Fv.forEach(kle),n9=!1,hv&&(t9=!1,mD(vD))},Ele=()=>{hv=!0,t9=!0,n9||mD(vD)},r9=()=>c0;function yD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zf.read(r),e(o-t))};return ws.read(r,!0),()=>Zf.read(r)}function Ple({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 Lle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=A4(o.duration)),o.repeatDelay&&(a.repeatDelay=A4(o.repeatDelay)),e&&(a.ease=vle(e)?e.map(wL):wL(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 Tle(e,t){var n,r;return(r=(n=(s7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ale(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ile(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Ale(t),Ple(e)||(e={...e,...ble(n,t.to)}),{...t,...Lle(e)}}function Mle(e,t,n,r,i){const o=s7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=CL(e,n);a==="none"&&s&&typeof n=="string"?a=a7(e,n):kL(a)&&typeof n=="string"?a=EL(n):!Array.isArray(n)&&kL(n)&&typeof a=="string"&&(n=EL(a));const l=CL(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"?Yse({...g,...o}):aD({...Ile(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=DN(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 kL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function EL(e){return typeof e=="number"?0:a7("",e)}function s7(e,t){return e[t]||e.default||e}function l7(e,t,n,r={}){return Sle.current&&(r={type:!1}),t.start(i=>{let o;const a=Mle(e,t,n,r,i),s=Tle(r,e),l=()=>o=a();let u;return s?u=yD(l,A4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Ole=e=>/^\-?\d*\.?\d+$/.test(e),Rle=e=>/^0[^.\s]+$/.test(e);function u7(e,t){e.indexOf(t)===-1&&e.push(t)}function c7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _m{constructor(){this.subscriptions=[]}add(t){return u7(this.subscriptions,t),()=>c7(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 Dle{constructor(t){this.version="7.6.4",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}=r9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,ws.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=()=>ws.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=Nle(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?sD(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 O0(e){return new Dle(e)}const bD=e=>t=>t.test(e),zle={test:e=>e==="auto",parse:e=>e},xD=[ih,St,Sl,wc,dae,cae,zle],Eg=e=>xD.find(bD(e)),Ble=[...xD,to,vu],Fle=e=>Ble.find(bD(e));function $le(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function Hle(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function tb(e,t,n){const r=e.getProps();return KC(r,t,n!==void 0?n:r.custom,$le(e),Hle(e))}function Wle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,O0(n))}function Vle(e,t){const n=tb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=DN(o[a]);Wle(e,a,s)}}function Ule(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;si9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i9(e,t,n);else{const i=typeof t=="function"?tb(e,t,n.custom):t;r=SD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function i9(e,t,n={}){var r;const i=tb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>SD(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 Kle(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 SD(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&&Zle(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Nv.has(m)&&(w={...w,type:!1,delay:0});let E=l7(m,v,b,w);I4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&Vle(e,s)})}function Kle(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(Yle).forEach((u,h)=>{a.push(i9(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function Yle(e,t){return e.sortNodePosition(t)}function Zle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const d7=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],Xle=[...d7].reverse(),Qle=d7.length;function Jle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qle(e,n,r)))}function eue(e){let t=Jle(e);const n=nue();let r=!0;const i=(l,u)=>{const h=tb(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 Y=Array.isArray(O)?O:[O];let de=Y.reduce(i,{});D===!1&&(de={});const{prevResolvedValues:j={}}=I,te={...j,...de},ie=le=>{V=!0,b.delete(le),I.needsAnimating[le]=!0};for(const le in te){const G=de[le],W=j[le];w.hasOwnProperty(le)||(G!==W?cv(G)&&cv(W)?!pD(G,W)||$?ie(le):I.protectedKeys[le]=!0:G!==void 0?ie(le):b.add(le):G!==void 0&&b.has(le)?ie(le):I.protectedKeys[le]=!0)}I.prevProp=O,I.prevResolvedValues=de,I.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(V=!1),V&&!z&&v.push(...Y.map(le=>({animation:le,options:{type:L,...l}})))}if(b.size){const k={};b.forEach(L=>{const I=e.getBaseTarget(L);I!==void 0&&(k[L]=I)}),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 tue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pD(t,e):!1}function gf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nue(){return{[Gn.Animate]:gf(!0),[Gn.InView]:gf(),[Gn.Hover]:gf(),[Gn.Tap]:gf(),[Gn.Drag]:gf(),[Gn.Focus]:gf(),[Gn.Exit]:gf()}}const rue={animation:Vc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=eue(e)),q5(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Vc(e=>{const{custom:t,visualElement:n}=e,[r,i]=i7(),o=C.exports.useContext(Y0);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class wD{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=RS(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r7(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=r9();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=OS(h,this.transformPagePoint),BN(u)&&u.buttons===0){this.handlePointerUp(u,h);return}ws.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=RS(OS(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},FN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=YC(t),o=OS(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=r9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,RS(o,this.history)),this.removeListeners=X5(l0(window,"pointermove",this.handlePointerMove),l0(window,"pointerup",this.handlePointerUp),l0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zf.update(this.updatePoint)}}function OS(e,t){return t?{point:t(e.point)}:e}function PL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function RS({point:e},t){return{point:e,delta:PL(e,CD(t)),offset:PL(e,iue(t)),velocity:oue(t,.1)}}function iue(e){return e[0]}function CD(e){return e[e.length-1]}function oue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=CD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A4(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 la(e){return e.max-e.min}function LL(e,t=0,n=.01){return r7(e,t)n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}function ML(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 lue(e,{top:t,left:n,bottom:r,right:i}){return{x:ML(e.x,n,i),y:ML(e.y,t,r)}}function OL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=dv(t.min,t.max-r,e.min):r>i&&(n=dv(e.min,e.max-i,t.min)),P4(0,1,n)}function due(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 o9=.35;function fue(e=o9){return e===!1?e=0:e===!0&&(e=o9),{x:RL(e,"left","right"),y:RL(e,"top","bottom")}}function RL(e,t,n){return{min:NL(e,t),max:NL(e,n)}}function NL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const DL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pm=()=>({x:DL(),y:DL()}),zL=()=>({min:0,max:0}),ki=()=>({x:zL(),y:zL()});function sl(e){return[e("x"),e("y")]}function _D({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pue(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 NS(e){return e===void 0||e===1}function a9({scale:e,scaleX:t,scaleY:n}){return!NS(e)||!NS(t)||!NS(n)}function xf(e){return a9(e)||kD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function kD(e){return BL(e.x)||BL(e.y)}function BL(e){return e&&e!=="0%"}function M4(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=M4(e,i,r)),M4(e,n,r)+t}function s9(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 ED(e,{x:t,y:n}){s9(e.x,t.translate,t.scale,t.originPoint),s9(e.y,n.translate,n.scale,n.originPoint)}function gue(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(YC(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=VN(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),sl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(Sl.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=la(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.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=Sue(v),this.currentDirection!==null&&g?.(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 wD(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(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Sy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sue(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=lue(r.actual,t):this.constraints=!1,this.elastic=fue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=due(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=uue(i.layout.actual,o);if(n){const s=n(hue(a));this.hasMutatedConstraints=!!s,s&&(a=_D(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=sl(h=>{var g;if(!Sy(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 l7(t,r,0,n)}stopAnimation(){sl(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){sl(n=>{const{drag:r}=this.getProps();if(!Sy(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]-_r(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};sl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=cue({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(),sl(s=>{if(!Sy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(_r(u,h,o[s]))})}addListeners(){var t;bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=l0(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=Z5(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(sl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].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=o9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Sy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function wue(e){const{dragControls:t,visualElement:n}=e,r=Y5(()=>new xue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Cue({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($C),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 wD(h,l,{transformPagePoint:s})}k4(i,"pointerdown",o&&u),ZC(()=>a.current&&a.current.end())}const _ue={pan:Vc(Cue),drag:Vc(wue)},l9={current:null},LD={current:!1};function kue(){if(LD.current=!0,!!rh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l9.current=e.matches;e.addListener(t),t()}else l9.current=!1}const wy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Eue(){const e=wy.map(()=>new _m),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{wy.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"+wy[i]]=o=>r.add(o),n["notify"+wy[i]]=(...o)=>r.notify(...o)}),n}function Pue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ss(o))e.addValue(i,o),I4(r)&&r.add(i);else if(Ss(a))e.addValue(i,O0(o)),I4(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,O0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const TD=Object.keys(lv),Lue=TD.length,AD=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:g,presenceId:m,blockInitialAnimation:v,visualState:b,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:L}=b;let I;const O=Eue(),R=new Map,D=new Map;let z={};const $={...k},V=g.initial?{...k}:{};let Y;function de(){!I||!P||(j(),o(I,L,g.style,Q.projection))}function j(){t(Q,L,k,E,g)}function te(){O.notifyUpdate(k)}function ie(X,me){const ye=me.onChange(He=>{k[X]=He,g.onUpdate&&ws.update(te,!1,!0)}),Se=me.onRenderRequest(Q.scheduleRender);D.set(X,()=>{ye(),Se()})}const{willChange:le,...G}=u(g);for(const X in G){const me=G[X];k[X]!==void 0&&Ss(me)&&(me.set(k[X],!1),I4(le)&&le.add(X))}if(g.values)for(const X in g.values){const me=g.values[X];k[X]!==void 0&&Ss(me)&&me.set(k[X])}const W=K5(g),q=mN(g),Q={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(I),mount(X){P=!0,I=Q.current=X,Q.projection&&Q.projection.mount(X),q&&h&&!W&&(Y=h?.addVariantChild(Q)),R.forEach((me,ye)=>ie(ye,me)),LD.current||kue(),Q.shouldReduceMotion=w==="never"?!1:w==="always"?!0:l9.current,h?.children.add(Q),Q.setProps(g)},unmount(){var X;(X=Q.projection)===null||X===void 0||X.unmount(),Zf.update(te),Zf.render(de),D.forEach(me=>me()),Y?.(),h?.children.delete(Q),O.clearAllListeners(),I=void 0,P=!1},loadFeatures(X,me,ye,Se,He,je){const ct=[];for(let qe=0;qeQ.scheduleRender(),animationType:typeof dt=="string"?dt:"both",initialPromotionConfig:je,layoutScroll:It})}return ct},addVariantChild(X){var me;const ye=Q.getClosestVariantNode();if(ye)return(me=ye.variantChildren)===null||me===void 0||me.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(Q.getInstance(),X.getInstance())},getClosestVariantNode:()=>q?Q:h?.getClosestVariantNode(),getLayoutId:()=>g.layoutId,getInstance:()=>I,getStaticValue:X=>k[X],setStaticValue:(X,me)=>k[X]=me,getLatestValues:()=>k,setVisibility(X){Q.isVisible!==X&&(Q.isVisible=X,Q.scheduleRender())},makeTargetAnimatable(X,me=!0){return r(Q,X,g,me)},measureViewportBox(){return i(I,g)},addValue(X,me){Q.hasValue(X)&&Q.removeValue(X),R.set(X,me),k[X]=me.get(),ie(X,me)},removeValue(X){var me;R.delete(X),(me=D.get(X))===null||me===void 0||me(),D.delete(X),delete k[X],s(X,L)},hasValue:X=>R.has(X),getValue(X,me){if(g.values&&g.values[X])return g.values[X];let ye=R.get(X);return ye===void 0&&me!==void 0&&(ye=O0(me),Q.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>k[X]!==void 0?k[X]:a(I,X,E),setBaseTarget(X,me){$[X]=me},getBaseTarget(X){var me;const{initial:ye}=g,Se=typeof ye=="string"||typeof ye=="object"?(me=KC(g,ye))===null||me===void 0?void 0:me[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const He=n(g,X);if(He!==void 0&&!Ss(He))return He}return V[X]!==void 0&&Se===void 0?void 0:$[X]},...O,build(){return j(),L},scheduleRender(){ws.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||g.transformTemplate)&&Q.scheduleRender(),g=X,O.updatePropListeners(X),z=Pue(Q,u(g),z)},getProps:()=>g,getVariant:X=>{var me;return(me=g.variants)===null||me===void 0?void 0:me[X]},getDefaultTransition:()=>g.transition,getTransformPagePoint:()=>g.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!W){const ye=h?.getVariantContext()||{};return g.initial!==void 0&&(ye.initial=g.initial),ye}const me={};for(let ye=0;ye{const o=i.get();if(!u9(o))return;const a=c9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!u9(o))continue;const a=c9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Mue=new Set(["width","height","top","left","right","bottom","x","y"]),OD=e=>Mue.has(e),Oue=e=>Object.keys(e).some(OD),RD=(e,t)=>{e.set(t,!1),e.set(t)},HL=e=>e===ih||e===St;var WL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(WL||(WL={}));const VL=(e,t)=>parseFloat(e.split(", ")[t]),UL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return VL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?VL(o[1],e):0}},Rue=new Set(["x","y","z"]),Nue=C4.filter(e=>!Rue.has(e));function Due(e){const t=[];return Nue.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 jL={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:UL(4,13),y:UL(5,14)},zue=(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]=jL[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);RD(h,s[u]),e[u]=jL[u](l,o)}),e},Bue=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(OD);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=Eg(h);const m=t[l];let v;if(cv(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Eg(h);for(let E=w;E=0?window.pageYOffset:null,u=zue(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.syncRender(),rh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Fue(e,t,n,r){return Oue(t)?Bue(e,t,n,r):{target:t,transitionEnd:r}}const $ue=(e,t,n,r)=>{const i=Iue(e,t,r);return t=i.target,r=i.transitionEnd,Fue(e,t,n,r)};function Hue(e){return window.getComputedStyle(e)}const ND={treeType:"dom",readValueFromInstance(e,t){if(Nv.has(t)){const n=o7(t);return n&&n.default||0}else{const n=Hue(e),r=(bN(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 PD(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=Gle(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ule(e,r,a);const s=$ue(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:qC,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),UC(t,n,r,i.transformTemplate)},render:MN},Wue=AD(ND),Vue=AD({...ND,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Nv.has(t)?((n=o7(t))===null||n===void 0?void 0:n.default)||0:(t=ON.has(t)?t:IN(t),e.getAttribute(t))},scrapeMotionValuesFromProps:NN,build(e,t,n,r,i){GC(t,n,r,i.transformTemplate)},render:RN}),Uue=(e,t)=>WC(e)?Vue(t,{enableHardwareAcceleration:!1}):Wue(t,{enableHardwareAcceleration:!0});function GL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const n=GL(e,t.target.x),r=GL(e,t.target.y);return`${n}% ${r}%`}},qL="_$css",jue={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(MD,v=>(o.push(v),qL)));const a=vu.parse(e);if(a.length>5)return r;const s=vu.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=_r(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(qL,()=>{const b=o[v];return v++,b})}return m}};class Gue extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iae(Kue),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()})),Sm.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()||ws.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 que(e){const[t,n]=i7(),r=C.exports.useContext(HC);return x(Gue,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(vN),isPresent:t,safeToRemove:n})}const Kue={borderRadius:{...Pg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pg,borderTopRightRadius:Pg,borderBottomLeftRadius:Pg,borderBottomRightRadius:Pg,boxShadow:jue},Yue={measureLayout:que};function Zue(e,t,n={}){const r=Ss(e)?e:O0(e);return l7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const DD=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=DD.length,KL=e=>typeof e=="string"?parseFloat(e):e,YL=e=>typeof e=="number"||St.test(e);function Que(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=_r(0,(a=n.opacity)!==null&&a!==void 0?a:1,Jue(r)),e.opacityExit=_r((s=t.opacity)!==null&&s!==void 0?s:1,0,ece(r))):o&&(e.opacity=_r((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(dv(e,t,r))}function XL(e,t){e.min=t.min,e.max=t.max}function ls(e,t){XL(e.x,t.x),XL(e.y,t.y)}function QL(e,t,n,r,i){return e-=t,e=M4(e,1/n,r),i!==void 0&&(e=M4(e,1/i,r)),e}function tce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Sl.test(t)&&(t=parseFloat(t),t=_r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=_r(o.min,o.max,r);e===o&&(s-=t),e.min=QL(e.min,t,n,s,i),e.max=QL(e.max,t,n,s,i)}function JL(e,t,[n,r,i],o,a){tce(e,t[n],t[r],t[i],t.scale,o,a)}const nce=["x","scaleX","originX"],rce=["y","scaleY","originY"];function eT(e,t,n,r){JL(e.x,t,nce,n?.x,r?.x),JL(e.y,t,rce,n?.y,r?.y)}function tT(e){return e.translate===0&&e.scale===1}function BD(e){return tT(e.x)&&tT(e.y)}function FD(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 nT(e){return la(e.x)/la(e.y)}function ice(e,t,n=.1){return r7(e,t)<=n}class oce{constructor(){this.members=[]}add(t){u7(this.members,t),t.scheduleRender()}remove(t){if(c7(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 ace="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function rT(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===ace?"none":o}const sce=(e,t)=>e.depth-t.depth;class lce{constructor(){this.children=[],this.isDirty=!1}add(t){u7(this.children,t),this.isDirty=!0}remove(t){c7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sce),this.isDirty=!1,this.children.forEach(t)}}const iT=["","X","Y","Z"],oT=1e3;function $D({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(hce),this.nodes.forEach(pce)},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=yD(v,250),Sm.hasAnimatedSinceResize&&(Sm.hasAnimatedSinceResize=!1,this.nodes.forEach(sT))})}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,L,I;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:bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!FD(this.targetLayout,w)||b,$=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const V={...s7(O,"layout"),onPlay:R,onComplete:D};g.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&sT(this),this.isLead()&&((I=(L=this.options).onExitComplete)===null||I===void 0||I.call(L));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,Zf.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(gce))}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));dT(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 k;const L=P/1e3;lT(m.x,a.x,L),lT(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Em(v,this.layout.actual,this.relativeParent.layout.actual),vce(this.relativeTarget,this.relativeTargetOrigin,v,L)),b&&(this.animationValues=g,Que(g,h,this.latestValues,L,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},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&&(Zf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ws.update(()=>{Sm.hasAnimatedSinceResize=!0,this.currentAnimation=Zue(0,oT,{...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,oT),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&&HD(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const g=la(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=la(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ls(s,l),Gp(s,h),km(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new oce),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(aT),this.root.sharedNodes.clear()}}}function uce(e){e.updateLayout()}function cce(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"?sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(v);v.min=o[m].min,v.max=v.min+b}):HD(s,i.layout,o)&&sl(m=>{const v=i.isShared?i.measured[m]:i.layout[m],b=la(o[m]);v.max=v.min+b});const l=Pm();km(l,o,i.layout);const u=Pm();i.isShared?km(u,e.applyTransform(a,!0),i.measured):km(u,o,i.layout);const h=!BD(l);let g=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const b=ki();Em(b,i.layout,m.layout);const w=ki();Em(w,o,v.actual),FD(b,w)||(g=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function dce(e){e.clearSnapshot()}function aT(e){e.clearMeasurements()}function fce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function sT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function hce(e){e.resolveTargetDelta()}function pce(e){e.calcProjection()}function gce(e){e.resetRotation()}function mce(e){e.removeLeadSnapshot()}function lT(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uT(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function vce(e,t,n,r){uT(e.x,t.x,n.x,r),uT(e.y,t.y,n.y,r)}function yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bce={duration:.45,ease:[.4,0,.1,1]};function xce(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 cT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function dT(e){cT(e.x),cT(e.y)}function HD(e,t,n){return e==="position"||e==="preserve-aspect"&&!ice(nT(t),nT(n),.2)}const Sce=$D({attachResizeListener:(e,t)=>Z5(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),DS={current:void 0},wce=$D({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!DS.current){const e=new Sce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Cce={...rue,...hle,..._ue,...Yue},Il=nae((e,t)=>Hae(e,t,Cce,Uue,wce));function WD(){const e=C.exports.useRef(!1);return S4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _ce(){const e=WD(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>ws.postRender(r),[r]),t]}class kce 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 Ece({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; @@ -66,8 +66,8 @@ Error generating stack: `+o.message+` top: ${s}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),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(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",pD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(H8).forceRender;l&&(s=l);const u=VD(),h=Tce(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(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),Z8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Hn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),hD!=="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(Hn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=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 d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={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 f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,pT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(pT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(pT.enter,i)})},jD=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)},[]),Ice({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(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:$v("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});jD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=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(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:$v("chakra-fade",o),custom:m,...GD,animate:h,...u})})});Nce.displayName="Fade";var Dce={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??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},qD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=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(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",s),...qD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var gT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(gT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(gT.enter,r),transitionEnd:t?.enter}}},KD=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=f9({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(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:$v("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});KD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.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??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=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(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var Hv=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=gN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:Hv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({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[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,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:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({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 Qce(e){nb({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 Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Hv("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{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"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:Hv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Hv("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(jD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:Hv("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Wv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Wv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{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 rde(e){return x(pa,{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 mT(e){return x(pa,{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,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),YD={info:{icon:rde,colorScheme:"blue"},warning:{icon:mT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:mT,colorScheme:"red"},loading:{icon:Wv,colorScheme:"blue"}};function sde(e){return YD[e].colorScheme}function lde(e){return YD[e].icon}var ZD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});ZD.displayName="Alert";var XD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});XD.displayName="AlertDescription";function QD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}QD.displayName="AlertIcon";var JD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});JD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(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 bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=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})});O4.displayName="NativeImage";var ab=Pe(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=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),vT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Wv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("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 re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(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 Ra=Pe((e,t)=>{const n=hde(),r=lo("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}=mn(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:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":vT(a),"data-loading":vT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(yT,{...O})):x(yT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function yT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Hn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("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}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=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(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),Cy=e=>e?"":void 0,FS=e=>e?!0:void 0;function bT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,ez]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(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((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":Cy(E),"data-disabled":Cy(i),"data-invalid":Cy(r),"data-readonly":Cy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.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:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=ez(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{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:bT(t?.onFocus,h),onBlur:bT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{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"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(tz,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var tz=Pe(function(t,n){const r=J0(),i=ez();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});tz.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 v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var xT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function ST(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function wT(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||xT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",ST,!0),document.addEventListener("keyup",ST,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),xT=!0}function Ade(e){Tde(),e(wT());const t=()=>e(wT());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.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 Nde(e){return re.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 Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nz(e={}){const t=m7(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":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,CT),onTouchStart:ka(Te.onTouchStart,CT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function CT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),rz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),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 L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=nz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});rz.displayName="Checkbox";function Vde(e){return x(pa,{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 cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(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 R4(e,t,n){return(e-t)*100/(n-t)}function iz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=oz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||R{document.head.removeChild(u)}},[t]),x(kce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Y5(Pce),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(Ece,{isPresent:n,children:e})),x(Y0.Provider,{value:u,children:e})};function Pce(){return new Map}const Tp=e=>e.key||"";function Lce(e,t){e.forEach(n=>{const r=Tp(n);t.set(r,n)})}function Tce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const md=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",hD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=_ce();const l=C.exports.useContext(HC).forceRender;l&&(s=l);const u=WD(),h=Tce(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(S4(()=>{w.current=!1,Lce(h,b),v.current=g}),ZC(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Hn,{children:g.map(L=>x(zS,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:L},Tp(L)))});g=[...g];const E=v.current.map(Tp),P=h.map(Tp),k=E.length;for(let L=0;L{if(P.indexOf(L)!==-1)return;const I=b.get(L);if(!I)return;const O=E.indexOf(L),R=()=>{b.delete(L),m.delete(L);const D=v.current.findIndex(z=>z.key===L);if(v.current.splice(D,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(zS,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:I},Tp(I)))}),g=g.map(L=>{const I=L.key;return m.has(I)?L:x(zS,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:L},Tp(L))}),fD!=="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(Hn,{children:m.size?g:g.map(L=>C.exports.cloneElement(L))})};var hl=function(){return hl=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 d9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Ace(){return!1}var Ice=e=>{const{condition:t,message:n}=e;t&&Ace()&&console.warn(n)},Nf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Lg={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 f9(e){switch(e?.direction??"right"){case"right":return Lg.slideRight;case"left":return Lg.slideLeft;case"bottom":return Lg.slideDown;case"top":return Lg.slideUp;default:return Lg.slideRight}}var $f={enter:{duration:.2,ease:Nf.easeOut},exit:{duration:.1,ease:Nf.easeIn}},Cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Mce=e=>e!=null&&parseInt(e.toString(),10)>0,hT={exit:{height:{duration:.2,ease:Nf.ease},opacity:{duration:.3,ease:Nf.ease}},enter:{height:{duration:.3,ease:Nf.ease},opacity:{duration:.4,ease:Nf.ease}}},Oce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Mce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Cs.exit(hT.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Cs.enter(hT.enter,i)})},UD=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)},[]),Ice({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(md,{initial:!1,custom:w,children:E&&re.createElement(Il.div,{ref:t,...g,className:$v("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Oce,initial:r?"exit":!1,animate:P,exit:"exit"})})});UD.displayName="Collapse";var Rce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Cs.enter($f.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Cs.exit($f.exit,n),transitionEnd:t?.exit})},jD={initial:"exit",animate:"enter",exit:"exit",variants:Rce},Nce=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(md,{custom:m,children:g&&re.createElement(Il.div,{ref:n,className:$v("chakra-fade",o),custom:m,...jD,animate:h,...u})})});Nce.displayName="Fade";var Dce={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??Cs.exit($f.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Cs.enter($f.enter,n),transitionEnd:e?.enter})},GD={initial:"exit",animate:"enter",exit:"exit",variants:Dce},zce=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(md,{custom:b,children:m&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",s),...GD,animate:v,custom:b,...g})})});zce.displayName="ScaleFade";var pT={exit:{duration:.15,ease:Nf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Bce={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=f9({direction:e});return{...i,transition:t?.exit??Cs.exit(pT.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=f9({direction:e});return{...i,transition:n?.enter??Cs.enter(pT.enter,r),transitionEnd:t?.enter}}},qD=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=f9({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(md,{custom:P,children:w&&re.createElement(Il.div,{...m,ref:n,initial:"exit",className:$v("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Bce,style:b,...g})})});qD.displayName="Slide";var Fce={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Cs.exit($f.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Cs.enter($f.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??Cs.exit($f.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},h9={initial:"initial",animate:"enter",exit:"exit",variants:Fce},$ce=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(md,{custom:w,children:v&&re.createElement(Il.div,{ref:n,className:$v("chakra-offset-slide",a),custom:w,...h9,animate:b,...m})})});$ce.displayName="SlideFade";var Hv=(...e)=>e.filter(Boolean).join(" ");function Hce(){return!1}var nb=e=>{const{condition:t,message:n}=e;t&&Hce()&&console.warn(n)};function BS(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Wce,rb]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vce,f7]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Uce,tEe,jce,Gce]=pN(),Oc=Pe(function(t,n){const{getButtonProps:r}=f7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...rb().button};return re.createElement(we.button,{...i,className:Hv("chakra-accordion__button",t.className),__css:a})});Oc.displayName="AccordionButton";function qce(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zce(e),Xce(e);const s=jce(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=j5({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[Kce,h7]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yce(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=h7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Qce(e);const{register:m,index:v,descendants:b}=Gce({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Jce({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},L=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),I=C.exports.useCallback(z=>{const V={ArrowDown:()=>{const Y=b.nextEnabled(v);Y?.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y?.node.focus()},Home:()=>{const Y=b.firstEnabled();Y?.node.focus()},End:()=>{const Y=b.lastEnabled();Y?.node.focus()}}[z.key];V&&(z.preventDefault(),V(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},V=null){return{...$,type:"button",ref:$n(m,s,V),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:BS($.onClick,L),onFocus:BS($.onFocus,O),onKeyDown:BS($.onKeyDown,I)}},[h,t,w,L,O,I,g,m]),D=C.exports.useCallback(function($={},V=null){return{...$,ref:V,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:D,htmlProps:i}}function Zce(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;nb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Xce(e){nb({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 Qce(e){nb({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 Jce(e){nb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Rc(e){const{isOpen:t,isDisabled:n}=f7(),{reduceMotion:r}=h7(),i=Hv("chakra-accordion__icon",e.className),o=rb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(pa,{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"})})}Rc.displayName="AccordionIcon";var Nc=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yce(t),l={...rb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return re.createElement(Vce,{value:u},re.createElement(we.div,{ref:n,...o,className:Hv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Nc.displayName="AccordionItem";var Dc=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=h7(),{getPanelProps:s,isOpen:l}=f7(),u=s(o,n),h=Hv("chakra-accordion__panel",r),g=rb();a||delete u.hidden;const m=re.createElement(we.div,{...u,__css:g.panel,className:h});return a?m:x(UD,{in:l,...i,children:m})});Dc.displayName="AccordionPanel";var ib=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=qce(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return re.createElement(Uce,{value:l},re.createElement(Kce,{value:h},re.createElement(Wce,{value:o},re.createElement(we.div,{ref:i,...s,className:Hv("chakra-accordion",r.className),__css:o.root},t))))});ib.displayName="Accordion";var ede=(...e)=>e.filter(Boolean).join(" "),tde=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Wv=Pe((e,t)=>{const n=lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=ede("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${tde} ${o} linear infinite`,...n};return re.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&re.createElement(we.span,{srOnly:!0},r))});Wv.displayName="Spinner";var ob=(...e)=>e.filter(Boolean).join(" ");function nde(e){return x(pa,{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 rde(e){return x(pa,{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 gT(e){return x(pa,{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,ode]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ade,p7]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),KD={info:{icon:rde,colorScheme:"blue"},warning:{icon:gT,colorScheme:"orange"},success:{icon:nde,colorScheme:"green"},error:{icon:gT,colorScheme:"red"},loading:{icon:Wv,colorScheme:"blue"}};function sde(e){return KD[e].colorScheme}function lde(e){return KD[e].icon}var YD=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??sde(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return re.createElement(ide,{value:{status:r}},re.createElement(ade,{value:s},re.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:ob("chakra-alert",t.className),__css:l})))});YD.displayName="Alert";var ZD=Pe(function(t,n){const i={display:"inline",...p7().description};return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__desc",t.className),__css:i})});ZD.displayName="AlertDescription";function XD(e){const{status:t}=ode(),n=lde(t),r=p7(),i=t==="loading"?r.spinner:r.icon;return re.createElement(we.span,{display:"inherit",...e,className:ob("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}XD.displayName="AlertIcon";var QD=Pe(function(t,n){const r=p7();return re.createElement(we.div,{ref:n,...t,className:ob("chakra-alert__title",t.className),__css:r.title})});QD.displayName="AlertTitle";function ude(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cde(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 bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var dde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",O4=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})});O4.displayName="NativeImage";var ab=Pe(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=cde({...t,ignoreFallback:E}),k=dde(P,m),L={ref:n,objectFit:l,objectPosition:s,...E?b:ude(b,["onError","onLoad"])};return k?i||re.createElement(we.img,{as:O4,className:"chakra-image__placeholder",src:r,...L}):re.createElement(we.img,{as:O4,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...L})});ab.displayName="Image";Pe((e,t)=>re.createElement(we.img,{ref:t,as:O4,className:"chakra-image",...e}));function sb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var lb=(...e)=>e.filter(Boolean).join(" "),mT=e=>e?"":void 0,[fde,hde]=Cn({strict:!1,name:"ButtonGroupContext"});function p9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=lb("chakra-button__icon",n);return re.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}p9.displayName="ButtonIcon";function g9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Wv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=lb("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 re.createElement(we.div,{className:l,...s,__css:h},i)}g9.displayName="ButtonSpinner";function pde(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 Ra=Pe((e,t)=>{const n=hde(),r=lo("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}=mn(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:L,type:I}=pde(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return re.createElement(we.button,{disabled:i||o,ref:zoe(t,L),as:E,type:m??I,"data-active":mT(a),"data-loading":mT(o),__css:k,className:lb("chakra-button",w),...P},o&&b==="start"&&x(g9,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||re.createElement(we.span,{opacity:0},x(vT,{...O})):x(vT,{...O}),o&&b==="end"&&x(g9,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ra.displayName="Button";function vT(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Hn,{children:[t&&x(p9,{marginEnd:i,children:t}),r,n&&x(p9,{marginStart:i,children:n})]})}var ro=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=lb("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}},re.createElement(fde,{value:m},re.createElement(we.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ro.displayName="ButtonGroup";var Ps=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(Ra,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var Q0=(...e)=>e.filter(Boolean).join(" "),Cy=e=>e?"":void 0,FS=e=>e?!0:void 0;function yT(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[gde,JD]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[mde,J0]=Cn({strict:!1,name:"FormControlContext"});function vde(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((D={},z=null)=>({id:g,...D,ref:$n(z,$=>{!$||w(!0)})}),[g]),L=C.exports.useCallback((D={},z=null)=>({...D,ref:z,"data-focus":Cy(E),"data-disabled":Cy(i),"data-invalid":Cy(r),"data-readonly":Cy(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),I=C.exports.useCallback((D={},z=null)=>({id:h,...D,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((D={},z=null)=>({...D,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((D={},z=null)=>({...D,ref:z,role:"presentation","aria-hidden":!0,children:D.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:I,getRootProps:O,getLabelProps:L,getRequiredIndicatorProps:R}}var vd=Pe(function(t,n){const r=Ri("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=vde(i),l=Q0("chakra-form-control",t.className);return re.createElement(mde,{value:s},re.createElement(gde,{value:r},re.createElement(we.div,{...o({},n),className:l,__css:r.container})))});vd.displayName="FormControl";var yde=Pe(function(t,n){const r=J0(),i=JD(),o=Q0("chakra-form__helper-text",t.className);return re.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});yde.displayName="FormHelperText";function g7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=m7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":FS(n),"aria-required":FS(i),"aria-readonly":FS(r)}}function m7(e){const t=J0(),{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:yT(t?.onFocus,h),onBlur:yT(t?.onBlur,g)}}var[bde,xde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sde=Pe((e,t)=>{const n=Ri("FormError",e),r=mn(e),i=J0();return i?.isInvalid?re.createElement(bde,{value:n},re.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:Q0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Sde.displayName="FormErrorMessage";var wde=Pe((e,t)=>{const n=xde(),r=J0();if(!r?.isInvalid)return null;const i=Q0("chakra-form__error-icon",e.className);return x(pa,{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"})})});wde.displayName="FormErrorIcon";var oh=Pe(function(t,n){const r=lo("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(ez,{}),optionalIndicator:l=null,...u}=i,h=J0(),g=h?.getLabelProps(u,n)??{ref:n,...u};return re.createElement(we.label,{...g,className:Q0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});oh.displayName="FormLabel";var ez=Pe(function(t,n){const r=J0(),i=JD();if(!r?.isRequired)return null;const o=Q0("chakra-form__required-indicator",t.className);return re.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});ez.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 v7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Cde=we("span",{baseStyle:v7});Cde.displayName="VisuallyHidden";var _de=we("input",{baseStyle:v7});_de.displayName="VisuallyHiddenInput";var bT=!1,ub=null,R0=!1,m9=new Set,kde=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ede(e){return!(e.metaKey||!kde&&e.altKey||e.ctrlKey)}function y7(e,t){m9.forEach(n=>n(e,t))}function xT(e){R0=!0,Ede(e)&&(ub="keyboard",y7("keyboard",e))}function yp(e){ub="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(R0=!0,y7("pointer",e))}function Pde(e){e.target===window||e.target===document||(R0||(ub="keyboard",y7("keyboard",e)),R0=!1)}function Lde(){R0=!1}function ST(){return ub!=="pointer"}function Tde(){if(typeof window>"u"||bT)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){R0=!0,e.apply(this,n)},document.addEventListener("keydown",xT,!0),document.addEventListener("keyup",xT,!0),window.addEventListener("focus",Pde,!0),window.addEventListener("blur",Lde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),bT=!0}function Ade(e){Tde(),e(ST());const t=()=>e(ST());return m9.add(t),()=>{m9.delete(t)}}var[nEe,Ide]=Cn({name:"CheckboxGroupContext",strict:!1}),Mde=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function ka(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Ode(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Rde(e){return re.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 Nde(e){return re.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 Dde(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Nde:Rde;return n||t?re.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function zde(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=m7(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":L,"aria-invalid":I,...O}=e,R=zde(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=dr(v),z=dr(s),$=dr(l),[V,Y]=C.exports.useState(!1),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),[le,G]=C.exports.useState(!1);C.exports.useEffect(()=>Ade(Y),[]);const W=C.exports.useRef(null),[q,Q]=C.exports.useState(!0),[X,me]=C.exports.useState(!!h),ye=g!==void 0,Se=ye?g:X,He=C.exports.useCallback(Te=>{if(r||n){Te.preventDefault();return}ye||me(Se?Te.target.checked:b?!0:Te.target.checked),D?.(Te)},[r,n,Se,ye,b,D]);bs(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),id(()=>{n&&j(!1)},[n,j]),bs(()=>{const Te=W.current;!Te?.form||(Te.form.onreset=()=>{me(!!h)})},[]);const je=n&&!m,ct=C.exports.useCallback(Te=>{Te.key===" "&&G(!0)},[G]),qe=C.exports.useCallback(Te=>{Te.key===" "&&G(!1)},[G]);bs(()=>{if(!W.current)return;W.current.checked!==Se&&me(W.current.checked)},[W.current]);const dt=C.exports.useCallback((Te={},ft=null)=>{const Mt=ut=>{de&&ut.preventDefault(),G(!0)};return{...Te,ref:ft,"data-active":eo(le),"data-hover":eo(te),"data-checked":eo(Se),"data-focus":eo(de),"data-focus-visible":eo(de&&V),"data-indeterminate":eo(b),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:ka(Te.onMouseDown,Mt),onMouseUp:ka(Te.onMouseUp,()=>G(!1)),onMouseEnter:ka(Te.onMouseEnter,()=>ie(!0)),onMouseLeave:ka(Te.onMouseLeave,()=>ie(!1))}},[le,Se,n,de,V,te,b,o,r]),Xe=C.exports.useCallback((Te={},ft=null)=>({...R,...Te,ref:$n(ft,Mt=>{!Mt||Q(Mt.tagName==="LABEL")}),onClick:ka(Te.onClick,()=>{var Mt;q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[R,n,Se,o,q]),it=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:$n(W,ft),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:ka(Te.onChange,He),onBlur:ka(Te.onBlur,z,()=>j(!1)),onFocus:ka(Te.onFocus,$,()=>j(!0)),onKeyDown:ka(Te.onKeyDown,ct),onKeyUp:ka(Te.onKeyUp,qe),required:i,checked:Se,disabled:je,readOnly:r,"aria-label":k,"aria-labelledby":L,"aria-invalid":I?Boolean(I):o,"aria-describedby":u,"aria-disabled":n,style:v7}),[w,E,a,He,z,$,ct,qe,i,Se,je,r,k,L,I,o,u,n,P]),It=C.exports.useCallback((Te={},ft=null)=>({...Te,ref:ft,onMouseDown:ka(Te.onMouseDown,wT),onTouchStart:ka(Te.onTouchStart,wT),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:le,isHovered:te,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Xe,getCheckboxProps:dt,getInputProps:it,getLabelProps:It,htmlProps:R}}function wT(e){e.preventDefault(),e.stopPropagation()}var Bde={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fde={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$de=gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Hde=gd({from:{opacity:0},to:{opacity:1}}),Wde=gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),nz=Pe(function(t,n){const r=Ide(),i={...r,...t},o=Ri("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Dde,{}),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 L=w;r?.onChange&&a.value&&(L=Ode(r.onChange,w));const{state:I,getInputProps:O,getCheckboxProps:R,getLabelProps:D,getRootProps:z}=tz({...P,isDisabled:b,isChecked:k,onChange:L}),$=C.exports.useMemo(()=>({animation:I.isIndeterminate?`${Hde} 20ms linear, ${Wde} 200ms linear`:`${$de} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,I.isIndeterminate,o.icon]),V=C.exports.cloneElement(m,{__css:$,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return re.createElement(we.label,{__css:{...Fde,...o.container},className:Mde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),re.createElement(we.span,{__css:{...Bde,...o.control},className:"chakra-checkbox__control",...R()},V),u&&re.createElement(we.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});nz.displayName="Checkbox";function Vde(e){return x(pa,{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 cb=Pe(function(t,n){const r=lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return re.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Vde,{width:"1em",height:"1em"}))});cb.displayName="CloseButton";function Ude(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b7(e,t){let n=Ude(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function v9(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 R4(e,t,n){return(e-t)*100/(n-t)}function rz(e,t,n){return(n-t)*e+t}function y9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=v9(n);return b7(r,i)}function d0(e,t,n){return e==null?e:(nr==null?"":$S(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=iz(Cc(v),o),w=n??b,E=C.exports.useCallback(V=>{V!==v&&(m||g(V.toString()),u?.(V.toString(),Cc(V)))},[u,m,v]),P=C.exports.useCallback(V=>{let Y=V;return l&&(Y=d0(Y,a,s)),b7(Y,w)},[w,l,s,a]),k=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(V):Y=Cc(v)+V,Y=P(Y),E(Y)},[P,o,E,v]),L=C.exports.useCallback((V=o)=>{let Y;v===""?Y=Cc(-V):Y=Cc(v)-V,Y=P(Y),E(Y)},[P,o,E,v]),I=C.exports.useCallback(()=>{let V;r==null?V="":V=$S(r,o,n)??a,E(V)},[r,n,o,E,a]),O=C.exports.useCallback(V=>{const Y=$S(V,o,w)??a;E(Y)},[w,o,E,a]),R=Cc(v);return{isOutOfRange:R>s||Rx(H5,{styles:az}),qde=()=>x(H5,{styles:` +`,Gde=()=>x(H5,{styles:oz}),qde=()=>x(H5,{styles:` html { line-height: 1.5; -webkit-text-size-adjust: 100%; @@ -366,8 +366,8 @@ Error generating stack: `+o.message+` display: none; } - ${az} - `});function Hf(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 Kde(e){return"current"in e}var sz=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>sz()&&e.test(navigator.vendor),Xde=e=>sz()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function _T(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=_T(n),a=_T(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(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:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,lz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(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=x7({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 re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=lz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});uz.displayName="InputLeftAddon";uz.id="InputLeftAddon";var cz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});cz.displayName="InputRightAddon";cz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=lz(),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(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});dz.id="InputLeftElement";dz.displayName="InputLeftElement";var fz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});fz.id="InputRightElement";fz.displayName="InputRightElement";function ufe(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)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(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 re.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)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var hz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});hz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(hz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var pz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});pz.displayName="Center";var hfe={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 re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(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 re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var gz=Pe(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 re.createElement(we.div,{ref:n,__css:w,...b})});gz.displayName="Grid";function kT(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:kT(i),gridRow:kT(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.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%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.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[bfe,mz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var vz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});vz.displayName="UnorderedList";var yz=Pe(function(t,n){const r=mz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});yz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=mz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(gz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var bz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});bz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(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,[b9]:od(n,i=>r[i])}}function Pfe(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 xz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});xz.displayName="StackItem";var _7=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:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(xz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var Sz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));Sz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function ET(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(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=>od(w,k=>ET(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>ET(Lw("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(wz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var wz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});wz.displayName="WrapItem";var Afe={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[]}}}},Cz=Afe,bp=()=>{},Ife={document:Cz,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},Mfe=Ife,Ofe={window:Mfe,document:Cz},_z=typeof window<"u"?{window,document}:Ofe,kz=C.exports.createContext(_z);kz.displayName="EnvironmentContext";function Ez(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}:_z},[r,n]);return ee(kz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Ez.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){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 HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(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),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Pz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Lz(e){if(!Pz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Tz(e))==null?void 0:t.defaultView)??window}function Tz(e){return Pz(e)?e.ownerDocument:document}function Bfe(e){return Tz(e).activeElement}var Az=e=>e.hasAttribute("tabindex"),Ffe=e=>Az(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Iz(e){return e.parentElement&&Iz(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Mz(e){if(!Lz(e)||Iz(e)||$fe(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]():Hfe(e)?!0:Az(e)}function Wfe(e){return e?Lz(e)&&Mz(e)&&!Ffe(e):!1}var Vfe=["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]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Oz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Mz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!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=Oz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Vv=[Io,Ba,Fa,Mo],N0="start",pv="end",Xfe="clippingParents",Rz="viewport",Tg="popper",Qfe="reference",PT=Vv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+pv])},[]),Nz=[].concat(Vv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+pv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(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];!Na(o)||!El(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 che(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},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Dz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Dz()&&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 P7(e){var t=z0(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 zz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function LT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(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 Uv(e){for(var t=Wa(e),n=LT(e);n&&fhe(n)&&yu(n).position==="static";)n=LT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Lm(e,t,n);return r>n?n:r}function Bz(){return{top:0,right:0,bottom:0,left:0}}function Fz(e){return Object.assign({},Bz(),e)}function $z(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,Fz(typeof t!="number"?t:$z(t,Vv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Uv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Lm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(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)||!zz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={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:D0(t*i)/i||0,y:D0(n*i)/i||0}}function TT(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"),L=Mo,I=Io,O=window;if(u){var R=Uv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===pv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===pv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(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:wl(t.placement),variation:B0(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,TT(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,TT(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 whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var _y={passive:!0};function Che(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=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,_y)}),s&&l.addEventListener("resize",n.update,_y),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,_y)}),s&&l.removeEventListener("resize",n.update,_y)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function AT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Dz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Hz(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:Hz(fb(e))}function Tm(e,t){var n;t===void 0&&(t=[]);var r=Hz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Tm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(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 IT(e,t,n){return t===Rz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Tm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Uv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&zz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=IT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},IT(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 Wz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case pv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function gv(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?Xfe:s,u=n.rootBoundary,h=u===void 0?Rz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Fz(typeof E!="number"?E:$z(E,Vv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Wz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(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?Nz:l,h=B0(r),g=h?s?PT:PT.filter(function(b){return B0(b)===h}):Vv,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]=gv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[AT(e),t,AT(t)]}function Rhe(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=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=gv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function MT(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 OT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=gv(t,{elementContext:"reference"}),s=gv(t,{altBoundary:!0}),l=MT(a,r),u=MT(s,i,o),h=OT(l),g=OT(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 zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].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,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Nz.reduce(function(h,g){return h[g]=Bhe(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 $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Wz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(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=gv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Bz(),je=He[te],ct=He[ie],qe=Lm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Uv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Lm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Lm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(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 Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(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 RT={placement:"bottom",modifiers:[],strategy:"absolute"};function NT(){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 rpe(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 ipe={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"},ope=e=>ipe[e],DT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...DT,...e}}:t={enabled:e,options:DT},t}var spe={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`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(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])}},dpe=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}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{BT(e)},effect:({state:e})=>()=>{BT(e)}},BT=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:rpe(e.placement)})},hpe={"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"}},ppe={"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=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Vz(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=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(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 V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(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 Uz(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(L){var I;(I=k.onClick)==null||I.call(k,L),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 vpe(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]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function jz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function Gz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}Gz.displayName="PortalManager";var[qz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=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=bpe();bs(()=>{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=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(qz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=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=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(qz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,ky=new WeakMap,Ey={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ey[n]||(Ey[n]=new WeakMap);var o=Ey[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=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&ky.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(ky.has(g)||g.removeAttribute(r),ky.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,ky=new WeakMap,Ey={})}},Kz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(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 Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Yz(){}function Zz(){}Zz.resetWarningCache=Yz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){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:Zz,resetWarningCache:Yz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Xz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(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 Qz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Jz(e){return e}function eB(e,t){t===void 0&&(t=Jz);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 R7(e,t){return t===void 0&&(t=Jz),eB(e,t)}function tB(e){e===void 0&&(e={});var t=eB(null);return t.options=hl({async:!0,ssr:!1},e),t}var nB=function(e){var t=e.sideCar,n=UD(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,{...hl({},n)})};nB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),nB}var rB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),iB=R7(),zpe=R7(),Bpe=tB({async:!0}),Fpe=[],N7=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,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&rB.useMedium(ct)},[]),X=iB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Xz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Qz([n,me]);return ee(Hn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.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 oB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function aB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(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){D7(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 aB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),gB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],gB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(gB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return uB(t,n)}).filter(function(n){return jpe(n)})},FT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return cB(t,n)})},k9=function(e,t,n){return pB($7(F7(e,n),t),!0,n)},$T=function(e,t){return pB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},mv=function(e,t){return e.shadowRoot?mv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return mv(n,t)})},Jpe=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)})},mB=function(e){return e.parentNode?mB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(mB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Xz,'="disabled"])')))):[r]),n},[])},vB=function(e){return e.activeElement?e.activeElement.shadowRoot?vB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?vB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},yB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return mv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return mv(t,e)}):!1},r0e=function(e,t){return t.filter(hB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return hB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},HT=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},WT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},bB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(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=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=WT(e,0),k=WT(e,i-1);if(l===-1||h===-1)return bB;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}},a0e=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}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=FT(r.filter(a0e(n)));return i&&i.length?HT(i):HT(FT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},xB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||mv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=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(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=xB(n||e,e,r),o=new Map,a=$T(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=$T([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===bB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=xB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(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:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const SB=h0e;function wB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,vv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function VT(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},S0e=function(t){return t?Boolean(vv):vv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(yB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=SB(g,qp,{focusOptions:l}),h0={})),vv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(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")}),VT(b,v.length,1,v),VT(b,-1,-1,v))}}}return t},CB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return wB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},_B=function(){vv="just",setTimeout(function(){vv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",CB),document.addEventListener("focusout",U7),window.addEventListener("blur",_B)},P0e=function(){document.removeEventListener("focusin",CB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",_B)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=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(),B4(),wB(B4)):(P0e(),qp=null)}rB.assignSyncMedium(_0e);iB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:SB,focusInside:yB})});const A0e=$pe(L0e,T0e)(k0e);var kB=C.exports.forwardRef(function(t,n){return x(oB,{sideCar:A0e,ref:n,...t})}),EB=oB.propTypes||{};EB.sideCar;O7(EB,["sideCar"]);kB.propTypes={};const I0e=kB;var PB=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&&Oz(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(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};PB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",LB=tB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),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=UD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Qz([n,t]),O=hl(hl({},k),i);return ee(Hn,{children:[h&&x(L,{sideCar:LB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},TB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=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[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(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])}},V0e=TB(),U0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + ${oz} + `});function Hf(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 Kde(e){return"current"in e}var az=()=>typeof window<"u";function Yde(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var Zde=e=>az()&&e.test(navigator.vendor),Xde=e=>az()&&e.test(Yde()),Qde=()=>Xde(/mac|iphone|ipad|ipod/i),Jde=()=>Qde()&&Zde(/apple/i);function efe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Hf(i,"pointerdown",o=>{if(!Jde()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Kde(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var tfe=KQ?C.exports.useLayoutEffect:C.exports.useEffect;function CT(e,t=[]){const n=C.exports.useRef(e);return tfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function rfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function N4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=CT(n),a=CT(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=nfe(r,s),g=rfe(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:YQ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function x7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var S7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=mn(i),s=g7(a),l=Nr("chakra-input",t.className);return re.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});S7.displayName="Input";S7.id="Input";var[ife,sz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ofe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=mn(t),s=Nr("chakra-input__group",o),l={},u=sb(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=x7({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 re.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(ife,{value:r,children:g}))});ofe.displayName="InputGroup";var afe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},sfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),w7=Pe(function(t,n){const{placement:r="left",...i}=t,o=afe[r]??{},a=sz();return x(sfe,{ref:n,...i,__css:{...a.addon,...o}})});w7.displayName="InputAddon";var lz=Pe(function(t,n){return x(w7,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});lz.displayName="InputLeftAddon";lz.id="InputLeftAddon";var uz=Pe(function(t,n){return x(w7,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});uz.displayName="InputRightAddon";uz.id="InputRightAddon";var lfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),db=Pe(function(t,n){const{placement:r="left",...i}=t,o=sz(),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(lfe,{ref:n,__css:l,...i})});db.id="InputElement";db.displayName="InputElement";var cz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(db,{ref:n,placement:"left",className:o,...i})});cz.id="InputLeftElement";cz.displayName="InputLeftElement";var dz=Pe(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(db,{ref:n,placement:"right",className:o,...i})});dz.id="InputRightElement";dz.displayName="InputRightElement";function ufe(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)):ufe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var cfe=Pe(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 re.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)});cfe.displayName="AspectRatio";var dfe=Pe(function(t,n){const r=lo("Badge",t),{className:i,...o}=mn(t);return re.createElement(we.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});dfe.displayName="Badge";var yd=we("div");yd.displayName="Box";var fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(yd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});fz.displayName="Square";var ffe=Pe(function(t,n){const{size:r,...i}=t;return x(fz,{size:r,ref:n,borderRadius:"9999px",...i})});ffe.displayName="Circle";var hz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});hz.displayName="Center";var hfe={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 re.createElement(we.div,{ref:n,__css:hfe[r],...i,position:"absolute"})});var pfe=Pe(function(t,n){const r=lo("Code",t),{className:i,...o}=mn(t);return re.createElement(we.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});pfe.displayName="Code";var gfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=lo("Container",t);return re.createElement(we.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});gfe.displayName="Container";var mfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=lo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return re.createElement(we.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});mfe.displayName="Divider";var on=Pe(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 re.createElement(we.div,{ref:n,__css:g,...h})});on.displayName="Flex";var pz=Pe(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 re.createElement(we.div,{ref:n,__css:w,...b})});pz.displayName="Grid";function _T(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var vfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=x7({gridArea:r,gridColumn:_T(i),gridRow:_T(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return re.createElement(we.div,{ref:n,__css:g,...h})});vfe.displayName="GridItem";var Wf=Pe(function(t,n){const r=lo("Heading",t),{className:i,...o}=mn(t);return re.createElement(we.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Wf.displayName="Heading";Pe(function(t,n){const r=lo("Mark",t),i=mn(t);return x(yd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var yfe=Pe(function(t,n){const r=lo("Kbd",t),{className:i,...o}=mn(t);return re.createElement(we.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});yfe.displayName="Kbd";var Vf=Pe(function(t,n){const r=lo("Link",t),{className:i,isExternal:o,...a}=mn(t);return re.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Vf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return re.createElement(we.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%"}}})});Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.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[bfe,gz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),C7=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=sb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return re.createElement(bfe,{value:r},re.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});C7.displayName="List";var xfe=Pe((e,t)=>{const{as:n,...r}=e;return x(C7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xfe.displayName="OrderedList";var mz=Pe(function(t,n){const{as:r,...i}=t;return x(C7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});mz.displayName="UnorderedList";var vz=Pe(function(t,n){const r=gz();return re.createElement(we.li,{ref:n,...t,__css:r.item})});vz.displayName="ListItem";var Sfe=Pe(function(t,n){const r=gz();return x(pa,{ref:n,role:"presentation",...t,__css:r.icon})});Sfe.displayName="ListIcon";var wfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=K0(),h=s?_fe(s,u):kfe(r);return x(pz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});wfe.displayName="SimpleGrid";function Cfe(e){return typeof e=="number"?`${e}px`:e}function _fe(e,t){return od(e,n=>{const r=Eoe("sizes",n,Cfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function kfe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var yz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});yz.displayName="Spacer";var b9="& > *:not(style) ~ *:not(style)";function Efe(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,[b9]:od(n,i=>r[i])}}function Pfe(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 bz=e=>re.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});bz.displayName="StackItem";var _7=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:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Efe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Pfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const I=sb(l);return P?I:I.map((O,R)=>{const D=typeof O.key<"u"?O.key:R,z=R+1===I.length,V=g?x(bz,{children:O},D):O;if(!E)return V;const Y=C.exports.cloneElement(u,{__css:w}),de=z?null:Y;return ee(C.exports.Fragment,{children:[V,de]},D)})},[u,w,E,P,g,l]),L=Nr("chakra-stack",h);return re.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:L,__css:E?{}:{[b9]:b[b9]},...m},k)});_7.displayName="Stack";var xz=Pe((e,t)=>x(_7,{align:"center",...e,direction:"row",ref:t}));xz.displayName="HStack";var Lfe=Pe((e,t)=>x(_7,{align:"center",...e,direction:"column",ref:t}));Lfe.displayName="VStack";var Eo=Pe(function(t,n){const r=lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=x7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return re.createElement(we.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function kT(e){return typeof e=="number"?`${e}px`:e}var Tfe=Pe(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=>od(w,k=>kT(Lw("space",k)(P))),"--chakra-wrap-y-spacing":P=>od(E,k=>kT(Lw("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(Sz,{children:w},E)):a,[a,g]);return re.createElement(we.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},re.createElement(we.ul,{className:"chakra-wrap__list",__css:v},b))});Tfe.displayName="Wrap";var Sz=Pe(function(t,n){const{className:r,...i}=t;return re.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});Sz.displayName="WrapItem";var Afe={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[]}}}},wz=Afe,bp=()=>{},Ife={document:wz,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},Mfe=Ife,Ofe={window:Mfe,document:wz},Cz=typeof window<"u"?{window,document}:Ofe,_z=C.exports.createContext(Cz);_z.displayName="EnvironmentContext";function kz(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}:Cz},[r,n]);return ee(_z.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}kz.displayName="EnvironmentProvider";var Rfe=e=>e?"":void 0;function Nfe(){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 HS(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Dfe(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),L=Nfe(),I=G=>{!G||G.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,D=C.exports.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l?.(G)},[n,l]),z=C.exports.useCallback(G=>{P&&HS(G)&&(G.preventDefault(),G.stopPropagation(),k(!1),L.remove(document,"keyup",z,!1))},[P,L]),$=C.exports.useCallback(G=>{if(u?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;const W=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),k(!0)),W&&(G.preventDefault(),G.currentTarget.click()),L.add(document,"keyup",z,!1)},[n,w,u,i,o,L,z]),V=C.exports.useCallback(G=>{if(h?.(G),n||G.defaultPrevented||G.metaKey||!HS(G.nativeEvent)||w)return;o&&G.key===" "&&(G.preventDefault(),k(!1),G.currentTarget.click())},[o,w,n,h]),Y=C.exports.useCallback(G=>{G.button===0&&(k(!1),L.remove(document,"mouseup",Y,!1))},[L]),de=C.exports.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}w||k(!0),G.currentTarget.focus({preventScroll:!0}),L.add(document,"mouseup",Y,!1),a?.(G)},[n,w,a,L,Y]),j=C.exports.useCallback(G=>{G.button===0&&(w||k(!1),s?.(G))},[s,w]),te=C.exports.useCallback(G=>{if(n){G.preventDefault();return}m?.(G)},[n,m]),ie=C.exports.useCallback(G=>{P&&(G.preventDefault(),k(!1)),v?.(G)},[P,v]),le=$n(t,I);return w?{...b,ref:le,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:le,role:"button","data-active":Rfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:D,onMouseDown:de,onMouseUp:j,onKeyUp:V,onKeyDown:$,onMouseOver:te,onMouseLeave:ie}}function Ez(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Pz(e){if(!Ez(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function zfe(e){var t;return((t=Lz(e))==null?void 0:t.defaultView)??window}function Lz(e){return Ez(e)?e.ownerDocument:document}function Bfe(e){return Lz(e).activeElement}var Tz=e=>e.hasAttribute("tabindex"),Ffe=e=>Tz(e)&&e.tabIndex===-1;function $fe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Az(e){return e.parentElement&&Az(e.parentElement)?!0:e.hidden}function Hfe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Iz(e){if(!Pz(e)||Az(e)||$fe(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]():Hfe(e)?!0:Tz(e)}function Wfe(e){return e?Pz(e)&&Iz(e)&&!Ffe(e):!1}var Vfe=["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]"],Ufe=Vfe.join(),jfe=e=>e.offsetWidth>0&&e.offsetHeight>0;function Mz(e){const t=Array.from(e.querySelectorAll(Ufe));return t.unshift(e),t.filter(n=>Iz(n)&&jfe(n))}function Gfe(e){const t=e.current;if(!t)return!1;const n=Bfe(t);return!n||t.contains(n)?!1:!!Wfe(n)}function qfe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||Gfe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Kfe={preventScroll:!0,shouldFocus:!1};function Yfe(e,t=Kfe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Zfe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!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=Mz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Hf(a,"transitionend",h)}function Zfe(e){return"current"in e}var Io="top",Ba="bottom",Fa="right",Mo="left",k7="auto",Vv=[Io,Ba,Fa,Mo],N0="start",pv="end",Xfe="clippingParents",Oz="viewport",Tg="popper",Qfe="reference",ET=Vv.reduce(function(e,t){return e.concat([t+"-"+N0,t+"-"+pv])},[]),Rz=[].concat(Vv,[k7]).reduce(function(e,t){return e.concat([t,t+"-"+N0,t+"-"+pv])},[]),Jfe="beforeRead",ehe="read",the="afterRead",nhe="beforeMain",rhe="main",ihe="afterMain",ohe="beforeWrite",ahe="write",she="afterWrite",lhe=[Jfe,ehe,the,nhe,rhe,ihe,ohe,ahe,she];function El(e){return e?(e.nodeName||"").toLowerCase():null}function Wa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xf(e){var t=Wa(e).Element;return e instanceof t||e instanceof Element}function Na(e){var t=Wa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function E7(e){if(typeof ShadowRoot>"u")return!1;var t=Wa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uhe(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];!Na(o)||!El(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 che(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},{});!Na(i)||!El(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const dhe={name:"applyStyles",enabled:!0,phase:"write",fn:uhe,effect:che,requires:["computeStyles"]};function wl(e){return e.split("-")[0]}var Uf=Math.max,D4=Math.min,D0=Math.round;function x9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nz(){return!/^((?!chrome|android).)*safari/i.test(x9())}function z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Na(e)&&(i=e.offsetWidth>0&&D0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&D0(r.height)/e.offsetHeight||1);var a=Xf(e)?Wa(e):window,s=a.visualViewport,l=!Nz()&&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 P7(e){var t=z0(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 Dz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&E7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yu(e){return Wa(e).getComputedStyle(e)}function fhe(e){return["table","td","th"].indexOf(El(e))>=0}function bd(e){return((Xf(e)?e.ownerDocument:e.document)||window.document).documentElement}function fb(e){return El(e)==="html"?e:e.assignedSlot||e.parentNode||(E7(e)?e.host:null)||bd(e)}function PT(e){return!Na(e)||yu(e).position==="fixed"?null:e.offsetParent}function hhe(e){var t=/firefox/i.test(x9()),n=/Trident/i.test(x9());if(n&&Na(e)){var r=yu(e);if(r.position==="fixed")return null}var i=fb(e);for(E7(i)&&(i=i.host);Na(i)&&["html","body"].indexOf(El(i))<0;){var o=yu(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 Uv(e){for(var t=Wa(e),n=PT(e);n&&fhe(n)&&yu(n).position==="static";)n=PT(n);return n&&(El(n)==="html"||El(n)==="body"&&yu(n).position==="static")?t:n||hhe(e)||t}function L7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lm(e,t,n){return Uf(e,D4(t,n))}function phe(e,t,n){var r=Lm(e,t,n);return r>n?n:r}function zz(){return{top:0,right:0,bottom:0,left:0}}function Bz(e){return Object.assign({},zz(),e)}function Fz(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,Bz(typeof t!="number"?t:Fz(t,Vv))};function mhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=wl(n.placement),l=L7(s),u=[Mo,Fa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ghe(i.padding,n),m=P7(o),v=l==="y"?Io:Mo,b=l==="y"?Ba:Fa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Uv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,L=w/2-E/2,I=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+L,D=Lm(I,R,O),z=l;n.modifiersData[r]=(t={},t[z]=D,t.centerOffset=D-R,t)}}function vhe(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)||!Dz(t.elements.popper,i)||(t.elements.arrow=i))}const yhe={name:"arrow",enabled:!0,phase:"main",fn:mhe,effect:vhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function B0(e){return e.split("-")[1]}var bhe={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:D0(t*i)/i||0,y:D0(n*i)/i||0}}function LT(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"),L=Mo,I=Io,O=window;if(u){var R=Uv(n),D="clientHeight",z="clientWidth";if(R===Wa(n)&&(R=bd(n),yu(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",z="scrollWidth")),R=R,i===Io||(i===Mo||i===Fa)&&o===pv){I=Ba;var $=g&&R===O&&O.visualViewport?O.visualViewport.height:R[D];w-=$-r.height,w*=l?1:-1}if(i===Mo||(i===Io||i===Ba)&&o===pv){L=Fa;var V=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=V-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&bhe),de=h===!0?xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var j;return Object.assign({},Y,(j={},j[I]=k?"0":"",j[L]=P?"0":"",j.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",j))}return Object.assign({},Y,(t={},t[I]=k?w+"px":"",t[L]=P?v+"px":"",t.transform="",t))}function She(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:wl(t.placement),variation:B0(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,LT(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,LT(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 whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:She,data:{}};var _y={passive:!0};function Che(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=Wa(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,_y)}),s&&l.addEventListener("resize",n.update,_y),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,_y)}),s&&l.removeEventListener("resize",n.update,_y)}}const _he={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Che,data:{}};var khe={left:"right",right:"left",bottom:"top",top:"bottom"};function k3(e){return e.replace(/left|right|bottom|top/g,function(t){return khe[t]})}var Ehe={start:"end",end:"start"};function TT(e){return e.replace(/start|end/g,function(t){return Ehe[t]})}function T7(e){var t=Wa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function A7(e){return z0(bd(e)).left+T7(e).scrollLeft}function Phe(e,t){var n=Wa(e),r=bd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Nz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+A7(e),y:l}}function Lhe(e){var t,n=bd(e),r=T7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+A7(e),l=-r.scrollTop;return yu(i||n).direction==="rtl"&&(s+=Uf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function I7(e){var t=yu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $z(e){return["html","body","#document"].indexOf(El(e))>=0?e.ownerDocument.body:Na(e)&&I7(e)?e:$z(fb(e))}function Tm(e,t){var n;t===void 0&&(t=[]);var r=$z(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wa(r),a=i?[o].concat(o.visualViewport||[],I7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Tm(fb(a)))}function S9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function The(e,t){var n=z0(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 AT(e,t,n){return t===Oz?S9(Phe(e,n)):Xf(t)?The(t,n):S9(Lhe(bd(e)))}function Ahe(e){var t=Tm(fb(e)),n=["absolute","fixed"].indexOf(yu(e).position)>=0,r=n&&Na(e)?Uv(e):e;return Xf(r)?t.filter(function(i){return Xf(i)&&Dz(i,r)&&El(i)!=="body"}):[]}function Ihe(e,t,n,r){var i=t==="clippingParents"?Ahe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=AT(e,u,r);return l.top=Uf(h.top,l.top),l.right=D4(h.right,l.right),l.bottom=D4(h.bottom,l.bottom),l.left=Uf(h.left,l.left),l},AT(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 Hz(e){var t=e.reference,n=e.element,r=e.placement,i=r?wl(r):null,o=r?B0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Io:l={x:a,y:t.y-n.height};break;case Ba:l={x:a,y:t.y+t.height};break;case Fa:l={x:t.x+t.width,y:s};break;case Mo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?L7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case N0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case pv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function gv(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?Xfe:s,u=n.rootBoundary,h=u===void 0?Oz:u,g=n.elementContext,m=g===void 0?Tg:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=Bz(typeof E!="number"?E:Fz(E,Vv)),k=m===Tg?Qfe:Tg,L=e.rects.popper,I=e.elements[b?k:m],O=Ihe(Xf(I)?I:I.contextElement||bd(e.elements.popper),l,h,a),R=z0(e.elements.reference),D=Hz({reference:R,element:L,strategy:"absolute",placement:i}),z=S9(Object.assign({},L,D)),$=m===Tg?z:R,V={top:O.top-$.top+P.top,bottom:$.bottom-O.bottom+P.bottom,left:O.left-$.left+P.left,right:$.right-O.right+P.right},Y=e.modifiersData.offset;if(m===Tg&&Y){var de=Y[i];Object.keys(V).forEach(function(j){var te=[Fa,Ba].indexOf(j)>=0?1:-1,ie=[Io,Ba].indexOf(j)>=0?"y":"x";V[j]+=de[ie]*te})}return V}function Mhe(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?Rz:l,h=B0(r),g=h?s?ET:ET.filter(function(b){return B0(b)===h}):Vv,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]=gv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[wl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ohe(e){if(wl(e)===k7)return[];var t=k3(e);return[TT(e),t,TT(t)]}function Rhe(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=wl(E),k=P===E,L=l||(k||!b?[k3(E)]:Ohe(E)),I=[E].concat(L).reduce(function(Se,He){return Se.concat(wl(He)===k7?Mhe(t,{placement:He,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):He)},[]),O=t.rects.reference,R=t.rects.popper,D=new Map,z=!0,$=I[0],V=0;V=0,ie=te?"width":"height",le=gv(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),G=te?j?Fa:Mo:j?Ba:Io;O[ie]>R[ie]&&(G=k3(G));var W=k3(G),q=[];if(o&&q.push(le[de]<=0),s&&q.push(le[G]<=0,le[W]<=0),q.every(function(Se){return Se})){$=Y,z=!1;break}D.set(Y,q)}if(z)for(var Q=b?3:1,X=function(He){var je=I.find(function(ct){var qe=D.get(ct);if(qe)return qe.slice(0,He).every(function(dt){return dt})});if(je)return $=je,"break"},me=Q;me>0;me--){var ye=X(me);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Nhe={name:"flip",enabled:!0,phase:"main",fn:Rhe,requiresIfExists:["offset"],data:{_skip:!1}};function IT(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 MT(e){return[Io,Fa,Ba,Mo].some(function(t){return e[t]>=0})}function Dhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=gv(t,{elementContext:"reference"}),s=gv(t,{altBoundary:!0}),l=IT(a,r),u=IT(s,i,o),h=MT(l),g=MT(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 zhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dhe};function Bhe(e,t,n){var r=wl(e),i=[Mo,Io].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,[Mo,Fa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Fhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Rz.reduce(function(h,g){return h[g]=Bhe(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 $he={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fhe};function Hhe(e){var t=e.state,n=e.name;t.modifiersData[n]=Hz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Whe={name:"popperOffsets",enabled:!0,phase:"read",fn:Hhe,data:{}};function Vhe(e){return e==="x"?"y":"x"}function Uhe(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=gv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=wl(t.placement),k=B0(t.placement),L=!k,I=L7(P),O=Vhe(I),R=t.modifiersData.popperOffsets,D=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var j,te=I==="y"?Io:Mo,ie=I==="y"?Ba:Fa,le=I==="y"?"height":"width",G=R[I],W=G+E[te],q=G-E[ie],Q=v?-z[le]/2:0,X=k===N0?D[le]:z[le],me=k===N0?-z[le]:-D[le],ye=t.elements.arrow,Se=v&&ye?P7(ye):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zz(),je=He[te],ct=He[ie],qe=Lm(0,D[le],Se[le]),dt=L?D[le]/2-Q-qe-je-V.mainAxis:X-qe-je-V.mainAxis,Xe=L?-D[le]/2+Q+qe+ct+V.mainAxis:me+qe+ct+V.mainAxis,it=t.elements.arrow&&Uv(t.elements.arrow),It=it?I==="y"?it.clientTop||0:it.clientLeft||0:0,wt=(j=Y?.[I])!=null?j:0,Te=G+dt-wt-It,ft=G+Xe-wt,Mt=Lm(v?D4(W,Te):W,G,v?Uf(q,ft):q);R[I]=Mt,de[I]=Mt-G}if(s){var ut,xt=I==="x"?Io:Mo,kn=I==="x"?Ba:Fa,Et=R[O],Zt=O==="y"?"height":"width",En=Et+E[xt],yn=Et-E[kn],Me=[Io,Mo].indexOf(P)!==-1,et=(ut=Y?.[O])!=null?ut:0,Xt=Me?En:Et-D[Zt]-z[Zt]-et+V.altAxis,qt=Me?Et+D[Zt]+z[Zt]-et-V.altAxis:yn,Ee=v&&Me?phe(Xt,Et,qt):Lm(v?Xt:En,Et,v?qt:yn);R[O]=Ee,de[O]=Ee-Et}t.modifiersData[r]=de}}const jhe={name:"preventOverflow",enabled:!0,phase:"main",fn:Uhe,requiresIfExists:["offset"]};function Ghe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qhe(e){return e===Wa(e)||!Na(e)?T7(e):Ghe(e)}function Khe(e){var t=e.getBoundingClientRect(),n=D0(t.width)/e.offsetWidth||1,r=D0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Yhe(e,t,n){n===void 0&&(n=!1);var r=Na(t),i=Na(t)&&Khe(t),o=bd(t),a=z0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((El(t)!=="body"||I7(o))&&(s=qhe(t)),Na(t)?(l=z0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zhe(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 Xhe(e){var t=Zhe(e);return lhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Qhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jhe(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 OT={placement:"bottom",modifiers:[],strategy:"absolute"};function RT(){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 rpe(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 ipe={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"},ope=e=>ipe[e],NT={scroll:!0,resize:!0};function ape(e){let t;return typeof e=="object"?t={enabled:!0,options:{...NT,...e}}:t={enabled:e,options:NT},t}var spe={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`}},lpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{DT(e)},effect:({state:e})=>()=>{DT(e)}},DT=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,ope(e.placement))},upe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{cpe(e)}},cpe=e=>{var t;if(!e.placement)return;const n=dpe(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])}},dpe=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}},fpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{zT(e)},effect:({state:e})=>()=>{zT(e)}},zT=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:rpe(e.placement)})},hpe={"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"}},ppe={"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=hpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:ppe[e]??r}function Wz(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=gpe(r,v),k=C.exports.useRef(()=>{}),L=C.exports.useCallback(()=>{var V;!t||!b.current||!w.current||((V=k.current)==null||V.call(k),E.current=npe(b.current,w.current,{placement:P,modifiers:[fpe,upe,lpe,{...spe,enabled:!!m},{name:"eventListeners",...ape(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 V;!b.current&&!w.current&&((V=E.current)==null||V.destroy(),E.current=null)},[]);const I=C.exports.useCallback(V=>{b.current=V,L()},[L]),O=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(I,Y)}),[I]),R=C.exports.useCallback(V=>{w.current=V,L()},[L]),D=C.exports.useCallback((V={},Y=null)=>({...V,ref:$n(R,Y),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((V={},Y=null)=>{const{size:de,shadowColor:j,bg:te,style:ie,...le}=V;return{...le,ref:Y,"data-popper-arrow":"",style:mpe(V)}},[]),$=C.exports.useCallback((V={},Y=null)=>({...V,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=E.current)==null||V.update()},forceUpdate(){var V;(V=E.current)==null||V.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:I,popperRef:R,getPopperProps:D,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:O}}function mpe(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 Vz(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(L){var I;(I=k.onClick)==null||I.call(k,L),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 vpe(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]),Hf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=zfe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Uz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[ype,bpe]=Cn({strict:!1,name:"PortalManagerContext"});function jz(e){const{children:t,zIndex:n}=e;return x(ype,{value:{zIndex:n},children:t})}jz.displayName="PortalManager";var[Gz,xpe]=Cn({strict:!1,name:"PortalContext"}),M7="chakra-portal",Spe=".chakra-portal",wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Cpe=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=bpe();bs(()=>{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=M7,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Al.exports.createPortal(x(Gz,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},_pe=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=M7),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Al.exports.createPortal(x(Gz,{value:r?a:null,children:t}),a):null};function ah(e){const{containerRef:t,...n}=e;return t?x(_pe,{containerRef:t,...n}):x(Cpe,{...n})}ah.defaultProps={appendToParentPortal:!0};ah.className=M7;ah.selector=Spe;ah.displayName="Portal";var kpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sp=new WeakMap,ky=new WeakMap,Ey={},WS=0,Epe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ey[n]||(Ey[n]=new WeakMap);var o=Ey[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=(Sp.get(m)||0)+1,E=(o.get(m)||0)+1;Sp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&ky.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),WS++,function(){a.forEach(function(g){var m=Sp.get(g)-1,v=o.get(g)-1;Sp.set(g,m),o.set(g,v),m||(ky.has(g)||g.removeAttribute(r),ky.delete(g)),v||g.removeAttribute(n)}),WS--,WS||(Sp=new WeakMap,Sp=new WeakMap,ky=new WeakMap,Ey={})}},qz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Epe(r,i,n,"aria-hidden")):function(){return null}};function O7(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 Rn={exports:{}},Ppe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lpe=Ppe,Tpe=Lpe;function Kz(){}function Yz(){}Yz.resetWarningCache=Kz;var Ape=function(){function e(r,i,o,a,s,l){if(l!==Tpe){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:Yz,resetWarningCache:Kz};return n.PropTypes=n,n};Rn.exports=Ape();var w9="data-focus-lock",Zz="data-focus-lock-disabled",Ipe="data-no-focus-lock",Mpe="data-autofocus-inside",Ope="data-no-autofocus";function Rpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Npe(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 Xz(e,t){return Npe(t||null,function(n){return e.forEach(function(r){return Rpe(r,n)})})}var VS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Qz(e){return e}function Jz(e,t){t===void 0&&(t=Qz);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 R7(e,t){return t===void 0&&(t=Qz),Jz(e,t)}function eB(e){e===void 0&&(e={});var t=Jz(null);return t.options=hl({async:!0,ssr:!1},e),t}var tB=function(e){var t=e.sideCar,n=VD(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,{...hl({},n)})};tB.isSideCarExport=!0;function Dpe(e,t){return e.useMedium(t),tB}var nB=R7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),rB=R7(),zpe=R7(),Bpe=eB({async:!0}),Fpe=[],N7=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,L=t.hasPositiveIndices,I=t.shards,O=I===void 0?Fpe:I,R=t.as,D=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,V=t.sideCar,Y=t.returnFocus,de=t.focusOptions,j=t.onActivation,te=t.onDeactivation,ie=C.exports.useState({}),le=ie[0],G=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&j&&j(s.current),l.current=!0},[j]),W=C.exports.useCallback(function(){l.current=!1,te&&te(s.current)},[te]);C.exports.useEffect(function(){g||(u.current=null)},[]);var q=C.exports.useCallback(function(ct){var qe=u.current;if(qe&&qe.focus){var dt=typeof Y=="function"?Y(qe):Y;if(dt){var Xe=typeof dt=="object"?dt:void 0;u.current=null,ct?Promise.resolve().then(function(){return qe.focus(Xe)}):qe.focus(Xe)}}},[Y]),Q=C.exports.useCallback(function(ct){l.current&&nB.useMedium(ct)},[]),X=rB.useMedium,me=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=An((r={},r[Zz]=g&&"disabled",r[w9]=E,r),$),Se=m!==!0,He=Se&&m!=="tail",je=Xz([n,me]);return ee(Hn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS},"guard-first"),L?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:VS},"guard-nearest"):null],!g&&x(V,{id:le,sideCar:Bpe,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:G,onDeactivation:W,returnFocus:q,focusOptions:de}),x(D,{ref:je,...ye,className:P,onBlur:X,onFocus:Q,children:h}),He&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:VS})]})});N7.propTypes={};N7.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 iB=N7;function C9(e,t){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C9(e,t)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C9(e,t)}function oB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $pe(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){D7(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 oB(l,"displayName","SideEffect("+n(i)+")"),l}}var Ml=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Kpe)},Ype=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],B7=Ype.join(","),Zpe="".concat(B7,", [data-focus-guard]"),pB=function(e,t){var n;return Ml(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Zpe:B7)?[i]:[],pB(i))},[])},F7=function(e,t){return e.reduce(function(n,r){return n.concat(pB(r,t),r.parentNode?Ml(r.parentNode.querySelectorAll(B7)).filter(function(i){return i===r}):[])},[])},Xpe=function(e){var t=e.querySelectorAll("[".concat(Mpe,"]"));return Ml(t).map(function(n){return F7([n])}).reduce(function(n,r){return n.concat(r)},[])},$7=function(e,t){return Ml(e).filter(function(n){return lB(t,n)}).filter(function(n){return jpe(n)})},BT=function(e,t){return t===void 0&&(t=new Map),Ml(e).filter(function(n){return uB(t,n)})},k9=function(e,t,n){return hB($7(F7(e,n),t),!0,n)},FT=function(e,t){return hB($7(F7(e),t),!1)},Qpe=function(e,t){return $7(Xpe(e),t)},mv=function(e,t){return e.shadowRoot?mv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ml(e.children).some(function(n){return mv(n,t)})},Jpe=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)})},gB=function(e){return e.parentNode?gB(e.parentNode):e},H7=function(e){var t=_9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(w9);return n.push.apply(n,i?Jpe(Ml(gB(r).querySelectorAll("[".concat(w9,'="').concat(i,'"]:not([').concat(Zz,'="disabled"])')))):[r]),n},[])},mB=function(e){return e.activeElement?e.activeElement.shadowRoot?mB(e.activeElement.shadowRoot):e.activeElement:void 0},W7=function(){return document.activeElement?document.activeElement.shadowRoot?mB(document.activeElement.shadowRoot):document.activeElement:void 0},e0e=function(e){return e===document.activeElement},t0e=function(e){return Boolean(Ml(e.querySelectorAll("iframe")).some(function(t){return e0e(t)}))},vB=function(e){var t=document&&W7();return!t||t.dataset&&t.dataset.focusGuard?!1:H7(e).some(function(n){return mv(n,t)||t0e(n)})},n0e=function(){var e=document&&W7();return e?Ml(document.querySelectorAll("[".concat(Ipe,"]"))).some(function(t){return mv(t,e)}):!1},r0e=function(e,t){return t.filter(fB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V7=function(e,t){return fB(e)&&e.name?r0e(e,t):e},i0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(V7(n,e))}),e.filter(function(n){return t.has(n)})},$T=function(e){return e[0]&&e.length>1?V7(e[0],e):e[0]},HT=function(e,t){return e.length>1?e.indexOf(V7(e[t],e)):t},yB="NEW_FOCUS",o0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=z7(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=i0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=HT(e,0),k=HT(e,i-1);if(l===-1||h===-1)return yB;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}},a0e=function(e){return function(t){var n,r=(n=cB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=BT(r.filter(a0e(n)));return i&&i.length?$T(i):$T(BT(t))},E9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&E9(e.parentNode.host||e.parentNode,t),t},US=function(e,t){for(var n=E9(e),r=E9(t),i=0;i=0)return o}return!1},bB=function(e,t,n){var r=_9(e),i=_9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=US(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=US(o,l);u&&(!a||mv(u,a)?a=u:a=US(u,a))})}),a},l0e=function(e,t){return e.reduce(function(n,r){return n.concat(Qpe(r,t))},[])},u0e=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(qpe)},c0e=function(e,t){var n=document&&W7(),r=H7(e).filter(z4),i=bB(n||e,e,r),o=new Map,a=FT(r,o),s=k9(r,o).filter(function(m){var v=m.node;return z4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=FT([i],o).map(function(m){var v=m.node;return v}),u=u0e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o0e(h,l,n,t);return g===yB?{node:s0e(a,h,l0e(r,o))}:g===void 0?g:u[g]}},d0e=function(e){var t=H7(e).filter(z4),n=bB(e,e,t),r=new Map,i=k9([n],r,!0),o=k9(t,r).filter(function(a){var s=a.node;return z4(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:z7(s)}})},f0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},jS=0,GS=!1,h0e=function(e,t,n){n===void 0&&(n={});var r=c0e(e,t);if(!GS&&r){if(jS>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),GS=!0,setTimeout(function(){GS=!1},1);return}jS++,f0e(r.node,n.focusOptions),jS--}};const xB=h0e;function SB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p0e=function(){return document&&document.activeElement===document.body},g0e=function(){return p0e()||n0e()},f0=null,qp=null,h0=null,vv=!1,m0e=function(){return!0},v0e=function(t){return(f0.whiteList||m0e)(t)},y0e=function(t,n){h0={observerNode:t,portaledElement:n}},b0e=function(t){return h0&&h0.portaledElement===t};function WT(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},S0e=function(t){return t?Boolean(vv):vv==="meanwhile"},w0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C0e=function(t,n){return n.some(function(r){return w0e(t,r,r)})},B4=function(){var t=!1;if(f0){var n=f0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||h0&&h0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(x0e).filter(Boolean));if((!h||v0e(h))&&(i||S0e(s)||!g0e()||!qp&&o)&&(u&&!(vB(g)||h&&C0e(h,g)||b0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=xB(g,qp,{focusOptions:l}),h0={})),vv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=d0e(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")}),WT(b,v.length,1,v),WT(b,-1,-1,v))}}}return t},wB=function(t){B4()&&t&&(t.stopPropagation(),t.preventDefault())},U7=function(){return SB(B4)},_0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y0e(r,n)},k0e=function(){return null},CB=function(){vv="just",setTimeout(function(){vv="meanwhile"},0)},E0e=function(){document.addEventListener("focusin",wB),document.addEventListener("focusout",U7),window.addEventListener("blur",CB)},P0e=function(){document.removeEventListener("focusin",wB),document.removeEventListener("focusout",U7),window.removeEventListener("blur",CB)};function L0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function T0e(e){var t=e.slice(-1)[0];t&&!f0&&E0e();var n=f0,r=n&&t&&t.id===n.id;f0=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(),B4(),SB(B4)):(P0e(),qp=null)}nB.assignSyncMedium(_0e);rB.assignMedium(U7);zpe.assignMedium(function(e){return e({moveFocusInside:xB,focusInside:vB})});const A0e=$pe(L0e,T0e)(k0e);var _B=C.exports.forwardRef(function(t,n){return x(iB,{sideCar:A0e,ref:n,...t})}),kB=iB.propTypes||{};kB.sideCar;O7(kB,["sideCar"]);_B.propTypes={};const I0e=_B;var EB=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&&Mz(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(I0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};EB.displayName="FocusLock";var E3="right-scroll-bar-position",P3="width-before-scroll-bar",M0e="with-scroll-bars-hidden",O0e="--removed-body-scroll-bar-size",PB=eB(),qS=function(){},hb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:qS,onWheelCapture:qS,onTouchMoveCapture:qS}),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=VD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),L=m,I=Xz([n,t]),O=hl(hl({},k),i);return ee(Hn,{children:[h&&x(L,{sideCar:PB,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),hl(hl({},O),{ref:I})):x(P,{...hl({},O,{className:l,ref:I}),children:s})]})});hb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hb.classNames={fullWidth:P3,zeroRight:E3};var R0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R0e();return t&&e.setAttribute("nonce",t),e}function D0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N0e())&&(D0e(t,n),z0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F0e=function(){var e=B0e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LB=function(){var e=F0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$0e={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},H0e=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[KS(n),KS(r),KS(i)]},W0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $0e;var t=H0e(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])}},V0e=LB(),U0e=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(M0e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -404,10 +404,10 @@ Error generating stack: `+o.message+` body { `).concat(O0e,": ").concat(s,`px; } -`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Py=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Py,Py),window.removeEventListener("test",Py,Py)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},AB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return AB(e,"overflowY")},K0e=function(e){return AB(e,"overflowX")},UT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=IB(e,n);if(r){var i=MB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},IB=function(e,t){return e==="v"?q0e(t):K0e(t)},MB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(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=MB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&IB(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},Ly=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jT=function(e){return[e.deltaX,e.deltaY]},GT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` +`)},j0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W0e(i)},[i]);return x(V0e,{styles:U0e(o,!t,i,n?"":"!important")})},P9=!1;if(typeof window<"u")try{var Py=Object.defineProperty({},"passive",{get:function(){return P9=!0,!0}});window.addEventListener("test",Py,Py),window.removeEventListener("test",Py,Py)}catch{P9=!1}var wp=P9?{passive:!1}:!1,G0e=function(e){return e.tagName==="TEXTAREA"},TB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G0e(e)&&n[t]==="visible")},q0e=function(e){return TB(e,"overflowY")},K0e=function(e){return TB(e,"overflowX")},VT=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=AB(e,n);if(r){var i=IB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Y0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},AB=function(e,t){return e==="v"?q0e(t):K0e(t)},IB=function(e,t){return e==="v"?Y0e(t):Z0e(t)},X0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q0e=function(e,t,n,r,i){var o=X0e(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=IB(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&AB(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},Ly=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UT=function(e){return[e.deltaX,e.deltaY]},jT=function(e){return e&&"current"in e?e.current:e},J0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e1e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},t1e=0,Cp=[];function n1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(t1e++)[0],o=C.exports.useState(function(){return TB()})[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=d9([e.lockRef.current],(e.shards||[]).map(GT),!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=Ly(w),k=n.current,L="deltaX"in w?w.deltaX:k[0]-P[0],I="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,D=Math.abs(L)>Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=UT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=UT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?jT(E):Ly(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(GT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Ly(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,jT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Ly(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Hn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(LB,n1e);var OB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});OB.classNames=hb.classNames;const RB=OB;var sh=(...e)=>e.filter(Boolean).join(" ");function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=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}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(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]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(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),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Yg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Yg(z.onClick,R),onKeyDown:Yg(z.onKeyDown,E),onMouseDown:Yg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return Kz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=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=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Yg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function NB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(PB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(RB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...qD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],DB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});DB.displayName="ModalTransition";var yv=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),g=sh("chakra-modal__content",n),m=lh(),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}=ad();return re.createElement(NB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(DB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});yv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),bv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:GD),__css:l,ref:t,className:a,...o})});bv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(yv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(KD),b1e=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),g=l(o),m=sh("chakra-modal__content",n),v=lh(),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}=v1e();return re.createElement(NB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(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 zB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{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"})}),w1e=e=>x(pa,{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 qT(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 C1e=50,KT=300;function _1e(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);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},KT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},KT)},[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 k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(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 L1e(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":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);qT(ct,"disabled",Te.stop,Te.isSpinning),qT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:zB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var BB=Pe(function(t,n){const r=pb();return re.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}})});BB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:zB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var FB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(FB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(FB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var jv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,Gv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Uz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Vz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=jz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=YT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=YT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function YT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=Gv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:jv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=Gv();return re.createElement(we.div,{...r(t,n),className:jv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=Gv();return x(cb,{size:"sm",onClick:r,className:jv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={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]}}},H1e=we(Il.section),$B=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});$B.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=Gv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x($B,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:jv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=Gv();return re.createElement(we.header,{...r(t,n),className:jv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function HB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(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 WB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};WB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=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:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=HB({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:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(WB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=HB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),VB=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":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});VB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(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 UB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});UB.displayName="SelectField";var jB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(UB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(GB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});jB.displayName="Select";var nge=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"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),GB=e=>{const{children:t=x(nge,{}),...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(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};GB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function qB(e){return!!e.touches}function age(e){return qB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function KB(e,t="page"){return qB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:KB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function YB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:KB(e)},{timestamp:i}=PP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=PP();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,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(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),$Q.update(this.updatePoint)}};function ZT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:ZT(e.point,t[t.length-1]),offset:ZT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(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 gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function XT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(XT(e)&&XT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function ZB(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=YB({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 fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(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 yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(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 XB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=XB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(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 Zg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ty=e=>e||T3;function QB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Zg({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)=>Ty(w).height>Ty(E).height?w:E,T3):r.reduce((w,E)=>Ty(w).width>Ty(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Zg({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",...Zg({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,...Zg({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 JB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(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:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=JB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=XB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),iz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>QB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};ZB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Zg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(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[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),eF=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});eF.defaultProps={orientation:"horizontal"};eF.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(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:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=JB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=YB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=iz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return QB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}ZB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var tF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});tF.displayName="SliderThumb";var nF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});nF.displayName="SliderTrack";var rF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});rF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),QT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=nz(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 re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":QT(s.isChecked),"data-hover":QT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,iF,$ge,Hge]=gN();function Wge(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]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),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[Vge,qv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=qv(),i=iF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.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:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=qv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:oF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":aF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=qv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:aF(n,s),tabId:oF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=qv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=jz({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 Zge(){const e=qv(),t=iF(),{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 bs(()=>{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 oF(e,t){return`${e}--tab-${t}`}function aF(e,t){return`${e}--tabpanel-${t}`}var[Xge,Kv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),sF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});sF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=Kv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...Kv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var lF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=Kv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});lF.displayName="TabPanel";var uF=Pe(function(t,n){const r=Kge(t),i=Kv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});uF.displayName="TabPanels";var cF=Pe(function(t,n){const r=Kv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});cF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],dF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});dF.displayName="Textarea";function rme(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 M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(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 ame=(e,t)=>e.find(n=>n.id===t);function JT(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(ame(r,t))return n}function sme(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 lme(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 ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(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=dme(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}=JT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:hF(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(JT(pl.getState(),i).position)}}var eA=0;function dme(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:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=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 re.createElement(ZD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(QD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(JD,{id:u?.title,children:i}),s&&x(XD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function hF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=hF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.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,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=fN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={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]}}},pF=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=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});pF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.getState),{children:n,motionVariants:r,component:i=pF,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:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Hn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={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 Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(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:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Uz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Vz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{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 $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Hn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Hn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Ez,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(pR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(Gz,{zIndex:r,children:l}):l]})})};function gF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(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:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function mF(e,t,n){var r=t1(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 a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=bF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return xv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===xv&&(xv=e.l)}function tA(e){return xv={p:[],l:xv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==yF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return nA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return nA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function nA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(mF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function rA(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 zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Sv;a&&(l=[s],u=Xg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=iA(n,o),i.I=!1}else r=iA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||mF(r,a,t(s))}),o===3?new Set(r):r}(e)}function iA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){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[nr];return Sv.get(l,o)},set:function(l){var u=this[nr];Sv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!vF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(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),L=1;L1?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=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,xF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function lA(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 uA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(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(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function SF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){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 G4}function i(s,l){r(s)===G4&&(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 Bme=function(t,n){return t===n};function Fme(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]Math.abs(I)?"h":"v";if("touches"in w&&D==="h"&&R.type==="range")return!1;var z=VT(D,R);if(!z)return!0;if(z?O=D:(O=D==="v"?"h":"v",z=VT(D,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(L||I)&&(r.current=O),!O)return!0;var $=r.current||O;return Q0e($,E,w,$==="h"?L:I,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?UT(E):Ly(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J0e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var L=(a.current.shards||[]).map(jT).filter(Boolean).filter(function(O){return O.contains(E.target)}),I=L.length>0?s(E,L[0]):!a.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var L={name:w,delta:E,target:P,should:k};t.current.push(L),setTimeout(function(){t.current=t.current.filter(function(I){return I!==L})},1)},[]),h=C.exports.useCallback(function(w){n.current=Ly(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,UT(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Ly(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Hn,{children:[b?x(o,{styles:e1e(i)}):null,v?x(j0e,{gapMode:"margin"}):null]})}const r1e=Dpe(PB,n1e);var MB=C.exports.forwardRef(function(e,t){return x(hb,{...hl({},e,{ref:t,sideCar:r1e})})});MB.classNames=hb.classNames;const OB=MB;var sh=(...e)=>e.filter(Boolean).join(" ");function Yg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var i1e=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}},L9=new i1e;function o1e(e,t){C.exports.useEffect(()=>(t&&L9.add(e),()=>{L9.remove(e)}),[t,e])}function a1e(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]=l1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");s1e(u,t&&a),o1e(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),[L,I]=C.exports.useState(!1),O=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":L?v:void 0,onClick:Yg(z.onClick,V=>V.stopPropagation())}),[v,L,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!L9.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),D=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:Yg(z.onClick,R),onKeyDown:Yg(z.onKeyDown,E),onMouseDown:Yg(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:I,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:D}}function s1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return qz(e.current)},[t,e,n])}function l1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[u1e,lh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[c1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),F0=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=Ri("Modal",e),E={...a1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(c1e,{value:E,children:x(u1e,{value:b,children:x(md,{onExitComplete:v,children:E.isOpen&&x(ah,{...t,children:n})})})})};F0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};F0.displayName="Modal";var F4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__body",n),s=lh();return re.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});F4.displayName="ModalBody";var j7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=sh("chakra-modal__close-btn",r),s=lh();return x(cb,{ref:t,__css:s.closeButton,className:a,onClick:Yg(n,l=>{l.stopPropagation(),o()}),...i})});j7.displayName="ModalCloseButton";function RB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[g,m]=i7();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(EB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(OB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var d1e={slideInBottom:{...h9,custom:{offsetY:16,reverse:!0}},slideInRight:{...h9,custom:{offsetX:16,reverse:!0}},scale:{...GD,custom:{initialScale:.95,reverse:!0}},none:{}},f1e=we(Il.section),h1e=e=>d1e[e||"none"],NB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=h1e(n),...i}=e;return x(f1e,{ref:t,...r,...i})});NB.displayName="ModalTransition";var yv=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),g=sh("chakra-modal__content",n),m=lh(),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}=ad();return re.createElement(RB,null,re.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(NB,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});yv.displayName="ModalContent";var G7=Pe((e,t)=>{const{className:n,...r}=e,i=sh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lh().footer};return re.createElement(we.footer,{ref:t,...r,__css:a,className:i})});G7.displayName="ModalFooter";var q7=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sh("chakra-modal__header",n),l={flex:0,...lh().header};return re.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q7.displayName="ModalHeader";var p1e=we(Il.div),bv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lh().overlay},{motionPreset:u}=ad();return x(p1e,{...i||(u==="none"?{}:jD),__css:l,ref:t,className:a,...o})});bv.displayName="ModalOverlay";function g1e(e){const{leastDestructiveRef:t,...n}=e;return x(F0,{...n,initialFocusRef:t})}var m1e=Pe((e,t)=>x(yv,{ref:t,role:"alertdialog",...e})),[rEe,v1e]=Cn(),y1e=we(qD),b1e=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),g=l(o),m=sh("chakra-modal__content",n),v=lh(),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}=v1e();return re.createElement(RB,null,re.createElement(we.div,{...g,className:"chakra-modal__content-container",__css:w},x(y1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});b1e.displayName="DrawerContent";function x1e(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 DB=(...e)=>e.filter(Boolean).join(" "),YS=e=>e?!0:void 0;function rl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var S1e=e=>x(pa,{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"})}),w1e=e=>x(pa,{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 GT(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 C1e=50,qT=300;function _1e(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);x1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?C1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},qT)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},qT)},[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 k1e=/^[Ee0-9+\-.]$/;function E1e(e){return k1e.test(e)}function P1e(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 L1e(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":L,"aria-labelledby":I,onFocus:O,onBlur:R,onInvalid:D,getAriaValueText:z,isValidCharacter:$,format:V,parse:Y,...de}=e,j=dr(O),te=dr(R),ie=dr(D),le=dr($??E1e),G=dr(z),W=jde(e),{update:q,increment:Q,decrement:X}=W,[me,ye]=C.exports.useState(!1),Se=!(s||l),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useRef(null),dt=C.exports.useCallback(Ee=>Ee.split("").filter(le).join(""),[le]),Xe=C.exports.useCallback(Ee=>Y?.(Ee)??Ee,[Y]),it=C.exports.useCallback(Ee=>(V?.(Ee)??Ee).toString(),[V]);id(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=Xe(He.current.value);W.setValue(dt(At))}},[Xe,dt]);const It=C.exports.useCallback((Ee=a)=>{Se&&Q(Ee)},[Q,Se,a]),wt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Te=_1e(It,wt);GT(ct,"disabled",Te.stop,Te.isSpinning),GT(qe,"disabled",Te.stop,Te.isSpinning);const ft=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Xe(Ee.currentTarget.value);q(dt(Ne)),je.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[q,dt,Xe]),Mt=C.exports.useCallback(Ee=>{var At;j?.(Ee),je.current&&(Ee.target.selectionStart=je.current.start??((At=Ee.currentTarget.value)==null?void 0:At.length),Ee.currentTarget.selectionEnd=je.current.end??Ee.currentTarget.selectionStart)},[j]),ut=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;P1e(Ee,le)||Ee.preventDefault();const At=xt(Ee)*a,Ne=Ee.key,sn={ArrowUp:()=>It(At),ArrowDown:()=>wt(At),Home:()=>q(i),End:()=>q(o)}[Ne];sn&&(Ee.preventDefault(),sn(Ee))},[le,a,It,wt,q,i,o]),xt=Ee=>{let At=1;return(Ee.metaKey||Ee.ctrlKey)&&(At=.1),Ee.shiftKey&&(At=10),At},kn=C.exports.useMemo(()=>{const Ee=G?.(W.value);if(Ee!=null)return Ee;const At=W.value.toString();return At||void 0},[W.value,G]),Et=C.exports.useCallback(()=>{let Ee=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Ee=o),W.cast(Ee))},[W,o,i]),Zt=C.exports.useCallback(()=>{ye(!1),n&&Et()},[n,ye,Et]),En=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=He.current)==null||Ee.focus()})},[t]),yn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.up(),En()},[En,Te]),Me=C.exports.useCallback(Ee=>{Ee.preventDefault(),Te.down(),En()},[En,Te]);Hf(()=>He.current,"wheel",Ee=>{var At;const at=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!at)return;Ee.preventDefault();const sn=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?It(sn):Dn===1&&wt(sn)},{passive:!1});const et=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMax;return{...Ee,ref:$n(At,ct),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||yn(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMax,r,yn,Te.stop,l]),Xt=C.exports.useCallback((Ee={},At=null)=>{const Ne=l||r&&W.isAtMin;return{...Ee,ref:$n(At,qe),role:"button",tabIndex:-1,onPointerDown:rl(Ee.onPointerDown,at=>{at.button!==0||Ne||Me(at)}),onPointerLeave:rl(Ee.onPointerLeave,Te.stop),onPointerUp:rl(Ee.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":YS(Ne)}},[W.isAtMin,r,Me,Te.stop,l]),qt=C.exports.useCallback((Ee={},At=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":I,"aria-label":L,"aria-describedby":k,id:b,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(He,At),value:it(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":YS(h??W.isOutOfRange),"aria-valuetext":kn,autoComplete:"off",autoCorrect:"off",onChange:rl(Ee.onChange,ft),onKeyDown:rl(Ee.onKeyDown,ut),onFocus:rl(Ee.onFocus,Mt,()=>ye(!0)),onBlur:rl(Ee.onBlur,te,Zt)}),[P,m,g,I,L,it,k,b,l,u,s,h,W.value,W.valueAsNumber,W.isOutOfRange,i,o,kn,ft,ut,Mt,te,Zt]);return{value:it(W.value),valueAsNumber:W.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:qt,htmlProps:de}}var[T1e,pb]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[A1e,K7]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Y7=Pe(function(t,n){const r=Ri("NumberInput",t),i=mn(t),o=m7(i),{htmlProps:a,...s}=L1e(o),l=C.exports.useMemo(()=>s,[s]);return re.createElement(A1e,{value:l},re.createElement(T1e,{value:r},re.createElement(we.div,{...a,ref:n,className:DB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Y7.displayName="NumberInput";var zB=Pe(function(t,n){const r=pb();return re.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}})});zB.displayName="NumberInputStepper";var Z7=Pe(function(t,n){const{getInputProps:r}=K7(),i=r(t,n),o=pb();return re.createElement(we.input,{...i,className:DB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z7.displayName="NumberInputField";var BB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),X7=Pe(function(t,n){const r=pb(),{getDecrementButtonProps:i}=K7(),o=i(t,n);return x(BB,{...o,__css:r.stepper,children:t.children??x(S1e,{})})});X7.displayName="NumberDecrementStepper";var Q7=Pe(function(t,n){const{getIncrementButtonProps:r}=K7(),i=r(t,n),o=pb();return x(BB,{...i,__css:o.stepper,children:t.children??x(w1e,{})})});Q7.displayName="NumberIncrementStepper";var jv=(...e)=>e.filter(Boolean).join(" ");function I1e(e,...t){return M1e(e)?e(...t):e}var M1e=e=>typeof e=="function";function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function O1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[R1e,uh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N1e,Gv]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function D1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:L}=Vz(e),I=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),D=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,V]=C.exports.useState(!1),[Y,de]=C.exports.useState(!1),j=C.exports.useId(),te=i??j,[ie,le,G,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ft=>`${ft}-${te}`),{referenceRef:q,getArrowProps:Q,getPopperProps:X,getArrowInnerProps:me,forceUpdate:ye}=Wz({...w,enabled:E||!!b}),Se=vpe({isOpen:E,ref:R});efe({enabled:E,ref:O}),qfe(R,{focusRef:O,visible:E,shouldFocus:o&&u===_p.click}),Yfe(R,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const He=Uz({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),je=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,style:{...ft.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Mt),children:He?ft.children:null,id:le,tabIndex:-1,role:"dialog",onKeyDown:il(ft.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:il(ft.onBlur,xt=>{const kn=KT(xt),Et=ZS(R.current,kn),Zt=ZS(O.current,kn);E&&t&&(!Et&&!Zt)&&P()}),"aria-labelledby":$?G:void 0,"aria-describedby":Y?W:void 0};return u===_p.hover&&(ut.role="tooltip",ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=il(ft.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),ut},[He,le,$,G,Y,W,u,n,P,E,t,g,l,s]),ct=C.exports.useCallback((ft={},Mt=null)=>X({...ft,style:{visibility:E?"visible":"hidden",...ft.style}},Mt),[E,X]),qe=C.exports.useCallback((ft,Mt=null)=>({...ft,ref:$n(Mt,I,q)}),[I,q]),dt=C.exports.useRef(),Xe=C.exports.useRef(),it=C.exports.useCallback(ft=>{I.current==null&&q(ft)},[q]),It=C.exports.useCallback((ft={},Mt=null)=>{const ut={...ft,ref:$n(O,Mt,it),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":le};return u===_p.click&&(ut.onClick=il(ft.onClick,L)),u===_p.hover&&(ut.onFocus=il(ft.onFocus,()=>{dt.current===void 0&&k()}),ut.onBlur=il(ft.onBlur,xt=>{const kn=KT(xt),Et=!ZS(R.current,kn);E&&t&&Et&&P()}),ut.onKeyDown=il(ft.onKeyDown,xt=>{xt.key==="Escape"&&P()}),ut.onMouseEnter=il(ft.onMouseEnter,()=>{D.current=!0,dt.current=window.setTimeout(()=>k(),h)}),ut.onMouseLeave=il(ft.onMouseLeave,()=>{D.current=!1,dt.current&&(clearTimeout(dt.current),dt.current=void 0),Xe.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),ut},[ie,E,le,u,it,L,k,t,P,h,g]);C.exports.useEffect(()=>()=>{dt.current&&clearTimeout(dt.current),Xe.current&&clearTimeout(Xe.current)},[]);const wt=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:G,ref:$n(Mt,ut=>{V(!!ut)})}),[G]),Te=C.exports.useCallback((ft={},Mt=null)=>({...ft,id:W,ref:$n(Mt,ut=>{de(!!ut)})}),[W]);return{forceUpdate:ye,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:Q,getArrowInnerProps:me,getPopoverPositionerProps:ct,getPopoverProps:je,getTriggerProps:It,getHeaderProps:wt,getBodyProps:Te}}function ZS(e,t){return e===t||e?.contains(t)}function KT(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function J7(e){const t=Ri("Popover",e),{children:n,...r}=mn(e),i=K0(),o=D1e({...r,direction:i.direction});return x(R1e,{value:o,children:x(N1e,{value:t,children:I1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}J7.displayName="Popover";function e_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=uh(),a=Gv(),s=t??n??r;return re.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},re.createElement(we.div,{className:jv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}e_.displayName="PopoverArrow";var z1e=Pe(function(t,n){const{getBodyProps:r}=uh(),i=Gv();return re.createElement(we.div,{...r(t,n),className:jv("chakra-popover__body",t.className),__css:i.body})});z1e.displayName="PopoverBody";var B1e=Pe(function(t,n){const{onClose:r}=uh(),i=Gv();return x(cb,{size:"sm",onClick:r,className:jv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});B1e.displayName="PopoverCloseButton";function F1e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var $1e={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]}}},H1e=we(Il.section),FB=Pe(function(t,n){const{variants:r=$1e,...i}=t,{isOpen:o}=uh();return re.createElement(H1e,{ref:n,variants:F1e(r),initial:!1,animate:o?"enter":"exit",...i})});FB.displayName="PopoverTransition";var t_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=uh(),u=Gv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return re.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(FB,{...i,...a(o,n),onAnimationComplete:O1e(l,o.onAnimationComplete),className:jv("chakra-popover__content",t.className),__css:h}))});t_.displayName="PopoverContent";var W1e=Pe(function(t,n){const{getHeaderProps:r}=uh(),i=Gv();return re.createElement(we.header,{...r(t,n),className:jv("chakra-popover__header",t.className),__css:i.header})});W1e.displayName="PopoverHeader";function n_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=uh();return C.exports.cloneElement(t,n(t.props,t.ref))}n_.displayName="PopoverTrigger";function V1e(e,t,n){return(e-t)*100/(n-t)}var U1e=gd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),j1e=gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),G1e=gd({"0%":{left:"-40%"},"100%":{left:"100%"}}),q1e=gd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function $B(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=V1e(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 HB=e=>{const{size:t,isIndeterminate:n,...r}=e;return re.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${j1e} 2s linear infinite`:void 0},...r})};HB.displayName="Shape";var T9=e=>re.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});T9.displayName="Circle";var K1e=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:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=$B({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:`${U1e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},L={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return re.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:L},ee(HB,{size:n,isIndeterminate:v,children:[x(T9,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(T9,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});K1e.displayName="CircularProgress";var[Y1e,Z1e]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),X1e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=$B({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...Z1e().filledTrack};return re.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),WB=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":g,"aria-labelledby":m,title:v,role:b,...w}=mn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${q1e} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${G1e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return re.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ee(Y1e,{value:E,children:[x(X1e,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});WB.displayName="Progress";var Q1e=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Q1e.displayName="CircularProgressLabel";var J1e=(...e)=>e.filter(Boolean).join(" "),ege=e=>e?"":void 0;function tge(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 VB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return re.createElement(we.select,{...a,ref:n,className:J1e("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});VB.displayName="SelectField";var UB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=mn(e),[w,E]=tge(b,LX),P=g7(E),k={width:"100%",height:"fit-content",position:"relative",color:s},L={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return re.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(VB,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:L,children:e.children}),x(jB,{"data-disabled":ege(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});UB.displayName="Select";var nge=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"})}),rge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),jB=e=>{const{children:t=x(nge,{}),...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(rge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};jB.displayName="SelectIcon";function ige(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oge(e){const t=sge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function GB(e){return!!e.touches}function age(e){return GB(e)&&e.touches.length>1}function sge(e){return e.view??window}function lge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function uge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function qB(e,t="page"){return GB(e)?lge(e,t):uge(e,t)}function cge(e){return t=>{const n=oge(t);(!n||n&&t.button===0)&&e(t)}}function dge(e,t=!1){function n(i){e(i,{point:qB(i)})}return t?cge(n):n}function L3(e,t,n,r){return ige(e,t,dge(n,t==="pointerdown"),r)}function KB(e){const t=C.exports.useRef(null);return t.current=e,t}var fge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,age(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:qB(e)},{timestamp:i}=EP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,XS(r,this.history)),this.removeListeners=gge(L3(this.win,"pointermove",this.onPointerMove),L3(this.win,"pointerup",this.onPointerUp),L3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=XS(this.lastEventInfo,this.history),t=this.startEvent!==null,n=mge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=EP();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,FQ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=XS(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),$Q.update(this.updatePoint)}};function YT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XS(e,t){return{point:e.point,delta:YT(e.point,t[t.length-1]),offset:YT(e.point,t[0]),velocity:pge(t,.1)}}var hge=e=>e*1e3;function pge(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 gge(...e){return t=>e.reduce((n,r)=>r(n),t)}function QS(e,t){return Math.abs(e-t)}function ZT(e){return"x"in e&&"y"in e}function mge(e,t){if(typeof e=="number"&&typeof t=="number")return QS(e,t);if(ZT(e)&&ZT(t)){const n=QS(e.x,t.x),r=QS(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function YB(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=KB({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 fge(v,h.current,s)}return L3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function vge(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 yge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function bge(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 ZB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return yge(()=>{const a=e(),s=a.map((l,u)=>vge(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(bge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function xge(e){return typeof e=="object"&&e!==null&&"current"in e}function Sge(e){const[t]=ZB({observeMutation:!1,getNodes(){return[xge(e)?e.current:e]}});return t}var wge=Object.getOwnPropertyNames,Cge=(e,t)=>function(){return e&&(t=(0,e[wge(e)[0]])(e=0)),t},xd=Cge({"../../../react-shim.js"(){}});xd();xd();xd();var Ta=e=>e?"":void 0,p0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");xd();function g0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}xd();xd();function _ge(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 Zg(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var T3={width:0,height:0},Ty=e=>e||T3;function XB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??T3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Zg({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)=>Ty(w).height>Ty(E).height?w:E,T3):r.reduce((w,E)=>Ty(w).width>Ty(E).width?w:E,T3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Zg({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",...Zg({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,...Zg({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 QB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kge(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:L,focusThumbOnChange:I=!0,minStepsBetweenThumbs:O=0,...R}=e,D=dr(m),z=dr(v),$=dr(w),V=QB({isReversed:a,direction:s,orientation:l}),[Y,de]=j5({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[j,te]=C.exports.useState(!1),[ie,le]=C.exports.useState(!1),[G,W]=C.exports.useState(-1),q=!(h||g),Q=C.exports.useRef(Y),X=Y.map(Fe=>d0(Fe,t,n)),me=O*b,ye=Ege(X,t,n,me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const He=X.map(Fe=>n-Fe+t),ct=(V?He:X).map(Fe=>R4(Fe,t,n)),qe=l==="vertical",dt=C.exports.useRef(null),Xe=C.exports.useRef(null),it=ZB({getNodes(){const Fe=Xe.current,gt=Fe?.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),It=C.exports.useId(),Te=_ge(u??It),ft=C.exports.useCallback(Fe=>{var gt;if(!dt.current)return;Se.current.eventSource="pointer";const nt=dt.current.getBoundingClientRect(),{clientX:Nt,clientY:Qt}=((gt=Fe.touches)==null?void 0:gt[0])??Fe,Qn=qe?nt.bottom-Qt:Nt-nt.left,uo=qe?nt.height:nt.width;let pi=Qn/uo;return V&&(pi=1-pi),rz(pi,t,n)},[qe,V,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex(Fe,gt){if(!q)return;const nt=Se.current.valueBounds[Fe];gt=parseFloat(y9(gt,nt.min,ut)),gt=d0(gt,nt.min,nt.max);const Nt=[...Se.current.value];Nt[Fe]=gt,de(Nt)},setActiveIndex:W,stepUp(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt-gt:nt+gt;xt.setValueAtIndex(Fe,Nt)},stepDown(Fe,gt=ut){const nt=Se.current.value[Fe],Nt=V?nt+gt:nt-gt;xt.setValueAtIndex(Fe,Nt)},reset(){de(Q.current)}}),[ut,V,de,q]),kn=C.exports.useCallback(Fe=>{const gt=Fe.key,Nt={ArrowRight:()=>xt.stepUp(G),ArrowUp:()=>xt.stepUp(G),ArrowLeft:()=>xt.stepDown(G),ArrowDown:()=>xt.stepDown(G),PageUp:()=>xt.stepUp(G,Mt),PageDown:()=>xt.stepDown(G,Mt),Home:()=>{const{min:Qt}=ye[G];xt.setValueAtIndex(G,Qt)},End:()=>{const{max:Qt}=ye[G];xt.setValueAtIndex(G,Qt)}}[gt];Nt&&(Fe.preventDefault(),Fe.stopPropagation(),Nt(Fe),Se.current.eventSource="keyboard")},[xt,G,Mt,ye]),{getThumbStyle:Et,rootStyle:Zt,trackStyle:En,innerTrackStyle:yn}=C.exports.useMemo(()=>XB({isReversed:V,orientation:l,thumbRects:it,thumbPercents:ct}),[V,l,ct,it]),Me=C.exports.useCallback(Fe=>{var gt;const nt=Fe??G;if(nt!==-1&&I){const Nt=Te.getThumb(nt),Qt=(gt=Xe.current)==null?void 0:gt.ownerDocument.getElementById(Nt);Qt&&setTimeout(()=>Qt.focus())}},[I,G,Te]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=Fe=>{const gt=ft(Fe)||0,nt=Se.current.value.map(pi=>Math.abs(pi-gt)),Nt=Math.min(...nt);let Qt=nt.indexOf(Nt);const Qn=nt.filter(pi=>pi===Nt);Qn.length>1&>>Se.current.value[Qt]&&(Qt=Qt+Qn.length-1),W(Qt),xt.setValueAtIndex(Qt,gt),Me(Qt)},Xt=Fe=>{if(G==-1)return;const gt=ft(Fe)||0;W(G),xt.setValueAtIndex(G,gt),Me(G)};YB(Xe,{onPanSessionStart(Fe){!q||(te(!0),et(Fe),D?.(Se.current.value))},onPanSessionEnd(){!q||(te(!1),z?.(Se.current.value))},onPan(Fe){!q||Xt(Fe)}});const qt=C.exports.useCallback((Fe={},gt=null)=>({...Fe,...R,id:Te.root,ref:$n(gt,Xe),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(ie),style:{...Fe.style,...Zt}}),[R,h,ie,Zt,Te]),Ee=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:$n(gt,dt),id:Te.track,"data-disabled":Ta(h),style:{...Fe.style,...En}}),[h,En,Te]),At=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.innerTrack,style:{...Fe.style,...yn}}),[yn,Te]),Ne=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe,Qt=X[nt];if(Qt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:gt,role:"slider",tabIndex:q?0:void 0,id:Te.getThumb(nt),"data-active":Ta(j&&G===nt),"aria-valuetext":$?.(Qt)??E?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Qt,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P?.[nt],"aria-labelledby":P?.[nt]?void 0:k?.[nt],style:{...Fe.style,...Et(nt)},onKeyDown:g0(Fe.onKeyDown,kn),onFocus:g0(Fe.onFocus,()=>{le(!0),W(nt)}),onBlur:g0(Fe.onBlur,()=>{le(!1),W(-1)})}},[Te,X,ye,q,j,G,$,E,l,h,g,P,k,Et,kn,le]),at=C.exports.useCallback((Fe={},gt=null)=>({...Fe,ref:gt,id:Te.output,htmlFor:X.map((nt,Nt)=>Te.getThumb(Nt)).join(" "),"aria-live":"off"}),[Te,X]),sn=C.exports.useCallback((Fe,gt=null)=>{const{value:nt,...Nt}=Fe,Qt=!(ntn),Qn=nt>=X[0]&&nt<=X[X.length-1];let uo=R4(nt,t,n);uo=V?100-uo:uo;const pi={position:"absolute",pointerEvents:"none",...Zg({orientation:l,vertical:{bottom:`${uo}%`},horizontal:{left:`${uo}%`}})};return{...Nt,ref:gt,id:Te.getMarker(Fe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!Qt),"data-highlighted":Ta(Qn),style:{...Fe.style,...pi}}},[h,V,n,t,l,X,Te]),Dn=C.exports.useCallback((Fe,gt=null)=>{const{index:nt,...Nt}=Fe;return{...Nt,ref:gt,id:Te.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(L)?L[nt]:`${L}-${nt}`}},[L,X,Te]);return{state:{value:X,isFocused:ie,isDragging:j,getThumbPercent:Fe=>ct[Fe],getThumbMinValue:Fe=>ye[Fe].min,getThumbMaxValue:Fe=>ye[Fe].max},actions:xt,getRootProps:qt,getTrackProps:Ee,getInnerTrackProps:At,getThumbProps:Ne,getMarkerProps:sn,getInputProps:Dn,getOutputProps:at}}function Ege(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[Pge,gb]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Lge,r_]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),JB=Pe(function(t,n){const r=Ri("Slider",t),i=mn(t),{direction:o}=K0();i.direction=o;const{getRootProps:a,...s}=kge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return re.createElement(Pge,{value:l},re.createElement(Lge,{value:r},re.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});JB.defaultProps={orientation:"horizontal"};JB.displayName="RangeSlider";var Tge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=gb(),a=r_(),s=r(t,n);return re.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Tge.displayName="RangeSliderThumb";var Age=Pe(function(t,n){const{getTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Age.displayName="RangeSliderTrack";var Ige=Pe(function(t,n){const{getInnerTrackProps:r}=gb(),i=r_(),o=r(t,n);return re.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ige.displayName="RangeSliderFilledTrack";var Mge=Pe(function(t,n){const{getMarkerProps:r}=gb(),i=r(t,n);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});Mge.displayName="RangeSliderMark";xd();xd();function Oge(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:L,focusThumbOnChange:I=!0,...O}=e,R=dr(m),D=dr(v),z=dr(w),$=QB({isReversed:a,direction:s,orientation:l}),[V,Y]=j5({value:i,defaultValue:o??Nge(t,n),onChange:r}),[de,j]=C.exports.useState(!1),[te,ie]=C.exports.useState(!1),le=!(h||g),G=(n-t)/10,W=b||(n-t)/100,q=d0(V,t,n),Q=n-q+t,me=R4($?Q:q,t,n),ye=l==="vertical",Se=KB({min:t,max:n,step:b,isDisabled:h,value:q,isInteractive:le,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:I,orientation:l}),He=C.exports.useRef(null),je=C.exports.useRef(null),ct=C.exports.useRef(null),qe=C.exports.useId(),dt=u??qe,[Xe,it]=[`slider-thumb-${dt}`,`slider-track-${dt}`],It=C.exports.useCallback(Ne=>{var at;if(!He.current)return;const sn=Se.current;sn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Fe,clientY:gt}=((at=Ne.touches)==null?void 0:at[0])??Ne,nt=ye?Dn.bottom-gt:Fe-Dn.left,Nt=ye?Dn.height:Dn.width;let Qt=nt/Nt;$&&(Qt=1-Qt);let Qn=rz(Qt,sn.min,sn.max);return sn.step&&(Qn=parseFloat(y9(Qn,sn.min,sn.step))),Qn=d0(Qn,sn.min,sn.max),Qn},[ye,$,Se]),wt=C.exports.useCallback(Ne=>{const at=Se.current;!at.isInteractive||(Ne=parseFloat(y9(Ne,at.min,W)),Ne=d0(Ne,at.min,at.max),Y(Ne))},[W,Y,Se]),Te=C.exports.useMemo(()=>({stepUp(Ne=W){const at=$?q-Ne:q+Ne;wt(at)},stepDown(Ne=W){const at=$?q+Ne:q-Ne;wt(at)},reset(){wt(o||0)},stepTo(Ne){wt(Ne)}}),[wt,$,q,W,o]),ft=C.exports.useCallback(Ne=>{const at=Se.current,Dn={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(G),PageDown:()=>Te.stepDown(G),Home:()=>wt(at.min),End:()=>wt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Te,wt,G,Se]),Mt=z?.(q)??E,ut=Sge(je),{getThumbStyle:xt,rootStyle:kn,trackStyle:Et,innerTrackStyle:Zt}=C.exports.useMemo(()=>{const Ne=Se.current,at=ut??{width:0,height:0};return XB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,ut,me,Se]),En=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=je.current)==null?void 0:at.focus()})},[Se]);id(()=>{const Ne=Se.current;En(),Ne.eventSource==="keyboard"&&D?.(Ne.value)},[q,D]);function yn(Ne){const at=It(Ne);at!=null&&at!==Se.current.value&&Y(at)}YB(ct,{onPanSessionStart(Ne){const at=Se.current;!at.isInteractive||(j(!0),En(),yn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(j(!1),D?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Me=C.exports.useCallback((Ne={},at=null)=>({...Ne,...O,ref:$n(at,ct),tabIndex:-1,"aria-disabled":p0(h),"data-focused":Ta(te),style:{...Ne.style,...kn}}),[O,h,te,kn]),et=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,He),id:it,"data-disabled":Ta(h),style:{...Ne.style,...Et}}),[h,it,Et]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Zt}}),[Zt]),qt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,je),role:"slider",tabIndex:le?0:void 0,id:Xe,"data-active":Ta(de),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":q,"aria-orientation":l,"aria-disabled":p0(h),"aria-readonly":p0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:g0(Ne.onKeyDown,ft),onFocus:g0(Ne.onFocus,()=>ie(!0)),onBlur:g0(Ne.onBlur,()=>ie(!1))}),[le,Xe,de,Mt,t,n,q,l,h,g,P,k,xt,ft]),Ee=C.exports.useCallback((Ne,at=null)=>{const sn=!(Ne.valuen),Dn=q>=Ne.value,Fe=R4(Ne.value,t,n),gt={position:"absolute",pointerEvents:"none",...Rge({orientation:l,vertical:{bottom:$?`${100-Fe}%`:`${Fe}%`},horizontal:{left:$?`${100-Fe}%`:`${Fe}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Ta(h),"data-invalid":Ta(!sn),"data-highlighted":Ta(Dn),style:{...Ne.style,...gt}}},[h,$,n,t,l,q]),At=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:q,name:L}),[L,q]);return{state:{value:q,isFocused:te,isDragging:de},actions:Te,getRootProps:Me,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:qt,getMarkerProps:Ee,getInputProps:At}}function Rge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nge(e,t){return t"}),[zge,vb]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),i_=Pe((e,t)=>{const n=Ri("Slider",e),r=mn(e),{direction:i}=K0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Oge(r),l=a(),u=o({},t);return re.createElement(Dge,{value:s},re.createElement(zge,{value:n},re.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});i_.defaultProps={orientation:"horizontal"};i_.displayName="Slider";var eF=Pe((e,t)=>{const{getThumbProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});eF.displayName="SliderThumb";var tF=Pe((e,t)=>{const{getTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});tF.displayName="SliderTrack";var nF=Pe((e,t)=>{const{getInnerTrackProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});nF.displayName="SliderFilledTrack";var A9=Pe((e,t)=>{const{getMarkerProps:n}=mb(),r=vb(),i=n(e,t);return re.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});A9.displayName="SliderMark";var Bge=(...e)=>e.filter(Boolean).join(" "),XT=e=>e?"":void 0,o_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=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]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return re.createElement(we.label,{...h(),className:Bge("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),re.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},re.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":XT(s.isChecked),"data-hover":XT(s.isHovered)})),o&&re.createElement(we.span,{className:"chakra-switch__label",...g(),__css:b},o))});o_.displayName="Switch";var e1=(...e)=>e.filter(Boolean).join(" ");function I9(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Fge,rF,$ge,Hge]=pN();function Wge(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]=j5({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=$ge(),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[Vge,qv]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Uge(e){const{focusedIndex:t,orientation:n,direction:r}=qv(),i=rF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const L=i.nextEnabled(t);L&&((k=L.node)==null||k.focus())},l=()=>{var k;const L=i.prevEnabled(t);L&&((k=L.node)==null||k.focus())},u=()=>{var k;const L=i.firstEnabled();L&&((k=L.node)==null||k.focus())},h=()=>{var k;const L=i.lastEnabled();L&&((k=L.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:I9(e.onKeyDown,o)}}function jge(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=qv(),{index:u,register:h}=Hge({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Dfe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:I9(e.onClick,m)}),w="button";return{...b,id:iF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":oF(a,u),onFocus:t?void 0:I9(e.onFocus,v)}}var[Gge,qge]=Cn({});function Kge(e){const t=qv(),{id:n,selectedIndex:r}=t,o=sb(e.children).map((a,s)=>C.exports.createElement(Gge,{key:s,value:{isSelected:s===r,id:oF(n,s),tabId:iF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yge(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=qv(),{isSelected:o,id:a,tabId:s}=qge(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Uz({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 Zge(){const e=qv(),t=rF(),{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 bs(()=>{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 iF(e,t){return`${e}--tab-${t}`}function oF(e,t){return`${e}--tabpanel-${t}`}var[Xge,Kv]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),aF=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=Wge(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return re.createElement(Fge,{value:l},re.createElement(Vge,{value:h},re.createElement(Xge,{value:r},re.createElement(we.div,{className:e1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});aF.displayName="Tabs";var Qge=Pe(function(t,n){const r=Zge(),i={...t.style,...r},o=Kv();return re.createElement(we.div,{ref:n,...t,className:e1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Qge.displayName="TabIndicator";var Jge=Pe(function(t,n){const r=Uge({...t,ref:n}),o={display:"flex",...Kv().tablist};return re.createElement(we.div,{...r,className:e1("chakra-tabs__tablist",t.className),__css:o})});Jge.displayName="TabList";var sF=Pe(function(t,n){const r=Yge({...t,ref:n}),i=Kv();return re.createElement(we.div,{outline:"0",...r,className:e1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});sF.displayName="TabPanel";var lF=Pe(function(t,n){const r=Kge(t),i=Kv();return re.createElement(we.div,{...r,width:"100%",ref:n,className:e1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});lF.displayName="TabPanels";var uF=Pe(function(t,n){const r=Kv(),i=jge({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return re.createElement(we.button,{...i,className:e1("chakra-tabs__tab",t.className),__css:o})});uF.displayName="Tab";var eme=(...e)=>e.filter(Boolean).join(" ");function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var nme=["h","minH","height","minHeight"],cF=Pe((e,t)=>{const n=lo("Textarea",e),{className:r,rows:i,...o}=mn(e),a=g7(o),s=i?tme(n,nme):n;return re.createElement(we.textarea,{ref:t,rows:i,...a,className:eme("chakra-textarea",r),__css:s})});cF.displayName="Textarea";function rme(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 M9(e,...t){return ime(e)?e(...t):e}var ime=e=>typeof e=="function";function ome(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 ame=(e,t)=>e.find(n=>n.id===t);function QT(e,t){const n=dF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function dF(e,t){for(const[n,r]of Object.entries(e))if(ame(r,t))return n}function sme(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 lme(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 ume={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},pl=cme(ume);function cme(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=dme(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}=QT(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:fF(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=dF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(QT(pl.getState(),i).position)}}var JT=0;function dme(e,t={}){JT+=1;const n=t.id??JT,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>pl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fme=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 re.createElement(YD,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(XD,{children:l}),re.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(QD,{id:u?.title,children:i}),s&&x(ZD,{id:u?.description,display:"block",children:s})),o&&x(cb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function fF(e={}){const{render:t,toastComponent:n=fme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function hme(e,t){const n=i=>({...t,...i,position:ome(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=fF(o);return pl.notify(a,o)};return r.update=(i,o)=>{pl.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,...M9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...M9(o.error,s)}))},r.closeAll=pl.closeAll,r.close=pl.close,r.isActive=pl.isActive,r}function ch(e){const{theme:t}=dN();return C.exports.useMemo(()=>hme(t.direction,e),[e,t.direction])}var pme={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=pme,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=ple();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),rme(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>sme(a),[a]);return re.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},re.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},M9(n,{id:t,onClose:E})))});hF.displayName="ToastComponent";var gme=e=>{const t=C.exports.useSyncExternalStore(pl.subscribe,pl.getState,pl.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:lme(l),children:x(md,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Hn,{children:[n,x(ah,{...o,children:s})]})};function mme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yme={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 Ag(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var $4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},O9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bme(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:L,offset:I,direction:O,...R}=e,{isOpen:D,onOpen:z,onClose:$}=Vz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:Y,getArrowInnerProps:de,getArrowProps:j}=Wz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:L,offset:I,direction:O}),te=C.exports.useId(),le=`tooltip-${g??te}`,G=C.exports.useRef(null),W=C.exports.useRef(),q=C.exports.useRef(),Q=C.exports.useCallback(()=>{q.current&&(clearTimeout(q.current),q.current=void 0),$()},[$]),X=xme(G,Q),me=C.exports.useCallback(()=>{if(!k&&!W.current){X();const Xe=O9(G);W.current=Xe.setTimeout(z,t)}},[X,k,z,t]),ye=C.exports.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0);const Xe=O9(G);q.current=Xe.setTimeout(Q,n)},[n,Q]),Se=C.exports.useCallback(()=>{D&&r&&ye()},[r,ye,D]),He=C.exports.useCallback(()=>{D&&a&&ye()},[a,ye,D]),je=C.exports.useCallback(Xe=>{D&&Xe.key==="Escape"&&ye()},[D,ye]);Hf(()=>$4(G),"keydown",s?je:void 0),Hf(()=>$4(G),"scroll",()=>{D&&o&&Q()}),C.exports.useEffect(()=>()=>{clearTimeout(W.current),clearTimeout(q.current)},[]),Hf(()=>G.current,"pointerleave",ye);const ct=C.exports.useCallback((Xe={},it=null)=>({...Xe,ref:$n(G,it,V),onPointerEnter:Ag(Xe.onPointerEnter,wt=>{wt.pointerType!=="touch"&&me()}),onClick:Ag(Xe.onClick,Se),onPointerDown:Ag(Xe.onPointerDown,He),onFocus:Ag(Xe.onFocus,me),onBlur:Ag(Xe.onBlur,ye),"aria-describedby":D?le:void 0}),[me,ye,He,D,le,Se,V]),qe=C.exports.useCallback((Xe={},it=null)=>Y({...Xe,style:{...Xe.style,[Hr.arrowSize.var]:b?`${b}px`:void 0,[Hr.arrowShadowColor.var]:w}},it),[Y,b,w]),dt=C.exports.useCallback((Xe={},it=null)=>{const It={...Xe.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:it,...R,...Xe,id:le,role:"tooltip",style:It}},[R,le]);return{isOpen:D,show:me,hide:ye,getTriggerProps:ct,getTooltipProps:dt,getTooltipPositionerProps:qe,getArrowProps:j,getArrowInnerProps:de}}var JS="chakra-ui:close-tooltip";function xme(e,t){return C.exports.useEffect(()=>{const n=$4(e);return n.addEventListener(JS,t),()=>n.removeEventListener(JS,t)},[t,e]),()=>{const n=$4(e),r=O9(e);n.dispatchEvent(new r.CustomEvent(JS))}}var Sme=we(Il.div),Ui=Pe((e,t)=>{const n=lo("Tooltip",e),r=mn(e),i=K0(),{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 $=WX(i,"colors",P);n[Hr.arrowBg.var]=$}const k=bme({...E,direction:i.direction}),L=typeof o=="string"||s;let I;if(L)I=re.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);I=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const O=!!l,R=k.getTooltipProps({},t),D=O?mme(R,["role","id"]):R,z=vme(R,["role","id"]);return a?ee(Hn,{children:[I,x(md,{children:k.isOpen&&re.createElement(ah,{...g},re.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Sme,{variants:yme,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,O&&re.createElement(we.span,{srOnly:!0,...z},l),u&&re.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},re.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Hn,{children:o})});Ui.displayName="Tooltip";var wme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(kz,{environment:a,children:t});return x(Poe,{theme:o,cssVarsRoot:s,children:ee(hR,{colorModeManager:n,options:o.config,children:[i?x(qde,{}):x(Gde,{}),x(Toe,{}),r?x(jz,{zIndex:r,children:l}):l]})})};function pF({children:e,theme:t=yoe,toastOptions:n,...r}){return ee(wme,{theme:t,...r,children:[e,x(gme,{...n})]})}function ms(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:a_(e)?2:s_(e)?3:0}function m0(e,t){return t1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cme(e,t){return t1(e)===2?e.get(t):e[t]}function gF(e,t,n){var r=t1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function mF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a_(e){return Tme&&e instanceof Map}function s_(e){return Ame&&e instanceof Set}function Sf(e){return e.o||e.t}function l_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=yF(e);delete t[nr];for(var n=v0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_me),Object.freeze(e),t&&Qf(e,function(n,r){return u_(r,!0)},!0)),e}function _me(){ms(2)}function c_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Cl(e){var t=z9[e];return t||ms(18,e),t}function kme(e,t){z9[e]||(z9[e]=t)}function R9(){return xv}function e6(e,t){t&&(Cl("Patches"),e.u=[],e.s=[],e.v=t)}function H4(e){N9(e),e.p.forEach(Eme),e.p=null}function N9(e){e===xv&&(xv=e.l)}function eA(e){return xv={p:[],l:xv,h:e,m:!0,_:0}}function Eme(e){var t=e[nr];t.i===0||t.i===1?t.j():t.O=!0}function t6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cl("ES5").S(t,e,r),r?(n[nr].P&&(H4(t),ms(4)),bu(e)&&(e=W4(t,e),t.l||V4(t,e)),t.u&&Cl("Patches").M(n[nr].t,e,t.u,t.s)):e=W4(t,n,[]),H4(t),t.u&&t.v(t.u,t.s),e!==vF?e:void 0}function W4(e,t,n){if(c_(t))return t;var r=t[nr];if(!r)return Qf(t,function(o,a){return tA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=l_(r.k):r.o;Qf(r.i===3?new Set(i):i,function(o,a){return tA(e,r,i,o,a,n)}),V4(e,i,!1),n&&e.u&&Cl("Patches").R(r,n,e.u,e.s)}return r.o}function tA(e,t,n,r,i,o){if(sd(i)){var a=W4(e,i,o&&t&&t.i!==3&&!m0(t.D,r)?o.concat(r):void 0);if(gF(n,r,a),!sd(a))return;e.m=!1}if(bu(i)&&!c_(i)){if(!e.h.F&&e._<1)return;W4(e,i),t&&t.A.l||V4(e,i)}}function V4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&u_(t,n)}function n6(e,t){var n=e[nr];return(n?Sf(n):e)[t]}function nA(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 zc(e){e.P||(e.P=!0,e.l&&zc(e.l))}function r6(e){e.o||(e.o=l_(e.t))}function D9(e,t,n){var r=a_(t)?Cl("MapSet").N(t,n):s_(t)?Cl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:R9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Sv;a&&(l=[s],u=Xg);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Cl("ES5").J(t,n);return(n?n.A:R9()).p.push(r),r}function Pme(e){return sd(e)||ms(22,e),function t(n){if(!bu(n))return n;var r,i=n[nr],o=t1(n);if(i){if(!i.P&&(i.i<4||!Cl("ES5").K(i)))return i.t;i.I=!0,r=rA(n,o),i.I=!1}else r=rA(n,o);return Qf(r,function(a,s){i&&Cme(i.t,a)===s||gF(r,a,t(s))}),o===3?new Set(r):r}(e)}function rA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return l_(e)}function Lme(){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[nr];return Sv.get(l,o)},set:function(l){var u=this[nr];Sv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][nr];if(!s.P)switch(s.i){case 5:r(s)&&zc(s);break;case 4:n(s)&&zc(s)}}}function n(o){for(var a=o.t,s=o.k,l=v0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==nr){var g=a[h];if(g===void 0&&!m0(a,h))return!0;var m=s[h],v=m&&m[nr];if(v?v.t!==g:!mF(m,g))return!0}}var b=!!a[nr];return l.length!==v0(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),L=1;L1?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=Cl("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ua=new Mme,bF=ua.produce;ua.produceWithPatches.bind(ua);ua.setAutoFreeze.bind(ua);ua.setUseProxies.bind(ua);ua.applyPatches.bind(ua);ua.createDraft.bind(ua);ua.finishDraft.bind(ua);function sA(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 lA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(f_)(e,t)}if(typeof e!="function")throw new Error(Hi(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(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ome(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:U4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function xF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function j4(){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 G4}function i(s,l){r(s)===G4&&(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 Bme=function(t,n){return t===n};function Fme(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"?wve:Sve;EF.useSyncExternalStore=$0.useSyncExternalStore!==void 0?$0.useSyncExternalStore:Cve;(function(e){e.exports=EF})(kF);var PF={exports:{}},LF={};/** + */var $0=C.exports;function gve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mve=typeof Object.is=="function"?Object.is:gve,vve=$0.useState,yve=$0.useEffect,bve=$0.useLayoutEffect,xve=$0.useDebugValue;function Sve(e,t){var n=t(),r=vve({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return bve(function(){i.value=n,i.getSnapshot=t,s6(i)&&o({inst:i})},[e,n,t]),yve(function(){return s6(i)&&o({inst:i}),e(function(){s6(i)&&o({inst:i})})},[e]),xve(n),n}function s6(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mve(e,n)}catch{return!0}}function wve(e,t){return t()}var Cve=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wve:Sve;kF.useSyncExternalStore=$0.useSyncExternalStore!==void 0?$0.useSyncExternalStore:Cve;(function(e){e.exports=kF})(_F);var EF={exports:{}},PF={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -423,7 +423,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var bb=C.exports,_ve=kF.exports;function kve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eve=typeof Object.is=="function"?Object.is:kve,Pve=_ve.useSyncExternalStore,Lve=bb.useRef,Tve=bb.useEffect,Ave=bb.useMemo,Ive=bb.useDebugValue;LF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ave(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,Eve(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=Pve(e,o[0],o[1]);return Tve(function(){a.hasValue=!0,a.value=s},[s]),Ive(s),s};(function(e){e.exports=LF})(PF);function Mve(e){e()}let TF=Mve;const Ove=e=>TF=e,Rve=()=>TF,ld=C.exports.createContext(null);function AF(){return C.exports.useContext(ld)}const Nve=()=>{throw new Error("uSES not initialized!")};let IF=Nve;const Dve=e=>{IF=e},zve=(e,t)=>e===t;function Bve(e=ld){const t=e===ld?AF:()=>C.exports.useContext(e);return function(r,i=zve){const{store:o,subscription:a,getServerState:s}=t(),l=IF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Fve=Bve();var $ve={exports:{}},On={};/** + */var bb=C.exports,_ve=_F.exports;function kve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eve=typeof Object.is=="function"?Object.is:kve,Pve=_ve.useSyncExternalStore,Lve=bb.useRef,Tve=bb.useEffect,Ave=bb.useMemo,Ive=bb.useDebugValue;PF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ave(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,Eve(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=Pve(e,o[0],o[1]);return Tve(function(){a.hasValue=!0,a.value=s},[s]),Ive(s),s};(function(e){e.exports=PF})(EF);function Mve(e){e()}let LF=Mve;const Ove=e=>LF=e,Rve=()=>LF,ld=C.exports.createContext(null);function TF(){return C.exports.useContext(ld)}const Nve=()=>{throw new Error("uSES not initialized!")};let AF=Nve;const Dve=e=>{AF=e},zve=(e,t)=>e===t;function Bve(e=ld){const t=e===ld?TF:()=>C.exports.useContext(e);return function(r,i=zve){const{store:o,subscription:a,getServerState:s}=t(),l=AF(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Fve=Bve();var $ve={exports:{}},On={};/** * @license React * react-is.production.min.js * @@ -431,7 +431,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),xb=Symbol.for("react.fragment"),Sb=Symbol.for("react.strict_mode"),wb=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),_b=Symbol.for("react.context"),Hve=Symbol.for("react.server_context"),kb=Symbol.for("react.forward_ref"),Eb=Symbol.for("react.suspense"),Pb=Symbol.for("react.suspense_list"),Lb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Wve=Symbol.for("react.offscreen"),MF;MF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case xb:case wb:case Sb:case Eb:case Pb:return e;default:switch(e=e&&e.$$typeof,e){case Hve:case _b:case kb:case Tb:case Lb:case Cb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=_b;On.ContextProvider=Cb;On.Element=p_;On.ForwardRef=kb;On.Fragment=xb;On.Lazy=Tb;On.Memo=Lb;On.Portal=g_;On.Profiler=wb;On.StrictMode=Sb;On.Suspense=Eb;On.SuspenseList=Pb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===_b};On.isContextProvider=function(e){return Va(e)===Cb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===kb};On.isFragment=function(e){return Va(e)===xb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Lb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===wb};On.isStrictMode=function(e){return Va(e)===Sb};On.isSuspense=function(e){return Va(e)===Eb};On.isSuspenseList=function(e){return Va(e)===Pb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xb||e===wb||e===Sb||e===Eb||e===Pb||e===Wve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Lb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===kb||e.$$typeof===MF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})($ve);function Vve(){const e=Rve();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 mA={notify(){},get:()=>[]};function Uve(e,t){let n,r=mA;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=Vve())}function u(){n&&(n(),n=void 0,r.clear(),r=mA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const jve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gve=jve?C.exports.useLayoutEffect:C.exports.useEffect;function qve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Uve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Gve(()=>{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 OF(e=ld){const t=e===ld?AF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Kve=OF();function Yve(e=ld){const t=e===ld?Kve:OF(e);return function(){return t().dispatch}}const Zve=Yve();Dve(PF.exports.useSyncExternalStoreWithSelector);Ove(Al.exports.unstable_batchedUpdates);var m_="persist:",RF="persist/FLUSH",v_="persist/REHYDRATE",NF="persist/PAUSE",DF="persist/PERSIST",zF="persist/PURGE",BF="persist/REGISTER",Xve=-1;function A3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A3=function(n){return typeof n}:A3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A3(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 Qve(e){for(var t=1;t{Object.keys(R).forEach(function(D){!L(D)||h[D]!==R[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(h).forEach(function(D){R[D]===void 0&&L(D)&&m.indexOf(D)===-1&&h[D]!==void 0&&m.push(D)}),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(),D=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(D!==void 0)try{g[R]=l(D)}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(I)}function L(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function I(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function n2e(e){return JSON.stringify(e)}function r2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).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=i2e,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 i2e(e){return JSON.parse(e)}function o2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key);return t.removeItem(n,a2e)}function a2e(e){}function yA(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 nu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function u2e(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 c2e=5e3;function d2e(e,t){var n=e.version!==void 0?e.version:Xve;e.debug;var r=e.stateReconciler===void 0?e2e:e.stateReconciler,i=e.getStoredState||r2e,o=e.timeout!==void 0?e.timeout:c2e,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=l2e(m,["_persist"]),w=b;if(g.type===DF){var E=!1,P=function(z,$){E||(g.rehydrate(e.key,z,$),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=t2e(e)),v)return nu({},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(D){var z=e.migrate||function($,V){return Promise.resolve($)};z(D,n).then(function($){P($)},function($){P(void 0,$)})},function(D){P(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===zF)return s=!0,g.result(o2e(e)),nu({},t(w,g),{_persist:v});if(g.type===RF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===NF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(nu({},R,{_persist:v}))}}function bA(e){return p2e(e)||h2e(e)||f2e()}function f2e(){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 p2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:FF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case BF:return F9({},t,{registry:[].concat(bA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=bA(t.registry);return i.splice(r,1),F9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function v2e(e,t,n){var r=n||!1,i=f_(m2e,FF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:BF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=F9({},i,{purge:function(){var u=[];return e.dispatch({type:zF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:RF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:NF})},persist:function(){e.dispatch({type:DF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=x2e;function I3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I3=function(n){return typeof n}:I3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I3(e)}function l6(){}var y2e={getItem:l6,setItem:l6,removeItem:l6};function b2e(e){if((typeof self>"u"?"undefined":I3(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 x2e(e){var t="".concat(e,"Storage");return b2e(t)?self[t]:y2e}y_.__esModule=!0;y_.default=C2e;var S2e=w2e(b_);function w2e(e){return e&&e.__esModule?e:{default:e}}function C2e(e){var t=(0,S2e.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,_2e=k2e(y_);function k2e(e){return e&&e.__esModule?e:{default:e}}var E2e=(0,_2e.default)("local");$F=E2e;var HF={},WF={},Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.PLACEHOLDER_UNDEFINED=Jf.PACKAGE_NAME=void 0;Jf.PACKAGE_NAME="redux-deep-persist";Jf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(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={}))})(x_);(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=Jf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,ie){ie||(ie=new Set([j])),te||(te="");for(const le in j){const G=te?`${te}.${le}`:le,W=j[le];if((0,e.isObjectLike)(W))return ie.has(W)?`${te}.${le}:`:(ie.add(W),(0,e.getCircularPath)(W,G,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const ie in j){const le=j[ie];te[ie]=(0,e._cloneDeep)(le)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const ie=(0,e.cloneDeep)(j),le=(0,e.cloneDeep)(te),G=Object.keys(ie).reduce((q,Q)=>(h.call(le,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(ie)||(0,e.isDate)(le))return ie.valueOf()===le.valueOf()?{}:le;const W=Object.keys(le).reduce((q,Q)=>{if(!h.call(ie,Q))return q[Q]=le[Q],q;const X=(0,e.difference)(ie[Q],le[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(le)||!(0,e.isArray)(ie)&&(0,e.isArray)(le)?le:q:(q[Q]=X,q)},G);return delete W._persist,W};e.difference=b;const w=function(j,te){return te.reduce((ie,le)=>{if(ie){const G=parseInt(le,10),W=(0,e.isIntegerString)(le)&&G<0?ie.length+G:le;return(0,e.isString)(ie)?ie.charAt(W):ie[W]}},j)};e.path=w;const E=function(j,te){return[...j].reverse().reduce((G,W,q)=>{const Q=(0,e.isIntegerString)(W)?[]:{};return Q[W]=q===0?te:G,Q},{})};e.assocPath=E;const P=function(j,te){const ie=(0,e.cloneDeep)(j);return te.reduce((le,G,W)=>(W===te.length-1&&le&&(0,e.isObjectLike)(le)&&delete le[G],le&&le[G]),ie),ie};e.dissocPath=P;const k=function(j,te,...ie){if(!ie||!ie.length)return te;const le=ie.shift(),{preservePlaceholder:G,preserveUndefined:W}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(le))for(const q in le)if((0,e.isObjectLike)(le[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],le[q]);else if((0,e.isArray)(te)){let Q=le[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;W||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=le[q]!==t.PLACEHOLDER_UNDEFINED?le[q]:void 0;te[q]=Q}return k(j,te,...ie)},L=function(j,te,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=L;const I=function(j,te=[],ie,le,G){if(!(0,e.isObjectLike)(j))return j;for(const W in j){const q=j[W],Q=(0,e.isArray)(j),X=le?le+"."+W:W;q===null&&(ie===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(W,10)]=void 0),q===void 0&&G&&ie===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,ie,X,G)}},O=function(j,te,ie,le){const G=(0,e.cloneDeep)(j);return I(G,te,ie,"",le),G};e.preserveUndefined=O;const R=function(j,te,ie){return ie.indexOf(j)===te};e.unique=R;const D=function(j){return j.reduce((te,ie)=>{const le=j.filter(me=>me===ie),G=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:W,subsets:q}=te,Q=le.length>1&&W.indexOf(ie)===-1,X=G.length>1;return{duplicates:[...W,...Q?le:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,ie){const le=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${le} configuration.`,W=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + */var p_=Symbol.for("react.element"),g_=Symbol.for("react.portal"),xb=Symbol.for("react.fragment"),Sb=Symbol.for("react.strict_mode"),wb=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),_b=Symbol.for("react.context"),Hve=Symbol.for("react.server_context"),kb=Symbol.for("react.forward_ref"),Eb=Symbol.for("react.suspense"),Pb=Symbol.for("react.suspense_list"),Lb=Symbol.for("react.memo"),Tb=Symbol.for("react.lazy"),Wve=Symbol.for("react.offscreen"),IF;IF=Symbol.for("react.module.reference");function Va(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case p_:switch(e=e.type,e){case xb:case wb:case Sb:case Eb:case Pb:return e;default:switch(e=e&&e.$$typeof,e){case Hve:case _b:case kb:case Tb:case Lb:case Cb:return e;default:return t}}case g_:return t}}}On.ContextConsumer=_b;On.ContextProvider=Cb;On.Element=p_;On.ForwardRef=kb;On.Fragment=xb;On.Lazy=Tb;On.Memo=Lb;On.Portal=g_;On.Profiler=wb;On.StrictMode=Sb;On.Suspense=Eb;On.SuspenseList=Pb;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Va(e)===_b};On.isContextProvider=function(e){return Va(e)===Cb};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p_};On.isForwardRef=function(e){return Va(e)===kb};On.isFragment=function(e){return Va(e)===xb};On.isLazy=function(e){return Va(e)===Tb};On.isMemo=function(e){return Va(e)===Lb};On.isPortal=function(e){return Va(e)===g_};On.isProfiler=function(e){return Va(e)===wb};On.isStrictMode=function(e){return Va(e)===Sb};On.isSuspense=function(e){return Va(e)===Eb};On.isSuspenseList=function(e){return Va(e)===Pb};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xb||e===wb||e===Sb||e===Eb||e===Pb||e===Wve||typeof e=="object"&&e!==null&&(e.$$typeof===Tb||e.$$typeof===Lb||e.$$typeof===Cb||e.$$typeof===_b||e.$$typeof===kb||e.$$typeof===IF||e.getModuleId!==void 0)};On.typeOf=Va;(function(e){e.exports=On})($ve);function Vve(){const e=Rve();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 gA={notify(){},get:()=>[]};function Uve(e,t){let n,r=gA;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=Vve())}function u(){n&&(n(),n=void 0,r.clear(),r=gA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const jve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gve=jve?C.exports.useLayoutEffect:C.exports.useEffect;function qve({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=Uve(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return Gve(()=>{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 MF(e=ld){const t=e===ld?TF:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const Kve=MF();function Yve(e=ld){const t=e===ld?Kve:MF(e);return function(){return t().dispatch}}const Zve=Yve();Dve(EF.exports.useSyncExternalStoreWithSelector);Ove(Al.exports.unstable_batchedUpdates);var m_="persist:",OF="persist/FLUSH",v_="persist/REHYDRATE",RF="persist/PAUSE",NF="persist/PERSIST",DF="persist/PURGE",zF="persist/REGISTER",Xve=-1;function A3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A3=function(n){return typeof n}:A3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A3(e)}function mA(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 Qve(e){for(var t=1;t{Object.keys(R).forEach(function(D){!L(D)||h[D]!==R[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(h).forEach(function(D){R[D]===void 0&&L(D)&&m.indexOf(D)===-1&&h[D]!==void 0&&m.push(D)}),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(),D=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(D!==void 0)try{g[R]=l(D)}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(I)}function L(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function I(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function n2e(e){return JSON.stringify(e)}function r2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).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=i2e,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 i2e(e){return JSON.parse(e)}function o2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:m_).concat(e.key);return t.removeItem(n,a2e)}function a2e(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 nu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function u2e(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 c2e=5e3;function d2e(e,t){var n=e.version!==void 0?e.version:Xve;e.debug;var r=e.stateReconciler===void 0?e2e:e.stateReconciler,i=e.getStoredState||r2e,o=e.timeout!==void 0?e.timeout:c2e,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=l2e(m,["_persist"]),w=b;if(g.type===NF){var E=!1,P=function(z,$){E||(g.rehydrate(e.key,z,$),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=t2e(e)),v)return nu({},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(D){var z=e.migrate||function($,V){return Promise.resolve($)};z(D,n).then(function($){P($)},function($){P(void 0,$)})},function(D){P(void 0,D)}),nu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===DF)return s=!0,g.result(o2e(e)),nu({},t(w,g),{_persist:v});if(g.type===OF)return g.result(a&&a.flush()),nu({},t(w,g),{_persist:v});if(g.type===RF)l=!0;else if(g.type===v_){if(s)return nu({},w,{_persist:nu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),L=g.payload,I=r!==!1&&L!==void 0?r(L,h,k,e):k,O=nu({},I,{_persist:nu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(nu({},R,{_persist:v}))}}function yA(e){return p2e(e)||h2e(e)||f2e()}function f2e(){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 p2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:BF,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case zF:return F9({},t,{registry:[].concat(yA(t.registry),[n.key])});case v_:var r=t.registry.indexOf(n.key),i=yA(t.registry);return i.splice(r,1),F9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function v2e(e,t,n){var r=n||!1,i=f_(m2e,BF,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:zF,key:u})},a=function(u,h,g){var m={type:v_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=F9({},i,{purge:function(){var u=[];return e.dispatch({type:DF,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:OF,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:RF})},persist:function(){e.dispatch({type:NF,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var y_={},b_={};b_.__esModule=!0;b_.default=x2e;function I3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I3=function(n){return typeof n}:I3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I3(e)}function l6(){}var y2e={getItem:l6,setItem:l6,removeItem:l6};function b2e(e){if((typeof self>"u"?"undefined":I3(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 x2e(e){var t="".concat(e,"Storage");return b2e(t)?self[t]:y2e}y_.__esModule=!0;y_.default=C2e;var S2e=w2e(b_);function w2e(e){return e&&e.__esModule?e:{default:e}}function C2e(e){var t=(0,S2e.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 FF=void 0,_2e=k2e(y_);function k2e(e){return e&&e.__esModule?e:{default:e}}var E2e=(0,_2e.default)("local");FF=E2e;var $F={},HF={},Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.PLACEHOLDER_UNDEFINED=Jf.PACKAGE_NAME=void 0;Jf.PACKAGE_NAME="redux-deep-persist";Jf.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(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={}))})(x_);(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=Jf,n=x_,r=function(j){return typeof j=="object"&&j!==null};e.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(j){return(0,e.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const o=function(j){return!!j&&typeof j=="object"&&!(0,e.isArray)(j)};e.isPlainObject=o;const a=function(j){return String(~~j)===j&&Number(j)>=0};e.isIntegerString=a;const s=function(j){return Object.prototype.toString.call(j)==="[object String]"};e.isString=s;const l=function(j){return Object.prototype.toString.call(j)==="[object Date]"};e.isDate=l;const u=function(j){return Object.keys(j).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(j,te,ie){ie||(ie=new Set([j])),te||(te="");for(const le in j){const G=te?`${te}.${le}`:le,W=j[le];if((0,e.isObjectLike)(W))return ie.has(W)?`${te}.${le}:`:(ie.add(W),(0,e.getCircularPath)(W,G,ie))}return null};e.getCircularPath=g;const m=function(j){if(!(0,e.isObjectLike)(j))return j;if((0,e.isDate)(j))return new Date(+j);const te=(0,e.isArray)(j)?[]:{};for(const ie in j){const le=j[ie];te[ie]=(0,e._cloneDeep)(le)}return te};e._cloneDeep=m;const v=function(j){const te=(0,e.getCircularPath)(j);if(te)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${te}' of object you're trying to persist: ${j}`);return(0,e._cloneDeep)(j)};e.cloneDeep=v;const b=function(j,te){if(j===te)return{};if(!(0,e.isObjectLike)(j)||!(0,e.isObjectLike)(te))return te;const ie=(0,e.cloneDeep)(j),le=(0,e.cloneDeep)(te),G=Object.keys(ie).reduce((q,Q)=>(h.call(le,Q)||(q[Q]=void 0),q),{});if((0,e.isDate)(ie)||(0,e.isDate)(le))return ie.valueOf()===le.valueOf()?{}:le;const W=Object.keys(le).reduce((q,Q)=>{if(!h.call(ie,Q))return q[Q]=le[Q],q;const X=(0,e.difference)(ie[Q],le[Q]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(le)||!(0,e.isArray)(ie)&&(0,e.isArray)(le)?le:q:(q[Q]=X,q)},G);return delete W._persist,W};e.difference=b;const w=function(j,te){return te.reduce((ie,le)=>{if(ie){const G=parseInt(le,10),W=(0,e.isIntegerString)(le)&&G<0?ie.length+G:le;return(0,e.isString)(ie)?ie.charAt(W):ie[W]}},j)};e.path=w;const E=function(j,te){return[...j].reverse().reduce((G,W,q)=>{const Q=(0,e.isIntegerString)(W)?[]:{};return Q[W]=q===0?te:G,Q},{})};e.assocPath=E;const P=function(j,te){const ie=(0,e.cloneDeep)(j);return te.reduce((le,G,W)=>(W===te.length-1&&le&&(0,e.isObjectLike)(le)&&delete le[G],le&&le[G]),ie),ie};e.dissocPath=P;const k=function(j,te,...ie){if(!ie||!ie.length)return te;const le=ie.shift(),{preservePlaceholder:G,preserveUndefined:W}=j;if((0,e.isObjectLike)(te)&&(0,e.isObjectLike)(le))for(const q in le)if((0,e.isObjectLike)(le[q])&&(0,e.isObjectLike)(te[q]))te[q]||(te[q]={}),k(j,te[q],le[q]);else if((0,e.isArray)(te)){let Q=le[q];const X=G?t.PLACEHOLDER_UNDEFINED:void 0;W||(Q=typeof Q<"u"?Q:te[parseInt(q,10)]),Q=Q!==t.PLACEHOLDER_UNDEFINED?Q:X,te[parseInt(q,10)]=Q}else{const Q=le[q]!==t.PLACEHOLDER_UNDEFINED?le[q]:void 0;te[q]=Q}return k(j,te,...ie)},L=function(j,te,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(j),(0,e.cloneDeep)(te))};e.mergeDeep=L;const I=function(j,te=[],ie,le,G){if(!(0,e.isObjectLike)(j))return j;for(const W in j){const q=j[W],Q=(0,e.isArray)(j),X=le?le+"."+W:W;q===null&&(ie===n.ConfigType.WHITELIST&&te.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&te.indexOf(X)!==-1)&&Q&&(j[parseInt(W,10)]=void 0),q===void 0&&G&&ie===n.ConfigType.BLACKLIST&&te.indexOf(X)===-1&&Q&&(j[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),I(q,te,ie,X,G)}},O=function(j,te,ie,le){const G=(0,e.cloneDeep)(j);return I(G,te,ie,"",le),G};e.preserveUndefined=O;const R=function(j,te,ie){return ie.indexOf(j)===te};e.unique=R;const D=function(j){return j.reduce((te,ie)=>{const le=j.filter(me=>me===ie),G=j.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:W,subsets:q}=te,Q=le.length>1&&W.indexOf(ie)===-1,X=G.length>1;return{duplicates:[...W,...Q?le:[]],subsets:[...q,...X?G:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const z=function(j,te,ie){const le=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",G=`${t.PACKAGE_NAME}: incorrect ${le} configuration.`,W=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. `;if(!(0,e.isString)(te)||te.length<1)throw new Error(`${G} Name (key) of reducer is required. ${W}`);if(!j||!j.length)return;const{duplicates:q,subsets:Q}=(0,e.findDuplicatesAndSubsets)(j);if(q.length>1)throw new Error(`${G} Duplicated paths. @@ -447,16 +447,16 @@ ${JSON.stringify(Q)} ${JSON.stringify(j)}`);if(te.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(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,ie)=>{const le=ie.split("."),G=le[0],W=le.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:W?[W]:void 0}),q&&!Q&&W&&(q[G]=[W]),q&&Q&&W&&Q.push(W),te},[]):[]};e.getRootKeysGroup=de})(WF);(function(e){var t=gs&&gs.__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,L):P,out:(P,k,L)=>!E(k)&&m?m(P,k,L):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 L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{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(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),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),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,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 L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>R.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...V,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(HF);const M3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),P2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?P2e(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)})),K4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),L2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={exports:{}};/** + ${JSON.stringify(te)}`)};e.throwError=Y;const de=function(j){return(0,e.isArray)(j)?j.filter(e.unique).reduce((te,ie)=>{const le=ie.split("."),G=le[0],W=le.slice(1).join(".")||void 0,q=te.filter(X=>Object.keys(X)[0]===G)[0],Q=q?Object.values(q)[0]:void 0;return q||te.push({[G]:W?[W]:void 0}),q&&!Q&&W&&(q[G]=[W]),q&&Q&&W&&Q.push(W),te},[]):[]};e.getRootKeysGroup=de})(HF);(function(e){var t=gs&&gs.__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,L):P,out:(P,k,L)=>!E(k)&&m?m(P,k,L):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 L=g;if(L&&(0,n.isObjectLike)(L)){const I=(0,n.difference)(m,v);(0,n.isEmpty)(I)||(L=(0,n.mergeDeep)(g,I,{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(I)}`)),Object.keys(L).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],L[O]);return}k[O]=L[O]}})}return b&&L&&(0,n.isObjectLike)(L)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(L)}`),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),L=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||L,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 L=(0,n.getRootKeysGroup)(v),I=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=L.map(de=>Object.keys(de)[0]),D=I.map(de=>Object.keys(de)[0]),z=O.filter(de=>R.indexOf(de)===-1&&D.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,L),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,I),Y=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...V,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})($F);const M3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),P2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return S_(r)?r:!1},S_=e=>Boolean(typeof e=="string"?P2e(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)})),K4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),L2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ca={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,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\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",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Vn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["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"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\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"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(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 E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var s2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function l2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function P2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=k2,Wo.prototype.delete=E2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=P2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:ck(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Fk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):zk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Un($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(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=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:Hk(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(hk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return N2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=h2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function I2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return Qd?un(Qd.call(c)):{}}function M2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function O2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ + */(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,L=8,I=16,O=32,R=64,D=128,z=256,$=512,V=30,Y="...",de=800,j=16,te=1,ie=2,le=3,G=1/0,W=9007199254740991,q=17976931348623157e292,Q=0/0,X=4294967295,me=X-1,ye=X>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",L],["curryRight",I],["flip",$],["partial",O],["partialRight",R],["rearg",z]],He="[object Arguments]",je="[object Array]",ct="[object AsyncFunction]",qe="[object Boolean]",dt="[object Date]",Xe="[object DOMException]",it="[object Error]",It="[object Function]",wt="[object GeneratorFunction]",Te="[object Map]",ft="[object Number]",Mt="[object Null]",ut="[object Object]",xt="[object Promise]",kn="[object Proxy]",Et="[object RegExp]",Zt="[object Set]",En="[object String]",yn="[object Symbol]",Me="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",qt="[object ArrayBuffer]",Ee="[object DataView]",At="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",sn="[object Int16Array]",Dn="[object Int32Array]",Fe="[object Uint8Array]",gt="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Qt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,uo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,l1=RegExp(pi.source),ga=RegExp(As.source),xh=/<%-([\s\S]+?)%>/g,u1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pd=/[\\^$.*+?()[\]{}|]/g,c1=RegExp(Pd.source),Mu=/^\s+/,Ld=/\s/,d1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Ou=/,? & /,f1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,h1=/[()=,{}\[\]\/\s]/,p1=/\\(\\)?/g,g1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ua=/\w*$/,m1=/^[-+]0x[0-9a-f]+$/i,v1=/^0b[01]+$/i,y1=/^\[object .+?Constructor\]$/,b1=/^0o[0-7]+$/i,x1=/^(?:0|[1-9]\d*)$/,S1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,w1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",Os="\\u20d0-\\u20ff",Dl=Rl+Nl+Os,Ch="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pn="\\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",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Ur=Rs+No+Pn+bn,zo="['\u2019]",Ns="["+ja+"]",jr="["+Ur+"]",Ga="["+Dl+"]",Td="\\d+",zl="["+Ch+"]",qa="["+Ru+"]",Ad="[^"+ja+Ur+Td+Ch+Ru+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+Ga+"|"+gi+")",kh="[^"+ja+"]",Id="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Do+"]",zs="\\u200d",Bl="(?:"+qa+"|"+Ad+")",C1="(?:"+co+"|"+Ad+")",Nu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=_h+"?",zu="["+kr+"]?",ma="(?:"+zs+"(?:"+[kh,Id,Ds].join("|")+")"+zu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=zu+Md+ma,Eh="(?:"+[zl,Id,Ds].join("|")+")"+Ht,Bu="(?:"+[kh+Ga+"?",Ga,Id,Ds,Ns].join("|")+")",Fu=RegExp(zo,"g"),Ph=RegExp(Ga,"g"),Bo=RegExp(gi+"(?="+gi+")|"+Bu+Ht,"g"),Vn=RegExp([co+"?"+qa+"+"+Nu+"(?="+[jr,co,"$"].join("|")+")",C1+"+"+Du+"(?="+[jr,co+Bl,"$"].join("|")+")",co+"?"+Bl+"+"+Nu,co+"+"+Du,Fl,Od,Td,Eh].join("|"),"g"),Rd=RegExp("["+zs+ja+Dl+kr+"]"),Lh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["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"],Th=-1,ln={};ln[At]=ln[Ne]=ln[at]=ln[sn]=ln[Dn]=ln[Fe]=ln[gt]=ln[nt]=ln[Nt]=!0,ln[He]=ln[je]=ln[qt]=ln[qe]=ln[Ee]=ln[dt]=ln[it]=ln[It]=ln[Te]=ln[ft]=ln[ut]=ln[Et]=ln[Zt]=ln[En]=ln[et]=!1;var Wt={};Wt[He]=Wt[je]=Wt[qt]=Wt[Ee]=Wt[qe]=Wt[dt]=Wt[At]=Wt[Ne]=Wt[at]=Wt[sn]=Wt[Dn]=Wt[Te]=Wt[ft]=Wt[ut]=Wt[Et]=Wt[Zt]=Wt[En]=Wt[yn]=Wt[Fe]=Wt[gt]=Wt[nt]=Wt[Nt]=!0,Wt[it]=Wt[It]=Wt[et]=!1;var Ah={\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"},_1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ze=parseInt,zt=typeof gs=="object"&&gs&&gs.Object===Object&&gs,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Pt,mr=Dr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||mr&&mr.binding&&mr.binding("util")}catch{}}(),Gr=fn&&fn.isArrayBuffer,fo=fn&&fn.isDate,Gi=fn&&fn.isMap,va=fn&&fn.isRegExp,Bs=fn&&fn.isSet,k1=fn&&fn.isTypedArray;function mi(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 E1(oe,xe,ve,Ke){for(var _t=-1,Jt=oe==null?0:oe.length;++_t-1}function Ih(oe,xe,ve){for(var Ke=-1,_t=oe==null?0:oe.length;++Ke<_t;)if(ve(xe,oe[Ke]))return!0;return!1}function Bn(oe,xe){for(var ve=-1,Ke=oe==null?0:oe.length,_t=Array(Ke);++ve-1;);return ve}function Ka(oe,xe){for(var ve=oe.length;ve--&&Wu(xe,oe[ve],0)>-1;);return ve}function L1(oe,xe){for(var ve=oe.length,Ke=0;ve--;)oe[ve]===xe&&++Ke;return Ke}var s2=Fd(Ah),Ya=Fd(_1);function $s(oe){return"\\"+ne[oe]}function Oh(oe,xe){return oe==null?n:oe[xe]}function Hl(oe){return Rd.test(oe)}function Rh(oe){return Lh.test(oe)}function l2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Nh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(Ke,_t){ve[++xe]=[_t,Ke]}),ve}function Dh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,Ke=oe.length,_t=0,Jt=[];++ve-1}function P2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Wo.prototype.clear=k2,Wo.prototype.delete=E2,Wo.prototype.get=V1,Wo.prototype.has=U1,Wo.prototype.set=P2;function Vo(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ii(c,p,S,A,N,F){var K,J=p&g,ce=p&m,_e=p&v;if(S&&(K=N?S(c,A,N,F):S(c)),K!==n)return K;if(!lr(c))return c;var ke=Rt(c);if(ke){if(K=kV(c),!J)return wi(c,K)}else{var Ae=si(c),Ge=Ae==It||Ae==wt;if(mc(c))return Xs(c,J);if(Ae==ut||Ae==He||Ge&&!N){if(K=ce||Ge?{}:uk(c),!J)return ce?lg(c,ac(K,c)):bo(c,Je(K,c))}else{if(!Wt[Ae])return N?c:{};K=EV(c,Ae,J)}}F||(F=new yr);var ht=F.get(c);if(ht)return ht;F.set(c,K),Bk(c)?c.forEach(function(bt){K.add(ii(bt,p,S,bt,c,F))}):Dk(c)&&c.forEach(function(bt,Gt){K.set(Gt,ii(bt,p,S,Gt,c,F))});var yt=_e?ce?ge:Ko:ce?So:li,$t=ke?n:yt(c);return Un($t||c,function(bt,Gt){$t&&(Gt=bt,bt=c[Gt]),Vs(K,Gt,ii(bt,p,S,Gt,c,F))}),K}function Uh(c){var p=li(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=un(c);A--;){var N=S[A],F=p[N],K=c[N];if(K===n&&!(N in c)||!F(K))return!1}return!0}function K1(c,p,S){if(typeof c!="function")throw new vi(a);return hg(function(){c.apply(n,S)},p)}function sc(c,p,S,A){var N=-1,F=Ni,K=!0,J=c.length,ce=[],_e=p.length;if(!J)return ce;S&&(p=Bn(p,Er(S))),A?(F=Ih,K=!1):p.length>=i&&(F=Uu,K=!1,p=new Sa(p));e:for(;++NN?0:N+S),A=A===n||A>N?N:Dt(A),A<0&&(A+=N),A=S>A?0:$k(A);S0&&S(J)?p>1?Lr(J,p-1,S,A,N):ya(N,J):A||(N[N.length]=J)}return N}var qh=Qs(),mo=Qs(!0);function qo(c,p){return c&&qh(c,p,li)}function vo(c,p){return c&&mo(c,p,li)}function Kh(c,p){return po(p,function(S){return Zl(c[S])})}function Us(c,p){p=Zs(p,c);for(var S=0,A=p.length;c!=null&&Sp}function Zh(c,p){return c!=null&&tn.call(c,p)}function Xh(c,p){return c!=null&&p in un(c)}function Qh(c,p,S){return c>=Kr(p,S)&&c=120&&ke.length>=120)?new Sa(K&&ke):n}ke=c[0];var Ae=-1,Ge=J[0];e:for(;++Ae-1;)J!==c&&qd.call(J,ce,1),qd.call(c,ce,1);return c}function nf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var N=p[S];if(S==A||N!==F){var F=N;Yl(N)?qd.call(c,N,1):lp(c,N)}}return c}function rf(c,p){return c+Vl(z1()*(p-c+1))}function Ks(c,p,S,A){for(var N=-1,F=vr(Zd((p-c)/(S||1)),0),K=ve(F);F--;)K[A?F:++N]=c,c+=S;return K}function hc(c,p){var S="";if(!c||p<1||p>W)return S;do p%2&&(S+=c),p=Vl(p/2),p&&(c+=c);while(p);return S}function Ct(c,p){return Px(fk(c,p,wo),c+"")}function rp(c){return oc(gp(c))}function of(c,p){var S=gp(c);return N2(S,jl(p,0,S.length))}function ql(c,p,S,A){if(!lr(c))return c;p=Zs(p,c);for(var N=-1,F=p.length,K=F-1,J=c;J!=null&&++NN?0:N+p),S=S>N?N:S,S<0&&(S+=N),N=p>S?0:S-p>>>0,p>>>=0;for(var F=ve(N);++A>>1,K=c[F];K!==null&&!Yo(K)&&(S?K<=p:K=i){var _e=p?null:H(c);if(_e)return Vd(_e);K=!1,N=Uu,ce=new Sa}else ce=p?[]:J;e:for(;++A=A?c:Ar(c,p,S)}var ig=h2||function(c){return mt.clearTimeout(c)};function Xs(c,p){if(p)return c.slice();var S=c.length,A=Yu?Yu(S):new c.constructor(S);return c.copy(A),A}function og(c){var p=new c.constructor(c.byteLength);return new yi(p).set(new yi(c)),p}function Kl(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function I2(c){var p=new c.constructor(c.source,Ua.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return Qd?un(Qd.call(c)):{}}function M2(c,p){var S=p?og(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function ag(c,p){if(c!==p){var S=c!==n,A=c===null,N=c===c,F=Yo(c),K=p!==n,J=p===null,ce=p===p,_e=Yo(p);if(!J&&!_e&&!F&&c>p||F&&K&&ce&&!J&&!_e||A&&K&&ce||!S&&ce||!N)return 1;if(!A&&!F&&!_e&&c=J)return ce;var _e=S[A];return ce*(_e=="desc"?-1:1)}}return c.index-p.index}function O2(c,p,S,A){for(var N=-1,F=c.length,K=S.length,J=-1,ce=p.length,_e=vr(F-K,0),ke=ve(ce+_e),Ae=!A;++J1?S[N-1]:n,K=N>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,K&&Qi(S[0],S[1],K)&&(F=N<3?n:F,N=1),p=un(p);++A-1?N[F?p[K]:K]:n}}function cg(c){return er(function(p){var S=p.length,A=S,N=Ki.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new vi(a);if(N&&!K&&be(F)=="wrapper")var K=new Ki([],!0)}for(A=K?A:S;++A1&&en.reverse(),ke&&ceJ))return!1;var _e=F.get(c),ke=F.get(p);if(_e&&ke)return _e==p&&ke==c;var Ae=-1,Ge=!0,ht=S&w?new Sa:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(d1,`{ /* [wrapped with `+p+`] */ -`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function N2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,kk(c,S)});function Ek(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function D2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:D2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return Ek(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=$k(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=bk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:D2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(xk),QU=ug(Sk);function JU(c,p){return Lr(z2(c,p),1)}function ej(c,p){return Lr(z2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(z2(c,p),S)}function Pk(c,p){var S=Rt(c)?Un:Qa;return S(c,Le(p,3))}function Lk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),W2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function z2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?r2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,$2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return W2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),B2=p2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Tk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Ak(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ik=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ik));A|=O}return he(p,A,c,S,N)});function Mk(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Ok.placeholder,A}function Rk(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Jk=p-is;return Ae?Kr(Jk,F-Ql):Jk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=B2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(B2())}function Xo(){var Mr=B2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function F2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(F2.Cache||Vo),S}F2.Cache=Vo;function $2(c){if(typeof c!="function")throw new vi(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 Sj(c){return Ak(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&H2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=g2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Dk(c){return typeof c=="number"&&c==Dt(c)}function H2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var zk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return Bk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function Bk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Dk(c)&&c>=-W&&c<=W}var Fk=Bs?Er(Bs):Bt;function W2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function $k(c){if(!c)return[];if(xo(c))return W2(c)?Di(c):wi(c);if(Xu&&c[Xu])return l2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function Hk(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;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=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Wk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Vk=Xi(function(c,p){wa(p,So(p),c)}),V2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return jk(c,$2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function jk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?Kk(p):p)});function Kk(c){return Dx(Sn(c).toLowerCase())}function Yk(c){return c=Sn(c),c&&c.replace(S1,s2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=V2({},p,A,Re);var N=V2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` +`)}function LV(c){return Rt(c)||hf(c)||!!(N1&&c&&c[N1])}function Yl(c,p){var S=typeof c;return p=p??W,!!p&&(S=="number"||S!="symbol"&&x1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=de)return arguments[0]}else p=0;return c.apply(n,arguments)}}function N2(c,p){var S=-1,A=c.length,N=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,_k(c,S)});function kk(c){var p=B(c);return p.__chain__=!0,p}function FU(c,p){return p(c),c}function D2(c,p){return p(c)}var $U=er(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,N=function(F){return Vh(F,c)};return p>1||this.__actions__.length||!(A instanceof Ut)||!Yl(S)?this.thru(N):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:D2,args:[N],thisArg:n}),new Ki(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function HU(){return kk(this)}function WU(){return new Ki(this.value(),this.__chain__)}function VU(){this.__values__===n&&(this.__values__=Fk(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function UU(){return this}function jU(c){for(var p,S=this;S instanceof Jd;){var A=yk(S);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;S=S.__wrapped__}return N.__wrapped__=c,p}function GU(){var c=this.__wrapped__;if(c instanceof Ut){var p=c;return this.__actions__.length&&(p=new Ut(this)),p=p.reverse(),p.__actions__.push({func:D2,args:[Lx],thisArg:n}),new Ki(p,this.__chain__)}return this.thru(Lx)}function qU(){return Ys(this.__wrapped__,this.__actions__)}var KU=cp(function(c,p,S){tn.call(c,S)?++c[S]:Uo(c,S,1)});function YU(c,p,S){var A=Rt(c)?zn:Y1;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}function ZU(c,p){var S=Rt(c)?po:Go;return S(c,Le(p,3))}var XU=ug(bk),QU=ug(xk);function JU(c,p){return Lr(z2(c,p),1)}function ej(c,p){return Lr(z2(c,p),G)}function tj(c,p,S){return S=S===n?1:Dt(S),Lr(z2(c,p),S)}function Ek(c,p){var S=Rt(c)?Un:Qa;return S(c,Le(p,3))}function Pk(c,p){var S=Rt(c)?ho:Gh;return S(c,Le(p,3))}var nj=cp(function(c,p,S){tn.call(c,S)?c[S].push(p):Uo(c,S,[p])});function rj(c,p,S,A){c=xo(c)?c:gp(c),S=S&&!A?Dt(S):0;var N=c.length;return S<0&&(S=vr(N+S,0)),W2(c)?S<=N&&c.indexOf(p,S)>-1:!!N&&Wu(c,p,S)>-1}var ij=Ct(function(c,p,S){var A=-1,N=typeof p=="function",F=xo(c)?ve(c.length):[];return Qa(c,function(K){F[++A]=N?mi(p,K,S):Ja(K,p,S)}),F}),oj=cp(function(c,p,S){Uo(c,S,p)});function z2(c,p){var S=Rt(c)?Bn:xr;return S(c,Le(p,3))}function aj(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),xi(c,p,S))}var sj=cp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function lj(c,p,S){var A=Rt(c)?Dd:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Qa)}function uj(c,p,S){var A=Rt(c)?r2:Mh,N=arguments.length<3;return A(c,Le(p,4),S,N,Gh)}function cj(c,p){var S=Rt(c)?po:Go;return S(c,$2(Le(p,3)))}function dj(c){var p=Rt(c)?oc:rp;return p(c)}function fj(c,p,S){(S?Qi(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?ri:of;return A(c,p)}function hj(c){var p=Rt(c)?bx:ai;return p(c)}function pj(c){if(c==null)return 0;if(xo(c))return W2(c)?ba(c):c.length;var p=si(c);return p==Te||p==Zt?c.size:Tr(c).length}function gj(c,p,S){var A=Rt(c)?$u:yo;return S&&Qi(c,p,S)&&(p=n),A(c,Le(p,3))}var mj=Ct(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Qi(c,p[0],p[1])?p=[]:S>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),xi(c,Lr(p,1),[])}),B2=p2||function(){return mt.Date.now()};function vj(c,p){if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function Lk(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,he(c,D,n,n,n,n,p)}function Tk(c,p){var S;if(typeof p!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var Ax=Ct(function(c,p,S){var A=E;if(S.length){var N=Ho(S,We(Ax));A|=O}return he(c,A,p,S,N)}),Ak=Ct(function(c,p,S){var A=E|P;if(S.length){var N=Ho(S,We(Ak));A|=O}return he(p,A,c,S,N)});function Ik(c,p,S){p=S?n:p;var A=he(c,L,n,n,n,n,n,p);return A.placeholder=Ik.placeholder,A}function Mk(c,p,S){p=S?n:p;var A=he(c,I,n,n,n,n,n,p);return A.placeholder=Mk.placeholder,A}function Ok(c,p,S){var A,N,F,K,J,ce,_e=0,ke=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new vi(a);p=_a(p)||0,lr(S)&&(ke=!!S.leading,Ae="maxWait"in S,F=Ae?vr(_a(S.maxWait)||0,p):F,Ge="trailing"in S?!!S.trailing:Ge);function ht(Mr){var is=A,Ql=N;return A=N=n,_e=Mr,K=c.apply(Ql,is),K}function yt(Mr){return _e=Mr,J=hg(Gt,p),ke?ht(Mr):K}function $t(Mr){var is=Mr-ce,Ql=Mr-_e,Qk=p-is;return Ae?Kr(Qk,F-Ql):Qk}function bt(Mr){var is=Mr-ce,Ql=Mr-_e;return ce===n||is>=p||is<0||Ae&&Ql>=F}function Gt(){var Mr=B2();if(bt(Mr))return en(Mr);J=hg(Gt,$t(Mr))}function en(Mr){return J=n,Ge&&A?ht(Mr):(A=N=n,K)}function Zo(){J!==n&&ig(J),_e=0,A=ce=N=J=n}function Ji(){return J===n?K:en(B2())}function Xo(){var Mr=B2(),is=bt(Mr);if(A=arguments,N=this,ce=Mr,is){if(J===n)return yt(ce);if(Ae)return ig(J),J=hg(Gt,p),ht(ce)}return J===n&&(J=hg(Gt,p)),K}return Xo.cancel=Zo,Xo.flush=Ji,Xo}var yj=Ct(function(c,p){return K1(c,1,p)}),bj=Ct(function(c,p,S){return K1(c,_a(p)||0,S)});function xj(c){return he(c,$)}function F2(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new vi(a);var S=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=S.cache;if(F.has(N))return F.get(N);var K=c.apply(this,A);return S.cache=F.set(N,K)||F,K};return S.cache=new(F2.Cache||Vo),S}F2.Cache=Vo;function $2(c){if(typeof c!="function")throw new vi(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 Sj(c){return Tk(2,c)}var wj=wx(function(c,p){p=p.length==1&&Rt(p[0])?Bn(p[0],Er(Le())):Bn(Lr(p,1),Er(Le()));var S=p.length;return Ct(function(A){for(var N=-1,F=Kr(A.length,S);++N=p}),hf=ep(function(){return arguments}())?ep:function(c){return Sr(c)&&tn.call(c,"callee")&&!R1.call(c,"callee")},Rt=ve.isArray,zj=Gr?Er(Gr):X1;function xo(c){return c!=null&&H2(c.length)&&!Zl(c)}function Ir(c){return Sr(c)&&xo(c)}function Bj(c){return c===!0||c===!1||Sr(c)&&oi(c)==qe}var mc=g2||Wx,Fj=fo?Er(fo):Q1;function $j(c){return Sr(c)&&c.nodeType===1&&!pg(c)}function Hj(c){if(c==null)return!0;if(xo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||mc(c)||pp(c)||hf(c)))return!c.length;var p=si(c);if(p==Te||p==Zt)return!c.size;if(fg(c))return!Tr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Wj(c,p){return uc(c,p)}function Vj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?uc(c,p,n,S):!!A}function Mx(c){if(!Sr(c))return!1;var p=oi(c);return p==it||p==Xe||typeof c.message=="string"&&typeof c.name=="string"&&!pg(c)}function Uj(c){return typeof c=="number"&&Fh(c)}function Zl(c){if(!lr(c))return!1;var p=oi(c);return p==It||p==wt||p==ct||p==kn}function Nk(c){return typeof c=="number"&&c==Dt(c)}function H2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Sr(c){return c!=null&&typeof c=="object"}var Dk=Gi?Er(Gi):Sx;function jj(c,p){return c===p||cc(c,p,kt(p))}function Gj(c,p,S){return S=typeof S=="function"?S:n,cc(c,p,kt(p),S)}function qj(c){return zk(c)&&c!=+c}function Kj(c){if(IV(c))throw new _t(o);return tp(c)}function Yj(c){return c===null}function Zj(c){return c==null}function zk(c){return typeof c=="number"||Sr(c)&&oi(c)==ft}function pg(c){if(!Sr(c)||oi(c)!=ut)return!1;var p=Zu(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ni}var Ox=va?Er(va):ar;function Xj(c){return Nk(c)&&c>=-W&&c<=W}var Bk=Bs?Er(Bs):Bt;function W2(c){return typeof c=="string"||!Rt(c)&&Sr(c)&&oi(c)==En}function Yo(c){return typeof c=="symbol"||Sr(c)&&oi(c)==yn}var pp=k1?Er(k1):zr;function Qj(c){return c===n}function Jj(c){return Sr(c)&&si(c)==et}function eG(c){return Sr(c)&&oi(c)==Xt}var tG=_(js),nG=_(function(c,p){return c<=p});function Fk(c){if(!c)return[];if(xo(c))return W2(c)?Di(c):wi(c);if(Xu&&c[Xu])return l2(c[Xu]());var p=si(c),S=p==Te?Nh:p==Zt?Vd:gp;return S(c)}function Xl(c){if(!c)return c===0?c:0;if(c=_a(c),c===G||c===-G){var p=c<0?-1:1;return p*q}return c===c?c:0}function Dt(c){var p=Xl(c),S=p%1;return p===p?S?p-S:p:0}function $k(c){return c?jl(Dt(c),0,X):0}function _a(c){if(typeof c=="number")return c;if(Yo(c))return Q;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=qi(c);var S=v1.test(c);return S||b1.test(c)?Ze(c.slice(2),S?2:8):m1.test(c)?Q:+c}function Hk(c){return wa(c,So(c))}function rG(c){return c?jl(Dt(c),-W,W):c===0?c:0}function Sn(c){return c==null?"":Zi(c)}var iG=Xi(function(c,p){if(fg(p)||xo(p)){wa(p,li(p),c);return}for(var S in p)tn.call(p,S)&&Vs(c,S,p[S])}),Wk=Xi(function(c,p){wa(p,So(p),c)}),V2=Xi(function(c,p,S,A){wa(p,So(p),c,A)}),oG=Xi(function(c,p,S,A){wa(p,li(p),c,A)}),aG=er(Vh);function sG(c,p){var S=Ul(c);return p==null?S:Je(S,p)}var lG=Ct(function(c,p){c=un(c);var S=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++S1),F}),wa(c,ge(c),S),A&&(S=ii(S,g|m|v,Lt));for(var N=p.length;N--;)lp(S,p[N]);return S});function EG(c,p){return Uk(c,$2(Le(p)))}var PG=er(function(c,p){return c==null?{}:tg(c,p)});function Uk(c,p){if(c==null)return{};var S=Bn(ge(c),function(A){return[A]});return p=Le(p),np(c,S,function(A,N){return p(A,N[0])})}function LG(c,p,S){p=Zs(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var N=z1();return Kr(c+N*(p-c+pe("1e-"+((N+"").length-1))),p)}return rf(c,p)}var FG=Js(function(c,p,S){return p=p.toLowerCase(),c+(S?qk(p):p)});function qk(c){return Dx(Sn(c).toLowerCase())}function Kk(c){return c=Sn(c),c&&c.replace(S1,s2).replace(Ph,"")}function $G(c,p,S){c=Sn(c),p=Zi(p);var A=c.length;S=S===n?A:jl(Dt(S),0,A);var N=S;return S-=p.length,S>=0&&c.slice(S,N)==p}function HG(c){return c=Sn(c),c&&ga.test(c)?c.replace(As,Ya):c}function WG(c){return c=Sn(c),c&&c1.test(c)?c.replace(Pd,"\\$&"):c}var VG=Js(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),UG=Js(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),jG=fp("toLowerCase");function GG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Vl(N),S)+c+d(Zd(N),S)}function qG(c,p,S){c=Sn(c),p=Dt(p);var A=p?ba(c):0;return p&&A>>0,S?(c=Sn(c),c&&(typeof p=="string"||p!=null&&!Ox(p))&&(p=Zi(p),!p&&Hl(c))?ts(Di(c),0,S):c.split(p,S)):[]}var eq=Js(function(c,p,S){return c+(S?" ":"")+Dx(p)});function tq(c,p,S){return c=Sn(c),S=S==null?0:jl(Dt(S),0,c.length),p=Zi(p),c.slice(S,S+p.length)==p}function nq(c,p,S){var A=B.templateSettings;S&&Qi(c,p,S)&&(p=n),c=Sn(c),p=V2({},p,A,Re);var N=V2({},p.imports,A.imports,Re),F=li(N),K=Wd(N,F),J,ce,_e=0,ke=p.interpolate||Ms,Ae="__p += '",Ge=jd((p.escape||Ms).source+"|"+ke.source+"|"+(ke===Iu?g1:Ms).source+"|"+(p.evaluate||Ms).source+"|$","g"),ht="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Th+"]")+` `;c.replace(Ge,function(bt,Gt,en,Zo,Ji,Xo){return en||(en=Zo),Ae+=c.slice(_e,Xo).replace(w1,$s),Gt&&(J=!0,Ae+=`' + __e(`+Gt+`) + '`),Ji&&(ce=!0,Ae+=`'; @@ -473,8 +473,8 @@ __p += '`),en&&(Ae+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Ae+`return __p -}`;var $t=Xk(function(){return Jt(F,ht+"return "+Ae).apply(n,K)});if($t.source=Ae,Mx($t))throw $t;return $t}function rq(c){return Sn(c).toLowerCase()}function iq(c){return Sn(c).toUpperCase()}function oq(c,p,S){if(c=Sn(c),c&&(S||p===n))return qi(c);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Di(p),F=$o(A,N),K=Ka(A,N)+1;return ts(A,F,K).join("")}function aq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.slice(0,A1(c)+1);if(!c||!(p=Zi(p)))return c;var A=Di(c),N=Ka(A,Di(p))+1;return ts(A,0,N).join("")}function sq(c,p,S){if(c=Sn(c),c&&(S||p===n))return c.replace(Mu,"");if(!c||!(p=Zi(p)))return c;var A=Di(c),N=$o(A,Di(p));return ts(A,N).join("")}function lq(c,p){var S=V,A=Y;if(lr(p)){var N="separator"in p?p.separator:N;S="length"in p?Dt(p.length):S,A="omission"in p?Zi(p.omission):A}c=Sn(c);var F=c.length;if(Hl(c)){var K=Di(c);F=K.length}if(S>=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,d2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Zk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Xk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Un(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(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)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:D2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Un(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=x2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,VF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&VF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},UF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?VF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),jF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=jF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),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}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();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}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),GF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=GF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),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}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),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}),qF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),KF=De((e,t)=>{var n=Mb(),r=qF(),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}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),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}),YF=De((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}),K2e=De((e,t)=>{var n=KF(),r=q2e(),i=qF(),o=YF(),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}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),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}),J2e=De((e,t)=>{var n=Ob(),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}),eye=De((e,t)=>{var n=Ob(),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}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((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}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();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}),ZF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=ZF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();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}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=ZF(),r=cye(),i=dye();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}),XF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),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 L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((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}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=jF(),o=XF(),a=mye(),s=vye(),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]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((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}),Cye=De((e,t)=>{var n=Sye(),r=wye(),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}),_ye=De((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}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),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}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),QF=De((e,t)=>{var n=_u(),r=Pye(),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}),Lye=De((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}),Tye=De((e,t)=>{var n=Mb(),r=JF(),i=Nb(),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]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=GF(),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$=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=QF(),a=Lye(),s=e$(),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):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((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}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),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}),zye=De((e,t)=>{var n=KF(),r=JF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),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 L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=YF(),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),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=XF(),i=yye(),o=$ye(),a=jye(),s=__(),l=QF(),u=e$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();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}),t$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Am(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[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=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(e){return n$(e,["input","textarea","select"])}function n$({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 Jye(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 e3e=(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},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=UF(t$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var SA=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=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!n$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Am(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){SA(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&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Am(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Am(w,u?.combinationKey)))}},[e,l,u,h]),i}UF(t$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Am(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Am(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){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 c3e=()=>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 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."})]}),d3e=st({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"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.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.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({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"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.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.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.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.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.12ZM2782.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.4ZM761.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.98ZM804.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.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,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.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({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"})}),m3e=st({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 Xr=(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))(Xr||{});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"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const wA=/^-?(0\.)?\.?$/,$a=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,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(wA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(wA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(jB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[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],x3e=[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],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var r$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=re.createContext&&re.createContext(r$),ed=globalThis&&globalThis.__assign||function(){return ed=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(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{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 fh(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:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(Sz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Hn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(nF,{className:"invokeai__slider_track",...Y,children:x(rF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(tF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(BB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(pC(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(pC(.5))}})}const s$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},l$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(t2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const u$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(t2(u$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Zv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(gC(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(mC(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(rz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},c$=yb({name:"system",initialState:t4e,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"},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}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:_A,setSocketId:iEe,setShouldConfirmOnDelete:d$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:f$,setModelList:kA,setIsCancelable:EA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=c$.actions,d4e=c$.reducer;function f4e(e){return lt({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 h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({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 lt({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 m4e(e){return lt({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 v4e(e){return lt({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 y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({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 C4e(e){return lt({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 _4e(e){return lt({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 p$(e){return lt({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 g$(e){return lt({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 k4e(e){return lt({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 E4e(e){return lt({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 P4e(e){return lt({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 L4e(e){return lt({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 T4e(e){return lt({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 m$(e){return lt({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 v$(e){return lt({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 A_(e){return lt({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 y$(e){return lt({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 b$(e){return lt({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 A4e(e){return lt({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 I4e(e){return lt({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 lt({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 O4e(e){return lt({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 R4e(e){return lt({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 N4e(e){return lt({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 D4e(e){return lt({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 z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({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 F4e(e){return lt({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 x$(e){return lt({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 $4e(e){return lt({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 H4e(e){return lt({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 W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({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 U4e(e){return lt({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 j4e(e){return lt({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 G4e(e){return lt({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 q4e(e){return lt({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 K4e(e){return lt({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 f6(e){return lt({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 Y4e(e){return lt({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 I_(e){return lt({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 Z4e(e){return lt({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 X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({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 lt({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 J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({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)}let Ay;const e5e=new Uint8Array(16);function t5e(){if(!Ay&&(Ay=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ay))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ay(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PA={randomUUID:r5e};function Ap(e,t,n){if(PA.randomUUID&&!t&&!e)return PA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();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 n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Iy=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",S$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},LA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...LA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...LA}},w$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e[e.currentCanvas].boundingBoxDimensions=t.payload;const{width:n,height:r}=t.payload,{x:i,y:o}=e[e.currentCanvas].boundingBoxCoordinates,{width:a,height:s}=e[e.currentCanvas].stageDimensions,l=a/e[e.currentCanvas].stageScale,u=s/e[e.currentCanvas].stageScale,h=cs(l,64),g=cs(u,64),m=cs(n,64),v=cs(r,64),b=i+n-l,w=o+r-u,E=Ve.clamp(m,64,h),P=Ve.clamp(v,64,g),k=b>0?i-b:i,L=w>0?o-w:o,I=Ve.clamp(k,e[e.currentCanvas].stageCoordinates.x,h-E),O=Ve.clamp(L,e[e.currentCanvas].stageCoordinates.y,g-P);e[e.currentCanvas].boundingBoxDimensions={width:E,height:P},e[e.currentCanvas].boundingBoxCoordinates={x:I,y:O}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(z$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:C$,setEraserSize:u5e,addLine:_$,addPointToCurrentLine:k$,setShouldPreserveMaskedArea:E$,setIsMaskEnabled:P$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:L$,clearMask:T$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:A$,setStageDimensions:TA,setImageToInpaint:Y4,setImageToOutpaint:I$,setBoundingBoxDimensions:Qg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:M$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:O$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:AA,setShouldLockBoundingBox:R$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:IA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:My,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:N$,setCurrentCanvas:D$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=w$.actions,k5e=w$.reducer,z$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Xv=Qe([jt],e=>e.layerState.objects.find(S$)),B$=Qe([e=>e.options,e=>e.system,Xv,vn],(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")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),MA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),OA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function F$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(B$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(vz,{children:o.map((u,h)=>x(yz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),H$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(F$,{}),x(H$,{}),x($$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(B$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(dF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function W$(e){return lt({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 V$(e){return lt({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 N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function RA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=RA(e.className,t):e.setAttribute("class",RA(e.className&&e.className.baseVal||"",t))}const NA={disabled:!1},U$=re.createContext(null);var j$=function(t){return t.scrollTop},Jg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(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=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Jg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Jg?{status:wf}: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!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}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===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this);a&&j$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Jg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[sy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||NA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},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:sy.findDOMNode(this);if(!o||NA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},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:sy.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===Jg)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=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(U$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=U$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Jg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},K$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(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:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);q$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(G$,{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,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(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(W$,{}):x(V$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:K$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(s$,{}),feature:Xr.OTHER,options:x(l$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),z_=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(d$(!b.target.checked));return ee(Hn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(bv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(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:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(_v(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(t2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({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(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(I$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(y$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Zv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(v$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={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},Z$=yb({name:"gallery",initialState:U5e,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=ca.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(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){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:Oy,clearIntermediateImage:DA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:B_,selectPrevImage:F_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Ry,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({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"});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"})});st({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"});st({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"});st({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"});st({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"});st({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"})]})});st({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"})]})});st({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"});st({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"})})});st({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"})]})});st({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"})]})});st({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"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({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"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({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"})]})});st({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"})]})});st({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"})]})});st({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"});st({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"});st({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"})]})});st({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"})]})});st({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"})]})});st({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"});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"});st({displayName:"SpinnerIcon",path:ee(Hn,{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"})]})]})});st({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"});st({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"})});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"});st({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"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({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 J5e(e){return lt({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 tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Hn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(gC(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(mC(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(t2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(_v(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(vC(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(pC(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Hn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(gC($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(mC(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(pz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([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,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:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(F_())},h=()=>{e(B_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(g$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Hn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Hn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(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(rbe,{})}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function obe(e){return lt({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 abe=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)}},hbe=["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"],HA="__resizable_base__",rH=function(e){ube(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(HA):o.className+=HA,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||cbe},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 v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(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&&Ep("left",o),s=i&&Ep("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,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Dy(n,I,O),r=Dy(r,R,D)}else n=Dy(n,h,g),r=Dy(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&&dbe(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:ll(ll({},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=fbe(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),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=$A(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=$A(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=FA(I,this.props.grid[0]),z=FA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},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:ll(ll({},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(lbe,{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 hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({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,{...ll({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 Qv(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,pbe(i,...t)]}function pbe(...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 gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);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(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});wv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(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 bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Qv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(wv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(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=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let WA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=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(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),VA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=WA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),VA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(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(){lH(wbe,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 Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,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 VA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(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?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){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:UA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:UA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function UA(){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 b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",jA={bubbles:!1,cancelable:!0},Tbe=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=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(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:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(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){qA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,jA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,jA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),qA.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,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=GA(t,e),r=GA(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 GA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(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 Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const qA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=KA(e,t),e.unshift(t)},remove(t){var n;e=KA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function KA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function H_(e){return e==="y"?"height":"width"}function YA(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=i1(t),l=H_(s),u=r[l]/2-i[l]/2,h=r1(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(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=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}=YA(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=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=H_(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],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=H_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function XA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[XA(e),t,XA(t)]}const Kbe=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=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=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 Q4(r,{...n,elementContext:"reference"}),a=QA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=QA(o,i.floating);return{data:{escapedOffsets:a,escaped:JA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(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 Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=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 Q4(t,l),g=i1(r1(i)),m=dH(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],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=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=i1(i),m=dH(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,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=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:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function W_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Jv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Jv(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 gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const eI=Math.min,Im=Math.max,e5=Math.round;function wu(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&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&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 wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||wd(e)}function tI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(W_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=tI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=tI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function nI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(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 axe(e,t){const n=Pu(e),r=wd(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=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Im(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Im(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Jv(i||n).direction==="rtl"&&(s+=Im(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(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 rI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Jv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=rI(t,h,i);return u.top=Im(g.top,u.top),u.right=eI(g.right,u.right),u.bottom=eI(g.bottom,u.bottom),u.left=Im(g.left,u.left),u},rI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:nI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...nI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jv(e).direction==="rtl"};function hxe(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?[...cd(e)?t5(e):[],...t5(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}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(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 pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(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(!X9(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)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(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=gxe(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);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(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 L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,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 vxe=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?ZA({element:t.current,padding:n}).fn(i):{}:t?ZA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{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 bH="Popper",[V_,xH]=Qv(bH),[bxe,SH]=V_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=V_(n5),[_xe,kxe]=V_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=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:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=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]=wH(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 L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(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]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Fy(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Fy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=Fy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Fy(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 Fy(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(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 Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},U_="RovingFocusGroup",[Q9,_H,Bxe]=aH(U_),[Fxe,kH]=Qv(U_,[Bxe]),[$xe,Hxe]=Fxe(U_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=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=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{I.current=!0}),onFocus:Kn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({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=Kxe(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?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Qv(ex,[nSe,xH,kH]),j_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,G_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=j_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(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(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=j_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=G_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Kz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=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=tx(td,n),E=G_(td,n),P=j_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?RB:C.exports.Fragment,ie=v?{as:wv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:Kn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Kn(e.onPointerMove,tC(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),eC="MenuItem",iI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=G_(eC,e.__scopeMenu),s=AH(eC,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(iI,{bubbles:!0,cancelable:!0});g.addEventListener(iI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},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===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(eC,n),s=TH(n),l=C.exports.useRef(null),u=Ha(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(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,tC(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,tC(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(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=xSe(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 wSe(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 CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function tC(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Qv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(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(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"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,$y(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,$y(u)),onPointerCancel:Kn(e.onPointerCancel,$y(u)),onPointerUp:Kn(e.onPointerUp,$y(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},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)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function $y(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(t2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(_v(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(I$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:m$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(F_())}),vt("right",()=>{e(B_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),q$(D,j,!o),x(G$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Hn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Ry("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Ry("user")),children:"User"})]}):ee(Hn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Ry("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Ry("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(W$,{}):x(V$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Hn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(h$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),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(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(O$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function oI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Qg({...a,width:Math.floor(g)})),t=="height"&&r(Qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Qg({...a,width:Math.floor(s)})),t=="height"&&r(Qg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(R$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(a$,{size:22}):x(o$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(oI,{dimension:"width",label:"Box W"}),x(oI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(AA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(AA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Hn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function nC(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 W0=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(aI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=rC(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(sI(P),!function(I,O){return O&&!Mm(I)}(P,l.current)&&k)){if(Mm(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(aI(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",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},K_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["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}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},iC=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=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:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=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:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(q_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(K_,{className:"react-colorful__hue-pointer",left:t/360,color:iC({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:iC({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(q_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(K_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:iC(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=nC(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;BH(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 c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},lI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!lI.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}`,lI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(q_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(K_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const Y_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(L$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(Y_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(C$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(x$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(b$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(T$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(P$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(a$,{size:22}):x(o$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(E$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(R$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Xv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current||!r)return;const{width:o,height:a}=r.image,{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(M$(u)),n==="inpainting"?e(TA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(TA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Wv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e: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 ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{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 ta(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 F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",uI="Konva error: ",K6e="rgb(",_6={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]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Hy=[];const Z6e=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)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},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){Hy.push(e),Hy.length===1&&Z6e(function(){const t=Hy;Hy=[],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(C6,j6e);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=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.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=_6[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=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],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Z_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.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(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.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(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+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=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+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=Mg+a(t),l=Og+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},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+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=Mg+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},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+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 J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(cI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&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=dI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(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 cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._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=[];cn._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")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Vy="allEventListeners",ru="absoluteTransform",fI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",oC="listening",hI="mouseenter",pI="mouseleave",gI="set",mI="Shape",R3=" ",vI="stage",_c="transform",gwe="Stage",aC="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,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===_c||t===ru)&&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===_c||t===ru,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(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),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){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 S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new X_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),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(O3),this._clearSelfAndDescendantCache(fI),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(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}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!==hwe&&(r=gI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(oC,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(aC,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;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.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!==gwe&&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(_c),this._clearSelfAndDescendantCache(ru)),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 ta,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(_c);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(_c),this._clearSelfAndDescendantCache(ru),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(O3,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():ot.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;cn._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=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._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=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[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=Be.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=Be.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",Pp=e=>{const t=rm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function bI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="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);",N3=[];class lx extends aa{constructor(t){super(bI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{bI(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===bwe){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&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),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 S0({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+yI,this.content.style.height=n+yI),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;rwwe&&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(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(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=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.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=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.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=Pp(t.type),r=rm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(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=Pp(t.type),r=rm(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=k6(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;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+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,ot["_"+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}),ot["_"+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(sC,{evt:t}):this._fire(sC,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(lC,{evt:t}):this._fire(lC,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,Q_(t)),Om(t.pointerId)}_lostpointercapture(t){Om(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 S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new X_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.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}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let Ky;function P6(){return Ky||(Ky=fe.createCanvasElement().getContext("2d"),Ky)}const Rm={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Rm)););this.colorKey=n,Rm[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(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.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(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),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 Be.prototype.destroy.call(this),delete Rm[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,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||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,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=fe._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){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Z_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new X_({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(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.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)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class J_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J_.prototype.nodeType="FastLayer";gr(J_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),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=xI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=SI,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===xI?this.setTime(t):this.state===SI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,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||Nm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.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 Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(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)Bwe[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),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=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={};Be.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 Nm={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}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function uC(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 CI(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=Nn.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 Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.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 Nn.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,Nn.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,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(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=Nn;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,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_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=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.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}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_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)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_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)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{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 Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",cC="up",dC="right",fC="down",hC="left",Uwe=cW.length;class ek extends V0{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)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var _I=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,_I,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),_I,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)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{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 Zy;function A6(){return Zy||(Zy=fe.createCanvasElement().getContext(qwe),Zy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(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 pr extends Ie{constructor(t){super(a9e(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=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||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=A6(),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()+Yy+this.fontVariant()+Yy+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(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 A6().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!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==PI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Yy||te===kI;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Yy),z.lastIndexOf(kI))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),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!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==PI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&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+T6)=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=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.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=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),LI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"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 d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[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 r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],TI=1e8;function h9e(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 bW(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 p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(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(u9e.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(LI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(LI,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=(ot.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 bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-TI,y:-TI,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 ta;r.rotate(-ot.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:ot.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(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new e2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?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=ot.getAngle(this.rotation()),o=f9e(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 Ie({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 g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,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(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 ta;if(a.rotate(ot.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:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;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 ta;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(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=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.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)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function AI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[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],y9e=[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 b9e(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,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new AI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=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};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=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:fe.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,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(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 _9e=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,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=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),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(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+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=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)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=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)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=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)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i=F)return c;var J=S-ba(A);if(J<1)return A;var ce=K?ts(K,0,J).join(""):c.slice(0,J);if(N===n)return ce+A;if(K&&(J+=ce.length-J),Ox(N)){if(c.slice(J).search(N)){var _e,ke=ce;for(N.global||(N=jd(N.source,Sn(Ua.exec(N))+"g")),N.lastIndex=0;_e=N.exec(ke);)var Ae=_e.index;ce=ce.slice(0,Ae===n?J:Ae)}}else if(c.indexOf(Zi(N),J)!=J){var Ge=ce.lastIndexOf(N);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+A}function uq(c){return c=Sn(c),c&&l1.test(c)?c.replace(pi,d2):c}var cq=Js(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),Dx=fp("toUpperCase");function Yk(c,p,S){return c=Sn(c),p=S?n:p,p===n?Rh(c)?Ud(c):P1(c):c.match(p)||[]}var Zk=Ct(function(c,p){try{return mi(c,n,p)}catch(S){return Mx(S)?S:new _t(S)}}),dq=er(function(c,p){return Un(p,function(S){S=el(S),Uo(c,S,Ax(c[S],c))}),c});function fq(c){var p=c==null?0:c.length,S=Le();return c=p?Bn(c,function(A){if(typeof A[1]!="function")throw new vi(a);return[S(A[0]),A[1]]}):[],Ct(function(A){for(var N=-1;++NW)return[];var S=X,A=Kr(c,X);p=Le(p),c-=X;for(var N=Hd(A,p);++S0||p<0)?new Ut(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)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(X)},qo(Ut.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(B.prototype[p]=function(){var K=this.__wrapped__,J=A?[1]:arguments,ce=K instanceof Ut,_e=J[0],ke=ce||Rt(K),Ae=function(Gt){var en=N.apply(B,ya([Gt],J));return A&&Ge?en[0]:en};ke&&S&&typeof _e=="function"&&_e.length!=1&&(ce=ke=!1);var Ge=this.__chain__,ht=!!this.__actions__.length,yt=F&&!Ge,$t=ce&&!ht;if(!F&&ke){K=$t?K:new Ut(this);var bt=c.apply(K,J);return bt.__actions__.push({func:D2,args:[Ae],thisArg:n}),new Ki(bt,Ge)}return yt&&$t?c.apply(this,J):(bt=this.thru(Ae),yt?A?bt.value()[0]:bt.value():bt)})}),Un(["pop","push","shift","sort","splice","unshift"],function(c){var p=Gu[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],N)}return this[S](function(K){return p.apply(Rt(K)?K:[],N)})}}),qo(Ut.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(Za,A)||(Za[A]=[]),Za[A].push({name:p,func:S})}}),Za[cf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=zi,Ut.prototype.reverse=bi,Ut.prototype.value=x2,B.prototype.at=$U,B.prototype.chain=HU,B.prototype.commit=WU,B.prototype.next=VU,B.prototype.plant=jU,B.prototype.reverse=GU,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=qU,B.prototype.first=B.prototype.head,Xu&&(B.prototype[Xu]=UU),B},xa=go();Vt?((Vt.exports=xa)._=xa,Pt._=xa):mt._=xa}).call(gs)})(ca,ca.exports);const Ve=ca.exports;var T2e=Object.create,WF=Object.defineProperty,A2e=Object.getOwnPropertyDescriptor,I2e=Object.getOwnPropertyNames,M2e=Object.getPrototypeOf,O2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of I2e(t))!O2e.call(e,i)&&i!==n&&WF(e,i,{get:()=>t[i],enumerable:!(r=A2e(t,i))||r.enumerable});return e},VF=(e,t,n)=>(n=e!=null?T2e(M2e(e)):{},R2e(t||!e||!e.__esModule?WF(n,"default",{value:e,enumerable:!0}):n,e)),N2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),UF=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Ab=De((e,t)=>{var n=UF();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),D2e=De((e,t)=>{var n=Ab(),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}),z2e=De((e,t)=>{var n=Ab();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),B2e=De((e,t)=>{var n=Ab();function r(i){return n(this.__data__,i)>-1}t.exports=r}),F2e=De((e,t)=>{var n=Ab();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}),Ib=De((e,t)=>{var n=N2e(),r=D2e(),i=z2e(),o=B2e(),a=F2e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib();function r(){this.__data__=new n,this.size=0}t.exports=r}),H2e=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),W2e=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),V2e=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),jF=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),_u=De((e,t)=>{var n=jF(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),w_=De((e,t)=>{var n=_u(),r=n.Symbol;t.exports=r}),U2e=De((e,t)=>{var n=w_(),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}),j2e=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Mb=De((e,t)=>{var n=w_(),r=U2e(),i=j2e(),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}),GF=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),qF=De((e,t)=>{var n=Mb(),r=GF(),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}),G2e=De((e,t)=>{var n=_u(),r=n["__core-js_shared__"];t.exports=r}),q2e=De((e,t)=>{var n=G2e(),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}),KF=De((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}),K2e=De((e,t)=>{var n=qF(),r=q2e(),i=GF(),o=KF(),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}),Y2e=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),n1=De((e,t)=>{var n=K2e(),r=Y2e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),C_=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Map");t.exports=i}),Ob=De((e,t)=>{var n=n1(),r=n(Object,"create");t.exports=r}),Z2e=De((e,t)=>{var n=Ob();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),X2e=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Q2e=De((e,t)=>{var n=Ob(),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}),J2e=De((e,t)=>{var n=Ob(),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}),eye=De((e,t)=>{var n=Ob(),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}),tye=De((e,t)=>{var n=Z2e(),r=X2e(),i=Q2e(),o=J2e(),a=eye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tye(),r=Ib(),i=C_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),rye=De((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}),Rb=De((e,t)=>{var n=rye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),iye=De((e,t)=>{var n=Rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),oye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).get(i)}t.exports=r}),aye=De((e,t)=>{var n=Rb();function r(i){return n(this,i).has(i)}t.exports=r}),sye=De((e,t)=>{var n=Rb();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}),YF=De((e,t)=>{var n=nye(),r=iye(),i=oye(),o=aye(),a=sye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Ib(),r=C_(),i=YF(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Ib(),r=$2e(),i=H2e(),o=W2e(),a=V2e(),s=lye();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}),cye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),dye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),fye=De((e,t)=>{var n=YF(),r=cye(),i=dye();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}),ZF=De((e,t)=>{var n=fye(),r=hye(),i=pye(),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 L=-1,I=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++L{var n=_u(),r=n.Uint8Array;t.exports=r}),mye=De((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}),vye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),yye=De((e,t)=>{var n=w_(),r=gye(),i=UF(),o=ZF(),a=mye(),s=vye(),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]",L="[object ArrayBuffer]",I="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function D(z,$,V,Y,de,j,te){switch(V){case I:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case L:return!(z.byteLength!=$.byteLength||!j(new r(z),new r($)));case h:case g:case b:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var le=Y&l;if(ie||(ie=s),z.size!=$.size&&!le)return!1;var G=te.get(z);if(G)return G==$;Y|=u,te.set(z,$);var W=o(ie(z),ie($),Y,de,j,te);return te.delete(z),W;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=D}),bye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),xye=De((e,t)=>{var n=bye(),r=__();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Sye=De((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}),Cye=De((e,t)=>{var n=Sye(),r=wye(),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}),_ye=De((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}),kye=De((e,t)=>{var n=Mb(),r=Nb(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Eye=De((e,t)=>{var n=kye(),r=Nb(),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}),Pye=De((e,t)=>{function n(){return!1}t.exports=n}),XF=De((e,t)=>{var n=_u(),r=Pye(),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}),Lye=De((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}),Tye=De((e,t)=>{var n=Mb(),r=QF(),i=Nb(),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]",L="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",de="[object Uint32Array]",j={};j[I]=j[O]=j[R]=j[D]=j[z]=j[$]=j[V]=j[Y]=j[de]=!0,j[o]=j[a]=j[k]=j[s]=j[L]=j[l]=j[u]=j[h]=j[g]=j[m]=j[v]=j[b]=j[w]=j[E]=j[P]=!1;function te(ie){return i(ie)&&r(ie.length)&&!!j[n(ie)]}t.exports=te}),Aye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Iye=De((e,t)=>{var n=jF(),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}),JF=De((e,t)=>{var n=Tye(),r=Aye(),i=Iye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Mye=De((e,t)=>{var n=_ye(),r=Eye(),i=__(),o=XF(),a=Lye(),s=JF(),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):[],L=k.length;for(var I in g)(m||u.call(g,I))&&!(P&&(I=="length"||w&&(I=="offset"||I=="parent")||E&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||a(I,L)))&&k.push(I);return k}t.exports=h}),Oye=De((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}),Rye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Nye=De((e,t)=>{var n=Rye(),r=n(Object.keys,Object);t.exports=r}),Dye=De((e,t)=>{var n=Oye(),r=Nye(),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}),zye=De((e,t)=>{var n=qF(),r=QF();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Bye=De((e,t)=>{var n=Mye(),r=Dye(),i=zye();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Fye=De((e,t)=>{var n=xye(),r=Cye(),i=Bye();function o(a){return n(a,i,r)}t.exports=o}),$ye=De((e,t)=>{var n=Fye(),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 L=b[k];if(!(v?L in l:o.call(l,L)))return!1}var I=m.get(s),O=m.get(l);if(I&&O)return I==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var D=v;++k{var n=n1(),r=_u(),i=n(r,"DataView");t.exports=i}),Wye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Promise");t.exports=i}),Vye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"Set");t.exports=i}),Uye=De((e,t)=>{var n=n1(),r=_u(),i=n(r,"WeakMap");t.exports=i}),jye=De((e,t)=>{var n=Hye(),r=C_(),i=Wye(),o=Vye(),a=Uye(),s=Mb(),l=KF(),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),L=l(a),I=s;(n&&I(new n(new ArrayBuffer(1)))!=b||r&&I(new r)!=u||i&&I(i.resolve())!=g||o&&I(new o)!=m||a&&I(new a)!=v)&&(I=function(O){var R=s(O),D=R==h?O.constructor:void 0,z=D?l(D):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case L:return v}return R}),t.exports=I}),Gye=De((e,t)=>{var n=uye(),r=ZF(),i=yye(),o=$ye(),a=jye(),s=__(),l=XF(),u=JF(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,L,I,O,R){var D=s(P),z=s(k),$=D?m:a(P),V=z?m:a(k);$=$==g?v:$,V=V==g?v:V;var Y=$==v,de=V==v,j=$==V;if(j&&l(P)){if(!l(k))return!1;D=!0,Y=!1}if(j&&!Y)return R||(R=new n),D||u(P)?r(P,k,L,I,O,R):i(P,k,$,L,I,O,R);if(!(L&h)){var te=Y&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(te||ie){var le=te?P.value():P,G=ie?k.value():k;return R||(R=new n),O(le,G,L,I,R)}}return j?(R||(R=new n),o(P,k,L,I,O,R)):!1}t.exports=E}),qye=De((e,t)=>{var n=Gye(),r=Nb();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}),e$=De((e,t)=>{var n=qye();function r(i,o){return n(i,o)}t.exports=r}),Kye=["ctrl","shift","alt","meta","mod"],Yye={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function u6(e,t=","){return typeof e=="string"?e.split(t):e}function Am(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Yye[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=>!Kye.includes(o));return{...r,keys:i}}function Zye(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xye(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qye(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 Jye(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 e3e=(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},t3e=C.exports.createContext(void 0),n3e=()=>C.exports.useContext(t3e),r3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),i3e=()=>C.exports.useContext(r3e),o3e=VF(e$());function a3e(e){let t=C.exports.useRef(void 0);return(0,o3e.default)(t.current,e)||(t.current=e),t.current}var xA=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=a3e(a),{enabledScopes:h}=i3e(),g=n3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Jye(h,u?.scopes))return;let m=w=>{if(!(Qye(w)&&!t$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){xA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||u6(e,u?.splitKey).forEach(E=>{let P=Am(E,u?.combinationKey);if(e3e(w,P,o)||P.keys?.includes("*")){if(Zye(w,P,u?.preventDefault),!Xye(w,P,u?.enabled)){xA(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&&u6(e,u?.splitKey).forEach(w=>g.addHotkey(Am(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&u6(e,u?.splitKey).forEach(w=>g.removeHotkey(Am(w,u?.combinationKey)))}},[e,l,u,h]),i}VF(e$());var $9=new Set;function s3e(e){(Array.isArray(e)?e:[e]).forEach(t=>$9.add(Am(t)))}function l3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Am(t);for(let r of $9)r.keys?.every(i=>n.keys?.includes(i))&&$9.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{s3e(e.key)}),document.addEventListener("keyup",e=>{l3e(e.key)})});function u3e(){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 c3e=()=>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 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."})]}),d3e=st({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"})})}),f3e=st({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.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.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"})}),h3e=st({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"})}),p3e=st({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.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.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.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.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.12ZM2782.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.4ZM761.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.98ZM804.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.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,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.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"})}),g3e=st({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"})}),m3e=st({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 Xr=(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))(Xr||{});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"}},_s=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(vd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(oh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(o_,{className:"invokeai__switch-root",...s})]})})};function Db(){const e=Ce(i=>i.system.isGFPGANAvailable),t=Ce(i=>i.options.shouldRunFacetool),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(f7e(i.target.checked))})]})}const SA=/^-?(0\.)?\.?$/,$a=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,...L}=e,[I,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!I.match(SA)&&u!==Number(I)&&O(String(u))},[u,I]);const R=z=>{O(z),z.match(SA)||h(v?Math.floor(Number(z)):Number(z))},D=z=>{const $=Ve.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String($)),h($)};return x(Ui,{...k,children:ee(vd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(oh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(Y7,{className:"invokeai__number-input-root",value:I,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...L,children:[x(Z7,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(Q7,{...P,className:"invokeai__number-input-stepper-button"}),x(X7,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},dh=e=>{const{label:t,isDisabled:n,validValues:r,size:i="sm",fontSize:o="md",styleClass:a,...s}=e;return ee(vd,{isDisabled:n,className:`invokeai__select ${a}`,onClick:l=>{l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.nativeEvent.stopPropagation(),l.nativeEvent.cancelBubble=!0},children:[t&&x(oh,{className:"invokeai__select-label",fontSize:o,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(UB,{className:"invokeai__select-picker",fontSize:o,size:i,...s,children:r.map(l=>typeof l=="string"||typeof l=="number"?x("option",{value:l,className:"invokeai__select-option",children:l},l):x("option",{value:l.value,className:"invokeai__select-option",children:l.key},l.value))})]})},y3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],b3e=[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],x3e=[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],S3e=[{key:"2x",value:2},{key:"4x",value:4}],k_=0,E_=4294967295,w3e=["gfpgan","codeformer"],C3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],_3e=Qe(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),k3e=Qe(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Yv=()=>{const e=$e(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ce(_3e),{isGFPGANAvailable:i}=Ce(k3e),o=l=>e(D3(l)),a=l=>e($W(l)),s=l=>e(z3(l.target.value));return ee(on,{direction:"column",gap:2,children:[x(dh,{label:"Type",validValues:w3e.concat(),value:n,onChange:s}),x($a,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x($a,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function E3e(){const e=$e(),t=Ce(r=>r.options.shouldFitToWidthHeight);return x(_s,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HW(r.target.checked))})}var n$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wA=re.createContext&&re.createContext(n$),ed=globalThis&&globalThis.__assign||function(){return ed=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(Ui,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{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 fh(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:L,isResetDisabled:I,isSliderDisabled:O,isInputDisabled:R,styleClass:D,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:V,sliderTrackProps:Y,sliderThumbProps:de,sliderNumberInputProps:j,sliderNumberInputFieldProps:te,sliderNumberInputStepperProps:ie,sliderTooltipProps:le,sliderIAIIconButtonProps:G,...W}=e,[q,Q]=C.exports.useState(String(i));C.exports.useEffect(()=>{String(i)!==q&&q!==""&&Q(String(i))},[i,q,Q]);const X=Se=>{const He=Ve.clamp(b?Math.floor(Number(Se.target.value)):Number(Se.target.value),o,a);Q(String(He)),l(He)},me=Se=>{Q(Se),l(Number(Se))},ye=()=>{!L||L()};return ee(vd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...z,children:[x(oh,{className:"invokeai__slider-component-label",...$,children:r}),ee(xz,{w:"100%",gap:2,children:[ee(i_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...W,children:[h&&ee(Hn,{children:[x(A9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...V,children:o}),x(A9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...V,children:a})]}),x(tF,{className:"invokeai__slider_track",...Y,children:x(nF,{className:"invokeai__slider_track-filled"})}),x(Ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...le,children:x(eF,{className:"invokeai__slider-thumb",...de})})]}),v&&ee(Y7,{min:o,max:a,step:s,value:q,onChange:me,onBlur:X,className:"invokeai__slider-number-field",isDisabled:R,...j,children:[x(Z7,{className:"invokeai__slider-number-input",width:w,readOnly:E,...te}),ee(zB,{...ie,children:[x(Q7,{className:"invokeai__slider-number-stepper"}),x(X7,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(P_,{}),onClick:ye,isDisabled:I,...G})]})]})}function L_(e){const{label:t="Strength",styleClass:n}=e,r=Ce(s=>s.options.img2imgStrength),i=$e();return x(fh,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(p8(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(p8(.5))}})}const a$=()=>x(yd,{flex:"1",textAlign:"left",children:"Other Options"}),R3e=()=>{const e=$e(),t=Ce(r=>r.options.hiresFix);return x(on,{gap:2,direction:"column",children:x(_s,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(FW(r.target.checked))})})},N3e=()=>{const e=$e(),t=Ce(r=>r.options.seamless);return x(on,{gap:2,direction:"column",children:x(_s,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(BW(r.target.checked))})})},s$=()=>ee(on,{gap:2,direction:"column",children:[x(N3e,{}),x(R3e,{})]}),zb=()=>x(yd,{flex:"1",textAlign:"left",children:"Seed"});function D3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(_s,{label:"Randomize Seed",isChecked:t,onChange:r=>e(p7e(r.target.checked))})}function z3e(){const e=Ce(o=>o.options.seed),t=Ce(o=>o.options.shouldRandomizeSeed),n=Ce(o=>o.options.shouldGenerateVariations),r=$e(),i=o=>r(t2(o));return x($a,{label:"Seed",step:1,precision:0,flexGrow:1,min:k_,max:E_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const l$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function B3e(){const e=$e(),t=Ce(r=>r.options.shouldRandomizeSeed);return x(Ra,{size:"sm",isDisabled:t,onClick:()=>e(t2(l$(k_,E_))),children:x("p",{children:"Shuffle"})})}function F3e(){const e=$e(),t=Ce(r=>r.options.threshold);return x($a,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(s7e(r)),value:t,isInteger:!1})}function $3e(){const e=$e(),t=Ce(r=>r.options.perlin);return x($a,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(l7e(r)),value:t,isInteger:!1})}const Bb=()=>ee(on,{gap:2,direction:"column",children:[x(D3e,{}),ee(on,{gap:2,children:[x(z3e,{}),x(B3e,{})]}),x(on,{gap:2,children:x(F3e,{})}),x(on,{gap:2,children:x($3e,{})})]});function Fb(){const e=Ce(i=>i.system.isESRGANAvailable),t=Ce(i=>i.options.shouldRunESRGAN),n=$e();return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(_s,{isDisabled:!e,isChecked:t,onChange:i=>n(h7e(i.target.checked))})]})}const H3e=Qe(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),W3e=Qe(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),Zv=()=>{const e=$e(),{upscalingLevel:t,upscalingStrength:n}=Ce(H3e),{isESRGANAvailable:r}=Ce(W3e);return ee("div",{className:"upscale-options",children:[x(dh,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(g8(Number(a.target.value))),validValues:S3e}),x($a,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(m8(a)),value:n,isInteger:!1})]})};function V3e(){const e=Ce(r=>r.options.shouldGenerateVariations),t=$e();return x(_s,{isChecked:e,width:"auto",onChange:r=>t(u7e(r.target.checked))})}function $b(){return ee(on,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(V3e,{})]})}function U3e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(vd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(oh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(S7,{...s,className:"input-entry",size:"sm",width:o})]})}function j3e(){const e=Ce(i=>i.options.seedWeights),t=Ce(i=>i.options.shouldGenerateVariations),n=$e(),r=i=>n(WW(i.target.value));return x(U3e,{label:"Seed Weights",value:e,isInvalid:t&&!(S_(e)||e===""),isDisabled:!t,onChange:r})}function G3e(){const e=Ce(i=>i.options.variationAmount),t=Ce(i=>i.options.shouldGenerateVariations),n=$e();return x($a,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(c7e(i)),isInteger:!1})}const Hb=()=>ee(on,{gap:2,direction:"column",children:[x(G3e,{}),x(j3e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(nz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Wb(){const e=Ce(r=>r.options.showAdvancedOptions),t=$e();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(g7e(r.target.checked)),isChecked:e})}function q3e(){const e=$e(),t=Ce(r=>r.options.cfgScale);return x($a,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(RW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const vn=Qe(e=>e.options,e=>dx[e.activeTab],{memoizeOptions:{equalityCheck:Ve.isEqual}}),K3e=Qe(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function Y3e(){const e=Ce(i=>i.options.height),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Height",value:e,flexGrow:1,onChange:i=>n(NW(Number(i.target.value))),validValues:x3e,styleClass:"main-option-block"})}const Z3e=Qe([e=>e.options,K3e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function X3e(){const e=$e(),{iterations:t,mayGenerateMultipleImages:n}=Ce(Z3e);return x($a,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(a7e(i)),value:t,width:T_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q3e(){const e=Ce(r=>r.options.sampler),t=$e();return x(dh,{label:"Sampler",value:e,onChange:r=>t(zW(r.target.value)),validValues:y3e,styleClass:"main-option-block"})}function J3e(){const e=$e(),t=Ce(r=>r.options.steps);return x($a,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(OW(r)),value:t,width:T_,styleClass:"main-option-block",textAlign:"center"})}function e4e(){const e=Ce(i=>i.options.width),t=Ce(vn),n=$e();return x(dh,{isDisabled:t==="inpainting",label:"Width",value:e,flexGrow:1,onChange:i=>n(DW(Number(i.target.value))),validValues:b3e,styleClass:"main-option-block"})}const T_="auto";function Vb(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(X3e,{}),x(J3e,{}),x(q3e,{})]}),ee("div",{className:"main-options-row",children:[x(e4e,{}),x(Y3e,{}),x(Q3e,{})]})]})})}const t4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1},u$=yb({name:"system",initialState:t4e,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"},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}}}),{setShouldDisplayInProgressType:n4e,setIsProcessing:y0,addLogEntry:Ei,setShouldShowLogViewer:c6,setIsConnected:CA,setSocketId:iEe,setShouldConfirmOnDelete:c$,setOpenAccordions:r4e,setSystemStatus:i4e,setCurrentStatus:d6,setSystemConfig:o4e,setShouldDisplayGuides:a4e,processingCanceled:s4e,errorOccurred:H9,errorSeen:d$,setModelList:_A,setIsCancelable:kA,modelChangeRequested:l4e,setSaveIntermediatesInterval:u4e,setEnableImageDebugging:c4e}=u$.actions,d4e=u$.reducer;function f4e(e){return lt({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 h4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 4.81V19c-3.31 0-6-2.63-6-5.87 0-1.56.62-3.03 1.75-4.14L12 4.81M6.35 7.56C4.9 8.99 4 10.96 4 13.13 4 17.48 7.58 21 12 21s8-3.52 8-7.87c0-2.17-.9-4.14-2.35-5.57L12 2 6.35 7.56z"}}]})(e)}function p4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.19 21.19L2.81 2.81 1.39 4.22l4.2 4.2a7.73 7.73 0 00-1.6 4.7C4 17.48 7.58 21 12 21c1.75 0 3.36-.56 4.67-1.5l3.1 3.1 1.42-1.41zM12 19c-3.31 0-6-2.63-6-5.87 0-1.19.36-2.32 1.02-3.28L12 14.83V19zM8.38 5.56L12 2l5.65 5.56C19.1 8.99 20 10.96 20 13.13c0 1.18-.27 2.29-.74 3.3L12 9.17V4.81L9.8 6.97 8.38 5.56z"}}]})(e)}function g4e(e){return lt({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 f$(e){return lt({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 m4e(e){return lt({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 v4e(e){return lt({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 y4e=Qe(e=>e.system,e=>e.shouldDisplayGuides),b4e=({children:e,feature:t})=>{const n=Ce(y4e),{text:r}=v3e[t];return n?ee(J7,{trigger:"hover",children:[x(n_,{children:x(yd,{children:e})}),ee(t_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(e_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x4e=Pe(({feature:e,icon:t=f4e},n)=>x(b4e,{feature:e,children:x(yd,{ref:n,children:x(pa,{as:t})})}));function S4e(e){const{header:t,feature:n,options:r}=e;return ee(Nc,{className:"advanced-settings-item",children:[x("h2",{children:ee(Oc,{className:"advanced-settings-header",children:[t,x(x4e,{feature:n}),x(Rc,{})]})}),x(Dc,{className:"advanced-settings-panel",children:r})]})}const Ub=e=>{const{accordionInfo:t}=e,n=Ce(a=>a.system.openAccordions),r=$e();return x(ib,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(S4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function w4e(e){return lt({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 C4e(e){return lt({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 _4e(e){return lt({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 h$(e){return lt({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 p$(e){return lt({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 k4e(e){return lt({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 E4e(e){return lt({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 P4e(e){return lt({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 L4e(e){return lt({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 T4e(e){return lt({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 g$(e){return lt({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 m$(e){return lt({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 A_(e){return lt({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 v$(e){return lt({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 y$(e){return lt({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 A4e(e){return lt({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 I4e(e){return lt({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 lt({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 O4e(e){return lt({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 R4e(e){return lt({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 N4e(e){return lt({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 D4e(e){return lt({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 z4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}}]})(e)}function B4e(e){return lt({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 F4e(e){return lt({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 b$(e){return lt({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 $4e(e){return lt({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 H4e(e){return lt({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 W4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V4e(e){return lt({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 U4e(e){return lt({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 j4e(e){return lt({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 G4e(e){return lt({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 q4e(e){return lt({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 K4e(e){return lt({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 f6(e){return lt({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 Y4e(e){return lt({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 I_(e){return lt({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 Z4e(e){return lt({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 X4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"}}]})(e)}function M_(e){return lt({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 lt({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 J4e(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"}}]})(e)}function O_(e){return lt({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)}let Ay;const e5e=new Uint8Array(16);function t5e(){if(!Ay&&(Ay=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ay))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ay(e5e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function n5e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const r5e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),EA={randomUUID:r5e};function Ap(e,t,n){if(EA.randomUUID&&!t&&!e)return EA.randomUUID();e=e||{};const r=e.random||(e.rng||t5e)();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 n5e(r)}const cs=(e,t)=>Math.floor(e/t)*t,Iy=(e,t)=>Math.round(e/t)*t,jb=e=>e.kind==="line"&&e.layer==="mask",i5e=e=>e.kind==="line"&&e.layer==="base",x$=e=>e.kind==="image"&&e.layer==="base",o5e=e=>e.kind==="line",Ip={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},PA={tool:"brush",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,maskColor:{r:255,g:90,b:90,a:1},eraserSize:50,stageDimensions:{width:0,height:0},stageCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxCoordinates:{x:0,y:0},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},shouldShowBoundingBox:!0,shouldDarkenOutsideBoundingBox:!1,cursorPosition:null,isMaskEnabled:!0,shouldPreserveMaskedArea:!1,shouldShowCheckboardTransparency:!1,shouldShowBrush:!0,shouldShowBrushPreview:!1,isDrawing:!1,isTransformingBoundingBox:!1,isMouseOverBoundingBox:!1,isMovingBoundingBox:!1,stageScale:1,shouldUseInpaintReplace:!1,inpaintReplace:.1,shouldLockBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,shouldShowIntermediates:!0,isMovingStage:!1,maxHistory:128,layerState:Ip,futureLayerStates:[],pastLayerStates:[]},a5e={currentCanvas:"inpainting",doesCanvasNeedScaling:!1,inpainting:{layer:"mask",...PA},outpainting:{layer:"base",shouldShowGrid:!0,shouldSnapToGrid:!0,shouldAutoSave:!1,...PA}},S$=yb({name:"canvas",initialState:a5e,reducers:{setTool:(e,t)=>{const n=t.payload;e[e.currentCanvas].tool=t.payload,n!=="move"&&(e[e.currentCanvas].isTransformingBoundingBox=!1,e[e.currentCanvas].isMouseOverBoundingBox=!1,e[e.currentCanvas].isMovingBoundingBox=!1,e[e.currentCanvas].isMovingStage=!1)},setLayer:(e,t)=>{e[e.currentCanvas].layer=t.payload},toggleTool:e=>{const t=e[e.currentCanvas].tool;t!=="move"&&(e[e.currentCanvas].tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e[e.currentCanvas].maskColor=t.payload},setBrushColor:(e,t)=>{e[e.currentCanvas].brushColor=t.payload},setBrushSize:(e,t)=>{e[e.currentCanvas].brushSize=t.payload},setEraserSize:(e,t)=>{e[e.currentCanvas].eraserSize=t.payload},clearMask:e=>{const t=e[e.currentCanvas];t.pastLayerStates.push(t.layerState),t.layerState.objects=e[e.currentCanvas].layerState.objects.filter(n=>!jb(n)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e[e.currentCanvas].shouldPreserveMaskedArea=!e[e.currentCanvas].shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e[e.currentCanvas].isMaskEnabled=!e[e.currentCanvas].isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e[e.currentCanvas].shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e[e.currentCanvas].isMaskEnabled=t.payload,e[e.currentCanvas].layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e[e.currentCanvas].shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e[e.currentCanvas].shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e[e.currentCanvas].shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e[e.currentCanvas].cursorPosition=t.payload},clearImageToInpaint:e=>{},setImageToOutpaint:(e,t)=>{const{width:n,height:r}=e.outpainting.stageDimensions,{width:i,height:o}=e.outpainting.boundingBoxDimensions,{x:a,y:s}=e.outpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.outpainting.boundingBoxDimensions=g,e.outpainting.boundingBoxCoordinates=h,e.outpainting.pastLayerStates.push(e.outpainting.layerState),e.outpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setImageToInpaint:(e,t)=>{const{width:n,height:r}=e.inpainting.stageDimensions,{width:i,height:o}=e.inpainting.boundingBoxDimensions,{x:a,y:s}=e.inpainting.boundingBoxCoordinates,l=Math.min(t.payload.width,n),u=Math.min(t.payload.height,r),h={x:a,y:s},g={width:i,height:o};i+a>l&&(i>l&&(g.width=cs(l,64)),h.x=l-g.width),o+s>u&&(o>u&&(g.height=cs(u,64)),h.y=u-g.height),e.inpainting.boundingBoxDimensions=g,e.inpainting.boundingBoxCoordinates=h,e.inpainting.pastLayerStates.push(e.inpainting.layerState),e.inpainting.layerState={...Ip,objects:[{kind:"image",layer:"base",x:0,y:0,image:t.payload}]},e.outpainting.futureLayerStates=[],e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e[e.currentCanvas].stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e[e.currentCanvas].boundingBoxDimensions,a=cs(Ve.clamp(i,64,n/e[e.currentCanvas].stageScale),64),s=cs(Ve.clamp(o,64,r/e[e.currentCanvas].stageScale),64);e[e.currentCanvas].boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{const n=e[e.currentCanvas];n.boundingBoxDimensions=t.payload;const{width:r,height:i}=t.payload,{x:o,y:a}=n.boundingBoxCoordinates,{width:s,height:l}=n.stageDimensions,u=s/n.stageScale,h=l/n.stageScale,g=cs(u,64),m=cs(h,64),v=cs(r,64),b=cs(i,64),w=o+r-u,E=a+i-h,P=Ve.clamp(v,64,g),k=Ve.clamp(b,64,m),L=w>0?o-w:o,I=E>0?a-E:a,O=Ve.clamp(L,n.stageCoordinates.x,g-P),R=Ve.clamp(I,n.stageCoordinates.y,m-k);n.boundingBoxDimensions={width:P,height:k},n.boundingBoxCoordinates={x:O,y:R}},setBoundingBoxCoordinates:(e,t)=>{e[e.currentCanvas].boundingBoxCoordinates=t.payload},setStageCoordinates:(e,t)=>{e[e.currentCanvas].stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e[e.currentCanvas].boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e[e.currentCanvas].stageScale=t.payload,e.doesCanvasNeedScaling=!1},setShouldDarkenOutsideBoundingBox:(e,t)=>{e[e.currentCanvas].shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e[e.currentCanvas].isDrawing=t.payload},setClearBrushHistory:e=>{e[e.currentCanvas].pastLayerStates=[],e[e.currentCanvas].futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e[e.currentCanvas].shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e[e.currentCanvas].inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e[e.currentCanvas].shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e[e.currentCanvas].shouldLockBoundingBox=!e[e.currentCanvas].shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e[e.currentCanvas].shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e[e.currentCanvas].isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e[e.currentCanvas].isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e[e.currentCanvas].isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e[e.currentCanvas].isMoveStageKeyHeld=t.payload},setCurrentCanvas:(e,t)=>{e.currentCanvas=t.payload},addImageToOutpainting:(e,t)=>{const{boundingBox:n,image:r}=t.payload;if(!n||!r)return;const{x:i,y:o}=n,a=e.outpainting;a.pastLayerStates.push(Ve.cloneDeep(a.layerState)),a.pastLayerStates.length>a.maxHistory&&a.pastLayerStates.shift(),a.layerState.stagingArea.images.push({kind:"image",layer:"base",x:i,y:o,image:r}),a.layerState.stagingArea.selectedImageIndex=a.layerState.stagingArea.images.length-1,a.futureLayerStates=[]},discardStagedImages:e=>{const t=e[e.currentCanvas];t.layerState.stagingArea={...Ip.stagingArea}},addLine:(e,t)=>{const n=e[e.currentCanvas],{tool:r,layer:i,brushColor:o,brushSize:a,eraserSize:s}=n;if(r==="move")return;const l=r==="brush"?a/2:s/2,u=i==="base"&&r==="brush"?{color:o}:{};n.pastLayerStates.push(n.layerState),n.pastLayerStates.length>n.maxHistory&&n.pastLayerStates.shift(),n.layerState.objects.push({kind:"line",layer:i,tool:r,strokeWidth:l,points:t.payload,...u}),n.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e[e.currentCanvas].layerState.objects.findLast(o5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e[e.currentCanvas],n=t.pastLayerStates.pop();!n||(t.futureLayerStates.unshift(t.layerState),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=n)},redo:e=>{const t=e[e.currentCanvas],n=t.futureLayerStates.shift();!n||(t.pastLayerStates.push(t.layerState),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=n)},setShouldShowGrid:(e,t)=>{e.outpainting.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e[e.currentCanvas].isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.outpainting.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.outpainting.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e[e.currentCanvas].shouldShowIntermediates=t.payload},resetCanvas:e=>{e[e.currentCanvas].pastLayerStates.push(e[e.currentCanvas].layerState),e[e.currentCanvas].layerState=Ip,e[e.currentCanvas].futureLayerStates=[]},nextStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex,n=e.outpainting.layerState.stagingArea.images.length;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.outpainting.layerState.stagingArea.selectedImageIndex;e.outpainting.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const t=e[e.currentCanvas],{images:n,selectedImageIndex:r}=t.layerState.stagingArea;t.pastLayerStates.push(Ve.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const{x:i,y:o,image:a}=n[r];t.layerState.objects.push({kind:"image",layer:"base",x:i,y:o,image:a}),t.layerState.stagingArea={...Ip.stagingArea},t.futureLayerStates=[]}},extraReducers:e=>{e.addCase(D$.fulfilled,(t,n)=>{!n.payload||(t.outpainting.pastLayerStates.push({...t.outpainting.layerState}),t.outpainting.futureLayerStates=[],t.outpainting.layerState.objects=[{kind:"image",layer:"base",...n.payload}])})}}),{setTool:ud,setLayer:s5e,setBrushColor:l5e,setBrushSize:w$,setEraserSize:u5e,addLine:C$,addPointToCurrentLine:_$,setShouldPreserveMaskedArea:k$,setIsMaskEnabled:E$,setShouldShowCheckboardTransparency:oEe,setShouldShowBrushPreview:h6,setMaskColor:P$,clearMask:L$,clearImageToInpaint:aEe,undo:c5e,redo:d5e,setCursorPosition:T$,setStageDimensions:LA,setImageToInpaint:Y4,setImageToOutpaint:A$,setBoundingBoxDimensions:Qg,setBoundingBoxCoordinates:p6,setBoundingBoxPreviewFill:sEe,setDoesCanvasNeedScaling:Cr,setStageScale:I$,toggleTool:lEe,setShouldShowBoundingBox:R_,setShouldDarkenOutsideBoundingBox:M$,setIsDrawing:Gb,setShouldShowBrush:uEe,setClearBrushHistory:f5e,setShouldUseInpaintReplace:h5e,setInpaintReplace:TA,setShouldLockBoundingBox:O$,toggleShouldLockBoundingBox:p5e,setIsMovingBoundingBox:AA,setIsTransformingBoundingBox:g6,setIsMouseOverBoundingBox:My,setIsMoveBoundingBoxKeyHeld:cEe,setIsMoveStageKeyHeld:dEe,setStageCoordinates:R$,setCurrentCanvas:N$,addImageToOutpainting:g5e,resetCanvas:m5e,setShouldShowGrid:v5e,setShouldSnapToGrid:y5e,setShouldAutoSave:b5e,setShouldShowIntermediates:x5e,setIsMovingStage:Z4,nextStagingAreaImage:S5e,prevStagingAreaImage:w5e,commitStagingAreaImage:C5e,discardStagedImages:_5e}=S$.actions,k5e=S$.reducer,D$=fve("canvas/uploadOutpaintingMergedImage",async(e,t)=>{const{getState:n}=t,i=n().canvas.outpainting.stageScale;if(!e.current)return;const o=e.current.scale(),{x:a,y:s}=e.current.getClientRect({relativeTo:e.current.getParent()});e.current.scale({x:1/i,y:1/i});const l=e.current.getClientRect(),u=e.current.toDataURL(l);if(e.current.scale(o),!u)return;const g=await(await fetch(window.location.origin+"/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataURL:u,name:"outpaintingmerge.png"})})).json(),{destination:m,...v}=g;return{image:{uuid:Ap(),...v},x:a,y:s}}),jt=e=>e.canvas[e.canvas.currentCanvas],ku=e=>e.canvas[e.canvas.currentCanvas].layerState.stagingArea.images.length>0,qb=e=>e.canvas.outpainting,Xv=Qe([jt],e=>e.layerState.objects.find(x$)),z$=Qe([e=>e.options,e=>e.system,Xv,vn],(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")),r==="inpainting"&&!n&&(g=!1,m.push("No inpainting image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(S_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ve.isEqual,resultEqualityCheck:Ve.isEqual}}),W9=Jr("socketio/generateImage"),E5e=Jr("socketio/runESRGAN"),P5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),V9=Jr("socketio/requestImages"),IA=Jr("socketio/requestNewImages"),T5e=Jr("socketio/cancelProcessing"),MA=Jr("socketio/uploadImage");Jr("socketio/uploadMaskImage");const A5e=Jr("socketio/requestSystemConfig"),I5e=Jr("socketio/requestModelChange"),ul=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Ui,{label:r,...i,children:x(Ra,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),ks=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(J7,{...o,children:[x(n_,{children:t}),ee(t_,{className:`invokeai__popover-content ${r}`,children:[i&&x(e_,{className:"invokeai__popover-arrow"}),n]})]})};function B$(e){const{iconButton:t=!1,...n}=e,r=$e(),{isReady:i,reasonsWhyNotReady:o}=Ce(z$),a=Ce(vn),s=()=>{r(W9(a))};vt(["ctrl+enter","meta+enter"],()=>{i&&r(W9(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(pt,{"aria-label":"Invoke",type:"submit",icon:x(H4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ul,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(ks,{trigger:"hover",triggerComponent:l,children:o&&x(mz,{children:o.map((u,h)=>x(vz,{children:u},h))})})}const M5e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function F$(e){const{...t}=e,n=$e(),{isProcessing:r,isConnected:i,isCancelable:o}=Ce(M5e),a=()=>n(T5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(pt,{icon:x(v4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const O5e=Qe(e=>e.options,e=>e.shouldLoopback),$$=()=>{const e=$e(),t=Ce(O5e);return x(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(U4e,{}),onClick:()=>{e(w7e(!t))}})},Kb=()=>ee("div",{className:"process-buttons",children:[x(B$,{}),x($$,{}),x(F$,{})]}),R5e=Qe([e=>e.options,vn],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Yb=()=>{const e=$e(),{prompt:t,activeTabName:n}=Ce(R5e),{isReady:r}=Ce(z$),i=C.exports.useRef(null),o=s=>{e(fx(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(W9(n)))};return x("div",{className:"prompt-bar",children:x(vd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(cF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function H$(e){return lt({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 W$(e){return lt({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 N5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function D5e(e,t){e.classList?e.classList.add(t):N5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function OA(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function z5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=OA(e.className,t):e.setAttribute("class",OA(e.className&&e.className.baseVal||"",t))}const RA={disabled:!1},V$=re.createContext(null);var U$=function(t){return t.scrollTop},Jg="unmounted",wf="exited",Cf="entering",Mp="entered",U9="exiting",Eu=function(e){D7(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=wf,o.appearStatus=Cf):l=Mp:r.unmountOnExit||r.mountOnEnter?l=Jg:l=wf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Jg?{status:wf}: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!==Cf&&a!==Mp&&(o=Cf):(a===Cf||a===Mp)&&(o=U9)}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===Cf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:sy.findDOMNode(this);a&&U$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wf&&this.setState({status:Jg})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[sy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||RA.disabled){this.safeSetState({status:Mp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Cf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Mp},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:sy.findDOMNode(this);if(!o||RA.disabled){this.safeSetState({status:wf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:U9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wf},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:sy.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===Jg)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=O7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(V$.Provider,{value:null,children:typeof a=="function"?a(i,s):re.cloneElement(re.Children.only(a),s)})},t}(re.Component);Eu.contextType=V$;Eu.propTypes={};function kp(){}Eu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Eu.UNMOUNTED=Jg;Eu.EXITED=wf;Eu.ENTERING=Cf;Eu.ENTERED=Mp;Eu.EXITING=U9;const B5e=Eu;var F5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return D5e(t,r)})},m6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},N_=function(e){D7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a{C.exports.useEffect(()=>{function r(i){e.current&&!e.current.contains(i.target)&&t()}return n&&document.addEventListener("mousedown",r),()=>{n&&document.removeEventListener("mousedown",r)}},[e,n,t])},q$=""+new URL("logo.13003d72.png",import.meta.url).href,$5e=Qe(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:Ve.isEqual}}),Zb=e=>{const t=$e(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ce($5e),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(C0(!n)),i&&setTimeout(()=>t(Cr(!0)),400)},[n,i]),vt("esc",()=>{i||(t(C0(!1)),t(Cr(!0)))},[i]),vt("shift+o",()=>{m(),t(Cr(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(x7e(a.current?a.current.scrollTop:0)),t(C0(!1)),t(S7e(!1)))},[t,i]);G$(o,u,!i);const h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(b7e(!i)),t(Cr(!0))};return x(j$,{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,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(Ui,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(H$,{}):x(W$,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function H5e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(E3e,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const D_=C.exports.createContext(null),K$=e=>{const{styleClass:t}=e,n=C.exports.useContext(D_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(M_,{}),x(Wf,{size:"lg",children:"Click or Drag and Drop"})]})})},W5e=Qe(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),j9=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=N4(),a=$e(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ce(W5e),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(c$(!b.target.checked));return ee(Hn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(g1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(bv,{children:ee(m1e,{children:[x(q7,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(F4,{children:ee(on,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(vd,{children:ee(on,{alignItems:"center",children:[x(oh,{mb:0,children:"Don't ask me again"}),x(o_,{checked:!s,onChange:v})]})})]})}),ee(G7,{children:[x(Ra,{ref:h,onClick:o,children:"Cancel"}),x(Ra,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),V5e=Qe([e=>e.system,e=>e.options,e=>e.gallery,vn],(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:ca.exports.isEqual}}),Y$=()=>{const e=$e(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h}=Ce(V5e),g=ch(),m=()=>{!u||(h&&e(_l(!1)),e(_v(u)),e(_o("img2img")))},v=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(m(),g({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):g({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const b=()=>{!u||u.metadata&&e(d7e(u.metadata))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(b(),g({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):g({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{u?.metadata&&e(t2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(w(),g({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):g({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(fx(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),g({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):g({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u&&e(E5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?P():g({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const k=()=>{u&&e(P5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?k():g({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const L=()=>e(VW(!l)),I=()=>{!u||(h&&e(_l(!1)),e(Y4(u)),e(_o("inpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))},O=()=>{!u||(h&&e(_l(!1)),e(A$(u)),e(_o("outpainting")),e(Cr(!0)),g({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?L():g({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ro,{isAttached:!0,children:x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Send to...",icon:x(K4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ul,{size:"sm",onClick:m,leftIcon:x(f6,{}),children:"Send to Image to Image"}),x(ul,{size:"sm",onClick:I,leftIcon:x(f6,{}),children:"Send to Inpainting"}),x(ul,{size:"sm",onClick:O,leftIcon:x(f6,{}),children:"Send to Outpainting"}),x(ul,{size:"sm",onClick:v,leftIcon:x(A_,{}),children:"Copy Link to Image"}),x(ul,{leftIcon:x(v$,{}),size:"sm",children:x(Vf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ro,{isAttached:!0,children:[x(pt,{icon:x(V4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(pt,{icon:x(q4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:w}),x(pt,{icon:x(L4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:b})]}),ee(ro,{isAttached:!0,children:[x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(O4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Yv,{}),x(ul,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:k,children:"Restore Faces"})]})}),x(ks,{trigger:"hover",triggerComponent:x(pt,{icon:x(A4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Zv,{}),x(ul,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:P,children:"Upscale Image"})]})})]}),x(pt,{icon:x(m$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:L}),x(j9,{image:u,children:x(pt,{icon:x(I_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,className:"delete-image-btn"})})]})},U5e={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},Z$=yb({name:"gallery",initialState:U5e,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=ca.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(Ve.inRange(r,0,n.length)){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(Ve.inRange(r,1,n.length+1)){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:Oy,clearIntermediateImage:NA,removeImage:X$,setCurrentImage:Q$,addGalleryImages:j5e,setIntermediateImage:G5e,selectNextImage:z_,selectPrevImage:B_,setShouldPinGallery:q5e,setShouldShowGallery:b0,setGalleryScrollPosition:K5e,setGalleryImageMinimumWidth:mf,setGalleryImageObjectFit:Y5e,setShouldHoldGalleryOpen:Z5e,setShouldAutoSwitchToNewImages:X5e,setCurrentCategory:Ry,setGalleryWidth:Ig}=Z$.actions,Q5e=Z$.reducer;st({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"});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"})});st({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"});st({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"});st({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"});st({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"});st({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"})]})});st({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"})]})});st({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"});st({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"})})});st({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"})]})});st({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"})]})});st({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"})]})});st({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});st({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});st({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});st({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});st({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});st({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});st({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});st({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"});st({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var J$=st({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"})]})});st({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"})]})});st({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"})]})});st({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"});st({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"});st({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"})]})});st({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"})]})});st({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"})]})});st({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"});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"});st({displayName:"SpinnerIcon",path:ee(Hn,{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"})]})]})});st({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"});st({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"})});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"});st({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"});st({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"})]})});st({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"});st({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"});st({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"})})});st({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});st({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 J5e(e){return lt({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 tr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ee(on,{gap:2,children:[n&&x(Ui,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(J5e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ee(on,{direction:i?"column":"row",children:[ee(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Vf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(J$,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ebe=(e,t)=>e.image.uuid===t.image.uuid,eH=C.exports.memo(({image:e,styleClass:t})=>{const n=$e();vt("esc",()=>{n(VW(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:g,seamless:m,hires_fix:v,width:b,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:L,orig_path:I,scale:O}=r,R=JSON.stringify(r,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(on,{gap:1,direction:"column",width:"100%",children:[ee(on,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ee(Vf,{href:e.url,isExternal:!0,children:[e.url,x(J$,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Hn,{children:[i&&x(tr,{label:"Generation type",value:i}),["esrgan","gfpgan"].includes(i)&&x(tr,{label:"Original image",value:I}),i==="gfpgan"&&E!==void 0&&x(tr,{label:"Fix faces strength",value:E,onClick:()=>n(D3(E))}),i==="esrgan"&&O!==void 0&&x(tr,{label:"Upscaling scale",value:O,onClick:()=>n(g8(O))}),i==="esrgan"&&E!==void 0&&x(tr,{label:"Upscaling strength",value:E,onClick:()=>n(m8(E))}),s&&x(tr,{label:"Prompt",labelPosition:"top",value:M3(s),onClick:()=>n(fx(s))}),l!==void 0&&x(tr,{label:"Seed",value:l,onClick:()=>n(t2(l))}),a&&x(tr,{label:"Sampler",value:a,onClick:()=>n(zW(a))}),h&&x(tr,{label:"Steps",value:h,onClick:()=>n(OW(h))}),g!==void 0&&x(tr,{label:"CFG scale",value:g,onClick:()=>n(RW(g))}),u&&u.length>0&&x(tr,{label:"Seed-weight pairs",value:K4(u),onClick:()=>n(WW(K4(u)))}),m&&x(tr,{label:"Seamless",value:m,onClick:()=>n(BW(m))}),v&&x(tr,{label:"High Resolution Optimization",value:v,onClick:()=>n(FW(v))}),b&&x(tr,{label:"Width",value:b,onClick:()=>n(DW(b))}),w&&x(tr,{label:"Height",value:w,onClick:()=>n(NW(w))}),k&&x(tr,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(_v(k))}),L&&x(tr,{label:"Mask image",value:L,isLink:!0,onClick:()=>n(v8(L))}),i==="img2img"&&E&&x(tr,{label:"Image to image strength",value:E,onClick:()=>n(p8(E))}),P&&x(tr,{label:"Image to image fit",value:P,onClick:()=>n(HW(P))}),o&&o.length>0&&ee(Hn,{children:[x(Wf,{size:"sm",children:"Postprocessing"}),o.map((D,z)=>{if(D.type==="esrgan"){const{scale:$,strength:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(tr,{label:"Scale",value:$,onClick:()=>n(g8($))}),x(tr,{label:"Strength",value:V,onClick:()=>n(m8(V))})]},z)}else if(D.type==="gfpgan"){const{strength:$}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("gfpgan"))}})]},z)}else if(D.type==="codeformer"){const{strength:$,fidelity:V}=D;return ee(on,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(tr,{label:"Strength",value:$,onClick:()=>{n(D3($)),n(z3("codeformer"))}}),V&&x(tr,{label:"Fidelity",value:V,onClick:()=>{n($W(V)),n(z3("codeformer"))}})]},z)}})]}),ee(on,{gap:2,direction:"column",children:[ee(on,{gap:2,children:[x(Ui,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(A_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(hz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ebe),tH=Qe([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,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:Ve.isEqual}});function tbe(){const e=$e(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i}=Ce(tH),[o,a]=C.exports.useState(!1),s=()=>{a(!0)},l=()=>{a(!1)},u=()=>{e(B_())},h=()=>{e(z_())},g=()=>{e(_l(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(ab,{src:i.url,width:i.width,height:i.height,onClick:g}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(h$,{className:"next-prev-button"}),variant:"unstyled",onClick:u})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:s,onMouseOut:l,children:o&&!n&&x(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&x(eH,{image:i,styleClass:"current-image-metadata"})]})}const nbe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),F_=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ce(nbe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Hn,{children:[x(Y$,{}),x(tbe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(m4e,{})})})},nH=()=>{const e=C.exports.useContext(D_);return x(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(M_,{}),onClick:e||void 0})};function rbe(){const e=Ce(i=>i.options.initialImage),t=$e(),n=ch(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(UW())};return ee(Hn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(nH,{})]}),e&&x("div",{className:"init-image-preview",children:x(ab,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ibe=()=>{const e=Ce(r=>r.options.initialImage),{currentImage:t}=Ce(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(rbe,{})}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function obe(e){return lt({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 abe=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)}},hbe=["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"],$A="__resizable_base__",rH=function(e){ube(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($A):o.className+=$A,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||cbe},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 v6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?v6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?v6(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&&Ep("left",o),s=i&&Ep("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,L=(g-w)/this.ratio+b,I=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),D=Math.min(v,L);n=Dy(n,I,O),r=Dy(r,R,D)}else n=Dy(n,h,g),r=Dy(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&&dbe(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:ll(ll({},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=fbe(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),L=k.newHeight,I=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(I=FA(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(L=FA(L,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(I,L,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(I=R.newWidth,L=R.newHeight,this.props.grid){var D=BA(I,this.props.grid[0]),z=BA(L,this.props.grid[1]),$=this.props.snapGap||0;I=$===0||Math.abs(D-I)<=$?D:I,L=$===0||Math.abs(z-L)<=$?z:L}var V={width:I-v.width,height:L-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=I/E.width*100;I=Y+"%"}else if(b.endsWith("vw")){var de=I/this.window.innerWidth*100;I=de+"vw"}else if(b.endsWith("vh")){var j=I/this.window.innerHeight*100;I=j+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Y=L/E.height*100;L=Y+"%"}else if(w.endsWith("vw")){var de=L/this.window.innerWidth*100;L=de+"vw"}else if(w.endsWith("vh")){var j=L/this.window.innerHeight*100;L=j+"vh"}}var te={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(L,"height")};this.flexDir==="row"?te.flexBasis=te.width:this.flexDir==="column"&&(te.flexBasis=te.height),Al.exports.flushSync(function(){r.setState(te)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},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:ll(ll({},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(lbe,{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 hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ll(ll(ll({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,{...ll({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 Qv(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,pbe(i,...t)]}function pbe(...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 gbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iH(...e){return t=>e.forEach(n=>gbe(n,t))}function Ha(...e){return C.exports.useCallback(iH(...e),e)}const wv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(vbe);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(G9,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(G9,An({},r,{ref:t}),n)});wv.displayName="Slot";const G9=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ybe(r,n.props),ref:iH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});G9.displayName="SlotClone";const mbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function vbe(e){return C.exports.isValidElement(e)&&e.type===mbe}function ybe(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 bbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],xu=bbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?wv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oH(e,t){e&&Al.exports.flushSync(()=>e.dispatchEvent(t))}function aH(e){const t=e+"CollectionProvider",[n,r]=Qv(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=re.useRef(null),P=re.useRef(new Map).current;return re.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=re.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=Ha(b,P.collectionRef);return re.createElement(wv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=re.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=re.useRef(null),L=Ha(b,k),I=o(u,w);return re.useEffect(()=>(I.itemMap.set(k,{ref:k,...P}),()=>void I.itemMap.delete(k))),re.createElement(wv,{[h]:"",ref:L},E)});function m(v){const b=o(e+"CollectionConsumer",v);return re.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((I,O)=>P.indexOf(I.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const xbe=C.exports.createContext(void 0);function sH(e){const t=C.exports.useContext(xbe);return e||t||"ltr"}function Pl(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=Pl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const q9="dismissableLayer.update",wbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside";let HA;const _be=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kbe=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(_be),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=Ha(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),L=g?E.indexOf(g):-1,I=h.layersWithOutsidePointerEventsDisabled.size>0,O=L>=k,R=Ebe(z=>{const $=z.target,V=[...h.branches].some(Y=>Y.contains($));!O||V||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),D=Pbe(z=>{const $=z.target;[...h.branches].some(Y=>Y.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return Sbe(z=>{L===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(HA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),WA(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=HA)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),WA())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(q9,z),()=>document.removeEventListener(q9,z)},[]),C.exports.createElement(xu.div,An({},u,{ref:w,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function Ebe(e,t=globalThis?.document){const n=Pl(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(){lH(wbe,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 Pbe(e,t=globalThis?.document){const n=Pl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&lH(Cbe,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 WA(){const e=new CustomEvent(q9);document.dispatchEvent(e)}function lH(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?oH(i,o):i.dispatchEvent(o)}let y6=0;function Lbe(){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:VA()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:VA()),y6++,()=>{y6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),y6--}},[])}function VA(){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 b6="focusScope.autoFocusOnMount",x6="focusScope.autoFocusOnUnmount",UA={bubbles:!1,cancelable:!0},Tbe=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=Pl(i),h=Pl(o),g=C.exports.useRef(null),m=Ha(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:_f(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||_f(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){GA.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(b6,UA);s.addEventListener(b6,u),s.dispatchEvent(P),P.defaultPrevented||(Abe(Nbe(uH(s)),{select:!0}),document.activeElement===w&&_f(s))}return()=>{s.removeEventListener(b6,u),setTimeout(()=>{const P=new CustomEvent(x6,UA);s.addEventListener(x6,h),s.dispatchEvent(P),P.defaultPrevented||_f(w??document.body,{select:!0}),s.removeEventListener(x6,h),GA.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,[L,I]=Ibe(k);L&&I?!w.shiftKey&&P===I?(w.preventDefault(),n&&_f(L,{select:!0})):w.shiftKey&&P===L&&(w.preventDefault(),n&&_f(I,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(xu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_f(r,{select:t}),document.activeElement!==n)return}function Ibe(e){const t=uH(e),n=jA(t,e),r=jA(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 jA(e,t){for(const n of e)if(!Mbe(n,{upTo:t}))return n}function Mbe(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 Obe(e){return e instanceof HTMLInputElement&&"select"in e}function _f(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Obe(e)&&t&&e.select()}}const GA=Rbe();function Rbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qA(e,t),e.unshift(t)},remove(t){var n;e=qA(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function qA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nbe(e){return e.filter(t=>t.tagName!=="A")}const H0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Dbe=R6["useId".toString()]||(()=>{});let zbe=0;function Bbe(e){const[t,n]=C.exports.useState(Dbe());return H0(()=>{e||n(r=>r??String(zbe++))},[e]),e||(t?`radix-${t}`:"")}function r1(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function i1(e){return["top","bottom"].includes(r1(e))?"x":"y"}function $_(e){return e==="y"?"height":"width"}function KA(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=i1(t),l=$_(s),u=r[l]/2-i[l]/2,h=r1(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(Xb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const Fbe=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}=KA(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=cH(r),h={x:i,y:o},g=i1(a),m=Xb(a),v=$_(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],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let I=L?g==="y"?L.clientHeight||0:L.clientWidth||0:0;I===0&&(I=s.floating[v]);const O=P/2-k/2,R=u[w],D=I-b[v]-u[E],z=I/2-b[v]/2+O,$=K9(R,z,D),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zVbe[t])}function Ube(e,t,n){n===void 0&&(n=!1);const r=Xb(e),i=i1(e),o=$_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=J4(a)),{main:a,cross:J4(a)}}const jbe={start:"end",end:"start"};function ZA(e){return e.replace(/start|end/g,t=>jbe[t])}const Gbe=["top","right","bottom","left"];function qbe(e){const t=J4(e);return[ZA(e),t,ZA(t)]}const Kbe=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=r1(r),P=g||(w===a||!v?[J4(a)]:qbe(a)),k=[a,...P],L=await Q4(t,b),I=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[w]),h){const{main:$,cross:V}=Ube(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));I.push(L[$],L[V])}if(O=[...O,{placement:r,overflows:I}],!I.every($=>$<=0)){var R,D;const $=((R=(D=i.flip)==null?void 0:D.index)!=null?R:0)+1,V=k[$];if(V)return{data:{index:$,overflows:O},reset:{placement:V}};let Y="bottom";switch(m){case"bestFit":{var z;const de=(z=O.map(j=>[j,j.overflows.filter(te=>te>0).reduce((te,ie)=>te+ie,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:z[0].placement;de&&(Y=de);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function XA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QA(e){return Gbe.some(t=>e[t]>=0)}const Ybe=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 Q4(r,{...n,elementContext:"reference"}),a=XA(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:QA(a)}}}case"escaped":{const o=await Q4(r,{...n,altBoundary:!0}),a=XA(o,i.floating);return{data:{escapedOffsets:a,escaped:QA(a)}}}default:return{}}}}};async function Zbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=r1(n),s=Xb(n),l=i1(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 Xbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Zbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function dH(e){return e==="x"?"y":"x"}const Qbe=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 Q4(t,l),g=i1(r1(i)),m=dH(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],L=v-h[P];v=K9(k,v,L)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],L=b-h[P];b=K9(k,b,L)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Jbe=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=i1(i),m=dH(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,D=o.reference[g]+o.reference[O]-E.mainAxis;vD&&(v=D)}if(u){var P,k,L,I;const O=g==="y"?"width":"height",R=["top","left"].includes(r1(i)),D=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:(L=(I=a.offset)==null?void 0:I[m])!=null?L:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function fH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pu(e){if(e==null)return window;if(!fH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jv(e){return Pu(e).getComputedStyle(e)}function Su(e){return fH(e)?"":e?(e.nodeName||"").toLowerCase():""}function hH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Pu(e).HTMLElement}function cd(e){return e instanceof Pu(e).Element}function exe(e){return e instanceof Pu(e).Node}function H_(e){if(typeof ShadowRoot>"u")return!1;const t=Pu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qb(e){const{overflow:t,overflowX:n,overflowY:r}=Jv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function txe(e){return["table","td","th"].includes(Su(e))}function pH(e){const t=/firefox/i.test(hH()),n=Jv(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 gH(){return!/^((?!chrome|android).)*safari/i.test(hH())}const JA=Math.min,Im=Math.max,e5=Math.round;function wu(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&&Ll(e)&&(l=e.offsetWidth>0&&e5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e5(s.height)/e.offsetHeight||1);const h=cd(e)?Pu(e):window,g=!gH()&&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 wd(e){return((exe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Jb(e){return cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function mH(e){return wu(wd(e)).left+Jb(e).scrollLeft}function nxe(e){const t=wu(e);return e5(t.width)!==e.offsetWidth||e5(t.height)!==e.offsetHeight}function rxe(e,t,n){const r=Ll(t),i=wd(t),o=wu(e,r&&nxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Su(t)!=="body"||Qb(i))&&(a=Jb(t)),Ll(t)){const l=wu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=mH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function vH(e){return Su(e)==="html"?e:e.assignedSlot||e.parentNode||(H_(e)?e.host:null)||wd(e)}function eI(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function ixe(e){let t=vH(e);for(H_(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Su(t));){if(pH(t))return t;t=t.parentNode}return null}function Y9(e){const t=Pu(e);let n=eI(e);for(;n&&txe(n)&&getComputedStyle(n).position==="static";)n=eI(n);return n&&(Su(n)==="html"||Su(n)==="body"&&getComputedStyle(n).position==="static"&&!pH(n))?t:n||ixe(e)||t}function tI(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=wu(e);return{width:t.width,height:t.height}}function oxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=wd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Su(n)!=="body"||Qb(o))&&(a=Jb(n)),Ll(n))){const l=wu(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 axe(e,t){const n=Pu(e),r=wd(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=gH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function sxe(e){var t;const n=wd(e),r=Jb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Im(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Im(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+mH(e);const l=-r.scrollTop;return Jv(i||n).direction==="rtl"&&(s+=Im(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function yH(e){const t=vH(e);return["html","body","#document"].includes(Su(t))?e.ownerDocument.body:Ll(t)&&Qb(t)?t:yH(t)}function t5(e,t){var n;t===void 0&&(t=[]);const r=yH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pu(r),a=i?[o].concat(o.visualViewport||[],Qb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t5(a))}function lxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&H_(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function uxe(e,t){const n=wu(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 nI(e,t,n){return t==="viewport"?X4(axe(e,n)):cd(t)?uxe(t,n):X4(sxe(wd(e)))}function cxe(e){const t=t5(e),r=["absolute","fixed"].includes(Jv(e).position)&&Ll(e)?Y9(e):e;return cd(r)?t.filter(i=>cd(i)&&lxe(i,r)&&Su(i)!=="body"):[]}function dxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?cxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=nI(t,h,i);return u.top=Im(g.top,u.top),u.right=JA(g.right,u.right),u.bottom=JA(g.bottom,u.bottom),u.left=Im(g.left,u.left),u},nI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const fxe={getClippingRect:dxe,convertOffsetParentRelativeRectToViewportRelativeRect:oxe,isElement:cd,getDimensions:tI,getOffsetParent:Y9,getDocumentElement:wd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:rxe(t,Y9(n),r),floating:{...tI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jv(e).direction==="rtl"};function hxe(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?[...cd(e)?t5(e):[],...t5(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}),cd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?wu(e):null;s&&b();function b(){const w=wu(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 pxe=(e,t,n)=>Fbe(e,t,{platform:fxe,...n});var Z9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function X9(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(!X9(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)&&!X9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gxe(e){const t=C.exports.useRef(e);return Z9(()=>{t.current=e}),t}function mxe(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=gxe(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);X9(g?.map(L=>{let{options:I}=L;return I}),t?.map(L=>{let{options:I}=L;return I}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||pxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(L=>{b.current&&Al.exports.flushSync(()=>{h(L)})})},[g,n,r]);Z9(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);Z9(()=>(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 L=s.current(o.current,a.current,v);l.current=L}else v()},[v,s]),E=C.exports.useCallback(L=>{o.current=L,w()},[w]),P=C.exports.useCallback(L=>{a.current=L,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 vxe=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?YA({element:t.current,padding:n}).fn(i):{}:t?YA({element:t,padding:n}).fn(i):{}}}};function yxe(e){const[t,n]=C.exports.useState(void 0);return H0(()=>{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 bH="Popper",[W_,xH]=Qv(bH),[bxe,SH]=W_(bH),xxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(bxe,{scope:t,anchor:r,onAnchorChange:i},n)},Sxe="PopperAnchor",wxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=SH(Sxe,n),a=C.exports.useRef(null),s=Ha(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(xu.div,An({},i,{ref:s}))}),n5="PopperContent",[Cxe,fEe]=W_(n5),[_xe,kxe]=W_(n5,{hasParent:!1,positionUpdateFns:new Set}),Exe=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:L=!1,avoidCollisions:I=!0,...O}=e,R=SH(n5,h),[D,z]=C.exports.useState(null),$=Ha(t,Et=>z(Et)),[V,Y]=C.exports.useState(null),de=yxe(V),j=(n=de?.width)!==null&&n!==void 0?n:0,te=(r=de?.height)!==null&&r!==void 0?r:0,ie=g+(v!=="center"?"-"+v:""),le=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},G=Array.isArray(E)?E:[E],W=G.length>0,q={padding:le,boundary:G.filter(Lxe),altBoundary:W},{reference:Q,floating:X,strategy:me,x:ye,y:Se,placement:He,middlewareData:je,update:ct}=mxe({strategy:"fixed",placement:ie,whileElementsMounted:hxe,middleware:[Xbe({mainAxis:m+te,alignmentAxis:b}),I?Qbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Jbe():void 0,...q}):void 0,V?vxe({element:V,padding:w}):void 0,I?Kbe({...q}):void 0,Txe({arrowWidth:j,arrowHeight:te}),L?Ybe({strategy:"referenceHidden"}):void 0].filter(Pxe)});H0(()=>{Q(R.anchor)},[Q,R.anchor]);const qe=ye!==null&&Se!==null,[dt,Xe]=wH(He),it=(i=je.arrow)===null||i===void 0?void 0:i.x,It=(o=je.arrow)===null||o===void 0?void 0:o.y,wt=((a=je.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Te,ft]=C.exports.useState();H0(()=>{D&&ft(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=kxe(n5,h),xt=!Mt;C.exports.useLayoutEffect(()=>{if(!xt)return ut.add(ct),()=>{ut.delete(ct)}},[xt,ut,ct]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(ut).reverse().forEach(Et=>requestAnimationFrame(Et))},[xt,qe,ut]);const kn={"data-side":dt,"data-align":Xe,...O,ref:$,style:{...O.style,animation:qe?void 0:"none",opacity:(s=je.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Te,["--radix-popper-transform-origin"]:[(l=je.transformOrigin)===null||l===void 0?void 0:l.x,(u=je.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Cxe,{scope:h,placedSide:dt,onArrowChange:Y,arrowX:it,arrowY:It,shouldHideArrow:wt},xt?C.exports.createElement(_xe,{scope:h,hasParent:!0,positionUpdateFns:ut},C.exports.createElement(xu.div,kn)):C.exports.createElement(xu.div,kn)))});function Pxe(e){return e!==void 0}function Lxe(e){return e!==null}const Txe=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]=wH(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 L="",I="";return b==="bottom"?(L=g?E:`${P}px`,I=`${-v}px`):b==="top"?(L=g?E:`${P}px`,I=`${l.floating.height+v}px`):b==="right"?(L=`${-v}px`,I=g?E:`${k}px`):b==="left"&&(L=`${l.floating.width+v}px`,I=g?E:`${k}px`),{data:{x:L,y:I}}}});function wH(e){const[t,n="center"]=e.split("-");return[t,n]}const Axe=xxe,Ixe=wxe,Mxe=Exe;function Oxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const CH=e=>{const{present:t,children:n}=e,r=Rxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ha(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};CH.displayName="Presence";function Rxe(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]=Oxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Fy(r.current);o.current=s==="mounted"?u:"none"},[s]),H0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Fy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),H0(()=>{if(t){const u=g=>{const v=Fy(r.current).includes(g.animationName);g.target===t&&v&&Al.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Fy(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 Fy(e){return e?.animationName||"none"}function Nxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pl(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 Dxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Pl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const S6="rovingFocusGroup.onEntryFocus",zxe={bubbles:!1,cancelable:!0},V_="RovingFocusGroup",[Q9,_H,Bxe]=aH(V_),[Fxe,kH]=Qv(V_,[Bxe]),[$xe,Hxe]=Fxe(V_),Wxe=C.exports.forwardRef((e,t)=>C.exports.createElement(Q9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Q9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Vxe,An({},e,{ref:t}))))),Vxe=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=Ha(t,g),v=sH(o),[b=null,w]=Nxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Pl(u),L=_H(n),I=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(S6,k),()=>D.removeEventListener(S6,k)},[k]),C.exports.createElement($xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(D=>D-1),[])},C.exports.createElement(xu.div,An({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{I.current=!0}),onFocus:Kn(e.onFocus,D=>{const z=!I.current;if(D.target===D.currentTarget&&z&&!E){const $=new CustomEvent(S6,zxe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=L().filter(ie=>ie.focusable),Y=V.find(ie=>ie.active),de=V.find(ie=>ie.id===b),te=[Y,de,...V].filter(Boolean).map(ie=>ie.ref.current);EH(te)}}I.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),Uxe="RovingFocusGroupItem",jxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Bbe(),s=Hxe(Uxe,n),l=s.currentTabStopId===a,u=_H(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(Q9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(xu.span,An({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=Kxe(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?Yxe(w,E+1):w.slice(E+1)}setTimeout(()=>EH(w))}})})))}),Gxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kxe(e,t,n){const r=qxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gxe[r]}function EH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Zxe=Wxe,Xxe=jxe,Qxe=["Enter"," "],Jxe=["ArrowDown","PageUp","Home"],PH=["ArrowUp","PageDown","End"],eSe=[...Jxe,...PH],ex="Menu",[J9,tSe,nSe]=aH(ex),[hh,LH]=Qv(ex,[nSe,xH,kH]),U_=xH(),TH=kH(),[rSe,tx]=hh(ex),[iSe,j_]=hh(ex),oSe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=U_(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Pl(o),m=sH(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(Axe,s,C.exports.createElement(rSe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(iSe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},aSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=U_(n);return C.exports.createElement(Ixe,An({},i,r,{ref:t}))}),sSe="MenuPortal",[hEe,lSe]=hh(sSe,{forceMount:void 0}),td="MenuContent",[uSe,AH]=hh(td),cSe=C.exports.forwardRef((e,t)=>{const n=lSe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tx(td,e.__scopeMenu),a=j_(td,e.__scopeMenu);return C.exports.createElement(J9.Provider,{scope:e.__scopeMenu},C.exports.createElement(CH,{present:r||o.open},C.exports.createElement(J9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(dSe,An({},i,{ref:t})):C.exports.createElement(fSe,An({},i,{ref:t})))))}),dSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ha(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return qz(o)},[]),C.exports.createElement(IH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fSe=C.exports.forwardRef((e,t)=>{const n=tx(td,e.__scopeMenu);return C.exports.createElement(IH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),IH=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=tx(td,n),E=j_(td,n),P=U_(n),k=TH(n),L=tSe(n),[I,O]=C.exports.useState(null),R=C.exports.useRef(null),D=Ha(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),V=C.exports.useRef(0),Y=C.exports.useRef(null),de=C.exports.useRef("right"),j=C.exports.useRef(0),te=v?OB:C.exports.Fragment,ie=v?{as:wv,allowPinchZoom:!0}:void 0,le=W=>{var q,Q;const X=$.current+W,me=L().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(q=me.find(qe=>qe.ref.current===ye))===null||q===void 0?void 0:q.textValue,He=me.map(qe=>qe.textValue),je=SSe(He,X,Se),ct=(Q=me.find(qe=>qe.textValue===je))===null||Q===void 0?void 0:Q.ref.current;(function qe(dt){$.current=dt,window.clearTimeout(z.current),dt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lbe();const G=C.exports.useCallback(W=>{var q,Q;return de.current===((q=Y.current)===null||q===void 0?void 0:q.side)&&CSe(W,(Q=Y.current)===null||Q===void 0?void 0:Q.area)},[]);return C.exports.createElement(uSe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),onItemLeave:C.exports.useCallback(W=>{var q;G(W)||((q=R.current)===null||q===void 0||q.focus(),O(null))},[G]),onTriggerLeave:C.exports.useCallback(W=>{G(W)&&W.preventDefault()},[G]),pointerGraceTimerRef:V,onPointerGraceIntentChange:C.exports.useCallback(W=>{Y.current=W},[])},C.exports.createElement(te,ie,C.exports.createElement(Tbe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,W=>{var q;W.preventDefault(),(q=R.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(kbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Zxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),C.exports.createElement(Mxe,An({role:"menu","aria-orientation":"vertical","data-state":ySe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,W=>{const Q=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,me=W.key.length===1;Q&&(W.key==="Tab"&&W.preventDefault(),!X&&me&&le(W.key));const ye=R.current;if(W.target!==ye||!eSe.includes(W.key))return;W.preventDefault();const He=L().filter(je=>!je.disabled).map(je=>je.ref.current);PH.includes(W.key)&&He.reverse(),bSe(He)}),onBlur:Kn(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Kn(e.onPointerMove,t8(W=>{const q=W.target,Q=j.current!==W.clientX;if(W.currentTarget.contains(q)&&Q){const X=W.clientX>j.current?"right":"left";de.current=X,j.current=W.clientX}}))})))))))}),e8="MenuItem",rI="menu.itemSelect",hSe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=j_(e8,e.__scopeMenu),s=AH(e8,e.__scopeMenu),l=Ha(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(rI,{bubbles:!0,cancelable:!0});g.addEventListener(rI,v=>r?.(v),{once:!0}),oH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(pSe,An({},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===" "||Qxe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),pSe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=AH(e8,n),s=TH(n),l=C.exports.useRef(null),u=Ha(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(J9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Xxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(xu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,t8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,t8(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),gSe="MenuRadioGroup";hh(gSe,{value:void 0,onValueChange:()=>{}});const mSe="MenuItemIndicator";hh(mSe,{checked:!1});const vSe="MenuSub";hh(vSe);function ySe(e){return e?"open":"closed"}function bSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SSe(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=xSe(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 wSe(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 CSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wSe(n,t)}function t8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const _Se=oSe,kSe=aSe,ESe=cSe,PSe=hSe,MH="ContextMenu",[LSe,pEe]=Qv(MH,[LH]),nx=LH(),[TSe,OH]=LSe(MH),ASe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nx(t),u=Pl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(TSe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(_Se,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},ISe="ContextMenuTrigger",MSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(ISe,n),o=nx(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(kSe,An({},o,{virtualRef:s})),C.exports.createElement(xu.span,An({"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,$y(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,$y(u)),onPointerCancel:Kn(e.onPointerCancel,$y(u)),onPointerUp:Kn(e.onPointerUp,$y(u))})))}),OSe="ContextMenuContent",RSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=OH(OSe,n),o=nx(n),a=C.exports.useRef(!1);return C.exports.createElement(ESe,An({},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)"}}))}),NSe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nx(n);return C.exports.createElement(PSe,An({},i,r,{ref:t}))});function $y(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const DSe=ASe,zSe=MSe,BSe=RSe,Sc=NSe,FSe=Qe([e=>e.gallery,e=>e.options,vn],(e,t,n)=>{const{categories:r,currentCategory:i,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,galleryWidth:v}=e,{isLightBoxOpen:b}=t;return{currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:u,galleryImageObjectFit:h,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:n,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,images:r[i].images,areMoreImagesAvailable:r[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:v,isLightBoxOpen:b}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),$Se=Qe([e=>e.options,e=>e.gallery,e=>e.system,vn],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),HSe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,WSe=C.exports.memo(e=>{const t=$e(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ce($Se),{image:s,isSelected:l}=e,{url:u,uuid:h,metadata:g}=s,[m,v]=C.exports.useState(!1),b=ch(),w=()=>v(!0),E=()=>v(!1),P=()=>{s.metadata&&t(fx(s.metadata.image.prompt)),b({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},k=()=>{s.metadata&&t(t2(s.metadata.image.seed)),b({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},L=()=>{a&&t(_l(!1)),t(_v(s)),n!=="img2img"&&t(_o("img2img")),b({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(_l(!1)),t(Y4(s)),n!=="inpainting"&&t(_o("inpainting")),b({title:"Sent to Inpainting",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(_l(!1)),t(A$(s)),n!=="outpainting"&&t(_o("outpainting")),b({title:"Sent to Outpainting",status:"success",duration:2500,isClosable:!0})},R=()=>{g&&t(m7e(g)),b({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},D=async()=>{if(g?.image?.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(_o("img2img")),t(v7e(g)),b({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}b({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(DSe,{children:[x(zSe,{children:ee(yd,{position:"relative",className:"hoverable-image",onMouseOver:w,onMouseOut:E,children:[x(ab,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Q$(s)),children:l&&x(pa,{width:"50%",height:"50%",as:g$,className:"hoverable-image-check"})}),m&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Ui,{label:"Delete image",hasArrow:!0,children:x(j9,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(Y4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},h)}),ee(BSe,{className:"hoverable-image-context-menu",sticky:"always",children:[x(Sc,{onClickCapture:P,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sc,{onClickCapture:k,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sc,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Ui,{label:"Load initial image used for this generation",children:x(Sc,{onClickCapture:D,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sc,{onClickCapture:L,children:"Send to Image To Image"}),x(Sc,{onClickCapture:I,children:"Send to Inpainting"}),x(Sc,{onClickCapture:O,children:"Send to Outpainting"}),x(j9,{image:s,children:x(Sc,{"data-warning":!0,children:"Delete Image"})})]})]})},HSe),VSe=320;function RH(){const e=$e(),t=ch(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:w,isLightBoxOpen:E}=Ce(FSe),[P,k]=C.exports.useState(300),[L,I]=C.exports.useState(590),[O,R]=C.exports.useState(w>=VSe);C.exports.useEffect(()=>{if(!!o){if(E){e(Ig(400)),k(400),I(400);return}h==="inpainting"||h==="outpainting"?(e(Ig(190)),k(190),I(190)):h==="img2img"?(e(Ig(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Ig(Math.min(Math.max(Number(w),0),590))),I(590)),setTimeout(()=>e(Cr(!0)),400)}},[e,h,o,w,E]),C.exports.useEffect(()=>{o||I(window.innerWidth)},[o,E]);const D=C.exports.useRef(null),z=C.exports.useRef(null),$=C.exports.useRef(null),V=()=>{e(q5e(!o)),e(Cr(!0))},Y=()=>{a?j():de()},de=()=>{e(b0(!0)),o&&e(Cr(!0))},j=()=>{e(b0(!1)),e(K5e(z.current?z.current.scrollTop:0)),e(Z5e(!1))},te=()=>{e(V9(r))},ie=q=>{e(mf(q)),e(Cr(!0))},le=()=>{$.current=window.setTimeout(()=>j(),500)},G=()=>{$.current&&window.clearTimeout($.current)};vt("g",()=>{Y(),o&&setTimeout(()=>e(Cr(!0)),400)},[a,o]),vt("left",()=>{e(B_())}),vt("right",()=>{e(z_())}),vt("shift+g",()=>{V(),e(Cr(!0))},[o]),vt("esc",()=>{o||(e(b0(!1)),e(Cr(!0)))},[o]);const W=32;return vt("shift+up",()=>{if(!(l>=256)&&l<256){const q=l+W;q<=256?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+down",()=>{if(!(l<=32)&&l>32){const q=l-W;q>32?(e(mf(q)),t({title:`Gallery Thumbnail Size set to ${q}`,status:"success",duration:1e3,isClosable:!0})):(e(mf(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),vt("shift+r",()=>{e(mf(64)),t({title:"Reset Gallery Image Size",status:"success",duration:2500,isClosable:!0})},[l]),C.exports.useEffect(()=>{!z.current||(z.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{R(w>=280)},[w]),G$(D,j,!o),x(j$,{nodeRef:D,in:a||m&&!o,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:D,onMouseLeave:o?void 0:le,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ee(rH,{minWidth:P,maxWidth:L,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(q,Q,X,me)=>{e(Ig(Ve.clamp(Number(w)+me.width,0,Number(L)))),X.removeAttribute("data-resize-alert")},onResize:(q,Q,X,me)=>{const ye=Ve.clamp(Number(w)+me.width,0,Number(L));ye>=280&&!O?R(!0):ye<280&&O&&R(!1),ye>=L?X.setAttribute("data-resize-alert","true"):X.removeAttribute("data-resize-alert")},children:[ee("div",{className:"image-gallery-header",children:[x(ro,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Hn,{children:[x(Ra,{"data-selected":r==="result",onClick:()=>e(Ry("result")),children:"Invocations"}),x(Ra,{"data-selected":r==="user",onClick:()=>e(Ry("user")),children:"User"})]}):ee(Hn,{children:[x(pt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(R4e,{}),onClick:()=>e(Ry("result"))}),x(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(Q4e,{}),onClick:()=>e(Ry("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(ks,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(pt,{size:"sm","aria-label":"Gallery Settings",icon:x(O_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(fh,{value:l,onChange:ie,min:32,max:256,label:"Image Size"}),x(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(mf(64)),icon:x(P_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:g==="contain",onChange:()=>e(Y5e(g==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:q=>e(X5e(q.target.checked))})})]})}),x(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:o?x(H$,{}):x(W$,{})})]})]}),x("div",{className:"image-gallery-container",ref:z,children:n.length||b?ee(Hn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(q=>{const{uuid:Q}=q;return x(WSe,{image:q,isSelected:i===Q},Q)})}),x(Ra,{onClick:te,isDisabled:!b,className:"image-gallery-load-more-btn",children:b?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(f$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const USe=Qe([e=>e.options,vn],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),rx=e=>{const t=$e(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ce(USe),l=()=>{t(y7e(!o)),t(Cr(!0))};return vt("shift+j",()=>{l()},{enabled:s},[o]),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(Ui,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(obe,{})})})]}),!a&&x(RH,{})]})})};function jSe(){return x(rx,{optionsPanel:x(H5e,{}),children:x(ibe,{})})}const GSe=Qe(jt,e=>e.shouldDarkenOutsideBoundingBox);function qSe(){const e=$e(),t=Ce(GSe);return x(Aa,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(M$(!t))},styleClass:"inpainting-bounding-box-darken"})}const KSe=Qe(jt,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function iI(e){const{dimension:t,label:n}=e,r=$e(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=Ce(KSe),s=o[t],l=a[t],u=g=>{t=="width"&&r(Qg({...a,width:Math.floor(g)})),t=="height"&&r(Qg({...a,height:Math.floor(g)}))},h=()=>{t=="width"&&r(Qg({...a,width:Math.floor(s)})),t=="height"&&r(Qg({...a,height:Math.floor(s)}))};return x(fh,{label:n,min:64,max:cs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const YSe=Qe(jt,e=>e.shouldLockBoundingBox);function ZSe(){const e=Ce(YSe),t=$e();return x(Aa,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(O$(!e))},styleClass:"inpainting-bounding-box-darken"})}const XSe=Qe(jt,e=>e.shouldShowBoundingBox);function QSe(){const e=Ce(XSe),t=$e();return x(pt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(o$,{size:22}):x(i$,{size:22}),onClick:()=>t(R_(!e)),background:"none",padding:0})}const JSe=()=>ee("div",{className:"inpainting-bounding-box-settings",children:[ee("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(QSe,{})]}),ee("div",{className:"inpainting-bounding-box-settings-items",children:[x(iI,{dimension:"width",label:"Box W"}),x(iI,{dimension:"height",label:"Box H"}),ee(on,{alignItems:"center",justifyContent:"space-between",children:[x(qSe,{}),x(ZSe,{})]})]})]}),e6e=Qe(jt,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function t6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ce(e6e),n=$e();return ee(on,{alignItems:"center",columnGap:"1rem",children:[x(fh,{label:"Inpaint Replace",value:e,onChange:r=>{n(TA(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(TA(1)),isResetDisabled:!t}),x(_s,{isChecked:t,onChange:r=>n(h5e(r.target.checked))})]})}const n6e=Qe(jt,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function r6e(){const e=$e(),t=ch(),{mayClearBrushHistory:n}=Ce(n6e);return x(ul,{onClick:()=>{e(f5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function NH(){return ee(Hn,{children:[x(t6e,{}),x(JSe,{}),x(r6e,{})]})}function i6e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}function ix(){return(ix=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function n8(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 W0=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(oI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=r8(i.current),L=E?k.addEventListener:k.removeEventListener;L(P?"touchmove":"mousemove",v),L(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(aI(P),!function(I,O){return O&&!Mm(I)}(P,l.current)&&k)){if(Mm(P)){l.current=!0;var L=P.changedTouches||[];L.length&&(s.current=L[0].identifier)}k.focus(),o(oI(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",{...ix({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),ox=function(e){return e.filter(Boolean).join(" ")},q_=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=ox(["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}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zH=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},i8=function(e){var t=zH(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w6=function(e){var t=zH(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},o6e=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:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},a6e=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:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},s6e=re.memo(function(e){var t=e.hue,n=e.onChange,r=ox(["react-colorful__hue",e.className]);return re.createElement("div",{className:r},re.createElement(G_,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:W0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},re.createElement(q_,{className:"react-colorful__hue-pointer",left:t/360,color:i8({h:t,s:100,v:100,a:1})})))}),l6e=re.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:i8({h:t.h,s:100,v:100,a:1})};return re.createElement("div",{className:"react-colorful__saturation",style:r},re.createElement(G_,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:W0(t.s+100*i.left,0,100),v:W0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},re.createElement(q_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:i8(t)})))}),BH=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function u6e(e,t,n){var r=n8(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;BH(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 c6e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,d6e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},sI=new Map,f6e=function(e){c6e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!sI.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}`,sI.set(t,n);var r=d6e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},h6e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+w6(Object.assign({},n,{a:0}))+", "+w6(Object.assign({},n,{a:1}))+")"},o=ox(["react-colorful__alpha",t]),a=io(100*n.a);return re.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),re.createElement(G_,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:W0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},re.createElement(q_,{className:"react-colorful__alpha-pointer",left:n.a,color:w6(n)})))},p6e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=DH(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);f6e(s);var l=u6e(n,i,o),u=l[0],h=l[1],g=ox(["react-colorful",t]);return re.createElement("div",ix({},a,{ref:s,className:g}),x(l6e,{hsva:u,onChange:h}),x(s6e,{hue:u.h,onChange:h}),re.createElement(h6e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},g6e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:a6e,fromHsva:o6e,equal:BH},m6e=function(e){return re.createElement(p6e,ix({},e,{colorModel:g6e}))};const K_=e=>{const{styleClass:t,...n}=e;return x(m6e,{className:`invokeai__color-picker ${t}`,...n})},v6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,maskColor:r}=e;return{isMaskEnabled:n,maskColor:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function y6e(){const{isMaskEnabled:e,maskColor:t,activeTabName:n}=Ce(v6e),r=$e(),i=o=>{r(P$(o))};return vt("shift+[",o=>{o.preventDefault(),i({...t,a:Math.max(t.a-.05,0)})},{enabled:!0},[n,e,t.a]),vt("shift+]",o=>{o.preventDefault(),i({...t,a:Math.min(t.a+.05,1)})},{enabled:!0},[n,e,t.a]),x(ks,{trigger:"hover",styleClass:"inpainting-color-picker",triggerComponent:x(pt,{"aria-label":"Mask Color",icon:x($4e,{}),isDisabled:!e,cursor:"pointer"}),children:x(K_,{color:t,onChange:i})})}const b6e=Qe([jt,vn],(e,t)=>{const{tool:n,brushSize:r}=e;return{tool:n,brushSize:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function x6e(){const e=$e(),{tool:t,brushSize:n,activeTabName:r}=Ce(b6e),i=()=>e(ud("brush")),o=()=>{e(h6(!0))},a=()=>{e(h6(!1))},s=l=>{e(h6(!0)),e(w$(l))};return vt("[",l=>{l.preventDefault(),n-5>0?s(n-5):s(1)},{enabled:!0},[r,n]),vt("]",l=>{l.preventDefault(),s(n+5)},{enabled:!0},[r,n]),vt("b",l=>{l.preventDefault(),i()},{enabled:!0},[r]),x(ks,{trigger:"hover",onOpen:o,onClose:a,triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),onClick:i,"data-selected":t==="brush"}),children:ee("div",{className:"inpainting-brush-options",children:[x(fh,{label:"Brush Size",value:n,onChange:s,min:1,max:200}),x($a,{value:n,onChange:s,width:"80px",min:1,max:999}),x(y6e,{})]})})}const S6e=Qe([jt,vn],(e,t)=>{const{tool:n,isMaskEnabled:r}=e;return{tool:n,isMaskEnabled:r,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function w6e(){const{tool:e,isMaskEnabled:t,activeTabName:n}=Ce(S6e),r=$e(),i=()=>r(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[n]),x(pt,{"aria-label":n==="inpainting"?"Eraser (E)":"Erase Mask (E)",tooltip:n==="inpainting"?"Eraser (E)":"Erase Mask (E)",icon:x(y$,{}),onClick:i,"data-selected":e==="eraser",isDisabled:!t})}const C6e=Qe([jt,vn],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function FH(){const e=$e(),{canUndo:t,activeTabName:n}=Ce(C6e),r=()=>{e(c5e())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Undo",tooltip:"Undo",icon:x(Z4e,{}),onClick:r,isDisabled:!t})}const _6e=Qe([jt,vn],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function $H(){const e=$e(),{canRedo:t,activeTabName:n}=Ce(_6e),r=()=>{e(d5e())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(pt,{"aria-label":"Redo",tooltip:"Redo",icon:x(j4e,{}),onClick:r,isDisabled:!t})}const k6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,layerState:{objects:r}}=e;return{isMaskEnabled:n,activeTabName:t,isMaskEmpty:r.filter(jb).length===0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function E6e(){const{isMaskEnabled:e,activeTabName:t,isMaskEmpty:n}=Ce(k6e),r=$e(),i=ch(),o=()=>{r(L$())};return vt("shift+c",a=>{a.preventDefault(),o(),i({title:"Mask Cleared",status:"success",duration:2500,isClosable:!0})},{enabled:!n},[t,n,e]),x(pt,{"aria-label":"Clear Mask (Shift+C)",tooltip:"Clear Mask (Shift+C)",icon:x(W4e,{size:20,style:{transform:"rotate(45deg)"}}),onClick:o,isDisabled:n||!e})}const P6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n}=e;return{isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function L6e(){const e=$e(),{isMaskEnabled:t,activeTabName:n}=Ce(P6e),r=()=>e(E$(!t));return vt("h",i=>{i.preventDefault(),r()},{enabled:n==="inpainting"||n=="outpainting"},[n,t]),x(pt,{"aria-label":"Hide Mask (H)",tooltip:"Hide Mask (H)","data-alert":!t,icon:t?x(o$,{size:22}):x(i$,{size:22}),onClick:r})}const T6e=Qe([jt,vn],(e,t)=>{const{isMaskEnabled:n,shouldPreserveMaskedArea:r}=e;return{shouldPreserveMaskedArea:r,isMaskEnabled:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});function A6e(){const{shouldPreserveMaskedArea:e,isMaskEnabled:t,activeTabName:n}=Ce(T6e),r=$e(),i=()=>r(k$(!e));return vt("shift+m",o=>{o.preventDefault(),i()},{enabled:!0},[n,e,t]),x(pt,{tooltip:"Invert Mask Display (Shift+M)","aria-label":"Invert Mask Display (Shift+M)","data-selected":e,icon:e?x(h4e,{size:22}):x(p4e,{size:22}),onClick:i,isDisabled:!t})}const I6e=Qe(jt,e=>{const{shouldLockBoundingBox:t}=e;return{shouldLockBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),M6e=()=>{const e=$e(),{shouldLockBoundingBox:t}=Ce(I6e);return x(pt,{"aria-label":"Lock Inpainting Box",tooltip:"Lock Inpainting Box",icon:t?x(z4e,{}):x(X4e,{}),"data-selected":t,onClick:()=>{e(O$(!t))}})},O6e=Qe(jt,e=>{const{shouldShowBoundingBox:t}=e;return{shouldShowBoundingBox:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R6e=()=>{const e=$e(),{shouldShowBoundingBox:t}=Ce(O6e);return x(pt,{"aria-label":"Hide Inpainting Box (Shift+H)",tooltip:"Hide Inpainting Box (Shift+H)",icon:x(J4e,{}),"data-alert":!t,onClick:()=>{e(R_(!t))}})};Qe([qb,e=>e.options,vn],(e,t,n)=>{const{stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e;return{activeTabName:n,stageScale:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});const N6e=()=>ee("div",{className:"inpainting-settings",children:[ee(ro,{isAttached:!0,children:[x(x6e,{}),x(w6e,{})]}),ee(ro,{isAttached:!0,children:[x(L6e,{}),x(A6e,{}),x(M6e,{}),x(R6e,{}),x(E6e,{})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(nH,{})})]}),D6e=Qe(e=>e.canvas,Xv,vn,(e,t,n)=>{const{doesCanvasNeedScaling:r}=e;return{doesCanvasNeedScaling:r,activeTabName:n,baseCanvasImage:t}}),HH=()=>{const e=$e(),{doesCanvasNeedScaling:t,activeTabName:n,baseCanvasImage:r}=Ce(D6e),i=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!i.current)return;const{width:o,height:a}=r?.image?r.image:{width:512,height:512},{clientWidth:s,clientHeight:l}=i.current,u=Math.min(1,Math.min(s/o,l/a));e(I$(u)),n==="inpainting"?e(LA({width:Math.floor(o*u),height:Math.floor(a*u)})):n==="outpainting"&&e(LA({width:Math.floor(s),height:Math.floor(l)}))},0)},[e,r,t,n]),x("div",{ref:i,className:"inpainting-canvas-area",children:x(Wv,{thickness:"2px",speed:"1s",size:"xl"})})};var z6e=Math.PI/180;function B6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const x0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:x0,version:"8.3.13",isBrowser:B6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*z6e: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 ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:x0.document,_injectGlobal(e){x0.Konva=e}},gr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ta{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 ta(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 F6e="[object Array]",$6e="[object Number]",H6e="[object String]",W6e="[object Boolean]",V6e=Math.PI/180,U6e=180/Math.PI,C6="#",j6e="",G6e="0",q6e="Konva warning: ",lI="Konva error: ",K6e="rgb(",_6={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]},Y6e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Hy=[];const Z6e=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)===F6e},_isNumber(e){return Object.prototype.toString.call(e)===$6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===H6e},_isBoolean(e){return Object.prototype.toString.call(e)===W6e},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){Hy.push(e),Hy.length===1&&Z6e(function(){const t=Hy;Hy=[],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(C6,j6e);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=G6e+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===K6e?(t=Y6e.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=_6[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=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],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function VH(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Y_(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function o1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function UH(){if(ot.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(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X6e(){if(ot.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(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(Cd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Q6e(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(Cd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Mg="get",Og="set";const Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Mg+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=Og+fe._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Og+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=Mg+a(t),l=Og+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},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Og+n,i=Mg+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=Mg+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},Z.addSetter(e,t,r,function(){fe.error(o)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Mg+fe._capitalize(n),a=Og+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 J6e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=ewe+u.join(uI)+twe)):(o+=s.property,t||(o+=awe+s.val)),o+=iwe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lwe&&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=cI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(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 cn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];cn._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=[];cn._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")&&(cn.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){cn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&cn._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",cn._endDragBefore,!0),window.addEventListener("touchend",cn._endDragBefore,!0),window.addEventListener("mousemove",cn._drag),window.addEventListener("touchmove",cn._drag),window.addEventListener("mouseup",cn._endDragAfter,!1),window.addEventListener("touchend",cn._endDragAfter,!1));var O3="absoluteOpacity",Vy="allEventListeners",ru="absoluteTransform",dI="absoluteScale",Rg="canvas",fwe="Change",hwe="children",pwe="konva",o8="listening",fI="mouseenter",hI="mouseleave",pI="set",gI="Shape",R3=" ",mI="stage",_c="transform",gwe="Stage",a8="visible",mwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(R3);let vwe=1;class Be{constructor(t){this._id=vwe++,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===_c||t===ru)&&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===_c||t===ru,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(R3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Rg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ru&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Rg),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){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 S0({pixelRatio:a,width:i,height:o}),v=new S0({pixelRatio:a,width:0,height:0}),b=new Z_({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(Rg),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(O3),this._clearSelfAndDescendantCache(dI),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(Rg,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Rg)}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!==hwe&&(r=pI+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(o8,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(a8,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;cn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.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!==gwe&&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(_c),this._clearSelfAndDescendantCache(ru)),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 ta,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(_c);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(_c),this._clearSelfAndDescendantCache(ru),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(O3,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():ot.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;cn._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=cn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&cn._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=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[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=Be.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=Be.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",Pp=e=>{const t=rm(e);if(t==="pointer")return ot.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function yI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const _we="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);",N3=[];class lx extends aa{constructor(t){super(yI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),N3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{yI(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===bwe){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&&N3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(_we),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 S0({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+vI,this.content.style.height=n+vI),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;rwwe&&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(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||Cwe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Pp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Pp(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=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!cn.isDragging||ot.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=Pp(t.type),r=rm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(cn.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.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=Pp(t.type),r=rm(t.type);if(!n)return;cn.isDragging&&cn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!cn.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(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=Pp(t.type),r=rm(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=k6(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;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):cn.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),ot["_"+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,ot["_"+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}),ot["_"+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(s8,{evt:t}):this._fire(s8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(l8,{evt:t}):this._fire(l8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Kp,X_(t)),Om(t.pointerId)}_lostpointercapture(t){Om(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 S0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Z_({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.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}}lx.prototype.nodeType=ywe;gr(lx);Z.addGetterSetter(lx,"container");var iW="hasShadow",oW="shadowRGBA",aW="patternImage",sW="linearGradient",lW="radialGradient";let Ky;function P6(){return Ky||(Ky=fe.createCanvasElement().getContext("2d"),Ky)}const Rm={};function kwe(e){e.fill()}function Ewe(e){e.stroke()}function Pwe(e){e.fill()}function Lwe(e){e.stroke()}function Twe(){this._clearCache(iW)}function Awe(){this._clearCache(oW)}function Iwe(){this._clearCache(aW)}function Mwe(){this._clearCache(sW)}function Owe(){this._clearCache(lW)}class Ie extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Rm)););this.colorKey=n,Rm[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(iW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(aW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.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(sW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),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 Be.prototype.destroy.call(this),delete Rm[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,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||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,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=fe._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){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return GH(t,this)}setPointerCapture(t){qH(t,this)}releaseCapture(t){Om(t)}}Ie.prototype._fillFunc=kwe;Ie.prototype._strokeFunc=Ewe;Ie.prototype._fillFuncHit=Pwe;Ie.prototype._strokeFuncHit=Lwe;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";gr(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Twe);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Awe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Iwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Mwe);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Owe);Z.addGetterSetter(Ie,"stroke",void 0,UH());Z.addGetterSetter(Ie,"strokeWidth",2,ze());Z.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);Z.addGetterSetter(Ie,"hitStrokeWidth","auto",Y_());Z.addGetterSetter(Ie,"strokeHitEnabled",!0,Ls());Z.addGetterSetter(Ie,"perfectDrawEnabled",!0,Ls());Z.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Ls());Z.addGetterSetter(Ie,"lineJoin");Z.addGetterSetter(Ie,"lineCap");Z.addGetterSetter(Ie,"sceneFunc");Z.addGetterSetter(Ie,"hitFunc");Z.addGetterSetter(Ie,"dash");Z.addGetterSetter(Ie,"dashOffset",0,ze());Z.addGetterSetter(Ie,"shadowColor",void 0,o1());Z.addGetterSetter(Ie,"shadowBlur",0,ze());Z.addGetterSetter(Ie,"shadowOpacity",1,ze());Z.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);Z.addGetterSetter(Ie,"shadowOffsetX",0,ze());Z.addGetterSetter(Ie,"shadowOffsetY",0,ze());Z.addGetterSetter(Ie,"fillPatternImage");Z.addGetterSetter(Ie,"fill",void 0,UH());Z.addGetterSetter(Ie,"fillPatternX",0,ze());Z.addGetterSetter(Ie,"fillPatternY",0,ze());Z.addGetterSetter(Ie,"fillLinearGradientColorStops");Z.addGetterSetter(Ie,"strokeLinearGradientColorStops");Z.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);Z.addGetterSetter(Ie,"fillRadialGradientColorStops");Z.addGetterSetter(Ie,"fillPatternRepeat","repeat");Z.addGetterSetter(Ie,"fillEnabled",!0);Z.addGetterSetter(Ie,"strokeEnabled",!0);Z.addGetterSetter(Ie,"shadowEnabled",!0);Z.addGetterSetter(Ie,"dashEnabled",!0);Z.addGetterSetter(Ie,"strokeScaleEnabled",!0);Z.addGetterSetter(Ie,"fillPriority","color");Z.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);Z.addGetterSetter(Ie,"fillPatternOffsetX",0,ze());Z.addGetterSetter(Ie,"fillPatternOffsetY",0,ze());Z.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);Z.addGetterSetter(Ie,"fillPatternScaleX",1,ze());Z.addGetterSetter(Ie,"fillPatternScaleY",1,ze());Z.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);Z.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);Z.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);Z.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);Z.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);Z.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);Z.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);Z.addGetterSetter(Ie,"fillPatternRotation",0);Z.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Rwe="#",Nwe="beforeDraw",Dwe="draw",uW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],zwe=uW.length;class ph extends aa{constructor(t){super(t),this.canvas=new S0,this.hitCanvas=new Z_({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(Nwe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),aa.prototype.drawScene.call(this,i,n),this._fire(Dwe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),aa.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)}}}ph.prototype.nodeType="Layer";gr(ph);Z.addGetterSetter(ph,"imageSmoothingEnabled",!0);Z.addGetterSetter(ph,"clearBeforeDraw",!0);Z.addGetterSetter(ph,"hitGraphEnabled",!0,Ls());class Q_ extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Q_.prototype.nodeType="FastLayer";gr(Q_);class V0 extends aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}V0.prototype.nodeType="Group";gr(V0);var L6=function(){return x0.performance&&x0.performance.now?function(){return x0.performance.now()}:function(){return new Date().getTime()}}();class Ia{constructor(t,n){this.id=Ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:L6(),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=bI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=xI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===bI?this.setTime(t):this.state===xI&&this.setTime(this.duration-t)}pause(){this.state=Fwe,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||Nm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=$we++;var u=r.getLayer()||(r instanceof ot.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 Ia(function(){n.tween.onEnterFrame()},u),this.tween=new Hwe(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)Bwe[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),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=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={};Be.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 Nm={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}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Lu);Z.addGetterSetter(Lu,"innerRadius",0,ze());Z.addGetterSetter(Lu,"outerRadius",0,ze());Z.addGetterSetter(Lu,"angle",0,ze());Z.addGetterSetter(Lu,"clockwise",!1,Ls());function u8(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 wI(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=Nn.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 Nn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Nn.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 Nn.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,Nn.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,L=[],I=l,O=u,R,D,z,$,V,Y,de,j,te,ie;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",L.push(l,u);break;case"L":l=b.shift(),u=b.shift(),L.push(l,u);break;case"m":var le=b.shift(),G=b.shift();if(l+=le,u+=G,k="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+le,u=a[W].points[1]+G;break}}L.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",L.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",L.push(l,u);break;case"H":l=b.shift(),k="L",L.push(l,u);break;case"v":u+=b.shift(),k="L",L.push(l,u);break;case"V":u=b.shift(),k="L",L.push(l,u);break;case"C":L.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"c":L.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"S":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",L.push(l,u);break;case"s":D=l,z=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),z=u+(u-R.points[3])),L.push(D,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",L.push(l,u);break;case"Q":L.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),L.push(l,u);break;case"q":L.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",L.push(l,u);break;case"T":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",L.push(D,z,l,u);break;case"t":D=l,z=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",L.push(D,z,l,u);break;case"A":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l=b.shift(),u=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break;case"a":$=b.shift(),V=b.shift(),Y=b.shift(),de=b.shift(),j=b.shift(),te=l,ie=u,l+=b.shift(),u+=b.shift(),k="A",L=this.convertEndpointToCenterParameterization(te,ie,l,u,de,j,$,V,Y);break}a.push({command:k||v,points:L,start:{x:I,y:O},pathLength:this.calcLength(I,O,k||v,L)})}(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=Nn;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,L=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},I=function(V,Y){return(V[0]*Y[0]+V[1]*Y[1])/(L(V)*L(Y))},O=function(V,Y){return(V[0]*Y[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Nn.prototype.className="Path";Nn.prototype._attrsAffectingSize=["data"];gr(Nn);Z.addGetterSetter(Nn,"data");class gh extends Tu{_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=Nn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Nn.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}}}gh.prototype.className="Arrow";gr(gh);Z.addGetterSetter(gh,"pointerLength",10,ze());Z.addGetterSetter(gh,"pointerWidth",10,ze());Z.addGetterSetter(gh,"pointerAtBeginning",!1);Z.addGetterSetter(gh,"pointerAtEnding",!0);class a1 extends Ie{_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)}}a1.prototype._centroid=!0;a1.prototype.className="Circle";a1.prototype._attrsAffectingSize=["radius"];gr(a1);Z.addGetterSetter(a1,"radius",0,ze());class _d extends Ie{_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)}}_d.prototype.className="Ellipse";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(_d);Z.addComponentsGetterSetter(_d,"radius",["x","y"]);Z.addGetterSetter(_d,"radiusX",0,ze());Z.addGetterSetter(_d,"radiusY",0,ze());class Ts extends Ie{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 Ts({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ts.prototype.className="Image";gr(Ts);Z.addGetterSetter(Ts,"image");Z.addComponentsGetterSetter(Ts,"crop",["x","y","width","height"]);Z.addGetterSetter(Ts,"cropX",0,ze());Z.addGetterSetter(Ts,"cropY",0,ze());Z.addGetterSetter(Ts,"cropWidth",0,ze());Z.addGetterSetter(Ts,"cropHeight",0,ze());var cW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Wwe="Change.konva",Vwe="none",c8="up",d8="right",f8="down",h8="left",Uwe=cW.length;class J_ extends V0{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)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];gr(vh);Z.addGetterSetter(vh,"radius",0,ze());Z.addGetterSetter(vh,"sides",0,ze());var CI=Math.PI*2;class yh extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,CI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),CI,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)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(yh);Z.addGetterSetter(yh,"innerRadius",0,ze());Z.addGetterSetter(yh,"outerRadius",0,ze());class Ol extends Ie{constructor(t){super(t),this._updated=!0,this.anim=new Ia(()=>{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 Zy;function A6(){return Zy||(Zy=fe.createCanvasElement().getContext(qwe),Zy)}function i9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o9e(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 pr extends Ie{constructor(t){super(a9e(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=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(Kwe,n),this}getWidth(){var t=this.attrs.width===Lp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Lp||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=A6(),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()+Yy+this.fontVariant()+Yy+(this.fontSize()+Qwe)+r9e(this.fontFamily())}_addTextLine(t){this.align()===Ng&&(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 A6().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!==Lp&&o!==void 0,l=a!==Lp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==EI,w=v!==t9e&&b,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var P=E?this._getTextWidth(T6):0,k=0,L=t.length;kh)for(;I.length>0;){for(var R=0,D=I.length,z="",$=0;R>>1,Y=I.slice(0,V+1),de=this._getTextWidth(Y)+P;de<=h?(R=V+1,z=Y,$=de):D=V}if(z){if(w){var j,te=I[z.length],ie=te===Yy||te===_I;ie&&$<=h?j=z.length:j=Math.max(z.lastIndexOf(Yy),z.lastIndexOf(_I))+1,j>0&&(R=j,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var le=this._shouldHandleEllipsis(m);if(le){this._tryToAddEllipsisToLastLine();break}if(I=I.slice(R),I=I.trimLeft(),I.length>0&&(O=this._getTextWidth(I),O<=h)){this._addTextLine(I),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(I),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!==Lp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==EI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Lp&&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+T6)=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=dW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,j=w+1;j0)return w=j,de[j];de[j].command==="M"&&(m={x:de[j].points[0],y:de[j].points[1]})}return{}},k=function(de){var j=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(j+=(s-a)/g);var te=0,ie=0;for(v=void 0;Math.abs(j-te)/j>.01&&ie<20;){ie++;for(var le=te;b===void 0;)b=P(),b&&le+b.pathLengthj?v=Nn.getPointOnLine(j,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var W=b.points[4],q=b.points[5],Q=b.points[4]+q;E===0?E=W+1e-8:j>te?E+=Math.PI/180*q/Math.abs(q):E-=Math.PI/360*q/Math.abs(q),(q<0&&E=0&&E>Q)&&(E=Q,G=!0),v=Nn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?j>b.pathLength?E=1e-8:E=j/b.pathLength:j>te?E+=(j-te)/b.pathLength/2:E=Math.max(E-(te-j)/b.pathLength/2,0),E>1&&(E=1,G=!0),v=Nn.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=j/b.pathLength:j>te?E+=(j-te)/b.pathLength:E-=(te-j)/b.pathLength,E>1&&(E=1,G=!0),v=Nn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(te=Nn.getLineLength(m.x,m.y,v.x,v.y)),G&&(G=!1,b=void 0)}},L="C",I=t._getTextSize(L).width+r,O=u/I-1,R=0;Re+`.${yW}`).join(" "),PI="nodesRect",u9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],c9e={"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 d9e="ontouchstart"in ot._global;function f9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(c9e[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 r5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],LI=1e8;function h9e(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 bW(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 p9e(e,t){const n=h9e(e);return bW(e,t,n)}function g9e(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(u9e.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(PI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(PI,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=(ot.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 bW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-LI,y:-LI,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 ta;r.rotate(-ot.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:ot.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(),r5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new e2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:d9e?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=ot.getAngle(this.rotation()),o=f9e(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 Ie({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 g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let de=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const j=m+de,te=ot.getAngle(this.rotationSnapTolerance()),le=g9e(this.rotationSnaps(),j,te)-g.rotation,G=p9e(g,le);this._fitNodesInto(G,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(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 ta;if(a.rotate(ot.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:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ta;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 ta;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(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=""),V0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function m9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){r5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+r5.join(", "))}),e||[]}_n.prototype.className="Transformer";gr(_n);Z.addGetterSetter(_n,"enabledAnchors",r5,m9e);Z.addGetterSetter(_n,"flipEnabled",!0,Ls());Z.addGetterSetter(_n,"resizeEnabled",!0);Z.addGetterSetter(_n,"anchorSize",10,ze());Z.addGetterSetter(_n,"rotateEnabled",!0);Z.addGetterSetter(_n,"rotationSnaps",[]);Z.addGetterSetter(_n,"rotateAnchorOffset",50,ze());Z.addGetterSetter(_n,"rotationSnapTolerance",5,ze());Z.addGetterSetter(_n,"borderEnabled",!0);Z.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"anchorStrokeWidth",1,ze());Z.addGetterSetter(_n,"anchorFill","white");Z.addGetterSetter(_n,"anchorCornerRadius",0,ze());Z.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");Z.addGetterSetter(_n,"borderStrokeWidth",1,ze());Z.addGetterSetter(_n,"borderDash");Z.addGetterSetter(_n,"keepRatio",!0);Z.addGetterSetter(_n,"centeredScaling",!1);Z.addGetterSetter(_n,"ignoreStroke",!1);Z.addGetterSetter(_n,"padding",0,ze());Z.addGetterSetter(_n,"node");Z.addGetterSetter(_n,"nodes");Z.addGetterSetter(_n,"boundBoxFunc");Z.addGetterSetter(_n,"anchorDragBoundFunc");Z.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);Z.addGetterSetter(_n,"useSingleNodeRotation",!0);Z.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Au extends Ie{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.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)}}Au.prototype.className="Wedge";Au.prototype._centroid=!0;Au.prototype._attrsAffectingSize=["radius"];gr(Au);Z.addGetterSetter(Au,"radius",0,ze());Z.addGetterSetter(Au,"angle",0,ze());Z.addGetterSetter(Au,"clockwise",!1);Z.backCompat(Au,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function TI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var v9e=[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],y9e=[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 b9e(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,L,I,O,R,D,z,$,V,Y,de,j=t+t+1,te=r-1,ie=i-1,le=t+1,G=le*(le+1)/2,W=new TI,q=null,Q=W,X=null,me=null,ye=v9e[t],Se=y9e[t];for(s=1;s>Se,Y!==0?(Y=255/Y,n[h]=(m*ye>>Se)*Y,n[h+1]=(v*ye>>Se)*Y,n[h+2]=(b*ye>>Se)*Y):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=g+((l=o+t+1)>Se,Y>0?(Y=255/Y,n[l]=(m*ye>>Se)*Y,n[l+1]=(v*ye>>Se)*Y,n[l+2]=(b*ye>>Se)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=L,E-=X.r,P-=X.g,k-=X.b,L-=X.a,l=o+((l=a+le)0&&b9e(t,n)};Z.addGetterSetter(Be,"blurRadius",0,ze(),Z.afterSetFilter);const S9e=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};Z.addGetterSetter(Be,"contrast",0,ze(),Z.afterSetFilter);const C9e=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:fe.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,L=s[E]-s[k],I=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=L,D=R>0?R:-R,z=I>0?I:-I,$=O>0?O:-O;if(z>D&&(R=I),$>D&&(R=O),R*=t,i){var V=s[E]+R,Y=s[E+1]+R,de=s[E+2]+R;s[E]=V>255?255:V<0?0:V,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=de>255?255:de<0?0:de}else{var j=n-R;j<0?j=0:j>255&&(j=255),s[E]=s[E+1]=s[E+2]=j}}while(--w)}while(--g)};Z.addGetterSetter(Be,"embossStrength",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),Z.afterSetFilter);Z.addGetterSetter(Be,"embossDirection","top-left",null,Z.afterSetFilter);Z.addGetterSetter(Be,"embossBlend",!1,null,Z.afterSetFilter);function I6(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 _9e=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,L,I,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),L=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),L=a+v*(a-P),I=(h+u)*.5,O=h+v*(h-I),R=u+v*(u-I)),m=0;mP?E:P;var k=a,L=o,I,O,R=360/L*Math.PI/180,D,z;for(O=0;OL?k:L;var I=a,O=o,R,D,z=n.polarRotation||0,$,V;for(h=0;ht&&(I=L,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function z9e(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+=I[a+0],l+=I[a+1],u+=I[a+2],h+=I[a+3],L+=1);for(s=s/L,l=l/L,u=u/L,h=h/L,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,I[a+0]=s,I[a+1]=l,I[a+2]=u,I[a+3]=h)}};Z.addGetterSetter(Be,"pixelSize",8,ze(),Z.afterSetFilter);const H9e=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)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);const V9e=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)});Z.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Z.addGetterSetter(Be,"blue",0,WH,Z.afterSetFilter);Z.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const U9e=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)},G9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i ")+` 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 le(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:hp,findFiberByHostInstance:d.findFiberByHostInstance||dg,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{ln=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=J1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},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 T=f.current,M=ai(),H=Ar(T);return y=ug(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,H),d!==null&&(yo(d,T,H,M),Oh(d,T,H)),H},n};(function(e){e.exports=q9e})(xW);const K9e=AC(xW.exports);var tk={exports:{}},bh={};/** + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return le(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:hp,findFiberByHostInstance:d.findFiberByHostInstance||dg,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{ln=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Et)throw Error(a(363));d=J1(d,f);var T=qt(d,y,_).disconnect;return{disconnect:function(){T()}}},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 T=f.current,M=ai(),H=Ar(T);return y=ug(y),f.context===null?f.context=y:f.pendingContext=y,f=Ya(M,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=$s(T,f,H),d!==null&&(yo(d,T,H,M),Oh(d,T,H)),H},n};(function(e){e.exports=q9e})(xW);const K9e=A8(xW.exports);var ek={exports:{}},bh={};/** * @license React * react-reconciler-constants.production.min.js * @@ -500,14 +500,14 @@ No matching component was found for: * * 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})(tk);const II={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let MI=!1,OI=!1;const nk=".react-konva-event",Y9e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. + */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(ek);const AI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let II=!1,MI=!1;const tk=".react-konva-event",Y9e=`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 `,Z9e=`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 -`,X9e={};function ux(e,t,n=X9e){if(!MI&&"zIndex"in t&&(console.warn(Z9e),MI=!0),!OI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),OI=!0)}for(var o in n)if(!II[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(!II[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),Ed(e));for(var l in v)e.on(l+nk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(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),Ed(e)}function eCe(e,t,n){let r=eh[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=eh.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 ux(l,o),l}function tCe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function nCe(e,t,n){return!1}function rCe(e){return e}function iCe(){return null}function oCe(){return null}function aCe(e,t,n,r){return Q9e}function sCe(){}function lCe(e){}function uCe(e,t){return!1}function cCe(){return SW}function dCe(){return SW}const fCe=setTimeout,hCe=clearTimeout,pCe=-1;function gCe(e,t){return!1}const mCe=!1,vCe=!0,yCe=!0;function bCe(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function xCe(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function SCe(e,t,n){wW(e,t,n)}function wCe(e,t){t.destroy(),t.off(nk),Ed(e)}function CCe(e,t){t.destroy(),t.off(nk),Ed(e)}function _Ce(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function kCe(e,t,n){}function ECe(e,t,n,r,i){ux(e,i,r)}function PCe(e){e.hide(),Ed(e)}function LCe(e){}function TCe(e,t){(t.visible==null||t.visible)&&e.show()}function ACe(e,t){}function ICe(e){}function MCe(){}const OCe=()=>tk.exports.DefaultEventPriority,RCe=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:eCe,createTextInstance:tCe,finalizeInitialChildren:nCe,getPublicInstance:rCe,prepareForCommit:iCe,preparePortalMount:oCe,prepareUpdate:aCe,resetAfterCommit:sCe,resetTextContent:lCe,shouldDeprioritizeSubtree:uCe,getRootHostContext:cCe,getChildHostContext:dCe,scheduleTimeout:fCe,cancelTimeout:hCe,noTimeout:pCe,shouldSetTextContent:gCe,isPrimaryRenderer:mCe,warnsIfNotActing:vCe,supportsMutation:yCe,appendChild:bCe,appendChildToContainer:xCe,insertBefore:wW,insertInContainerBefore:SCe,removeChild:wCe,removeChildFromContainer:CCe,commitTextUpdate:_Ce,commitMount:kCe,commitUpdate:ECe,hideInstance:PCe,hideTextInstance:LCe,unhideInstance:TCe,unhideTextInstance:ACe,clearContainer:ICe,detachDeletedInstance:MCe,getCurrentEventPriority:OCe,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var NCe=Object.defineProperty,DCe=Object.defineProperties,zCe=Object.getOwnPropertyDescriptors,RI=Object.getOwnPropertySymbols,BCe=Object.prototype.hasOwnProperty,FCe=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?NCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DI=(e,t)=>{for(var n in t||(t={}))BCe.call(t,n)&&NI(e,n,t[n]);if(RI)for(var n of RI(t))FCe.call(t,n)&&NI(e,n,t[n]);return e},$Ce=(e,t)=>DCe(e,zCe(t));function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const ik=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:HCe,ReactCurrentDispatcher:WCe}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function VCe(){const e=C.exports.useContext(ik);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=HCe.current)!=null?r:rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],zI=new WeakMap;function UCe(){var e;const t=VCe();Bg.splice(0,Bg.length),rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==ik&&Bg.push(CW(i))});for(const n of Bg){const r=(e=WCe.current)==null?void 0:e.readContext(n);zI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$Ce(DI({},i),{value:zI.get(r)}))),n=>x(_W,{...DI({},n)})),[])}function jCe(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const GCe=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=jCe(e),o=UCe(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=im.createContainer(n.current,tk.exports.LegacyRoot,!1,null),im.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),im.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),im.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})},Fg="Layer",dd="Group",w0="Rect",$g="Circle",i5="Line",kW="Image",qCe="Transformer",im=K9e(RCe);im.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const KCe=re.forwardRef((e,t)=>x(_W,{children:x(GCe,{...e,forwardedRef:t})})),YCe=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=e=>{const{...t}=e,n=Ce(YCe);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{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))})},ok=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},XCe=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ok(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(XCe);return l?ee(dd,{listening:!1,...t,children:[x($g,{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($g,{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($g,{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($g,{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($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},JCe=Qe(jt,qb,Xv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e8e=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(JCe),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Iy(W,64),X=Iy(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v)return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Qg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Iy(W.x,O)+Q,ye=Iy(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[v,g]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(My(!1))},j=()=>{n(IA(!0))},te=()=>{n(g6(!1)),n(IA(!1)),n(My(!1))},ie=()=>{n(My(!0))},le=()=>{!u&&!l&&n(My(!1))};return ee(dd,{...t,children:[x(w0,{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(w0,{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(w0,{dragBoundFunc:b==="inpainting"?D:void 0,listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(qCe,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},t8e=Qe([jt,vn],(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:Ve.isEqual}}),n8e=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(t8e),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},r8e=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ok(t)}}),BI=e=>`data:image/svg+xml;utf8, +`,X9e={};function ux(e,t,n=X9e){if(!II&&"zIndex"in t&&(console.warn(Z9e),II=!0),!MI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(Y9e),MI=!0)}for(var o in n)if(!AI[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(!AI[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),Ed(e));for(var l in v)e.on(l+tk,v[l])}function Ed(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SW={},Q9e={};eh.Node.prototype._applyProps=ux;function J9e(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),Ed(e)}function e8e(e,t,n){let r=eh[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=eh.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 ux(l,o),l}function t8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n8e(e,t,n){return!1}function r8e(e){return e}function i8e(){return null}function o8e(){return null}function a8e(e,t,n,r){return Q9e}function s8e(){}function l8e(e){}function u8e(e,t){return!1}function c8e(){return SW}function d8e(){return SW}const f8e=setTimeout,h8e=clearTimeout,p8e=-1;function g8e(e,t){return!1}const m8e=!1,v8e=!0,y8e=!0;function b8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function x8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ed(e)}function wW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ed(e)}function S8e(e,t,n){wW(e,t,n)}function w8e(e,t){t.destroy(),t.off(tk),Ed(e)}function C8e(e,t){t.destroy(),t.off(tk),Ed(e)}function _8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function k8e(e,t,n){}function E8e(e,t,n,r,i){ux(e,i,r)}function P8e(e){e.hide(),Ed(e)}function L8e(e){}function T8e(e,t){(t.visible==null||t.visible)&&e.show()}function A8e(e,t){}function I8e(e){}function M8e(){}const O8e=()=>ek.exports.DefaultEventPriority,R8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:J9e,createInstance:e8e,createTextInstance:t8e,finalizeInitialChildren:n8e,getPublicInstance:r8e,prepareForCommit:i8e,preparePortalMount:o8e,prepareUpdate:a8e,resetAfterCommit:s8e,resetTextContent:l8e,shouldDeprioritizeSubtree:u8e,getRootHostContext:c8e,getChildHostContext:d8e,scheduleTimeout:f8e,cancelTimeout:h8e,noTimeout:p8e,shouldSetTextContent:g8e,isPrimaryRenderer:m8e,warnsIfNotActing:v8e,supportsMutation:y8e,appendChild:b8e,appendChildToContainer:x8e,insertBefore:wW,insertInContainerBefore:S8e,removeChild:w8e,removeChildFromContainer:C8e,commitTextUpdate:_8e,commitMount:k8e,commitUpdate:E8e,hideInstance:P8e,hideTextInstance:L8e,unhideInstance:T8e,unhideTextInstance:A8e,clearContainer:I8e,detachDeletedInstance:M8e,getCurrentEventPriority:O8e,now:Yp.exports.unstable_now,idlePriority:Yp.exports.unstable_IdlePriority,run:Yp.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var N8e=Object.defineProperty,D8e=Object.defineProperties,z8e=Object.getOwnPropertyDescriptors,OI=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,F8e=Object.prototype.propertyIsEnumerable,RI=(e,t,n)=>t in e?N8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NI=(e,t)=>{for(var n in t||(t={}))B8e.call(t,n)&&RI(e,n,t[n]);if(OI)for(var n of OI(t))F8e.call(t,n)&&RI(e,n,t[n]);return e},$8e=(e,t)=>D8e(e,z8e(t));function nk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=nk(r,t,n);if(i)return i;r=t?null:r.sibling}}function CW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const rk=CW(C.exports.createContext(null));class _W extends C.exports.Component{render(){return x(rk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:H8e,ReactCurrentDispatcher:W8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V8e(){const e=C.exports.useContext(rk);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=H8e.current)!=null?r:nk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Bg=[],DI=new WeakMap;function U8e(){var e;const t=V8e();Bg.splice(0,Bg.length),nk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==rk&&Bg.push(CW(i))});for(const n of Bg){const r=(e=W8e.current)==null?void 0:e.readContext(n);DI.set(n,r)}return C.exports.useMemo(()=>Bg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,$8e(NI({},i),{value:DI.get(r)}))),n=>x(_W,{...NI({},n)})),[])}function j8e(e){const t=re.useRef();return re.useLayoutEffect(()=>{t.current=e}),t.current}const G8e=e=>{const t=re.useRef(),n=re.useRef(),r=re.useRef(),i=j8e(e),o=U8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return re.useLayoutEffect(()=>(n.current=new eh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=im.createContainer(n.current,ek.exports.LegacyRoot,!1,null),im.updateContainer(x(o,{children:e.children}),r.current),()=>{!eh.isBrowser||(a(null),im.updateContainer(null,r.current,null),n.current.destroy())}),[]),re.useLayoutEffect(()=>{a(n.current),ux(n.current,e,i),im.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})},Fg="Layer",dd="Group",w0="Rect",$g="Circle",i5="Line",kW="Image",q8e="Transformer",im=K9e(R8e);im.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:re.version,rendererPackageName:"react-konva"});const K8e=re.forwardRef((e,t)=>x(_W,{children:x(G8e,{...e,forwardedRef:t})})),Y8e=Qe(jt,e=>e.layerState.objects,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=e=>{const{...t}=e,n=Ce(Y8e);return x(dd,{listening:!1,...t,children:n.filter(jb).map((r,i)=>x(i5,{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))})},ik=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},X8e=Qe(jt,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,eraserSize:o,maskColor:a,brushColor:s,tool:l,layer:u,shouldShowBrush:h,isMovingBoundingBox:g,isTransformingBoundingBox:m,stageScale:v}=e;return{cursorPosition:t,width:n,height:r,radius:l==="brush"?i/2:o/2,brushColorString:ik(u==="mask"?{...a,a:.5}:s),tool:l,shouldShowBrush:h,shouldDrawBrushPreview:!(g||m||!t)&&h,strokeWidth:1.5/v,dotRadius:1.5/v}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ce(X8e);return l?ee(dd,{listening:!1,...t,children:[x($g,{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($g,{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($g,{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($g,{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($g,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},J8e=Qe(jt,qb,Xv,vn,(e,t,n,r)=>{const{boundingBoxCoordinates:i,boundingBoxDimensions:o,stageDimensions:a,stageScale:s,isDrawing:l,isTransformingBoundingBox:u,isMovingBoundingBox:h,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,tool:v,stageCoordinates:b}=e,{shouldSnapToGrid:w}=t;return{boundingBoxCoordinates:i,boundingBoxDimensions:o,isDrawing:l,isMouseOverBoundingBox:g,shouldDarkenOutsideBoundingBox:m,isMovingBoundingBox:h,isTransformingBoundingBox:u,stageDimensions:a,stageScale:s,baseCanvasImage:n,activeTabName:r,shouldSnapToGrid:w,tool:v,stageCoordinates:b,boundingBoxStrokeWidth:(g?8:1)/s,hitStrokeWidth:20/s}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),eCe=e=>{const{...t}=e,n=$e(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,baseCanvasImage:v,activeTabName:b,shouldSnapToGrid:w,tool:E,boundingBoxStrokeWidth:P,hitStrokeWidth:k}=Ce(J8e),L=C.exports.useRef(null),I=C.exports.useRef(null);C.exports.useEffect(()=>{!L.current||!I.current||(L.current.nodes([I.current]),L.current.getLayer()?.batchDraw())},[]);const O=64*m,R=C.exports.useCallback(G=>{if(b==="inpainting"||!w){n(p6({x:G.target.x(),y:G.target.y()}));return}const W=G.target.x(),q=G.target.y(),Q=Iy(W,64),X=Iy(q,64);G.target.x(Q),G.target.y(X),n(p6({x:Q,y:X}))},[b,n,w]),D=C.exports.useCallback(G=>{if(!v&&b!=="outpainting")return r;const{x:W,y:q}=G,Q=g.width-i.width*m,X=g.height-i.height*m,me=Math.floor(Ve.clamp(W,0,Q)),ye=Math.floor(Ve.clamp(q,0,X));return{x:me,y:ye}},[v,b,r,g.width,g.height,i.width,i.height,m]),z=C.exports.useCallback(()=>{if(!I.current)return;const G=I.current,W=G.scaleX(),q=G.scaleY(),Q=Math.round(G.width()*W),X=Math.round(G.height()*q),me=Math.round(G.x()),ye=Math.round(G.y());n(Qg({width:Q,height:X})),n(p6({x:me,y:ye})),G.scaleX(1),G.scaleY(1)},[n]),$=C.exports.useCallback((G,W,q)=>{const Q=G.x%O,X=G.y%O,me=Iy(W.x,O)+Q,ye=Iy(W.y,O)+X,Se=Math.abs(W.x-me),He=Math.abs(W.y-ye),je=Se!v&&b!=="outpainting"||W.width+W.x>g.width||W.height+W.y>g.height||W.x<0||W.y<0?G:W,[b,v,g.height,g.width]),Y=()=>{n(g6(!0))},de=()=>{n(g6(!1)),n(My(!1))},j=()=>{n(AA(!0))},te=()=>{n(g6(!1)),n(AA(!1)),n(My(!1))},ie=()=>{n(My(!0))},le=()=>{!u&&!l&&n(My(!1))};return ee(dd,{...t,children:[x(w0,{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(w0,{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(w0,{...b==="inpainting"?{dragBoundFunc:D}:{},listening:!o&&E==="move",draggable:!0,fillEnabled:!1,height:i.height,onDragEnd:te,onDragMove:R,onMouseDown:j,onMouseOut:le,onMouseOver:ie,onMouseUp:te,onTransform:z,onTransformEnd:de,ref:I,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:P,width:i.width,x:r.x,y:r.y,hitStrokeWidth:k}),x(q8e,{anchorCornerRadius:3,anchorDragBoundFunc:$,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",boundBoxFunc:V,draggable:!1,enabledAnchors:E==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&E==="move",onDragEnd:te,onMouseDown:Y,onMouseUp:de,onTransformEnd:de,ref:L,rotateEnabled:!1})]})},tCe=Qe([jt,vn],(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:Ve.isEqual}}),nCe=()=>{const e=$e(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ce(tCe),i=C.exports.useRef(null);vt("shift+w",()=>{e(p5e())},{preventDefault:!0},[t]),vt("shift+h",()=>{e(R_(!n))},{preventDefault:!0},[t,n]),vt(["space"],o=>{o.repeat||(kc.current?.container().focus(),r!=="move"&&(i.current=r,e(ud("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(ud(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},rCe=Qe(jt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ik(t)}}),zI=e=>`data:image/svg+xml;utf8, @@ -585,9 +585,9 @@ For more info see: https://github.com/konvajs/react-konva/issues/194 -`.replaceAll("black",e),i8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(r8e),[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=BI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=BI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x&&r.y&&o&&i.width&&i.height?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},o8e=.999,a8e=.1,s8e=20,l8e=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),u8e=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(l8e);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*o8e**l,a8e,s8e),h={x:a.x-s.x*u,y:a.y-s.y*u};t(M$(u)),t(N$(h))},[i,t,n,e,r])},cx=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)}},c8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),d8e=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(c8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(_$([o.x,o.y])))},[e,n,r,t])},f8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),h8e=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(f8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(k$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},p8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),g8e=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(p8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(A$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(k$([s.x,s.y]))))},[t,r,i,a,n,e,o])},m8e=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),v8e=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(m8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(_$([o.x,o.y])))},[e,n,r,t])},y8e=()=>{const e=$e();return C.exports.useCallback(()=>{e(A$(null)),e(Gb(!1))},[e])},b8e=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),x8e=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(b8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(N$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,S8e=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.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),vf.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 EW=e=>{const{url:t,x:n,y:r}=e,[i]=S8e(t);return x(kW,{x:n,y:r,image:i,listening:!1})},w8e=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),C8e=()=>{const{objects:e}=Ce(w8e);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(S$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ok(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},_8e=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),k8e=()=>{const{colorMode:e}=Iv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{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,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},E8e=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),P8e=e=>{const{...t}=e,n=Ce(E8e),[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(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Hg=e=>Math.round(e*100)/100,L8e=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),T8e=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(L8e);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Hg(n)}, ${Hg(r)}`}),x("div",{children:`Scale: ${Hg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Hg(a)}, ${Hg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var A8e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},M8e=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=A8e(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&I8e(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},O8e=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),R8e=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(O8e),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(M8e,{children:x(WR,{value:wV,children:x(gF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(m$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},N8e=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"||n?v?w="grabbing":w="grab":s?w=void 0:l?w="move":w="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h}=Ce(N8e);n8e(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const g=C.exports.useRef({x:0,y:0}),m=C.exports.useRef(!1),v=u8e(kc),b=d8e(kc),w=h8e(kc,m),E=g8e(kc,m,g),P=v8e(kc),k=y8e(),{handleDragStart:L,handleDragMove:I,handleDragEnd:O}=x8e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(KCe,{tabIndex:-1,ref:kc,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},onMouseDown:b,onMouseEnter:P,onMouseLeave:k,onMouseMove:E,onMouseOut:k,onMouseUp:w,onDragStart:L,onDragMove:I,onDragEnd:O,onWheel:v,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Fg,{id:"grid",visible:r,children:x(k8e,{})}),ee(Fg,{id:"image",ref:au,listening:!1,imageSmoothingEnabled:!1,children:[x(C8e,{}),x(P8e,{})]}),ee(Fg,{id:"mask",visible:e,listening:!1,children:[x(ZCe,{visible:!0,listening:!1}),x(i8e,{listening:!1})]}),x(Fg,{id:"tool",children:!h&&ee(Hn,{children:[x(e8e,{visible:n}),x(QCe,{visible:l!=="move",listening:!1})]})}),x(Fg,{imageSmoothingEnabled:!1,children:h&&x(R8e,{})})]}),u&&x(T8e,{})]})})},D8e=Qe([Xv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),z8e=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(D8e);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(z_,{})}),t&&x("div",{className:"workarea-split-view-right",children:x($_,{})})]})};function B8e(){const e=$e();return C.exports.useEffect(()=>{e(D$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(z8e,{})})}function F8e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(s$,{}),feature:Xr.OTHER,options:x(l$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $8e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x($_,{})})});function H8e(){return x(rx,{optionsPanel:x(F8e,{}),children:x($8e,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function W8e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function V8e(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(F_())},g=()=>{e(B_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!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(Ps,{"aria-label":"Previous image",icon:x(p$,{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(Ps,{"aria-label":"Next image",icon:x(g$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Hn,{children:[x(W8e,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function U8e(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const j8e=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),G8e=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(j8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(O$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},q8e=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),K8e=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(q8e),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(b$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},Y8e=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Z8e=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(Y8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(x$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(C$(o))})}),x(Y_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},X8e=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Q8e=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(X8e);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(T$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(P$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(E$(o.target.checked))}),x(Y_,{color:n,onChange:o=>e(L$(o))})]})})},J8e=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(J8e);return ee("div",{className:"inpainting-settings",children:[x(Q8e,{}),ee(ro,{isAttached:!0,children:[x(Z8e,{}),x(K8e,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(z$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(y$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(G8e,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const i=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:n?ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]}):x(z_,{})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(D$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(U8e,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(H8e,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B8e,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(cF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(lF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(sF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(uF,{className:"app-tabs-panels",children:t?x(V8e,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(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=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(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=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(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)},resetOptionsState:e=>({...e,...IW}),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=dx.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}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:t2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:pC,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:gC,setUpscalingStrength:mC,setMaskPath:vC,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:_v,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):FI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):FI(new Blob([t]),r):r(Tl[e]+(t||"")),FI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},$I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",om=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<$I.length;e++)om[$I.charCodeAt(e)]=e;const T7e=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},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(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=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),yC=64,H7e={};let HI=0,Jy=0,WI;function VI(e){let t="";do t=QW[e%yC]+t,e=Math.floor(e/yC);while(e>0);return t}function JW(){const e=VI(+new Date);return e!==WI?(HI=0,WI=e):e+"."+VI(HI++)}for(;Jy{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)};O7e(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,M7e(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]=JW()),!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=eV(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 kl(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 kl extends Vr{constructor(t,n){super(),hx(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=ZW(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 nV(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=kl.requestsCount++,kl.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=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.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()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",UI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,UI,!1)}}function UI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,jI=!0,q7e="arraybuffer",GI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{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=GI?{}:ZW(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=jI&&!GI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,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{jI&&this.ws.send(o)}catch{}i&&rV(()=>{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]=JW()),this.supportsBinary||(t.b64=1);const i=eV(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!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function bC(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=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[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=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(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 J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=bC(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=bC(n.host).host),hx(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=W7e(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=YW,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 Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.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;Bc.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;Bc.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",Bc.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){Bc.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,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ak(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(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 u_e{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=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:sk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV 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=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(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(d_e.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}s1.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};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class wC 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,hx(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 s1({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||c_e;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 Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(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(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(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){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(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 Wg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Wg[i]&&o in Wg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new wC(r,t):(Wg[i]||(Wg[i]=new wC(r,t)),l=Wg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:wC,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(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(qI[t]||t||qI.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 g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return KI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return KI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.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 g()},MM:function(){return Qo(g())},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?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(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 Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var qI={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"},Co={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")},KI=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"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=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)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_A(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(MA("user")):t(V9("user")),r.categories.result.latest_mtime?t(MA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(_A(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(Oy({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Oy({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(DA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Oy({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(DA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(vC("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(Oy({image:a,category:"user"})),i){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(vC(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(d6("Model Changed")),t(y0(!1)),t(EA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(kA(o)),t(y0(!1)),t(EA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.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},x_e=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("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?u$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(["inpainting","outpainting"].includes(i)){const w=Xv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(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(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!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(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,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")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(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,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=SF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=HF.getPersistConfig({key:"root",storage:$F,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Wv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(VB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(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 B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),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:"V"},{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-6"},{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"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{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:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{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:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(bv,{}),ee(yv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(bz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(bv,{}),ee(yv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(d$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,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(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(bv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(yv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(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:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();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(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(f$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Iv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:K$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[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(f$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Hn,{children:[n&&x(rH,{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(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(v$,{}),onClick:l})})]})};function Q_e(){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 J_e=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 n2(e,t){var n=eke(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 eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return kC(e.target.files).map(function(t){return n2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(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 n2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=kC(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,ZI(cV(r))];case 2:return[2,ZI(kC(e.files).map(function(o){return n2(o)}))]}})})}function ZI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function kC(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,tM(n)];if(e.sizen)return[!1,tM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(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=pV(l,n),h=kv(u,1),g=h[0],m=gV(l,r,i),v=kv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(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 rM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){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 Uke(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 lk=C.exports.forwardRef(function(e,t){var n=e.children,r=l5(e,Oke),i=xV(r),o=i.open,a=l5(i,Rke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});lk.displayName="Dropzone";var bV={disabled:!1,getFilesFromEvent:nke,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};lk.defaultProps=bV;lk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var TC={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},bV),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,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,V=C.exports.useMemo(function(){return Ake(n)},[n]),Y=C.exports.useMemo(function(){return Tke(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:oM},[E]),j=C.exports.useMemo(function(){return typeof w=="function"?w:oM},[w]),te=C.exports.useRef(null),ie=C.exports.useRef(null),le=C.exports.useReducer(jke,TC),G=O6(le,2),W=G[0],q=G[1],Q=W.isFocused,X=W.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&Lke()),ye=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(et){te.current&&te.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",rM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",rM),document.removeEventListener("drop",He))}},[te,L]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var je=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(zke(Se.current),[Me.target]),t3(Me)&&Promise.resolve(i(Me)).then(function(et){if(!(s5(Me)&&!D)){var Xt=et.length,qt=Xt>0&&_ke({files:et,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!qt;q({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(et){return je(et)})},[i,u,je,D,V,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=t3(Me);if(et&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return et&&g&&g(Me),!1},[g,D]),dt=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=Se.current.filter(function(qt){return te.current&&te.current.contains(qt)}),Xt=et.indexOf(Me.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),t3(Me)&&h&&h(Me))},[te,h,D]),Xe=C.exports.useCallback(function(Me,et){var Xt=[],qt=[];Me.forEach(function(Ee){var At=pV(Ee,V),Ne=O6(At,2),at=Ne[0],sn=Ne[1],Dn=gV(Ee,a,o),Fe=O6(Dn,2),gt=Fe[0],nt=Fe[1],Nt=$?$(Ee):null;if(at&>&&!Nt)Xt.push(Ee);else{var Qt=[sn,nt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[Cke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,et),qt.length>0&&b&&b(qt,et),Xt.length>0&&v&&v(Xt,et)},[q,s,V,a,o,l,m,v,b,$]),it=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],t3(Me)&&Promise.resolve(i(Me)).then(function(et){s5(Me)&&!D||Xe(et,Me)}).catch(function(et){return je(et)}),q({type:"reset"})},[i,Xe,je,D]),It=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(et){return i(et)}).then(function(et){Xe(et,null),q({type:"closeDialog"})}).catch(function(et){Ike(et)?(j(et),q({type:"closeDialog"})):Mke(et)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):je(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."))):je(et)});return}ie.current&&(q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[q,de,j,P,Xe,je,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),It())},[te,It]),Te=C.exports.useCallback(function(){q({type:"focus"})},[]),ft=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(Pke()?setTimeout(It,0):It())},[I,It]),ut=function(et){return r?null:et},xt=function(et){return O?null:ut(et)},kn=function(et){return R?null:ut(et)},Et=function(et){D&&et.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.role,Ee=Me.onKeyDown,At=Me.onFocus,Ne=Me.onBlur,at=Me.onClick,sn=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,gt=Me.onDrop,nt=l5(Me,Nke);return ur(ur(LC({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(At,Te)),onBlur:xt(ol(Ne,ft)),onClick:ut(ol(at,Mt)),onDragEnter:kn(ol(sn,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol(Fe,dt)),onDrop:kn(ol(gt,it)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),nt)}},[te,wt,Te,ft,Mt,ct,qe,dt,it,O,R,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.onChange,Ee=Me.onClick,At=l5(Me,Dke),Ne=LC({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(qt,it)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),At)}},[ie,n,s,it,r]);return ur(ur({},W),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:ie,open:ut(It)})}function jke(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({},TC),{},{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({},TC);default:return e}}function oM(){}const Gke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Wf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Wf,{size:"lg",children:"Invalid Upload"}),x(Wf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qke=e=>{const{children:t}=e,n=$e(),r=Ce(vn),i=ch({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(P=>{a(!0);const k=P.errors.reduce((L,I)=>L+` -`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(OA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(OA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(h$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Hn,{children:[x(F$,{iconButton:!0}),x(H$,{}),x($$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=MR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(WR,{value:wV,children:x(gF,{children:x(Jke,{})})})})})})); +`.replaceAll("black",e),iCe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ce(rCe),[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=zI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=zI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),a&&r.x&&r.y&&o&&i.width&&i.height?x(w0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:isNaN(l)?0:l,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t}):null},oCe=.999,aCe=.1,sCe=20,lCe=Qe([vn,jt],(e,t)=>{const{isMoveStageKeyHeld:n,stageScale:r}=t;return{isMoveStageKeyHeld:n,stageScale:r,activeTabName:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),uCe=e=>{const t=$e(),{isMoveStageKeyHeld:n,stageScale:r,activeTabName:i}=Ce(lCe);return C.exports.useCallback(o=>{if(i!=="outpainting"||(o.evt.preventDefault(),!e.current||n))return;const a=e.current.getPointerPosition();if(!a)return;const s={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const u=Ve.clamp(r*oCe**l,aCe,sCe),h={x:a.x-s.x*u,y:a.y-s.y*u};t(I$(u)),t(R$(h))},[i,t,n,e,r])},cx=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)}},cCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),dCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(cCe);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Z4(!0));return}const o=cx(e.current);!o||(i.evt.preventDefault(),t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},fCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),hCe=(e,t)=>{const n=$e(),{tool:r,isDrawing:i,isStaging:o}=Ce(fCe);return C.exports.useCallback(()=>{if(r==="move"||o){n(Z4(!1));return}if(!t.current&&i&&e.current){const a=cx(e.current);if(!a)return;n(_$([a.x,a.y]))}else t.current=!1;n(Gb(!1))},[t,n,i,o,e,r])},pCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),gCe=(e,t,n)=>{const r=$e(),{isDrawing:i,tool:o,isStaging:a}=Ce(pCe);return C.exports.useCallback(()=>{if(!e.current)return;const s=cx(e.current);!s||(r(T$(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(_$([s.x,s.y]))))},[t,r,i,a,n,e,o])},mCe=Qe([vn,jt,ku],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),vCe=e=>{const t=$e(),{tool:n,isStaging:r}=Ce(mCe);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=cx(e.current);!o||n==="move"||r||(t(Gb(!0)),t(C$([o.x,o.y])))},[e,n,r,t])},yCe=()=>{const e=$e();return C.exports.useCallback(()=>{e(T$(null)),e(Gb(!1))},[e])},bCe=Qe([jt,ku,vn],(e,t,n)=>{const{tool:r}=e;return{tool:r,isStaging:t,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),xCe=()=>{const e=$e(),{tool:t,activeTabName:n,isStaging:r}=Ce(bCe);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!0))},[e,r,t]),handleDragMove:C.exports.useCallback(i=>{!(t==="move"||r)||e(R$(i.target.getPosition()))},[e,r,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||r)||e(Z4(!1))},[e,r,t])}};var vf=C.exports,SCe=function(t,n,r){const i=vf.useRef("loading"),o=vf.useRef(),[a,s]=vf.useState(0),l=vf.useRef(),u=vf.useRef(),h=vf.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),vf.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 EW=e=>{const{url:t,x:n,y:r}=e,[i]=SCe(t);return x(kW,{x:n,y:r,image:i,listening:!1})},wCe=Qe([jt],e=>{const{objects:t}=e.layerState;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),CCe=()=>{const{objects:e}=Ce(wCe);return e?x(dd,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(x$(t))return x(EW,{x:t.x,y:t.y,url:t.image.url},n);if(i5e(t))return x(i5,{points:t.points,stroke:t.color?ik(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},_Ce=Qe([jt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),kCe=()=>{const{colorMode:e}=Iv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ce(_Ce),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{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,L=Math.round(P/64)+1,I=Math.round(k/64)+1,O=Ve.range(0,L).map(D=>x(i5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=Ve.range(0,I).map(D=>x(i5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(R))},[t,n,r,e,a]),x(dd,{children:i})},ECe=Qe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),PCe=e=>{const{...t}=e,n=Ce(ECe),[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(kW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Hg=e=>Math.round(e*100)/100,LCe=Qe([jt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h}=e,g=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{stageWidth:t,stageHeight:n,stageX:r,stageY:i,boxWidth:o,boxHeight:a,boxX:s,boxY:l,stageScale:h,...g}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),TCe=()=>{const{stageWidth:e,stageHeight:t,stageX:n,stageY:r,boxWidth:i,boxHeight:o,boxX:a,boxY:s,cursorX:l,cursorY:u,stageScale:h}=Ce(LCe);return ee("div",{className:"canvas-status-text",children:[x("div",{children:`Stage: ${e} x ${t}`}),x("div",{children:`Stage: ${Hg(n)}, ${Hg(r)}`}),x("div",{children:`Scale: ${Hg(h)}`}),x("div",{children:`Box: ${i} x ${o}`}),x("div",{children:`Box: ${Hg(a)}, ${Hg(s)}`}),x("div",{children:`Cursor: ${l}, ${u}`})]})};var ACe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")},MCe=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{const o=re.useRef(null);re.useRef();const[a]=re.useState(()=>document.createElement("div")),s=re.useMemo(()=>U3.createRoot(a),[a]),l=r??!0,u=()=>{if(l&&o.current){let b=o.current.getAbsoluteTransform().decompose();i&&(b=i(b)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${b.x}px, ${b.y}px) rotate(${b.rotation}deg) scaleX(${b.scaleX}) scaleY(${b.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";const h=n||{},{style:g}=h,m=ACe(h,["style"]);Object.assign(a.style,g),Object.assign(a,m)};return re.useLayoutEffect(()=>{var h;const g=o.current;if(!g)return;const m=(h=g.getStage())===null||h===void 0?void 0:h.container();if(!!m)return m.appendChild(a),l&&ICe(m)&&(m.style.position="relative"),g.on("absoluteTransformChange",u),u(),()=>{var v;g.off("absoluteTransformChange",u),(v=a.parentNode)===null||v===void 0||v.removeChild(a)}},[l]),re.useLayoutEffect(()=>{u()},[n]),re.useLayoutEffect(()=>{s.render(e)}),re.useEffect(()=>()=>{s.unmount()},[]),x(dd,{...Object.assign({ref:o},t)})},OCe=Qe([jt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),RCe=e=>{const{...t}=e,n=$e(),{isOnFirstImage:r,isOnLastImage:i,currentStagingAreaImage:o}=Ce(OCe),[a,s]=C.exports.useState(!0);if(!o)return null;const{x:l,y:u,image:{width:h,height:g,url:m}}=o;return ee(dd,{...t,children:[ee(dd,{children:[a&&x(EW,{url:m,x:l,y:u}),x(w0,{x:l,y:u,width:h,height:g,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(w0,{x:l,y:u,width:h,height:g,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]}),x(MCe,{children:x(HR,{value:wV,children:x(pF,{children:x("div",{style:{position:"absolute",top:u+g,left:l+h/2-216/2,padding:"0.5rem",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))"},children:ee(ro,{isAttached:!0,children:[x(pt,{tooltip:"Previous",tooltipProps:{placement:"bottom"},"aria-label":"Previous",icon:x(k4e,{}),onClick:()=>n(w5e()),"data-selected":!0,isDisabled:r}),x(pt,{tooltip:"Next",tooltipProps:{placement:"bottom"},"aria-label":"Next",icon:x(E4e,{}),onClick:()=>n(S5e()),"data-selected":!0,isDisabled:i}),x(pt,{tooltip:"Accept",tooltipProps:{placement:"bottom"},"aria-label":"Accept",icon:x(g$,{}),onClick:()=>n(C5e()),"data-selected":!0}),x(pt,{tooltip:"Show/Hide",tooltipProps:{placement:"bottom"},"aria-label":"Show/Hide","data-alert":!a,icon:a?x(M4e,{}):x(I4e,{}),onClick:()=>s(!a),"data-selected":!0}),x(pt,{tooltip:"Discard All",tooltipProps:{placement:"bottom"},"aria-label":"Discard All",icon:x(I_,{}),onClick:()=>n(_5e()),"data-selected":!0})]})})})})})]})},NCe=Qe([jt,qb,ku,vn],(e,t,n,r)=>{const{isMaskEnabled:i,stageScale:o,shouldShowBoundingBox:a,isTransformingBoundingBox:s,isMouseOverBoundingBox:l,isMovingBoundingBox:u,stageDimensions:h,stageCoordinates:g,tool:m,isMovingStage:v}=e,{shouldShowGrid:b}=t;let w="";return m==="move"||n?v?w="grabbing":w="grab":s?w=void 0:l?w="move":w="none",{isMaskEnabled:i,isModifyingBoundingBox:s||u,shouldShowBoundingBox:a,shouldShowGrid:b,stageCoordinates:g,stageCursor:w,stageDimensions:h,stageScale:o,tool:m,isOnOutpaintingTab:r==="outpainting",isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}});let kc,au;const PW=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isOnOutpaintingTab:u,isStaging:h}=Ce(NCe);nCe(),kc=C.exports.useRef(null),au=C.exports.useRef(null);const g=C.exports.useRef({x:0,y:0}),m=C.exports.useRef(!1),v=uCe(kc),b=dCe(kc),w=hCe(kc,m),E=gCe(kc,m,g),P=vCe(kc),k=yCe(),{handleDragStart:L,handleDragMove:I,handleDragEnd:O}=xCe();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(K8e,{tabIndex:-1,ref:kc,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},onMouseDown:b,onMouseEnter:P,onMouseLeave:k,onMouseMove:E,onMouseOut:k,onMouseUp:w,onDragStart:L,onDragMove:I,onDragEnd:O,onWheel:v,listening:(l==="move"||h)&&!t,draggable:(l==="move"||h)&&!t&&u,children:[x(Fg,{id:"grid",visible:r,children:x(kCe,{})}),ee(Fg,{id:"image",ref:au,listening:!1,imageSmoothingEnabled:!1,children:[x(CCe,{}),x(PCe,{})]}),ee(Fg,{id:"mask",visible:e,listening:!1,children:[x(Z8e,{visible:!0,listening:!1}),x(iCe,{listening:!1})]}),x(Fg,{id:"tool",children:!h&&ee(Hn,{children:[x(eCe,{visible:n}),x(Q8e,{visible:l!=="move",listening:!1})]})}),x(Fg,{imageSmoothingEnabled:!1,children:h&&x(RCe,{})})]}),u&&x(TCe,{})]})})},DCe=Qe([Xv,e=>e.canvas,e=>e.options],(e,t,n)=>{const{doesCanvasNeedScaling:r}=t,{showDualDisplay:i}=n;return{doesCanvasNeedScaling:r,showDualDisplay:i,baseCanvasImage:e}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),zCe=()=>{const e=$e(),{showDualDisplay:t,doesCanvasNeedScaling:n,baseCanvasImage:r}=Ce(DCe);return C.exports.useLayoutEffect(()=>{const o=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),ee("div",{className:t?"workarea-split-view":"workarea-single-view",children:[x("div",{className:"workarea-split-view-left",children:r?ee("div",{className:"inpainting-main-area",children:[x(N6e,{}),x("div",{className:"inpainting-canvas-area",children:n?x(HH,{}):x(PW,{})})]}):x(K$,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(F_,{})})]})};function BCe(){const e=$e();return C.exports.useEffect(()=>{e(N$("inpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(i6e,{}),styleClass:"inpainting-workarea-overrides",children:x(zCe,{})})}function FCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})},other:{header:x(a$,{}),feature:Xr.OTHER,options:x(s$,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(Wb,{}),e?x(Ub,{accordionInfo:t}):null]})}const $Ce=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(F_,{})})});function HCe(){return x(rx,{optionsPanel:x(FCe,{}),children:x($Ce,{})})}var LW={exports:{}},o5={};const TW=Xq(SZ);var ui=TW.jsx,Qy=TW.jsxs;Object.defineProperty(o5,"__esModule",{value:!0});var Ec=C.exports;function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(e,t)}var M6=function(e){var t,n;function r(){var o;return(o=e.apply(this,arguments)||this).getInitialState=function(){var a=o.props,s=a.pandx,l=a.pandy,u=a.zoom;return{comesFromDragging:!1,dragData:{dx:s,dy:l,x:0,y:0},dragging:!1,matrixData:[u,0,0,u,s,l],mouseDown:!1}},o.state=o.getInitialState(),o.reset=function(){o.setState({matrixData:[.4,0,0,.4,0,0]}),o.props.onReset&&o.props.onReset(0,0,1)},o.onClick=function(a){o.state.comesFromDragging||o.props.onClick&&o.props.onClick(a)},o.onTouchStart=function(a){var s=a.touches[0];o.panStart(s.pageX,s.pageY,a)},o.onTouchEnd=function(){o.onMouseUp()},o.onTouchMove=function(a){o.updateMousePosition(a.touches[0].pageX,a.touches[0].pageY)},o.onMouseDown=function(a){o.panStart(a.pageX,a.pageY,a)},o.panStart=function(a,s,l){if(o.props.enablePan){var u=o.state.matrixData;o.setState({dragData:{dx:u[4],dy:u[5],x:a,y:s},mouseDown:!0}),o.panWrapper&&(o.panWrapper.style.cursor="move"),l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),l.preventDefault()}},o.onMouseUp=function(){o.panEnd()},o.panEnd=function(){o.setState({comesFromDragging:o.state.dragging,dragging:!1,mouseDown:!1}),o.panWrapper&&(o.panWrapper.style.cursor=""),o.props.onPan&&o.props.onPan(o.state.matrixData[4],o.state.matrixData[5])},o.onMouseMove=function(a){o.updateMousePosition(a.pageX,a.pageY)},o.onWheel=function(a){Math.sign(a.deltaY)<0?o.props.setZoom((o.props.zoom||0)+.1):(o.props.zoom||0)>1&&o.props.setZoom((o.props.zoom||0)-.1)},o.onMouseEnter=function(){document.addEventListener("wheel",o.preventDefault,{passive:!1})},o.onMouseLeave=function(){document.removeEventListener("wheel",o.preventDefault,!1)},o.updateMousePosition=function(a,s){if(o.state.mouseDown){var l=o.getNewMatrixData(a,s);o.setState({dragging:!0,matrixData:l}),o.panContainer&&(o.panContainer.style.transform="matrix("+o.state.matrixData.toString()+")")}},o.getNewMatrixData=function(a,s){var l=o.state,u=l.dragData,h=l.matrixData,g=u.y-s;return h[4]=u.dx-(u.x-a),h[5]=u.dy-g,h},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,AW(t,n);var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(o){if(this.state.matrixData[0]!==o.zoom){var a=[].concat(this.state.matrixData);a[0]=o.zoom||a[0],a[3]=o.zoom||a[3],this.setState({matrixData:a})}},i.render=function(){var o=this;return ui("div",{className:"pan-container "+(this.props.className||""),onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseMove:this.onMouseMove,onWheel:this.onWheel,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick,style:{height:this.props.height,userSelect:"none",width:this.props.width},ref:function(a){return o.panWrapper=a},children:ui("div",{ref:function(a){return a?o.panContainer=a:null},style:{transform:"matrix("+this.state.matrixData.toString()+")"},children:this.props.children})})},i.preventDefault=function(o){(o=o||window.event).preventDefault&&o.preventDefault(),o.returnValue=!1},r}(Ec.PureComponent);M6.defaultProps={enablePan:!0,onPan:function(){},onReset:function(){},pandx:0,pandy:0,zoom:0,rotation:0},o5.PanViewer=M6,o5.default=function(e){var t=e.image,n=e.alt,r=e.ref,i=Ec.useState(0),o=i[0],a=i[1],s=Ec.useState(0),l=s[0],u=s[1],h=Ec.useState(1),g=h[0],m=h[1],v=Ec.useState(0),b=v[0],w=v[1],E=Ec.useState(!1),P=E[0],k=E[1];return Ec.createElement("div",null,Qy("div",{style:{position:"absolute",right:"10px",zIndex:2,top:10,userSelect:"none",borderRadius:2,background:"#fff",boxShadow:"0px 2px 6px rgba(53, 67, 93, 0.32)"},children:[ui("div",{onClick:function(){m(g+.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"}),ui("path",{d:"M12 4L12 20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})]})}),ui("div",{onClick:function(){g>=1&&m(g-.2)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ui("path",{d:"M4 12H20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round"})})}),ui("div",{onClick:function(){w(b===-3?0:b-1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{d:"M14 15L9 20L4 15",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ui("path",{d:"M20 4H13C10.7909 4 9 5.79086 9 8V20",stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ui("div",{onClick:function(){k(!P)},style:{textAlign:"center",cursor:"pointer",height:40,width:40,borderBottom:" 1px solid #ccc"},children:Qy("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ui("path",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M9.178,18.799V1.763L0,18.799H9.178z M8.517,18.136h-7.41l7.41-13.752V18.136z"}),ui("polygon",{stroke:"#4C68C1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:"11.385,1.763 11.385,18.799 20.562,18.799 "})]})}),ui("div",{onClick:function(){a(0),u(0),m(1),w(0),k(!1)},style:{textAlign:"center",cursor:"pointer",height:40,width:40},children:ui("svg",{style:{height:"100%",width:"100%",padding:10,boxSizing:"border-box"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#4C68C1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:ui("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]}),Ec.createElement(M6,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:g,setZoom:m,pandx:o,pandy:l,onPan:function(L,I){a(L),u(I)},rotation:b,key:o},ui("img",{style:{transform:"rotate("+90*b+"deg) scaleX("+(P?-1:1)+")",width:"100%"},src:t,alt:n,ref:r})))};(function(e){e.exports=o5})(LW);function WCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(0),[l,u]=C.exports.useState(1),[h,g]=C.exports.useState(0),[m,v]=C.exports.useState(!1),b=()=>{o(0),s(0),u(1),g(0),v(!1)},w=()=>{u(l+.2)},E=()=>{l>=.5&&u(l-.2)},P=()=>{g(h===-3?0:h-1)},k=()=>{g(h===3?0:h+1)},L=()=>{v(!m)},I=(O,R)=>{o(O),s(R)};return ee("div",{children:[ee("div",{className:"lightbox-image-options",children:[x(pt,{icon:x(M3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:w,fontSize:20}),x(pt,{icon:x(O3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:E,fontSize:20}),x(pt,{icon:x(A3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:P,fontSize:20}),x(pt,{icon:x(I3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:k,fontSize:20}),x(pt,{icon:x(g4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:L,fontSize:20}),x(pt,{icon:x(P_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:b,fontSize:20})]}),x(LW.exports.PanViewer,{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1},zoom:l,setZoom:u,pandx:i,pandy:a,onPan:I,rotation:h,children:x("img",{style:{transform:`rotate(${h*90}deg) scaleX(${m?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})},i)]})}function VCe(){const e=$e(),t=Ce(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ce(tH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(B_())},g=()=>{e(z_())};return vt("Esc",()=>{t&&e(_l(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(pt,{icon:x(T3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(_l(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(Y$,{}),!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(Ps,{"aria-label":"Previous image",icon:x(h$,{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(Ps,{"aria-label":"Next image",icon:x(p$,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Hn,{children:[x(WCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(eH,{image:n})]})]}),x(RH,{})]})]})}function UCe(){const e=Ce(n=>n.options.showAdvancedOptions),t={seed:{header:x(zb,{}),feature:Xr.SEED,options:x(Bb,{})},variations:{header:x($b,{}),feature:Xr.VARIATIONS,options:x(Hb,{})},face_restore:{header:x(Db,{}),feature:Xr.FACE_CORRECTION,options:x(Yv,{})},upscale:{header:x(Fb,{}),feature:Xr.UPSCALE,options:x(Zv,{})}};return ee(Zb,{children:[x(Yb,{}),x(Kb,{}),x(Vb,{}),x(L_,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(NH,{}),x(Wb,{}),e&&x(Ub,{accordionInfo:t})]})}const jCe=Qe([jt,qb],(e,t)=>{const{shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}=e,{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a}=t;return{shouldShowGrid:i,shouldSnapToGrid:o,shouldAutoSave:a,shouldDarkenOutsideBoundingBox:n,shouldShowIntermediates:r}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),GCe=()=>{const e=$e(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o}=Ce(jCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{variant:"link","data-variant":"link",tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(O_,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:t,onChange:a=>e(x5e(a.target.checked))}),x(Aa,{label:"Show Grid",isChecked:n,onChange:a=>e(v5e(a.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:r,onChange:a=>e(y5e(a.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:o,onChange:a=>e(M$(a.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:i,onChange:a=>e(b5e(a.target.checked))})]})})},qCe=Qe([jt,ku],(e,t)=>{const{eraserSize:n,tool:r}=e;return{tool:r,eraserSize:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),KCe=()=>{const e=$e(),{tool:t,eraserSize:n,isStaging:r}=Ce(qCe),i=()=>e(ud("eraser"));return vt("e",o=>{o.preventDefault(),i()},{enabled:!0},[t]),x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Eraser (E)",tooltip:"Eraser (E)",icon:x(y$,{}),"data-selected":t==="eraser"&&!r,isDisabled:r,onClick:()=>e(ud("eraser"))}),children:x(on,{minWidth:"15rem",direction:"column",gap:"1rem",children:x(fh,{label:"Size",value:n,withInput:!0,onChange:o=>e(u5e(o))})})})},YCe=Qe([jt,ku],(e,t)=>{const{brushColor:n,brushSize:r,tool:i}=e;return{tool:i,brushColor:n,brushSize:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),ZCe=()=>{const e=$e(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ce(YCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Brush (B)",tooltip:"Brush (B)",icon:x(b$,{}),"data-selected":t==="brush"&&!i,onClick:()=>e(ud("brush")),isDisabled:i}),children:ee(on,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(on,{gap:"1rem",justifyContent:"space-between",children:x(fh,{label:"Size",value:r,withInput:!0,onChange:o=>e(w$(o))})}),x(K_,{style:{width:"100%"},color:n,onChange:o=>e(l5e(o))})]})})},XCe=Qe([jt],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),QCe=()=>{const e=$e(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ce(XCe);return x(ks,{trigger:"hover",triggerComponent:x(pt,{"aria-label":"Select Mask Layer",tooltip:"Select Mask Layer","data-alert":t==="mask",onClick:()=>e(s5e(t==="mask"?"base":"mask")),icon:x(B4e,{})}),children:ee(on,{direction:"column",gap:"0.5rem",children:[x(ul,{onClick:()=>e(L$()),children:"Clear Mask"}),x(Aa,{label:"Enable Mask",isChecked:r,onChange:o=>e(E$(o.target.checked))}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:o=>e(k$(o.target.checked))}),x(K_,{color:n,onChange:o=>e(P$(o))})]})})},JCe=Qe([jt,ku],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),e7e=()=>{const e=$e(),{tool:t,isStaging:n}=Ce(JCe);return ee("div",{className:"inpainting-settings",children:[x(QCe,{}),ee(ro,{isAttached:!0,children:[x(ZCe,{}),x(KCe,{}),x(pt,{"aria-label":"Move (M)",tooltip:"Move (M)",icon:x(P4e,{}),"data-selected":t==="move"||n,onClick:()=>e(ud("move"))})]}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Merge Visible",tooltip:"Merge Visible",icon:x(D4e,{}),onClick:()=>{e(D$(au))}}),x(pt,{"aria-label":"Save Selection to Gallery",tooltip:"Save Selection to Gallery",icon:x(G4e,{})}),x(pt,{"aria-label":"Copy Selection",tooltip:"Copy Selection",icon:x(A_,{})}),x(pt,{"aria-label":"Download Selection",tooltip:"Download Selection",icon:x(v$,{})})]}),ee(ro,{isAttached:!0,children:[x(FH,{}),x($H,{})]}),x(ro,{isAttached:!0,children:x(GCe,{})}),ee(ro,{isAttached:!0,children:[x(pt,{"aria-label":"Upload",tooltip:"Upload",icon:x(M_,{})}),x(pt,{"aria-label":"Reset Canvas",tooltip:"Reset Canvas",icon:x(I_,{}),onClick:()=>e(m5e())})]})]})},t7e=Qe([e=>e.canvas],e=>{const{doesCanvasNeedScaling:t,outpainting:{layerState:{objects:n}}}=e;return{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n.length>0}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),n7e=()=>{const e=$e(),{doesCanvasNeedScaling:t,doesOutpaintingHaveObjects:n}=Ce(t7e);return C.exports.useLayoutEffect(()=>{const r=Ve.debounce(()=>e(Cr(!0)),250);return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(e7e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(HH,{}):x(PW,{})})]})})})};function r7e(){const e=$e();return C.exports.useEffect(()=>{e(N$("outpainting")),e(Cr(!0))},[e]),x(rx,{optionsPanel:x(UCe,{}),styleClass:"inpainting-workarea-overrides",children:x(n7e,{})})}const Pf={txt2img:{title:x(m3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(HCe,{}),tooltip:"Text To Image"},img2img:{title:x(d3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(jSe,{}),tooltip:"Image To Image"},inpainting:{title:x(f3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(BCe,{}),tooltip:"Inpainting"},outpainting:{title:x(p3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(r7e,{}),tooltip:"Outpainting"},nodes:{title:x(h3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(u3e,{}),tooltip:"Nodes"},postprocess:{title:x(g3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(c3e,{}),tooltip:"Post Processing"}},dx=Ve.map(Pf,(e,t)=>t);[...dx];function i7e(){const e=Ce(s=>s.options.activeTab),t=Ce(s=>s.options.isLightBoxOpen),n=Ce(s=>s.gallery.shouldShowGallery),r=Ce(s=>s.options.shouldShowOptionsPanel),i=$e();vt("1",()=>{i(_o(0))}),vt("2",()=>{i(_o(1))}),vt("3",()=>{i(_o(2))}),vt("4",()=>{i(_o(3))}),vt("5",()=>{i(_o(4))}),vt("6",()=>{i(_o(5))}),vt("v",()=>{i(_l(!t))},[t]),vt("f",()=>{n||r?(i(C0(!1)),i(b0(!1))):(i(C0(!0)),i(b0(!0))),setTimeout(()=>i(Cr(!0)),400)},[n,r]);const o=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(Ui,{hasArrow:!0,label:Pf[l].tooltip,placement:"right",children:x(uF,{children:Pf[l].title})},l))}),s},a=()=>{const s=[];return Object.keys(Pf).forEach(l=>{s.push(x(sF,{className:"app-tabs-panel",children:Pf[l].workarea},l))}),s};return ee(aF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:s=>{i(_o(s)),i(Cr(!0))},children:[x("div",{className:"app-tabs-list",children:o()}),x(lF,{className:"app-tabs-panels",children:t?x(VCe,{}):a()})]})}const IW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},o7e=IW,MW=yb({name:"options",initialState:o7e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M3(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=K4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M3(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=K4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M3(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)},resetOptionsState:e=>({...e,...IW}),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=dx.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}}}),{setPrompt:fx,setIterations:a7e,setSteps:OW,setCfgScale:RW,setThreshold:s7e,setPerlin:l7e,setHeight:NW,setWidth:DW,setSampler:zW,setSeed:t2,setSeamless:BW,setHiresFix:FW,setImg2imgStrength:p8,setFacetoolStrength:D3,setFacetoolType:z3,setCodeformerFidelity:$W,setUpscalingLevel:g8,setUpscalingStrength:m8,setMaskPath:v8,resetSeed:gEe,resetOptionsState:mEe,setShouldFitToWidthHeight:HW,setParameter:vEe,setShouldGenerateVariations:u7e,setSeedWeights:WW,setVariationAmount:c7e,setAllParameters:d7e,setShouldRunFacetool:f7e,setShouldRunESRGAN:h7e,setShouldRandomizeSeed:p7e,setShowAdvancedOptions:g7e,setActiveTab:_o,setShouldShowImageDetails:VW,setAllTextToImageParameters:m7e,setAllImageToImageParameters:v7e,setShowDualDisplay:y7e,setInitialImage:_v,clearInitialImage:UW,setShouldShowOptionsPanel:C0,setShouldPinOptionsPanel:b7e,setOptionsPanelScrollPosition:x7e,setShouldHoldOptionsPanelOpen:S7e,setShouldLoopback:w7e,setCurrentTheme:C7e,setIsLightBoxOpen:_l}=MW.actions,_7e=MW.reducer,Tl=Object.create(null);Tl.open="0";Tl.close="1";Tl.ping="2";Tl.pong="3";Tl.message="4";Tl.upgrade="5";Tl.noop="6";const B3=Object.create(null);Object.keys(Tl).forEach(e=>{B3[Tl[e]]=e});const k7e={type:"error",data:"parser error"},E7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",P7e=typeof ArrayBuffer=="function",L7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jW=({type:e,data:t},n,r)=>E7e&&t instanceof Blob?n?r(t):BI(t,r):P7e&&(t instanceof ArrayBuffer||L7e(t))?n?r(t):BI(new Blob([t]),r):r(Tl[e]+(t||"")),BI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},FI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",om=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},A7e=typeof ArrayBuffer=="function",GW=(e,t)=>{if(typeof e!="string")return{type:"message",data:qW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I7e(e.substring(1),t)}:B3[n]?e.length>1?{type:B3[n],data:e.substring(1)}:{type:B3[n]}:k7e},I7e=(e,t)=>{if(A7e){const n=T7e(e);return qW(n,t)}else return{base64:!0,data:e}},qW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},KW=String.fromCharCode(30),M7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{jW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(KW))})})},O7e=(e,t)=>{const n=e.split(KW),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ZW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N7e=setTimeout,D7e=clearTimeout;function hx(e,t){t.useNativeTimers?(e.setTimeoutFn=N7e.bind(Uc),e.clearTimeoutFn=D7e.bind(Uc)):(e.setTimeoutFn=setTimeout.bind(Uc),e.clearTimeoutFn=clearTimeout.bind(Uc))}const z7e=1.33;function B7e(e){return typeof e=="string"?F7e(e):Math.ceil((e.byteLength||e.size)*z7e)}function F7e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class $7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class XW extends Vr{constructor(t){super(),this.writable=!1,hx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new $7e(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=GW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const QW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,H7e={};let $I=0,Jy=0,HI;function WI(e){let t="";do t=QW[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function JW(){const e=WI(+new Date);return e!==HI?($I=0,HI=e):e+"."+WI($I++)}for(;Jy{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)};O7e(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,M7e(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]=JW()),!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=eV(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 kl(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 kl extends Vr{constructor(t,n){super(),hx(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=ZW(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 nV(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=kl.requestsCount++,kl.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=U7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete kl.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()}}kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VI);else if(typeof addEventListener=="function"){const e="onpagehide"in Uc?"pagehide":"unload";addEventListener(e,VI,!1)}}function VI(){for(let e in kl.requests)kl.requests.hasOwnProperty(e)&&kl.requests[e].abort()}const rV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),e3=Uc.WebSocket||Uc.MozWebSocket,UI=!0,q7e="arraybuffer",jI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K7e extends XW{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=jI?{}:ZW(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=UI&&!jI?n?new e3(t,n):new e3(t):new e3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||q7e,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{UI&&this.ws.send(o)}catch{}i&&rV(()=>{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]=JW()),this.supportsBinary||(t.b64=1);const i=eV(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!!e3}}const Y7e={websocket:K7e,polling:G7e},Z7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(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=Z7e.exec(e||""),o={},a=14;for(;a--;)o[X7e[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=Q7e(o,o.path),o.queryKey=J7e(o,o.query),o}function Q7e(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 J7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Bc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(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=b8(n.host).host),hx(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=W7e(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=YW,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 Y7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bc.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;Bc.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;Bc.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",Bc.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){Bc.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,iV=Object.prototype.toString,r_e=typeof Blob=="function"||typeof Blob<"u"&&iV.call(Blob)==="[object BlobConstructor]",i_e=typeof File=="function"||typeof File<"u"&&iV.call(File)==="[object FileConstructor]";function ok(e){return t_e&&(e instanceof ArrayBuffer||n_e(e))||r_e&&e instanceof Blob||i_e&&e instanceof File}function F3(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 u_e{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=a_e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c_e=Object.freeze(Object.defineProperty({__proto__:null,protocol:s_e,get PacketType(){return nn},Encoder:l_e,Decoder:ak},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const d_e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class oV 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=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(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(d_e.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}s1.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};s1.prototype.reset=function(){this.attempts=0};s1.prototype.setMin=function(e){this.ms=e};s1.prototype.setMax=function(e){this.max=e};s1.prototype.setJitter=function(e){this.jitter=e};class w8 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,hx(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 s1({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||c_e;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 Bc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(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(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(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){rV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new oV(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 Wg={};function $3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e_e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Wg[i]&&o in Wg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(Wg[i]||(Wg[i]=new w8(r,t)),l=Wg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($3,{Manager:w8,Socket:oV,io:$3,connect:$3});var f_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,h_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p_e=/[^-+\dA-Z]/g;function Pi(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(GI[t]||t||GI.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 g_e(e)},E=function(){return m_e(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return qI({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.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 g()},MM:function(){return Qo(g())},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?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":v_e(e)},o:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Qo(Math.floor(Math.abs(b())/60),2)+":"+Qo(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 Qo(w())},N:function(){return E()}};return t.replace(f_e,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var GI={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"},Co={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")},qI=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"]()},L=function(){return g[o+"Month"]()},I=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":I()===n&&L()===r&&k()===i?l?"Tmw":"Tomorrow":a},g_e=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)},m_e=function(t){var n=t.getDay();return n===0&&(n=7),n},v_e=function(t){return(String(t).match(h_e)||[""]).pop().replace(p_e,"").replace(/GMT\+0000/g,"UTC")};const y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(CA(!0)),t(d6("Connected")),t(A5e());const r=n().gallery;r.categories.user.latest_mtime?t(IA("user")):t(V9("user")),r.categories.result.latest_mtime?t(IA("result")):t(V9("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(CA(!1)),t(d6("Disconnected")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const{shouldLoopback:i,activeTab:o}=n().options,a={uuid:Ap(),...r,category:"result"};if(t(Oy({category:"result",image:a})),r.generationMode==="outpainting"&&r.boundingBox){const{boundingBox:s}=r;t(g5e({image:a,boundingBox:s}))}if(i)switch(dx[o]){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(G5e({uuid:Ap(),...r})),r.isBase64||t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Oy({category:"result",image:{uuid:Ap(),...r,category:"result"}})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(y0(!0)),t(i4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(H9()),t(NA())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Ap(),...l}));t(j5e({images:s,areMoreImagesAvailable:o,category:a})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(s4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Oy({category:"result",image:r})),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(NA())),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(X$(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(UW()),a===i&&t(v8("")),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onImageUploaded:r=>{const{destination:i,...o}=r,a={uuid:Ap(),...o};try{switch(t(Oy({image:a,category:"user"})),i){case"img2img":{t(_v(a));break}case"inpainting":{t(Y4(a));break}default:{t(Q$(a));break}}t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image uploaded: ${r.url}`}))}catch(s){console.error(s)}},onMaskImageUploaded:r=>{const{url:i}=r;t(v8(i)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Mask image uploaded: ${i}`}))},onSystemConfig:r=>{t(o4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(d6("Model Changed")),t(y0(!1)),t(kA(!0)),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(_A(o)),t(y0(!1)),t(kA(!0)),t(H9()),t(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},b_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new zg.Stage({container:i,width:n,height:r}),a=new zg.Layer,s=new zg.Layer;a.add(new zg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new zg.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},x_e=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("

")})},S_e=e=>{const{generationMode:t,optionsState:n,canvasState:r,systemState:i,imageToProcessUrl:o}=e,{prompt:a,iterations:s,steps:l,cfgScale:u,threshold:h,perlin:g,height:m,width:v,sampler:b,seed:w,seamless:E,hiresFix:P,img2imgStrength:k,initialImage:L,shouldFitToWidthHeight:I,shouldGenerateVariations:O,variationAmount:R,seedWeights:D,shouldRunESRGAN:z,upscalingLevel:$,upscalingStrength:V,shouldRunFacetool:Y,facetoolStrength:de,codeformerFidelity:j,facetoolType:te,shouldRandomizeSeed:ie}=n,{shouldDisplayInProgressType:le,saveIntermediatesInterval:G,enableImageDebugging:W}=i,q={prompt:a,iterations:ie||O?s:1,steps:l,cfg_scale:u,threshold:h,perlin:g,height:m,width:v,sampler_name:b,seed:w,progress_images:le==="full-res",progress_latents:le==="latents",save_intermediates:G,generation_mode:t,init_mask:""};if(q.seed=ie?l$(k_,E_):w,["txt2img","img2img"].includes(t)&&(q.seamless=E,q.hires_fix=P),t==="img2img"&&L&&(q.init_img=typeof L=="string"?L:L.url,q.strength=k,q.fit=I),["inpainting","outpainting"].includes(t)&&au.current){const{layerState:{objects:me},boundingBoxCoordinates:ye,boundingBoxDimensions:Se,inpaintReplace:He,shouldUseInpaintReplace:je,stageScale:ct,isMaskEnabled:qe,shouldPreserveMaskedArea:dt}=r[r.currentCanvas],Xe={...ye,...Se},it=b_e(qe?me.filter(jb):[],Xe);if(q.init_mask=it,q.fit=!1,q.init_img=o,q.strength=k,q.invert_mask=dt,je&&(q.inpaint_replace=He),q.bounding_box=Xe,t==="outpainting"){const It=au.current.scale();au.current.scale({x:1/ct,y:1/ct});const wt=au.current.getAbsolutePosition(),Te=au.current.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});W&&x_e([{base64:it,caption:"mask sent as init_mask"},{base64:Te,caption:"image sent as init_img"}]),au.current.scale(It),q.init_img=Te,q.progress_images=!1,q.seam_size=96,q.seam_blur=16,q.seam_strength=.7,q.seam_steps=10,q.tile_size=32,q.force_outpaint=!1}}O?(q.variation_amount=R,D&&(q.with_variations=L2e(D))):q.variation_amount=0;let Q=!1,X=!1;return z&&(Q={level:$,strength:V}),Y&&(X={type:te,strength:de},te==="codeformer"&&(X.codeformer_fidelity=j)),W&&(q.enable_image_debugging=W),{generationParameters:q,esrganParameters:Q,facetoolParameters:X}},w_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(y0(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(i==="inpainting"){const w=Xv(r())?.image.url;if(!w){n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:"Inpainting image not loaded, cannot generate image.",level:"error"})),n(H9());return}h.imageToProcessUrl=w}else if(!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=S_e(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(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(y0(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(y0(!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(Ei({timestamp:Pi(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s}=i;n(X$(i)),t.emit("deleteImage",o,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")},emitUploadImage:i=>{const{file:o,destination:a}=i;t.emit("uploadImage",o,o.name,a)},emitUploadMaskImage:i=>{t.emit("uploadMaskImage",i,i.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(l4e()),t.emit("requestModelChange",i)}}},C_e=()=>{const{origin:e}=new URL(window.location.href),t=$3(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,onImageUploaded:P,onMaskImageUploaded:k,onSystemConfig:L,onModelChanged:I,onModelChangeFailed:O}=y_e(i),{emitGenerateImage:R,emitRunESRGAN:D,emitRunFacetool:z,emitDeleteImage:$,emitRequestImages:V,emitRequestNewImages:Y,emitCancelProcessing:de,emitUploadImage:j,emitUploadMaskImage:te,emitRequestSystemConfig:ie,emitRequestModelChange:le}=w_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",G=>u(G)),t.on("generationResult",G=>g(G)),t.on("postprocessingResult",G=>h(G)),t.on("intermediateResult",G=>m(G)),t.on("progressUpdate",G=>v(G)),t.on("galleryImages",G=>b(G)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",G=>{E(G)}),t.on("imageUploaded",G=>{P(G)}),t.on("maskImageUploaded",G=>{k(G)}),t.on("systemConfig",G=>{L(G)}),t.on("modelChanged",G=>{I(G)}),t.on("modelChangeFailed",G=>{O(G)}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{D(a.payload);break}case"socketio/runFacetool":{z(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{Y(a.payload);break}case"socketio/cancelProcessing":{de();break}case"socketio/uploadImage":{j(a.payload);break}case"socketio/uploadMaskImage":{te(a.payload);break}case"socketio/requestSystemConfig":{ie();break}case"socketio/requestModelChange":{le(a.payload);break}}o(a)}},aV=["cursorPosition"],__e=aV.map(e=>`canvas.inpainting.${e}`),k_e=aV.map(e=>`canvas.outpainting.${e}`),E_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),P_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),sV=xF({options:_7e,gallery:Q5e,system:d4e,canvas:k5e}),L_e=$F.getPersistConfig({key:"root",storage:FF,rootReducer:sV,blacklist:[...__e,...k_e,...E_e,...P_e],debounce:300}),T_e=d2e(L_e,sV),lV=ive({reducer:T_e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C_e()),devTools:{actionsDenylist:[]}}),$e=Zve,Ce=Fve;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function A_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var n=0;nx(on,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Wv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),N_e=Qe(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),D_e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ce(N_e),i=t?Math.round(t*100/n):0;return x(WB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function z_e(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 B_e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=N4(),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:"V"},{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-6"},{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"},{title:"Reset Gallery Image Size",desc:"Resets image gallery size",hotkey:"Shift+R"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Quick Toggle Brush/Eraser",desc:"Quick toggle between brush and eraser",hotkey:"X"},{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:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Decrease Mask Opacity",desc:"Decreases the opacity of the mask",hotkey:"Shift+["},{title:"Increase Mask Opacity",desc:"Increases the opacity of the mask",hotkey:"Shift+]"},{title:"Invert Mask",desc:"Invert the mask preview",hotkey:"Shift+M"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{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:"Lock Bounding Box",desc:"Locks the bounding box",hotkey:"Shift+W"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Quick Toggle Lock Bounding Box",desc:"Hold to toggle locking the bounding box",hotkey:"W"},{title:"Expand Inpainting Area",desc:"Expand your inpainting work area",hotkey:"Shift+J"}],l=[{title:"Erase Canvas",desc:"Erase the images on the canvas",hotkey:"Shift+E"}],u=h=>{const g=[];return h.forEach((m,v)=>{g.push(x(z_e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),x("div",{className:"hotkey-modal-category",children:g})};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(F0,{isOpen:t,onClose:r,children:[x(bv,{}),ee(yv,{className:" modal hotkeys-modal",children:[x(j7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(ib,{allowMultiple:!0,children:[ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(i)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(o)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(a)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Inpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(s)})]}),ee(Nc,{children:[ee(Oc,{className:"hotkeys-modal-button",children:[x("h2",{children:"Outpainting Hotkeys"}),x(Rc,{})]}),x(Dc,{children:u(l)})]})]})})]})]})]})}const F_e=e=>{const{isProcessing:t,isConnected:n}=Ce(l=>l.system),r=$e(),{name:i,status:o,description:a}=e,s=()=>{r(I5e(i))};return ee("div",{className:"model-list-item",children:[x(Ui,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(yz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Ra,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},$_e=Qe(e=>e.system,e=>{const t=Ve.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),H_e=()=>{const{models:e}=Ce($_e);return x(ib,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Nc,{children:[x(Oc,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Rc,{})]})}),x(Dc,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(F_e,{name:t.name,status:t.status,description:t.description},n))})})]})})},W_e=Qe(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ve.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),V_e=({children:e})=>{const t=$e(),n=Ce(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=N4(),{isOpen:a,onOpen:s,onClose:l}=N4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Ce(W_e),b=()=>{SV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(u4e(E))};return ee(Hn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(F0,{isOpen:r,onClose:o,children:[x(bv,{}),ee(yv,{className:"modal settings-modal",children:[x(q7,{className:"settings-modal-header",children:"Settings"}),x(j7,{className:"modal-close-btn"}),ee(F4,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(H_e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(dh,{label:"Display In-Progress Images",validValues:C3e,value:u,onChange:E=>t(n4e(E.target.value))}),u==="full-res"&&x($a,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(_s,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(c$(E.target.checked))}),x(_s,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(_s,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(c4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Wf,{size:"md",children:"Reset Web UI"}),x(Ra,{colorScheme:"red",onClick:b,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(G7,{children:x(Ra,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(F0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(bv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(yv,{children:x(F4,{pb:6,pt:6,children:x(on,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},U_e=Qe(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:ca.exports.isEqual}}),j_e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ce(U_e),s=$e();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(Ui,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(d$())},className:`status ${l}`,children:u})})},G_e=["dark","light","green"];function q_e(){const{setColorMode:e}=Iv(),t=$e(),n=Ce(i=>i.options.currentTheme);return x(dh,{validValues:G_e,value:n,onChange:i=>{e(i.target.value),t(C7e(i.target.value))},styleClass:"theme-changer-dropdown"})}const K_e=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:q$,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(j_e,{}),x(B_e,{children:x(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(N4e,{})})}),x(q_e,{}),x(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(T4e,{})})}),x(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(C4e,{})})}),x(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Vf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(w4e,{})})}),x(V_e,{children:x(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(O_,{})})})]})]}),Y_e=Qe(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Z_e=Qe(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ca.exports.isEqual}}),X_e=()=>{const e=$e(),t=Ce(Y_e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ce(Z_e),[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(d$()),e(c6(!n))};return vt("`",()=>{e(c6(!n))},[n]),vt("esc",()=>{e(c6(!1))}),ee(Hn,{children:[n&&x(rH,{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(Ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(_4e,{}),onClick:()=>a(!o)})}),x(Ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(F4e,{}):x(m$,{}),onClick:l})})]})};function Q_e(){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 J_e=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 n2(e,t){var n=eke(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 eke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=J_e.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var tke=[".DS_Store","Thumbs.db"];function nke(e){return Z0(this,void 0,void 0,function(){return X0(this,function(t){return a5(e)&&rke(e.dataTransfer)?[2,ske(e.dataTransfer,e.type)]:ike(e)?[2,oke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ake(e)]:[2,[]]})})}function rke(e){return a5(e)}function ike(e){return a5(e)&&a5(e.target)}function a5(e){return typeof e=="object"&&e!==null}function oke(e){return k8(e.target.files).map(function(t){return n2(t)})}function ake(e){return Z0(this,void 0,void 0,function(){var t;return X0(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 n2(r)})]}})})}function ske(e,t){return Z0(this,void 0,void 0,function(){var n,r;return X0(this,function(i){switch(i.label){case 0:return e.items?(n=k8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lke))]):[3,2];case 1:return r=i.sent(),[2,YI(cV(r))];case 2:return[2,YI(k8(e.files).map(function(o){return n2(o)}))]}})})}function YI(e){return e.filter(function(t){return tke.indexOf(t.name)===-1})}function k8(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,eM(n)];if(e.sizen)return[!1,eM(n)]}return[!0,null]}function Lf(e){return e!=null}function _ke(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=pV(l,n),h=kv(u,1),g=h[0],m=gV(l,r,i),v=kv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function s5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function t3(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 nM(e){e.preventDefault()}function kke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Eke(e){return e.indexOf("Edge/")!==-1}function Pke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return kke(e)||Eke(e)}function ol(){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 Uke(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=l5(e,Oke),i=xV(r),o=i.open,a=l5(i,Rke);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});sk.displayName="Dropzone";var bV={disabled:!1,getFilesFromEvent:nke,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=bV;sk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var T8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},bV),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,L=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,z=t.onError,$=t.validator,V=C.exports.useMemo(function(){return Ake(n)},[n]),Y=C.exports.useMemo(function(){return Tke(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:iM},[E]),j=C.exports.useMemo(function(){return typeof w=="function"?w:iM},[w]),te=C.exports.useRef(null),ie=C.exports.useRef(null),le=C.exports.useReducer(jke,T8),G=O6(le,2),W=G[0],q=G[1],Q=W.isFocused,X=W.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&Lke()),ye=function(){!me.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(q({type:"closeDialog"}),j())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,j,me]);var Se=C.exports.useRef([]),He=function(et){te.current&&te.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return L&&(document.addEventListener("dragover",nM,!1),document.addEventListener("drop",He,!1)),function(){L&&(document.removeEventListener("dragover",nM),document.removeEventListener("drop",He))}},[te,L]),C.exports.useEffect(function(){return!r&&k&&te.current&&te.current.focus(),function(){}},[te,k,r]);var je=C.exports.useCallback(function(Me){z?z(Me):console.error(Me)},[z]),ct=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[].concat(zke(Se.current),[Me.target]),t3(Me)&&Promise.resolve(i(Me)).then(function(et){if(!(s5(Me)&&!D)){var Xt=et.length,qt=Xt>0&&_ke({files:et,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!qt;q({isDragAccept:qt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Me)}}).catch(function(et){return je(et)})},[i,u,je,D,V,a,o,s,l,$]),qe=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=t3(Me);if(et&&Me.dataTransfer)try{Me.dataTransfer.dropEffect="copy"}catch{}return et&&g&&g(Me),!1},[g,D]),dt=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me);var et=Se.current.filter(function(qt){return te.current&&te.current.contains(qt)}),Xt=et.indexOf(Me.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),t3(Me)&&h&&h(Me))},[te,h,D]),Xe=C.exports.useCallback(function(Me,et){var Xt=[],qt=[];Me.forEach(function(Ee){var At=pV(Ee,V),Ne=O6(At,2),at=Ne[0],sn=Ne[1],Dn=gV(Ee,a,o),Fe=O6(Dn,2),gt=Fe[0],nt=Fe[1],Nt=$?$(Ee):null;if(at&>&&!Nt)Xt.push(Ee);else{var Qt=[sn,nt];Nt&&(Qt=Qt.concat(Nt)),qt.push({file:Ee,errors:Qt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){qt.push({file:Ee,errors:[Cke]})}),Xt.splice(0)),q({acceptedFiles:Xt,fileRejections:qt,type:"setFiles"}),m&&m(Xt,qt,et),qt.length>0&&b&&b(qt,et),Xt.length>0&&v&&v(Xt,et)},[q,s,V,a,o,l,m,v,b,$]),it=C.exports.useCallback(function(Me){Me.preventDefault(),Me.persist(),Et(Me),Se.current=[],t3(Me)&&Promise.resolve(i(Me)).then(function(et){s5(Me)&&!D||Xe(et,Me)}).catch(function(et){return je(et)}),q({type:"reset"})},[i,Xe,je,D]),It=C.exports.useCallback(function(){if(me.current){q({type:"openDialog"}),de();var Me={multiple:s,types:Y};window.showOpenFilePicker(Me).then(function(et){return i(et)}).then(function(et){Xe(et,null),q({type:"closeDialog"})}).catch(function(et){Ike(et)?(j(et),q({type:"closeDialog"})):Mke(et)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):je(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."))):je(et)});return}ie.current&&(q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[q,de,j,P,Xe,je,Y,s]),wt=C.exports.useCallback(function(Me){!te.current||!te.current.isEqualNode(Me.target)||(Me.key===" "||Me.key==="Enter"||Me.keyCode===32||Me.keyCode===13)&&(Me.preventDefault(),It())},[te,It]),Te=C.exports.useCallback(function(){q({type:"focus"})},[]),ft=C.exports.useCallback(function(){q({type:"blur"})},[]),Mt=C.exports.useCallback(function(){I||(Pke()?setTimeout(It,0):It())},[I,It]),ut=function(et){return r?null:et},xt=function(et){return O?null:ut(et)},kn=function(et){return R?null:ut(et)},Et=function(et){D&&et.stopPropagation()},Zt=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.role,Ee=Me.onKeyDown,At=Me.onFocus,Ne=Me.onBlur,at=Me.onClick,sn=Me.onDragEnter,Dn=Me.onDragOver,Fe=Me.onDragLeave,gt=Me.onDrop,nt=l5(Me,Nke);return ur(ur(L8({onKeyDown:xt(ol(Ee,wt)),onFocus:xt(ol(At,Te)),onBlur:xt(ol(Ne,ft)),onClick:ut(ol(at,Mt)),onDragEnter:kn(ol(sn,ct)),onDragOver:kn(ol(Dn,qe)),onDragLeave:kn(ol(Fe,dt)),onDrop:kn(ol(gt,it)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Xt,te),!r&&!O?{tabIndex:0}:{}),nt)}},[te,wt,Te,ft,Mt,ct,qe,dt,it,O,R,r]),En=C.exports.useCallback(function(Me){Me.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Me.refKey,Xt=et===void 0?"ref":et,qt=Me.onChange,Ee=Me.onClick,At=l5(Me,Dke),Ne=L8({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(ol(qt,it)),onClick:ut(ol(Ee,En)),tabIndex:-1},Xt,ie);return ur(ur({},Ne),At)}},[ie,n,s,it,r]);return ur(ur({},W),{},{isFocused:Q&&!r,getRootProps:Zt,getInputProps:yn,rootRef:te,inputRef:ie,open:ut(It)})}function jke(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({},T8),{},{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({},T8);default:return e}}function iM(){}const Gke=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Wf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Wf,{size:"lg",children:"Invalid Upload"}),x(Wf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},qke=e=>{const{children:t}=e,n=$e(),r=Ce(vn),i=ch({}),[o,a]=C.exports.useState(!1),s=C.exports.useCallback(P=>{a(!0);const k=P.errors.reduce((L,I)=>L+` +`+I.message,"");i({title:"Upload failed",description:k,status:"error",isClosable:!0})},[i]),l=C.exports.useCallback(P=>{a(!0);const k={file:P};["img2img","inpainting","outpainting"].includes(r)&&(k.destination=r),n(MA(k))},[n,r]),u=C.exports.useCallback((P,k)=>{k.forEach(L=>{s(L)}),P.forEach(L=>{l(L)})},[l,s]),{getRootProps:h,getInputProps:g,isDragAccept:m,isDragReject:v,isDragActive:b,open:w}=xV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:u,onDragOver:()=>a(!0),maxFiles:1});C.exports.useEffect(()=>{const P=k=>{const L=k.clipboardData?.items;if(!L)return;const I=[];for(const D of L)D.kind==="file"&&["image/png","image/jpg"].includes(D.type)&&I.push(D);if(!I.length)return;if(k.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}const R={file:O};["img2img","inpainting"].includes(r)&&(R.destination=r),n(MA(R))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[n,i,r]);const E=["img2img","inpainting"].includes(r)?` to ${Pf[r].tooltip}`:"";return x(D_.Provider,{value:w,children:ee("div",{...h({style:{}}),onKeyDown:P=>{P.key},children:[x("input",{...g()}),t,b&&o&&x(Gke,{isDragAccept:m,isDragReject:v,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},Kke=()=>{const e=$e(),t=Ce(r=>r.gallery.shouldPinGallery);return x(pt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(b0(!0)),t&&e(Cr(!0))},children:x(f$,{})})};function Yke(e){return lt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const Zke=Qe(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Xke=()=>{const e=$e(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ce(Zke);return ee("div",{className:"show-hide-button-options",children:[x(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(C0(!0)),n&&setTimeout(()=>e(Cr(!0)),400)},children:x(Yke,{})}),t&&ee(Hn,{children:[x(B$,{iconButton:!0}),x($$,{}),x(F$,{})]})]})};Q_e();const Qke=Qe([e=>e.gallery,e=>e.options,e=>e.system,vn],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Ve.reduce(n.model_list,(v,b,w)=>(b.status==="active"&&(v=w),v),""),g=!(i||o&&!a)&&["txt2img","img2img","inpainting","outpainting"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","inpainting","outpainting"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:g,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Ve.isEqual}}),Jke=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ce(Qke);return x("div",{className:"App",children:ee(qke,{children:[x(D_e,{}),ee("div",{className:"app-content",children:[x(K_e,{}),x(i7e,{})]}),x("div",{className:"app-console",children:x(X_e,{})}),e&&x(Kke,{}),t&&x(Xke,{})]})})};const SV=v2e(lV),wV=IR({key:"invokeai-style-cache",prepend:!0});U3.createRoot(document.getElementById("root")).render(x(re.StrictMode,{children:x(qve,{store:lV,children:x(uV,{loading:x(R_e,{}),persistor:SV,children:x(HR,{value:wV,children:x(pF,{children:x(Jke,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index c034553ec8..3f9aa0c552 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -9,6 +9,7 @@ <<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development +<<<<<<< refs/remotes/upstream/development <<<<<<< refs/remotes/upstream/development @@ -24,6 +25,9 @@ >>>>>>> Builds fresh bundle ======= +======= + +>>>>>>> Outpainting tab loads to empty canvas instead of upload >>>>>>> Builds fresh bundle diff --git a/frontend/src/app/socketio/emitters.ts b/frontend/src/app/socketio/emitters.ts index e48b41ff9c..d0e3abed36 100644 --- a/frontend/src/app/socketio/emitters.ts +++ b/frontend/src/app/socketio/emitters.ts @@ -54,7 +54,7 @@ const makeSocketIOEmitters = ( systemState, }; - if (['inpainting', 'outpainting'].includes(generationMode)) { + if (generationMode === 'inpainting') { const baseCanvasImage = baseCanvasImageSelector(getState()); const imageUrl = baseCanvasImage?.image.url; diff --git a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx index 1f732df36f..d8f64e8e26 100644 --- a/frontend/src/features/canvas/IAICanvasBoundingBox.tsx +++ b/frontend/src/features/canvas/IAICanvasBoundingBox.tsx @@ -137,7 +137,8 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { const dragBoundFunc = useCallback( (position: Vector2d) => { - if (!baseCanvasImage) return boundingBoxCoordinates; + if (!baseCanvasImage && activeTabName !== 'outpainting') + return boundingBoxCoordinates; const { x, y } = position; @@ -153,6 +154,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { }, [ baseCanvasImage, + activeTabName, boundingBoxCoordinates, stageDimensions.width, stageDimensions.height, @@ -236,7 +238,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { // We may not change anything, stash the old position let newCoordinate = { ...oldPos }; - + console.log(oldPos, newPos); // Set the new coords based on what snapped if (didSnapX && !didSnapY) { newCoordinate = { @@ -267,7 +269,8 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { * Unlike anchorDragBoundFunc, it does get a width and height, so * the logic to constrain the size of the bounding box is very simple. */ - if (!baseCanvasImage) return oldBoundBox; + if (!baseCanvasImage && activeTabName !== 'outpainting') + return oldBoundBox; if ( newBoundBox.width + newBoundBox.x > stageDimensions.width || newBoundBox.height + newBoundBox.y > stageDimensions.height || @@ -279,7 +282,12 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { return newBoundBox; }, - [baseCanvasImage, stageDimensions] + [ + activeTabName, + baseCanvasImage, + stageDimensions.height, + stageDimensions.width, + ] ); const handleStartedTransforming = () => { @@ -333,9 +341,7 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => { globalCompositeOperation={'destination-out'} /> { useLayoutEffect(() => { window.setTimeout(() => { - if (!ref.current || !baseCanvasImage) return; - const { width: imageWidth, height: imageHeight } = baseCanvasImage.image; + if (!ref.current) return; + const { width: imageWidth, height: imageHeight } = baseCanvasImage?.image + ? baseCanvasImage.image + : { width: 512, height: 512 }; const { clientWidth, clientHeight } = ref.current; const scale = Math.min( diff --git a/frontend/src/features/canvas/canvasSlice.ts b/frontend/src/features/canvas/canvasSlice.ts index be8f0e2f56..cf4cfffd13 100644 --- a/frontend/src/features/canvas/canvasSlice.ts +++ b/frontend/src/features/canvas/canvasSlice.ts @@ -413,18 +413,18 @@ export const canvasSlice = createSlice({ }; }, setBoundingBoxDimensions: (state, action: PayloadAction) => { - state[state.currentCanvas].boundingBoxDimensions = action.payload; + const currentCanvas = state[state.currentCanvas]; + currentCanvas.boundingBoxDimensions = action.payload; + const { width: boundingBoxWidth, height: boundingBoxHeight } = action.payload; const { x: boundingBoxX, y: boundingBoxY } = - state[state.currentCanvas].boundingBoxCoordinates; + currentCanvas.boundingBoxCoordinates; const { width: canvasWidth, height: canvasHeight } = - state[state.currentCanvas].stageDimensions; + currentCanvas.stageDimensions; - const scaledCanvasWidth = - canvasWidth / state[state.currentCanvas].stageScale; - const scaledCanvasHeight = - canvasHeight / state[state.currentCanvas].stageScale; + const scaledCanvasWidth = canvasWidth / currentCanvas.stageScale; + const scaledCanvasHeight = canvasHeight / currentCanvas.stageScale; const roundedCanvasWidth = roundDownToMultiple(scaledCanvasWidth, 64); const roundedCanvasHeight = roundDownToMultiple(scaledCanvasHeight, 64); @@ -458,22 +458,22 @@ export const canvasSlice = createSlice({ const clampedX = _.clamp( overflowCorrectedX, - state[state.currentCanvas].stageCoordinates.x, + currentCanvas.stageCoordinates.x, roundedCanvasWidth - newBoundingBoxWidth ); const clampedY = _.clamp( overflowCorrectedY, - state[state.currentCanvas].stageCoordinates.y, + currentCanvas.stageCoordinates.y, roundedCanvasHeight - newBoundingBoxHeight ); - state[state.currentCanvas].boundingBoxDimensions = { + currentCanvas.boundingBoxDimensions = { width: newBoundingBoxWidth, height: newBoundingBoxHeight, }; - state[state.currentCanvas].boundingBoxCoordinates = { + currentCanvas.boundingBoxCoordinates = { x: clampedX, y: clampedY, }; diff --git a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx index 47ff66111c..891f3a20f3 100644 --- a/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx +++ b/frontend/src/features/tabs/Outpainting/OutpaintingDisplay.tsx @@ -61,7 +61,15 @@ const OutpaintingDisplay = () => { return (
-
{outpaintingComponent}
+
+
+ +
+ {doesCanvasNeedScaling ? : } +
+
+
+ {/*
{outpaintingComponent}
*/}
); };