mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
639 lines
1.5 MiB
639 lines
1.5 MiB
var Iee=Object.defineProperty;var Ree=(e,t,n)=>t in e?Iee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var an=(e,t,n)=>(Ree(e,typeof t!="symbol"?t+"":t,n),n);function yj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function b8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y={},Dee={get exports(){return y},set exports(e){y=e}},bS={},w={},Nee={get exports(){return w},set exports(e){w=e}},en={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var dy=Symbol.for("react.element"),jee=Symbol.for("react.portal"),Bee=Symbol.for("react.fragment"),$ee=Symbol.for("react.strict_mode"),Fee=Symbol.for("react.profiler"),zee=Symbol.for("react.provider"),Hee=Symbol.for("react.context"),Vee=Symbol.for("react.forward_ref"),Wee=Symbol.for("react.suspense"),Uee=Symbol.for("react.memo"),Gee=Symbol.for("react.lazy"),CL=Symbol.iterator;function qee(e){return e===null||typeof e!="object"?null:(e=CL&&e[CL]||e["@@iterator"],typeof e=="function"?e:null)}var bj={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sj=Object.assign,xj={};function h0(e,t,n){this.props=e,this.context=t,this.refs=xj,this.updater=n||bj}h0.prototype.isReactComponent={};h0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};h0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wj(){}wj.prototype=h0.prototype;function S8(e,t,n){this.props=e,this.context=t,this.refs=xj,this.updater=n||bj}var x8=S8.prototype=new wj;x8.constructor=S8;Sj(x8,h0.prototype);x8.isPureReactComponent=!0;var _L=Array.isArray,Cj=Object.prototype.hasOwnProperty,w8={current:null},_j={key:!0,ref:!0,__self:!0,__source:!0};function kj(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Cj.call(t,r)&&!_j.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:dy,type:e,key:o,ref:a,props:i,_owner:w8.current}}function Yee(e,t){return{$$typeof:dy,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function C8(e){return typeof e=="object"&&e!==null&&e.$$typeof===dy}function Kee(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var kL=/\/+/g;function Yw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Kee(""+e.key):t.toString(36)}function r4(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case dy:case jee:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Yw(a,0):r,_L(i)?(n="",e!=null&&(n=e.replace(kL,"$&/")+"/"),r4(i,t,n,"",function(u){return u})):i!=null&&(C8(i)&&(i=Yee(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(kL,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",_L(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+Yw(o,s);a+=r4(o,t,n,l,i)}else if(l=qee(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+Yw(o,s++),a+=r4(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function $3(e,t,n){if(e==null)return e;var r=[],i=0;return r4(e,r,"","",function(o){return t.call(n,o,i++)}),r}function Xee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lo={current:null},i4={transition:null},Zee={ReactCurrentDispatcher:Lo,ReactCurrentBatchConfig:i4,ReactCurrentOwner:w8};en.Children={map:$3,forEach:function(e,t,n){$3(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $3(e,function(){t++}),t},toArray:function(e){return $3(e,function(t){return t})||[]},only:function(e){if(!C8(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};en.Component=h0;en.Fragment=Bee;en.Profiler=Fee;en.PureComponent=S8;en.StrictMode=$ee;en.Suspense=Wee;en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zee;en.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Sj({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=w8.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Cj.call(t,l)&&!_j.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:dy,type:e.type,key:i,ref:o,props:r,_owner:a}};en.createContext=function(e){return e={$$typeof:Hee,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zee,_context:e},e.Consumer=e};en.createElement=kj;en.createFactory=function(e){var t=kj.bind(null,e);return t.type=e,t};en.createRef=function(){return{current:null}};en.forwardRef=function(e){return{$$typeof:Vee,render:e}};en.isValidElement=C8;en.lazy=function(e){return{$$typeof:Gee,_payload:{_status:-1,_result:e},_init:Xee}};en.memo=function(e,t){return{$$typeof:Uee,type:e,compare:t===void 0?null:t}};en.startTransition=function(e){var t=i4.transition;i4.transition={};try{e()}finally{i4.transition=t}};en.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};en.useCallback=function(e,t){return Lo.current.useCallback(e,t)};en.useContext=function(e){return Lo.current.useContext(e)};en.useDebugValue=function(){};en.useDeferredValue=function(e){return Lo.current.useDeferredValue(e)};en.useEffect=function(e,t){return Lo.current.useEffect(e,t)};en.useId=function(){return Lo.current.useId()};en.useImperativeHandle=function(e,t,n){return Lo.current.useImperativeHandle(e,t,n)};en.useInsertionEffect=function(e,t){return Lo.current.useInsertionEffect(e,t)};en.useLayoutEffect=function(e,t){return Lo.current.useLayoutEffect(e,t)};en.useMemo=function(e,t){return Lo.current.useMemo(e,t)};en.useReducer=function(e,t,n){return Lo.current.useReducer(e,t,n)};en.useRef=function(e){return Lo.current.useRef(e)};en.useState=function(e){return Lo.current.useState(e)};en.useSyncExternalStore=function(e,t,n){return Lo.current.useSyncExternalStore(e,t,n)};en.useTransition=function(){return Lo.current.useTransition()};en.version="18.2.0";(function(e){e.exports=en})(Nee);const N=b8(w),n7=yj({__proto__:null,default:N},[w]);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Qee=w,Jee=Symbol.for("react.element"),ete=Symbol.for("react.fragment"),tte=Object.prototype.hasOwnProperty,nte=Qee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rte={key:!0,ref:!0,__self:!0,__source:!0};function Ej(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)tte.call(t,r)&&!rte.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:Jee,type:e,key:o,ref:a,props:i,_owner:nte.current}}bS.Fragment=ete;bS.jsx=Ej;bS.jsxs=Ej;(function(e){e.exports=bS})(Dee);var Ws=Boolean(globalThis==null?void 0:globalThis.document)?w.useLayoutEffect:w.useEffect,_8=w.createContext({});_8.displayName="ColorModeContext";function fy(){const e=w.useContext(_8);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var F3={light:"chakra-ui-light",dark:"chakra-ui-dark"};function ite(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?F3.dark:F3.light),document.body.classList.remove(r?F3.light:F3.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 ote="chakra-ui-color-mode";function ate(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&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 ste=ate(ote),EL=()=>{};function PL(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function Pj(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=ste}=e,s=i==="dark"?"dark":"light",[l,u]=w.useState(()=>PL(a,s)),[d,h]=w.useState(()=>PL(a)),{getSystemTheme:g,setClassName:v,setDataset:b,addListener:S}=w.useMemo(()=>ite({preventTransition:o}),[o]),E=i==="system"&&!l?d:l,_=w.useCallback(A=>{const M=A==="system"?g():A;u(M),v(M==="dark"),b(M),a.set(M)},[a,g,v,b]);Ws(()=>{i==="system"&&h(g())},[]),w.useEffect(()=>{const A=a.get();if(A){_(A);return}if(i==="system"){_("system");return}_(s)},[a,s,i,_]);const k=w.useCallback(()=>{_(E==="dark"?"light":"dark")},[E,_]);w.useEffect(()=>{if(r)return S(_)},[r,S,_]);const T=w.useMemo(()=>({colorMode:t??E,toggleColorMode:t?EL:k,setColorMode:t?EL:_,forced:t!==void 0}),[E,k,_,t]);return N.createElement(_8.Provider,{value:T},n)}Pj.displayName="ColorModeProvider";var W4={},lte={get exports(){return W4},set exports(e){W4=e}};(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]",d="[object Boolean]",h="[object Date]",g="[object Error]",v="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",_="[object Null]",k="[object Object]",T="[object Proxy]",A="[object RegExp]",M="[object Set]",R="[object String]",D="[object Undefined]",j="[object WeakMap]",F="[object ArrayBuffer]",H="[object DataView]",K="[object Float32Array]",te="[object Float64Array]",G="[object Int8Array]",$="[object Int16Array]",U="[object Int32Array]",X="[object Uint8Array]",Z="[object Uint8ClampedArray]",W="[object Uint16Array]",Q="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,de=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,Pe={};Pe[K]=Pe[te]=Pe[G]=Pe[$]=Pe[U]=Pe[X]=Pe[Z]=Pe[W]=Pe[Q]=!0,Pe[s]=Pe[l]=Pe[F]=Pe[d]=Pe[H]=Pe[h]=Pe[g]=Pe[v]=Pe[S]=Pe[E]=Pe[k]=Pe[A]=Pe[M]=Pe[R]=Pe[j]=!1;var be=typeof Co=="object"&&Co&&Co.Object===Object&&Co,He=typeof self=="object"&&self&&self.Object===Object&&self,Oe=be||He||Function("return this")(),ot=t&&!t.nodeType&&t,Ve=ot&&!0&&e&&!e.nodeType&&e,Be=Ve&&Ve.exports===ot,wt=Be&&be.process,st=function(){try{var Y=Ve&&Ve.require&&Ve.require("util").types;return Y||wt&&wt.binding&&wt.binding("util")}catch{}}(),gt=st&&st.isTypedArray;function St(Y,ie,me){switch(me.length){case 0:return Y.call(ie);case 1:return Y.call(ie,me[0]);case 2:return Y.call(ie,me[0],me[1]);case 3:return Y.call(ie,me[0],me[1],me[2])}return Y.apply(ie,me)}function Ae(Y,ie){for(var me=-1,it=Array(Y);++me<Y;)it[me]=ie(me);return it}function lt(Y){return function(ie){return Y(ie)}}function Mt(Y,ie){return Y==null?void 0:Y[ie]}function ut(Y,ie){return function(me){return Y(ie(me))}}var _t=Array.prototype,ln=Function.prototype,ae=Object.prototype,De=Oe["__core-js_shared__"],Ye=ln.toString,Ke=ae.hasOwnProperty,xe=function(){var Y=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return Y?"Symbol(src)_1."+Y:""}(),Ne=ae.toString,Ct=Ye.call(Object),Dt=RegExp("^"+Ye.call(Ke).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=Be?Oe.Buffer:void 0,At=Oe.Symbol,$e=Oe.Uint8Array,vt=Le?Le.allocUnsafe:void 0,tn=ut(Object.getPrototypeOf,Object),Dn=Object.create,Xe=ae.propertyIsEnumerable,xt=_t.splice,ht=At?At.toStringTag:void 0,Ht=function(){try{var Y=ys(Object,"defineProperty");return Y({},"",{}),Y}catch{}}(),nn=Le?Le.isBuffer:void 0,pr=Math.max,Mo=Date.now,Mi=ys(Oe,"Map"),il=ys(Object,"create"),R0=function(){function Y(){}return function(ie){if(!la(ie))return{};if(Dn)return Dn(ie);Y.prototype=ie;var me=new Y;return Y.prototype=void 0,me}}();function Ba(Y){var ie=-1,me=Y==null?0:Y.length;for(this.clear();++ie<me;){var it=Y[ie];this.set(it[0],it[1])}}function Pp(){this.__data__=il?il(null):{},this.size=0}function D0(Y){var ie=this.has(Y)&&delete this.__data__[Y];return this.size-=ie?1:0,ie}function bc(Y){var ie=this.__data__;if(il){var me=ie[Y];return me===r?void 0:me}return Ke.call(ie,Y)?ie[Y]:void 0}function Tp(Y){var ie=this.__data__;return il?ie[Y]!==void 0:Ke.call(ie,Y)}function Lp(Y,ie){var me=this.__data__;return this.size+=this.has(Y)?0:1,me[Y]=il&&ie===void 0?r:ie,this}Ba.prototype.clear=Pp,Ba.prototype.delete=D0,Ba.prototype.get=bc,Ba.prototype.has=Tp,Ba.prototype.set=Lp;function ia(Y){var ie=-1,me=Y==null?0:Y.length;for(this.clear();++ie<me;){var it=Y[ie];this.set(it[0],it[1])}}function vf(){this.__data__=[],this.size=0}function N0(Y){var ie=this.__data__,me=gs(ie,Y);if(me<0)return!1;var it=ie.length-1;return me==it?ie.pop():xt.call(ie,me,1),--this.size,!0}function Sc(Y){var ie=this.__data__,me=gs(ie,Y);return me<0?void 0:ie[me][1]}function yf(Y){return gs(this.__data__,Y)>-1}function j0(Y,ie){var me=this.__data__,it=gs(me,Y);return it<0?(++this.size,me.push([Y,ie])):me[it][1]=ie,this}ia.prototype.clear=vf,ia.prototype.delete=N0,ia.prototype.get=Sc,ia.prototype.has=yf,ia.prototype.set=j0;function ol(Y){var ie=-1,me=Y==null?0:Y.length;for(this.clear();++ie<me;){var it=Y[ie];this.set(it[0],it[1])}}function xc(){this.size=0,this.__data__={hash:new Ba,map:new(Mi||ia),string:new Ba}}function B0(Y){var ie=xu(this,Y).delete(Y);return this.size-=ie?1:0,ie}function $0(Y){return xu(this,Y).get(Y)}function F0(Y){return xu(this,Y).has(Y)}function z0(Y,ie){var me=xu(this,Y),it=me.size;return me.set(Y,ie),this.size+=me.size==it?0:1,this}ol.prototype.clear=xc,ol.prototype.delete=B0,ol.prototype.get=$0,ol.prototype.has=F0,ol.prototype.set=z0;function ms(Y){var ie=this.__data__=new ia(Y);this.size=ie.size}function H0(){this.__data__=new ia,this.size=0}function V0(Y){var ie=this.__data__,me=ie.delete(Y);return this.size=ie.size,me}function W0(Y){return this.__data__.get(Y)}function U0(Y){return this.__data__.has(Y)}function G0(Y,ie){var me=this.__data__;if(me instanceof ia){var it=me.__data__;if(!Mi||it.length<n-1)return it.push([Y,ie]),this.size=++me.size,this;me=this.__data__=new ol(it)}return me.set(Y,ie),this.size=me.size,this}ms.prototype.clear=H0,ms.prototype.delete=V0,ms.prototype.get=W0,ms.prototype.has=U0,ms.prototype.set=G0;function q0(Y,ie){var me=Cu(Y),it=!me&&Cf(Y),Wt=!me&&!it&&Ec(Y),wn=!me&&!it&&!Wt&&Dp(Y),kt=me||it||Wt||wn,Nt=kt?Ae(Y.length,String):[],Xt=Nt.length;for(var Jr in Y)(ie||Ke.call(Y,Jr))&&!(kt&&(Jr=="length"||Wt&&(Jr=="offset"||Jr=="parent")||wn&&(Jr=="buffer"||Jr=="byteLength"||Jr=="byteOffset")||Op(Jr,Xt)))&&Nt.push(Jr);return Nt}function al(Y,ie,me){(me!==void 0&&!$a(Y[ie],me)||me===void 0&&!(ie in Y))&&yu(Y,ie,me)}function Y0(Y,ie,me){var it=Y[ie];(!(Ke.call(Y,ie)&&$a(it,me))||me===void 0&&!(ie in Y))&&yu(Y,ie,me)}function gs(Y,ie){for(var me=Y.length;me--;)if($a(Y[me][0],ie))return me;return-1}function yu(Y,ie,me){ie=="__proto__"&&Ht?Ht(Y,ie,{configurable:!0,enumerable:!0,value:me,writable:!0}):Y[ie]=me}var bu=bf();function sl(Y){return Y==null?Y===void 0?D:_:ht&&ht in Object(Y)?Sf(Y):wu(Y)}function Su(Y){return Kn(Y)&&sl(Y)==s}function Ap(Y){if(!la(Y)||cl(Y))return!1;var ie=Pc(Y)?Dt:de;return ie.test(kc(Y))}function wc(Y){return Kn(Y)&&Rp(Y.length)&&!!Pe[sl(Y)]}function ll(Y){if(!la(Y))return dl(Y);var ie=Io(Y),me=[];for(var it in Y)it=="constructor"&&(ie||!Ke.call(Y,it))||me.push(it);return me}function oa(Y,ie,me,it,Wt){Y!==ie&&bu(ie,function(wn,kt){if(Wt||(Wt=new ms),la(wn))Nn(Y,ie,kt,me,oa,it,Wt);else{var Nt=it?it(Cc(Y,kt),wn,kt+"",Y,ie,Wt):void 0;Nt===void 0&&(Nt=wn),al(Y,kt,Nt)}},Np)}function Nn(Y,ie,me,it,Wt,wn,kt){var Nt=Cc(Y,me),Xt=Cc(ie,me),Jr=kt.get(Xt);if(Jr){al(Y,me,Jr);return}var Ir=wn?wn(Nt,Xt,me+"",Y,ie,kt):void 0,Cn=Ir===void 0;if(Cn){var ci=Cu(Xt),Ro=!ci&&Ec(Xt),co=!ci&&!Ro&&Dp(Xt);Ir=Xt,ci||Ro||co?Cu(Nt)?Ir=Nt:Ip(Nt)?Ir=ul(Nt):Ro?(Cn=!1,Ir=Hr(Xt,!0)):co?(Cn=!1,Ir=sa(Xt,!0)):Ir=[]:_f(Xt)||Cf(Xt)?(Ir=Nt,Cf(Nt)?Ir=kf(Nt):(!la(Nt)||Pc(Nt))&&(Ir=Ii(Xt))):Cn=!1}Cn&&(kt.set(Xt,Ir),Wt(Ir,Xt,it,wn,kt),kt.delete(Xt)),al(Y,me,Ir)}function Tn(Y,ie){return _c(K0(Y,ie,jp),Y+"")}var aa=Ht?function(Y,ie){return Ht(Y,"toString",{configurable:!0,enumerable:!1,value:Kt(ie),writable:!0})}:jp;function Hr(Y,ie){if(ie)return Y.slice();var me=Y.length,it=vt?vt(me):new Y.constructor(me);return Y.copy(it),it}function li(Y){var ie=new Y.constructor(Y.byteLength);return new $e(ie).set(new $e(Y)),ie}function sa(Y,ie){var me=ie?li(Y.buffer):Y.buffer;return new Y.constructor(me,Y.byteOffset,Y.length)}function ul(Y,ie){var me=-1,it=Y.length;for(ie||(ie=Array(it));++me<it;)ie[me]=Y[me];return ie}function ui(Y,ie,me,it){var Wt=!me;me||(me={});for(var wn=-1,kt=ie.length;++wn<kt;){var Nt=ie[wn],Xt=it?it(me[Nt],Y[Nt],Nt,me,Y):void 0;Xt===void 0&&(Xt=Y[Nt]),Wt?yu(me,Nt,Xt):Y0(me,Nt,Xt)}return me}function vs(Y){return Tn(function(ie,me){var it=-1,Wt=me.length,wn=Wt>1?me[Wt-1]:void 0,kt=Wt>2?me[2]:void 0;for(wn=Y.length>3&&typeof wn=="function"?(Wt--,wn):void 0,kt&&Mp(me[0],me[1],kt)&&(wn=Wt<3?void 0:wn,Wt=1),ie=Object(ie);++it<Wt;){var Nt=me[it];Nt&&Y(ie,Nt,it,wn)}return ie})}function bf(Y){return function(ie,me,it){for(var Wt=-1,wn=Object(ie),kt=it(ie),Nt=kt.length;Nt--;){var Xt=kt[Y?Nt:++Wt];if(me(wn[Xt],Xt,wn)===!1)break}return ie}}function xu(Y,ie){var me=Y.__data__;return xf(ie)?me[typeof ie=="string"?"string":"hash"]:me.map}function ys(Y,ie){var me=Mt(Y,ie);return Ap(me)?me:void 0}function Sf(Y){var ie=Ke.call(Y,ht),me=Y[ht];try{Y[ht]=void 0;var it=!0}catch{}var Wt=Ne.call(Y);return it&&(ie?Y[ht]=me:delete Y[ht]),Wt}function Ii(Y){return typeof Y.constructor=="function"&&!Io(Y)?R0(tn(Y)):{}}function Op(Y,ie){var me=typeof Y;return ie=ie??a,!!ie&&(me=="number"||me!="symbol"&&ve.test(Y))&&Y>-1&&Y%1==0&&Y<ie}function Mp(Y,ie,me){if(!la(me))return!1;var it=typeof ie;return(it=="number"?Yt(me)&&Op(ie,me.length):it=="string"&&ie in me)?$a(me[ie],Y):!1}function xf(Y){var ie=typeof Y;return ie=="string"||ie=="number"||ie=="symbol"||ie=="boolean"?Y!=="__proto__":Y===null}function cl(Y){return!!xe&&xe in Y}function Io(Y){var ie=Y&&Y.constructor,me=typeof ie=="function"&&ie.prototype||ae;return Y===me}function dl(Y){var ie=[];if(Y!=null)for(var me in Object(Y))ie.push(me);return ie}function wu(Y){return Ne.call(Y)}function K0(Y,ie,me){return ie=pr(ie===void 0?Y.length-1:ie,0),function(){for(var it=arguments,Wt=-1,wn=pr(it.length-ie,0),kt=Array(wn);++Wt<wn;)kt[Wt]=it[ie+Wt];Wt=-1;for(var Nt=Array(ie+1);++Wt<ie;)Nt[Wt]=it[Wt];return Nt[ie]=me(kt),St(Y,this,Nt)}}function Cc(Y,ie){if(!(ie==="constructor"&&typeof Y[ie]=="function")&&ie!="__proto__")return Y[ie]}var _c=wf(aa);function wf(Y){var ie=0,me=0;return function(){var it=Mo(),Wt=o-(it-me);if(me=it,Wt>0){if(++ie>=i)return arguments[0]}else ie=0;return Y.apply(void 0,arguments)}}function kc(Y){if(Y!=null){try{return Ye.call(Y)}catch{}try{return Y+""}catch{}}return""}function $a(Y,ie){return Y===ie||Y!==Y&&ie!==ie}var Cf=Su(function(){return arguments}())?Su:function(Y){return Kn(Y)&&Ke.call(Y,"callee")&&!Xe.call(Y,"callee")},Cu=Array.isArray;function Yt(Y){return Y!=null&&Rp(Y.length)&&!Pc(Y)}function Ip(Y){return Kn(Y)&&Yt(Y)}var Ec=nn||X0;function Pc(Y){if(!la(Y))return!1;var ie=sl(Y);return ie==v||ie==b||ie==u||ie==T}function Rp(Y){return typeof Y=="number"&&Y>-1&&Y%1==0&&Y<=a}function la(Y){var ie=typeof Y;return Y!=null&&(ie=="object"||ie=="function")}function Kn(Y){return Y!=null&&typeof Y=="object"}function _f(Y){if(!Kn(Y)||sl(Y)!=k)return!1;var ie=tn(Y);if(ie===null)return!0;var me=Ke.call(ie,"constructor")&&ie.constructor;return typeof me=="function"&&me instanceof me&&Ye.call(me)==Ct}var Dp=gt?lt(gt):wc;function kf(Y){return ui(Y,Np(Y))}function Np(Y){return Yt(Y)?q0(Y,!0):ll(Y)}var mn=vs(function(Y,ie,me,it){oa(Y,ie,me,it)});function Kt(Y){return function(){return Y}}function jp(Y){return Y}function X0(){return!1}e.exports=mn})(lte,W4);const Ul=W4;function Us(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function xh(e,...t){return ute(e)?e(...t):e}var ute=e=>typeof e=="function",cte=e=>/!(important)?$/.test(e),TL=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,r7=(e,t)=>n=>{const r=String(t),i=cte(r),o=TL(r),a=e?`${e}.${o}`:o;let s=Us(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=TL(s),i?`${s} !important`:s};function m2(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=r7(t,o)(a);let l=(n==null?void 0:n(s,a))??s;return r&&(l=r(l,a)),l}}var z3=(...e)=>t=>e.reduce((n,r)=>r(n),t);function As(e,t){return n=>{const r={property:n,scale:e};return r.transform=m2({scale:e,transform:t}),r}}var dte=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function fte(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:dte(t),transform:n?m2({scale:n,compose:r}):r}}var Tj=["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 hte(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Tj].join(" ")}function pte(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Tj].join(" ")}var mte={"--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(" ")},gte={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 vte(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 yte={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Lj="& > :not(style) ~ :not(style)",bte={[Lj]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},Ste={[Lj]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},i7={"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"},xte=new Set(Object.values(i7)),Aj=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),wte=e=>e.trim();function Cte(e,t){var n;if(e==null||Aj.has(e))return e;const r=/(?<type>^[a-z-A-Z]+)\((?<values>(.*))\)/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(wte).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=s in i7?i7[s]:s;l.unshift(u);const d=l.map(h=>{if(xte.has(h))return h;const g=h.indexOf(" "),[v,b]=g!==-1?[h.substr(0,g),h.substr(g+1)]:[h],S=Oj(b)?b:b&&b.split(" "),E=`colors.${v}`,_=E in t.__cssMap?t.__cssMap[E].varRef:v;return S?[_,...Array.isArray(S)?S:[S]].join(" "):_});return`${a}(${d.join(", ")})`}var Oj=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),_te=(e,t)=>Cte(e,t??{});function kte(e){return/^var\(--.+\)$/.test(e)}var Ete=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Ll=e=>t=>`${e}(${t})`,hn={filter(e){return e!=="auto"?e:mte},backdropFilter(e){return e!=="auto"?e:gte},ring(e){return vte(hn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?hte():e==="auto-gpu"?pte():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Ete(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(kte(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:_te,blur:Ll("blur"),opacity:Ll("opacity"),brightness:Ll("brightness"),contrast:Ll("contrast"),dropShadow:Ll("drop-shadow"),grayscale:Ll("grayscale"),hueRotate:Ll("hue-rotate"),invert:Ll("invert"),saturate:Ll("saturate"),sepia:Ll("sepia"),bgImage(e){return e==null||Oj(e)||Aj.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}=yte[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},se={borderWidths:As("borderWidths"),borderStyles:As("borderStyles"),colors:As("colors"),borders:As("borders"),radii:As("radii",hn.px),space:As("space",z3(hn.vh,hn.px)),spaceT:As("space",z3(hn.vh,hn.px)),degreeT(e){return{property:e,transform:hn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:m2({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:As("sizes",z3(hn.vh,hn.px)),sizesT:As("sizes",z3(hn.vh,hn.fraction)),shadows:As("shadows"),logical:fte,blur:As("blur",hn.blur)},o4={background:se.colors("background"),backgroundColor:se.colors("backgroundColor"),backgroundImage:se.propT("backgroundImage",hn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:hn.bgClip},bgSize:se.prop("backgroundSize"),bgPosition:se.prop("backgroundPosition"),bg:se.colors("background"),bgColor:se.colors("backgroundColor"),bgPos:se.prop("backgroundPosition"),bgRepeat:se.prop("backgroundRepeat"),bgAttachment:se.prop("backgroundAttachment"),bgGradient:se.propT("backgroundImage",hn.gradient),bgClip:{transform:hn.bgClip}};Object.assign(o4,{bgImage:o4.backgroundImage,bgImg:o4.backgroundImage});var _n={border:se.borders("border"),borderWidth:se.borderWidths("borderWidth"),borderStyle:se.borderStyles("borderStyle"),borderColor:se.colors("borderColor"),borderRadius:se.radii("borderRadius"),borderTop:se.borders("borderTop"),borderBlockStart:se.borders("borderBlockStart"),borderTopLeftRadius:se.radii("borderTopLeftRadius"),borderStartStartRadius:se.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:se.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:se.radii("borderTopRightRadius"),borderStartEndRadius:se.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:se.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:se.borders("borderRight"),borderInlineEnd:se.borders("borderInlineEnd"),borderBottom:se.borders("borderBottom"),borderBlockEnd:se.borders("borderBlockEnd"),borderBottomLeftRadius:se.radii("borderBottomLeftRadius"),borderBottomRightRadius:se.radii("borderBottomRightRadius"),borderLeft:se.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:se.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:se.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:se.borders(["borderLeft","borderRight"]),borderInline:se.borders("borderInline"),borderY:se.borders(["borderTop","borderBottom"]),borderBlock:se.borders("borderBlock"),borderTopWidth:se.borderWidths("borderTopWidth"),borderBlockStartWidth:se.borderWidths("borderBlockStartWidth"),borderTopColor:se.colors("borderTopColor"),borderBlockStartColor:se.colors("borderBlockStartColor"),borderTopStyle:se.borderStyles("borderTopStyle"),borderBlockStartStyle:se.borderStyles("borderBlockStartStyle"),borderBottomWidth:se.borderWidths("borderBottomWidth"),borderBlockEndWidth:se.borderWidths("borderBlockEndWidth"),borderBottomColor:se.colors("borderBottomColor"),borderBlockEndColor:se.colors("borderBlockEndColor"),borderBottomStyle:se.borderStyles("borderBottomStyle"),borderBlockEndStyle:se.borderStyles("borderBlockEndStyle"),borderLeftWidth:se.borderWidths("borderLeftWidth"),borderInlineStartWidth:se.borderWidths("borderInlineStartWidth"),borderLeftColor:se.colors("borderLeftColor"),borderInlineStartColor:se.colors("borderInlineStartColor"),borderLeftStyle:se.borderStyles("borderLeftStyle"),borderInlineStartStyle:se.borderStyles("borderInlineStartStyle"),borderRightWidth:se.borderWidths("borderRightWidth"),borderInlineEndWidth:se.borderWidths("borderInlineEndWidth"),borderRightColor:se.colors("borderRightColor"),borderInlineEndColor:se.colors("borderInlineEndColor"),borderRightStyle:se.borderStyles("borderRightStyle"),borderInlineEndStyle:se.borderStyles("borderInlineEndStyle"),borderTopRadius:se.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:se.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:se.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:se.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(_n,{rounded:_n.borderRadius,roundedTop:_n.borderTopRadius,roundedTopLeft:_n.borderTopLeftRadius,roundedTopRight:_n.borderTopRightRadius,roundedTopStart:_n.borderStartStartRadius,roundedTopEnd:_n.borderStartEndRadius,roundedBottom:_n.borderBottomRadius,roundedBottomLeft:_n.borderBottomLeftRadius,roundedBottomRight:_n.borderBottomRightRadius,roundedBottomStart:_n.borderEndStartRadius,roundedBottomEnd:_n.borderEndEndRadius,roundedLeft:_n.borderLeftRadius,roundedRight:_n.borderRightRadius,roundedStart:_n.borderInlineStartRadius,roundedEnd:_n.borderInlineEndRadius,borderStart:_n.borderInlineStart,borderEnd:_n.borderInlineEnd,borderTopStartRadius:_n.borderStartStartRadius,borderTopEndRadius:_n.borderStartEndRadius,borderBottomStartRadius:_n.borderEndStartRadius,borderBottomEndRadius:_n.borderEndEndRadius,borderStartRadius:_n.borderInlineStartRadius,borderEndRadius:_n.borderInlineEndRadius,borderStartWidth:_n.borderInlineStartWidth,borderEndWidth:_n.borderInlineEndWidth,borderStartColor:_n.borderInlineStartColor,borderEndColor:_n.borderInlineEndColor,borderStartStyle:_n.borderInlineStartStyle,borderEndStyle:_n.borderInlineEndStyle});var Pte={color:se.colors("color"),textColor:se.colors("color"),fill:se.colors("fill"),stroke:se.colors("stroke")},o7={boxShadow:se.shadows("boxShadow"),mixBlendMode:!0,blendMode:se.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:se.prop("backgroundBlendMode"),opacity:!0};Object.assign(o7,{shadow:o7.boxShadow});var Tte={filter:{transform:hn.filter},blur:se.blur("--chakra-blur"),brightness:se.propT("--chakra-brightness",hn.brightness),contrast:se.propT("--chakra-contrast",hn.contrast),hueRotate:se.degreeT("--chakra-hue-rotate"),invert:se.propT("--chakra-invert",hn.invert),saturate:se.propT("--chakra-saturate",hn.saturate),dropShadow:se.propT("--chakra-drop-shadow",hn.dropShadow),backdropFilter:{transform:hn.backdropFilter},backdropBlur:se.blur("--chakra-backdrop-blur"),backdropBrightness:se.propT("--chakra-backdrop-brightness",hn.brightness),backdropContrast:se.propT("--chakra-backdrop-contrast",hn.contrast),backdropHueRotate:se.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:se.propT("--chakra-backdrop-invert",hn.invert),backdropSaturate:se.propT("--chakra-backdrop-saturate",hn.saturate)},U4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:hn.flexDirection},experimental_spaceX:{static:bte,transform:m2({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:Ste,transform:m2({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:se.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:se.space("gap"),rowGap:se.space("rowGap"),columnGap:se.space("columnGap")};Object.assign(U4,{flexDir:U4.flexDirection});var Mj={gridGap:se.space("gridGap"),gridColumnGap:se.space("gridColumnGap"),gridRowGap:se.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},Lte={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:hn.outline},outlineOffset:!0,outlineColor:se.colors("outlineColor")},Xa={width:se.sizesT("width"),inlineSize:se.sizesT("inlineSize"),height:se.sizes("height"),blockSize:se.sizes("blockSize"),boxSize:se.sizes(["width","height"]),minWidth:se.sizes("minWidth"),minInlineSize:se.sizes("minInlineSize"),minHeight:se.sizes("minHeight"),minBlockSize:se.sizes("minBlockSize"),maxWidth:se.sizes("maxWidth"),maxInlineSize:se.sizes("maxInlineSize"),maxHeight:se.sizes("maxHeight"),maxBlockSize:se.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:se.propT("float",hn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Xa,{w:Xa.width,h:Xa.height,minW:Xa.minWidth,maxW:Xa.maxWidth,minH:Xa.minHeight,maxH:Xa.maxHeight,overscroll:Xa.overscrollBehavior,overscrollX:Xa.overscrollBehaviorX,overscrollY:Xa.overscrollBehaviorY});var Ate={listStyleType:!0,listStylePosition:!0,listStylePos:se.prop("listStylePosition"),listStyleImage:!0,listStyleImg:se.prop("listStyleImage")};function Ote(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var Mte=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},Ite=Mte(Ote),Rte={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Dte={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Kw=(e,t,n)=>{const r={},i=Ite(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},Nte={srOnly:{transform(e){return e===!0?Rte:e==="focusable"?Dte:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Kw(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Kw(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Kw(t,e,n)}},Dv={position:!0,pos:se.prop("position"),zIndex:se.prop("zIndex","zIndices"),inset:se.spaceT("inset"),insetX:se.spaceT(["left","right"]),insetInline:se.spaceT("insetInline"),insetY:se.spaceT(["top","bottom"]),insetBlock:se.spaceT("insetBlock"),top:se.spaceT("top"),insetBlockStart:se.spaceT("insetBlockStart"),bottom:se.spaceT("bottom"),insetBlockEnd:se.spaceT("insetBlockEnd"),left:se.spaceT("left"),insetInlineStart:se.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:se.spaceT("right"),insetInlineEnd:se.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Dv,{insetStart:Dv.insetInlineStart,insetEnd:Dv.insetInlineEnd});var jte={ring:{transform:hn.ring},ringColor:se.colors("--chakra-ring-color"),ringOffset:se.prop("--chakra-ring-offset-width"),ringOffsetColor:se.colors("--chakra-ring-offset-color"),ringInset:se.prop("--chakra-ring-inset")},ar={margin:se.spaceT("margin"),marginTop:se.spaceT("marginTop"),marginBlockStart:se.spaceT("marginBlockStart"),marginRight:se.spaceT("marginRight"),marginInlineEnd:se.spaceT("marginInlineEnd"),marginBottom:se.spaceT("marginBottom"),marginBlockEnd:se.spaceT("marginBlockEnd"),marginLeft:se.spaceT("marginLeft"),marginInlineStart:se.spaceT("marginInlineStart"),marginX:se.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:se.spaceT("marginInline"),marginY:se.spaceT(["marginTop","marginBottom"]),marginBlock:se.spaceT("marginBlock"),padding:se.space("padding"),paddingTop:se.space("paddingTop"),paddingBlockStart:se.space("paddingBlockStart"),paddingRight:se.space("paddingRight"),paddingBottom:se.space("paddingBottom"),paddingBlockEnd:se.space("paddingBlockEnd"),paddingLeft:se.space("paddingLeft"),paddingInlineStart:se.space("paddingInlineStart"),paddingInlineEnd:se.space("paddingInlineEnd"),paddingX:se.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:se.space("paddingInline"),paddingY:se.space(["paddingTop","paddingBottom"]),paddingBlock:se.space("paddingBlock")};Object.assign(ar,{m:ar.margin,mt:ar.marginTop,mr:ar.marginRight,me:ar.marginInlineEnd,marginEnd:ar.marginInlineEnd,mb:ar.marginBottom,ml:ar.marginLeft,ms:ar.marginInlineStart,marginStart:ar.marginInlineStart,mx:ar.marginX,my:ar.marginY,p:ar.padding,pt:ar.paddingTop,py:ar.paddingY,px:ar.paddingX,pb:ar.paddingBottom,pl:ar.paddingLeft,ps:ar.paddingInlineStart,paddingStart:ar.paddingInlineStart,pr:ar.paddingRight,pe:ar.paddingInlineEnd,paddingEnd:ar.paddingInlineEnd});var Bte={textDecorationColor:se.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:se.shadows("textShadow")},$te={clipPath:!0,transform:se.propT("transform",hn.transform),transformOrigin:!0,translateX:se.spaceT("--chakra-translate-x"),translateY:se.spaceT("--chakra-translate-y"),skewX:se.degreeT("--chakra-skew-x"),skewY:se.degreeT("--chakra-skew-y"),scaleX:se.prop("--chakra-scale-x"),scaleY:se.prop("--chakra-scale-y"),scale:se.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:se.degreeT("--chakra-rotate")},Fte={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:se.prop("transitionDuration","transition.duration"),transitionProperty:se.prop("transitionProperty","transition.property"),transitionTimingFunction:se.prop("transitionTimingFunction","transition.easing")},zte={fontFamily:se.prop("fontFamily","fonts"),fontSize:se.prop("fontSize","fontSizes",hn.px),fontWeight:se.prop("fontWeight","fontWeights"),lineHeight:se.prop("lineHeight","lineHeights"),letterSpacing:se.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"}},Hte={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:se.spaceT("scrollMargin"),scrollMarginTop:se.spaceT("scrollMarginTop"),scrollMarginBottom:se.spaceT("scrollMarginBottom"),scrollMarginLeft:se.spaceT("scrollMarginLeft"),scrollMarginRight:se.spaceT("scrollMarginRight"),scrollMarginX:se.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:se.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:se.spaceT("scrollPadding"),scrollPaddingTop:se.spaceT("scrollPaddingTop"),scrollPaddingBottom:se.spaceT("scrollPaddingBottom"),scrollPaddingLeft:se.spaceT("scrollPaddingLeft"),scrollPaddingRight:se.spaceT("scrollPaddingRight"),scrollPaddingX:se.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:se.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Ij(e){return Us(e)&&e.reference?e.reference:String(e)}var SS=(e,...t)=>t.map(Ij).join(` ${e} `).replace(/calc/g,""),LL=(...e)=>`calc(${SS("+",...e)})`,AL=(...e)=>`calc(${SS("-",...e)})`,a7=(...e)=>`calc(${SS("*",...e)})`,OL=(...e)=>`calc(${SS("/",...e)})`,ML=e=>{const t=Ij(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:a7(t,-1)},yh=Object.assign(e=>({add:(...t)=>yh(LL(e,...t)),subtract:(...t)=>yh(AL(e,...t)),multiply:(...t)=>yh(a7(e,...t)),divide:(...t)=>yh(OL(e,...t)),negate:()=>yh(ML(e)),toString:()=>e.toString()}),{add:LL,subtract:AL,multiply:a7,divide:OL,negate:ML});function Vte(e,t="-"){return e.replace(/\s+/g,t)}function Wte(e){const t=Vte(e.toString());return Gte(Ute(t))}function Ute(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function Gte(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function qte(e,t=""){return[t,e].filter(Boolean).join("-")}function Yte(e,t){return`var(${e}${t?`, ${t}`:""})`}function Kte(e,t=""){return Wte(`--${qte(e,t)}`)}function Vn(e,t,n){const r=Kte(e,n);return{variable:r,reference:Yte(r,t)}}function Xte(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Zte(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function s7(e){if(e==null)return e;const{unitless:t}=Zte(e);return t||typeof e=="number"?`${e}px`:e}var Rj=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,k8=e=>Object.fromEntries(Object.entries(e).sort(Rj));function IL(e){const t=k8(e);return Object.assign(Object.values(t),t)}function Qte(e){const t=Object.keys(k8(e));return new Set(t)}function RL(e){if(!e)return e;e=s7(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 vv(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${s7(e)})`),t&&n.push("and",`(max-width: ${s7(t)})`),n.join(" ")}function Jte(e){if(!e)return null;e.base=e.base??"0px";const t=IL(e),n=Object.entries(e).sort(Rj).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?RL(u):void 0,{_minW:RL(a),breakpoint:o,minW:a,maxW:u,maxWQuery:vv(null,u),minWQuery:vv(a),minMaxQuery:vv(a,u)}}),r=Qte(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:k8(e),asArray:IL(e),details:n,media:[null,...t.map(o=>vv(o)).slice(1)],toArrayValue(o){if(!Us(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;Xte(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 zi={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}`},od=e=>Dj(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ju=e=>Dj(t=>e(t,"~ &"),"[data-peer]",".peer"),Dj=(e,...t)=>t.map(e).join(", "),xS={_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:od(zi.hover),_peerHover:ju(zi.hover),_groupFocus:od(zi.focus),_peerFocus:ju(zi.focus),_groupFocusVisible:od(zi.focusVisible),_peerFocusVisible:ju(zi.focusVisible),_groupActive:od(zi.active),_peerActive:ju(zi.active),_groupDisabled:od(zi.disabled),_peerDisabled:ju(zi.disabled),_groupInvalid:od(zi.invalid),_peerInvalid:ju(zi.invalid),_groupChecked:od(zi.checked),_peerChecked:ju(zi.checked),_groupFocusWithin:od(zi.focusWithin),_peerFocusWithin:ju(zi.focusWithin),_peerPlaceholderShown:ju(zi.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]"},ene=Object.keys(xS);function DL(e,t){return Vn(String(e).replace(/\./g,"-"),void 0,t)}function tne(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=DL(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const g=i.split("."),[v,...b]=g,S=`${v}.-${b.join(".")}`,E=yh.negate(s),_=yh.negate(u);r[S]={value:E,var:l,varRef:_}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const d=g=>{const b=[String(i).split(".")[0],g].join(".");if(!e[b])return g;const{reference:E}=DL(b,t==null?void 0:t.cssVarPrefix);return E},h=Us(s)?s:{default:s};n=Ul(n,Object.entries(h).reduce((g,[v,b])=>{var S;const E=d(b);if(v==="default")return g[l]=E,g;const _=((S=xS)==null?void 0:S[v])??v;return g[_]={[l]:E},g},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function nne(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function rne(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var ine=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function one(e){return rne(e,ine)}function ane(e){return e.semanticTokens}function sne(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function lne({tokens:e,semanticTokens:t}){const n=Object.entries(l7(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(l7(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function l7(e,t=1/0){return!Us(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Us(i)||Array.isArray(i)?Object.entries(l7(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function une(e){var t;const n=sne(e),r=one(n),i=ane(n),o=lne({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=tne(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:Jte(n.breakpoints)}),n}var E8=Ul({},o4,_n,Pte,U4,Xa,Tte,jte,Lte,Mj,Nte,Dv,o7,ar,Hte,zte,Bte,$te,Ate,Fte),cne=Object.assign({},ar,Xa,U4,Mj,Dv),dne=Object.keys(cne),fne=[...Object.keys(E8),...ene],hne={...E8,...xS},pne=e=>e in hne,mne=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=xh(e[a],t);if(s==null)continue;if(s=Us(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;u<l;u+=1){const d=i==null?void 0:i[u];if(!d){o[a]=s[u];continue}o[d]=o[d]||{},s[u]!=null&&(o[d][a]=s[u])}}return o};function gne(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function vne(e){return/^var\(--.+\)$/.test(e)}var yne=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!vne(t),bne=(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]=gne(t);return t=n(i)??r(o)??r(t),t};function Sne(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=xh(o,r),u=mne(l)(r);let d={};for(let h in u){const g=u[h];let v=xh(g,r);h in n&&(h=n[h]),yne(h,v)&&(v=bne(r,v));let b=t[h];if(b===!0&&(b={property:h}),Us(v)){d[h]=d[h]??{},d[h]=Ul({},d[h],i(v,!0));continue}let S=((s=b==null?void 0:b.transform)==null?void 0:s.call(b,v,r,l))??v;S=b!=null&&b.processResult?i(S,!0):S;const E=xh(b==null?void 0:b.property,r);if(!a&&(b!=null&&b.static)){const _=xh(b.static,r);d=Ul({},d,_)}if(E&&Array.isArray(E)){for(const _ of E)d[_]=S;continue}if(E){E==="&"&&Us(S)?d=Ul({},d,S):d[E]=S;continue}if(Us(S)){d=Ul({},d,S);continue}d[h]=S}return d};return i}var Nj=e=>t=>Sne({theme:t,pseudos:xS,configs:E8})(e);function hr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function xne(e,t){if(Array.isArray(e))return e;if(Us(e))return t(e);if(e!=null)return[e]}function wne(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function Cne(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const u={},d=xne(o,t.toArrayValue);if(!d)return u;const h=d.length,g=h===1,v=!!r.parts;for(let b=0;b<h;b++){const S=t.details[b],E=t.details[wne(d,b)],_=vv(S.minW,E==null?void 0:E._minW),k=xh((s=r[i])==null?void 0:s[d[b]],a);if(k){if(v){(l=r.parts)==null||l.forEach(T=>{Ul(u,{[T]:g?k[T]:{[_]:k[T]}})});continue}if(!v){g?Ul(u,k):u[_]=k;continue}u[_]=k}}return u}}function _ne(e){return t=>{const{variant:n,size:r,theme:i}=t,o=Cne(i);return Ul({},xh(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function kne(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function Sn(e){return nne(e,["styleConfig","size","variant","colorScheme"])}function Ene(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Pne(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Tne=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Pne(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Ene(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),to="-ms-",G4="-moz-",kn="-webkit-",jj="comm",P8="rule",T8="decl",Lne="@import",Bj="@keyframes",Ane=Math.abs,wS=String.fromCharCode,One=Object.assign;function Mne(e,t){return Ui(e,0)^45?(((t<<2^Ui(e,0))<<2^Ui(e,1))<<2^Ui(e,2))<<2^Ui(e,3):0}function $j(e){return e.trim()}function Ine(e,t){return(e=t.exec(e))?e[0]:e}function On(e,t,n){return e.replace(t,n)}function u7(e,t){return e.indexOf(t)}function Ui(e,t){return e.charCodeAt(t)|0}function g2(e,t,n){return e.slice(t,n)}function $l(e){return e.length}function L8(e){return e.length}function H3(e,t){return t.push(e),e}function Rne(e,t){return e.map(t).join("")}var CS=1,Vg=1,Fj=0,na=0,ii=0,p0="";function _S(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:CS,column:Vg,length:a,return:""}}function z1(e,t){return One(_S("",null,null,"",null,null,0),e,{length:-e.length},t)}function Dne(){return ii}function Nne(){return ii=na>0?Ui(p0,--na):0,Vg--,ii===10&&(Vg=1,CS--),ii}function Pa(){return ii=na<Fj?Ui(p0,na++):0,Vg++,ii===10&&(Vg=1,CS++),ii}function Kl(){return Ui(p0,na)}function a4(){return na}function hy(e,t){return g2(p0,e,t)}function v2(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zj(e){return CS=Vg=1,Fj=$l(p0=e),na=0,[]}function Hj(e){return p0="",e}function s4(e){return $j(hy(na-1,c7(e===91?e+2:e===40?e+1:e)))}function jne(e){for(;(ii=Kl())&&ii<33;)Pa();return v2(e)>2||v2(ii)>3?"":" "}function Bne(e,t){for(;--t&&Pa()&&!(ii<48||ii>102||ii>57&&ii<65||ii>70&&ii<97););return hy(e,a4()+(t<6&&Kl()==32&&Pa()==32))}function c7(e){for(;Pa();)switch(ii){case e:return na;case 34:case 39:e!==34&&e!==39&&c7(ii);break;case 40:e===41&&c7(e);break;case 92:Pa();break}return na}function $ne(e,t){for(;Pa()&&e+ii!==47+10;)if(e+ii===42+42&&Kl()===47)break;return"/*"+hy(t,na-1)+"*"+wS(e===47?e:Pa())}function Fne(e){for(;!v2(Kl());)Pa();return hy(e,na)}function zne(e){return Hj(l4("",null,null,null,[""],e=zj(e),0,[0],e))}function l4(e,t,n,r,i,o,a,s,l){for(var u=0,d=0,h=a,g=0,v=0,b=0,S=1,E=1,_=1,k=0,T="",A=i,M=o,R=r,D=T;E;)switch(b=k,k=Pa()){case 40:if(b!=108&&Ui(D,h-1)==58){u7(D+=On(s4(k),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:D+=s4(k);break;case 9:case 10:case 13:case 32:D+=jne(b);break;case 92:D+=Bne(a4()-1,7);continue;case 47:switch(Kl()){case 42:case 47:H3(Hne($ne(Pa(),a4()),t,n),l);break;default:D+="/"}break;case 123*S:s[u++]=$l(D)*_;case 125*S:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+d:v>0&&$l(D)-h&&H3(v>32?jL(D+";",r,n,h-1):jL(On(D," ","")+";",r,n,h-2),l);break;case 59:D+=";";default:if(H3(R=NL(D,t,n,u,d,i,s,T,A=[],M=[],h),o),k===123)if(d===0)l4(D,t,R,R,A,o,h,s,M);else switch(g===99&&Ui(D,3)===110?100:g){case 100:case 109:case 115:l4(e,R,R,r&&H3(NL(e,R,R,0,0,i,s,T,i,A=[],h),M),i,M,h,s,r?A:M);break;default:l4(D,R,R,R,[""],M,0,s,M)}}u=d=v=0,S=_=1,T=D="",h=a;break;case 58:h=1+$l(D),v=b;default:if(S<1){if(k==123)--S;else if(k==125&&S++==0&&Nne()==125)continue}switch(D+=wS(k),k*S){case 38:_=d>0?1:(D+="\f",-1);break;case 44:s[u++]=($l(D)-1)*_,_=1;break;case 64:Kl()===45&&(D+=s4(Pa())),g=Kl(),d=h=$l(T=D+=Fne(a4())),k++;break;case 45:b===45&&$l(D)==2&&(S=0)}}return o}function NL(e,t,n,r,i,o,a,s,l,u,d){for(var h=i-1,g=i===0?o:[""],v=L8(g),b=0,S=0,E=0;b<r;++b)for(var _=0,k=g2(e,h+1,h=Ane(S=a[b])),T=e;_<v;++_)(T=$j(S>0?g[_]+" "+k:On(k,/&\f/g,g[_])))&&(l[E++]=T);return _S(e,t,n,i===0?P8:s,l,u,d)}function Hne(e,t,n){return _S(e,t,n,jj,wS(Dne()),g2(e,2,-2),0)}function jL(e,t,n,r){return _S(e,t,n,T8,g2(e,0,r),g2(e,r+1,-1),r)}function mg(e,t){for(var n="",r=L8(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Vne(e,t,n,r){switch(e.type){case Lne:case T8:return e.return=e.return||e.value;case jj:return"";case Bj:return e.return=e.value+"{"+mg(e.children,r)+"}";case P8:e.value=e.props.join(",")}return $l(n=mg(e.children,r))?e.return=e.value+"{"+n+"}":""}function Wne(e){var t=L8(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function Une(e){return function(t){t.root||(t=t.return)&&e(t)}}var BL=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function Vj(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Gne=function(t,n,r){for(var i=0,o=0;i=o,o=Kl(),i===38&&o===12&&(n[r]=1),!v2(o);)Pa();return hy(t,na)},qne=function(t,n){var r=-1,i=44;do switch(v2(i)){case 0:i===38&&Kl()===12&&(n[r]=1),t[r]+=Gne(na-1,n,r);break;case 2:t[r]+=s4(i);break;case 4:if(i===44){t[++r]=Kl()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=wS(i)}while(i=Pa());return t},Yne=function(t,n){return Hj(qne(zj(t),n))},$L=new WeakMap,Kne=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!$L.get(r))&&!i){$L.set(t,!0);for(var o=[],a=Yne(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var d=0;d<s.length;d++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},Xne=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Wj(e,t){switch(Mne(e,t)){case 5103:return kn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return kn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return kn+e+G4+e+to+e+e;case 6828:case 4268:return kn+e+to+e+e;case 6165:return kn+e+to+"flex-"+e+e;case 5187:return kn+e+On(e,/(\w+).+(:[^]+)/,kn+"box-$1$2"+to+"flex-$1$2")+e;case 5443:return kn+e+to+"flex-item-"+On(e,/flex-|-self/,"")+e;case 4675:return kn+e+to+"flex-line-pack"+On(e,/align-content|flex-|-self/,"")+e;case 5548:return kn+e+to+On(e,"shrink","negative")+e;case 5292:return kn+e+to+On(e,"basis","preferred-size")+e;case 6060:return kn+"box-"+On(e,"-grow","")+kn+e+to+On(e,"grow","positive")+e;case 4554:return kn+On(e,/([^-])(transform)/g,"$1"+kn+"$2")+e;case 6187:return On(On(On(e,/(zoom-|grab)/,kn+"$1"),/(image-set)/,kn+"$1"),e,"")+e;case 5495:case 3959:return On(e,/(image-set\([^]*)/,kn+"$1$`$1");case 4968:return On(On(e,/(.+:)(flex-)?(.*)/,kn+"box-pack:$3"+to+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+kn+e+e;case 4095:case 3583:case 4068:case 2532:return On(e,/(.+)-inline(.+)/,kn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if($l(e)-1-t>6)switch(Ui(e,t+1)){case 109:if(Ui(e,t+4)!==45)break;case 102:return On(e,/(.+:)(.+)-([^]+)/,"$1"+kn+"$2-$3$1"+G4+(Ui(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~u7(e,"stretch")?Wj(On(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ui(e,t+1)!==115)break;case 6444:switch(Ui(e,$l(e)-3-(~u7(e,"!important")&&10))){case 107:return On(e,":",":"+kn)+e;case 101:return On(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+kn+(Ui(e,14)===45?"inline-":"")+"box$3$1"+kn+"$2$3$1"+to+"$2box$3")+e}break;case 5936:switch(Ui(e,t+11)){case 114:return kn+e+to+On(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return kn+e+to+On(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return kn+e+to+On(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return kn+e+to+e+e}return e}var Zne=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case T8:t.return=Wj(t.value,t.length);break;case Bj:return mg([z1(t,{value:On(t.value,"@","@"+kn)})],i);case P8:if(t.length)return Rne(t.props,function(o){switch(Ine(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mg([z1(t,{props:[On(o,/:(read-\w+)/,":"+G4+"$1")]})],i);case"::placeholder":return mg([z1(t,{props:[On(o,/:(plac\w+)/,":"+kn+"input-$1")]}),z1(t,{props:[On(o,/:(plac\w+)/,":"+G4+"$1")]}),z1(t,{props:[On(o,/:(plac\w+)/,to+"input-$1")]})],i)}return""})}},Qne=[Zne],Uj=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(S){var E=S.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var i=t.stylisPlugins||Qne,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var E=S.getAttribute("data-emotion").split(" "),_=1;_<E.length;_++)o[E[_]]=!0;s.push(S)});var l,u=[Kne,Xne];{var d,h=[Vne,Une(function(S){d.insert(S)})],g=Wne(u.concat(i,h)),v=function(E){return mg(zne(E),g)};l=function(E,_,k,T){d=k,v(E?E+"{"+_.styles+"}":_.styles),T&&(b.inserted[_.name]=!0)}}var b={key:n,sheet:new Tne({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return b.sheet.hydrate(s),b};function bn(){return bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bn.apply(this,arguments)}var d7={},Jne={get exports(){return d7},set exports(e){d7=e}},Fn={};/** @license React v16.13.1
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Ai=typeof Symbol=="function"&&Symbol.for,A8=Ai?Symbol.for("react.element"):60103,O8=Ai?Symbol.for("react.portal"):60106,kS=Ai?Symbol.for("react.fragment"):60107,ES=Ai?Symbol.for("react.strict_mode"):60108,PS=Ai?Symbol.for("react.profiler"):60114,TS=Ai?Symbol.for("react.provider"):60109,LS=Ai?Symbol.for("react.context"):60110,M8=Ai?Symbol.for("react.async_mode"):60111,AS=Ai?Symbol.for("react.concurrent_mode"):60111,OS=Ai?Symbol.for("react.forward_ref"):60112,MS=Ai?Symbol.for("react.suspense"):60113,ere=Ai?Symbol.for("react.suspense_list"):60120,IS=Ai?Symbol.for("react.memo"):60115,RS=Ai?Symbol.for("react.lazy"):60116,tre=Ai?Symbol.for("react.block"):60121,nre=Ai?Symbol.for("react.fundamental"):60117,rre=Ai?Symbol.for("react.responder"):60118,ire=Ai?Symbol.for("react.scope"):60119;function Ra(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case A8:switch(e=e.type,e){case M8:case AS:case kS:case PS:case ES:case MS:return e;default:switch(e=e&&e.$$typeof,e){case LS:case OS:case RS:case IS:case TS:return e;default:return t}}case O8:return t}}}function Gj(e){return Ra(e)===AS}Fn.AsyncMode=M8;Fn.ConcurrentMode=AS;Fn.ContextConsumer=LS;Fn.ContextProvider=TS;Fn.Element=A8;Fn.ForwardRef=OS;Fn.Fragment=kS;Fn.Lazy=RS;Fn.Memo=IS;Fn.Portal=O8;Fn.Profiler=PS;Fn.StrictMode=ES;Fn.Suspense=MS;Fn.isAsyncMode=function(e){return Gj(e)||Ra(e)===M8};Fn.isConcurrentMode=Gj;Fn.isContextConsumer=function(e){return Ra(e)===LS};Fn.isContextProvider=function(e){return Ra(e)===TS};Fn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===A8};Fn.isForwardRef=function(e){return Ra(e)===OS};Fn.isFragment=function(e){return Ra(e)===kS};Fn.isLazy=function(e){return Ra(e)===RS};Fn.isMemo=function(e){return Ra(e)===IS};Fn.isPortal=function(e){return Ra(e)===O8};Fn.isProfiler=function(e){return Ra(e)===PS};Fn.isStrictMode=function(e){return Ra(e)===ES};Fn.isSuspense=function(e){return Ra(e)===MS};Fn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kS||e===AS||e===PS||e===ES||e===MS||e===ere||typeof e=="object"&&e!==null&&(e.$$typeof===RS||e.$$typeof===IS||e.$$typeof===TS||e.$$typeof===LS||e.$$typeof===OS||e.$$typeof===nre||e.$$typeof===rre||e.$$typeof===ire||e.$$typeof===tre)};Fn.typeOf=Ra;(function(e){e.exports=Fn})(Jne);var qj=d7,ore={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},are={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Yj={};Yj[qj.ForwardRef]=ore;Yj[qj.Memo]=are;var sre=!0;function lre(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var Kj=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||sre===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},Xj=function(t,n,r){Kj(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 ure(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 cre={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},dre=/[A-Z]|^ms/g,fre=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zj=function(t){return t.charCodeAt(1)===45},FL=function(t){return t!=null&&typeof t!="boolean"},Xw=Vj(function(e){return Zj(e)?e:e.replace(dre,"-$&").toLowerCase()}),zL=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(fre,function(r,i,o){return Fl={name:i,styles:o,next:Fl},i})}return cre[t]!==1&&!Zj(t)&&typeof n=="number"&&n!==0?n+"px":n};function y2(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Fl={name:n.name,styles:n.styles,next:Fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Fl={name:r.name,styles:r.styles,next:Fl},r=r.next;var i=n.styles+";";return i}return hre(e,t,n)}case"function":{if(e!==void 0){var o=Fl,a=n(e);return Fl=o,y2(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function hre(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=y2(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":FL(a)&&(r+=Xw(o)+":"+zL(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)FL(a[s])&&(r+=Xw(o)+":"+zL(o,a[s])+";");else{var l=y2(e,t,a);switch(o){case"animation":case"animationName":{r+=Xw(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var HL=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Fl,I8=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Fl=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=y2(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=y2(r,n,t[s]),i&&(o+=a[s]);HL.lastIndex=0;for(var l="",u;(u=HL.exec(o))!==null;)l+="-"+u[1];var d=ure(o)+l;return{name:d,styles:o,next:Fl}},pre=function(t){return t()},Qj=n7["useInsertionEffect"]?n7["useInsertionEffect"]:!1,mre=Qj||pre,VL=Qj||w.useLayoutEffect,Jj=w.createContext(typeof HTMLElement<"u"?Uj({key:"css"}):null),gre=Jj.Provider,eB=function(t){return w.forwardRef(function(n,r){var i=w.useContext(Jj);return t(n,i,r)})},b2=w.createContext({}),vre=function(t,n){if(typeof n=="function"){var r=n(t);return r}return bn({},t,n)},yre=BL(function(e){return BL(function(t){return vre(e,t)})}),bre=function(t){var n=w.useContext(b2);return t.theme!==n&&(n=yre(n)(t.theme)),w.createElement(b2.Provider,{value:n},t.children)},DS=eB(function(e,t){var n=e.styles,r=I8([n],void 0,w.useContext(b2)),i=w.useRef();return VL(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),VL(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&Xj(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function Sre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return I8(t)}var tf=function(){var t=Sre.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},tB=1/60*1e3,xre=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},nB=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(xre())},tB)};function wre(e){var t=[],n=[],r=0,i=!1,o=new WeakSet,a={schedule:function(s,l,u){l===void 0&&(l=!1),u===void 0&&(u=!1);var d=u&&i,h=d?t:n;return l&&o.add(s),h.indexOf(s)===-1&&(h.push(s),d&&i&&(r=t.length)),s},cancel:function(s){var l=n.indexOf(s);l!==-1&&n.splice(l,1),o.delete(s)},process:function(s){var l;if(i=!0,l=[n,t],t=l[0],n=l[1],n.length=0,r=t.length,r)for(var u=0;u<r;u++){var d=t[u];d(s),o.has(d)&&(a.schedule(d),e())}i=!1}};return a}var Cre=40,f7=!0,S2=!1,h7=!1,Nv={delta:0,timestamp:0},NS=["read","update","preRender","render","postRender"],R8=NS.reduce(function(e,t){return e[t]=wre(function(){return S2=!0}),e},{}),_re=NS.reduce(function(e,t){var n=R8[t];return e[t]=function(r,i,o){return i===void 0&&(i=!1),o===void 0&&(o=!1),S2||Pre(),n.schedule(r,i,o)},e},{}),kre=NS.reduce(function(e,t){return e[t]=R8[t].cancel,e},{}),Ere=function(e){return R8[e].process(Nv)},rB=function(e){S2=!1,Nv.delta=f7?tB:Math.max(Math.min(e-Nv.timestamp,Cre),1),Nv.timestamp=e,h7=!0,NS.forEach(Ere),h7=!1,S2&&(f7=!1,nB(rB))},Pre=function(){S2=!0,f7=!0,h7||nB(rB)},WL=function(){return Nv};function Tre(e){return typeof e=="function"}function Lre(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function Are(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var Ore=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},iB=Ore(Are);function oB(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var aB=e=>oB(e,t=>t!=null);function Mre(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Ire=Mre();function sB(e,...t){return Tre(e)?e(...t):e}function Rre(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Dre(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=w.createContext(void 0);i.displayName=r;function o(){var a;const s=w.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 Nre=/^((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)-.*))$/,jre=Vj(function(e){return Nre.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Bre=jre,$re=function(t){return t!=="theme"},UL=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Bre:$re},GL=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},Fre=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Kj(n,r,i),mre(function(){return Xj(n,r,i)}),null},zre=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=GL(t,n,r),l=s||UL(i),u=!l("as");return function(){var d=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)h.push.apply(h,d);else{h.push(d[0][0]);for(var g=d.length,v=1;v<g;v++)h.push(d[v],d[0][v])}var b=eB(function(S,E,_){var k=u&&S.as||i,T="",A=[],M=S;if(S.theme==null){M={};for(var R in S)M[R]=S[R];M.theme=w.useContext(b2)}typeof S.className=="string"?T=lre(E.registered,A,S.className):S.className!=null&&(T=S.className+" ");var D=I8(h.concat(A),E.registered,M);T+=E.key+"-"+D.name,a!==void 0&&(T+=" "+a);var j=u&&s===void 0?UL(k):l,F={};for(var H in S)u&&H==="as"||j(H)&&(F[H]=S[H]);return F.className=T,F.ref=_,w.createElement(w.Fragment,null,w.createElement(Fre,{cache:E,serialized:D,isStringTag:typeof k=="string"}),w.createElement(k,F))});return b.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",b.defaultProps=t.defaultProps,b.__emotion_real=b,b.__emotion_base=i,b.__emotion_styles=h,b.__emotion_forwardProp=s,Object.defineProperty(b,"toString",{value:function(){return"."+a}}),b.withComponent=function(S,E){return e(S,bn({},n,E,{shouldForwardProp:GL(b,E,!0)})).apply(void 0,h)},b}},Hre=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],p7=zre.bind();Hre.forEach(function(e){p7[e]=p7(e)});function In(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...d){r();for(const h of d)t[h]=l(h);return In(e,t)}function o(...d){for(const h of d)h in t||(t[h]=l(h));return In(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([h,g])=>[h,g.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([h,g])=>[h,g.className]))}function l(d){const v=`chakra-${(["container","root"].includes(d??"")?[e]:[e,d]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>d}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var Vre=In("accordion").parts("root","container","button","panel").extend("icon"),Wre=In("alert").parts("title","description","container").extend("icon","spinner"),Ure=In("avatar").parts("label","badge","container").extend("excessLabel","group"),Gre=In("breadcrumb").parts("link","item","container").extend("separator");In("button").parts();var qre=In("checkbox").parts("control","icon","container").extend("label");In("progress").parts("track","filledTrack").extend("label");var Yre=In("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Kre=In("editable").parts("preview","input","textarea"),Xre=In("form").parts("container","requiredIndicator","helperText"),Zre=In("formError").parts("text","icon"),Qre=In("input").parts("addon","field","element"),Jre=In("list").parts("container","item","icon"),eie=In("menu").parts("button","list","item").extend("groupTitle","command","divider"),tie=In("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),nie=In("numberinput").parts("root","field","stepperGroup","stepper");In("pininput").parts("field");var rie=In("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),iie=In("progress").parts("label","filledTrack","track"),oie=In("radio").parts("container","control","label"),aie=In("select").parts("field","icon"),sie=In("slider").parts("container","track","thumb","filledTrack","mark"),lie=In("stat").parts("container","label","helpText","number","icon"),uie=In("switch").parts("container","track","thumb"),cie=In("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),die=In("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),fie=In("tag").parts("container","label","closeButton"),hie=In("card").parts("container","header","body","footer");function qi(e,t){pie(e)&&(e="100%");var n=mie(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 V3(e){return Math.min(1,Math.max(0,e))}function pie(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function mie(e){return typeof e=="string"&&e.indexOf("%")!==-1}function lB(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function W3(e){return e<=1?"".concat(Number(e)*100,"%"):e}function wh(e){return e.length===1?"0"+e:String(e)}function gie(e,t,n){return{r:qi(e,255)*255,g:qi(t,255)*255,b:qi(n,255)*255}}function qL(e,t,n){e=qi(e,255),t=qi(t,255),n=qi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:a,l:s}}function Zw(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 vie(e,t,n){var r,i,o;if(e=qi(e,360),t=qi(t,100),n=qi(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=Zw(s,a,e+1/3),i=Zw(s,a,e),o=Zw(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function YL(e,t,n){e=qi(e,255),t=qi(t,255),n=qi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:a}}function yie(e,t,n){e=qi(e,360)*6,t=qi(t,100),n=qi(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,a,o,o,s,n][l],d=[s,n,n,a,o,o][l],h=[o,o,s,n,n,a][l];return{r:u*255,g:d*255,b:h*255}}function KL(e,t,n,r){var i=[wh(Math.round(e).toString(16)),wh(Math.round(t).toString(16)),wh(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function bie(e,t,n,r,i){var o=[wh(Math.round(e).toString(16)),wh(Math.round(t).toString(16)),wh(Math.round(n).toString(16)),wh(Sie(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Sie(e){return Math.round(parseFloat(e)*255).toString(16)}function XL(e){return Ca(e)/255}function Ca(e){return parseInt(e,16)}function xie(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var m7={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 wie(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=kie(e)),typeof e=="object"&&(Bu(e.r)&&Bu(e.g)&&Bu(e.b)?(t=gie(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Bu(e.h)&&Bu(e.s)&&Bu(e.v)?(r=W3(e.s),i=W3(e.v),t=yie(e.h,r,i),a=!0,s="hsv"):Bu(e.h)&&Bu(e.s)&&Bu(e.l)&&(r=W3(e.s),o=W3(e.l),t=vie(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=lB(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 Cie="[-\\+]?\\d+%?",_ie="[-\\+]?\\d*\\.\\d+%?",wd="(?:".concat(_ie,")|(?:").concat(Cie,")"),Qw="[\\s|\\(]+(".concat(wd,")[,|\\s]+(").concat(wd,")[,|\\s]+(").concat(wd,")\\s*\\)?"),Jw="[\\s|\\(]+(".concat(wd,")[,|\\s]+(").concat(wd,")[,|\\s]+(").concat(wd,")[,|\\s]+(").concat(wd,")\\s*\\)?"),Ds={CSS_UNIT:new RegExp(wd),rgb:new RegExp("rgb"+Qw),rgba:new RegExp("rgba"+Jw),hsl:new RegExp("hsl"+Qw),hsla:new RegExp("hsla"+Jw),hsv:new RegExp("hsv"+Qw),hsva:new RegExp("hsva"+Jw),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 kie(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(m7[e])e=m7[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Ds.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ds.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ds.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Ds.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ds.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Ds.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ds.hex8.exec(e),n?{r:Ca(n[1]),g:Ca(n[2]),b:Ca(n[3]),a:XL(n[4]),format:t?"name":"hex8"}:(n=Ds.hex6.exec(e),n?{r:Ca(n[1]),g:Ca(n[2]),b:Ca(n[3]),format:t?"name":"hex"}:(n=Ds.hex4.exec(e),n?{r:Ca(n[1]+n[1]),g:Ca(n[2]+n[2]),b:Ca(n[3]+n[3]),a:XL(n[4]+n[4]),format:t?"name":"hex8"}:(n=Ds.hex3.exec(e),n?{r:Ca(n[1]+n[1]),g:Ca(n[2]+n[2]),b:Ca(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Bu(e){return Boolean(Ds.CSS_UNIT.exec(String(e)))}var py=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=xie(t)),this.originalInput=t;var i=wie(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=lB(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=YL(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=YL(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=qL(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=qL(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),KL(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),bie(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(qi(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(qi(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="#"+KL(this.r,this.g,this.b,!1),n=0,r=Object.entries(m7);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t??this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=V3(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=V3(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=V3(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=V3(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function uB(e){if(e===void 0&&(e={}),e.count!==void 0&&e.count!==null){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(uB(e));return e.count=t,n}var r=Eie(e.hue,e.seed),i=Pie(r,e),o=Tie(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new py(a)}function Eie(e,t){var n=Aie(e),r=q4(n,t);return r<0&&(r=360+r),r}function Pie(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return q4([0,100],t.seed);var n=cB(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 q4([r,i],t.seed)}function Tie(e,t,n){var r=Lie(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 q4([r,i],n.seed)}function Lie(e,t){for(var n=cB(e).lowerBounds,r=0;r<n.length-1;r++){var i=n[r][0],o=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Aie(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=fB.find(function(a){return a.name===e});if(n){var r=dB(n);if(r.hueRange)return r.hueRange}var i=new py(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function cB(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=fB;t<n.length;t++){var r=n[t],i=dB(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function q4(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 dB(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 fB=[{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 Oie(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Mie=e=>Object.keys(e).length===0,_o=(e,t,n)=>{const r=Oie(e,`colors.${t}`,t),{isValid:i}=new py(r);return i?r:n},Iie=e=>t=>{const n=_o(t,e);return new py(n).isDark()?"dark":"light"},Rie=e=>t=>Iie(e)(t)==="dark",Wg=(e,t)=>n=>{const r=_o(n,e);return new py(r).setAlpha(t).toRgbString()};function ZL(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
|
||
45deg,
|
||
${t} 25%,
|
||
transparent 25%,
|
||
transparent 50%,
|
||
${t} 50%,
|
||
${t} 75%,
|
||
transparent 75%,
|
||
transparent
|
||
)`,backgroundSize:`${e} ${e}`}}function Die(e){const t=uB().toHexString();return!e||Mie(e)?t:e.string&&e.colors?jie(e.string,e.colors):e.string&&!e.colors?Nie(e.string):e.colors&&!e.string?Bie(e.colors):t}function Nie(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function jie(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function Bie(e){return e[Math.floor(Math.random()*e.length)]}function Et(e,t){return n=>n.colorMode==="dark"?t:e}function D8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function $ie(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function hB(e){return $ie(e)&&e.reference?e.reference:String(e)}var jS=(e,...t)=>t.map(hB).join(` ${e} `).replace(/calc/g,""),QL=(...e)=>`calc(${jS("+",...e)})`,JL=(...e)=>`calc(${jS("-",...e)})`,g7=(...e)=>`calc(${jS("*",...e)})`,eA=(...e)=>`calc(${jS("/",...e)})`,tA=e=>{const t=hB(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:g7(t,-1)},Wu=Object.assign(e=>({add:(...t)=>Wu(QL(e,...t)),subtract:(...t)=>Wu(JL(e,...t)),multiply:(...t)=>Wu(g7(e,...t)),divide:(...t)=>Wu(eA(e,...t)),negate:()=>Wu(tA(e)),toString:()=>e.toString()}),{add:QL,subtract:JL,multiply:g7,divide:eA,negate:tA});function Fie(e){return!Number.isInteger(parseFloat(e.toString()))}function zie(e,t="-"){return e.replace(/\s+/g,t)}function pB(e){const t=zie(e.toString());return t.includes("\\.")?e:Fie(e)?t.replace(".","\\."):e}function Hie(e,t=""){return[t,pB(e)].filter(Boolean).join("-")}function Vie(e,t){return`var(${pB(e)}${t?`, ${t}`:""})`}function Wie(e,t=""){return`--${Hie(e,t)}`}function yi(e,t){const n=Wie(e,t==null?void 0:t.prefix);return{variable:n,reference:Vie(n,Uie(t==null?void 0:t.fallback))}}function Uie(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:Gie,defineMultiStyleConfig:qie}=hr(Vre.keys),Yie={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Kie={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Xie={pt:"2",px:"4",pb:"5"},Zie={fontSize:"1.25em"},Qie=Gie({container:Yie,button:Kie,panel:Xie,icon:Zie}),Jie=qie({baseStyle:Qie}),{definePartsStyle:my,defineMultiStyleConfig:eoe}=hr(Wre.keys),Ta=Vn("alert-fg"),Ju=Vn("alert-bg"),toe=my({container:{bg:Ju.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Ta.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Ta.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function N8(e){const{theme:t,colorScheme:n}=e,r=Wg(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var noe=my(e=>{const{colorScheme:t}=e,n=N8(e);return{container:{[Ta.variable]:`colors.${t}.500`,[Ju.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[Ju.variable]:n.dark}}}}),roe=my(e=>{const{colorScheme:t}=e,n=N8(e);return{container:{[Ta.variable]:`colors.${t}.500`,[Ju.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[Ju.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Ta.reference}}}),ioe=my(e=>{const{colorScheme:t}=e,n=N8(e);return{container:{[Ta.variable]:`colors.${t}.500`,[Ju.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[Ju.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Ta.reference}}}),ooe=my(e=>{const{colorScheme:t}=e;return{container:{[Ta.variable]:"colors.white",[Ju.variable]:`colors.${t}.500`,_dark:{[Ta.variable]:"colors.gray.900",[Ju.variable]:`colors.${t}.200`},color:Ta.reference}}}),aoe={subtle:noe,"left-accent":roe,"top-accent":ioe,solid:ooe},soe=eoe({baseStyle:toe,variants:aoe,defaultProps:{variant:"subtle",colorScheme:"blue"}}),mB={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"},loe={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"},uoe={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},coe={...mB,...loe,container:uoe},gB=coe,doe=e=>typeof e=="function";function Po(e,...t){return doe(e)?e(...t):e}var{definePartsStyle:vB,defineMultiStyleConfig:foe}=hr(Ure.keys),gg=Vn("avatar-border-color"),e6=Vn("avatar-bg"),hoe={borderRadius:"full",border:"0.2em solid",[gg.variable]:"white",_dark:{[gg.variable]:"colors.gray.800"},borderColor:gg.reference},poe={[e6.variable]:"colors.gray.200",_dark:{[e6.variable]:"colors.whiteAlpha.400"},bgColor:e6.reference},nA=Vn("avatar-background"),moe=e=>{const{name:t,theme:n}=e,r=t?Die({string:t}):"colors.gray.400",i=Rie(r)(n);let o="white";return i||(o="gray.800"),{bg:nA.reference,"&:not([data-loaded])":{[nA.variable]:r},color:o,[gg.variable]:"colors.white",_dark:{[gg.variable]:"colors.gray.800"},borderColor:gg.reference,verticalAlign:"top"}},goe=vB(e=>({badge:Po(hoe,e),excessLabel:Po(poe,e),container:Po(moe,e)}));function ad(e){const t=e!=="100%"?gB[e]:void 0;return vB({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 voe={"2xs":ad(4),xs:ad(6),sm:ad(8),md:ad(12),lg:ad(16),xl:ad(24),"2xl":ad(32),full:ad("100%")},yoe=foe({baseStyle:goe,sizes:voe,defaultProps:{size:"md"}}),boe={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},vg=Vn("badge-bg"),Gl=Vn("badge-color"),Soe=e=>{const{colorScheme:t,theme:n}=e,r=Wg(`${t}.500`,.6)(n);return{[vg.variable]:`colors.${t}.500`,[Gl.variable]:"colors.white",_dark:{[vg.variable]:r,[Gl.variable]:"colors.whiteAlpha.800"},bg:vg.reference,color:Gl.reference}},xoe=e=>{const{colorScheme:t,theme:n}=e,r=Wg(`${t}.200`,.16)(n);return{[vg.variable]:`colors.${t}.100`,[Gl.variable]:`colors.${t}.800`,_dark:{[vg.variable]:r,[Gl.variable]:`colors.${t}.200`},bg:vg.reference,color:Gl.reference}},woe=e=>{const{colorScheme:t,theme:n}=e,r=Wg(`${t}.200`,.8)(n);return{[Gl.variable]:`colors.${t}.500`,_dark:{[Gl.variable]:r},color:Gl.reference,boxShadow:`inset 0 0 0px 1px ${Gl.reference}`}},Coe={solid:Soe,subtle:xoe,outline:woe},jv={baseStyle:boe,variants:Coe,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:_oe,definePartsStyle:koe}=hr(Gre.keys),Eoe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Poe=koe({link:Eoe}),Toe=_oe({baseStyle:Poe}),Loe={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"}}},yB=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Et("inherit","whiteAlpha.900")(e),_hover:{bg:Et("gray.100","whiteAlpha.200")(e)},_active:{bg:Et("gray.200","whiteAlpha.300")(e)}};const r=Wg(`${t}.200`,.12)(n),i=Wg(`${t}.200`,.24)(n);return{color:Et(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Et(`${t}.50`,r)(e)},_active:{bg:Et(`${t}.100`,i)(e)}}},Aoe=e=>{const{colorScheme:t}=e,n=Et("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"},...Po(yB,e)}},Ooe={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Moe=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Et("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Et("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Et("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Ooe[t]??{},a=Et(n,`${t}.200`)(e);return{bg:a,color:Et(r,"gray.800")(e),_hover:{bg:Et(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Et(o,`${t}.400`)(e)}}},Ioe=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Et(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Et(`${t}.700`,`${t}.500`)(e)}}},Roe={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Doe={ghost:yB,outline:Aoe,solid:Moe,link:Ioe,unstyled:Roe},Noe={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"}},joe={baseStyle:Loe,variants:Doe,sizes:Noe,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Ah,defineMultiStyleConfig:Boe}=hr(hie.keys),Y4=Vn("card-bg"),yg=Vn("card-padding"),$oe=Ah({container:{[Y4.variable]:"chakra-body-bg",backgroundColor:Y4.reference,color:"chakra-body-text"},body:{padding:yg.reference,flex:"1 1 0%"},header:{padding:yg.reference},footer:{padding:yg.reference}}),Foe={sm:Ah({container:{borderRadius:"base",[yg.variable]:"space.3"}}),md:Ah({container:{borderRadius:"md",[yg.variable]:"space.5"}}),lg:Ah({container:{borderRadius:"xl",[yg.variable]:"space.7"}})},zoe={elevated:Ah({container:{boxShadow:"base",_dark:{[Y4.variable]:"colors.gray.700"}}}),outline:Ah({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Ah({container:{[Y4.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Hoe=Boe({baseStyle:$oe,variants:zoe,sizes:Foe,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:u4,defineMultiStyleConfig:Voe}=hr(qre.keys),Bv=Vn("checkbox-size"),Woe=e=>{const{colorScheme:t}=e;return{w:Bv.reference,h:Bv.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Et(`${t}.500`,`${t}.200`)(e),borderColor:Et(`${t}.500`,`${t}.200`)(e),color:Et("white","gray.900")(e),_hover:{bg:Et(`${t}.600`,`${t}.300`)(e),borderColor:Et(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Et("gray.200","transparent")(e),bg:Et("gray.200","whiteAlpha.300")(e),color:Et("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Et(`${t}.500`,`${t}.200`)(e),borderColor:Et(`${t}.500`,`${t}.200`)(e),color:Et("white","gray.900")(e)},_disabled:{bg:Et("gray.100","whiteAlpha.100")(e),borderColor:Et("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Et("red.500","red.300")(e)}}},Uoe={_disabled:{cursor:"not-allowed"}},Goe={userSelect:"none",_disabled:{opacity:.4}},qoe={transitionProperty:"transform",transitionDuration:"normal"},Yoe=u4(e=>({icon:qoe,container:Uoe,control:Po(Woe,e),label:Goe})),Koe={sm:u4({control:{[Bv.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:u4({control:{[Bv.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:u4({control:{[Bv.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},K4=Voe({baseStyle:Yoe,sizes:Koe,defaultProps:{size:"md",colorScheme:"blue"}}),$v=yi("close-button-size"),H1=yi("close-button-bg"),Xoe={w:[$v.reference],h:[$v.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[H1.variable]:"colors.blackAlpha.100",_dark:{[H1.variable]:"colors.whiteAlpha.100"}},_active:{[H1.variable]:"colors.blackAlpha.200",_dark:{[H1.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:H1.reference},Zoe={lg:{[$v.variable]:"sizes.10",fontSize:"md"},md:{[$v.variable]:"sizes.8",fontSize:"xs"},sm:{[$v.variable]:"sizes.6",fontSize:"2xs"}},Qoe={baseStyle:Xoe,sizes:Zoe,defaultProps:{size:"md"}},{variants:Joe,defaultProps:eae}=jv,tae={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},nae={baseStyle:tae,variants:Joe,defaultProps:eae},rae={w:"100%",mx:"auto",maxW:"prose",px:"4"},iae={baseStyle:rae},oae={opacity:.6,borderColor:"inherit"},aae={borderStyle:"solid"},sae={borderStyle:"dashed"},lae={solid:aae,dashed:sae},uae={baseStyle:oae,variants:lae,defaultProps:{variant:"solid"}},{definePartsStyle:v7,defineMultiStyleConfig:cae}=hr(Yre.keys),t6=Vn("drawer-bg"),n6=Vn("drawer-box-shadow");function Cm(e){return v7(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var dae={bg:"blackAlpha.600",zIndex:"overlay"},fae={display:"flex",zIndex:"modal",justifyContent:"center"},hae=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[t6.variable]:"colors.white",[n6.variable]:"shadows.lg",_dark:{[t6.variable]:"colors.gray.700",[n6.variable]:"shadows.dark-lg"},bg:t6.reference,boxShadow:n6.reference}},pae={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},mae={position:"absolute",top:"2",insetEnd:"3"},gae={px:"6",py:"2",flex:"1",overflow:"auto"},vae={px:"6",py:"4"},yae=v7(e=>({overlay:dae,dialogContainer:fae,dialog:Po(hae,e),header:pae,closeButton:mae,body:gae,footer:vae})),bae={xs:Cm("xs"),sm:Cm("md"),md:Cm("lg"),lg:Cm("2xl"),xl:Cm("4xl"),full:Cm("full")},Sae=cae({baseStyle:yae,sizes:bae,defaultProps:{size:"xs"}}),{definePartsStyle:xae,defineMultiStyleConfig:wae}=hr(Kre.keys),Cae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},_ae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},kae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Eae=xae({preview:Cae,input:_ae,textarea:kae}),Pae=wae({baseStyle:Eae}),{definePartsStyle:Tae,defineMultiStyleConfig:Lae}=hr(Xre.keys),bg=Vn("form-control-color"),Aae={marginStart:"1",[bg.variable]:"colors.red.500",_dark:{[bg.variable]:"colors.red.300"},color:bg.reference},Oae={mt:"2",[bg.variable]:"colors.gray.600",_dark:{[bg.variable]:"colors.whiteAlpha.600"},color:bg.reference,lineHeight:"normal",fontSize:"sm"},Mae=Tae({container:{width:"100%",position:"relative"},requiredIndicator:Aae,helperText:Oae}),Iae=Lae({baseStyle:Mae}),{definePartsStyle:Rae,defineMultiStyleConfig:Dae}=hr(Zre.keys),Sg=Vn("form-error-color"),Nae={[Sg.variable]:"colors.red.500",_dark:{[Sg.variable]:"colors.red.300"},color:Sg.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},jae={marginEnd:"0.5em",[Sg.variable]:"colors.red.500",_dark:{[Sg.variable]:"colors.red.300"},color:Sg.reference},Bae=Rae({text:Nae,icon:jae}),$ae=Dae({baseStyle:Bae}),Fae={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},zae={baseStyle:Fae},Hae={fontFamily:"heading",fontWeight:"bold"},Vae={"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}},Wae={baseStyle:Hae,sizes:Vae,defaultProps:{size:"xl"}},{definePartsStyle:Uu,defineMultiStyleConfig:Uae}=hr(Qre.keys),Gae=Uu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),sd={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"}},qae={lg:Uu({field:sd.lg,addon:sd.lg}),md:Uu({field:sd.md,addon:sd.md}),sm:Uu({field:sd.sm,addon:sd.sm}),xs:Uu({field:sd.xs,addon:sd.xs})};function j8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Et("blue.500","blue.300")(e),errorBorderColor:n||Et("red.500","red.300")(e)}}var Yae=Uu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=j8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Et("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:_o(t,r),boxShadow:`0 0 0 1px ${_o(t,r)}`},_focusVisible:{zIndex:1,borderColor:_o(t,n),boxShadow:`0 0 0 1px ${_o(t,n)}`}},addon:{border:"1px solid",borderColor:Et("inherit","whiteAlpha.50")(e),bg:Et("gray.100","whiteAlpha.300")(e)}}}),Kae=Uu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=j8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Et("gray.100","whiteAlpha.50")(e),_hover:{bg:Et("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:_o(t,r)},_focusVisible:{bg:"transparent",borderColor:_o(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Et("gray.100","whiteAlpha.50")(e)}}}),Xae=Uu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=j8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:_o(t,r),boxShadow:`0px 1px 0px 0px ${_o(t,r)}`},_focusVisible:{borderColor:_o(t,n),boxShadow:`0px 1px 0px 0px ${_o(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Zae=Uu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Qae={outline:Yae,filled:Kae,flushed:Xae,unstyled:Zae},En=Uae({baseStyle:Gae,sizes:qae,variants:Qae,defaultProps:{size:"md",variant:"outline"}}),r6=Vn("kbd-bg"),Jae={[r6.variable]:"colors.gray.100",_dark:{[r6.variable]:"colors.whiteAlpha.100"},bg:r6.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},ese={baseStyle:Jae},tse={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},nse={baseStyle:tse},{defineMultiStyleConfig:rse,definePartsStyle:ise}=hr(Jre.keys),ose={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},ase=ise({icon:ose}),sse=rse({baseStyle:ase}),{defineMultiStyleConfig:lse,definePartsStyle:use}=hr(eie.keys),Bl=Vn("menu-bg"),i6=Vn("menu-shadow"),cse={[Bl.variable]:"#fff",[i6.variable]:"shadows.sm",_dark:{[Bl.variable]:"colors.gray.700",[i6.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Bl.reference,boxShadow:i6.reference},dse={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Bl.variable]:"colors.gray.100",_dark:{[Bl.variable]:"colors.whiteAlpha.100"}},_active:{[Bl.variable]:"colors.gray.200",_dark:{[Bl.variable]:"colors.whiteAlpha.200"}},_expanded:{[Bl.variable]:"colors.gray.100",_dark:{[Bl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Bl.reference},fse={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},hse={opacity:.6},pse={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},mse={transitionProperty:"common",transitionDuration:"normal"},gse=use({button:mse,list:cse,item:dse,groupTitle:fse,command:hse,divider:pse}),vse=lse({baseStyle:gse}),{defineMultiStyleConfig:yse,definePartsStyle:y7}=hr(tie.keys),bse={bg:"blackAlpha.600",zIndex:"modal"},Sse=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},xse=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Et("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Et("lg","dark-lg")(e)}},wse={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Cse={position:"absolute",top:"2",insetEnd:"3"},_se=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},kse={px:"6",py:"4"},Ese=y7(e=>({overlay:bse,dialogContainer:Po(Sse,e),dialog:Po(xse,e),header:wse,closeButton:Cse,body:Po(_se,e),footer:kse}));function Os(e){return y7(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Pse={xs:Os("xs"),sm:Os("sm"),md:Os("md"),lg:Os("lg"),xl:Os("xl"),"2xl":Os("2xl"),"3xl":Os("3xl"),"4xl":Os("4xl"),"5xl":Os("5xl"),"6xl":Os("6xl"),full:Os("full")},Tse=yse({baseStyle:Ese,sizes:Pse,defaultProps:{size:"md"}}),Lse={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"}},bB=Lse,{defineMultiStyleConfig:Ase,definePartsStyle:SB}=hr(nie.keys),B8=yi("number-input-stepper-width"),xB=yi("number-input-input-padding"),Ose=Wu(B8).add("0.5rem").toString(),o6=yi("number-input-bg"),a6=yi("number-input-color"),s6=yi("number-input-border-color"),Mse={[B8.variable]:"sizes.6",[xB.variable]:Ose},Ise=e=>{var t;return((t=Po(En.baseStyle,e))==null?void 0:t.field)??{}},Rse={width:B8.reference},Dse={borderStart:"1px solid",borderStartColor:s6.reference,color:a6.reference,bg:o6.reference,[a6.variable]:"colors.chakra-body-text",[s6.variable]:"colors.chakra-border-color",_dark:{[a6.variable]:"colors.whiteAlpha.800",[s6.variable]:"colors.whiteAlpha.300"},_active:{[o6.variable]:"colors.gray.200",_dark:{[o6.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Nse=SB(e=>({root:Mse,field:Po(Ise,e)??{},stepperGroup:Rse,stepper:Dse}));function U3(e){var t,n;const r=(t=En.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=bB.fontSizes[o];return SB({field:{...r.field,paddingInlineEnd:xB.reference,verticalAlign:"top"},stepper:{fontSize:Wu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var jse={xs:U3("xs"),sm:U3("sm"),md:U3("md"),lg:U3("lg")},Bse=Ase({baseStyle:Nse,sizes:jse,variants:En.variants,defaultProps:En.defaultProps}),rA,$se={...(rA=En.baseStyle)==null?void 0:rA.field,textAlign:"center"},Fse={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"}},iA,zse={outline:e=>{var t,n;return((n=Po((t=En.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=Po((t=En.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=Po((t=En.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((iA=En.variants)==null?void 0:iA.unstyled.field)??{}},Hse={baseStyle:$se,sizes:Fse,variants:zse,defaultProps:En.defaultProps},{defineMultiStyleConfig:Vse,definePartsStyle:Wse}=hr(rie.keys),G3=yi("popper-bg"),Use=yi("popper-arrow-bg"),oA=yi("popper-arrow-shadow-color"),Gse={zIndex:10},qse={[G3.variable]:"colors.white",bg:G3.reference,[Use.variable]:G3.reference,[oA.variable]:"colors.gray.200",_dark:{[G3.variable]:"colors.gray.700",[oA.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Yse={px:3,py:2,borderBottomWidth:"1px"},Kse={px:3,py:2},Xse={px:3,py:2,borderTopWidth:"1px"},Zse={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Qse=Wse({popper:Gse,content:qse,header:Yse,body:Kse,footer:Xse,closeButton:Zse}),Jse=Vse({baseStyle:Qse}),{defineMultiStyleConfig:ele,definePartsStyle:yv}=hr(iie.keys),tle=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Et(ZL(),ZL("1rem","rgba(0,0,0,0.1)"))(e),a=Et(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
|
||
to right,
|
||
transparent 0%,
|
||
${_o(n,a)} 50%,
|
||
transparent 100%
|
||
)`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},nle={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},rle=e=>({bg:Et("gray.100","whiteAlpha.300")(e)}),ile=e=>({transitionProperty:"common",transitionDuration:"slow",...tle(e)}),ole=yv(e=>({label:nle,filledTrack:ile(e),track:rle(e)})),ale={xs:yv({track:{h:"1"}}),sm:yv({track:{h:"2"}}),md:yv({track:{h:"3"}}),lg:yv({track:{h:"4"}})},sle=ele({sizes:ale,baseStyle:ole,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:lle,definePartsStyle:c4}=hr(oie.keys),ule=e=>{var t;const n=(t=Po(K4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},cle=c4(e=>{var t,n,r,i;return{label:(n=(t=K4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=K4).baseStyle)==null?void 0:i.call(r,e).container,control:ule(e)}}),dle={md:c4({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:c4({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:c4({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},fle=lle({baseStyle:cle,sizes:dle,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:hle,definePartsStyle:ple}=hr(aie.keys),q3=Vn("select-bg"),aA,mle={...(aA=En.baseStyle)==null?void 0:aA.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:q3.reference,[q3.variable]:"colors.white",_dark:{[q3.variable]:"colors.gray.700"},"> option, > optgroup":{bg:q3.reference}},gle={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},vle=ple({field:mle,icon:gle}),Y3={paddingInlineEnd:"8"},sA,lA,uA,cA,dA,fA,hA,pA,yle={lg:{...(sA=En.sizes)==null?void 0:sA.lg,field:{...(lA=En.sizes)==null?void 0:lA.lg.field,...Y3}},md:{...(uA=En.sizes)==null?void 0:uA.md,field:{...(cA=En.sizes)==null?void 0:cA.md.field,...Y3}},sm:{...(dA=En.sizes)==null?void 0:dA.sm,field:{...(fA=En.sizes)==null?void 0:fA.sm.field,...Y3}},xs:{...(hA=En.sizes)==null?void 0:hA.xs,field:{...(pA=En.sizes)==null?void 0:pA.xs.field,...Y3},icon:{insetEnd:"1"}}},ble=hle({baseStyle:vle,sizes:yle,variants:En.variants,defaultProps:En.defaultProps}),l6=Vn("skeleton-start-color"),u6=Vn("skeleton-end-color"),Sle={[l6.variable]:"colors.gray.100",[u6.variable]:"colors.gray.400",_dark:{[l6.variable]:"colors.gray.800",[u6.variable]:"colors.gray.600"},background:l6.reference,borderColor:u6.reference,opacity:.7,borderRadius:"sm"},xle={baseStyle:Sle},c6=Vn("skip-link-bg"),wle={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[c6.variable]:"colors.white",_dark:{[c6.variable]:"colors.gray.700"},bg:c6.reference}},Cle={baseStyle:wle},{defineMultiStyleConfig:_le,definePartsStyle:BS}=hr(sie.keys),x2=Vn("slider-thumb-size"),w2=Vn("slider-track-size"),yd=Vn("slider-bg"),kle=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%"}})}},Ele=e=>({...D8({orientation:e.orientation,horizontal:{h:w2.reference},vertical:{w:w2.reference}}),overflow:"hidden",borderRadius:"sm",[yd.variable]:"colors.gray.200",_dark:{[yd.variable]:"colors.whiteAlpha.200"},_disabled:{[yd.variable]:"colors.gray.300",_dark:{[yd.variable]:"colors.whiteAlpha.300"}},bg:yd.reference}),Ple=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:x2.reference,h:x2.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"}}},Tle=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[yd.variable]:`colors.${t}.500`,_dark:{[yd.variable]:`colors.${t}.200`},bg:yd.reference}},Lle=BS(e=>({container:kle(e),track:Ele(e),thumb:Ple(e),filledTrack:Tle(e)})),Ale=BS({container:{[x2.variable]:"sizes.4",[w2.variable]:"sizes.1"}}),Ole=BS({container:{[x2.variable]:"sizes.3.5",[w2.variable]:"sizes.1"}}),Mle=BS({container:{[x2.variable]:"sizes.2.5",[w2.variable]:"sizes.0.5"}}),Ile={lg:Ale,md:Ole,sm:Mle},Rle=_le({baseStyle:Lle,sizes:Ile,defaultProps:{size:"md",colorScheme:"blue"}}),bh=yi("spinner-size"),Dle={width:[bh.reference],height:[bh.reference]},Nle={xs:{[bh.variable]:"sizes.3"},sm:{[bh.variable]:"sizes.4"},md:{[bh.variable]:"sizes.6"},lg:{[bh.variable]:"sizes.8"},xl:{[bh.variable]:"sizes.12"}},jle={baseStyle:Dle,sizes:Nle,defaultProps:{size:"md"}},{defineMultiStyleConfig:Ble,definePartsStyle:wB}=hr(lie.keys),$le={fontWeight:"medium"},Fle={opacity:.8,marginBottom:"2"},zle={verticalAlign:"baseline",fontWeight:"semibold"},Hle={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Vle=wB({container:{},label:$le,helpText:Fle,number:zle,icon:Hle}),Wle={md:wB({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Ule=Ble({baseStyle:Vle,sizes:Wle,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Gle,definePartsStyle:d4}=hr(uie.keys),Fv=yi("switch-track-width"),Oh=yi("switch-track-height"),d6=yi("switch-track-diff"),qle=Wu.subtract(Fv,Oh),b7=yi("switch-thumb-x"),V1=yi("switch-bg"),Yle=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Fv.reference],height:[Oh.reference],transitionProperty:"common",transitionDuration:"fast",[V1.variable]:"colors.gray.300",_dark:{[V1.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[V1.variable]:`colors.${t}.500`,_dark:{[V1.variable]:`colors.${t}.200`}},bg:V1.reference}},Kle={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Oh.reference],height:[Oh.reference],_checked:{transform:`translateX(${b7.reference})`}},Xle=d4(e=>({container:{[d6.variable]:qle,[b7.variable]:d6.reference,_rtl:{[b7.variable]:Wu(d6).negate().toString()}},track:Yle(e),thumb:Kle})),Zle={sm:d4({container:{[Fv.variable]:"1.375rem",[Oh.variable]:"sizes.3"}}),md:d4({container:{[Fv.variable]:"1.875rem",[Oh.variable]:"sizes.4"}}),lg:d4({container:{[Fv.variable]:"2.875rem",[Oh.variable]:"sizes.6"}})},Qle=Gle({baseStyle:Xle,sizes:Zle,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Jle,definePartsStyle:xg}=hr(cie.keys),eue=xg({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"}}),X4={"&[data-is-numeric=true]":{textAlign:"end"}},tue=xg(e=>{const{colorScheme:t}=e;return{th:{color:Et("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...X4},td:{borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...X4},caption:{color:Et("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),nue=xg(e=>{const{colorScheme:t}=e;return{th:{color:Et("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...X4},td:{borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...X4},caption:{color:Et("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e)},td:{background:Et(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),rue={simple:tue,striped:nue,unstyled:{}},iue={sm:xg({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:xg({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:xg({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},oue=Jle({baseStyle:eue,variants:rue,sizes:iue,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Ko=Vn("tabs-color"),Fs=Vn("tabs-bg"),K3=Vn("tabs-border-color"),{defineMultiStyleConfig:aue,definePartsStyle:Xl}=hr(die.keys),sue=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},lue=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}}},uue=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},cue={p:4},due=Xl(e=>({root:sue(e),tab:lue(e),tablist:uue(e),tabpanel:cue})),fue={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}})},hue=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:{[Ko.variable]:`colors.${t}.600`,_dark:{[Ko.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Fs.variable]:"colors.gray.200",_dark:{[Fs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Ko.reference,bg:Fs.reference}}}),pue=Xl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[K3.reference]:"transparent",_selected:{[Ko.variable]:`colors.${t}.600`,[K3.variable]:"colors.white",_dark:{[Ko.variable]:`colors.${t}.300`,[K3.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:K3.reference},color:Ko.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),mue=Xl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Fs.variable]:"colors.gray.50",_dark:{[Fs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Fs.variable]:"colors.white",[Ko.variable]:`colors.${t}.600`,_dark:{[Fs.variable]:"colors.gray.800",[Ko.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Ko.reference,bg:Fs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),gue=Xl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:_o(n,`${t}.700`),bg:_o(n,`${t}.100`)}}}}),vue=Xl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Ko.variable]:"colors.gray.600",_dark:{[Ko.variable]:"inherit"},_selected:{[Ko.variable]:"colors.white",[Fs.variable]:`colors.${t}.600`,_dark:{[Ko.variable]:"colors.gray.800",[Fs.variable]:`colors.${t}.300`}},color:Ko.reference,bg:Fs.reference}}}),yue=Xl({}),bue={line:hue,enclosed:pue,"enclosed-colored":mue,"soft-rounded":gue,"solid-rounded":vue,unstyled:yue},Sue=aue({baseStyle:due,sizes:fue,variants:bue,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:xue,definePartsStyle:Mh}=hr(fie.keys),wue={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Cue={lineHeight:1.2,overflow:"visible"},_ue={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}},kue=Mh({container:wue,label:Cue,closeButton:_ue}),Eue={sm:Mh({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Mh({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Mh({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Pue={subtle:Mh(e=>{var t;return{container:(t=jv.variants)==null?void 0:t.subtle(e)}}),solid:Mh(e=>{var t;return{container:(t=jv.variants)==null?void 0:t.solid(e)}}),outline:Mh(e=>{var t;return{container:(t=jv.variants)==null?void 0:t.outline(e)}})},Tue=xue({variants:Pue,baseStyle:kue,sizes:Eue,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),mA,Lue={...(mA=En.baseStyle)==null?void 0:mA.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},gA,Aue={outline:e=>{var t;return((t=En.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=En.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=En.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((gA=En.variants)==null?void 0:gA.unstyled.field)??{}},vA,yA,bA,SA,Oue={xs:((vA=En.sizes)==null?void 0:vA.xs.field)??{},sm:((yA=En.sizes)==null?void 0:yA.sm.field)??{},md:((bA=En.sizes)==null?void 0:bA.md.field)??{},lg:((SA=En.sizes)==null?void 0:SA.lg.field)??{}},Mue={baseStyle:Lue,sizes:Oue,variants:Aue,defaultProps:{size:"md",variant:"outline"}},X3=yi("tooltip-bg"),f6=yi("tooltip-fg"),Iue=yi("popper-arrow-bg"),Rue={bg:X3.reference,color:f6.reference,[X3.variable]:"colors.gray.700",[f6.variable]:"colors.whiteAlpha.900",_dark:{[X3.variable]:"colors.gray.300",[f6.variable]:"colors.gray.900"},[Iue.variable]:X3.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Due={baseStyle:Rue},Nue={Accordion:Jie,Alert:soe,Avatar:yoe,Badge:jv,Breadcrumb:Toe,Button:joe,Checkbox:K4,CloseButton:Qoe,Code:nae,Container:iae,Divider:uae,Drawer:Sae,Editable:Pae,Form:Iae,FormError:$ae,FormLabel:zae,Heading:Wae,Input:En,Kbd:ese,Link:nse,List:sse,Menu:vse,Modal:Tse,NumberInput:Bse,PinInput:Hse,Popover:Jse,Progress:sle,Radio:fle,Select:ble,Skeleton:xle,SkipLink:Cle,Slider:Rle,Spinner:jle,Stat:Ule,Switch:Qle,Table:oue,Tabs:Sue,Tag:Tue,Textarea:Mue,Tooltip:Due,Card:Hoe},jue={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Bue=jue,$ue={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Fue=$ue,zue={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"}},Hue=zue,Vue={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Wue=Vue,Uue={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"},Gue=Uue,que={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"},Yue={"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)"},Kue={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Xue={property:que,easing:Yue,duration:Kue},Zue=Xue,Que={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},Jue=Que,ece={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},tce=ece,nce={breakpoints:Fue,zIndices:Jue,radii:Wue,blur:tce,colors:Hue,...bB,sizes:gB,shadows:Gue,space:mB,borders:Bue,transition:Zue},rce={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},ice={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"}}},oce="ltr",ace={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},sce={semanticTokens:rce,direction:oce,...nce,components:Nue,styles:ice,config:ace},lce=typeof Element<"u",uce=typeof Map=="function",cce=typeof Set=="function",dce=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function f4(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(!f4(e[r],t[r]))return!1;return!0}var o;if(uce&&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(!f4(r.value[1],t.get(r.value[0])))return!1;return!0}if(cce&&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(dce&&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(lce&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!f4(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var fce=function(t,n){try{return f4(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 rp(){const e=w.useContext(b2);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function CB(){const e=fy(),t=rp();return{...e,theme:t}}function hce(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 pce(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 mce(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 hce(o,l,a[u]??l);const d=`${e}.${l}`;return pce(o,d,a[u]??l)});return Array.isArray(t)?s:s[0]}}function gce(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=w.useMemo(()=>une(n),[n]);return N.createElement(bre,{theme:i},N.createElement(vce,{root:t}),r)}function vce({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return N.createElement(DS,{styles:n=>({[t]:n.__cssVars})})}Dre({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function yce(){const{colorMode:e}=fy();return N.createElement(DS,{styles:t=>{const n=iB(t,"styles.global"),r=sB(n,{theme:t,colorMode:e});return r?Nj(r)(t):void 0}})}var bce=new Set([...fne,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Sce=new Set(["htmlWidth","htmlHeight","htmlSize"]);function xce(e){return Sce.has(e)||!bce.has(e)}var wce=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=oB(a,(h,g)=>pne(g)),l=sB(e,t),u=Object.assign({},i,l,aB(s),o),d=Nj(u)(t.theme);return r?[d,r]:d};function h6(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=xce);const i=wce({baseStyle:n}),o=p7(e,r)(i);return N.forwardRef(function(l,u){const{colorMode:d,forced:h}=fy();return N.createElement(o,{ref:u,"data-theme":h?d:void 0,...l})})}function Ee(e){return w.forwardRef(e)}function _B(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=CB(),a=e?iB(i,`components.${e}`):void 0,s=n||a,l=Ul({theme:i,colorMode:o},(s==null?void 0:s.defaultProps)??{},aB(Lre(r,["children"]))),u=w.useRef({});if(s){const h=_ne(s)(l);fce(u.current,h)||(u.current=h)}return u.current}function Ao(e,t={}){return _B(e,t)}function Oi(e,t={}){return _B(e,t)}function Cce(){const e=new Map;return new Proxy(h6,{apply(t,n,r){return h6(...r)},get(t,n){return e.has(n)||e.set(n,h6(n)),e.get(n)}})}var Ce=Cce();function _ce(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=w.createContext(void 0);a.displayName=t;function s(){var l;const u=w.useContext(a);if(!u&&n){const d=new Error(o??_ce(r,i));throw d.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,d,s),d}return u}return[a.Provider,s,a]}function kce(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 Mn(...e){return t=>{e.forEach(n=>{kce(n,t)})}}function Ece(...e){return w.useMemo(()=>Mn(...e),e)}function xA(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 Pce=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function wA(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function CA(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var S7=typeof window<"u"?w.useLayoutEffect:w.useEffect,Z4=e=>e,Tce=class{constructor(){an(this,"descendants",new Map);an(this,"register",e=>{if(e!=null)return Pce(e)?this.registerNode(e):t=>{this.registerNode(t,e)}});an(this,"unregister",e=>{this.descendants.delete(e);const t=xA(Array.from(this.descendants.keys()));this.assignIndex(t)});an(this,"destroy",()=>{this.descendants.clear()});an(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})});an(this,"count",()=>this.descendants.size);an(this,"enabledCount",()=>this.enabledValues().length);an(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index));an(this,"enabledValues",()=>this.values().filter(e=>!e.disabled));an(this,"item",e=>{if(this.count()!==0)return this.values()[e]});an(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]});an(this,"first",()=>this.item(0));an(this,"firstEnabled",()=>this.enabledItem(0));an(this,"last",()=>this.item(this.descendants.size-1));an(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)});an(this,"indexOf",e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1});an(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e)));an(this,"next",(e,t=!0)=>{const n=wA(e,this.count(),t);return this.item(n)});an(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=wA(r,this.enabledCount(),t);return this.enabledItem(i)});an(this,"prev",(e,t=!0)=>{const n=CA(e,this.count()-1,t);return this.item(n)});an(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=CA(r,this.enabledCount()-1,t);return this.enabledItem(i)});an(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=xA(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function Lce(){const e=w.useRef(new Tce);return S7(()=>()=>e.current.destroy()),e.current}var[Ace,kB]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Oce(e){const t=kB(),[n,r]=w.useState(-1),i=w.useRef(null);S7(()=>()=>{i.current&&t.unregister(i.current)},[]),S7(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=Z4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Mn(o,i)}}function $8(){return[Z4(Ace),()=>Z4(kB()),()=>Lce(),i=>Oce(i)]}var Qr=(...e)=>e.filter(Boolean).join(" "),_A={path:N.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},N.createElement("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"}),N.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),N.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},Da=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,d=Qr("chakra-icon",s),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},g={ref:t,focusable:o,className:d,__css:h},v=r??_A.viewBox;if(n&&typeof n!="string")return N.createElement(Ce.svg,{as:n,...g,...u});const b=a??_A.path;return N.createElement(Ce.svg,{verticalAlign:"middle",viewBox:v,...g,...u},b)});Da.displayName="Icon";function yt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=w.Children.toArray(e.path),a=Ee((s,l)=>N.createElement(Da,{ref:l,viewBox:t,...i,...s},o.length?o:N.createElement("path",{fill:"currentColor",d:n})));return a.displayName=r,a}function br(e,t=[]){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function $S(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(g,v)=>g!==v}=e,o=br(r),a=br(i),[s,l]=w.useState(n),u=t!==void 0,d=u?t:s,h=br(g=>{const b=typeof g=="function"?g(d):g;a(d,b)&&(u||l(b),o(b))},[u,o,d,a]);return[d,h]}const F8=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),FS=w.createContext({});function Mce(){return w.useContext(FS).visualElement}const m0=w.createContext(null),ip=typeof document<"u",Q4=ip?w.useLayoutEffect:w.useEffect,EB=w.createContext({strict:!1});function Ice(e,t,n,r){const i=Mce(),o=w.useContext(EB),a=w.useContext(m0),s=w.useContext(F8).reducedMotion,l=w.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return Q4(()=>{u&&u.render()}),w.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),Q4(()=>()=>u&&u.notify("Unmount"),[]),u}function Wm(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Rce(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wm(n)&&(n.current=r))},[t])}function C2(e){return typeof e=="string"||Array.isArray(e)}function zS(e){return typeof e=="object"&&typeof e.start=="function"}const Dce=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function HS(e){return zS(e.animate)||Dce.some(t=>C2(e[t]))}function PB(e){return Boolean(HS(e)||e.variants)}function Nce(e,t){if(HS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||C2(n)?n:void 0,animate:C2(r)?r:void 0}}return e.inherit!==!1?t:{}}function jce(e){const{initial:t,animate:n}=Nce(e,w.useContext(FS));return w.useMemo(()=>({initial:t,animate:n}),[kA(t),kA(n)])}function kA(e){return Array.isArray(e)?e.join(" "):e}const $u=e=>({isEnabled:t=>e.some(n=>!!t[n])}),_2={measureLayout:$u(["layout","layoutId","drag"]),animation:$u(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:$u(["exit"]),drag:$u(["drag","dragControls"]),focus:$u(["whileFocus"]),hover:$u(["whileHover","onHoverStart","onHoverEnd"]),tap:$u(["whileTap","onTap","onTapStart","onTapCancel"]),pan:$u(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:$u(["whileInView","onViewportEnter","onViewportLeave"])};function Bce(e){for(const t in e)t==="projectionNodeConstructor"?_2.projectionNodeConstructor=e[t]:_2[t].Component=e[t]}function VS(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const zv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let $ce=1;function Fce(){return VS(()=>{if(zv.hasEverUpdated)return $ce++})}const z8=w.createContext({});class zce extends N.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const TB=w.createContext({}),Hce=Symbol.for("motionComponentSymbol");function Vce({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Bce(e);function a(l,u){const d={...w.useContext(F8),...l,layoutId:Wce(l)},{isStatic:h}=d;let g=null;const v=jce(l),b=h?void 0:Fce(),S=i(l,h);if(!h&&ip){v.visualElement=Ice(o,S,d,t);const E=w.useContext(EB).strict,_=w.useContext(TB);v.visualElement&&(g=v.visualElement.loadFeatures(d,E,e,b,n||_2.projectionNodeConstructor,_))}return w.createElement(zce,{visualElement:v.visualElement,props:d},g,w.createElement(FS.Provider,{value:v},r(o,l,b,Rce(S,v.visualElement,u),S,h,v.visualElement)))}const s=w.forwardRef(a);return s[Hce]=o,s}function Wce({layoutId:e}){const t=w.useContext(z8).id;return t&&e!==void 0?t+"-"+e:e}function Uce(e){function t(r,i={}){return Vce(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 Gce=["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 H8(e){return typeof e!="string"||e.includes("-")?!1:!!(Gce.indexOf(e)>-1||/[A-Z]/.test(e))}const J4={};function qce(e){Object.assign(J4,e)}const e5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],g0=new Set(e5);function LB(e,{layout:t,layoutId:n}){return g0.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!J4[e]||e==="opacity")}const au=e=>!!(e!=null&&e.getVelocity),Yce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kce=(e,t)=>e5.indexOf(e)-e5.indexOf(t);function Xce({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Kce);for(const s of t)a+=`${Yce[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 AB(e){return e.startsWith("--")}const Zce=(e,t)=>t&&typeof e=="number"?t.transform(e):e,OB=(e,t)=>n=>Math.max(Math.min(n,t),e),Hv=e=>e%1?Number(e.toFixed(5)):e,k2=/(-)?([\d]*\.?[\d])+/g,x7=/(#[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,Qce=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function gy(e){return typeof e=="string"}const op={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Vv=Object.assign(Object.assign({},op),{transform:OB(0,1)}),Z3=Object.assign(Object.assign({},op),{default:1}),vy=e=>({test:t=>gy(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),dd=vy("deg"),Zl=vy("%"),Lt=vy("px"),Jce=vy("vh"),ede=vy("vw"),EA=Object.assign(Object.assign({},Zl),{parse:e=>Zl.parse(e)/100,transform:e=>Zl.transform(e*100)}),V8=(e,t)=>n=>Boolean(gy(n)&&Qce.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),MB=(e,t,n)=>r=>{if(!gy(r))return r;const[i,o,a,s]=r.match(k2);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ch={test:V8("hsl","hue"),parse:MB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zl.transform(Hv(t))+", "+Zl.transform(Hv(n))+", "+Hv(Vv.transform(r))+")"},tde=OB(0,255),p6=Object.assign(Object.assign({},op),{transform:e=>Math.round(tde(e))}),Cd={test:V8("rgb","red"),parse:MB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+p6.transform(e)+", "+p6.transform(t)+", "+p6.transform(n)+", "+Hv(Vv.transform(r))+")"};function nde(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 w7={test:V8("#"),parse:nde,transform:Cd.transform},xo={test:e=>Cd.test(e)||w7.test(e)||Ch.test(e),parse:e=>Cd.test(e)?Cd.parse(e):Ch.test(e)?Ch.parse(e):w7.parse(e),transform:e=>gy(e)?e:e.hasOwnProperty("red")?Cd.transform(e):Ch.transform(e)},IB="${c}",RB="${n}";function rde(e){var t,n,r,i;return isNaN(e)&&gy(e)&&((n=(t=e.match(k2))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(x7))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function DB(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(x7);r&&(n=r.length,e=e.replace(x7,IB),t.push(...r.map(xo.parse)));const i=e.match(k2);return i&&(e=e.replace(k2,RB),t.push(...i.map(op.parse))),{values:t,numColors:n,tokenised:e}}function NB(e){return DB(e).values}function jB(e){const{values:t,numColors:n,tokenised:r}=DB(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?IB:RB,s<n?xo.transform(o[s]):Hv(o[s]));return a}}const ide=e=>typeof e=="number"?0:e;function ode(e){const t=NB(e);return jB(e)(t.map(ide))}const ec={test:rde,parse:NB,createTransformer:jB,getAnimatableNone:ode},ade=new Set(["brightness","contrast","saturate","opacity"]);function sde(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(k2)||[];if(!r)return e;const i=n.replace(r,"");let o=ade.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const lde=/([a-z-]*)\(.*?\)/g,C7=Object.assign(Object.assign({},ec),{getAnimatableNone:e=>{const t=e.match(lde);return t?t.map(sde).join(" "):e}}),PA={...op,transform:Math.round},BB={borderWidth:Lt,borderTopWidth:Lt,borderRightWidth:Lt,borderBottomWidth:Lt,borderLeftWidth:Lt,borderRadius:Lt,radius:Lt,borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomRightRadius:Lt,borderBottomLeftRadius:Lt,width:Lt,maxWidth:Lt,height:Lt,maxHeight:Lt,size:Lt,top:Lt,right:Lt,bottom:Lt,left:Lt,padding:Lt,paddingTop:Lt,paddingRight:Lt,paddingBottom:Lt,paddingLeft:Lt,margin:Lt,marginTop:Lt,marginRight:Lt,marginBottom:Lt,marginLeft:Lt,rotate:dd,rotateX:dd,rotateY:dd,rotateZ:dd,scale:Z3,scaleX:Z3,scaleY:Z3,scaleZ:Z3,skew:dd,skewX:dd,skewY:dd,distance:Lt,translateX:Lt,translateY:Lt,translateZ:Lt,x:Lt,y:Lt,z:Lt,perspective:Lt,transformPerspective:Lt,opacity:Vv,originX:EA,originY:EA,originZ:Lt,zIndex:PA,fillOpacity:Vv,strokeOpacity:Vv,numOctaves:PA};function W8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,d=!1,h=!0;for(const g in t){const v=t[g];if(AB(g)){o[g]=v;continue}const b=BB[g],S=Zce(v,b);if(g0.has(g)){if(u=!0,a[g]=S,s.push(g),!h)continue;v!==(b.default||0)&&(h=!1)}else g.startsWith("origin")?(d=!0,l[g]=S):i[g]=S}if(t.transform||(u||r?i.transform=Xce(e,n,h,r):i.transform&&(i.transform="none")),d){const{originX:g="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${g} ${v} ${b}`}}const U8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function $B(e,t,n){for(const r in t)!au(t[r])&&!LB(r,n)&&(e[r]=t[r])}function ude({transformTemplate:e},t,n){return w.useMemo(()=>{const r=U8();return W8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function cde(e,t,n){const r=e.style||{},i={};return $B(i,r,e),Object.assign(i,ude(e,t,n)),e.transformValues?e.transformValues(i):i}function dde(e,t,n){const r={},i=cde(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 fde=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],hde=["whileTap","onTap","onTapStart","onTapCancel"],pde=["onPan","onPanStart","onPanSessionStart","onPanEnd"],mde=["whileInView","onViewportEnter","onViewportLeave","viewport"],gde=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",...mde,...hde,...fde,...pde]);function t5(e){return gde.has(e)}let FB=e=>!t5(e);function vde(e){e&&(FB=t=>t.startsWith("on")?!t5(t):e(t))}try{vde(require("@emotion/is-prop-valid").default)}catch{}function yde(e,t,n){const r={};for(const i in e)(FB(i)||n===!0&&t5(i)||!t&&!t5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function TA(e,t,n){return typeof e=="string"?e:Lt.transform(t+n*e)}function bde(e,t,n){const r=TA(t,e.x,e.width),i=TA(n,e.y,e.height);return`${r} ${i}`}const Sde={offset:"stroke-dashoffset",array:"stroke-dasharray"},xde={offset:"strokeDashoffset",array:"strokeDasharray"};function wde(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Sde:xde;e[o.offset]=Lt.transform(-r);const a=Lt.transform(t),s=Lt.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,d){W8(e,l,u,d),e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:v}=e;h.transform&&(v&&(g.transform=h.transform),delete h.transform),v&&(r!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=bde(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&wde(h,o,a,s,!1)}const zB=()=>({...U8(),attrs:{}});function Cde(e,t){const n=w.useMemo(()=>{const r=zB();return G8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};$B(r,e.style,e),n.style={...r,...n.style}}return n}function _de(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(H8(n)?Cde:dde)(r,a,s),h={...yde(r,typeof n=="string",e),...u,ref:o};return i&&(h["data-projection-id"]=i),w.createElement(n,h)}}const HB=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function VB(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 WB=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function UB(e,t,n,r){VB(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(WB.has(i)?i:HB(i),t.attrs[i])}function q8(e){const{style:t}=e,n={};for(const r in t)(au(t[r])||LB(r,e))&&(n[r]=t[r]);return n}function GB(e){const t=q8(e);for(const n in e)if(au(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Y8(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 E2=e=>Array.isArray(e),kde=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),qB=e=>E2(e)?e[e.length-1]||0:e;function h4(e){const t=au(e)?e.get():e;return kde(t)?t.toValue():t}function Ede({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Pde(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const YB=e=>(t,n)=>{const r=w.useContext(FS),i=w.useContext(m0),o=()=>Ede(e,t,r,i);return n?o():VS(o)};function Pde(e,t,n,r){const i={},o=r(e);for(const g in o)i[g]=h4(o[g]);let{initial:a,animate:s}=e;const l=HS(e),u=PB(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?s:a;return h&&typeof h!="boolean"&&!zS(h)&&(Array.isArray(h)?h:[h]).forEach(v=>{const b=Y8(e,v);if(!b)return;const{transitionEnd:S,transition:E,..._}=b;for(const k in _){let T=_[k];if(Array.isArray(T)){const A=d?T.length-1:0;T=T[A]}T!==null&&(i[k]=T)}for(const k in S)i[k]=S[k]}),i}const Tde={useVisualState:YB({scrapeMotionValuesFromProps:GB,createRenderState:zB,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),UB(t,n)}})},Lde={useVisualState:YB({scrapeMotionValuesFromProps:q8,createRenderState:U8})};function Ade(e,{forwardMotionProps:t=!1},n,r,i){return{...H8(e)?Tde:Lde,preloadedFeatures:n,useRender:_de(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var tr;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(tr||(tr={}));function WS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function _7(e,t,n,r){w.useEffect(()=>{const i=e.current;if(n&&i)return WS(i,t,n,r)},[e,t,n,r])}function Ode({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(tr.Focus,!0)},i=()=>{n&&n.setActive(tr.Focus,!1)};_7(t,"focus",e?r:void 0),_7(t,"blur",e?i:void 0)}function KB(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function XB(e){return!!e.touches}function Mde(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Ide={pageX:0,pageY:0};function Rde(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Ide;return{x:r[t+"X"],y:r[t+"Y"]}}function Dde(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function K8(e,t="page"){return{point:XB(e)?Rde(e,t):Dde(e,t)}}const ZB=(e,t=!1)=>{const n=r=>e(r,K8(r));return t?Mde(n):n},Nde=()=>ip&&window.onpointerdown===null,jde=()=>ip&&window.ontouchstart===null,Bde=()=>ip&&window.onmousedown===null,$de={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Fde={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function QB(e){return Nde()?e:jde()?Fde[e]:Bde()?$de[e]:e}function wg(e,t,n,r){return WS(e,QB(t),ZB(n,t==="pointerdown"),r)}function n5(e,t,n,r){return _7(e,QB(t),n&&ZB(n,t==="pointerdown"),r)}function JB(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const LA=JB("dragHorizontal"),AA=JB("dragVertical");function e$(e){let t=!1;if(e==="y")t=AA();else if(e==="x")t=LA();else{const n=LA(),r=AA();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function t$(){const e=e$(!0);return e?(e(),!1):!0}function OA(e,t,n){return(r,i)=>{!KB(r)||t$()||(e.animationState&&e.animationState.setActive(tr.Hover,t),n&&n(r,i))}}function zde({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){n5(r,"pointerenter",e||n?OA(r,!0,e):void 0,{passive:!e}),n5(r,"pointerleave",t||n?OA(r,!1,t):void 0,{passive:!t})}const n$=(e,t)=>t?e===t?!0:n$(e,t.parentElement):!1;function X8(e){return w.useEffect(()=>()=>e(),[])}function r$(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Hde=function(){},r5=function(){};const i5=(e,t,n)=>Math.min(Math.max(n,e),t),m6=.001,Vde=.01,MA=10,Wde=.05,Ude=1;function Gde({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Hde(e<=MA*1e3);let a=1-t;a=i5(Wde,Ude,a),e=i5(Vde,MA,e/1e3),a<1?(i=u=>{const d=u*a,h=d*e,g=d-n,v=k7(u,a),b=Math.exp(-h);return m6-g/v*b},o=u=>{const h=u*a*e,g=h*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-h),S=k7(Math.pow(u,2),a);return(-i(u)+m6>0?-1:1)*((g-v)*b)/S}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-m6+d*h},o=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const s=5/e,l=Yde(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 qde=12;function Yde(e,t,n){let r=n;for(let i=1;i<qde;i++)r=r-e(r)/t(r);return r}function k7(e,t){return e*Math.sqrt(1-t*t)}const Kde=["duration","bounce"],Xde=["stiffness","damping","mass"];function IA(e,t){return t.some(n=>e[n]!==void 0)}function Zde(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!IA(e,Xde)&&IA(e,Kde)){const n=Gde(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Z8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=r$(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:d,duration:h,isResolvedFromDuration:g}=Zde(o),v=RA,b=RA;function S(){const E=d?-(d/1e3):0,_=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const A=k7(T,k);v=M=>{const R=Math.exp(-k*T*M);return n-R*((E+k*T*_)/A*Math.sin(A*M)+_*Math.cos(A*M))},b=M=>{const R=Math.exp(-k*T*M);return k*T*R*(Math.sin(A*M)*(E+k*T*_)/A+_*Math.cos(A*M))-R*(Math.cos(A*M)*(E+k*T*_)-A*_*Math.sin(A*M))}}else if(k===1)v=A=>n-Math.exp(-T*A)*(_+(E+T*_)*A);else{const A=T*Math.sqrt(k*k-1);v=M=>{const R=Math.exp(-k*T*M),D=Math.min(A*M,300);return n-R*((E+k*T*_)*Math.sinh(D)+A*_*Math.cosh(D))/A}}}return S(),{next:E=>{const _=v(E);if(g)a.done=E>=h;else{const k=b(E)*1e3,T=Math.abs(k)<=r,A=Math.abs(n-_)<=i;a.done=T&&A}return a.value=a.done?n:_,a},flipTarget:()=>{d=-d,[t,n]=[n,t],S()}}}Z8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const RA=e=>0,P2=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Fr=(e,t,n)=>-n*e+n*t+e;function g6(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 DA({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=g6(l,s,e+1/3),o=g6(l,s,e),a=g6(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Qde=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Jde=[w7,Cd,Ch],NA=e=>Jde.find(t=>t.test(e)),i$=(e,t)=>{let n=NA(e),r=NA(t),i=n.parse(e),o=r.parse(t);n===Ch&&(i=DA(i),n=Cd),r===Ch&&(o=DA(o),r=Cd);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Qde(i[l],o[l],s));return a.alpha=Fr(i.alpha,o.alpha,s),n.transform(a)}},E7=e=>typeof e=="number",efe=(e,t)=>n=>t(e(n)),US=(...e)=>e.reduce(efe);function o$(e,t){return E7(e)?n=>Fr(e,t,n):xo.test(e)?i$(e,t):s$(e,t)}const a$=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>o$(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},tfe=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=o$(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function jA(e){const t=ec.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a<n;a++)r||typeof t[a]=="number"?r++:t[a].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const s$=(e,t)=>{const n=ec.createTransformer(t),r=jA(e),i=jA(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?US(a$(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},nfe=(e,t)=>n=>Fr(e,t,n);function rfe(e){if(typeof e=="number")return nfe;if(typeof e=="string")return xo.test(e)?i$:s$;if(Array.isArray(e))return a$;if(typeof e=="object")return tfe}function ife(e,t,n){const r=[],i=n||rfe(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]:t;s=US(l,s)}r.push(s)}return r}function ofe([e,t],[n]){return r=>n(P2(e,t,r))}function afe(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;l<n&&!(e[l]>i||l===r);l++);o=l-1}const s=P2(e[o],e[o+1],i);return t[o](s)}}function l$(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;r5(o===t.length),r5(!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=ife(t,r,i),s=o===2?ofe(e,a):afe(e,a);return n?l=>s(i5(e[0],e[o-1],l)):s}const GS=e=>t=>1-e(1-t),Q8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sfe=e=>t=>Math.pow(t,e),u$=e=>t=>t*t*((e+1)*t-e),lfe=e=>{const t=u$(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},c$=1.525,ufe=4/11,cfe=8/11,dfe=9/10,J8=e=>e,ek=sfe(2),ffe=GS(ek),d$=Q8(ek),f$=e=>1-Math.sin(Math.acos(e)),tk=GS(f$),hfe=Q8(tk),nk=u$(c$),pfe=GS(nk),mfe=Q8(nk),gfe=lfe(c$),vfe=4356/361,yfe=35442/1805,bfe=16061/1805,o5=e=>{if(e===1||e===0)return e;const t=e*e;return e<ufe?7.5625*t:e<cfe?9.075*t-9.9*e+3.4:e<dfe?vfe*t-yfe*e+bfe:10.8*e*e-20.52*e+10.72},Sfe=GS(o5),xfe=e=>e<.5?.5*(1-o5(1-e*2)):.5*o5(e*2-1)+.5;function wfe(e,t){return e.map(()=>t||d$).splice(0,e.length-1)}function Cfe(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function _fe(e,t){return e.map(n=>n*t)}function p4({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=_fe(r&&r.length===a.length?r:Cfe(a),i);function l(){return l$(s,a,{ease:Array.isArray(n)?n:wfe(a,n)})}let u=l();return{next:d=>(o.value=u(d),o.done=d>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function kfe({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:d=>{const h=-s*Math.exp(-d/r);return a.done=!(h>i||h<-i),a.value=a.done?u:u+h,a},flipTarget:()=>{}}}const BA={keyframes:p4,spring:Z8,decay:kfe};function Efe(e){if(Array.isArray(e.to))return p4;if(BA[e.type])return BA[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?p4:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Z8:p4}const h$=1/60*1e3,Pfe=typeof performance<"u"?()=>performance.now():()=>Date.now(),p$=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Pfe()),h$);function Tfe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,g=h?t:n;return u&&a.add(l),g.indexOf(l)===-1&&(g.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const d=t[u];d(l),a.has(d)&&(s.schedule(d),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Lfe=40;let P7=!0,T2=!1,T7=!1;const Cg={delta:0,timestamp:0},yy=["read","update","preRender","render","postRender"],qS=yy.reduce((e,t)=>(e[t]=Tfe(()=>T2=!0),e),{}),Afe=yy.reduce((e,t)=>{const n=qS[t];return e[t]=(r,i=!1,o=!1)=>(T2||Ife(),n.schedule(r,i,o)),e},{}),Ofe=yy.reduce((e,t)=>(e[t]=qS[t].cancel,e),{});yy.reduce((e,t)=>(e[t]=()=>qS[t].process(Cg),e),{});const Mfe=e=>qS[e].process(Cg),m$=e=>{T2=!1,Cg.delta=P7?h$:Math.max(Math.min(e-Cg.timestamp,Lfe),1),Cg.timestamp=e,T7=!0,yy.forEach(Mfe),T7=!1,T2&&(P7=!1,p$(m$))},Ife=()=>{T2=!0,P7=!0,T7||p$(m$)},Rfe=()=>Cg;function g$(e,t,n=0){return e-t-n}function Dfe(e,t,n=0,r=!0){return r?g$(t+-e,t,n):t-(e-t)+n}function Nfe(e,t,n,r){return r?e>=t+n:e<=-n}const jfe=e=>{const t=({delta:n})=>e(n);return{start:()=>Afe.update(t,!0),stop:()=>Ofe.update(t)}};function v$(e){var t,n,{from:r,autoplay:i=!0,driver:o=jfe,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:d,onStop:h,onComplete:g,onRepeat:v,onUpdate:b}=e,S=r$(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=S,_,k=0,T=S.duration,A,M=!1,R=!0,D;const j=Efe(S);!((n=(t=j).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=l$([0,100],[r,E],{clamp:!1}),r=0,E=100);const F=j(Object.assign(Object.assign({},S),{from:r,to:E}));function H(){k++,l==="reverse"?(R=k%2===0,a=Dfe(a,T,u,R)):(a=g$(a,T,u),l==="mirror"&&F.flipTarget()),M=!1,v&&v()}function K(){_.stop(),g&&g()}function te($){if(R||($=-$),a+=$,!M){const U=F.next(Math.max(0,a));A=U.value,D&&(A=D(A)),M=R?U.done:a<=0}b==null||b(A),M&&(k===0&&(T??(T=a)),k<s?Nfe(a,T,u,R)&&H():K())}function G(){d==null||d(),_=o(te),_.start()}return i&&G(),{stop:()=>{h==null||h(),_.stop()}}}function y$(e,t){return t?e*(1e3/t):0}function Bfe({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:d,onUpdate:h,onComplete:g,onStop:v}){let b;function S(T){return n!==void 0&&T<n||r!==void 0&&T>r}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T)<Math.abs(r-T)?n:r}function _(T){b==null||b.stop(),b=v$(Object.assign(Object.assign({},T),{driver:d,onUpdate:A=>{var M;h==null||h(A),(M=T.onUpdate)===null||M===void 0||M.call(T,A)},onComplete:g,onStop:v}))}function k(T){_(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(S(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const A=E(T),M=A===n?-1:1;let R,D;const j=F=>{R=D,D=F,t=y$(F-R,Rfe().delta),(M===1&&F>A||M===-1&&F<A)&&k({from:F,to:A,velocity:t})};_({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:S(T)?j:void 0})}return{stop:()=>b==null?void 0:b.stop()}}const L7=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),$A=e=>L7(e)&&e.hasOwnProperty("z"),Q3=(e,t)=>Math.abs(e-t);function rk(e,t){if(E7(e)&&E7(t))return Q3(e,t);if(L7(e)&&L7(t)){const n=Q3(e.x,t.x),r=Q3(e.y,t.y),i=$A(e)&&$A(t)?Q3(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const b$=(e,t)=>1-3*t+3*e,S$=(e,t)=>3*t-6*e,x$=e=>3*e,a5=(e,t,n)=>((b$(t,n)*e+S$(t,n))*e+x$(t))*e,w$=(e,t,n)=>3*b$(t,n)*e*e+2*S$(t,n)*e+x$(t),$fe=1e-7,Ffe=10;function zfe(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=a5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>$fe&&++s<Ffe);return a}const Hfe=8,Vfe=.001;function Wfe(e,t,n,r){for(let i=0;i<Hfe;++i){const o=w$(t,n,r);if(o===0)return t;const a=a5(t,n,r)-e;t-=a/o}return t}const m4=11,J3=1/(m4-1);function Ufe(e,t,n,r){if(e===t&&n===r)return J8;const i=new Float32Array(m4);for(let a=0;a<m4;++a)i[a]=a5(a*J3,e,n);function o(a){let s=0,l=1;const u=m4-1;for(;l!==u&&i[l]<=a;++l)s+=J3;--l;const d=(a-i[l])/(i[l+1]-i[l]),h=s+d*J3,g=w$(h,e,n);return g>=Vfe?Wfe(a,h,e,n):g===0?h:zfe(a,s,s+J3,e,n)}return a=>a===0||a===1?a:a5(o(a),t,r)}function Gfe({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=w.useRef(!1),s=w.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function d(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(tr.Tap,!1),!t$()}function h(b,S){d()&&(n$(i.current,b.target)?e&&e(b,S):n&&n(b,S))}function g(b,S){d()&&n&&n(b,S)}function v(b,S){u(),!a.current&&(a.current=!0,s.current=US(wg(window,"pointerup",h,l),wg(window,"pointercancel",g,l)),i.animationState&&i.animationState.setActive(tr.Tap,!0),t&&t(b,S))}n5(i,"pointerdown",o?v:void 0,l),X8(u)}const qfe="production",C$=typeof process>"u"||process.env===void 0?qfe:"production",FA=new Set;function _$(e,t,n){e||FA.has(t)||(console.warn(t),n&&console.warn(n),FA.add(t))}const A7=new WeakMap,v6=new WeakMap,Yfe=e=>{const t=A7.get(e.target);t&&t(e)},Kfe=e=>{e.forEach(Yfe)};function Xfe({root:e,...t}){const n=e||document;v6.has(n)||v6.set(n,{});const r=v6.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Kfe,{root:e,...t})),r[i]}function Zfe(e,t,n){const r=Xfe(t);return A7.set(e,n),r.observe(e),()=>{A7.delete(e),r.unobserve(e)}}function Qfe({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=w.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?the:ehe)(a,o.current,e,i)}const Jfe={some:0,all:1};function ehe(e,t,n,{root:r,margin:i,amount:o="some",once:a}){w.useEffect(()=>{if(!e||!n.current)return;const s={root:r==null?void 0:r.current,rootMargin:i,threshold:typeof o=="number"?o:Jfe[o]},l=u=>{const{isIntersecting:d}=u;if(t.isInView===d||(t.isInView=d,a&&!d&&t.hasEnteredView))return;d&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(tr.InView,d);const h=n.getProps(),g=d?h.onViewportEnter:h.onViewportLeave;g&&g(u)};return Zfe(n.current,s,l)},[e,r,i,o])}function the(e,t,n,{fallback:r=!0}){w.useEffect(()=>{!e||!r||(C$!=="production"&&_$(!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(tr.InView,!0)}))},[e])}const _d=e=>t=>(e(t),null),nhe={inView:_d(Qfe),tap:_d(Gfe),focus:_d(Ode),hover:_d(zde)};function ik(){const e=w.useContext(m0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=w.useId();return w.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function rhe(){return ihe(w.useContext(m0))}function ihe(e){return e===null?!0:e.isPresent}function k$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const s5=e=>e*1e3,ohe={linear:J8,easeIn:ek,easeInOut:d$,easeOut:ffe,circIn:f$,circInOut:hfe,circOut:tk,backIn:nk,backInOut:mfe,backOut:pfe,anticipate:gfe,bounceIn:Sfe,bounceInOut:xfe,bounceOut:o5},zA=e=>{if(Array.isArray(e)){r5(e.length===4);const[t,n,r,i]=e;return Ufe(t,n,r,i)}else if(typeof e=="string")return ohe[e];return e},ahe=e=>Array.isArray(e)&&typeof e[0]!="number",HA=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ec.test(t)&&!t.startsWith("url(")),rh=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),eb=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),y6=()=>({type:"keyframes",ease:"linear",duration:.3}),she=e=>({type:"keyframes",duration:.8,values:e}),VA={x:rh,y:rh,z:rh,rotate:rh,rotateX:rh,rotateY:rh,rotateZ:rh,scaleX:eb,scaleY:eb,scale:eb,opacity:y6,backgroundColor:y6,color:y6,default:eb},lhe=(e,t)=>{let n;return E2(t)?n=she:n=VA[e]||VA.default,{to:t,...n(t)}},uhe={...BB,color:xo,backgroundColor:xo,outlineColor:xo,fill:xo,stroke:xo,borderColor:xo,borderTopColor:xo,borderRightColor:xo,borderBottomColor:xo,borderLeftColor:xo,filter:C7,WebkitFilter:C7},ok=e=>uhe[e];function ak(e,t){var n;let r=ok(e);return r!==C7&&(r=ec),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const che={current:!1},E$=1/60*1e3,dhe=typeof performance<"u"?()=>performance.now():()=>Date.now(),P$=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(dhe()),E$);function fhe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,g=h?t:n;return u&&a.add(l),g.indexOf(l)===-1&&(g.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const d=t[u];d(l),a.has(d)&&(s.schedule(d),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const hhe=40;let O7=!0,L2=!1,M7=!1;const _g={delta:0,timestamp:0},by=["read","update","preRender","render","postRender"],YS=by.reduce((e,t)=>(e[t]=fhe(()=>L2=!0),e),{}),Gs=by.reduce((e,t)=>{const n=YS[t];return e[t]=(r,i=!1,o=!1)=>(L2||mhe(),n.schedule(r,i,o)),e},{}),Vh=by.reduce((e,t)=>(e[t]=YS[t].cancel,e),{}),b6=by.reduce((e,t)=>(e[t]=()=>YS[t].process(_g),e),{}),phe=e=>YS[e].process(_g),T$=e=>{L2=!1,_g.delta=O7?E$:Math.max(Math.min(e-_g.timestamp,hhe),1),_g.timestamp=e,M7=!0,by.forEach(phe),M7=!1,L2&&(O7=!1,P$(T$))},mhe=()=>{L2=!0,O7=!0,M7||P$(T$)},I7=()=>_g;function L$(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Vh.read(r),e(o-t))};return Gs.read(r,!0),()=>Vh.read(r)}function ghe({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 vhe({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=s5(o.duration)),o.repeatDelay&&(a.repeatDelay=s5(o.repeatDelay)),e&&(a.ease=ahe(e)?e.map(zA):zA(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 yhe(e,t){var n,r;return(r=(n=(sk(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function bhe(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function She(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),bhe(t),ghe(e)||(e={...e,...lhe(n,t.to)}),{...t,...vhe(e)}}function xhe(e,t,n,r,i){const o=sk(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=HA(e,n);a==="none"&&s&&typeof n=="string"?a=ak(e,n):WA(a)&&typeof n=="string"?a=UA(n):!Array.isArray(n)&&WA(n)&&typeof a=="string"&&(n=UA(a));const l=HA(e,a);function u(){const h={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:g=>t.set(g)};return o.type==="inertia"||o.type==="decay"?Bfe({...h,...o}):v$({...She(o,h,e),onUpdate:g=>{h.onUpdate(g),o.onUpdate&&o.onUpdate(g)},onComplete:()=>{h.onComplete(),o.onComplete&&o.onComplete()}})}function d(){const h=qB(n);return t.set(h),i(),o.onUpdate&&o.onUpdate(h),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?d:u}function WA(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function UA(e){return typeof e=="number"?0:ak("",e)}function sk(e,t){return e[t]||e.default||e}function lk(e,t,n,r={}){return che.current&&(r={type:!1}),t.start(i=>{let o;const a=xhe(e,t,n,r,i),s=yhe(r,e),l=()=>o=a();let u;return s?u=L$(l,s5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const whe=e=>/^\-?\d*\.?\d+$/.test(e),Che=e=>/^0[^.\s]+$/.test(e);function uk(e,t){e.indexOf(t)===-1&&e.push(t)}function ck(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wv{constructor(){this.subscriptions=[]}add(t){return uk(this.subscriptions,t),()=>ck(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _he=e=>!isNaN(parseFloat(e));class khe{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Wv,this.velocityUpdateSubscribers=new Wv,this.renderSubscribers=new Wv,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=I7();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Gs.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=()=>Gs.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=_he(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?y$(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 Ug(e){return new khe(e)}const A$=e=>t=>t.test(e),Ehe={test:e=>e==="auto",parse:e=>e},O$=[op,Lt,Zl,dd,ede,Jce,Ehe],W1=e=>O$.find(A$(e)),Phe=[...O$,xo,ec],The=e=>Phe.find(A$(e));function Lhe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Ahe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function KS(e,t,n){const r=e.getProps();return Y8(r,t,n!==void 0?n:r.custom,Lhe(e),Ahe(e))}function Ohe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ug(n))}function Mhe(e,t){const n=KS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=qB(o[a]);Ohe(e,a,s)}}function Ihe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;s<a;s++){const l=o[s],u=t[l];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(whe(d)||Che(d))?d=parseFloat(d):!The(d)&&ec.test(u)&&(d=ak(l,u)),e.addValue(l,Ug(d)),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function Rhe(e,t){return t?(t[e]||t.default||t).from:void 0}function Dhe(e,t,n){var r;const i={};for(const o in e){const a=Rhe(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function l5(e){return Boolean(au(e)&&e.add)}function Nhe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>R7(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=R7(e,t,n);else{const i=typeof t=="function"?KS(e,t,n.custom):t;r=M$(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function R7(e,t,n={}){var r;const i=KS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>M$(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:g}=o;return jhe(e,t,d+u,h,g,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[a,s]:[s,a];return u().then(d)}else return Promise.all([a(),s(n.delay)])}function M$(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 d=[],h=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const g in l){const v=e.getValue(g),b=l[g];if(!v||b===void 0||h&&$he(h,g))continue;let S={delay:n,...a};e.shouldReduceMotion&&g0.has(g)&&(S={...S,type:!1,delay:0});let E=lk(g,v,b,S);l5(u)&&(u.add(g),E=E.then(()=>u.remove(g))),d.push(E)}return Promise.all(d).then(()=>{s&&Mhe(e,s)})}function jhe(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(Bhe).forEach((u,d)=>{a.push(R7(u,t,{...o,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Bhe(e,t){return e.sortNodePosition(t)}function $he({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const dk=[tr.Animate,tr.InView,tr.Focus,tr.Hover,tr.Tap,tr.Drag,tr.Exit],Fhe=[...dk].reverse(),zhe=dk.length;function Hhe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Nhe(e,n,r)))}function Vhe(e){let t=Hhe(e);const n=Uhe();let r=!0;const i=(l,u)=>{const d=KS(e,u);if(d){const{transition:h,transitionEnd:g,...v}=d;l={...l,...v,...g}}return l};function o(l){t=l(e)}function a(l,u){var d;const h=e.getProps(),g=e.getVariantContext(!0)||{},v=[],b=new Set;let S={},E=1/0;for(let k=0;k<zhe;k++){const T=Fhe[k],A=n[T],M=(d=h[T])!==null&&d!==void 0?d:g[T],R=C2(M),D=T===u?A.isActive:null;D===!1&&(E=k);let j=M===g[T]&&M!==h[T]&&R;if(j&&r&&e.manuallyAnimateOnMount&&(j=!1),A.protectedKeys={...S},!A.isActive&&D===null||!M&&!A.prevProp||zS(M)||typeof M=="boolean")continue;const F=Whe(A.prevProp,M);let H=F||T===u&&A.isActive&&!j&&R||k>E&&R;const K=Array.isArray(M)?M:[M];let te=K.reduce(i,{});D===!1&&(te={});const{prevResolvedValues:G={}}=A,$={...G,...te},U=X=>{H=!0,b.delete(X),A.needsAnimating[X]=!0};for(const X in $){const Z=te[X],W=G[X];S.hasOwnProperty(X)||(Z!==W?E2(Z)&&E2(W)?!k$(Z,W)||F?U(X):A.protectedKeys[X]=!0:Z!==void 0?U(X):b.add(X):Z!==void 0&&b.has(X)?U(X):A.protectedKeys[X]=!0)}A.prevProp=M,A.prevResolvedValues=te,A.isActive&&(S={...S,...te}),r&&e.blockInitialAnimation&&(H=!1),H&&!j&&v.push(...K.map(X=>({animation:X,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const A=e.getBaseTarget(T);A!==void 0&&(k[T]=A)}),v.push({animation:k})}let _=Boolean(v.length);return r&&h.initial===!1&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(v):Promise.resolve()}function s(l,u,d){var h;if(n[l].isActive===u)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const g=a(d,l);for(const v in n)n[v].protectedKeys={};return g}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Whe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!k$(t,e):!1}function ih(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Uhe(){return{[tr.Animate]:ih(!0),[tr.InView]:ih(),[tr.Hover]:ih(),[tr.Tap]:ih(),[tr.Drag]:ih(),[tr.Focus]:ih(),[tr.Exit]:ih()}}const Ghe={animation:_d(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Vhe(e)),zS(t)&&w.useEffect(()=>t.subscribe(e),[t])}),exit:_d(e=>{const{custom:t,visualElement:n}=e,[r,i]=ik(),o=w.useContext(m0);w.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(tr.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class I${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=x6(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=rk(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:g}=u,{timestamp:v}=I7();this.history.push({...g,timestamp:v});const{onStart:b,onMove:S}=this.handlers;d||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=S6(d,this.transformPagePoint),KB(u)&&u.buttons===0){this.handlePointerUp(u,d);return}Gs.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:g}=this.handlers,v=x6(S6(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,v),g&&g(u,v)},XB(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=K8(t),o=S6(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=I7();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,x6(o,this.history)),this.removeListeners=US(wg(window,"pointermove",this.handlePointerMove),wg(window,"pointerup",this.handlePointerUp),wg(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Vh.update(this.updatePoint)}}function S6(e,t){return t?{point:t(e.point)}:e}function GA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function x6({point:e},t){return{point:e,delta:GA(e,R$(t)),offset:GA(e,qhe(t)),velocity:Yhe(t,.1)}}function qhe(e){return e[0]}function R$(e){return e[e.length-1]}function Yhe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=R$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>s5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Oa(e){return e.max-e.min}function qA(e,t=0,n=.01){return rk(e,t)<n}function YA(e,t,n,r=.5){e.origin=r,e.originPoint=Fr(t.min,t.max,e.origin),e.scale=Oa(n)/Oa(t),(qA(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Fr(n.min,n.max,e.origin)-e.originPoint,(qA(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Uv(e,t,n,r){YA(e.x,t.x,n.x,r==null?void 0:r.originX),YA(e.y,t.y,n.y,r==null?void 0:r.originY)}function KA(e,t,n){e.min=n.min+t.min,e.max=e.min+Oa(t)}function Khe(e,t,n){KA(e.x,t.x,n.x),KA(e.y,t.y,n.y)}function XA(e,t,n){e.min=t.min-n.min,e.max=e.min+Oa(t)}function Gv(e,t,n){XA(e.x,t.x,n.x),XA(e.y,t.y,n.y)}function Xhe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Fr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Fr(n,e,r.max):Math.min(e,n)),e}function ZA(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 Zhe(e,{top:t,left:n,bottom:r,right:i}){return{x:ZA(e.x,n,i),y:ZA(e.y,t,r)}}function QA(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Qhe(e,t){return{x:QA(e.x,t.x),y:QA(e.y,t.y)}}function Jhe(e,t){let n=.5;const r=Oa(e),i=Oa(t);return i>r?n=P2(t.min,t.max-r,e.min):r>i&&(n=P2(e.min,e.max-i,t.min)),i5(0,1,n)}function epe(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 D7=.35;function tpe(e=D7){return e===!1?e=0:e===!0&&(e=D7),{x:JA(e,"left","right"),y:JA(e,"top","bottom")}}function JA(e,t,n){return{min:eO(e,t),max:eO(e,n)}}function eO(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const tO=()=>({translate:0,scale:1,origin:0,originPoint:0}),qv=()=>({x:tO(),y:tO()}),nO=()=>({min:0,max:0}),pi=()=>({x:nO(),y:nO()});function Dl(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 npe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rpe(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 w6(e){return e===void 0||e===1}function N7({scale:e,scaleX:t,scaleY:n}){return!w6(e)||!w6(t)||!w6(n)}function ch(e){return N7(e)||N$(e)||e.z||e.rotate||e.rotateX||e.rotateY}function N$(e){return rO(e.x)||rO(e.y)}function rO(e){return e&&e!=="0%"}function u5(e,t,n){const r=e-n,i=t*r;return n+i}function iO(e,t,n,r,i){return i!==void 0&&(e=u5(e,i,r)),u5(e,n,r)+t}function j7(e,t=0,n=1,r,i){e.min=iO(e.min,t,n,r,i),e.max=iO(e.max,t,n,r,i)}function j$(e,{x:t,y:n}){j7(e.x,t.translate,t.scale,t.originPoint),j7(e.y,n.translate,n.scale,n.originPoint)}function ipe(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u<a;u++)s=n[u],l=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Um(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,j$(e,l)),r&&ch(s.latestValues)&&Um(e,s.latestValues))}function pd(e,t){e.min=e.min+t,e.max=e.max+t}function oO(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Fr(e.min,e.max,o);j7(e,t[n],t[r],a,t.scale)}const ope=["x","scaleX","originX"],ape=["y","scaleY","originY"];function Um(e,t){oO(e.x,t,ope),oO(e.y,t,ape)}function B$(e,t){return D$(rpe(e.getBoundingClientRect(),t))}function spe(e,t,n){const r=B$(e,n),{scroll:i}=t;return i&&(pd(r.x,i.offset.x),pd(r.y,i.offset.y)),r}const lpe=new WeakMap;class upe{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pi(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(K8(s,"page").point)},i=(s,l)=>{var u;const{drag:d,dragPropagation:h,onDragStart:g}=this.getProps();d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=e$(d),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Dl(v=>{var b,S;let E=this.getAxisMotionValue(v).get()||0;if(Zl.test(E)){const _=(S=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||S===void 0?void 0:S.layoutBox[v];_&&(E=Oa(_)*(parseFloat(E)/100))}this.originPoint[v]=E}),g==null||g(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(tr.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:d,onDirectionLock:h,onDrag:g}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(d&&this.currentDirection===null){this.currentDirection=cpe(v),this.currentDirection!==null&&(h==null||h(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),g==null||g(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new I$(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o==null||o(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(tr.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!tb(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Xhe(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&&Wm(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Zhe(r.layoutBox,t):this.constraints=!1,this.elastic=tpe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Dl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=epe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wm(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=spe(r,i.root,this.visualElement.getTransformPagePoint());let a=Qhe(i.layout.layoutBox,o);if(n){const s=n(npe(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=Dl(d=>{var h;if(!tb(d,n,this.currentDirection))return;let g=(h=l==null?void 0:l[d])!==null&&h!==void 0?h:{};a&&(g={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,S={type:"inertia",velocity:r?t[d]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...g};return this.startAxisValueAnimation(d,S)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return lk(t,r,0,n)}stopAnimation(){Dl(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){Dl(n=>{const{drag:r}=this.getProps();if(!tb(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Fr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Wm(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Dl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Jhe({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),Dl(s=>{if(!tb(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:d}=this.constraints[s];l.set(Fr(u,d,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;lpe.set(this.visualElement,this);const n=this.visualElement.current,r=wg(n,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Wm(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=WS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Dl(h=>{const g=this.getAxisMotionValue(h);g&&(this.originPoint[h]+=u[h].translate,g.set(g.get()+u[h].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l==null||l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=D7,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function tb(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function cpe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function dpe(e){const{dragControls:t,visualElement:n}=e,r=VS(()=>new upe(n));w.useEffect(()=>t&&t.subscribe(r),[r,t]),w.useEffect(()=>r.addListeners(),[r])}function fpe({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=w.useRef(null),{transformPagePoint:s}=w.useContext(F8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(d,h)=>{a.current=null,n&&n(d,h)}};w.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(d){a.current=new I$(d,l,{transformPagePoint:s})}n5(i,"pointerdown",o&&u),X8(()=>a.current&&a.current.end())}const hpe={pan:_d(fpe),drag:_d(dpe)};function B7(e){return typeof e=="string"&&e.startsWith("var(--")}const $$=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function ppe(e){const t=$$.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function $7(e,t,n=1){const[r,i]=ppe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():B7(i)?$7(i,t,n+1):i}function mpe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!B7(o))return;const a=$7(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!B7(o))continue;const a=$7(o,r);a&&(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const gpe=new Set(["width","height","top","left","right","bottom","x","y"]),F$=e=>gpe.has(e),vpe=e=>Object.keys(e).some(F$),z$=(e,t)=>{e.set(t,!1),e.set(t)},aO=e=>e===op||e===Lt;var sO;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(sO||(sO={}));const lO=(e,t)=>parseFloat(e.split(", ")[t]),uO=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return lO(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?lO(o[1],e):0}},ype=new Set(["x","y","z"]),bpe=e5.filter(e=>!ype.has(e));function Spe(e){const t=[];return bpe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const cO={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:uO(4,13),y:uO(5,14)},xpe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=cO[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);z$(d,s[u]),e[u]=cO[u](l,o)}),e},wpe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(F$);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],h=W1(d);const g=t[l];let v;if(E2(g)){const b=g.length,S=g[0]===null?1:0;d=g[S],h=W1(d);for(let E=S;E<b;E++)v?r5(W1(g[E])===v):v=W1(g[E])}else v=W1(g);if(h!==v)if(aO(h)&&aO(v)){const b=u.get();typeof b=="string"&&u.set(parseFloat(b)),typeof g=="string"?t[l]=parseFloat(g):Array.isArray(g)&&v===Lt&&(t[l]=g.map(parseFloat))}else h!=null&&h.transform&&(v!=null&&v.transform)&&(d===0||g===0)?d===0?u.set(v.transform(d)):t[l]=h.transform(g):(a||(o=Spe(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],z$(u,g))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=xpe(t,e,s);return o.length&&o.forEach(([d,h])=>{e.getValue(d).set(h)}),e.render(),ip&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Cpe(e,t,n,r){return vpe(t)?wpe(e,t,n,r):{target:t,transitionEnd:r}}const _pe=(e,t,n,r)=>{const i=mpe(e,t,r);return t=i.target,r=i.transitionEnd,Cpe(e,t,n,r)},F7={current:null},H$={current:!1};function kpe(){if(H$.current=!0,!!ip)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>F7.current=e.matches;e.addListener(t),t()}else F7.current=!1}function Epe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(au(o))e.addValue(i,o),l5(r)&&r.add(i);else if(au(a))e.addValue(i,Ug(o)),l5(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,Ug(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const V$=Object.keys(_2),Ppe=V$.length,dO=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tpe{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Gs.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=HS(n),this.isVariantNode=PB(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const d in u){const h=u[d];a[d]!==void 0&&au(h)&&(h.set(a[d],!1),l5(l)&&l.add(d))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),H$.current||kpe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:F7.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),Vh.update(this.notifyUpdate),Vh.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=g0.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Gs.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<Ppe;l++){const u=V$[l],{isEnabled:d,Component:h}=_2[u];d(t)&&h&&s.push(w.createElement(h,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:d,dragConstraints:h,layoutScroll:g}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(d)||h&&Wm(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:g})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;n<dO.length;n++){const r=dO[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i=t["on"+r];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Epe(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var n;return(n=this.props.variants)===null||n===void 0?void 0:n[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:(t=this.parent)===null||t===void 0?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var n,r;if(t)return(n=this.parent)===null||n===void 0?void 0:n.getVariantContext();if(!this.isControllingVariants){const o=((r=this.parent)===null||r===void 0?void 0:r.getVariantContext())||{};return this.props.initial!==void 0&&(o.initial=this.props.initial),o}const i={};for(let o=0;o<Lpe;o++){const a=W$[o],s=this.props[a];(C2(s)||s===!1)&&(i[a]=s)}return i}addVariantChild(t){var n;const r=this.getClosestVariantNode();if(r)return(n=r.variantChildren)===null||n===void 0||n.add(t),()=>r.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ug(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Y8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!au(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wv),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const W$=["initial",...dk],Lpe=W$.length;class U$ extends Tpe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=Dhe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Ihe(this,r,a);const s=_pe(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Ape(e){return window.getComputedStyle(e)}class Ope extends U${readValueFromInstance(t,n){if(g0.has(n)){const r=ok(n);return r&&r.default||0}else{const r=Ape(t),i=(AB(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return B$(t,n)}build(t,n,r,i){W8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return q8(t)}renderInstance(t,n,r,i){VB(t,n,r,i)}}class Mpe extends U${getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return g0.has(n)?((r=ok(n))===null||r===void 0?void 0:r.default)||0:(n=WB.has(n)?n:HB(n),t.getAttribute(n))}measureInstanceViewportBox(){return pi()}scrapeMotionValuesFromProps(t){return GB(t)}build(t,n,r,i){G8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){UB(t,n,r,i)}}const Ipe=(e,t)=>H8(e)?new Mpe(t,{enableHardwareAcceleration:!1}):new Ope(t,{enableHardwareAcceleration:!0});function fO(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const U1={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Lt.test(e))e=parseFloat(e);else return e;const n=fO(e,t.target.x),r=fO(e,t.target.y);return`${n}% ${r}%`}},hO="_$css",Rpe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace($$,v=>(o.push(v),hO)));const a=ec.parse(e);if(a.length>5)return r;const s=ec.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const h=Fr(u,d,.5);typeof a[2+l]=="number"&&(a[2+l]/=h),typeof a[3+l]=="number"&&(a[3+l]/=h);let g=s(a);if(i){let v=0;g=g.replace(hO,()=>{const b=o[v];return v++,b})}return g}};class Dpe extends N.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;qce(jpe),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()})),zv.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()||Gs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),r!=null&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t==null||t()}render(){return null}}function Npe(e){const[t,n]=ik(),r=w.useContext(z8);return N.createElement(Dpe,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(TB),isPresent:t,safeToRemove:n})}const jpe={borderRadius:{...U1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:U1,borderTopRightRadius:U1,borderBottomLeftRadius:U1,borderBottomRightRadius:U1,boxShadow:Rpe},Bpe={measureLayout:Npe};function $pe(e,t,n={}){const r=au(e)?e:Ug(e);return lk("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const G$=["TopLeft","TopRight","BottomLeft","BottomRight"],Fpe=G$.length,pO=e=>typeof e=="string"?parseFloat(e):e,mO=e=>typeof e=="number"||Lt.test(e);function zpe(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Fr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Hpe(r)),e.opacityExit=Fr((s=t.opacity)!==null&&s!==void 0?s:1,0,Vpe(r))):o&&(e.opacity=Fr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let d=0;d<Fpe;d++){const h=`border${G$[d]}Radius`;let g=gO(t,h),v=gO(n,h);if(g===void 0&&v===void 0)continue;g||(g=0),v||(v=0),g===0||v===0||mO(g)===mO(v)?(e[h]=Math.max(Fr(pO(g),pO(v),r),0),(Zl.test(v)||Zl.test(g))&&(e[h]+="%")):e[h]=v}(t.rotate||n.rotate)&&(e.rotate=Fr(t.rotate||0,n.rotate||0,r))}function gO(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}const Hpe=q$(0,.5,tk),Vpe=q$(.5,.95,J8);function q$(e,t,n){return r=>r<e?0:r>t?1:n(P2(e,t,r))}function vO(e,t){e.min=t.min,e.max=t.max}function Ms(e,t){vO(e.x,t.x),vO(e.y,t.y)}function yO(e,t,n,r,i){return e-=t,e=u5(e,1/n,r),i!==void 0&&(e=u5(e,1/i,r)),e}function Wpe(e,t=0,n=1,r=.5,i,o=e,a=e){if(Zl.test(t)&&(t=parseFloat(t),t=Fr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Fr(o.min,o.max,r);e===o&&(s-=t),e.min=yO(e.min,t,n,s,i),e.max=yO(e.max,t,n,s,i)}function bO(e,t,[n,r,i],o,a){Wpe(e,t[n],t[r],t[i],t.scale,o,a)}const Upe=["x","scaleX","originX"],Gpe=["y","scaleY","originY"];function SO(e,t,n,r){bO(e.x,t,Upe,n==null?void 0:n.x,r==null?void 0:r.x),bO(e.y,t,Gpe,n==null?void 0:n.y,r==null?void 0:r.y)}function xO(e){return e.translate===0&&e.scale===1}function Y$(e){return xO(e.x)&&xO(e.y)}function K$(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 wO(e){return Oa(e.x)/Oa(e.y)}function qpe(e,t,n=.1){return rk(e,t)<=n}class Ype{constructor(){this.members=[]}add(t){uk(this.members,t),t.scheduleRender()}remove(t){if(ck(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function CO(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:d}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const Kpe=(e,t)=>e.depth-t.depth;class Xpe{constructor(){this.children=[],this.isDirty=!1}add(t){uk(this.children,t),this.isDirty=!0}remove(t){ck(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Kpe),this.isDirty=!1,this.children.forEach(t)}}const _O=["","X","Y","Z"],kO=1e3;let Zpe=0;function X$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=Zpe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(nme),this.nodes.forEach(rme)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xpe)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Wv),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l==null||l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}registerPotentialNode(a,s){this.potentialNodes.set(a,s)}mount(a,s=!1){var l;if(this.instance)return;this.isSVG=a instanceof SVGElement&&a.tagName!=="svg",this.instance=a;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),(l=this.parent)===null||l===void 0||l.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),s&&(d||u)&&(this.isLayoutDirty=!0),e){let g;const v=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,g&&g(),g=L$(v,250),zv.hasAnimatedSinceResize&&(zv.hasAnimatedSinceResize=!1,this.nodes.forEach(PO))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:S})=>{var E,_,k,T,A;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=(_=(E=this.options.transition)!==null&&E!==void 0?E:h.getDefaultTransition())!==null&&_!==void 0?_:lme,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=h.getProps(),j=!this.targetLayout||!K$(this.targetLayout,S)||b,F=!v&&b;if(!((k=this.resumeFrom)===null||k===void 0)&&k.instance||F||v&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(g,F);const H={...sk(M,"layout"),onPlay:R,onComplete:D};h.shouldReduceMotion&&(H.delay=0,H.type=!1),this.startAnimation(H)}else!v&&this.animationProgress===0&&PO(this),this.isLead()&&((A=(T=this.options).onExitComplete)===null||A===void 0||A.call(T));this.targetLayout=S})}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,Vh.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(ime),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const b=this.path[v];b.shouldResetTransform=!0,b.updateScroll("snapshot")}const{layoutId:d,layout:h}=this.options;if(d===void 0&&!h)return;const g=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=g==null?void 0:g(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(EO);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(ume),this.potentialNodes.clear()),this.nodes.forEach(tme),this.nodes.forEach(Qpe),this.nodes.forEach(Jpe),this.clearAllSnapshots(),b6.update(),b6.preRender(),b6.render())}clearAllSnapshots(){this.nodes.forEach(eme),this.sharedNodes.forEach(ome)}scheduleUpdateProjection(){Gs.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Gs.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=pi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(a=this.options.visualElement)===null||a===void 0||a.notify("LayoutMeasure",this.layout.layoutBox,s==null?void 0:s.layoutBox)}updateScroll(a="measure"){let s=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){var a;if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!Y$(this.projectionDelta),u=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,d=u==null?void 0:u(this.latestValues,""),h=d!==this.prevTransformTemplateValue;s&&(l||ch(this.latestValues)||h)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){var s;const l=this.measurePageBox();let u=this.removeElementScroll(l);a&&(u=this.removeTransform(u)),cme(u);const d=(s=this.options.visualElement)===null||s===void 0?void 0:s.readValue("position"),h=d==="fixed"||d==="sticky"?d:"static";return{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id,position:h}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return pi();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(pd(s.x,l.offset.x),pd(s.y,l.offset.y)),s}removeElementScroll(a){const s=pi();Ms(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:d,options:h}=u;if(u!==this.root&&d&&h.layoutScroll){if(d.isRoot){Ms(s,a);const{scroll:g}=this.root;g&&(pd(s.x,-g.offset.x),pd(s.y,-g.offset.y))}pd(s.x,d.offset.x),pd(s.y,d.offset.y)}}return s}applyTransform(a,s=!1){const l=pi();Ms(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Um(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),ch(d.latestValues)&&Um(l,d.latestValues)}return ch(this.latestValues)&&Um(l,this.latestValues),l}removeTransform(a){var s;const l=pi();Ms(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!ch(d.latestValues))continue;N7(d.latestValues)&&d.updateSnapshot();const h=pi(),g=d.measurePageBox();Ms(h,g),SO(l,d.latestValues,(s=d.snapshot)===null||s===void 0?void 0:s.layoutBox,h)}return ch(this.latestValues)&&SO(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var a;if(this.isProjectionDirty||(this.isProjectionDirty=this.getLead().isProjectionDirty||Boolean(this.parent&&this.parent.isProjectionDirty)),!this.isProjectionDirty)return;const{layout:s,layoutId:l}=this.options;if(!(!this.layout||!(s||l))){if(!this.targetDelta&&!this.relativeTarget){const u=this.getClosestProjectingParent();u&&u.layout?(this.relativeParent=u,this.relativeTarget=pi(),this.relativeTargetOrigin=pi(),Gv(this.relativeTargetOrigin,this.layout.layoutBox,u.layout.layoutBox),Ms(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=pi(),this.targetWithTransforms=pi()),this.relativeTarget&&this.relativeTargetOrigin&&(!((a=this.relativeParent)===null||a===void 0)&&a.target)?Khe(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ms(this.target,this.layout.layoutBox),j$(this.target,this.targetDelta)):Ms(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const u=this.getClosestProjectingParent();u&&Boolean(u.resumingFrom)===Boolean(this.resumingFrom)&&!u.options.layoutScroll&&u.target?(this.relativeParent=u,this.relativeTarget=pi(),this.relativeTargetOrigin=pi(),Gv(this.relativeTargetOrigin,this.target,u.target),Ms(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||N7(this.parent.latestValues)||N$(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var a;if(!this.isProjectionDirty)return;this.isProjectionDirty=!1;const{layout:s,layoutId:l}=this.options;if(this.isTreeAnimating=Boolean(((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||l))return;const u=this.getLead();Ms(this.layoutCorrected,this.layout.layoutBox),ipe(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:d}=u;if(!d)return;this.projectionDelta||(this.projectionDelta=qv(),this.projectionDeltaWithTransform=qv());const h=this.treeScale.x,g=this.treeScale.y,v=this.projectionTransform;Uv(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=CO(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==h||this.treeScale.y!==g)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s,l,u;(l=(s=this.options).scheduleRender)===null||l===void 0||l.call(s),a&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,s=!1){var l,u;const d=this.snapshot,h=(d==null?void 0:d.latestValues)||{},g={...this.latestValues},v=qv();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const b=pi(),S=(d==null?void 0:d.source)!==((l=this.layout)===null||l===void 0?void 0:l.source),E=(((u=this.getStack())===null||u===void 0?void 0:u.members.length)||0)<=1,_=Boolean(S&&!E&&this.options.crossfade===!0&&!this.path.some(sme));this.animationProgress=0,this.mixTargetDelta=k=>{var T;const A=k/1e3;TO(v.x,a.x,A),TO(v.y,a.y,A),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((T=this.relativeParent)===null||T===void 0)&&T.layout)&&(Gv(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ame(this.relativeTarget,this.relativeTargetOrigin,b,A)),S&&(this.animationValues=g,zpe(g,h,this.latestValues,A,_,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Vh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Gs.update(()=>{zv.hasAnimatedSinceResize=!0,this.currentAnimation=$pe(0,kO,{...a,onUpdate:u=>{var d;this.mixTargetDelta(u),(d=a.onUpdate)===null||d===void 0||d.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,kO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:d}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Z$(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||pi();const h=Oa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+h;const g=Oa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+g}Ms(s,l),Um(s,d),Uv(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){var l,u,d;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Ype),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(d=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||d===void 0?void 0:d.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let d=0;d<_O.length;d++){const h="rotate"+_O[d];l[h]&&(u[h]=l[h],a.setStaticValue(h,0))}a==null||a.render();for(const d in u)a.setStaticValue(d,u[d]);a.scheduleRender()}getProjectionStyles(a={}){var s,l,u;const d={};if(!this.instance||this.isSVG)return d;if(this.isVisible)d.visibility="";else return{visibility:"hidden"};const h=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=h4(a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=h4(a.pointerEvents)||""),this.hasProjected&&!ch(this.latestValues)&&(E.transform=h?h({},""):"none",this.hasProjected=!1),E}const v=g.animationValues||g.latestValues;this.applyTransformsToTarget(),d.transform=CO(this.projectionDeltaWithTransform,this.treeScale,v),h&&(d.transform=h(v,d.transform));const{x:b,y:S}=this.projectionDelta;d.transformOrigin=`${b.origin*100}% ${S.origin*100}% 0`,g.animationValues?d.opacity=g===this?(u=(l=v.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:d.opacity=g===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const E in J4){if(v[E]===void 0)continue;const{correct:_,applyTo:k}=J4[E],T=_(v[E],g);if(k){const A=k.length;for(let M=0;M<A;M++)d[k[M]]=T}else d[E]=T}return this.options.layoutId&&(d.pointerEvents=g===this?h4(a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(EO),this.root.sharedNodes.clear()}}}function Qpe(e){e.updateLayout()}function Jpe(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?Dl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],S=Oa(b);b.min=o[v].min,b.max=b.min+S}):Z$(s,i.layoutBox,o)&&Dl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],S=Oa(o[v]);b.max=b.min+S});const u=qv();Uv(u,o,i.layoutBox);const d=qv();l?Uv(d,e.applyTransform(a,!0),i.measuredBox):Uv(d,o,i.layoutBox);const h=!Y$(u);let g=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:S}=v;if(b&&S){const E=pi();Gv(E,i.layoutBox,b.layoutBox);const _=pi();Gv(_,o,S.layoutBox),K$(E,_)||(g=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:d,layoutDelta:u,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 eme(e){e.clearSnapshot()}function EO(e){e.clearMeasurements()}function tme(e){const{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function PO(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function nme(e){e.resolveTargetDelta()}function rme(e){e.calcProjection()}function ime(e){e.resetRotation()}function ome(e){e.removeLeadSnapshot()}function TO(e,t,n){e.translate=Fr(t.translate,0,n),e.scale=Fr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function LO(e,t,n,r){e.min=Fr(t.min,n.min,r),e.max=Fr(t.max,n.max,r)}function ame(e,t,n,r){LO(e.x,t.x,n.x,r),LO(e.y,t.y,n.y,r)}function sme(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lme={duration:.45,ease:[.4,0,.1,1]};function ume(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 AO(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function cme(e){AO(e.x),AO(e.y)}function Z$(e,t,n){return e==="position"||e==="preserve-aspect"&&!qpe(wO(t),wO(n),.2)}const dme=X$({attachResizeListener:(e,t)=>WS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),C6={current:void 0},fme=X$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!C6.current){const e=new dme(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),C6.current=e}return C6.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),hme={...Ghe,...nhe,...hpe,...Bpe},nl=Uce((e,t)=>Ade(e,t,hme,Ipe,fme));function Q$(){const e=w.useRef(!1);return Q4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function pme(){const e=Q$(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Gs.postRender(r),[r]),t]}class mme extends w.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 gme({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),i=w.useRef({width:0,height:0,top:0,left:0});return w.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
||
[data-motion-pop-id="${n}"] {
|
||
position: absolute !important;
|
||
width: ${o}px !important;
|
||
height: ${a}px !important;
|
||
top: ${s}px !important;
|
||
left: ${l}px !important;
|
||
}
|
||
`),()=>{document.head.removeChild(u)}},[t]),w.createElement(mme,{isPresent:t,childRef:r,sizeRef:i},w.cloneElement(e,{ref:r}))}const _6=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=VS(vme),l=w.useId(),u=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:d=>{s.set(d,!0);for(const h of s.values())if(!h)return;r&&r()},register:d=>(s.set(d,!1),()=>s.delete(d))}),o?void 0:[n]);return w.useMemo(()=>{s.forEach((d,h)=>s.set(h,!1))},[n]),w.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=w.createElement(gme,{isPresent:n},e)),w.createElement(m0.Provider,{value:u},e)};function vme(){return new Map}const Fm=e=>e.key||"";function yme(e,t){e.forEach(n=>{const r=Fm(n);t.set(r,n)})}function bme(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const nf=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",_$(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=pme();const l=w.useContext(z8).forceRender;l&&(s=l);const u=Q$(),d=bme(e);let h=d;const g=new Set,v=w.useRef(h),b=w.useRef(new Map).current,S=w.useRef(!0);if(Q4(()=>{S.current=!1,yme(d,b),v.current=h}),X8(()=>{S.current=!0,b.clear(),g.clear()}),S.current)return w.createElement(w.Fragment,null,h.map(T=>w.createElement(_6,{key:Fm(T),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},T)));h=[...h];const E=v.current.map(Fm),_=d.map(Fm),k=E.length;for(let T=0;T<k;T++){const A=E[T];_.indexOf(A)===-1&&g.add(A)}return a==="wait"&&g.size&&(h=[]),g.forEach(T=>{if(_.indexOf(T)!==-1)return;const A=b.get(T);if(!A)return;const M=E.indexOf(T),R=()=>{b.delete(T),g.delete(T);const D=v.current.findIndex(j=>j.key===T);if(v.current.splice(D,1),!g.size){if(v.current=d,u.current===!1)return;s(),r&&r()}};h.splice(M,0,w.createElement(_6,{key:Fm(A),isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a},A))}),h=h.map(T=>{const A=T.key;return g.has(A)?T:w.createElement(_6,{key:Fm(T),isPresent:!0,presenceAffectsLayout:o,mode:a},T)}),C$!=="production"&&a==="wait"&&h.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.`),w.createElement(w.Fragment,null,g.size?h:h.map(T=>w.cloneElement(T)))};var zl=function(){return zl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},zl.apply(this,arguments)};function J$(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function v0(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{u(r.next(d))}catch(h){a(h)}}function l(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):i(d.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function y0(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function OO(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function z7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Sy=(...e)=>e.filter(Boolean).join(" ");function Sme(){return!1}var xme=e=>{const{condition:t,message:n}=e;t&&Sme()&&console.warn(n)},_h={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},G1={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 H7(e){switch((e==null?void 0:e.direction)??"right"){case"right":return G1.slideRight;case"left":return G1.slideLeft;case"bottom":return G1.slideDown;case"top":return G1.slideUp;default:return G1.slideRight}}var Ih={enter:{duration:.2,ease:_h.easeOut},exit:{duration:.1,ease:_h.easeIn}},qs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},wme=e=>e!=null&&parseInt(e.toString(),10)>0,MO={exit:{height:{duration:.2,ease:_h.ease},opacity:{duration:.3,ease:_h.ease}},enter:{height:{duration:.3,ease:_h.ease},opacity:{duration:.4,ease:_h.ease}}},Cme={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:wme(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(n==null?void 0:n.exit)??qs.exit(MO.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(n==null?void 0:n.enter)??qs.enter(MO.enter,i)})},eF=w.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:d,...h}=e,[g,v]=w.useState(!1);w.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),xme({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,S={startingHeight:o,endingHeight:a,animateOpacity:i,transition:g?u:{enter:{duration:0}},transitionEnd:{enter:d==null?void 0:d.enter,exit:r?d==null?void 0:d.exit:{...d==null?void 0:d.exit,display:b?"block":"none"}}},E=r?n:!0,_=n||r?"enter":"exit";return N.createElement(nf,{initial:!1,custom:S},E&&N.createElement(nl.div,{ref:t,...h,className:Sy("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:S,variants:Cme,initial:r?"exit":!1,animate:_,exit:"exit"}))});eF.displayName="Collapse";var _me={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:(e==null?void 0:e.enter)??qs.enter(Ih.enter,n),transitionEnd:t==null?void 0:t.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:(e==null?void 0:e.exit)??qs.exit(Ih.exit,n),transitionEnd:t==null?void 0:t.exit})},tF={initial:"exit",animate:"enter",exit:"exit",variants:_me},kme=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,d=i||r?"enter":"exit",h=r?i&&r:!0,g={transition:a,transitionEnd:s,delay:l};return N.createElement(nf,{custom:g},h&&N.createElement(nl.div,{ref:n,className:Sy("chakra-fade",o),custom:g,...tF,animate:d,...u}))});kme.displayName="Fade";var Eme={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(n==null?void 0:n.exit)??qs.exit(Ih.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:(t==null?void 0:t.enter)??qs.enter(Ih.enter,n),transitionEnd:e==null?void 0:e.enter})},nF={initial:"exit",animate:"enter",exit:"exit",variants:Eme},Pme=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:d,...h}=t,g=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:d};return N.createElement(nf,{custom:b},g&&N.createElement(nl.div,{ref:n,className:Sy("chakra-offset-slide",s),...nF,animate:v,custom:b,...h}))});Pme.displayName="ScaleFade";var IO={exit:{duration:.15,ease:_h.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Tme={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=H7({direction:e});return{...i,transition:(t==null?void 0:t.exit)??qs.exit(IO.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=H7({direction:e});return{...i,transition:(n==null?void 0:n.enter)??qs.enter(IO.enter,r),transitionEnd:t==null?void 0:t.enter}}},rF=w.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:d,motionProps:h,...g}=t,v=H7({direction:r}),b=Object.assign({position:"fixed"},v.position,i),S=o?a&&o:!0,E=a||o?"enter":"exit",_={transitionEnd:u,transition:l,direction:r,delay:d};return N.createElement(nf,{custom:_},S&&N.createElement(nl.div,{...g,ref:n,initial:"exit",className:Sy("chakra-slide",s),animate:E,exit:"exit",custom:_,variants:Tme,style:b,...h}))});rF.displayName="Slide";var Lme={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:(n==null?void 0:n.exit)??qs.exit(Ih.exit,i),transitionEnd:r==null?void 0:r.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:(e==null?void 0:e.enter)??qs.enter(Ih.enter,n),transitionEnd:t==null?void 0: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==null?void 0:n.exit)??qs.exit(Ih.exit,o),...i?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},V7={initial:"initial",animate:"enter",exit:"exit",variants:Lme},Ame=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:d,delay:h,...g}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",S={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:d,delay:h};return N.createElement(nf,{custom:S},v&&N.createElement(nl.div,{ref:n,className:Sy("chakra-offset-slide",a),custom:S,...V7,animate:b,...g}))});Ame.displayName="SlideFade";var xy=(...e)=>e.filter(Boolean).join(" ");function Ome(){return!1}var XS=e=>{const{condition:t,message:n}=e;t&&Ome()&&console.warn(n)};function k6(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Mme,ZS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[Ime,fk]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[Rme,qze,Dme,Nme]=$8(),Gm=Ee(function(t,n){const{getButtonProps:r}=fk(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...ZS().button};return N.createElement(Ce.button,{...i,className:xy("chakra-accordion__button",t.className),__css:a})});Gm.displayName="AccordionButton";function jme(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Fme(e),zme(e);const s=Dme(),[l,u]=w.useState(-1);w.useEffect(()=>()=>{u(-1)},[]);const[d,h]=$S({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:d,setIndex:h,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(d)?d.includes(v):d===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(d)){const _=E?d.concat(v):d.filter(k=>k!==v);h(_)}else E?h(v):o&&h(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Bme,hk]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function $me(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=hk(),s=w.useRef(null),l=w.useId(),u=r??l,d=`accordion-button-${u}`,h=`accordion-panel-${u}`;Hme(e);const{register:g,index:v,descendants:b}=Nme({disabled:t&&!n}),{isOpen:S,onChange:E}=o(v===-1?null:v);Vme({isOpen:S,isDisabled:t});const _=()=>{E==null||E(!0)},k=()=>{E==null||E(!1)},T=w.useCallback(()=>{E==null||E(!S),a(v)},[v,a,S,E]),A=w.useCallback(j=>{const H={ArrowDown:()=>{const K=b.nextEnabled(v);K==null||K.node.focus()},ArrowUp:()=>{const K=b.prevEnabled(v);K==null||K.node.focus()},Home:()=>{const K=b.firstEnabled();K==null||K.node.focus()},End:()=>{const K=b.lastEnabled();K==null||K.node.focus()}}[j.key];H&&(j.preventDefault(),H(j))},[b,v]),M=w.useCallback(()=>{a(v)},[a,v]),R=w.useCallback(function(F={},H=null){return{...F,type:"button",ref:Mn(g,s,H),id:d,disabled:!!t,"aria-expanded":!!S,"aria-controls":h,onClick:k6(F.onClick,T),onFocus:k6(F.onFocus,M),onKeyDown:k6(F.onKeyDown,A)}},[d,t,S,T,M,A,h,g]),D=w.useCallback(function(F={},H=null){return{...F,ref:H,role:"region",id:h,"aria-labelledby":d,hidden:!S}},[d,S,h]);return{isOpen:S,isDisabled:t,isFocusable:n,onOpen:_,onClose:k,getButtonProps:R,getPanelProps:D,htmlProps:i}}function Fme(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;XS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function zme(e){XS({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 Hme(e){XS({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 Vme(e){XS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function qm(e){const{isOpen:t,isDisabled:n}=fk(),{reduceMotion:r}=hk(),i=xy("chakra-accordion__icon",e.className),o=ZS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return N.createElement(Da,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e},N.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}))}qm.displayName="AccordionIcon";var Ym=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=$me(t),l={...ZS().container,overflowAnchor:"none"},u=w.useMemo(()=>a,[a]);return N.createElement(Ime,{value:u},N.createElement(Ce.div,{ref:n,...o,className:xy("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Ym.displayName="AccordionItem";var Km=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=hk(),{getPanelProps:s,isOpen:l}=fk(),u=s(o,n),d=xy("chakra-accordion__panel",r),h=ZS();a||delete u.hidden;const g=N.createElement(Ce.div,{...u,__css:h.panel,className:d});return a?g:N.createElement(eF,{in:l,...i},g)});Km.displayName="AccordionPanel";var pk=Ee(function({children:t,reduceMotion:n,...r},i){const o=Oi("Accordion",r),a=Sn(r),{htmlProps:s,descendants:l,...u}=jme(a),d=w.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return N.createElement(Rme,{value:l},N.createElement(Bme,{value:d},N.createElement(Mme,{value:o},N.createElement(Ce.div,{ref:i,...s,className:xy("chakra-accordion",r.className),__css:o.root},t))))});pk.displayName="Accordion";var Wme=(...e)=>e.filter(Boolean).join(" "),Ume=tf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),wy=Ee((e,t)=>{const n=Ao("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=Sn(e),u=Wme("chakra-spinner",s),d={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Ume} ${o} linear infinite`,...n};return N.createElement(Ce.div,{ref:t,__css:d,className:u,...l},r&&N.createElement(Ce.span,{srOnly:!0},r))});wy.displayName="Spinner";var QS=(...e)=>e.filter(Boolean).join(" ");function Gme(e){return N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("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 qme(e){return N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("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 RO(e){return N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("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[Yme,Kme]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[Xme,mk]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),iF={info:{icon:qme,colorScheme:"blue"},warning:{icon:RO,colorScheme:"orange"},success:{icon:Gme,colorScheme:"green"},error:{icon:RO,colorScheme:"red"},loading:{icon:wy,colorScheme:"blue"}};function Zme(e){return iF[e].colorScheme}function Qme(e){return iF[e].icon}var oF=Ee(function(t,n){const{status:r="info",addRole:i=!0,...o}=Sn(t),a=t.colorScheme??Zme(r),s=Oi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return N.createElement(Yme,{value:{status:r}},N.createElement(Xme,{value:s},N.createElement(Ce.div,{role:i?"alert":void 0,ref:n,...o,className:QS("chakra-alert",t.className),__css:l})))});oF.displayName="Alert";var aF=Ee(function(t,n){const i={display:"inline",...mk().description};return N.createElement(Ce.div,{ref:n,...t,className:QS("chakra-alert__desc",t.className),__css:i})});aF.displayName="AlertDescription";function sF(e){const{status:t}=Kme(),n=Qme(t),r=mk(),i=t==="loading"?r.spinner:r.icon;return N.createElement(Ce.span,{display:"inherit",...e,className:QS("chakra-alert__icon",e.className),__css:i},e.children||N.createElement(n,{h:"100%",w:"100%"}))}sF.displayName="AlertIcon";var lF=Ee(function(t,n){const r=mk();return N.createElement(Ce.div,{ref:n,...t,className:QS("chakra-alert__title",t.className),__css:r.title})});lF.displayName="AlertTitle";function Jme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ege(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,d]=w.useState("pending");w.useEffect(()=>{d(n?"loading":"pending")},[n]);const h=w.useRef(),g=w.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=S=>{v(),d("loaded"),i==null||i(S)},b.onerror=S=>{v(),d("failed"),o==null||o(S)},h.current=b},[n,a,r,s,i,o,t]),v=()=>{h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return Ws(()=>{if(!l)return u==="loading"&&g(),()=>{v()}},[u,g,l]),l?"loaded":u}var tge=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",c5=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return N.createElement("img",{width:r,height:i,ref:n,alt:o,...a})});c5.displayName="NativeImage";var JS=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:d,crossOrigin:h,fallbackStrategy:g="beforeLoadOrError",referrerPolicy:v,...b}=t,S=r!==void 0||i!==void 0,E=u!=null||d||!S,_=ege({...t,ignoreFallback:E}),k=tge(_,g),T={ref:n,objectFit:l,objectPosition:s,...E?b:Jme(b,["onError","onLoad"])};return k?i||N.createElement(Ce.img,{as:c5,className:"chakra-image__placeholder",src:r,...T}):N.createElement(Ce.img,{as:c5,src:o,srcSet:a,crossOrigin:h,loading:u,referrerPolicy:v,className:"chakra-image",...T})});JS.displayName="Image";Ee((e,t)=>N.createElement(Ce.img,{ref:t,as:c5,className:"chakra-image",...e}));function ex(e){return w.Children.toArray(e).filter(t=>w.isValidElement(t))}var tx=(...e)=>e.filter(Boolean).join(" "),DO=e=>e?"":void 0,[nge,rge]=xn({strict:!1,name:"ButtonGroupContext"});function W7(e){const{children:t,className:n,...r}=e,i=w.isValidElement(t)?w.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=tx("chakra-button__icon",n);return N.createElement(Ce.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}W7.displayName="ButtonIcon";function d5(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=N.createElement(wy,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=tx("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",d=w.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return N.createElement(Ce.div,{className:l,...s,__css:d},i)}d5.displayName="ButtonSpinner";function ige(e){const[t,n]=w.useState(!e);return{ref:w.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var as=Ee((e,t)=>{const n=rge(),r=Ao("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:d,iconSpacing:h="0.5rem",type:g,spinner:v,spinnerPlacement:b="start",className:S,as:E,..._}=Sn(e),k=w.useMemo(()=>{const R={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:A}=ige(E),M={rightIcon:u,leftIcon:l,iconSpacing:h,children:s};return N.createElement(Ce.button,{disabled:i||o,ref:Ece(t,T),as:E,type:g??A,"data-active":DO(a),"data-loading":DO(o),__css:k,className:tx("chakra-button",S),..._},o&&b==="start"&&N.createElement(d5,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:h},v),o?d||N.createElement(Ce.span,{opacity:0},N.createElement(NO,{...M})):N.createElement(NO,{...M}),o&&b==="end"&&N.createElement(d5,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:h},v))});as.displayName="Button";function NO(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return N.createElement(N.Fragment,null,t&&N.createElement(W7,{marginEnd:i},t),r,n&&N.createElement(W7,{marginStart:i},n))}var Gi=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...d}=t,h=tx("chakra-button__group",a),g=w.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}},N.createElement(nge,{value:g},N.createElement(Ce.div,{ref:n,role:"group",__css:v,className:h,"data-attached":l?"":void 0,...d}))});Gi.displayName="ButtonGroup";var ss=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=w.isValidElement(s)?w.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return N.createElement(as,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a},l)});ss.displayName="IconButton";var b0=(...e)=>e.filter(Boolean).join(" "),nb=e=>e?"":void 0,E6=e=>e?!0:void 0;function jO(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[oge,uF]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[age,S0]=xn({strict:!1,name:"FormControlContext"});function sge(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=w.useId(),l=t||`field-${s}`,u=`${l}-label`,d=`${l}-feedback`,h=`${l}-helptext`,[g,v]=w.useState(!1),[b,S]=w.useState(!1),[E,_]=w.useState(!1),k=w.useCallback((D={},j=null)=>({id:h,...D,ref:Mn(j,F=>{F&&S(!0)})}),[h]),T=w.useCallback((D={},j=null)=>({...D,ref:j,"data-focus":nb(E),"data-disabled":nb(i),"data-invalid":nb(r),"data-readonly":nb(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,E,r,o,u]),A=w.useCallback((D={},j=null)=>({id:d,...D,ref:Mn(j,F=>{F&&v(!0)}),"aria-live":"polite"}),[d]),M=w.useCallback((D={},j=null)=>({...D,...a,ref:j,role:"group"}),[a]),R=w.useCallback((D={},j=null)=>({...D,ref:j,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>_(!0),onBlur:()=>_(!1),hasFeedbackText:g,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:S,id:l,labelId:u,feedbackId:d,helpTextId:h,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:A,getRootProps:M,getLabelProps:T,getRequiredIndicatorProps:R}}var dn=Ee(function(t,n){const r=Oi("Form",t),i=Sn(t),{getRootProps:o,htmlProps:a,...s}=sge(i),l=b0("chakra-form-control",t.className);return N.createElement(age,{value:s},N.createElement(oge,{value:r},N.createElement(Ce.div,{...o({},n),className:l,__css:r.container})))});dn.displayName="FormControl";var lr=Ee(function(t,n){const r=S0(),i=uF(),o=b0("chakra-form__helper-text",t.className);return N.createElement(Ce.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});lr.displayName="FormHelperText";function gk(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=vk(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":E6(n),"aria-required":E6(i),"aria-readonly":E6(r)}}function vk(e){const t=S0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:d,onBlur:h,...g}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t!=null&&t.hasFeedbackText&&(t!=null&&t.isInvalid)&&v.push(t.feedbackId),t!=null&&t.hasHelpText&&v.push(t.helpTextId),{...g,"aria-describedby":v.join(" ")||void 0,id:n??(t==null?void 0:t.id),isDisabled:r??u??(t==null?void 0:t.isDisabled),isReadOnly:i??l??(t==null?void 0:t.isReadOnly),isRequired:o??a??(t==null?void 0:t.isRequired),isInvalid:s??(t==null?void 0:t.isInvalid),onFocus:jO(t==null?void 0:t.onFocus,d),onBlur:jO(t==null?void 0:t.onBlur,h)}}var[lge,uge]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),ur=Ee((e,t)=>{const n=Oi("FormError",e),r=Sn(e),i=S0();return i!=null&&i.isInvalid?N.createElement(lge,{value:n},N.createElement(Ce.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:b0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});ur.displayName="FormErrorMessage";var cge=Ee((e,t)=>{const n=uge(),r=S0();if(!(r!=null&&r.isInvalid))return null;const i=b0("chakra-form__error-icon",e.className);return N.createElement(Da,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i},N.createElement("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"}))});cge.displayName="FormErrorIcon";var Pn=Ee(function(t,n){const r=Ao("FormLabel",t),i=Sn(t),{className:o,children:a,requiredIndicator:s=N.createElement(cF,null),optionalIndicator:l=null,...u}=i,d=S0(),h=(d==null?void 0:d.getLabelProps(u,n))??{ref:n,...u};return N.createElement(Ce.label,{...h,className:b0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,d!=null&&d.isRequired?s:l)});Pn.displayName="FormLabel";var cF=Ee(function(t,n){const r=S0(),i=uF();if(!(r!=null&&r.isRequired))return null;const o=b0("chakra-form__required-indicator",t.className);return N.createElement(Ce.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});cF.displayName="RequiredIndicator";function su(e,t){const n=w.useRef(!1),r=w.useRef(!1);w.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),w.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var yk={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},dge=Ce("span",{baseStyle:yk});dge.displayName="VisuallyHidden";var fge=Ce("input",{baseStyle:yk});fge.displayName="VisuallyHiddenInput";var BO=!1,nx=null,Gg=!1,U7=new Set,hge=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function pge(e){return!(e.metaKey||!hge&&e.altKey||e.ctrlKey)}function bk(e,t){U7.forEach(n=>n(e,t))}function $O(e){Gg=!0,pge(e)&&(nx="keyboard",bk("keyboard",e))}function _m(e){nx="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Gg=!0,bk("pointer",e))}function mge(e){e.target===window||e.target===document||(Gg||(nx="keyboard",bk("keyboard",e)),Gg=!1)}function gge(){Gg=!1}function FO(){return nx!=="pointer"}function vge(){if(typeof window>"u"||BO)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Gg=!0,e.apply(this,n)},document.addEventListener("keydown",$O,!0),document.addEventListener("keyup",$O,!0),window.addEventListener("focus",mge,!0),window.addEventListener("blur",gge,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",_m,!0),document.addEventListener("pointermove",_m,!0),document.addEventListener("pointerup",_m,!0)):(document.addEventListener("mousedown",_m,!0),document.addEventListener("mousemove",_m,!0),document.addEventListener("mouseup",_m,!0)),BO=!0}function yge(e){vge(),e(FO());const t=()=>e(FO());return U7.add(t),()=>{U7.delete(t)}}var[Yze,bge]=xn({name:"CheckboxGroupContext",strict:!1}),Sge=(...e)=>e.filter(Boolean).join(" "),bo=e=>e?"":void 0;function Ya(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function xge(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function wge(e){return N.createElement(Ce.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},N.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Cge(e){return N.createElement(Ce.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},N.createElement("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function _ge(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Cge:wge;return n||t?N.createElement(Ce.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},N.createElement(i,{...r})):null}function kge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dF(e={}){const t=vk(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:d,isChecked:h,isFocusable:g,onChange:v,isIndeterminate:b,name:S,value:E,tabIndex:_=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":A,...M}=e,R=kge(M,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=br(v),j=br(s),F=br(l),[H,K]=w.useState(!1),[te,G]=w.useState(!1),[$,U]=w.useState(!1),[X,Z]=w.useState(!1);w.useEffect(()=>yge(K),[]);const W=w.useRef(null),[Q,re]=w.useState(!0),[de,ve]=w.useState(!!d),Pe=h!==void 0,be=Pe?h:de,He=w.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Pe||ve(be?Ae.target.checked:b?!0:Ae.target.checked),D==null||D(Ae)},[r,n,be,Pe,b,D]);Ws(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),su(()=>{n&&G(!1)},[n,G]),Ws(()=>{const Ae=W.current;Ae!=null&&Ae.form&&(Ae.form.onreset=()=>{ve(!!d)})},[]);const Oe=n&&!g,ot=w.useCallback(Ae=>{Ae.key===" "&&Z(!0)},[Z]),Ve=w.useCallback(Ae=>{Ae.key===" "&&Z(!1)},[Z]);Ws(()=>{if(!W.current)return;W.current.checked!==be&&ve(W.current.checked)},[W.current]);const Be=w.useCallback((Ae={},lt=null)=>{const Mt=ut=>{te&&ut.preventDefault(),Z(!0)};return{...Ae,ref:lt,"data-active":bo(X),"data-hover":bo($),"data-checked":bo(be),"data-focus":bo(te),"data-focus-visible":bo(te&&H),"data-indeterminate":bo(b),"data-disabled":bo(n),"data-invalid":bo(o),"data-readonly":bo(r),"aria-hidden":!0,onMouseDown:Ya(Ae.onMouseDown,Mt),onMouseUp:Ya(Ae.onMouseUp,()=>Z(!1)),onMouseEnter:Ya(Ae.onMouseEnter,()=>U(!0)),onMouseLeave:Ya(Ae.onMouseLeave,()=>U(!1))}},[X,be,n,te,H,$,b,o,r]),wt=w.useCallback((Ae={},lt=null)=>({...R,...Ae,ref:Mn(lt,Mt=>{Mt&&re(Mt.tagName==="LABEL")}),onClick:Ya(Ae.onClick,()=>{var Mt;Q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var ut;(ut=W.current)==null||ut.focus()}))}),"data-disabled":bo(n),"data-checked":bo(be),"data-invalid":bo(o)}),[R,n,be,o,Q]),st=w.useCallback((Ae={},lt=null)=>({...Ae,ref:Mn(W,lt),type:"checkbox",name:S,value:E,id:a,tabIndex:_,onChange:Ya(Ae.onChange,He),onBlur:Ya(Ae.onBlur,j,()=>G(!1)),onFocus:Ya(Ae.onFocus,F,()=>G(!0)),onKeyDown:Ya(Ae.onKeyDown,ot),onKeyUp:Ya(Ae.onKeyUp,Ve),required:i,checked:be,disabled:Oe,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":A?Boolean(A):o,"aria-describedby":u,"aria-disabled":n,style:yk}),[S,E,a,He,j,F,ot,Ve,i,be,Oe,r,k,T,A,o,u,n,_]),gt=w.useCallback((Ae={},lt=null)=>({...Ae,ref:lt,onMouseDown:Ya(Ae.onMouseDown,zO),onTouchStart:Ya(Ae.onTouchStart,zO),"data-disabled":bo(n),"data-checked":bo(be),"data-invalid":bo(o)}),[be,n,o]);return{state:{isInvalid:o,isFocused:te,isChecked:be,isActive:X,isHovered:$,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:wt,getCheckboxProps:Be,getInputProps:st,getLabelProps:gt,htmlProps:R}}function zO(e){e.preventDefault(),e.stopPropagation()}var Ege={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Pge={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Tge=tf({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Lge=tf({from:{opacity:0},to:{opacity:1}}),Age=tf({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),fF=Ee(function(t,n){const r=bge(),i={...r,...t},o=Oi("Checkbox",i),a=Sn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:d,iconSize:h,icon:g=N.createElement(_ge,null),isChecked:v,isDisabled:b=r==null?void 0:r.isDisabled,onChange:S,inputProps:E,..._}=a;let k=v;r!=null&&r.value&&a.value&&(k=r.value.includes(a.value));let T=S;r!=null&&r.onChange&&a.value&&(T=xge(r.onChange,S));const{state:A,getInputProps:M,getCheckboxProps:R,getLabelProps:D,getRootProps:j}=dF({..._,isDisabled:b,isChecked:k,onChange:T}),F=w.useMemo(()=>({animation:A.isIndeterminate?`${Lge} 20ms linear, ${Age} 200ms linear`:`${Tge} 200ms linear`,fontSize:h,color:d,...o.icon}),[d,h,,A.isIndeterminate,o.icon]),H=w.cloneElement(g,{__css:F,isIndeterminate:A.isIndeterminate,isChecked:A.isChecked});return N.createElement(Ce.label,{__css:{...Pge,...o.container},className:Sge("chakra-checkbox",l),...j()},N.createElement("input",{className:"chakra-checkbox__input",...M(E,n)}),N.createElement(Ce.span,{__css:{...Ege,...o.control},className:"chakra-checkbox__control",...R()},H),u&&N.createElement(Ce.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});fF.displayName="Checkbox";function Oge(e){return N.createElement(Da,{focusable:"false","aria-hidden":!0,...e},N.createElement("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 rx=Ee(function(t,n){const r=Ao("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Sn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return N.createElement(Ce.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||N.createElement(Oge,{width:"1em",height:"1em"}))});rx.displayName="CloseButton";function Mge(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function Sk(e,t){let n=Mge(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function G7(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 f5(e,t,n){return(e-t)*100/(n-t)}function hF(e,t,n){return(n-t)*e+t}function q7(e,t,n){const r=Math.round((e-t)/n)*n+t,i=G7(n);return Sk(r,i)}function kg(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function Ige(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,keepWithinRange:l=!0}=e,u=br(t),[d,h]=w.useState(()=>r==null?"":P6(r,o,n)??""),g=typeof i<"u",v=g?i:d,b=pF(fd(v),o),S=n??b,E=w.useCallback(H=>{H!==v&&(g||h(H.toString()),u==null||u(H.toString(),fd(H)))},[u,g,v]),_=w.useCallback(H=>{let K=H;return l&&(K=kg(K,a,s)),Sk(K,S)},[S,l,s,a]),k=w.useCallback((H=o)=>{let K;v===""?K=fd(H):K=fd(v)+H,K=_(K),E(K)},[_,o,E,v]),T=w.useCallback((H=o)=>{let K;v===""?K=fd(-H):K=fd(v)-H,K=_(K),E(K)},[_,o,E,v]),A=w.useCallback(()=>{let H;r==null?H="":H=P6(r,o,n)??a,E(H)},[r,n,o,E,a]),M=w.useCallback(H=>{const K=P6(H,o,S)??a;E(K)},[S,o,E,a]),R=fd(v);return{isOutOfRange:R>s||R<a,isAtMax:R===s,isAtMin:R===a,precision:S,value:v,valueAsNumber:R,update:E,reset:A,increment:k,decrement:T,clamp:_,cast:M,setValue:h}}function fd(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function pF(e,t){return Math.max(G7(t),G7(e))}function P6(e,t,n){const r=fd(e);if(Number.isNaN(r))return;const i=pF(r,t);return Sk(r,n??i)}var mF=`
|
||
:root {
|
||
--chakra-vh: 100vh;
|
||
}
|
||
|
||
@supports (height: -webkit-fill-available) {
|
||
:root {
|
||
--chakra-vh: -webkit-fill-available;
|
||
}
|
||
}
|
||
|
||
@supports (height: -moz-fill-available) {
|
||
:root {
|
||
--chakra-vh: -moz-fill-available;
|
||
}
|
||
}
|
||
|
||
@supports (height: 100dvh) {
|
||
:root {
|
||
--chakra-vh: 100dvh;
|
||
}
|
||
}
|
||
`,Rge=()=>N.createElement(DS,{styles:mF}),Dge=()=>N.createElement(DS,{styles:`
|
||
html {
|
||
line-height: 1.5;
|
||
-webkit-text-size-adjust: 100%;
|
||
font-family: system-ui, sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizeLegibility;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
touch-action: manipulation;
|
||
}
|
||
|
||
body {
|
||
position: relative;
|
||
min-height: 100%;
|
||
font-feature-settings: 'kern';
|
||
}
|
||
|
||
*,
|
||
*::before,
|
||
*::after {
|
||
border-width: 0;
|
||
border-style: solid;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
main {
|
||
display: block;
|
||
}
|
||
|
||
hr {
|
||
border-top-width: 1px;
|
||
box-sizing: content-box;
|
||
height: 0;
|
||
overflow: visible;
|
||
}
|
||
|
||
pre,
|
||
code,
|
||
kbd,
|
||
samp {
|
||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||
font-size: 1em;
|
||
}
|
||
|
||
a {
|
||
background-color: transparent;
|
||
color: inherit;
|
||
text-decoration: inherit;
|
||
}
|
||
|
||
abbr[title] {
|
||
border-bottom: none;
|
||
text-decoration: underline;
|
||
-webkit-text-decoration: underline dotted;
|
||
text-decoration: underline dotted;
|
||
}
|
||
|
||
b,
|
||
strong {
|
||
font-weight: bold;
|
||
}
|
||
|
||
small {
|
||
font-size: 80%;
|
||
}
|
||
|
||
sub,
|
||
sup {
|
||
font-size: 75%;
|
||
line-height: 0;
|
||
position: relative;
|
||
vertical-align: baseline;
|
||
}
|
||
|
||
sub {
|
||
bottom: -0.25em;
|
||
}
|
||
|
||
sup {
|
||
top: -0.5em;
|
||
}
|
||
|
||
img {
|
||
border-style: none;
|
||
}
|
||
|
||
button,
|
||
input,
|
||
optgroup,
|
||
select,
|
||
textarea {
|
||
font-family: inherit;
|
||
font-size: 100%;
|
||
line-height: 1.15;
|
||
margin: 0;
|
||
}
|
||
|
||
button,
|
||
input {
|
||
overflow: visible;
|
||
}
|
||
|
||
button,
|
||
select {
|
||
text-transform: none;
|
||
}
|
||
|
||
button::-moz-focus-inner,
|
||
[type="button"]::-moz-focus-inner,
|
||
[type="reset"]::-moz-focus-inner,
|
||
[type="submit"]::-moz-focus-inner {
|
||
border-style: none;
|
||
padding: 0;
|
||
}
|
||
|
||
fieldset {
|
||
padding: 0.35em 0.75em 0.625em;
|
||
}
|
||
|
||
legend {
|
||
box-sizing: border-box;
|
||
color: inherit;
|
||
display: table;
|
||
max-width: 100%;
|
||
padding: 0;
|
||
white-space: normal;
|
||
}
|
||
|
||
progress {
|
||
vertical-align: baseline;
|
||
}
|
||
|
||
textarea {
|
||
overflow: auto;
|
||
}
|
||
|
||
[type="checkbox"],
|
||
[type="radio"] {
|
||
box-sizing: border-box;
|
||
padding: 0;
|
||
}
|
||
|
||
[type="number"]::-webkit-inner-spin-button,
|
||
[type="number"]::-webkit-outer-spin-button {
|
||
-webkit-appearance: none !important;
|
||
}
|
||
|
||
input[type="number"] {
|
||
-moz-appearance: textfield;
|
||
}
|
||
|
||
[type="search"] {
|
||
-webkit-appearance: textfield;
|
||
outline-offset: -2px;
|
||
}
|
||
|
||
[type="search"]::-webkit-search-decoration {
|
||
-webkit-appearance: none !important;
|
||
}
|
||
|
||
::-webkit-file-upload-button {
|
||
-webkit-appearance: button;
|
||
font: inherit;
|
||
}
|
||
|
||
details {
|
||
display: block;
|
||
}
|
||
|
||
summary {
|
||
display: list-item;
|
||
}
|
||
|
||
template {
|
||
display: none;
|
||
}
|
||
|
||
[hidden] {
|
||
display: none !important;
|
||
}
|
||
|
||
body,
|
||
blockquote,
|
||
dl,
|
||
dd,
|
||
h1,
|
||
h2,
|
||
h3,
|
||
h4,
|
||
h5,
|
||
h6,
|
||
hr,
|
||
figure,
|
||
p,
|
||
pre {
|
||
margin: 0;
|
||
}
|
||
|
||
button {
|
||
background: transparent;
|
||
padding: 0;
|
||
}
|
||
|
||
fieldset {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
ol,
|
||
ul {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
textarea {
|
||
resize: vertical;
|
||
}
|
||
|
||
button,
|
||
[role="button"] {
|
||
cursor: pointer;
|
||
}
|
||
|
||
button::-moz-focus-inner {
|
||
border: 0 !important;
|
||
}
|
||
|
||
table {
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
h1,
|
||
h2,
|
||
h3,
|
||
h4,
|
||
h5,
|
||
h6 {
|
||
font-size: inherit;
|
||
font-weight: inherit;
|
||
}
|
||
|
||
button,
|
||
input,
|
||
optgroup,
|
||
select,
|
||
textarea {
|
||
padding: 0;
|
||
line-height: inherit;
|
||
color: inherit;
|
||
}
|
||
|
||
img,
|
||
svg,
|
||
video,
|
||
canvas,
|
||
audio,
|
||
iframe,
|
||
embed,
|
||
object {
|
||
display: block;
|
||
}
|
||
|
||
img,
|
||
video {
|
||
max-width: 100%;
|
||
height: auto;
|
||
}
|
||
|
||
[data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {
|
||
outline: none;
|
||
box-shadow: none;
|
||
}
|
||
|
||
select::-ms-expand {
|
||
display: none;
|
||
}
|
||
|
||
${mF}
|
||
`});function Rh(e,t,n,r){const i=br(n);return w.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==null||o.removeEventListener(t,i,r)}}function Nge(e){return"current"in e}var gF=()=>typeof window<"u";function jge(){const e=navigator.userAgentData;return(e==null?void 0:e.platform)??navigator.platform}var Bge=e=>gF()&&e.test(navigator.vendor),$ge=e=>gF()&&e.test(jge()),Fge=()=>$ge(/mac|iphone|ipad|ipod/i),zge=()=>Fge()&&Bge(/apple/i);function Hge(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Rh(i,"pointerdown",o=>{if(!zge()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const d=Nge(u)?u.current:u;return(d==null?void 0:d.contains(a))||d===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Vge=Ire?w.useLayoutEffect:w.useEffect;function HO(e,t=[]){const n=w.useRef(e);return Vge(()=>{n.current=e}),w.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Wge(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Uge(e,t){const n=w.useId();return w.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Wh(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=HO(n),a=HO(t),[s,l]=w.useState(e.defaultIsOpen||!1),[u,d]=Wge(r,s),h=Uge(i,"disclosure"),g=w.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),v=w.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),b=w.useCallback(()=>{(d?g:v)()},[d,v,g]);return{isOpen:!!d,onOpen:v,onClose:g,onToggle:b,isControlled:u,getButtonProps:(S={})=>({...S,"aria-expanded":d,"aria-controls":h,onClick:Rre(S.onClick,b)}),getDisclosureProps:(S={})=>({...S,hidden:!d,id:h})}}function xk(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var wk=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Oi("Input",i),a=Sn(i),s=gk(a),l=Qr("chakra-input",t.className);return N.createElement(Ce.input,{size:r,...s,__css:o.field,ref:n,className:l})});wk.displayName="Input";wk.id="Input";var[Gge,vF]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),qge=Ee(function(t,n){const r=Oi("Input",t),{children:i,className:o,...a}=Sn(t),s=Qr("chakra-input__group",o),l={},u=ex(i),d=r.field;u.forEach(g=>{r&&(d&&g.type.id==="InputLeftElement"&&(l.paddingStart=d.height??d.h),d&&g.type.id==="InputRightElement"&&(l.paddingEnd=d.height??d.h),g.type.id==="InputRightAddon"&&(l.borderEndRadius=0),g.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const h=u.map(g=>{var v,b;const S=xk({size:((v=g.props)==null?void 0:v.size)||t.size,variant:((b=g.props)==null?void 0:b.variant)||t.variant});return g.type.id!=="Input"?w.cloneElement(g,S):w.cloneElement(g,Object.assign(S,l,g.props))});return N.createElement(Ce.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},N.createElement(Gge,{value:r},h))});qge.displayName="InputGroup";var Yge={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Kge=Ce("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),Ck=Ee(function(t,n){const{placement:r="left",...i}=t,o=Yge[r]??{},a=vF();return N.createElement(Kge,{ref:n,...i,__css:{...a.addon,...o}})});Ck.displayName="InputAddon";var yF=Ee(function(t,n){return N.createElement(Ck,{ref:n,placement:"left",...t,className:Qr("chakra-input__left-addon",t.className)})});yF.displayName="InputLeftAddon";yF.id="InputLeftAddon";var bF=Ee(function(t,n){return N.createElement(Ck,{ref:n,placement:"right",...t,className:Qr("chakra-input__right-addon",t.className)})});bF.displayName="InputRightAddon";bF.id="InputRightAddon";var Xge=Ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),ix=Ee(function(t,n){const{placement:r="left",...i}=t,o=vF(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:(a==null?void 0:a.height)??(a==null?void 0:a.h),height:(a==null?void 0:a.height)??(a==null?void 0:a.h),fontSize:a==null?void 0:a.fontSize,...o.element};return N.createElement(Xge,{ref:n,__css:l,...i})});ix.id="InputElement";ix.displayName="InputElement";var SF=Ee(function(t,n){const{className:r,...i}=t,o=Qr("chakra-input__left-element",r);return N.createElement(ix,{ref:n,placement:"left",className:o,...i})});SF.id="InputLeftElement";SF.displayName="InputLeftElement";var xF=Ee(function(t,n){const{className:r,...i}=t,o=Qr("chakra-input__right-element",r);return N.createElement(ix,{ref:n,placement:"right",className:o,...i})});xF.id="InputRightElement";xF.displayName="InputRightElement";function Zge(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Wd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Zge(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Qge=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=w.Children.only(r),s=Qr("chakra-aspect-ratio",i);return N.createElement(Ce.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:Wd(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)});Qge.displayName="AspectRatio";var Jge=Ee(function(t,n){const r=Ao("Badge",t),{className:i,...o}=Sn(t);return N.createElement(Ce.span,{ref:n,className:Qr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Jge.displayName="Badge";var ko=Ce("div");ko.displayName="Box";var wF=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return N.createElement(ko,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});wF.displayName="Square";var e0e=Ee(function(t,n){const{size:r,...i}=t;return N.createElement(wF,{size:r,ref:n,borderRadius:"9999px",...i})});e0e.displayName="Circle";var CF=Ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});CF.displayName="Center";var t0e={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return N.createElement(Ce.div,{ref:n,__css:t0e[r],...i,position:"absolute"})});var n0e=Ee(function(t,n){const r=Ao("Code",t),{className:i,...o}=Sn(t);return N.createElement(Ce.code,{ref:n,className:Qr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});n0e.displayName="Code";var r0e=Ee(function(t,n){const{className:r,centerContent:i,...o}=Sn(t),a=Ao("Container",t);return N.createElement(Ce.div,{ref:n,className:Qr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});r0e.displayName="Container";var i0e=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...d}=Ao("Divider",t),{className:h,orientation:g="horizontal",__css:v,...b}=Sn(t),S={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return N.createElement(Ce.hr,{ref:n,"aria-orientation":g,...b,__css:{...d,border:"0",borderColor:u,borderStyle:l,...S[g],...v},className:Qr("chakra-divider",h)})});i0e.displayName="Divider";var Ge=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...d}=t,h={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return N.createElement(Ce.div,{ref:n,__css:h,...d})});Ge.displayName="Flex";var _F=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:d,templateRows:h,autoColumns:g,templateColumns:v,...b}=t,S={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:g,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:d,gridTemplateRows:h,gridTemplateColumns:v};return N.createElement(Ce.div,{ref:n,__css:S,...b})});_F.displayName="Grid";function VO(e){return Wd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var o0e=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...d}=t,h=xk({gridArea:r,gridColumn:VO(i),gridRow:VO(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return N.createElement(Ce.div,{ref:n,__css:h,...d})});o0e.displayName="GridItem";var Dh=Ee(function(t,n){const r=Ao("Heading",t),{className:i,...o}=Sn(t);return N.createElement(Ce.h2,{ref:n,className:Qr("chakra-heading",t.className),...o,__css:r})});Dh.displayName="Heading";Ee(function(t,n){const r=Ao("Mark",t),i=Sn(t);return N.createElement(ko,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var a0e=Ee(function(t,n){const r=Ao("Kbd",t),{className:i,...o}=Sn(t);return N.createElement(Ce.kbd,{ref:n,className:Qr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});a0e.displayName="Kbd";var Nh=Ee(function(t,n){const r=Ao("Link",t),{className:i,isExternal:o,...a}=Sn(t);return N.createElement(Ce.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Qr("chakra-link",i),...a,__css:r})});Nh.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return N.createElement(Ce.a,{...s,ref:n,className:Qr("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%"}}})});Ee(function(t,n){const{className:r,...i}=t;return N.createElement(Ce.div,{ref:n,position:"relative",...i,className:Qr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[s0e,kF]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),_k=Ee(function(t,n){const r=Oi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=Sn(t),u=ex(i),h=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return N.createElement(s0e,{value:r},N.createElement(Ce.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...h},...l},u))});_k.displayName="List";var l0e=Ee((e,t)=>{const{as:n,...r}=e;return N.createElement(_k,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});l0e.displayName="OrderedList";var u0e=Ee(function(t,n){const{as:r,...i}=t;return N.createElement(_k,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});u0e.displayName="UnorderedList";var c0e=Ee(function(t,n){const r=kF();return N.createElement(Ce.li,{ref:n,...t,__css:r.item})});c0e.displayName="ListItem";var d0e=Ee(function(t,n){const r=kF();return N.createElement(Da,{ref:n,role:"presentation",...t,__css:r.icon})});d0e.displayName="ListIcon";var f0e=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=rp(),d=s?p0e(s,u):m0e(r);return N.createElement(_F,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:d,...l})});f0e.displayName="SimpleGrid";function h0e(e){return typeof e=="number"?`${e}px`:e}function p0e(e,t){return Wd(e,n=>{const r=mce("sizes",n,h0e(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function m0e(e){return Wd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var EF=Ce("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});EF.displayName="Spacer";var Y7="& > *:not(style) ~ *:not(style)";function g0e(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,[Y7]:Wd(n,i=>r[i])}}function v0e(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{"&":Wd(n,i=>r[i])}}var PF=e=>N.createElement(Ce.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});PF.displayName="StackItem";var kk=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:d,shouldWrapChildren:h,...g}=e,v=n?"row":r??"column",b=w.useMemo(()=>g0e({direction:v,spacing:a}),[v,a]),S=w.useMemo(()=>v0e({spacing:a,direction:v}),[a,v]),E=!!u,_=!h&&!E,k=w.useMemo(()=>{const A=ex(l);return _?A:A.map((M,R)=>{const D=typeof M.key<"u"?M.key:R,j=R+1===A.length,H=h?N.createElement(PF,{key:D},M):M;if(!E)return H;const K=w.cloneElement(u,{__css:S}),te=j?null:K;return N.createElement(w.Fragment,{key:D},H,te)})},[u,S,E,_,h,l]),T=Qr("chakra-stack",d);return N.createElement(Ce.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[Y7]:b[Y7]},...g},k)});kk.displayName="Stack";var Cy=Ee((e,t)=>N.createElement(kk,{align:"center",...e,direction:"row",ref:t}));Cy.displayName="HStack";var yn=Ee((e,t)=>N.createElement(kk,{align:"center",...e,direction:"column",ref:t}));yn.displayName="VStack";var fn=Ee(function(t,n){const r=Ao("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=Sn(t),u=xk({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return N.createElement(Ce.p,{ref:n,className:Qr("chakra-text",t.className),...u,...l,__css:r})});fn.displayName="Text";function WO(e){return typeof e=="number"?`${e}px`:e}var y0e=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:d,shouldWrapChildren:h,...g}=t,v=w.useMemo(()=>{const{spacingX:S=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":_=>Wd(S,k=>WO(r7("space",k)(_))),"--chakra-wrap-y-spacing":_=>Wd(E,k=>WO(r7("space",k)(_))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=w.useMemo(()=>h?w.Children.map(a,(S,E)=>N.createElement(TF,{key:E},S)):a,[a,h]);return N.createElement(Ce.div,{ref:n,className:Qr("chakra-wrap",d),overflow:"hidden",...g},N.createElement(Ce.ul,{className:"chakra-wrap__list",__css:v},b))});y0e.displayName="Wrap";var TF=Ee(function(t,n){const{className:r,...i}=t;return N.createElement(Ce.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Qr("chakra-wrap__listitem",r),...i})});TF.displayName="WrapItem";var b0e={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[]}}}},LF=b0e,km=()=>{},S0e={document:LF,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:km,removeEventListener:km,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:km,removeListener:km}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:km,setInterval:()=>0,clearInterval:km},x0e=S0e,w0e={window:x0e,document:LF},AF=typeof window<"u"?{window,document}:w0e,OF=w.createContext(AF);OF.displayName="EnvironmentContext";function MF(e){const{children:t,environment:n}=e,[r,i]=w.useState(null),[o,a]=w.useState(!1);w.useEffect(()=>a(!0),[]);const s=w.useMemo(()=>{if(n)return n;const l=r==null?void 0:r.ownerDocument,u=r==null?void 0:r.ownerDocument.defaultView;return l?{document:l,window:u}:AF},[r,n]);return N.createElement(OF.Provider,{value:s},t,!n&&o&&N.createElement("span",{id:"__chakra_env",hidden:!0,ref:l=>{w.startTransition(()=>{l&&i(l)})}}))}MF.displayName="EnvironmentProvider";var C0e=e=>e?"":void 0;function _0e(){const e=w.useRef(new Map),t=e.current,n=w.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=w.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return w.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function T6(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function IF(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:d,tabIndex:h,onMouseOver:g,onMouseLeave:v,...b}=e,[S,E]=w.useState(!0),[_,k]=w.useState(!1),T=_0e(),A=Z=>{Z&&Z.tagName!=="BUTTON"&&E(!1)},M=S?h:h||0,R=n&&!r,D=w.useCallback(Z=>{if(n){Z.stopPropagation(),Z.preventDefault();return}Z.currentTarget.focus(),l==null||l(Z)},[n,l]),j=w.useCallback(Z=>{_&&T6(Z)&&(Z.preventDefault(),Z.stopPropagation(),k(!1),T.remove(document,"keyup",j,!1))},[_,T]),F=w.useCallback(Z=>{if(u==null||u(Z),n||Z.defaultPrevented||Z.metaKey||!T6(Z.nativeEvent)||S)return;const W=i&&Z.key==="Enter";o&&Z.key===" "&&(Z.preventDefault(),k(!0)),W&&(Z.preventDefault(),Z.currentTarget.click()),T.add(document,"keyup",j,!1)},[n,S,u,i,o,T,j]),H=w.useCallback(Z=>{if(d==null||d(Z),n||Z.defaultPrevented||Z.metaKey||!T6(Z.nativeEvent)||S)return;o&&Z.key===" "&&(Z.preventDefault(),k(!1),Z.currentTarget.click())},[o,S,n,d]),K=w.useCallback(Z=>{Z.button===0&&(k(!1),T.remove(document,"mouseup",K,!1))},[T]),te=w.useCallback(Z=>{if(Z.button!==0)return;if(n){Z.stopPropagation(),Z.preventDefault();return}S||k(!0),Z.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",K,!1),a==null||a(Z)},[n,S,a,T,K]),G=w.useCallback(Z=>{Z.button===0&&(S||k(!1),s==null||s(Z))},[s,S]),$=w.useCallback(Z=>{if(n){Z.preventDefault();return}g==null||g(Z)},[n,g]),U=w.useCallback(Z=>{_&&(Z.preventDefault(),k(!1)),v==null||v(Z)},[_,v]),X=Mn(t,A);return S?{...b,ref:X,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:d,onKeyDown:u,onMouseOver:g,onMouseLeave:v}:{...b,ref:X,role:"button","data-active":C0e(_),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:M,onClick:D,onMouseDown:te,onMouseUp:G,onKeyUp:H,onKeyDown:F,onMouseOver:$,onMouseLeave:U}}function RF(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function DF(e){if(!RF(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function k0e(e){var t;return((t=NF(e))==null?void 0:t.defaultView)??window}function NF(e){return RF(e)?e.ownerDocument:document}function E0e(e){return NF(e).activeElement}var jF=e=>e.hasAttribute("tabindex"),P0e=e=>jF(e)&&e.tabIndex===-1;function T0e(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function BF(e){return e.parentElement&&BF(e.parentElement)?!0:e.hidden}function L0e(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function $F(e){if(!DF(e)||BF(e)||T0e(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]():L0e(e)?!0:jF(e)}function A0e(e){return e?DF(e)&&$F(e)&&!P0e(e):!1}var O0e=["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]"],M0e=O0e.join(),I0e=e=>e.offsetWidth>0&&e.offsetHeight>0;function FF(e){const t=Array.from(e.querySelectorAll(M0e));return t.unshift(e),t.filter(n=>$F(n)&&I0e(n))}function R0e(e){const t=e.current;if(!t)return!1;const n=E0e(t);return!n||t.contains(n)?!1:!!A0e(n)}function zF(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;su(()=>{if(!o||R0e(e))return;const a=(i==null?void 0:i.current)||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var D0e={preventScroll:!0,shouldFocus:!1};function N0e(e,t=D0e){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=j0e(e)?e.current:e,s=i&&o,l=w.useRef(s),u=w.useRef(o);Ws(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const d=w.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var h;(h=n.current)==null||h.focus({preventScroll:r})});else{const h=FF(a);h.length>0&&requestAnimationFrame(()=>{h[0].focus({preventScroll:r})})}},[o,r,a,n]);su(()=>{d()},[d]),Rh(a,"transitionend",d)}function j0e(e){return"current"in e}var Zo="top",ls="bottom",us="right",Qo="left",Ek="auto",_y=[Zo,ls,us,Qo],qg="start",A2="end",B0e="clippingParents",HF="viewport",q1="popper",$0e="reference",UO=_y.reduce(function(e,t){return e.concat([t+"-"+qg,t+"-"+A2])},[]),VF=[].concat(_y,[Ek]).reduce(function(e,t){return e.concat([t,t+"-"+qg,t+"-"+A2])},[]),F0e="beforeRead",z0e="read",H0e="afterRead",V0e="beforeMain",W0e="main",U0e="afterMain",G0e="beforeWrite",q0e="write",Y0e="afterWrite",K0e=[F0e,z0e,H0e,V0e,W0e,U0e,G0e,q0e,Y0e];function lu(e){return e?(e.nodeName||"").toLowerCase():null}function hs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Uh(e){var t=hs(e).Element;return e instanceof t||e instanceof Element}function is(e){var t=hs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Pk(e){if(typeof ShadowRoot>"u")return!1;var t=hs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function X0e(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];!is(o)||!lu(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 Z0e(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},{});!is(i)||!lu(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Q0e={name:"applyStyles",enabled:!0,phase:"write",fn:X0e,effect:Z0e,requires:["computeStyles"]};function Ql(e){return e.split("-")[0]}var jh=Math.max,h5=Math.min,Yg=Math.round;function K7(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function WF(){return!/^((?!chrome|android).)*safari/i.test(K7())}function Kg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&is(e)&&(i=e.offsetWidth>0&&Yg(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Yg(r.height)/e.offsetHeight||1);var a=Uh(e)?hs(e):window,s=a.visualViewport,l=!WF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,h=r.width/i,g=r.height/o;return{width:h,height:g,top:d,right:u+h,bottom:d+g,left:u,x:u,y:d}}function Tk(e){var t=Kg(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 UF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Pk(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function tc(e){return hs(e).getComputedStyle(e)}function J0e(e){return["table","td","th"].indexOf(lu(e))>=0}function rf(e){return((Uh(e)?e.ownerDocument:e.document)||window.document).documentElement}function ox(e){return lu(e)==="html"?e:e.assignedSlot||e.parentNode||(Pk(e)?e.host:null)||rf(e)}function GO(e){return!is(e)||tc(e).position==="fixed"?null:e.offsetParent}function e1e(e){var t=/firefox/i.test(K7()),n=/Trident/i.test(K7());if(n&&is(e)){var r=tc(e);if(r.position==="fixed")return null}var i=ox(e);for(Pk(i)&&(i=i.host);is(i)&&["html","body"].indexOf(lu(i))<0;){var o=tc(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 ky(e){for(var t=hs(e),n=GO(e);n&&J0e(n)&&tc(n).position==="static";)n=GO(n);return n&&(lu(n)==="html"||lu(n)==="body"&&tc(n).position==="static")?t:n||e1e(e)||t}function Lk(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Yv(e,t,n){return jh(e,h5(t,n))}function t1e(e,t,n){var r=Yv(e,t,n);return r>n?n:r}function GF(){return{top:0,right:0,bottom:0,left:0}}function qF(e){return Object.assign({},GF(),e)}function YF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var n1e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,qF(typeof t!="number"?t:YF(t,_y))};function r1e(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ql(n.placement),l=Lk(s),u=[Qo,us].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=n1e(i.padding,n),g=Tk(o),v=l==="y"?Zo:Qo,b=l==="y"?ls:us,S=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],E=a[l]-n.rects.reference[l],_=ky(o),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,T=S/2-E/2,A=h[v],M=k-g[d]-h[b],R=k/2-g[d]/2+T,D=Yv(A,R,M),j=l;n.modifiersData[r]=(t={},t[j]=D,t.centerOffset=D-R,t)}}function i1e(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)||UF(t.elements.popper,i)&&(t.elements.arrow=i))}const o1e={name:"arrow",enabled:!0,phase:"main",fn:r1e,effect:i1e,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xg(e){return e.split("-")[1]}var a1e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function s1e(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Yg(t*i)/i||0,y:Yg(n*i)/i||0}}function qO(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,d=e.roundOffsets,h=e.isFixed,g=a.x,v=g===void 0?0:g,b=a.y,S=b===void 0?0:b,E=typeof d=="function"?d({x:v,y:S}):{x:v,y:S};v=E.x,S=E.y;var _=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Qo,A=Zo,M=window;if(u){var R=ky(n),D="clientHeight",j="clientWidth";if(R===hs(n)&&(R=rf(n),tc(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",j="scrollWidth")),R=R,i===Zo||(i===Qo||i===us)&&o===A2){A=ls;var F=h&&R===M&&M.visualViewport?M.visualViewport.height:R[D];S-=F-r.height,S*=l?1:-1}if(i===Qo||(i===Zo||i===ls)&&o===A2){T=us;var H=h&&R===M&&M.visualViewport?M.visualViewport.width:R[j];v-=H-r.width,v*=l?1:-1}}var K=Object.assign({position:s},u&&a1e),te=d===!0?s1e({x:v,y:S}):{x:v,y:S};if(v=te.x,S=te.y,l){var G;return Object.assign({},K,(G={},G[A]=k?"0":"",G[T]=_?"0":"",G.transform=(M.devicePixelRatio||1)<=1?"translate("+v+"px, "+S+"px)":"translate3d("+v+"px, "+S+"px, 0)",G))}return Object.assign({},K,(t={},t[A]=k?S+"px":"",t[T]=_?v+"px":"",t.transform="",t))}function l1e(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:Ql(t.placement),variation:Xg(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,qO(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,qO(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 u1e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:l1e,data:{}};var rb={passive:!0};function c1e(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=hs(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",n.update,rb)}),s&&l.addEventListener("resize",n.update,rb),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",n.update,rb)}),s&&l.removeEventListener("resize",n.update,rb)}}const d1e={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:c1e,data:{}};var f1e={left:"right",right:"left",bottom:"top",top:"bottom"};function g4(e){return e.replace(/left|right|bottom|top/g,function(t){return f1e[t]})}var h1e={start:"end",end:"start"};function YO(e){return e.replace(/start|end/g,function(t){return h1e[t]})}function Ak(e){var t=hs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ok(e){return Kg(rf(e)).left+Ak(e).scrollLeft}function p1e(e,t){var n=hs(e),r=rf(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=WF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Ok(e),y:l}}function m1e(e){var t,n=rf(e),r=Ak(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Ok(e),l=-r.scrollTop;return tc(i||n).direction==="rtl"&&(s+=jh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Mk(e){var t=tc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function KF(e){return["html","body","#document"].indexOf(lu(e))>=0?e.ownerDocument.body:is(e)&&Mk(e)?e:KF(ox(e))}function Kv(e,t){var n;t===void 0&&(t=[]);var r=KF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=hs(r),a=i?[o].concat(o.visualViewport||[],Mk(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Kv(ox(a)))}function X7(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function g1e(e,t){var n=Kg(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 KO(e,t,n){return t===HF?X7(p1e(e,n)):Uh(t)?g1e(t,n):X7(m1e(rf(e)))}function v1e(e){var t=Kv(ox(e)),n=["absolute","fixed"].indexOf(tc(e).position)>=0,r=n&&is(e)?ky(e):e;return Uh(r)?t.filter(function(i){return Uh(i)&&UF(i,r)&&lu(i)!=="body"}):[]}function y1e(e,t,n,r){var i=t==="clippingParents"?v1e(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var d=KO(e,u,r);return l.top=jh(d.top,l.top),l.right=h5(d.right,l.right),l.bottom=h5(d.bottom,l.bottom),l.left=jh(d.left,l.left),l},KO(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 XF(e){var t=e.reference,n=e.element,r=e.placement,i=r?Ql(r):null,o=r?Xg(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Zo:l={x:a,y:t.y-n.height};break;case ls:l={x:a,y:t.y+t.height};break;case us:l={x:t.x+t.width,y:s};break;case Qo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Lk(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case qg:l[u]=l[u]-(t[d]/2-n[d]/2);break;case A2:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function O2(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?B0e:s,u=n.rootBoundary,d=u===void 0?HF:u,h=n.elementContext,g=h===void 0?q1:h,v=n.altBoundary,b=v===void 0?!1:v,S=n.padding,E=S===void 0?0:S,_=qF(typeof E!="number"?E:YF(E,_y)),k=g===q1?$0e:q1,T=e.rects.popper,A=e.elements[b?k:g],M=y1e(Uh(A)?A:A.contextElement||rf(e.elements.popper),l,d,a),R=Kg(e.elements.reference),D=XF({reference:R,element:T,strategy:"absolute",placement:i}),j=X7(Object.assign({},T,D)),F=g===q1?j:R,H={top:M.top-F.top+_.top,bottom:F.bottom-M.bottom+_.bottom,left:M.left-F.left+_.left,right:F.right-M.right+_.right},K=e.modifiersData.offset;if(g===q1&&K){var te=K[i];Object.keys(H).forEach(function(G){var $=[us,ls].indexOf(G)>=0?1:-1,U=[Zo,ls].indexOf(G)>=0?"y":"x";H[G]+=te[U]*$})}return H}function b1e(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?VF:l,d=Xg(r),h=d?s?UO:UO.filter(function(b){return Xg(b)===d}):_y,g=h.filter(function(b){return u.indexOf(b)>=0});g.length===0&&(g=h);var v=g.reduce(function(b,S){return b[S]=O2(e,{placement:S,boundary:i,rootBoundary:o,padding:a})[Ql(S)],b},{});return Object.keys(v).sort(function(b,S){return v[b]-v[S]})}function S1e(e){if(Ql(e)===Ek)return[];var t=g4(e);return[YO(e),t,YO(t)]}function x1e(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,d=n.boundary,h=n.rootBoundary,g=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,S=n.allowedAutoPlacements,E=t.options.placement,_=Ql(E),k=_===E,T=l||(k||!b?[g4(E)]:S1e(E)),A=[E].concat(T).reduce(function(be,He){return be.concat(Ql(He)===Ek?b1e(t,{placement:He,boundary:d,rootBoundary:h,padding:u,flipVariations:b,allowedAutoPlacements:S}):He)},[]),M=t.rects.reference,R=t.rects.popper,D=new Map,j=!0,F=A[0],H=0;H<A.length;H++){var K=A[H],te=Ql(K),G=Xg(K)===qg,$=[Zo,ls].indexOf(te)>=0,U=$?"width":"height",X=O2(t,{placement:K,boundary:d,rootBoundary:h,altBoundary:g,padding:u}),Z=$?G?us:Qo:G?ls:Zo;M[U]>R[U]&&(Z=g4(Z));var W=g4(Z),Q=[];if(o&&Q.push(X[te]<=0),s&&Q.push(X[Z]<=0,X[W]<=0),Q.every(function(be){return be})){F=K,j=!1;break}D.set(K,Q)}if(j)for(var re=b?3:1,de=function(He){var Oe=A.find(function(ot){var Ve=D.get(ot);if(Ve)return Ve.slice(0,He).every(function(Be){return Be})});if(Oe)return F=Oe,"break"},ve=re;ve>0;ve--){var Pe=de(ve);if(Pe==="break")break}t.placement!==F&&(t.modifiersData[r]._skip=!0,t.placement=F,t.reset=!0)}}const w1e={name:"flip",enabled:!0,phase:"main",fn:x1e,requiresIfExists:["offset"],data:{_skip:!1}};function XO(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 ZO(e){return[Zo,us,ls,Qo].some(function(t){return e[t]>=0})}function C1e(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=O2(t,{elementContext:"reference"}),s=O2(t,{altBoundary:!0}),l=XO(a,r),u=XO(s,i,o),d=ZO(l),h=ZO(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const _1e={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:C1e};function k1e(e,t,n){var r=Ql(e),i=[Qo,Zo].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,[Qo,us].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function E1e(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=VF.reduce(function(d,h){return d[h]=k1e(h,t.rects,o),d},{}),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 P1e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:E1e};function T1e(e){var t=e.state,n=e.name;t.modifiersData[n]=XF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const L1e={name:"popperOffsets",enabled:!0,phase:"read",fn:T1e,data:{}};function A1e(e){return e==="x"?"y":"x"}function O1e(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,d=n.altBoundary,h=n.padding,g=n.tether,v=g===void 0?!0:g,b=n.tetherOffset,S=b===void 0?0:b,E=O2(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),_=Ql(t.placement),k=Xg(t.placement),T=!k,A=Lk(_),M=A1e(A),R=t.modifiersData.popperOffsets,D=t.rects.reference,j=t.rects.popper,F=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,H=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),K=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,te={x:0,y:0};if(R){if(o){var G,$=A==="y"?Zo:Qo,U=A==="y"?ls:us,X=A==="y"?"height":"width",Z=R[A],W=Z+E[$],Q=Z-E[U],re=v?-j[X]/2:0,de=k===qg?D[X]:j[X],ve=k===qg?-j[X]:-D[X],Pe=t.elements.arrow,be=v&&Pe?Tk(Pe):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:GF(),Oe=He[$],ot=He[U],Ve=Yv(0,D[X],be[X]),Be=T?D[X]/2-re-Ve-Oe-H.mainAxis:de-Ve-Oe-H.mainAxis,wt=T?-D[X]/2+re+Ve+ot+H.mainAxis:ve+Ve+ot+H.mainAxis,st=t.elements.arrow&&ky(t.elements.arrow),gt=st?A==="y"?st.clientTop||0:st.clientLeft||0:0,St=(G=K==null?void 0:K[A])!=null?G:0,Ae=Z+Be-St-gt,lt=Z+wt-St,Mt=Yv(v?h5(W,Ae):W,Z,v?jh(Q,lt):Q);R[A]=Mt,te[A]=Mt-Z}if(s){var ut,_t=A==="x"?Zo:Qo,ln=A==="x"?ls:us,ae=R[M],De=M==="y"?"height":"width",Ye=ae+E[_t],Ke=ae-E[ln],xe=[Zo,Qo].indexOf(_)!==-1,Ne=(ut=K==null?void 0:K[M])!=null?ut:0,Ct=xe?Ye:ae-D[De]-j[De]-Ne+H.altAxis,Dt=xe?ae+D[De]+j[De]-Ne-H.altAxis:Ke,Le=v&&xe?t1e(Ct,ae,Dt):Yv(v?Ct:Ye,ae,v?Dt:Ke);R[M]=Le,te[M]=Le-ae}t.modifiersData[r]=te}}const M1e={name:"preventOverflow",enabled:!0,phase:"main",fn:O1e,requiresIfExists:["offset"]};function I1e(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function R1e(e){return e===hs(e)||!is(e)?Ak(e):I1e(e)}function D1e(e){var t=e.getBoundingClientRect(),n=Yg(t.width)/e.offsetWidth||1,r=Yg(t.height)/e.offsetHeight||1;return n!==1||r!==1}function N1e(e,t,n){n===void 0&&(n=!1);var r=is(t),i=is(t)&&D1e(t),o=rf(t),a=Kg(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((lu(t)!=="body"||Mk(o))&&(s=R1e(t)),is(t)?(l=Kg(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Ok(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function j1e(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 B1e(e){var t=j1e(e);return K0e.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function $1e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function F1e(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 QO={placement:"bottom",modifiers:[],strategy:"absolute"};function JO(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function z1e(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?QO:i;return function(s,l,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},QO,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},h=[],g=!1,v={state:d,setOptions:function(_){var k=typeof _=="function"?_(d.options):_;S(),d.options=Object.assign({},o,d.options,k),d.scrollParents={reference:Uh(s)?Kv(s):s.contextElement?Kv(s.contextElement):[],popper:Kv(l)};var T=B1e(F1e([].concat(r,d.options.modifiers)));return d.orderedModifiers=T.filter(function(A){return A.enabled}),b(),v.update()},forceUpdate:function(){if(!g){var _=d.elements,k=_.reference,T=_.popper;if(JO(k,T)){d.rects={reference:N1e(k,ky(T),d.options.strategy==="fixed"),popper:Tk(T)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(H){return d.modifiersData[H.name]=Object.assign({},H.data)});for(var A=0;A<d.orderedModifiers.length;A++){if(d.reset===!0){d.reset=!1,A=-1;continue}var M=d.orderedModifiers[A],R=M.fn,D=M.options,j=D===void 0?{}:D,F=M.name;typeof R=="function"&&(d=R({state:d,options:j,name:F,instance:v})||d)}}}},update:$1e(function(){return new Promise(function(E){v.forceUpdate(),E(d)})}),destroy:function(){S(),g=!0}};if(!JO(s,l))return v;v.setOptions(u).then(function(E){!g&&u.onFirstUpdate&&u.onFirstUpdate(E)});function b(){d.orderedModifiers.forEach(function(E){var _=E.name,k=E.options,T=k===void 0?{}:k,A=E.effect;if(typeof A=="function"){var M=A({state:d,name:_,instance:v,options:T}),R=function(){};h.push(M||R)}})}function S(){h.forEach(function(E){return E()}),h=[]}return v}}var H1e=[d1e,L1e,u1e,Q0e,P1e,w1e,M1e,o1e,_1e],V1e=z1e({defaultModifiers:H1e}),Em=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),oi={arrowShadowColor:Em("--popper-arrow-shadow-color"),arrowSize:Em("--popper-arrow-size","8px"),arrowSizeHalf:Em("--popper-arrow-size-half"),arrowBg:Em("--popper-arrow-bg"),transformOrigin:Em("--popper-transform-origin"),arrowOffset:Em("--popper-arrow-offset")};function W1e(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 U1e={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"},G1e=e=>U1e[e],eM={scroll:!0,resize:!0};function q1e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...eM,...e}}:t={enabled:e,options:eM},t}var Y1e={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`}},K1e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{tM(e)},effect:({state:e})=>()=>{tM(e)}},tM=e=>{e.elements.popper.style.setProperty(oi.transformOrigin.var,G1e(e.placement))},X1e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Z1e(e)}},Z1e=e=>{var t;if(!e.placement)return;const n=Q1e(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:oi.arrowSize.varRef,height:oi.arrowSize.varRef,zIndex:-1});const r={[oi.arrowSizeHalf.var]:`calc(${oi.arrowSize.varRef} / 2)`,[oi.arrowOffset.var]:`calc(${oi.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Q1e=e=>{if(e.startsWith("top"))return{property:"bottom",value:oi.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:oi.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:oi.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:oi.arrowOffset.varRef}},J1e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{nM(e)},effect:({state:e})=>()=>{nM(e)}},nM=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:oi.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:W1e(e.placement)})},eve={"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"}},tve={"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 nve(e,t="ltr"){var n;const r=((n=eve[e])==null?void 0:n[t])||e;return t==="ltr"?r:tve[e]??r}function Ik(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:d="clippingParents",preventOverflow:h=!0,matchWidth:g,direction:v="ltr"}=e,b=w.useRef(null),S=w.useRef(null),E=w.useRef(null),_=nve(r,v),k=w.useRef(()=>{}),T=w.useCallback(()=>{var H;!t||!b.current||!S.current||((H=k.current)==null||H.call(k),E.current=V1e(b.current,S.current,{placement:_,modifiers:[J1e,X1e,K1e,{...Y1e,enabled:!!g},{name:"eventListeners",...q1e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!h,options:{boundary:d}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[_,t,n,g,a,o,s,l,u,h,d,i]);w.useEffect(()=>()=>{var H;!b.current&&!S.current&&((H=E.current)==null||H.destroy(),E.current=null)},[]);const A=w.useCallback(H=>{b.current=H,T()},[T]),M=w.useCallback((H={},K=null)=>({...H,ref:Mn(A,K)}),[A]),R=w.useCallback(H=>{S.current=H,T()},[T]),D=w.useCallback((H={},K=null)=>({...H,ref:Mn(R,K),style:{...H.style,position:i,minWidth:g?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,g]),j=w.useCallback((H={},K=null)=>{const{size:te,shadowColor:G,bg:$,style:U,...X}=H;return{...X,ref:K,"data-popper-arrow":"",style:rve(H)}},[]),F=w.useCallback((H={},K=null)=>({...H,ref:K,"data-popper-arrow-inner":""}),[]);return{update(){var H;(H=E.current)==null||H.update()},forceUpdate(){var H;(H=E.current)==null||H.forceUpdate()},transformOrigin:oi.transformOrigin.varRef,referenceRef:A,popperRef:R,getPopperProps:D,getArrowProps:j,getArrowInnerProps:F,getReferenceProps:M}}function rve(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 Rk(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=br(n),a=br(t),[s,l]=w.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,d=r!==void 0,h=w.useId(),g=i??`disclosure-${h}`,v=w.useCallback(()=>{d||l(!1),a==null||a()},[d,a]),b=w.useCallback(()=>{d||l(!0),o==null||o()},[d,o]),S=w.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":g,onClick(T){var A;(A=k.onClick)==null||A.call(k,T),S()}}}function _(k={}){return{...k,hidden:!u,id:g}}return{isOpen:u,onOpen:b,onClose:v,onToggle:S,isControlled:d,getButtonProps:E,getDisclosureProps:_}}function ive(e){const{ref:t,handler:n,enabled:r=!0}=e,i=br(n),a=w.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;w.useEffect(()=>{if(!r)return;const s=h=>{L6(h,t)&&(a.isPointerDown=!0)},l=h=>{if(a.ignoreEmulatedMouseEvents){a.ignoreEmulatedMouseEvents=!1;return}a.isPointerDown&&n&&L6(h,t)&&(a.isPointerDown=!1,i(h))},u=h=>{a.ignoreEmulatedMouseEvents=!0,n&&a.isPointerDown&&L6(h,t)&&(a.isPointerDown=!1,i(h))},d=ZF(t.current);return d.addEventListener("mousedown",s,!0),d.addEventListener("mouseup",l,!0),d.addEventListener("touchstart",s,!0),d.addEventListener("touchend",u,!0),()=>{d.removeEventListener("mousedown",s,!0),d.removeEventListener("mouseup",l,!0),d.removeEventListener("touchstart",s,!0),d.removeEventListener("touchend",u,!0)}},[n,t,i,a,r])}function L6(e,t){var n;const r=e.target;return e.button>0||r&&!ZF(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function ZF(e){return(e==null?void 0:e.ownerDocument)??document}function QF(e){const{isOpen:t,ref:n}=e,[r,i]=w.useState(t),[o,a]=w.useState(!1);return w.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Rh(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=k0e(n.current),d=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(d)}}}function Dk(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var Gh=(...e)=>e.filter(Boolean).join(" ");function ove(e,...t){return ave(e)?e(...t):e}var ave=e=>typeof e=="function",sve=e=>e?"":void 0;function Z7(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function lve(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function uve(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function cve(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,i]=w.useState([]),o=w.useRef(),a=()=>{o.current&&(clearTimeout(o.current),o.current=null)},s=()=>{a(),o.current=setTimeout(()=>{i([]),o.current=null},t)};w.useEffect(()=>a,[]);function l(u){return d=>{if(d.key==="Backspace"){const h=[...r];h.pop(),i(h);return}if(uve(d)){const h=r.concat(d.key);n(d)&&(d.preventDefault(),d.stopPropagation()),i(h),u(h.join("")),s()}}}return l}function dve(e,t,n,r){if(t==null)return r;if(!r)return e.find(a=>n(a).toLowerCase().startsWith(t.toLowerCase()));const i=e.filter(o=>n(o).toLowerCase().startsWith(t.toLowerCase()));if(i.length>0){let o;return i.includes(r)?(o=i.indexOf(r)+1,o===i.length&&(o=0),i[o]):(o=e.indexOf(i[0]),e[o])}return r}var[fve,hve,pve,mve]=$8(),[gve,Ey]=xn({strict:!1,name:"MenuContext"});function vve(e,...t){const n=w.useId(),r=e||n;return w.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}function JF(e){return(e==null?void 0:e.ownerDocument)??document}function rM(e){return JF(e).activeElement===e}function yve(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,autoSelect:i=!0,isLazy:o,isOpen:a,defaultIsOpen:s,onClose:l,onOpen:u,placement:d="bottom-start",lazyBehavior:h="unmount",direction:g,computePositionOnMount:v=!1,...b}=e,S=w.useRef(null),E=w.useRef(null),_=pve(),k=w.useCallback(()=>{requestAnimationFrame(()=>{var de;(de=S.current)==null||de.focus({preventScroll:!1})})},[]),T=w.useCallback(()=>{const de=setTimeout(()=>{const ve=_.firstEnabled();ve&&te(ve.index)});Z.current.add(de)},[_]),A=w.useCallback(()=>{const de=setTimeout(()=>{const ve=_.lastEnabled();ve&&te(ve.index)});Z.current.add(de)},[_]),M=w.useCallback(()=>{u==null||u(),i?T():k()},[i,T,k,u]),{isOpen:R,onOpen:D,onClose:j,onToggle:F}=Rk({isOpen:a,defaultIsOpen:s,onClose:l,onOpen:M});ive({enabled:R&&r,ref:S,handler:de=>{var ve;(ve=E.current)!=null&&ve.contains(de.target)||j()}});const H=Ik({...b,enabled:R||v,placement:d,direction:g}),[K,te]=w.useState(-1);su(()=>{R||te(-1)},[R]),zF(S,{focusRef:E,visible:R,shouldFocus:!0});const G=QF({isOpen:R,ref:S}),[$,U]=vve(t,"menu-button","menu-list"),X=w.useCallback(()=>{D(),k()},[D,k]),Z=w.useRef(new Set([]));kve(()=>{Z.current.forEach(de=>clearTimeout(de)),Z.current.clear()});const W=w.useCallback(()=>{D(),T()},[T,D]),Q=w.useCallback(()=>{D(),A()},[D,A]),re=w.useCallback(()=>{var de,ve;const Pe=JF(S.current),be=(de=S.current)==null?void 0:de.contains(Pe.activeElement);if(!(R&&!be))return;const Oe=(ve=_.item(K))==null?void 0:ve.node;Oe==null||Oe.focus()},[R,K,_]);return{openAndFocusMenu:X,openAndFocusFirstItem:W,openAndFocusLastItem:Q,onTransitionEnd:re,unstable__animationState:G,descendants:_,popper:H,buttonId:$,menuId:U,forceUpdate:H.forceUpdate,orientation:"vertical",isOpen:R,onToggle:F,onOpen:D,onClose:j,menuRef:S,buttonRef:E,focusedIndex:K,closeOnSelect:n,closeOnBlur:r,autoSelect:i,setFocusedIndex:te,isLazy:o,lazyBehavior:h}}function bve(e={},t=null){const n=Ey(),{onToggle:r,popper:i,openAndFocusFirstItem:o,openAndFocusLastItem:a}=n,s=w.useCallback(l=>{const u=l.key,h={Enter:o,ArrowDown:o,ArrowUp:a}[u];h&&(l.preventDefault(),l.stopPropagation(),h(l))},[o,a]);return{...e,ref:Mn(n.buttonRef,t,i.referenceRef),id:n.buttonId,"data-active":sve(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:Z7(e.onClick,r),onKeyDown:Z7(e.onKeyDown,s)}}function Q7(e){var t;return Cve(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function Sve(e={},t=null){const n=Ey();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within <Menu>");const{focusedIndex:r,setFocusedIndex:i,menuRef:o,isOpen:a,onClose:s,menuId:l,isLazy:u,lazyBehavior:d,unstable__animationState:h}=n,g=hve(),v=cve({preventDefault:_=>_.key!==" "&&Q7(_.target)}),b=w.useCallback(_=>{const k=_.key,A={Tab:R=>R.preventDefault(),Escape:s,ArrowDown:()=>{const R=g.nextEnabled(r);R&&i(R.index)},ArrowUp:()=>{const R=g.prevEnabled(r);R&&i(R.index)}}[k];if(A){_.preventDefault(),A(_);return}const M=v(R=>{const D=dve(g.values(),R,j=>{var F;return((F=j==null?void 0:j.node)==null?void 0:F.textContent)??""},g.item(r));if(D){const j=g.indexOf(D.node);i(j)}});Q7(_.target)&&M(_)},[g,r,v,s,i]),S=w.useRef(!1);a&&(S.current=!0);const E=Dk({wasSelected:S.current,enabled:u,mode:d,isSelected:h.present});return{...e,ref:Mn(o,t),children:E?e.children:null,tabIndex:-1,role:"menu",id:l,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:Z7(e.onKeyDown,b)}}function xve(e={}){const{popper:t,isOpen:n}=Ey();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function ez(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onClick:o,isDisabled:a,isFocusable:s,closeOnSelect:l,type:u,...d}=e,h=Ey(),{setFocusedIndex:g,focusedIndex:v,closeOnSelect:b,onClose:S,menuRef:E,isOpen:_,menuId:k}=h,T=w.useRef(null),A=`${k}-menuitem-${w.useId()}`,{index:M,register:R}=mve({disabled:a&&!s}),D=w.useCallback($=>{n==null||n($),!a&&g(M)},[g,M,a,n]),j=w.useCallback($=>{r==null||r($),T.current&&!rM(T.current)&&D($)},[D,r]),F=w.useCallback($=>{i==null||i($),!a&&g(-1)},[g,a,i]),H=w.useCallback($=>{o==null||o($),Q7($.currentTarget)&&(l??b)&&S()},[S,o,b,l]),K=M===v,te=a&&!s;su(()=>{_&&(K&&!te&&T.current?requestAnimationFrame(()=>{var $;($=T.current)==null||$.focus()}):E.current&&!rM(E.current)&&E.current.focus())},[K,te,E,_]);const G=IF({onClick:H,onMouseEnter:D,onMouseMove:j,onMouseLeave:F,ref:Mn(R,T,t),isDisabled:a,isFocusable:s});return{...d,...G,type:u??G.type,id:A,role:"menuitem",tabIndex:K?0:-1}}function wve(e={},t=null){const{type:n="radio",isChecked:r,...i}=e;return{...ez(i,t),role:`menuitem${n}`,"aria-checked":r}}function Cve(e){if(!_ve(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function _ve(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function kve(e,t=[]){return w.useEffect(()=>()=>e(),t)}var[Eve,Py]=xn({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Menu />" `}),tz=e=>{const{children:t}=e,n=Oi("Menu",e),r=Sn(e),{direction:i}=rp(),{descendants:o,...a}=yve({...r,direction:i}),s=w.useMemo(()=>a,[a]),{isOpen:l,onClose:u,forceUpdate:d}=s;return N.createElement(fve,{value:o},N.createElement(gve,{value:s},N.createElement(Eve,{value:n},ove(t,{isOpen:l,onClose:u,forceUpdate:d}))))};tz.displayName="Menu";var Pve=Ee((e,t)=>{const n=Py();return N.createElement(Ce.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),nz=Ee((e,t)=>{const{children:n,as:r,...i}=e,o=bve(i,t),a=r||Pve;return N.createElement(a,{...o,className:Gh("chakra-menu__menu-button",e.className)},N.createElement(Ce.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0}},e.children))});nz.displayName="MenuButton";var rz=Ee((e,t)=>{const n=Py();return N.createElement(Ce.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});rz.displayName="MenuCommand";var Tve=Ee((e,t)=>{const{title:n,children:r,className:i,...o}=e,a=Gh("chakra-menu__group__title",i),s=Py();return N.createElement("div",{ref:t,className:"chakra-menu__group",role:"group"},n&&N.createElement(Ce.p,{className:a,...o,__css:s.groupTitle},n),r)});Tve.displayName="MenuGroup";var Nk=e=>{const{className:t,children:n,...r}=e,i=w.Children.only(n),o=w.isValidElement(i)?w.cloneElement(i,{focusable:"false","aria-hidden":!0,className:Gh("chakra-menu__icon",i.props.className)}):null,a=Gh("chakra-menu__icon-wrapper",t);return N.createElement(Ce.span,{className:a,...r,__css:{flexShrink:0}},o)};Nk.displayName="MenuIcon";var iz=Ee((e,t)=>{const{type:n,...r}=e,i=Py(),o=r.as||n?n??void 0:"button",a=w.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...i.item}),[i.item]);return N.createElement(Ce.button,{ref:t,type:o,...r,__css:a})}),Lve=e=>N.createElement("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...e},N.createElement("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})),oz=Ee((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",...i}=e,o=wve(i,t);return N.createElement(iz,{...o,className:Gh("chakra-menu__menuitem-option",i.className)},n!==null&&N.createElement(Nk,{fontSize:"0.8em",marginEnd:r,opacity:e.isChecked?1:0},n||N.createElement(Lve,null)),N.createElement("span",{style:{flex:1}},o.children))});oz.id="MenuItemOption";oz.displayName="MenuItemOption";var J7=Ee((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:i,commandSpacing:o="0.75rem",children:a,...s}=e,l=ez(s,t),d=n||i?N.createElement("span",{style:{pointerEvents:"none",flex:1}},a):a;return N.createElement(iz,{...l,className:Gh("chakra-menu__menuitem",l.className)},n&&N.createElement(Nk,{fontSize:"0.8em",marginEnd:r},n),d,i&&N.createElement(rz,{marginStart:o},i))});J7.displayName="MenuItem";var Ave={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},Ove=Ce(nl.div),az=Ee(function(t,n){var r;const{rootProps:i,motionProps:o,...a}=t,{isOpen:s,onTransitionEnd:l,unstable__animationState:u}=Ey(),d=Sve(a,n),h=xve(i),g=Py();return N.createElement(Ce.div,{...h,__css:{zIndex:t.zIndex??((r=g.list)==null?void 0:r.zIndex)}},N.createElement(Ove,{variants:Ave,initial:!1,animate:s?"enter":"exit",__css:{outline:0,...g.list},...o,className:Gh("chakra-menu__menu-list",d.className),...d,onUpdate:l,onAnimationComplete:lve(u.onComplete,d.onAnimationComplete)}))});az.displayName="MenuList";var Qs={},Mve={get exports(){return Qs},set exports(e){Qs=e}},Na={},Bh={},Ive={get exports(){return Bh},set exports(e){Bh=e}},sz={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(e){function t(W,Q){var re=W.length;W.push(Q);e:for(;0<re;){var de=re-1>>>1,ve=W[de];if(0<i(ve,Q))W[de]=Q,W[re]=ve,re=de;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var Q=W[0],re=W.pop();if(re!==Q){W[0]=re;e:for(var de=0,ve=W.length,Pe=ve>>>1;de<Pe;){var be=2*(de+1)-1,He=W[be],Oe=be+1,ot=W[Oe];if(0>i(He,re))Oe<ve&&0>i(ot,He)?(W[de]=ot,W[Oe]=re,de=Oe):(W[de]=He,W[be]=re,de=be);else if(Oe<ve&&0>i(ot,re))W[de]=ot,W[Oe]=re,de=Oe;else break e}}return Q}function i(W,Q){var re=W.sortIndex-Q.sortIndex;return re!==0?re: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=[],d=1,h=null,g=3,v=!1,b=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(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 A(W){if(S=!1,T(W),!b)if(n(l)!==null)b=!0,X(M);else{var Q=n(u);Q!==null&&Z(A,Q.startTime-W)}}function M(W,Q){b=!1,S&&(S=!1,_(j),j=-1),v=!0;var re=g;try{for(T(Q),h=n(l);h!==null&&(!(h.expirationTime>Q)||W&&!K());){var de=h.callback;if(typeof de=="function"){h.callback=null,g=h.priorityLevel;var ve=de(h.expirationTime<=Q);Q=e.unstable_now(),typeof ve=="function"?h.callback=ve:h===n(l)&&r(l),T(Q)}else r(l);h=n(l)}if(h!==null)var Pe=!0;else{var be=n(u);be!==null&&Z(A,be.startTime-Q),Pe=!1}return Pe}finally{h=null,g=re,v=!1}}var R=!1,D=null,j=-1,F=5,H=-1;function K(){return!(e.unstable_now()-H<F)}function te(){if(D!==null){var W=e.unstable_now();H=W;var Q=!0;try{Q=D(!0,W)}finally{Q?G():(R=!1,D=null)}}else R=!1}var G;if(typeof k=="function")G=function(){k(te)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,U=$.port2;$.port1.onmessage=te,G=function(){U.postMessage(null)}}else G=function(){E(te,0)};function X(W){D=W,R||(R=!0,G())}function Z(W,Q){j=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,X(M))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(W){switch(g){case 1:case 2:case 3:var Q=3;break;default:Q=g}var re=g;g=Q;try{return W()}finally{g=re}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,Q){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var re=g;g=W;try{return Q()}finally{g=re}},e.unstable_scheduleCallback=function(W,Q,re){var de=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?de+re:de):re=de,W){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=re+ve,W={id:d++,callback:Q,priorityLevel:W,startTime:re,expirationTime:ve,sortIndex:-1},re>de?(W.sortIndex=re,t(u,W),n(l)===null&&W===n(u)&&(S?(_(j),j=-1):S=!0,Z(A,re-de))):(W.sortIndex=ve,t(l,W),b||v||(b=!0,X(M))),W},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(W){var Q=g;return function(){var re=g;g=Q;try{return W.apply(this,arguments)}finally{g=re}}}})(sz);(function(e){e.exports=sz})(Ive);/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var lz=w,Ma=Bh;function Fe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var uz=new Set,M2={};function ap(e,t){Zg(e,t),Zg(e+"Capture",t)}function Zg(e,t){for(M2[e]=t,e=0;e<t.length;e++)uz.add(t[e])}var nc=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),e9=Object.prototype.hasOwnProperty,Rve=/^[: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]*$/,iM={},oM={};function Dve(e){return e9.call(oM,e)?!0:e9.call(iM,e)?!1:Rve.test(e)?oM[e]=!0:(iM[e]=!0,!1)}function Nve(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 jve(e,t,n,r){if(t===null||typeof t>"u"||Nve(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 Oo(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 Ki={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ki[e]=new Oo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ki[t]=new Oo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ki[e]=new Oo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ki[e]=new Oo(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){Ki[e]=new Oo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ki[e]=new Oo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ki[e]=new Oo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ki[e]=new Oo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ki[e]=new Oo(e,5,!1,e.toLowerCase(),null,!1,!1)});var jk=/[\-:]([a-z])/g;function Bk(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(jk,Bk);Ki[t]=new Oo(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(jk,Bk);Ki[t]=new Oo(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(jk,Bk);Ki[t]=new Oo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ki[e]=new Oo(e,1,!1,e.toLowerCase(),null,!1,!1)});Ki.xlinkHref=new Oo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ki[e]=new Oo(e,1,!1,e.toLowerCase(),null,!0,!0)});function $k(e,t,n,r){var i=Ki.hasOwnProperty(t)?Ki[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(jve(t,n,i,r)&&(n=null),r||i===null?Dve(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var cc=lz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ib=Symbol.for("react.element"),Xm=Symbol.for("react.portal"),Zm=Symbol.for("react.fragment"),Fk=Symbol.for("react.strict_mode"),t9=Symbol.for("react.profiler"),cz=Symbol.for("react.provider"),dz=Symbol.for("react.context"),zk=Symbol.for("react.forward_ref"),n9=Symbol.for("react.suspense"),r9=Symbol.for("react.suspense_list"),Hk=Symbol.for("react.memo"),md=Symbol.for("react.lazy"),fz=Symbol.for("react.offscreen"),aM=Symbol.iterator;function Y1(e){return e===null||typeof e!="object"?null:(e=aM&&e[aM]||e["@@iterator"],typeof e=="function"?e:null)}var Tr=Object.assign,A6;function bv(e){if(A6===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);A6=t&&t[1]||""}return`
|
||
`+A6+e}var O6=!1;function M6(e,t){if(!e||O6)return"";O6=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
||
`),o=r.stack.split(`
|
||
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
|
||
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{O6=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?bv(e):""}function Bve(e){switch(e.tag){case 5:return bv(e.type);case 16:return bv("Lazy");case 13:return bv("Suspense");case 19:return bv("SuspenseList");case 0:case 2:case 15:return e=M6(e.type,!1),e;case 11:return e=M6(e.type.render,!1),e;case 1:return e=M6(e.type,!0),e;default:return""}}function i9(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 Zm:return"Fragment";case Xm:return"Portal";case t9:return"Profiler";case Fk:return"StrictMode";case n9:return"Suspense";case r9:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dz:return(e.displayName||"Context")+".Consumer";case cz:return(e._context.displayName||"Context")+".Provider";case zk:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hk:return t=e.displayName||null,t!==null?t:i9(e.type)||"Memo";case md:t=e._payload,e=e._init;try{return i9(e(t))}catch{}}return null}function $ve(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 i9(t);case 8:return t===Fk?"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 Ud(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hz(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fve(e){var t=hz(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 ob(e){e._valueTracker||(e._valueTracker=Fve(e))}function pz(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hz(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function p5(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 o9(e,t){var n=t.checked;return Tr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sM(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ud(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 mz(e,t){t=t.checked,t!=null&&$k(e,"checked",t,!1)}function a9(e,t){mz(e,t);var n=Ud(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")?s9(e,t.type,n):t.hasOwnProperty("defaultValue")&&s9(e,t.type,Ud(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function lM(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 s9(e,t,n){(t!=="number"||p5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Sv=Array.isArray;function Eg(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ud(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function l9(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Fe(91));return Tr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uM(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Fe(92));if(Sv(n)){if(1<n.length)throw Error(Fe(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ud(n)}}function gz(e,t){var n=Ud(t.value),r=Ud(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function cM(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function vz(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function u9(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?vz(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ab,yz=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ab=ab||document.createElement("div"),ab.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ab.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function I2(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xv={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},zve=["Webkit","ms","Moz","O"];Object.keys(Xv).forEach(function(e){zve.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xv[t]=Xv[e]})});function bz(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Xv.hasOwnProperty(e)&&Xv[e]?(""+t).trim():t+"px"}function Sz(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=bz(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Hve=Tr({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 c9(e,t){if(t){if(Hve[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Fe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Fe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Fe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Fe(62))}}function d9(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 f9=null;function Vk(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var h9=null,Pg=null,Tg=null;function dM(e){if(e=Ay(e)){if(typeof h9!="function")throw Error(Fe(280));var t=e.stateNode;t&&(t=cx(t),h9(e.stateNode,e.type,t))}}function xz(e){Pg?Tg?Tg.push(e):Tg=[e]:Pg=e}function wz(){if(Pg){var e=Pg,t=Tg;if(Tg=Pg=null,dM(e),t)for(e=0;e<t.length;e++)dM(t[e])}}function Cz(e,t){return e(t)}function _z(){}var I6=!1;function kz(e,t,n){if(I6)return e(t,n);I6=!0;try{return Cz(e,t,n)}finally{I6=!1,(Pg!==null||Tg!==null)&&(_z(),wz())}}function R2(e,t){var n=e.stateNode;if(n===null)return null;var r=cx(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Fe(231,t,typeof n));return n}var p9=!1;if(nc)try{var K1={};Object.defineProperty(K1,"passive",{get:function(){p9=!0}}),window.addEventListener("test",K1,K1),window.removeEventListener("test",K1,K1)}catch{p9=!1}function Vve(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Zv=!1,m5=null,g5=!1,m9=null,Wve={onError:function(e){Zv=!0,m5=e}};function Uve(e,t,n,r,i,o,a,s,l){Zv=!1,m5=null,Vve.apply(Wve,arguments)}function Gve(e,t,n,r,i,o,a,s,l){if(Uve.apply(this,arguments),Zv){if(Zv){var u=m5;Zv=!1,m5=null}else throw Error(Fe(198));g5||(g5=!0,m9=u)}}function sp(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ez(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function fM(e){if(sp(e)!==e)throw Error(Fe(188))}function qve(e){var t=e.alternate;if(!t){if(t=sp(e),t===null)throw Error(Fe(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return fM(i),e;if(o===r)return fM(i),t;o=o.sibling}throw Error(Fe(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(Fe(189))}}if(n.alternate!==r)throw Error(Fe(190))}if(n.tag!==3)throw Error(Fe(188));return n.stateNode.current===n?e:t}function Pz(e){return e=qve(e),e!==null?Tz(e):null}function Tz(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tz(e);if(t!==null)return t;e=e.sibling}return null}var Lz=Ma.unstable_scheduleCallback,hM=Ma.unstable_cancelCallback,Yve=Ma.unstable_shouldYield,Kve=Ma.unstable_requestPaint,Zr=Ma.unstable_now,Xve=Ma.unstable_getCurrentPriorityLevel,Wk=Ma.unstable_ImmediatePriority,Az=Ma.unstable_UserBlockingPriority,v5=Ma.unstable_NormalPriority,Zve=Ma.unstable_LowPriority,Oz=Ma.unstable_IdlePriority,ax=null,Jl=null;function Qve(e){if(Jl&&typeof Jl.onCommitFiberRoot=="function")try{Jl.onCommitFiberRoot(ax,e,void 0,(e.current.flags&128)===128)}catch{}}var Ys=Math.clz32?Math.clz32:t2e,Jve=Math.log,e2e=Math.LN2;function t2e(e){return e>>>=0,e===0?32:31-(Jve(e)/e2e|0)|0}var sb=64,lb=4194304;function xv(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 y5(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=xv(s):(o&=a,o!==0&&(r=xv(o)))}else a=n&~i,a!==0?r=xv(a):o!==0&&(r=xv(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ys(t),i=1<<n,r|=e[n],t&=~i;return r}function n2e(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function r2e(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Ys(o),s=1<<a,l=i[a];l===-1?(!(s&n)||s&r)&&(i[a]=n2e(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function g9(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Mz(){var e=sb;return sb<<=1,!(sb&4194240)&&(sb=64),e}function R6(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ty(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ys(t),e[t]=n}function i2e(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ys(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Uk(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ys(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var $n=0;function Iz(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Rz,Gk,Dz,Nz,jz,v9=!1,ub=[],Ad=null,Od=null,Md=null,D2=new Map,N2=new Map,bd=[],o2e="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pM(e,t){switch(e){case"focusin":case"focusout":Ad=null;break;case"dragenter":case"dragleave":Od=null;break;case"mouseover":case"mouseout":Md=null;break;case"pointerover":case"pointerout":D2.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":N2.delete(t.pointerId)}}function X1(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Ay(t),t!==null&&Gk(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function a2e(e,t,n,r,i){switch(t){case"focusin":return Ad=X1(Ad,e,t,n,r,i),!0;case"dragenter":return Od=X1(Od,e,t,n,r,i),!0;case"mouseover":return Md=X1(Md,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return D2.set(o,X1(D2.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,N2.set(o,X1(N2.get(o)||null,e,t,n,r,i)),!0}return!1}function Bz(e){var t=kh(e.target);if(t!==null){var n=sp(t);if(n!==null){if(t=n.tag,t===13){if(t=Ez(n),t!==null){e.blockedOn=t,jz(e.priority,function(){Dz(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function v4(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=y9(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);f9=r,n.target.dispatchEvent(r),f9=null}else return t=Ay(n),t!==null&&Gk(t),e.blockedOn=n,!1;t.shift()}return!0}function mM(e,t,n){v4(e)&&n.delete(t)}function s2e(){v9=!1,Ad!==null&&v4(Ad)&&(Ad=null),Od!==null&&v4(Od)&&(Od=null),Md!==null&&v4(Md)&&(Md=null),D2.forEach(mM),N2.forEach(mM)}function Z1(e,t){e.blockedOn===t&&(e.blockedOn=null,v9||(v9=!0,Ma.unstable_scheduleCallback(Ma.unstable_NormalPriority,s2e)))}function j2(e){function t(i){return Z1(i,e)}if(0<ub.length){Z1(ub[0],e);for(var n=1;n<ub.length;n++){var r=ub[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ad!==null&&Z1(Ad,e),Od!==null&&Z1(Od,e),Md!==null&&Z1(Md,e),D2.forEach(t),N2.forEach(t),n=0;n<bd.length;n++)r=bd[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<bd.length&&(n=bd[0],n.blockedOn===null);)Bz(n),n.blockedOn===null&&bd.shift()}var Lg=cc.ReactCurrentBatchConfig,b5=!0;function l2e(e,t,n,r){var i=$n,o=Lg.transition;Lg.transition=null;try{$n=1,qk(e,t,n,r)}finally{$n=i,Lg.transition=o}}function u2e(e,t,n,r){var i=$n,o=Lg.transition;Lg.transition=null;try{$n=4,qk(e,t,n,r)}finally{$n=i,Lg.transition=o}}function qk(e,t,n,r){if(b5){var i=y9(e,t,n,r);if(i===null)W6(e,t,r,S5,n),pM(e,r);else if(a2e(i,e,t,n,r))r.stopPropagation();else if(pM(e,r),t&4&&-1<o2e.indexOf(e)){for(;i!==null;){var o=Ay(i);if(o!==null&&Rz(o),o=y9(e,t,n,r),o===null&&W6(e,t,r,S5,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else W6(e,t,r,null,n)}}var S5=null;function y9(e,t,n,r){if(S5=null,e=Vk(r),e=kh(e),e!==null)if(t=sp(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ez(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return S5=e,null}function $z(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xve()){case Wk:return 1;case Az:return 4;case v5:case Zve:return 16;case Oz:return 536870912;default:return 16}default:return 16}}var kd=null,Yk=null,y4=null;function Fz(){if(y4)return y4;var e,t=Yk,n=t.length,r,i="value"in kd?kd.value:kd.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return y4=i.slice(e,1<r?1-r:void 0)}function b4(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function cb(){return!0}function gM(){return!1}function ja(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?cb:gM,this.isPropagationStopped=gM,this}return Tr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=cb)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cb)},persist:function(){},isPersistent:cb}),t}var x0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kk=ja(x0),Ly=Tr({},x0,{view:0,detail:0}),c2e=ja(Ly),D6,N6,Q1,sx=Tr({},Ly,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xk,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Q1&&(Q1&&e.type==="mousemove"?(D6=e.screenX-Q1.screenX,N6=e.screenY-Q1.screenY):N6=D6=0,Q1=e),D6)},movementY:function(e){return"movementY"in e?e.movementY:N6}}),vM=ja(sx),d2e=Tr({},sx,{dataTransfer:0}),f2e=ja(d2e),h2e=Tr({},Ly,{relatedTarget:0}),j6=ja(h2e),p2e=Tr({},x0,{animationName:0,elapsedTime:0,pseudoElement:0}),m2e=ja(p2e),g2e=Tr({},x0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),v2e=ja(g2e),y2e=Tr({},x0,{data:0}),yM=ja(y2e),b2e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S2e={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},x2e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w2e(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=x2e[e])?!!t[e]:!1}function Xk(){return w2e}var C2e=Tr({},Ly,{key:function(e){if(e.key){var t=b2e[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=b4(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?S2e[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xk,charCode:function(e){return e.type==="keypress"?b4(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?b4(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_2e=ja(C2e),k2e=Tr({},sx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bM=ja(k2e),E2e=Tr({},Ly,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xk}),P2e=ja(E2e),T2e=Tr({},x0,{propertyName:0,elapsedTime:0,pseudoElement:0}),L2e=ja(T2e),A2e=Tr({},sx,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),O2e=ja(A2e),M2e=[9,13,27,32],Zk=nc&&"CompositionEvent"in window,Qv=null;nc&&"documentMode"in document&&(Qv=document.documentMode);var I2e=nc&&"TextEvent"in window&&!Qv,zz=nc&&(!Zk||Qv&&8<Qv&&11>=Qv),SM=String.fromCharCode(32),xM=!1;function Hz(e,t){switch(e){case"keyup":return M2e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vz(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qm=!1;function R2e(e,t){switch(e){case"compositionend":return Vz(t);case"keypress":return t.which!==32?null:(xM=!0,SM);case"textInput":return e=t.data,e===SM&&xM?null:e;default:return null}}function D2e(e,t){if(Qm)return e==="compositionend"||!Zk&&Hz(e,t)?(e=Fz(),y4=Yk=kd=null,Qm=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zz&&t.locale!=="ko"?null:t.data;default:return null}}var N2e={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!N2e[e.type]:t==="textarea"}function Wz(e,t,n,r){xz(r),t=x5(t,"onChange"),0<t.length&&(n=new Kk("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jv=null,B2=null;function j2e(e){tH(e,0)}function lx(e){var t=tg(e);if(pz(t))return e}function B2e(e,t){if(e==="change")return t}var Uz=!1;if(nc){var B6;if(nc){var $6="oninput"in document;if(!$6){var CM=document.createElement("div");CM.setAttribute("oninput","return;"),$6=typeof CM.oninput=="function"}B6=$6}else B6=!1;Uz=B6&&(!document.documentMode||9<document.documentMode)}function _M(){Jv&&(Jv.detachEvent("onpropertychange",Gz),B2=Jv=null)}function Gz(e){if(e.propertyName==="value"&&lx(B2)){var t=[];Wz(t,B2,e,Vk(e)),kz(j2e,t)}}function $2e(e,t,n){e==="focusin"?(_M(),Jv=t,B2=n,Jv.attachEvent("onpropertychange",Gz)):e==="focusout"&&_M()}function F2e(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lx(B2)}function z2e(e,t){if(e==="click")return lx(t)}function H2e(e,t){if(e==="input"||e==="change")return lx(t)}function V2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Js=typeof Object.is=="function"?Object.is:V2e;function $2(e,t){if(Js(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!e9.call(t,i)||!Js(e[i],t[i]))return!1}return!0}function kM(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function EM(e,t){var n=kM(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kM(n)}}function qz(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qz(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yz(){for(var e=window,t=p5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=p5(e.document)}return t}function Qk(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 W2e(e){var t=Yz(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qz(n.ownerDocument.documentElement,n)){if(r!==null&&Qk(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=EM(n,o);var a=EM(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var U2e=nc&&"documentMode"in document&&11>=document.documentMode,Jm=null,b9=null,e2=null,S9=!1;function PM(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;S9||Jm==null||Jm!==p5(r)||(r=Jm,"selectionStart"in r&&Qk(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}),e2&&$2(e2,r)||(e2=r,r=x5(b9,"onSelect"),0<r.length&&(t=new Kk("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Jm)))}function db(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var eg={animationend:db("Animation","AnimationEnd"),animationiteration:db("Animation","AnimationIteration"),animationstart:db("Animation","AnimationStart"),transitionend:db("Transition","TransitionEnd")},F6={},Kz={};nc&&(Kz=document.createElement("div").style,"AnimationEvent"in window||(delete eg.animationend.animation,delete eg.animationiteration.animation,delete eg.animationstart.animation),"TransitionEvent"in window||delete eg.transitionend.transition);function ux(e){if(F6[e])return F6[e];if(!eg[e])return e;var t=eg[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Kz)return F6[e]=t[n];return e}var Xz=ux("animationend"),Zz=ux("animationiteration"),Qz=ux("animationstart"),Jz=ux("transitionend"),eH=new Map,TM="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function of(e,t){eH.set(e,t),ap(t,[e])}for(var z6=0;z6<TM.length;z6++){var H6=TM[z6],G2e=H6.toLowerCase(),q2e=H6[0].toUpperCase()+H6.slice(1);of(G2e,"on"+q2e)}of(Xz,"onAnimationEnd");of(Zz,"onAnimationIteration");of(Qz,"onAnimationStart");of("dblclick","onDoubleClick");of("focusin","onFocus");of("focusout","onBlur");of(Jz,"onTransitionEnd");Zg("onMouseEnter",["mouseout","mouseover"]);Zg("onMouseLeave",["mouseout","mouseover"]);Zg("onPointerEnter",["pointerout","pointerover"]);Zg("onPointerLeave",["pointerout","pointerover"]);ap("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ap("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ap("onBeforeInput",["compositionend","keypress","textInput","paste"]);ap("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ap("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ap("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wv="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Y2e=new Set("cancel close invalid load scroll toggle".split(" ").concat(wv));function LM(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Gve(r,t,void 0,e),e.currentTarget=null}function tH(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;LM(i,s,u),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;LM(i,s,u),o=l}}}if(g5)throw e=m9,g5=!1,m9=null,e}function or(e,t){var n=t[k9];n===void 0&&(n=t[k9]=new Set);var r=e+"__bubble";n.has(r)||(nH(t,e,2,!1),n.add(r))}function V6(e,t,n){var r=0;t&&(r|=4),nH(n,e,r,t)}var fb="_reactListening"+Math.random().toString(36).slice(2);function F2(e){if(!e[fb]){e[fb]=!0,uz.forEach(function(n){n!=="selectionchange"&&(Y2e.has(n)||V6(n,!1,e),V6(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fb]||(t[fb]=!0,V6("selectionchange",!1,t))}}function nH(e,t,n,r){switch($z(t)){case 1:var i=l2e;break;case 4:i=u2e;break;default:i=qk}n=i.bind(null,t,n,e),i=void 0,!p9||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function W6(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=kh(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}kz(function(){var u=o,d=Vk(n),h=[];e:{var g=eH.get(e);if(g!==void 0){var v=Kk,b=e;switch(e){case"keypress":if(b4(n)===0)break e;case"keydown":case"keyup":v=_2e;break;case"focusin":b="focus",v=j6;break;case"focusout":b="blur",v=j6;break;case"beforeblur":case"afterblur":v=j6;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=vM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=f2e;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=P2e;break;case Xz:case Zz:case Qz:v=m2e;break;case Jz:v=L2e;break;case"scroll":v=c2e;break;case"wheel":v=O2e;break;case"copy":case"cut":case"paste":v=v2e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=bM}var S=(t&4)!==0,E=!S&&e==="scroll",_=S?g!==null?g+"Capture":null:g;S=[];for(var k=u,T;k!==null;){T=k;var A=T.stateNode;if(T.tag===5&&A!==null&&(T=A,_!==null&&(A=R2(k,_),A!=null&&S.push(z2(k,A,T)))),E)break;k=k.return}0<S.length&&(g=new v(g,b,null,n,d),h.push({event:g,listeners:S}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",g&&n!==f9&&(b=n.relatedTarget||n.fromElement)&&(kh(b)||b[rc]))break e;if((v||g)&&(g=d.window===d?d:(g=d.ownerDocument)?g.defaultView||g.parentWindow:window,v?(b=n.relatedTarget||n.toElement,v=u,b=b?kh(b):null,b!==null&&(E=sp(b),b!==E||b.tag!==5&&b.tag!==6)&&(b=null)):(v=null,b=u),v!==b)){if(S=vM,A="onMouseLeave",_="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(S=bM,A="onPointerLeave",_="onPointerEnter",k="pointer"),E=v==null?g:tg(v),T=b==null?g:tg(b),g=new S(A,k+"leave",v,n,d),g.target=E,g.relatedTarget=T,A=null,kh(d)===u&&(S=new S(_,k+"enter",b,n,d),S.target=T,S.relatedTarget=E,A=S),E=A,v&&b)t:{for(S=v,_=b,k=0,T=S;T;T=Pm(T))k++;for(T=0,A=_;A;A=Pm(A))T++;for(;0<k-T;)S=Pm(S),k--;for(;0<T-k;)_=Pm(_),T--;for(;k--;){if(S===_||_!==null&&S===_.alternate)break t;S=Pm(S),_=Pm(_)}S=null}else S=null;v!==null&&AM(h,g,v,S,!1),b!==null&&E!==null&&AM(h,E,b,S,!0)}}e:{if(g=u?tg(u):window,v=g.nodeName&&g.nodeName.toLowerCase(),v==="select"||v==="input"&&g.type==="file")var M=B2e;else if(wM(g))if(Uz)M=H2e;else{M=F2e;var R=$2e}else(v=g.nodeName)&&v.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(M=z2e);if(M&&(M=M(e,u))){Wz(h,M,n,d);break e}R&&R(e,g,u),e==="focusout"&&(R=g._wrapperState)&&R.controlled&&g.type==="number"&&s9(g,"number",g.value)}switch(R=u?tg(u):window,e){case"focusin":(wM(R)||R.contentEditable==="true")&&(Jm=R,b9=u,e2=null);break;case"focusout":e2=b9=Jm=null;break;case"mousedown":S9=!0;break;case"contextmenu":case"mouseup":case"dragend":S9=!1,PM(h,n,d);break;case"selectionchange":if(U2e)break;case"keydown":case"keyup":PM(h,n,d)}var D;if(Zk)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Qm?Hz(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(zz&&n.locale!=="ko"&&(Qm||j!=="onCompositionStart"?j==="onCompositionEnd"&&Qm&&(D=Fz()):(kd=d,Yk="value"in kd?kd.value:kd.textContent,Qm=!0)),R=x5(u,j),0<R.length&&(j=new yM(j,e,null,n,d),h.push({event:j,listeners:R}),D?j.data=D:(D=Vz(n),D!==null&&(j.data=D)))),(D=I2e?R2e(e,n):D2e(e,n))&&(u=x5(u,"onBeforeInput"),0<u.length&&(d=new yM("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=D))}tH(h,t)})}function z2(e,t,n){return{instance:e,listener:t,currentTarget:n}}function x5(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=R2(e,n),o!=null&&r.unshift(z2(e,o,i)),o=R2(e,t),o!=null&&r.push(z2(e,o,i))),e=e.return}return r}function Pm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function AM(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,i?(l=R2(n,o),l!=null&&a.unshift(z2(n,l,s))):i||(l=R2(n,o),l!=null&&a.push(z2(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var K2e=/\r\n?/g,X2e=/\u0000|\uFFFD/g;function OM(e){return(typeof e=="string"?e:""+e).replace(K2e,`
|
||
`).replace(X2e,"")}function hb(e,t,n){if(t=OM(t),OM(e)!==t&&n)throw Error(Fe(425))}function w5(){}var x9=null,w9=null;function C9(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _9=typeof setTimeout=="function"?setTimeout:void 0,Z2e=typeof clearTimeout=="function"?clearTimeout:void 0,MM=typeof Promise=="function"?Promise:void 0,Q2e=typeof queueMicrotask=="function"?queueMicrotask:typeof MM<"u"?function(e){return MM.resolve(null).then(e).catch(J2e)}:_9;function J2e(e){setTimeout(function(){throw e})}function U6(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),j2(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);j2(t)}function Id(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function IM(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var w0=Math.random().toString(36).slice(2),Hl="__reactFiber$"+w0,H2="__reactProps$"+w0,rc="__reactContainer$"+w0,k9="__reactEvents$"+w0,eye="__reactListeners$"+w0,tye="__reactHandles$"+w0;function kh(e){var t=e[Hl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rc]||n[Hl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=IM(e);e!==null;){if(n=e[Hl])return n;e=IM(e)}return t}e=n,n=e.parentNode}return null}function Ay(e){return e=e[Hl]||e[rc],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function tg(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Fe(33))}function cx(e){return e[H2]||null}var E9=[],ng=-1;function af(e){return{current:e}}function fr(e){0>ng||(e.current=E9[ng],E9[ng]=null,ng--)}function nr(e,t){ng++,E9[ng]=e.current,e.current=t}var Gd={},lo=af(Gd),Jo=af(!1),qh=Gd;function Qg(e,t){var n=e.type.contextTypes;if(!n)return Gd;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 ea(e){return e=e.childContextTypes,e!=null}function C5(){fr(Jo),fr(lo)}function RM(e,t,n){if(lo.current!==Gd)throw Error(Fe(168));nr(lo,t),nr(Jo,n)}function rH(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Fe(108,$ve(e)||"Unknown",i));return Tr({},n,r)}function _5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gd,qh=lo.current,nr(lo,e),nr(Jo,Jo.current),!0}function DM(e,t,n){var r=e.stateNode;if(!r)throw Error(Fe(169));n?(e=rH(e,t,qh),r.__reactInternalMemoizedMergedChildContext=e,fr(Jo),fr(lo),nr(lo,e)):fr(Jo),nr(Jo,n)}var Vu=null,dx=!1,G6=!1;function iH(e){Vu===null?Vu=[e]:Vu.push(e)}function nye(e){dx=!0,iH(e)}function sf(){if(!G6&&Vu!==null){G6=!0;var e=0,t=$n;try{var n=Vu;for($n=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vu=null,dx=!1}catch(i){throw Vu!==null&&(Vu=Vu.slice(e+1)),Lz(Wk,sf),i}finally{$n=t,G6=!1}}return null}var rg=[],ig=0,k5=null,E5=0,Za=[],Qa=0,Yh=null,Gu=1,qu="";function dh(e,t){rg[ig++]=E5,rg[ig++]=k5,k5=e,E5=t}function oH(e,t,n){Za[Qa++]=Gu,Za[Qa++]=qu,Za[Qa++]=Yh,Yh=e;var r=Gu;e=qu;var i=32-Ys(r)-1;r&=~(1<<i),n+=1;var o=32-Ys(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Gu=1<<32-Ys(t)+i|n<<i|r,qu=o+e}else Gu=1<<o|n<<i|r,qu=e}function Jk(e){e.return!==null&&(dh(e,1),oH(e,1,0))}function eE(e){for(;e===k5;)k5=rg[--ig],rg[ig]=null,E5=rg[--ig],rg[ig]=null;for(;e===Yh;)Yh=Za[--Qa],Za[Qa]=null,qu=Za[--Qa],Za[Qa]=null,Gu=Za[--Qa],Za[Qa]=null}var La=null,Ea=null,yr=!1,$s=null;function aH(e,t){var n=ns(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function NM(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,La=e,Ea=Id(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,La=e,Ea=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yh!==null?{id:Gu,overflow:qu}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ns(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,La=e,Ea=null,!0):!1;default:return!1}}function P9(e){return(e.mode&1)!==0&&(e.flags&128)===0}function T9(e){if(yr){var t=Ea;if(t){var n=t;if(!NM(e,t)){if(P9(e))throw Error(Fe(418));t=Id(n.nextSibling);var r=La;t&&NM(e,t)?aH(r,n):(e.flags=e.flags&-4097|2,yr=!1,La=e)}}else{if(P9(e))throw Error(Fe(418));e.flags=e.flags&-4097|2,yr=!1,La=e}}}function jM(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;La=e}function pb(e){if(e!==La)return!1;if(!yr)return jM(e),yr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!C9(e.type,e.memoizedProps)),t&&(t=Ea)){if(P9(e))throw sH(),Error(Fe(418));for(;t;)aH(e,t),t=Id(t.nextSibling)}if(jM(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Fe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ea=Id(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ea=null}}else Ea=La?Id(e.stateNode.nextSibling):null;return!0}function sH(){for(var e=Ea;e;)e=Id(e.nextSibling)}function Jg(){Ea=La=null,yr=!1}function tE(e){$s===null?$s=[e]:$s.push(e)}var rye=cc.ReactCurrentBatchConfig;function Ns(e,t){if(e&&e.defaultProps){t=Tr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var P5=af(null),T5=null,og=null,nE=null;function rE(){nE=og=T5=null}function iE(e){var t=P5.current;fr(P5),e._currentValue=t}function L9(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ag(e,t){T5=e,nE=og=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xo=!0),e.firstContext=null)}function cs(e){var t=e._currentValue;if(nE!==e)if(e={context:e,memoizedValue:t,next:null},og===null){if(T5===null)throw Error(Fe(308));og=e,T5.dependencies={lanes:0,firstContext:e}}else og=og.next=e;return t}var Eh=null;function oE(e){Eh===null?Eh=[e]:Eh.push(e)}function lH(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,oE(t)):(n.next=i.next,i.next=n),t.interleaved=n,ic(e,r)}function ic(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var gd=!1;function aE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uH(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rd(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ic(e,n)}return i=r.interleaved,i===null?(t.next=t,oE(r)):(t.next=i.next,i.next=t),r.interleaved=t,ic(e,n)}function S4(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uk(e,n)}}function BM(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function L5(e,t,n,r){var i=e.updateQueue;gd=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=l))}if(o!==null){var h=i.baseState;a=0,d=u=l=null,s=o;do{var g=s.lane,v=s.eventTime;if((r&g)===g){d!==null&&(d=d.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var b=e,S=s;switch(g=t,v=n,S.tag){case 1:if(b=S.payload,typeof b=="function"){h=b.call(v,h,g);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=S.payload,g=typeof b=="function"?b.call(v,h,g):b,g==null)break e;h=Tr({},h,g);break e;case 2:gd=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[s]:g.push(s))}else v={eventTime:v,lane:g,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=v,l=h):d=d.next=v,a|=g;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;g=s,s=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(1);if(d===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Xh|=a,e.lanes=a,e.memoizedState=h}}function $M(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Fe(191,i));i.call(r)}}}var cH=new lz.Component().refs;function A9(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Tr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fx={isMounted:function(e){return(e=e._reactInternals)?sp(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=To(),i=Nd(e),o=Yu(r,i);o.payload=t,n!=null&&(o.callback=n),t=Rd(e,o,i),t!==null&&(Ks(t,e,i,r),S4(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=To(),i=Nd(e),o=Yu(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Rd(e,o,i),t!==null&&(Ks(t,e,i,r),S4(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=To(),r=Nd(e),i=Yu(n,r);i.tag=2,t!=null&&(i.callback=t),t=Rd(e,i,r),t!==null&&(Ks(t,e,r,n),S4(t,e,r))}};function FM(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!$2(n,r)||!$2(i,o):!0}function dH(e,t,n){var r=!1,i=Gd,o=t.contextType;return typeof o=="object"&&o!==null?o=cs(o):(i=ea(t)?qh:lo.current,r=t.contextTypes,o=(r=r!=null)?Qg(e,i):Gd),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fx,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function zM(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fx.enqueueReplaceState(t,t.state,null)}function O9(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=cH,aE(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=cs(o):(o=ea(t)?qh:lo.current,i.context=Qg(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(A9(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&fx.enqueueReplaceState(i,i.state,null),L5(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function J1(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Fe(309));var r=n.stateNode}if(!r)throw Error(Fe(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;s===cH&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Fe(284));if(!n._owner)throw Error(Fe(290,e))}return e}function mb(e,t){throw e=Object.prototype.toString.call(t),Error(Fe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function HM(e){var t=e._init;return t(e._payload)}function fH(e){function t(_,k){if(e){var T=_.deletions;T===null?(_.deletions=[k],_.flags|=16):T.push(k)}}function n(_,k){if(!e)return null;for(;k!==null;)t(_,k),k=k.sibling;return null}function r(_,k){for(_=new Map;k!==null;)k.key!==null?_.set(k.key,k):_.set(k.index,k),k=k.sibling;return _}function i(_,k){return _=jd(_,k),_.index=0,_.sibling=null,_}function o(_,k,T){return _.index=T,e?(T=_.alternate,T!==null?(T=T.index,T<k?(_.flags|=2,k):T):(_.flags|=2,k)):(_.flags|=1048576,k)}function a(_){return e&&_.alternate===null&&(_.flags|=2),_}function s(_,k,T,A){return k===null||k.tag!==6?(k=J6(T,_.mode,A),k.return=_,k):(k=i(k,T),k.return=_,k)}function l(_,k,T,A){var M=T.type;return M===Zm?d(_,k,T.props.children,A,T.key):k!==null&&(k.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===md&&HM(M)===k.type)?(A=i(k,T.props),A.ref=J1(_,k,T),A.return=_,A):(A=E4(T.type,T.key,T.props,null,_.mode,A),A.ref=J1(_,k,T),A.return=_,A)}function u(_,k,T,A){return k===null||k.tag!==4||k.stateNode.containerInfo!==T.containerInfo||k.stateNode.implementation!==T.implementation?(k=eC(T,_.mode,A),k.return=_,k):(k=i(k,T.children||[]),k.return=_,k)}function d(_,k,T,A,M){return k===null||k.tag!==7?(k=Fh(T,_.mode,A,M),k.return=_,k):(k=i(k,T),k.return=_,k)}function h(_,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return k=J6(""+k,_.mode,T),k.return=_,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case ib:return T=E4(k.type,k.key,k.props,null,_.mode,T),T.ref=J1(_,null,k),T.return=_,T;case Xm:return k=eC(k,_.mode,T),k.return=_,k;case md:var A=k._init;return h(_,A(k._payload),T)}if(Sv(k)||Y1(k))return k=Fh(k,_.mode,T,null),k.return=_,k;mb(_,k)}return null}function g(_,k,T,A){var M=k!==null?k.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return M!==null?null:s(_,k,""+T,A);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ib:return T.key===M?l(_,k,T,A):null;case Xm:return T.key===M?u(_,k,T,A):null;case md:return M=T._init,g(_,k,M(T._payload),A)}if(Sv(T)||Y1(T))return M!==null?null:d(_,k,T,A,null);mb(_,T)}return null}function v(_,k,T,A,M){if(typeof A=="string"&&A!==""||typeof A=="number")return _=_.get(T)||null,s(k,_,""+A,M);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case ib:return _=_.get(A.key===null?T:A.key)||null,l(k,_,A,M);case Xm:return _=_.get(A.key===null?T:A.key)||null,u(k,_,A,M);case md:var R=A._init;return v(_,k,T,R(A._payload),M)}if(Sv(A)||Y1(A))return _=_.get(T)||null,d(k,_,A,M,null);mb(k,A)}return null}function b(_,k,T,A){for(var M=null,R=null,D=k,j=k=0,F=null;D!==null&&j<T.length;j++){D.index>j?(F=D,D=null):F=D.sibling;var H=g(_,D,T[j],A);if(H===null){D===null&&(D=F);break}e&&D&&H.alternate===null&&t(_,D),k=o(H,k,j),R===null?M=H:R.sibling=H,R=H,D=F}if(j===T.length)return n(_,D),yr&&dh(_,j),M;if(D===null){for(;j<T.length;j++)D=h(_,T[j],A),D!==null&&(k=o(D,k,j),R===null?M=D:R.sibling=D,R=D);return yr&&dh(_,j),M}for(D=r(_,D);j<T.length;j++)F=v(D,_,j,T[j],A),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?j:F.key),k=o(F,k,j),R===null?M=F:R.sibling=F,R=F);return e&&D.forEach(function(K){return t(_,K)}),yr&&dh(_,j),M}function S(_,k,T,A){var M=Y1(T);if(typeof M!="function")throw Error(Fe(150));if(T=M.call(T),T==null)throw Error(Fe(151));for(var R=M=null,D=k,j=k=0,F=null,H=T.next();D!==null&&!H.done;j++,H=T.next()){D.index>j?(F=D,D=null):F=D.sibling;var K=g(_,D,H.value,A);if(K===null){D===null&&(D=F);break}e&&D&&K.alternate===null&&t(_,D),k=o(K,k,j),R===null?M=K:R.sibling=K,R=K,D=F}if(H.done)return n(_,D),yr&&dh(_,j),M;if(D===null){for(;!H.done;j++,H=T.next())H=h(_,H.value,A),H!==null&&(k=o(H,k,j),R===null?M=H:R.sibling=H,R=H);return yr&&dh(_,j),M}for(D=r(_,D);!H.done;j++,H=T.next())H=v(D,_,j,H.value,A),H!==null&&(e&&H.alternate!==null&&D.delete(H.key===null?j:H.key),k=o(H,k,j),R===null?M=H:R.sibling=H,R=H);return e&&D.forEach(function(te){return t(_,te)}),yr&&dh(_,j),M}function E(_,k,T,A){if(typeof T=="object"&&T!==null&&T.type===Zm&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ib:e:{for(var M=T.key,R=k;R!==null;){if(R.key===M){if(M=T.type,M===Zm){if(R.tag===7){n(_,R.sibling),k=i(R,T.props.children),k.return=_,_=k;break e}}else if(R.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===md&&HM(M)===R.type){n(_,R.sibling),k=i(R,T.props),k.ref=J1(_,R,T),k.return=_,_=k;break e}n(_,R);break}else t(_,R);R=R.sibling}T.type===Zm?(k=Fh(T.props.children,_.mode,A,T.key),k.return=_,_=k):(A=E4(T.type,T.key,T.props,null,_.mode,A),A.ref=J1(_,k,T),A.return=_,_=A)}return a(_);case Xm:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(_,k.sibling),k=i(k,T.children||[]),k.return=_,_=k;break e}else{n(_,k);break}else t(_,k);k=k.sibling}k=eC(T,_.mode,A),k.return=_,_=k}return a(_);case md:return R=T._init,E(_,k,R(T._payload),A)}if(Sv(T))return b(_,k,T,A);if(Y1(T))return S(_,k,T,A);mb(_,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(_,k.sibling),k=i(k,T),k.return=_,_=k):(n(_,k),k=J6(T,_.mode,A),k.return=_,_=k),a(_)):n(_,k)}return E}var e0=fH(!0),hH=fH(!1),Oy={},eu=af(Oy),V2=af(Oy),W2=af(Oy);function Ph(e){if(e===Oy)throw Error(Fe(174));return e}function sE(e,t){switch(nr(W2,t),nr(V2,e),nr(eu,Oy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:u9(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=u9(t,e)}fr(eu),nr(eu,t)}function t0(){fr(eu),fr(V2),fr(W2)}function pH(e){Ph(W2.current);var t=Ph(eu.current),n=u9(t,e.type);t!==n&&(nr(V2,e),nr(eu,n))}function lE(e){V2.current===e&&(fr(eu),fr(V2))}var kr=af(0);function A5(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)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 q6=[];function uE(){for(var e=0;e<q6.length;e++)q6[e]._workInProgressVersionPrimary=null;q6.length=0}var x4=cc.ReactCurrentDispatcher,Y6=cc.ReactCurrentBatchConfig,Kh=0,Pr=null,mi=null,Ti=null,O5=!1,t2=!1,U2=0,iye=0;function Ji(){throw Error(Fe(321))}function cE(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Js(e[n],t[n]))return!1;return!0}function dE(e,t,n,r,i,o){if(Kh=o,Pr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,x4.current=e===null||e.memoizedState===null?lye:uye,e=n(r,i),t2){o=0;do{if(t2=!1,U2=0,25<=o)throw Error(Fe(301));o+=1,Ti=mi=null,t.updateQueue=null,x4.current=cye,e=n(r,i)}while(t2)}if(x4.current=M5,t=mi!==null&&mi.next!==null,Kh=0,Ti=mi=Pr=null,O5=!1,t)throw Error(Fe(300));return e}function fE(){var e=U2!==0;return U2=0,e}function Nl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ti===null?Pr.memoizedState=Ti=e:Ti=Ti.next=e,Ti}function ds(){if(mi===null){var e=Pr.alternate;e=e!==null?e.memoizedState:null}else e=mi.next;var t=Ti===null?Pr.memoizedState:Ti.next;if(t!==null)Ti=t,mi=e;else{if(e===null)throw Error(Fe(310));mi=e,e={memoizedState:mi.memoizedState,baseState:mi.baseState,baseQueue:mi.baseQueue,queue:mi.queue,next:null},Ti===null?Pr.memoizedState=Ti=e:Ti=Ti.next=e}return Ti}function G2(e,t){return typeof t=="function"?t(e):t}function K6(e){var t=ds(),n=t.queue;if(n===null)throw Error(Fe(311));n.lastRenderedReducer=e;var r=mi,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var d=u.lane;if((Kh&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=h,a=r):l=l.next=h,Pr.lanes|=d,Xh|=d}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,Js(r,t.memoizedState)||(Xo=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Pr.lanes|=o,Xh|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function X6(e){var t=ds(),n=t.queue;if(n===null)throw Error(Fe(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Js(o,t.memoizedState)||(Xo=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function mH(){}function gH(e,t){var n=Pr,r=ds(),i=t(),o=!Js(r.memoizedState,i);if(o&&(r.memoizedState=i,Xo=!0),r=r.queue,hE(bH.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ti!==null&&Ti.memoizedState.tag&1){if(n.flags|=2048,q2(9,yH.bind(null,n,r,i,t),void 0,null),Li===null)throw Error(Fe(349));Kh&30||vH(n,t,i)}return i}function vH(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Pr.updateQueue,t===null?(t={lastEffect:null,stores:null},Pr.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function yH(e,t,n,r){t.value=n,t.getSnapshot=r,SH(t)&&xH(e)}function bH(e,t,n){return n(function(){SH(t)&&xH(e)})}function SH(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Js(e,n)}catch{return!0}}function xH(e){var t=ic(e,1);t!==null&&Ks(t,e,1,-1)}function VM(e){var t=Nl();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:G2,lastRenderedState:e},t.queue=e,e=e.dispatch=sye.bind(null,Pr,e),[t.memoizedState,e]}function q2(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Pr.updateQueue,t===null?(t={lastEffect:null,stores:null},Pr.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function wH(){return ds().memoizedState}function w4(e,t,n,r){var i=Nl();Pr.flags|=e,i.memoizedState=q2(1|t,n,void 0,r===void 0?null:r)}function hx(e,t,n,r){var i=ds();r=r===void 0?null:r;var o=void 0;if(mi!==null){var a=mi.memoizedState;if(o=a.destroy,r!==null&&cE(r,a.deps)){i.memoizedState=q2(t,n,o,r);return}}Pr.flags|=e,i.memoizedState=q2(1|t,n,o,r)}function WM(e,t){return w4(8390656,8,e,t)}function hE(e,t){return hx(2048,8,e,t)}function CH(e,t){return hx(4,2,e,t)}function _H(e,t){return hx(4,4,e,t)}function kH(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function EH(e,t,n){return n=n!=null?n.concat([e]):null,hx(4,4,kH.bind(null,t,e),n)}function pE(){}function PH(e,t){var n=ds();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cE(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function TH(e,t){var n=ds();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cE(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function LH(e,t,n){return Kh&21?(Js(n,t)||(n=Mz(),Pr.lanes|=n,Xh|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xo=!0),e.memoizedState=n)}function oye(e,t){var n=$n;$n=n!==0&&4>n?n:4,e(!0);var r=Y6.transition;Y6.transition={};try{e(!1),t()}finally{$n=n,Y6.transition=r}}function AH(){return ds().memoizedState}function aye(e,t,n){var r=Nd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},OH(e))MH(t,n);else if(n=lH(e,t,n,r),n!==null){var i=To();Ks(n,e,r,i),IH(n,t,r)}}function sye(e,t,n){var r=Nd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(OH(e))MH(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,Js(s,a)){var l=t.interleaved;l===null?(i.next=i,oE(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lH(e,t,i,r),n!==null&&(i=To(),Ks(n,e,r,i),IH(n,t,r))}}function OH(e){var t=e.alternate;return e===Pr||t!==null&&t===Pr}function MH(e,t){t2=O5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function IH(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uk(e,n)}}var M5={readContext:cs,useCallback:Ji,useContext:Ji,useEffect:Ji,useImperativeHandle:Ji,useInsertionEffect:Ji,useLayoutEffect:Ji,useMemo:Ji,useReducer:Ji,useRef:Ji,useState:Ji,useDebugValue:Ji,useDeferredValue:Ji,useTransition:Ji,useMutableSource:Ji,useSyncExternalStore:Ji,useId:Ji,unstable_isNewReconciler:!1},lye={readContext:cs,useCallback:function(e,t){return Nl().memoizedState=[e,t===void 0?null:t],e},useContext:cs,useEffect:WM,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,w4(4194308,4,kH.bind(null,t,e),n)},useLayoutEffect:function(e,t){return w4(4194308,4,e,t)},useInsertionEffect:function(e,t){return w4(4,2,e,t)},useMemo:function(e,t){var n=Nl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nl();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=aye.bind(null,Pr,e),[r.memoizedState,e]},useRef:function(e){var t=Nl();return e={current:e},t.memoizedState=e},useState:VM,useDebugValue:pE,useDeferredValue:function(e){return Nl().memoizedState=e},useTransition:function(){var e=VM(!1),t=e[0];return e=oye.bind(null,e[1]),Nl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pr,i=Nl();if(yr){if(n===void 0)throw Error(Fe(407));n=n()}else{if(n=t(),Li===null)throw Error(Fe(349));Kh&30||vH(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,WM(bH.bind(null,r,o,e),[e]),r.flags|=2048,q2(9,yH.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Nl(),t=Li.identifierPrefix;if(yr){var n=qu,r=Gu;n=(r&~(1<<32-Ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=U2++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=iye++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uye={readContext:cs,useCallback:PH,useContext:cs,useEffect:hE,useImperativeHandle:EH,useInsertionEffect:CH,useLayoutEffect:_H,useMemo:TH,useReducer:K6,useRef:wH,useState:function(){return K6(G2)},useDebugValue:pE,useDeferredValue:function(e){var t=ds();return LH(t,mi.memoizedState,e)},useTransition:function(){var e=K6(G2)[0],t=ds().memoizedState;return[e,t]},useMutableSource:mH,useSyncExternalStore:gH,useId:AH,unstable_isNewReconciler:!1},cye={readContext:cs,useCallback:PH,useContext:cs,useEffect:hE,useImperativeHandle:EH,useInsertionEffect:CH,useLayoutEffect:_H,useMemo:TH,useReducer:X6,useRef:wH,useState:function(){return X6(G2)},useDebugValue:pE,useDeferredValue:function(e){var t=ds();return mi===null?t.memoizedState=e:LH(t,mi.memoizedState,e)},useTransition:function(){var e=X6(G2)[0],t=ds().memoizedState;return[e,t]},useMutableSource:mH,useSyncExternalStore:gH,useId:AH,unstable_isNewReconciler:!1};function n0(e,t){try{var n="",r=t;do n+=Bve(r),r=r.return;while(r);var i=n}catch(o){i=`
|
||
Error generating stack: `+o.message+`
|
||
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Z6(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function M9(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var dye=typeof WeakMap=="function"?WeakMap:Map;function RH(e,t,n){n=Yu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){R5||(R5=!0,H9=r),M9(e,t)},n}function DH(e,t,n){n=Yu(-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(){M9(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){M9(e,t),typeof r!="function"&&(Dd===null?Dd=new Set([this]):Dd.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function UM(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dye;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=kye.bind(null,e,t,n),t.then(e,e))}function GM(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 qM(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Yu(-1,1),t.tag=2,Rd(n,t,1))),n.lanes|=1),e)}var fye=cc.ReactCurrentOwner,Xo=!1;function wo(e,t,n,r){t.child=e===null?hH(t,null,n,r):e0(t,e.child,n,r)}function YM(e,t,n,r,i){n=n.render;var o=t.ref;return Ag(t,i),r=dE(e,t,n,r,o,i),n=fE(),e!==null&&!Xo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oc(e,t,i)):(yr&&n&&Jk(t),t.flags|=1,wo(e,t,r,i),t.child)}function KM(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!wE(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,NH(e,t,o,r,i)):(e=E4(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)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:$2,n(a,r)&&e.ref===t.ref)return oc(e,t,i)}return t.flags|=1,e=jd(o,r),e.ref=t.ref,e.return=t,t.child=e}function NH(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if($2(o,r)&&e.ref===t.ref)if(Xo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Xo=!0);else return t.lanes=e.lanes,oc(e,t,i)}return I9(e,t,n,r,i)}function jH(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},nr(sg,_a),_a|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,nr(sg,_a),_a|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,nr(sg,_a),_a|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,nr(sg,_a),_a|=r;return wo(e,t,i,n),t.child}function BH(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function I9(e,t,n,r,i){var o=ea(n)?qh:lo.current;return o=Qg(t,o),Ag(t,i),n=dE(e,t,n,r,o,i),r=fE(),e!==null&&!Xo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oc(e,t,i)):(yr&&r&&Jk(t),t.flags|=1,wo(e,t,n,i),t.child)}function XM(e,t,n,r,i){if(ea(n)){var o=!0;_5(t)}else o=!1;if(Ag(t,i),t.stateNode===null)C4(e,t),dH(t,n,r),O9(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=cs(u):(u=ea(n)?qh:lo.current,u=Qg(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&zM(t,a,r,u),gd=!1;var g=t.memoizedState;a.state=g,L5(t,r,a,i),l=t.memoizedState,s!==r||g!==l||Jo.current||gd?(typeof d=="function"&&(A9(t,n,d,r),l=t.memoizedState),(s=gd||FM(t,n,s,r,g,l,u))?(h||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,uH(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Ns(t.type,s),a.props=u,h=t.pendingProps,g=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=cs(l):(l=ea(n)?qh:lo.current,l=Qg(t,l));var v=n.getDerivedStateFromProps;(d=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==h||g!==l)&&zM(t,a,r,l),gd=!1,g=t.memoizedState,a.state=g,L5(t,r,a,i);var b=t.memoizedState;s!==h||g!==b||Jo.current||gd?(typeof v=="function"&&(A9(t,n,v,r),b=t.memoizedState),(u=gd||FM(t,n,u,r,g,b,l)||!1)?(d||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&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&g===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&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return R9(e,t,n,r,o,i)}function R9(e,t,n,r,i,o){BH(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&DM(t,n,!1),oc(e,t,o);r=t.stateNode,fye.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=e0(t,e.child,null,o),t.child=e0(t,null,s,o)):wo(e,t,s,o),t.memoizedState=r.state,i&&DM(t,n,!0),t.child}function $H(e){var t=e.stateNode;t.pendingContext?RM(e,t.pendingContext,t.pendingContext!==t.context):t.context&&RM(e,t.context,!1),sE(e,t.containerInfo)}function ZM(e,t,n,r,i){return Jg(),tE(i),t.flags|=256,wo(e,t,n,r),t.child}var D9={dehydrated:null,treeContext:null,retryLane:0};function N9(e){return{baseLanes:e,cachePool:null,transitions:null}}function FH(e,t,n){var r=t.pendingProps,i=kr.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),nr(kr,i&1),e===null)return T9(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=gx(a,r,0,null),e=Fh(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=N9(n),t.memoizedState=D9,e):mE(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return hye(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)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=jd(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=jd(s,o):(o=Fh(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?N9(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=D9,r}return o=e.child,e=o.sibling,r=jd(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(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 mE(e,t){return t=gx({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gb(e,t,n,r){return r!==null&&tE(r),e0(t,e.child,null,n),e=mE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hye(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Z6(Error(Fe(422))),gb(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=gx({mode:"visible",children:r.children},i,0,null),o=Fh(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&e0(t,e.child,null,a),t.child.memoizedState=N9(a),t.memoizedState=D9,o);if(!(t.mode&1))return gb(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Fe(419)),r=Z6(o,r,void 0),gb(e,t,a,r)}if(s=(a&e.childLanes)!==0,Xo||s){if(r=Li,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ic(e,i),Ks(r,e,i,-1))}return xE(),r=Z6(Error(Fe(421))),gb(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Eye.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ea=Id(i.nextSibling),La=t,yr=!0,$s=null,e!==null&&(Za[Qa++]=Gu,Za[Qa++]=qu,Za[Qa++]=Yh,Gu=e.id,qu=e.overflow,Yh=t),t=mE(t,r.children),t.flags|=4096,t)}function QM(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),L9(e.return,t,n)}function Q6(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 zH(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(wo(e,t,r.children,n),r=kr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&QM(e,n,t);else if(e.tag===19)QM(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(nr(kr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&A5(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Q6(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&&A5(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Q6(t,!0,n,null,o);break;case"together":Q6(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function C4(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function oc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xh|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Fe(153));if(t.child!==null){for(e=t.child,n=jd(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=jd(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pye(e,t,n){switch(t.tag){case 3:$H(t),Jg();break;case 5:pH(t);break;case 1:ea(t.type)&&_5(t);break;case 4:sE(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;nr(P5,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(nr(kr,kr.current&1),t.flags|=128,null):n&t.child.childLanes?FH(e,t,n):(nr(kr,kr.current&1),e=oc(e,t,n),e!==null?e.sibling:null);nr(kr,kr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return zH(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),nr(kr,kr.current),r)break;return null;case 22:case 23:return t.lanes=0,jH(e,t,n)}return oc(e,t,n)}var HH,j9,VH,WH;HH=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}};j9=function(){};VH=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ph(eu.current);var o=null;switch(n){case"input":i=o9(e,i),r=o9(e,r),o=[];break;case"select":i=Tr({},i,{value:void 0}),r=Tr({},r,{value:void 0}),o=[];break;case"textarea":i=l9(e,i),r=l9(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=w5)}c9(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"&&(M2.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(M2.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&or("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)}};WH=function(e,t,n,r){n!==r&&(t.flags|=4)};function ev(e,t){if(!yr)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 eo(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 mye(e,t,n){var r=t.pendingProps;switch(eE(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return eo(t),null;case 1:return ea(t.type)&&C5(),eo(t),null;case 3:return r=t.stateNode,t0(),fr(Jo),fr(lo),uE(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pb(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$s!==null&&(U9($s),$s=null))),j9(e,t),eo(t),null;case 5:lE(t);var i=Ph(W2.current);if(n=t.type,e!==null&&t.stateNode!=null)VH(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Fe(166));return eo(t),null}if(e=Ph(eu.current),pb(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Hl]=t,r[H2]=o,e=(t.mode&1)!==0,n){case"dialog":or("cancel",r),or("close",r);break;case"iframe":case"object":case"embed":or("load",r);break;case"video":case"audio":for(i=0;i<wv.length;i++)or(wv[i],r);break;case"source":or("error",r);break;case"img":case"image":case"link":or("error",r),or("load",r);break;case"details":or("toggle",r);break;case"input":sM(r,o),or("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},or("invalid",r);break;case"textarea":uM(r,o),or("invalid",r)}c9(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&hb(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&hb(r.textContent,s,e),i=["children",""+s]):M2.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&or("scroll",r)}switch(n){case"input":ob(r),lM(r,o,!0);break;case"textarea":ob(r),cM(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=w5)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=vz(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Hl]=t,e[H2]=r,HH(e,t,!1,!1),t.stateNode=e;e:{switch(a=d9(n,r),n){case"dialog":or("cancel",e),or("close",e),i=r;break;case"iframe":case"object":case"embed":or("load",e),i=r;break;case"video":case"audio":for(i=0;i<wv.length;i++)or(wv[i],e);i=r;break;case"source":or("error",e),i=r;break;case"img":case"image":case"link":or("error",e),or("load",e),i=r;break;case"details":or("toggle",e),i=r;break;case"input":sM(e,r),i=o9(e,r),or("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Tr({},r,{value:void 0}),or("invalid",e);break;case"textarea":uM(e,r),i=l9(e,r),or("invalid",e);break;default:i=r}c9(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?Sz(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&yz(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&I2(e,l):typeof l=="number"&&I2(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(M2.hasOwnProperty(o)?l!=null&&o==="onScroll"&&or("scroll",e):l!=null&&$k(e,o,l,a))}switch(n){case"input":ob(e),lM(e,r,!1);break;case"textarea":ob(e),cM(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ud(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Eg(e,!!r.multiple,o,!1):r.defaultValue!=null&&Eg(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=w5)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return eo(t),null;case 6:if(e&&t.stateNode!=null)WH(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Fe(166));if(n=Ph(W2.current),Ph(eu.current),pb(t)){if(r=t.stateNode,n=t.memoizedProps,r[Hl]=t,(o=r.nodeValue!==n)&&(e=La,e!==null))switch(e.tag){case 3:hb(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hb(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Hl]=t,t.stateNode=r}return eo(t),null;case 13:if(fr(kr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(yr&&Ea!==null&&t.mode&1&&!(t.flags&128))sH(),Jg(),t.flags|=98560,o=!1;else if(o=pb(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Fe(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Fe(317));o[Hl]=t}else Jg(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;eo(t),o=!1}else $s!==null&&(U9($s),$s=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||kr.current&1?gi===0&&(gi=3):xE())),t.updateQueue!==null&&(t.flags|=4),eo(t),null);case 4:return t0(),j9(e,t),e===null&&F2(t.stateNode.containerInfo),eo(t),null;case 10:return iE(t.type._context),eo(t),null;case 17:return ea(t.type)&&C5(),eo(t),null;case 19:if(fr(kr),o=t.memoizedState,o===null)return eo(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)ev(o,!1);else{if(gi!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=A5(e),a!==null){for(t.flags|=128,ev(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return nr(kr,kr.current&1|2),t.child}e=e.sibling}o.tail!==null&&Zr()>r0&&(t.flags|=128,r=!0,ev(o,!1),t.lanes=4194304)}else{if(!r)if(e=A5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ev(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!yr)return eo(t),null}else 2*Zr()-o.renderingStartTime>r0&&n!==1073741824&&(t.flags|=128,r=!0,ev(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=Zr(),t.sibling=null,n=kr.current,nr(kr,r?n&1|2:n&1),t):(eo(t),null);case 22:case 23:return SE(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_a&1073741824&&(eo(t),t.subtreeFlags&6&&(t.flags|=8192)):eo(t),null;case 24:return null;case 25:return null}throw Error(Fe(156,t.tag))}function gye(e,t){switch(eE(t),t.tag){case 1:return ea(t.type)&&C5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return t0(),fr(Jo),fr(lo),uE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return lE(t),null;case 13:if(fr(kr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Fe(340));Jg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fr(kr),null;case 4:return t0(),null;case 10:return iE(t.type._context),null;case 22:case 23:return SE(),null;case 24:return null;default:return null}}var vb=!1,oo=!1,vye=typeof WeakSet=="function"?WeakSet:Set,pt=null;function ag(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$r(e,t,r)}else n.current=null}function B9(e,t,n){try{n()}catch(r){$r(e,t,r)}}var JM=!1;function yye(e,t){if(x9=b5,e=Yz(),Qk(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,d=0,h=e,g=null;t:for(;;){for(var v;h!==n||i!==0&&h.nodeType!==3||(s=a+i),h!==o||r!==0&&h.nodeType!==3||(l=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(v=h.firstChild)!==null;)g=h,h=v;for(;;){if(h===e)break t;if(g===n&&++u===i&&(s=a),g===o&&++d===r&&(l=a),(v=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(w9={focusedElem:e,selectionRange:n},b5=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){t=pt;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var S=b.memoizedProps,E=b.memoizedState,_=t.stateNode,k=_.getSnapshotBeforeUpdate(t.elementType===t.type?S:Ns(t.type,S),E);_.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Fe(163))}}catch(A){$r(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}return b=JM,JM=!1,b}function n2(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&&B9(t,n,o)}i=i.next}while(i!==r)}}function px(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 $9(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 UH(e){var t=e.alternate;t!==null&&(e.alternate=null,UH(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hl],delete t[H2],delete t[k9],delete t[eye],delete t[tye])),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 GH(e){return e.tag===5||e.tag===3||e.tag===4}function eI(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||GH(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 F9(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=w5));else if(r!==4&&(e=e.child,e!==null))for(F9(e,t,n),e=e.sibling;e!==null;)F9(e,t,n),e=e.sibling}function z9(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(z9(e,t,n),e=e.sibling;e!==null;)z9(e,t,n),e=e.sibling}var Vi=null,js=!1;function ld(e,t,n){for(n=n.child;n!==null;)qH(e,t,n),n=n.sibling}function qH(e,t,n){if(Jl&&typeof Jl.onCommitFiberUnmount=="function")try{Jl.onCommitFiberUnmount(ax,n)}catch{}switch(n.tag){case 5:oo||ag(n,t);case 6:var r=Vi,i=js;Vi=null,ld(e,t,n),Vi=r,js=i,Vi!==null&&(js?(e=Vi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vi.removeChild(n.stateNode));break;case 18:Vi!==null&&(js?(e=Vi,n=n.stateNode,e.nodeType===8?U6(e.parentNode,n):e.nodeType===1&&U6(e,n),j2(e)):U6(Vi,n.stateNode));break;case 4:r=Vi,i=js,Vi=n.stateNode.containerInfo,js=!0,ld(e,t,n),Vi=r,js=i;break;case 0:case 11:case 14:case 15:if(!oo&&(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||o&4)&&B9(n,t,a),i=i.next}while(i!==r)}ld(e,t,n);break;case 1:if(!oo&&(ag(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){$r(n,t,s)}ld(e,t,n);break;case 21:ld(e,t,n);break;case 22:n.mode&1?(oo=(r=oo)||n.memoizedState!==null,ld(e,t,n),oo=r):ld(e,t,n);break;default:ld(e,t,n)}}function tI(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vye),t.forEach(function(r){var i=Pye.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Is(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Vi=s.stateNode,js=!1;break e;case 3:Vi=s.stateNode.containerInfo,js=!0;break e;case 4:Vi=s.stateNode.containerInfo,js=!0;break e}s=s.return}if(Vi===null)throw Error(Fe(160));qH(o,a,i),Vi=null,js=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){$r(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)YH(t,e),t=t.sibling}function YH(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Is(t,e),Al(e),r&4){try{n2(3,e,e.return),px(3,e)}catch(S){$r(e,e.return,S)}try{n2(5,e,e.return)}catch(S){$r(e,e.return,S)}}break;case 1:Is(t,e),Al(e),r&512&&n!==null&&ag(n,n.return);break;case 5:if(Is(t,e),Al(e),r&512&&n!==null&&ag(n,n.return),e.flags&32){var i=e.stateNode;try{I2(i,"")}catch(S){$r(e,e.return,S)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&mz(i,o),d9(s,a);var u=d9(s,o);for(a=0;a<l.length;a+=2){var d=l[a],h=l[a+1];d==="style"?Sz(i,h):d==="dangerouslySetInnerHTML"?yz(i,h):d==="children"?I2(i,h):$k(i,d,h,u)}switch(s){case"input":a9(i,o);break;case"textarea":gz(i,o);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?Eg(i,!!o.multiple,v,!1):g!==!!o.multiple&&(o.defaultValue!=null?Eg(i,!!o.multiple,o.defaultValue,!0):Eg(i,!!o.multiple,o.multiple?[]:"",!1))}i[H2]=o}catch(S){$r(e,e.return,S)}}break;case 6:if(Is(t,e),Al(e),r&4){if(e.stateNode===null)throw Error(Fe(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(S){$r(e,e.return,S)}}break;case 3:if(Is(t,e),Al(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{j2(t.containerInfo)}catch(S){$r(e,e.return,S)}break;case 4:Is(t,e),Al(e);break;case 13:Is(t,e),Al(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(yE=Zr())),r&4&&tI(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(oo=(u=oo)||d,Is(t,e),oo=u):Is(t,e),Al(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(pt=e,d=e.child;d!==null;){for(h=pt=d;pt!==null;){switch(g=pt,v=g.child,g.tag){case 0:case 11:case 14:case 15:n2(4,g,g.return);break;case 1:ag(g,g.return);var b=g.stateNode;if(typeof b.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(S){$r(r,n,S)}}break;case 5:ag(g,g.return);break;case 22:if(g.memoizedState!==null){rI(h);continue}}v!==null?(v.return=g,pt=v):rI(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{i=h.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=h.stateNode,l=h.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=bz("display",a))}catch(S){$r(e,e.return,S)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(S){$r(e,e.return,S)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Is(t,e),Al(e),r&4&&tI(e);break;case 21:break;default:Is(t,e),Al(e)}}function Al(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(GH(n)){var r=n;break e}n=n.return}throw Error(Fe(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(I2(i,""),r.flags&=-33);var o=eI(e);z9(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=eI(e);F9(e,s,a);break;default:throw Error(Fe(161))}}catch(l){$r(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bye(e,t,n){pt=e,KH(e)}function KH(e,t,n){for(var r=(e.mode&1)!==0;pt!==null;){var i=pt,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||vb;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||oo;s=vb;var u=oo;if(vb=a,(oo=l)&&!u)for(pt=i;pt!==null;)a=pt,l=a.child,a.tag===22&&a.memoizedState!==null?iI(i):l!==null?(l.return=a,pt=l):iI(i);for(;o!==null;)pt=o,KH(o),o=o.sibling;pt=i,vb=s,oo=u}nI(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,pt=o):nI(e)}}function nI(e){for(;pt!==null;){var t=pt;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:oo||px(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!oo)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&$M(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}$M(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&j2(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Fe(163))}oo||t.flags&512&&$9(t)}catch(g){$r(t,t.return,g)}}if(t===e){pt=null;break}if(n=t.sibling,n!==null){n.return=t.return,pt=n;break}pt=t.return}}function rI(e){for(;pt!==null;){var t=pt;if(t===e){pt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,pt=n;break}pt=t.return}}function iI(e){for(;pt!==null;){var t=pt;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{px(4,t)}catch(l){$r(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){$r(t,i,l)}}var o=t.return;try{$9(t)}catch(l){$r(t,o,l)}break;case 5:var a=t.return;try{$9(t)}catch(l){$r(t,a,l)}}}catch(l){$r(t,t.return,l)}if(t===e){pt=null;break}var s=t.sibling;if(s!==null){s.return=t.return,pt=s;break}pt=t.return}}var Sye=Math.ceil,I5=cc.ReactCurrentDispatcher,gE=cc.ReactCurrentOwner,os=cc.ReactCurrentBatchConfig,pn=0,Li=null,ai=null,Yi=0,_a=0,sg=af(0),gi=0,Y2=null,Xh=0,mx=0,vE=0,r2=null,Yo=null,yE=0,r0=1/0,Hu=null,R5=!1,H9=null,Dd=null,yb=!1,Ed=null,D5=0,i2=0,V9=null,_4=-1,k4=0;function To(){return pn&6?Zr():_4!==-1?_4:_4=Zr()}function Nd(e){return e.mode&1?pn&2&&Yi!==0?Yi&-Yi:rye.transition!==null?(k4===0&&(k4=Mz()),k4):(e=$n,e!==0||(e=window.event,e=e===void 0?16:$z(e.type)),e):1}function Ks(e,t,n,r){if(50<i2)throw i2=0,V9=null,Error(Fe(185));Ty(e,n,r),(!(pn&2)||e!==Li)&&(e===Li&&(!(pn&2)&&(mx|=n),gi===4&&Sd(e,Yi)),ta(e,r),n===1&&pn===0&&!(t.mode&1)&&(r0=Zr()+500,dx&&sf()))}function ta(e,t){var n=e.callbackNode;r2e(e,t);var r=y5(e,e===Li?Yi:0);if(r===0)n!==null&&hM(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&hM(n),t===1)e.tag===0?nye(oI.bind(null,e)):iH(oI.bind(null,e)),Q2e(function(){!(pn&6)&&sf()}),n=null;else{switch(Iz(r)){case 1:n=Wk;break;case 4:n=Az;break;case 16:n=v5;break;case 536870912:n=Oz;break;default:n=v5}n=rV(n,XH.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function XH(e,t){if(_4=-1,k4=0,pn&6)throw Error(Fe(327));var n=e.callbackNode;if(Og()&&e.callbackNode!==n)return null;var r=y5(e,e===Li?Yi:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=N5(e,r);else{t=r;var i=pn;pn|=2;var o=QH();(Li!==e||Yi!==t)&&(Hu=null,r0=Zr()+500,$h(e,t));do try{Cye();break}catch(s){ZH(e,s)}while(1);rE(),I5.current=o,pn=i,ai!==null?t=0:(Li=null,Yi=0,t=gi)}if(t!==0){if(t===2&&(i=g9(e),i!==0&&(r=i,t=W9(e,i))),t===1)throw n=Y2,$h(e,0),Sd(e,r),ta(e,Zr()),n;if(t===6)Sd(e,r);else{if(i=e.current.alternate,!(r&30)&&!xye(i)&&(t=N5(e,r),t===2&&(o=g9(e),o!==0&&(r=o,t=W9(e,o))),t===1))throw n=Y2,$h(e,0),Sd(e,r),ta(e,Zr()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Fe(345));case 2:fh(e,Yo,Hu);break;case 3:if(Sd(e,r),(r&130023424)===r&&(t=yE+500-Zr(),10<t)){if(y5(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){To(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=_9(fh.bind(null,e,Yo,Hu),t);break}fh(e,Yo,Hu);break;case 4:if(Sd(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Ys(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sye(r/1960))-r,10<r){e.timeoutHandle=_9(fh.bind(null,e,Yo,Hu),r);break}fh(e,Yo,Hu);break;case 5:fh(e,Yo,Hu);break;default:throw Error(Fe(329))}}}return ta(e,Zr()),e.callbackNode===n?XH.bind(null,e):null}function W9(e,t){var n=r2;return e.current.memoizedState.isDehydrated&&($h(e,t).flags|=256),e=N5(e,t),e!==2&&(t=Yo,Yo=n,t!==null&&U9(t)),e}function U9(e){Yo===null?Yo=e:Yo.push.apply(Yo,e)}function xye(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Js(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Sd(e,t){for(t&=~vE,t&=~mx,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ys(t),r=1<<n;e[n]=-1,t&=~r}}function oI(e){if(pn&6)throw Error(Fe(327));Og();var t=y5(e,0);if(!(t&1))return ta(e,Zr()),null;var n=N5(e,t);if(e.tag!==0&&n===2){var r=g9(e);r!==0&&(t=r,n=W9(e,r))}if(n===1)throw n=Y2,$h(e,0),Sd(e,t),ta(e,Zr()),n;if(n===6)throw Error(Fe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fh(e,Yo,Hu),ta(e,Zr()),null}function bE(e,t){var n=pn;pn|=1;try{return e(t)}finally{pn=n,pn===0&&(r0=Zr()+500,dx&&sf())}}function Zh(e){Ed!==null&&Ed.tag===0&&!(pn&6)&&Og();var t=pn;pn|=1;var n=os.transition,r=$n;try{if(os.transition=null,$n=1,e)return e()}finally{$n=r,os.transition=n,pn=t,!(pn&6)&&sf()}}function SE(){_a=sg.current,fr(sg)}function $h(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Z2e(n)),ai!==null)for(n=ai.return;n!==null;){var r=n;switch(eE(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&C5();break;case 3:t0(),fr(Jo),fr(lo),uE();break;case 5:lE(r);break;case 4:t0();break;case 13:fr(kr);break;case 19:fr(kr);break;case 10:iE(r.type._context);break;case 22:case 23:SE()}n=n.return}if(Li=e,ai=e=jd(e.current,null),Yi=_a=t,gi=0,Y2=null,vE=mx=Xh=0,Yo=r2=null,Eh!==null){for(t=0;t<Eh.length;t++)if(n=Eh[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Eh=null}return e}function ZH(e,t){do{var n=ai;try{if(rE(),x4.current=M5,O5){for(var r=Pr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}O5=!1}if(Kh=0,Ti=mi=Pr=null,t2=!1,U2=0,gE.current=null,n===null||n.return===null){gi=1,Y2=t,ai=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Yi,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=s,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var g=d.alternate;g?(d.updateQueue=g.updateQueue,d.memoizedState=g.memoizedState,d.lanes=g.lanes):(d.updateQueue=null,d.memoizedState=null)}var v=GM(a);if(v!==null){v.flags&=-257,qM(v,a,s,o,t),v.mode&1&&UM(o,u,t),t=v,l=u;var b=t.updateQueue;if(b===null){var S=new Set;S.add(l),t.updateQueue=S}else b.add(l);break e}else{if(!(t&1)){UM(o,u,t),xE();break e}l=Error(Fe(426))}}else if(yr&&s.mode&1){var E=GM(a);if(E!==null){!(E.flags&65536)&&(E.flags|=256),qM(E,a,s,o,t),tE(n0(l,s));break e}}o=l=n0(l,s),gi!==4&&(gi=2),r2===null?r2=[o]:r2.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var _=RH(o,l,t);BM(o,_);break e;case 1:s=l;var k=o.type,T=o.stateNode;if(!(o.flags&128)&&(typeof k.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Dd===null||!Dd.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var A=DH(o,s,t);BM(o,A);break e}}o=o.return}while(o!==null)}eV(n)}catch(M){t=M,ai===n&&n!==null&&(ai=n=n.return);continue}break}while(1)}function QH(){var e=I5.current;return I5.current=M5,e===null?M5:e}function xE(){(gi===0||gi===3||gi===2)&&(gi=4),Li===null||!(Xh&268435455)&&!(mx&268435455)||Sd(Li,Yi)}function N5(e,t){var n=pn;pn|=2;var r=QH();(Li!==e||Yi!==t)&&(Hu=null,$h(e,t));do try{wye();break}catch(i){ZH(e,i)}while(1);if(rE(),pn=n,I5.current=r,ai!==null)throw Error(Fe(261));return Li=null,Yi=0,gi}function wye(){for(;ai!==null;)JH(ai)}function Cye(){for(;ai!==null&&!Yve();)JH(ai)}function JH(e){var t=nV(e.alternate,e,_a);e.memoizedProps=e.pendingProps,t===null?eV(e):ai=t,gE.current=null}function eV(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gye(n,t),n!==null){n.flags&=32767,ai=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{gi=6,ai=null;return}}else if(n=mye(n,t,_a),n!==null){ai=n;return}if(t=t.sibling,t!==null){ai=t;return}ai=t=e}while(t!==null);gi===0&&(gi=5)}function fh(e,t,n){var r=$n,i=os.transition;try{os.transition=null,$n=1,_ye(e,t,n,r)}finally{os.transition=i,$n=r}return null}function _ye(e,t,n,r){do Og();while(Ed!==null);if(pn&6)throw Error(Fe(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Fe(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(i2e(e,o),e===Li&&(ai=Li=null,Yi=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||yb||(yb=!0,rV(v5,function(){return Og(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=os.transition,os.transition=null;var a=$n;$n=1;var s=pn;pn|=4,gE.current=null,yye(e,n),YH(n,e),W2e(w9),b5=!!x9,w9=x9=null,e.current=n,bye(n),Kve(),pn=s,$n=a,os.transition=o}else e.current=n;if(yb&&(yb=!1,Ed=e,D5=i),o=e.pendingLanes,o===0&&(Dd=null),Qve(n.stateNode),ta(e,Zr()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(R5)throw R5=!1,e=H9,H9=null,e;return D5&1&&e.tag!==0&&Og(),o=e.pendingLanes,o&1?e===V9?i2++:(i2=0,V9=e):i2=0,sf(),null}function Og(){if(Ed!==null){var e=Iz(D5),t=os.transition,n=$n;try{if(os.transition=null,$n=16>e?16:e,Ed===null)var r=!1;else{if(e=Ed,Ed=null,D5=0,pn&6)throw Error(Fe(331));var i=pn;for(pn|=4,pt=e.current;pt!==null;){var o=pt,a=o.child;if(pt.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(pt=u;pt!==null;){var d=pt;switch(d.tag){case 0:case 11:case 15:n2(8,d,o)}var h=d.child;if(h!==null)h.return=d,pt=h;else for(;pt!==null;){d=pt;var g=d.sibling,v=d.return;if(UH(d),d===u){pt=null;break}if(g!==null){g.return=v,pt=g;break}pt=v}}}var b=o.alternate;if(b!==null){var S=b.child;if(S!==null){b.child=null;do{var E=S.sibling;S.sibling=null,S=E}while(S!==null)}}pt=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,pt=a;else e:for(;pt!==null;){if(o=pt,o.flags&2048)switch(o.tag){case 0:case 11:case 15:n2(9,o,o.return)}var _=o.sibling;if(_!==null){_.return=o.return,pt=_;break e}pt=o.return}}var k=e.current;for(pt=k;pt!==null;){a=pt;var T=a.child;if(a.subtreeFlags&2064&&T!==null)T.return=a,pt=T;else e:for(a=k;pt!==null;){if(s=pt,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:px(9,s)}}catch(M){$r(s,s.return,M)}if(s===a){pt=null;break e}var A=s.sibling;if(A!==null){A.return=s.return,pt=A;break e}pt=s.return}}if(pn=i,sf(),Jl&&typeof Jl.onPostCommitFiberRoot=="function")try{Jl.onPostCommitFiberRoot(ax,e)}catch{}r=!0}return r}finally{$n=n,os.transition=t}}return!1}function aI(e,t,n){t=n0(n,t),t=RH(e,t,1),e=Rd(e,t,1),t=To(),e!==null&&(Ty(e,1,t),ta(e,t))}function $r(e,t,n){if(e.tag===3)aI(e,e,n);else for(;t!==null;){if(t.tag===3){aI(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Dd===null||!Dd.has(r))){e=n0(n,e),e=DH(t,e,1),t=Rd(t,e,1),e=To(),t!==null&&(Ty(t,1,e),ta(t,e));break}}t=t.return}}function kye(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=To(),e.pingedLanes|=e.suspendedLanes&n,Li===e&&(Yi&n)===n&&(gi===4||gi===3&&(Yi&130023424)===Yi&&500>Zr()-yE?$h(e,0):vE|=n),ta(e,t)}function tV(e,t){t===0&&(e.mode&1?(t=lb,lb<<=1,!(lb&130023424)&&(lb=4194304)):t=1);var n=To();e=ic(e,t),e!==null&&(Ty(e,t,n),ta(e,n))}function Eye(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tV(e,n)}function Pye(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Fe(314))}r!==null&&r.delete(t),tV(e,n)}var nV;nV=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Jo.current)Xo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xo=!1,pye(e,t,n);Xo=!!(e.flags&131072)}else Xo=!1,yr&&t.flags&1048576&&oH(t,E5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;C4(e,t),e=t.pendingProps;var i=Qg(t,lo.current);Ag(t,n),i=dE(null,t,r,e,i,n);var o=fE();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,ea(r)?(o=!0,_5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,aE(t),i.updater=fx,t.stateNode=i,i._reactInternals=t,O9(t,r,e,n),t=R9(null,t,r,!0,o,n)):(t.tag=0,yr&&o&&Jk(t),wo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(C4(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Lye(r),e=Ns(r,e),i){case 0:t=I9(null,t,r,e,n);break e;case 1:t=XM(null,t,r,e,n);break e;case 11:t=YM(null,t,r,e,n);break e;case 14:t=KM(null,t,r,Ns(r.type,e),n);break e}throw Error(Fe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),I9(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),XM(e,t,r,i,n);case 3:e:{if($H(t),e===null)throw Error(Fe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,uH(e,t),L5(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=n0(Error(Fe(423)),t),t=ZM(e,t,r,n,i);break e}else if(r!==i){i=n0(Error(Fe(424)),t),t=ZM(e,t,r,n,i);break e}else for(Ea=Id(t.stateNode.containerInfo.firstChild),La=t,yr=!0,$s=null,n=hH(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Jg(),r===i){t=oc(e,t,n);break e}wo(e,t,r,n)}t=t.child}return t;case 5:return pH(t),e===null&&T9(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,C9(r,i)?a=null:o!==null&&C9(r,o)&&(t.flags|=32),BH(e,t),wo(e,t,a,n),t.child;case 6:return e===null&&T9(t),null;case 13:return FH(e,t,n);case 4:return sE(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=e0(t,null,r,n):wo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),YM(e,t,r,i,n);case 7:return wo(e,t,t.pendingProps,n),t.child;case 8:return wo(e,t,t.pendingProps.children,n),t.child;case 12:return wo(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,nr(P5,r._currentValue),r._currentValue=a,o!==null)if(Js(o.value,a)){if(o.children===i.children&&!Jo.current){t=oc(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=Yu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),L9(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Fe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),L9(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}wo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ag(t,n),i=cs(i),r=r(i),t.flags|=1,wo(e,t,r,n),t.child;case 14:return r=t.type,i=Ns(r,t.pendingProps),i=Ns(r.type,i),KM(e,t,r,i,n);case 15:return NH(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),C4(e,t),t.tag=1,ea(r)?(e=!0,_5(t)):e=!1,Ag(t,n),dH(t,r,i),O9(t,r,i,n),R9(null,t,r,!0,e,n);case 19:return zH(e,t,n);case 22:return jH(e,t,n)}throw Error(Fe(156,t.tag))};function rV(e,t){return Lz(e,t)}function Tye(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 ns(e,t,n,r){return new Tye(e,t,n,r)}function wE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lye(e){if(typeof e=="function")return wE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zk)return 11;if(e===Hk)return 14}return 2}function jd(e,t){var n=e.alternate;return n===null?(n=ns(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 E4(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")wE(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Zm:return Fh(n.children,i,o,t);case Fk:a=8,i|=8;break;case t9:return e=ns(12,n,t,i|2),e.elementType=t9,e.lanes=o,e;case n9:return e=ns(13,n,t,i),e.elementType=n9,e.lanes=o,e;case r9:return e=ns(19,n,t,i),e.elementType=r9,e.lanes=o,e;case fz:return gx(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cz:a=10;break e;case dz:a=9;break e;case zk:a=11;break e;case Hk:a=14;break e;case md:a=16,r=null;break e}throw Error(Fe(130,e==null?e:typeof e,""))}return t=ns(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fh(e,t,n,r){return e=ns(7,e,r,t),e.lanes=n,e}function gx(e,t,n,r){return e=ns(22,e,r,t),e.elementType=fz,e.lanes=n,e.stateNode={isHidden:!1},e}function J6(e,t,n){return e=ns(6,e,null,t),e.lanes=n,e}function eC(e,t,n){return t=ns(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Aye(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=R6(0),this.expirationTimes=R6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=R6(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function CE(e,t,n,r,i,o,a,s,l){return e=new Aye(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ns(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},aE(o),e}function Oye(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xm,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function iV(e){if(!e)return Gd;e=e._reactInternals;e:{if(sp(e)!==e||e.tag!==1)throw Error(Fe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ea(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Fe(171))}if(e.tag===1){var n=e.type;if(ea(n))return rH(e,n,t)}return t}function oV(e,t,n,r,i,o,a,s,l){return e=CE(n,r,!0,e,i,o,a,s,l),e.context=iV(null),n=e.current,r=To(),i=Nd(n),o=Yu(r,i),o.callback=t??null,Rd(n,o,i),e.current.lanes=i,Ty(e,i,r),ta(e,r),e}function vx(e,t,n,r){var i=t.current,o=To(),a=Nd(i);return n=iV(n),t.context===null?t.context=n:t.pendingContext=n,t=Yu(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Rd(i,t,a),e!==null&&(Ks(e,i,a,o),S4(e,i,a)),a}function j5(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function sI(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _E(e,t){sI(e,t),(e=e.alternate)&&sI(e,t)}function Mye(){return null}var aV=typeof reportError=="function"?reportError:function(e){console.error(e)};function kE(e){this._internalRoot=e}yx.prototype.render=kE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Fe(409));vx(e,t,null,null)};yx.prototype.unmount=kE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zh(function(){vx(null,e,null,null)}),t[rc]=null}};function yx(e){this._internalRoot=e}yx.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nz();e={blockedOn:null,target:e,priority:t};for(var n=0;n<bd.length&&t!==0&&t<bd[n].priority;n++);bd.splice(n,0,e),n===0&&Bz(e)}};function EE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lI(){}function Iye(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=j5(a);o.call(u)}}var a=oV(t,r,e,0,null,!1,!1,"",lI);return e._reactRootContainer=a,e[rc]=a.current,F2(e.nodeType===8?e.parentNode:e),Zh(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=j5(l);s.call(u)}}var l=CE(e,0,!1,null,null,!1,!1,"",lI);return e._reactRootContainer=l,e[rc]=l.current,F2(e.nodeType===8?e.parentNode:e),Zh(function(){vx(t,l,n,r)}),l}function Sx(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=j5(a);s.call(l)}}vx(t,a,e,i)}else a=Iye(n,t,e,i,r);return j5(a)}Rz=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xv(t.pendingLanes);n!==0&&(Uk(t,n|1),ta(t,Zr()),!(pn&6)&&(r0=Zr()+500,sf()))}break;case 13:Zh(function(){var r=ic(e,1);if(r!==null){var i=To();Ks(r,e,1,i)}}),_E(e,1)}};Gk=function(e){if(e.tag===13){var t=ic(e,134217728);if(t!==null){var n=To();Ks(t,e,134217728,n)}_E(e,134217728)}};Dz=function(e){if(e.tag===13){var t=Nd(e),n=ic(e,t);if(n!==null){var r=To();Ks(n,e,t,r)}_E(e,t)}};Nz=function(){return $n};jz=function(e,t){var n=$n;try{return $n=e,t()}finally{$n=n}};h9=function(e,t,n){switch(t){case"input":if(a9(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=cx(r);if(!i)throw Error(Fe(90));pz(r),a9(r,i)}}}break;case"textarea":gz(e,n);break;case"select":t=n.value,t!=null&&Eg(e,!!n.multiple,t,!1)}};Cz=bE;_z=Zh;var Rye={usingClientEntryPoint:!1,Events:[Ay,tg,cx,xz,wz,bE]},tv={findFiberByHostInstance:kh,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Dye={bundleType:tv.bundleType,version:tv.version,rendererPackageName:tv.rendererPackageName,rendererConfig:tv.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:cc.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Pz(e),e===null?null:e.stateNode},findFiberByHostInstance:tv.findFiberByHostInstance||Mye,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bb.isDisabled&&bb.supportsFiber)try{ax=bb.inject(Dye),Jl=bb}catch{}}Na.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rye;Na.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!EE(t))throw Error(Fe(200));return Oye(e,t,null,n)};Na.createRoot=function(e,t){if(!EE(e))throw Error(Fe(299));var n=!1,r="",i=aV;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=CE(e,1,!1,null,null,n,!1,r,i),e[rc]=t.current,F2(e.nodeType===8?e.parentNode:e),new kE(t)};Na.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Fe(188)):(e=Object.keys(e).join(","),Error(Fe(268,e)));return e=Pz(t),e=e===null?null:e.stateNode,e};Na.flushSync=function(e){return Zh(e)};Na.hydrate=function(e,t,n){if(!bx(t))throw Error(Fe(200));return Sx(null,e,t,!0,n)};Na.hydrateRoot=function(e,t,n){if(!EE(e))throw Error(Fe(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=aV;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=oV(t,null,e,1,n??null,i,!1,o,a),e[rc]=t.current,F2(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new yx(t)};Na.render=function(e,t,n){if(!bx(t))throw Error(Fe(200));return Sx(null,e,t,!1,n)};Na.unmountComponentAtNode=function(e){if(!bx(e))throw Error(Fe(40));return e._reactRootContainer?(Zh(function(){Sx(null,null,e,!1,function(){e._reactRootContainer=null,e[rc]=null})}),!0):!1};Na.unstable_batchedUpdates=bE;Na.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!bx(n))throw Error(Fe(200));if(e==null||e._reactInternals===void 0)throw Error(Fe(38));return Sx(e,t,n,!1,r)};Na.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Na})(Mve);const Sb=b8(Qs);var[Nye,jye]=xn({strict:!1,name:"PortalManagerContext"});function sV(e){const{children:t,zIndex:n}=e;return N.createElement(Nye,{value:{zIndex:n}},t)}sV.displayName="PortalManager";var[lV,Bye]=xn({strict:!1,name:"PortalContext"}),PE="chakra-portal",$ye=".chakra-portal",Fye=e=>N.createElement("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0}},e.children),zye=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=w.useState(null),o=w.useRef(null),[,a]=w.useState({});w.useEffect(()=>a({}),[]);const s=Bye(),l=jye();Ws(()=>{if(!r)return;const d=r.ownerDocument,h=t?s??d.body:d.body;if(!h)return;o.current=d.createElement("div"),o.current.className=PE,h.appendChild(o.current),a({});const g=o.current;return()=>{h.contains(g)&&h.removeChild(g)}},[r]);const u=l!=null&&l.zIndex?N.createElement(Fye,{zIndex:l==null?void 0:l.zIndex},n):n;return o.current?Qs.createPortal(N.createElement(lV,{value:o.current},u),o.current):N.createElement("span",{ref:d=>{d&&i(d)}})},Hye=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=w.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=PE),l},[i]),[,s]=w.useState({});return Ws(()=>s({}),[]),Ws(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Qs.createPortal(N.createElement(lV,{value:r?a:null},t),a):null};function lp(e){const{containerRef:t,...n}=e;return t?N.createElement(Hye,{containerRef:t,...n}):N.createElement(zye,{...n})}lp.defaultProps={appendToParentPortal:!0};lp.className=PE;lp.selector=$ye;lp.displayName="Portal";var Vye=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tm=new WeakMap,xb=new WeakMap,wb={},tC=0,uV=function(e){return e&&(e.host||uV(e.parentNode))},Wye=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uV(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},Uye=function(e,t,n,r){var i=Wye(t,Array.isArray(e)?e:[e]);wb[n]||(wb[n]=new WeakMap);var o=wb[n],a=[],s=new Set,l=new Set(i),u=function(h){!h||s.has(h)||(s.add(h),u(h.parentNode))};i.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(g){if(s.has(g))d(g);else{var v=g.getAttribute(r),b=v!==null&&v!=="false",S=(Tm.get(g)||0)+1,E=(o.get(g)||0)+1;Tm.set(g,S),o.set(g,E),a.push(g),S===1&&b&&xb.set(g,!0),E===1&&g.setAttribute(n,"true"),b||g.setAttribute(r,"true")}})};return d(t),s.clear(),tC++,function(){a.forEach(function(h){var g=Tm.get(h)-1,v=o.get(h)-1;Tm.set(h,g),o.set(h,v),g||(xb.has(h)||h.removeAttribute(r),xb.delete(h)),v||h.removeAttribute(n)}),tC--,tC||(Tm=new WeakMap,Tm=new WeakMap,xb=new WeakMap,wb={})}},cV=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vye(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Uye(r,i,n,"aria-hidden")):function(){return null}};function TE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Bn={},Gye={get exports(){return Bn},set exports(e){Bn=e}},qye="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Yye=qye,Kye=Yye;function dV(){}function fV(){}fV.resetWarningCache=dV;var Xye=function(){function e(r,i,o,a,s,l){if(l!==Kye){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:fV,resetWarningCache:dV};return n.PropTypes=n,n};Gye.exports=Xye();var G9="data-focus-lock",hV="data-focus-lock-disabled",Zye="data-no-focus-lock",Qye="data-autofocus-inside",Jye="data-no-autofocus";function e3e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function t3e(e,t){var n=w.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 pV(e,t){return t3e(t||null,function(n){return e.forEach(function(r){return e3e(r,n)})})}var nC={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function mV(e){return e}function gV(e,t){t===void 0&&(t=mV);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 d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return i}function LE(e,t){return t===void 0&&(t=mV),gV(e,t)}function vV(e){e===void 0&&(e={});var t=gV(null);return t.options=zl({async:!0,ssr:!1},e),t}var yV=function(e){var t=e.sideCar,n=J$(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 w.createElement(r,zl({},n))};yV.isSideCarExport=!0;function n3e(e,t){return e.useMedium(t),yV}var bV=LE({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),SV=LE(),r3e=LE(),i3e=vV({async:!0}),o3e=[],AE=w.forwardRef(function(t,n){var r,i=w.useState(),o=i[0],a=i[1],s=w.useRef(),l=w.useRef(!1),u=w.useRef(null),d=t.children,h=t.disabled,g=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,S=t.autoFocus;t.allowTextSelection;var E=t.group,_=t.className,k=t.whiteList,T=t.hasPositiveIndices,A=t.shards,M=A===void 0?o3e:A,R=t.as,D=R===void 0?"div":R,j=t.lockProps,F=j===void 0?{}:j,H=t.sideCar,K=t.returnFocus,te=t.focusOptions,G=t.onActivation,$=t.onDeactivation,U=w.useState({}),X=U[0],Z=w.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&G&&G(s.current),l.current=!0},[G]),W=w.useCallback(function(){l.current=!1,$&&$(s.current)},[$]);w.useEffect(function(){h||(u.current=null)},[]);var Q=w.useCallback(function(ot){var Ve=u.current;if(Ve&&Ve.focus){var Be=typeof K=="function"?K(Ve):K;if(Be){var wt=typeof Be=="object"?Be:void 0;u.current=null,ot?Promise.resolve().then(function(){return Ve.focus(wt)}):Ve.focus(wt)}}},[K]),re=w.useCallback(function(ot){l.current&&bV.useMedium(ot)},[]),de=SV.useMedium,ve=w.useCallback(function(ot){s.current!==ot&&(s.current=ot,a(ot))},[]),Pe=bn((r={},r[hV]=h&&"disabled",r[G9]=E,r),F),be=g!==!0,He=be&&g!=="tail",Oe=pV([n,ve]);return w.createElement(w.Fragment,null,be&&[w.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:h?-1:0,style:nC}),T?w.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:h?-1:1,style:nC}):null],!h&&w.createElement(H,{id:X,sideCar:i3e,observed:o,disabled:h,persistentFocus:v,crossFrame:b,autoFocus:S,whiteList:k,shards:M,onActivation:Z,onDeactivation:W,returnFocus:Q,focusOptions:te}),w.createElement(D,bn({ref:Oe},Pe,{className:_,onBlur:de,onFocus:re}),d),He&&w.createElement("div",{"data-focus-guard":!0,tabIndex:h?-1:0,style:nC}))});AE.propTypes={};AE.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 xV=AE;function q9(e,t){return q9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},q9(e,t)}function OE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,q9(e,t)}function wV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a3e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){OE(d,u);function d(){return u.apply(this,arguments)||this}d.peek=function(){return a};var h=d.prototype;return h.componentDidMount=function(){o.push(this),s()},h.componentDidUpdate=function(){s()},h.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},h.render=function(){return N.createElement(i,this.props)},d}(w.PureComponent);return wV(l,"displayName","SideEffect("+n(i)+")"),l}}var hu=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},Y9=function(e){return Array.isArray(e)?e:[e]},s3e=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},CV=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},_V=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},l3e=function(e,t){return!e||_V(e)||!s3e(e)&&t(CV(e))},kV=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=l3e(t,kV.bind(void 0,e));return e.set(t,r),r},u3e=function(e,t){return e&&!_V(e)?f3e(e)?t(CV(e)):!1:!0},EV=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=u3e(t,EV.bind(void 0,e));return e.set(t,r),r},PV=function(e){return e.dataset},c3e=function(e){return e.tagName==="BUTTON"},TV=function(e){return e.tagName==="INPUT"},LV=function(e){return TV(e)&&e.type==="radio"},d3e=function(e){return!((TV(e)||c3e(e))&&(e.type==="hidden"||e.disabled))},f3e=function(e){var t=e.getAttribute(Jye);return![!0,"true",""].includes(t)},ME=function(e){var t;return Boolean(e&&((t=PV(e))===null||t===void 0?void 0:t.focusGuard))},B5=function(e){return!ME(e)},h3e=function(e){return Boolean(e)},p3e=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},AV=function(e,t,n){return hu(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(p3e)},m3e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],IE=m3e.join(","),g3e="".concat(IE,", [data-focus-guard]"),OV=function(e,t){var n;return hu(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?g3e:IE)?[i]:[],OV(i))},[])},RE=function(e,t){return e.reduce(function(n,r){return n.concat(OV(r,t),r.parentNode?hu(r.parentNode.querySelectorAll(IE)).filter(function(i){return i===r}):[])},[])},v3e=function(e){var t=e.querySelectorAll("[".concat(Qye,"]"));return hu(t).map(function(n){return RE([n])}).reduce(function(n,r){return n.concat(r)},[])},DE=function(e,t){return hu(e).filter(function(n){return kV(t,n)}).filter(function(n){return d3e(n)})},uI=function(e,t){return t===void 0&&(t=new Map),hu(e).filter(function(n){return EV(t,n)})},K9=function(e,t,n){return AV(DE(RE(e,n),t),!0,n)},cI=function(e,t){return AV(DE(RE(e),t),!1)},y3e=function(e,t){return DE(v3e(e),t)},K2=function(e,t){return e.shadowRoot?K2(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:hu(e.children).some(function(n){return K2(n,t)})},b3e=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},MV=function(e){return e.parentNode?MV(e.parentNode):e},NE=function(e){var t=Y9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(G9);return n.push.apply(n,i?b3e(hu(MV(r).querySelectorAll("[".concat(G9,'="').concat(i,'"]:not([').concat(hV,'="disabled"])')))):[r]),n},[])},IV=function(e){return e.activeElement?e.activeElement.shadowRoot?IV(e.activeElement.shadowRoot):e.activeElement:void 0},jE=function(){return document.activeElement?document.activeElement.shadowRoot?IV(document.activeElement.shadowRoot):document.activeElement:void 0},S3e=function(e){return e===document.activeElement},x3e=function(e){return Boolean(hu(e.querySelectorAll("iframe")).some(function(t){return S3e(t)}))},RV=function(e){var t=document&&jE();return!t||t.dataset&&t.dataset.focusGuard?!1:NE(e).some(function(n){return K2(n,t)||x3e(n)})},w3e=function(){var e=document&&jE();return e?hu(document.querySelectorAll("[".concat(Zye,"]"))).some(function(t){return K2(t,e)}):!1},C3e=function(e,t){return t.filter(LV).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},BE=function(e,t){return LV(e)&&e.name?C3e(e,t):e},_3e=function(e){var t=new Set;return e.forEach(function(n){return t.add(BE(n,e))}),e.filter(function(n){return t.has(n)})},dI=function(e){return e[0]&&e.length>1?BE(e[0],e):e[0]},fI=function(e,t){return e.length>1?e.indexOf(BE(e[t],e)):t},DV="NEW_FOCUS",k3e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=ME(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,d=r?e.indexOf(r):-1,h=l-u,g=t.indexOf(o),v=t.indexOf(a),b=_3e(t),S=n!==void 0?b.indexOf(n):-1,E=S-(r?b.indexOf(r):l),_=fI(e,0),k=fI(e,i-1);if(l===-1||d===-1)return DV;if(!h&&d>=0)return d;if(l<=g&&s&&Math.abs(h)>1)return k;if(l>=v&&s&&Math.abs(h)>1)return _;if(h&&Math.abs(E)>1)return d;if(l<=g)return k;if(l>v)return _;if(h)return Math.abs(h)>1?d:(i+d+h)%i}},E3e=function(e){return function(t){var n,r=(n=PV(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},P3e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=uI(r.filter(E3e(n)));return i&&i.length?dI(i):dI(uI(t))},X9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&X9(e.parentNode.host||e.parentNode,t),t},rC=function(e,t){for(var n=X9(e),r=X9(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},NV=function(e,t,n){var r=Y9(e),i=Y9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=rC(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=rC(o,l);u&&(!a||K2(u,a)?a=u:a=rC(u,a))})}),a},T3e=function(e,t){return e.reduce(function(n,r){return n.concat(y3e(r,t))},[])},L3e=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(h3e)},A3e=function(e,t){var n=document&&jE(),r=NE(e).filter(B5),i=NV(n||e,e,r),o=new Map,a=cI(r,o),s=K9(r,o).filter(function(g){var v=g.node;return B5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=cI([i],o).map(function(g){var v=g.node;return v}),u=L3e(l,s),d=u.map(function(g){var v=g.node;return v}),h=k3e(d,l,n,t);return h===DV?{node:P3e(a,d,T3e(r,o))}:h===void 0?h:u[h]}},O3e=function(e){var t=NE(e).filter(B5),n=NV(e,e,t),r=new Map,i=K9([n],r,!0),o=K9(t,r).filter(function(a){var s=a.node;return B5(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:ME(s)}})},M3e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},iC=0,oC=!1,I3e=function(e,t,n){n===void 0&&(n={});var r=A3e(e,t);if(!oC&&r){if(iC>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),oC=!0,setTimeout(function(){oC=!1},1);return}iC++,M3e(r.node,n.focusOptions),iC--}};const jV=I3e;function BV(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var R3e=function(){return document&&document.activeElement===document.body},D3e=function(){return R3e()||w3e()},Mg=null,lg=null,Ig=null,X2=!1,N3e=function(){return!0},j3e=function(t){return(Mg.whiteList||N3e)(t)},B3e=function(t,n){Ig={observerNode:t,portaledElement:n}},$3e=function(t){return Ig&&Ig.portaledElement===t};function hI(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 F3e=function(t){return t&&"current"in t?t.current:t},z3e=function(t){return t?Boolean(X2):X2==="meanwhile"},H3e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},V3e=function(t,n){return n.some(function(r){return H3e(t,r,r)})},$5=function(){var t=!1;if(Mg){var n=Mg,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||Ig&&Ig.portaledElement,d=document&&document.activeElement;if(u){var h=[u].concat(a.map(F3e).filter(Boolean));if((!d||j3e(d))&&(i||z3e(s)||!D3e()||!lg&&o)&&(u&&!(RV(h)||d&&V3e(d,h)||$3e(d))&&(document&&!lg&&d&&!o?(d.blur&&d.blur(),document.body.focus()):(t=jV(h,lg,{focusOptions:l}),Ig={})),X2=!1,lg=document&&document.activeElement),document){var g=document&&document.activeElement,v=O3e(h),b=v.map(function(S){var E=S.node;return E}).indexOf(g);b>-1&&(v.filter(function(S){var E=S.guard,_=S.node;return E&&_.dataset.focusAutoGuard}).forEach(function(S){var E=S.node;return E.removeAttribute("tabIndex")}),hI(b,v.length,1,v),hI(b,-1,-1,v))}}}return t},$V=function(t){$5()&&t&&(t.stopPropagation(),t.preventDefault())},$E=function(){return BV($5)},W3e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||B3e(r,n)},U3e=function(){return null},FV=function(){X2="just",setTimeout(function(){X2="meanwhile"},0)},G3e=function(){document.addEventListener("focusin",$V),document.addEventListener("focusout",$E),window.addEventListener("blur",FV)},q3e=function(){document.removeEventListener("focusin",$V),document.removeEventListener("focusout",$E),window.removeEventListener("blur",FV)};function Y3e(e){return e.filter(function(t){var n=t.disabled;return!n})}function K3e(e){var t=e.slice(-1)[0];t&&!Mg&&G3e();var n=Mg,r=n&&t&&t.id===n.id;Mg=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(lg=null,(!r||n.observed!==t.observed)&&t.onActivation(),$5(),BV($5)):(q3e(),lg=null)}bV.assignSyncMedium(W3e);SV.assignMedium($E);r3e.assignMedium(function(e){return e({moveFocusInside:jV,focusInside:RV})});const X3e=a3e(Y3e,K3e)(U3e);var zV=w.forwardRef(function(t,n){return w.createElement(xV,bn({sideCar:X3e,ref:n},t))}),HV=xV.propTypes||{};HV.sideCar;TE(HV,["sideCar"]);zV.propTypes={};const Z3e=zV;var VV=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,d=w.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&FF(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),h=w.useCallback(()=>{var v;(v=n==null?void 0:n.current)==null||v.focus()},[n]),g=i&&!n;return N.createElement(Z3e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:d,onDeactivation:h,returnFocus:g},o)};VV.displayName="FocusLock";var P4="right-scroll-bar-position",T4="width-before-scroll-bar",Q3e="with-scroll-bars-hidden",J3e="--removed-body-scroll-bar-size",WV=vV(),aC=function(){},xx=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:aC,onWheelCapture:aC,onTouchMoveCapture:aC}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,g=e.sideCar,v=e.noIsolation,b=e.inert,S=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,k=J$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=g,A=pV([n,t]),M=zl(zl({},k),i);return w.createElement(w.Fragment,null,d&&w.createElement(T,{sideCar:WV,removeScrollBar:u,shards:h,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!S,lockRef:n}),a?w.cloneElement(w.Children.only(s),zl(zl({},M),{ref:A})):w.createElement(_,zl({},M,{className:l,ref:A}),s))});xx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xx.classNames={fullWidth:T4,zeroRight:P4};var ebe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tbe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ebe();return t&&e.setAttribute("nonce",t),e}function nbe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rbe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ibe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tbe())&&(nbe(t,n),rbe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},obe=function(){var e=ibe();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},UV=function(){var e=obe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},abe={left:0,top:0,right:0,gap:0},sC=function(e){return parseInt(e||"",10)||0},sbe=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[sC(n),sC(r),sC(i)]},lbe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return abe;var t=sbe(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])}},ube=UV(),cbe=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(Q3e,` {
|
||
overflow: hidden `).concat(r,`;
|
||
padding-right: `).concat(s,"px ").concat(r,`;
|
||
}
|
||
body {
|
||
overflow: hidden `).concat(r,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
||
padding-left: `.concat(i,`px;
|
||
padding-top: `).concat(o,`px;
|
||
padding-right: `).concat(a,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(s,"px ").concat(r,`;
|
||
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(P4,` {
|
||
right: `).concat(s,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(T4,` {
|
||
margin-right: `).concat(s,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(P4," .").concat(P4,` {
|
||
right: 0 `).concat(r,`;
|
||
}
|
||
|
||
.`).concat(T4," .").concat(T4,` {
|
||
margin-right: 0 `).concat(r,`;
|
||
}
|
||
|
||
body {
|
||
`).concat(J3e,": ").concat(s,`px;
|
||
}
|
||
`)},dbe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=w.useMemo(function(){return lbe(i)},[i]);return w.createElement(ube,{styles:cbe(o,!t,i,n?"":"!important")})},Z9=!1;if(typeof window<"u")try{var Cb=Object.defineProperty({},"passive",{get:function(){return Z9=!0,!0}});window.addEventListener("test",Cb,Cb),window.removeEventListener("test",Cb,Cb)}catch{Z9=!1}var Lm=Z9?{passive:!1}:!1,fbe=function(e){return e.tagName==="TEXTAREA"},GV=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fbe(e)&&n[t]==="visible")},hbe=function(e){return GV(e,"overflowY")},pbe=function(e){return GV(e,"overflowX")},pI=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=qV(e,n);if(r){var i=YV(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},mbe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gbe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qV=function(e,t){return e==="v"?hbe(t):pbe(t)},YV=function(e,t){return e==="v"?mbe(t):gbe(t)},vbe=function(e,t){return e==="h"&&t==="rtl"?-1:1},ybe=function(e,t,n,r,i){var o=vbe(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,d=a>0,h=0,g=0;do{var v=YV(e,s),b=v[0],S=v[1],E=v[2],_=S-E-o*b;(b||_)&&qV(e,s)&&(h+=_,g+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(i&&h===0||!i&&a>h)||!d&&(i&&g===0||!i&&-a>g))&&(u=!0),u},_b=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mI=function(e){return[e.deltaX,e.deltaY]},gI=function(e){return e&&"current"in e?e.current:e},bbe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sbe=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},xbe=0,Am=[];function wbe(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(xbe++)[0],o=w.useState(function(){return UV()})[0],a=w.useRef(e);w.useEffect(function(){a.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=z7([e.lockRef.current],(e.shards||[]).map(gI),!0).filter(Boolean);return S.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(S,E){if("touches"in S&&S.touches.length===2)return!a.current.allowPinchZoom;var _=_b(S),k=n.current,T="deltaX"in S?S.deltaX:k[0]-_[0],A="deltaY"in S?S.deltaY:k[1]-_[1],M,R=S.target,D=Math.abs(T)>Math.abs(A)?"h":"v";if("touches"in S&&D==="h"&&R.type==="range")return!1;var j=pI(D,R);if(!j)return!0;if(j?M=D:(M=D==="v"?"h":"v",j=pI(D,R)),!j)return!1;if(!r.current&&"changedTouches"in S&&(T||A)&&(r.current=M),!M)return!0;var F=r.current||M;return ybe(F,E,S,F==="h"?T:A,!0)},[]),l=w.useCallback(function(S){var E=S;if(!(!Am.length||Am[Am.length-1]!==o)){var _="deltaY"in E?mI(E):_b(E),k=t.current.filter(function(M){return M.name===E.type&&M.target===E.target&&bbe(M.delta,_)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(gI).filter(Boolean).filter(function(M){return M.contains(E.target)}),A=T.length>0?s(E,T[0]):!a.current.noIsolation;A&&E.cancelable&&E.preventDefault()}}},[]),u=w.useCallback(function(S,E,_,k){var T={name:S,delta:E,target:_,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(A){return A!==T})},1)},[]),d=w.useCallback(function(S){n.current=_b(S),r.current=void 0},[]),h=w.useCallback(function(S){u(S.type,mI(S),S.target,s(S,e.lockRef.current))},[]),g=w.useCallback(function(S){u(S.type,_b(S),S.target,s(S,e.lockRef.current))},[]);w.useEffect(function(){return Am.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",l,Lm),document.addEventListener("touchmove",l,Lm),document.addEventListener("touchstart",d,Lm),function(){Am=Am.filter(function(S){return S!==o}),document.removeEventListener("wheel",l,Lm),document.removeEventListener("touchmove",l,Lm),document.removeEventListener("touchstart",d,Lm)}},[]);var v=e.removeScrollBar,b=e.inert;return w.createElement(w.Fragment,null,b?w.createElement(o,{styles:Sbe(i)}):null,v?w.createElement(dbe,{gapMode:"margin"}):null)}const Cbe=n3e(WV,wbe);var KV=w.forwardRef(function(e,t){return w.createElement(xx,zl({},e,{ref:t,sideCar:Cbe}))});KV.classNames=xx.classNames;const XV=KV;var up=(...e)=>e.filter(Boolean).join(" ");function Cv(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var _be=class{constructor(){an(this,"modals");this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},Q9=new _be;function kbe(e,t){w.useEffect(()=>(t&&Q9.add(e),()=>{Q9.remove(e)}),[t,e])}function Ebe(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=w.useRef(null),d=w.useRef(null),[h,g,v]=Tbe(r,"chakra-modal","chakra-modal--header","chakra-modal--body");Pbe(u,t&&a),kbe(u,t);const b=w.useRef(null),S=w.useCallback(j=>{b.current=j.target},[]),E=w.useCallback(j=>{j.key==="Escape"&&(j.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[_,k]=w.useState(!1),[T,A]=w.useState(!1),M=w.useCallback((j={},F=null)=>({role:"dialog",...j,ref:Mn(F,u),id:h,tabIndex:-1,"aria-modal":!0,"aria-labelledby":_?g:void 0,"aria-describedby":T?v:void 0,onClick:Cv(j.onClick,H=>H.stopPropagation())}),[v,T,h,g,_]),R=w.useCallback(j=>{j.stopPropagation(),b.current===j.target&&Q9.isTopModal(u)&&(i&&(n==null||n()),s==null||s())},[n,i,s]),D=w.useCallback((j={},F=null)=>({...j,ref:Mn(F,d),onClick:Cv(j.onClick,R),onKeyDown:Cv(j.onKeyDown,E),onMouseDown:Cv(j.onMouseDown,S)}),[E,S,R]);return{isOpen:t,onClose:n,headerId:g,bodyId:v,setBodyMounted:A,setHeaderMounted:k,dialogRef:u,overlayRef:d,getDialogProps:M,getDialogContainerProps:D}}function Pbe(e,t){const n=e.current;w.useEffect(()=>{if(!(!e.current||!t))return cV(e.current)},[t,e,n])}function Tbe(e,...t){const n=w.useId(),r=e||n;return w.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[Lbe,cp]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[Abe,qd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),Yd=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:g,onCloseComplete:v}=e,b=Oi("Modal",e),E={...Ebe(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:g};return N.createElement(Abe,{value:E},N.createElement(Lbe,{value:b},N.createElement(nf,{onExitComplete:v},E.isOpen&&N.createElement(lp,{...t},n))))};Yd.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};Yd.displayName="Modal";var i0=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=qd();w.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=up("chakra-modal__body",n),s=cp();return N.createElement(Ce.div,{ref:t,className:a,id:i,...r,__css:s.body})});i0.displayName="ModalBody";var My=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=qd(),a=up("chakra-modal__close-btn",r),s=cp();return N.createElement(rx,{ref:t,__css:s.closeButton,className:a,onClick:Cv(n,l=>{l.stopPropagation(),o()}),...i})});My.displayName="ModalCloseButton";function ZV(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:d}=qd(),[h,g]=ik();return w.useEffect(()=>{!h&&g&&setTimeout(g)},[h,g]),N.createElement(VV,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:d},N.createElement(XV,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0},e.children))}var Obe={slideInBottom:{...V7,custom:{offsetY:16,reverse:!0}},slideInRight:{...V7,custom:{offsetX:16,reverse:!0}},scale:{...nF,custom:{initialScale:.95,reverse:!0}},none:{}},Mbe=Ce(nl.section),Ibe=e=>Obe[e||"none"],QV=w.forwardRef((e,t)=>{const{preset:n,motionProps:r=Ibe(n),...i}=e;return N.createElement(Mbe,{ref:t,...r,...i})});QV.displayName="ModalTransition";var Qh=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=qd(),u=s(a,t),d=l(i),h=up("chakra-modal__content",n),g=cp(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...g.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...g.dialogContainer},{motionPreset:S}=qd();return N.createElement(ZV,null,N.createElement(Ce.div,{...d,className:"chakra-modal__content-container",tabIndex:-1,__css:b},N.createElement(QV,{preset:S,motionProps:o,className:h,...u,__css:v},r)))});Qh.displayName="ModalContent";var wx=Ee((e,t)=>{const{className:n,...r}=e,i=up("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...cp().footer};return N.createElement(Ce.footer,{ref:t,...r,__css:a,className:i})});wx.displayName="ModalFooter";var C0=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=qd();w.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=up("chakra-modal__header",n),l={flex:0,...cp().header};return N.createElement(Ce.header,{ref:t,className:a,id:i,...r,__css:l})});C0.displayName="ModalHeader";var Rbe=Ce(nl.div),Kd=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=up("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...cp().overlay},{motionPreset:u}=qd(),h=i||(u==="none"?{}:tF);return N.createElement(Rbe,{...h,__css:l,ref:t,className:a,...o})});Kd.displayName="ModalOverlay";function JV(e){const{leastDestructiveRef:t,...n}=e;return N.createElement(Yd,{...n,initialFocusRef:t})}var eW=Ee((e,t)=>N.createElement(Qh,{ref:t,role:"alertdialog",...e})),[Kze,Dbe]=xn(),Nbe=Ce(rF),jbe=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=qd(),d=s(a,t),h=l(o),g=up("chakra-modal__content",n),v=cp(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=Dbe();return N.createElement(ZV,null,N.createElement(Ce.div,{...h,className:"chakra-modal__content-container",__css:S},N.createElement(Nbe,{motionProps:i,direction:E,in:u,className:g,...d,__css:b},r)))});jbe.displayName="DrawerContent";function Bbe(e,t){const n=br(e);w.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var tW=(...e)=>e.filter(Boolean).join(" "),lC=e=>e?!0:void 0;function Ol(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var $be=e=>N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("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"})),Fbe=e=>N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("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 vI(e,t,n,r){w.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 zbe=50,yI=300;function Hbe(e,t){const[n,r]=w.useState(!1),[i,o]=w.useState(null),[a,s]=w.useState(!0),l=w.useRef(null),u=()=>clearTimeout(l.current);Bbe(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?zbe:null);const d=w.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},yI)},[e,a]),h=w.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},yI)},[t,a]),g=w.useCallback(()=>{s(!0),r(!1),u()},[]);return w.useEffect(()=>()=>u(),[]),{up:d,down:h,stop:g,isSpinning:n}}var Vbe=/^[Ee0-9+\-.]$/;function Wbe(e){return Vbe.test(e)}function Ube(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 Gbe(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:d,pattern:h="[0-9]*(.[0-9]+)?",inputMode:g="decimal",allowMouseWheel:v,id:b,onChange:S,precision:E,name:_,"aria-describedby":k,"aria-label":T,"aria-labelledby":A,onFocus:M,onBlur:R,onInvalid:D,getAriaValueText:j,isValidCharacter:F,format:H,parse:K,...te}=e,G=br(M),$=br(R),U=br(D),X=br(F??Wbe),Z=br(j),W=Ige(e),{update:Q,increment:re,decrement:de}=W,[ve,Pe]=w.useState(!1),be=!(s||l),He=w.useRef(null),Oe=w.useRef(null),ot=w.useRef(null),Ve=w.useRef(null),Be=w.useCallback(Le=>Le.split("").filter(X).join(""),[X]),wt=w.useCallback(Le=>(K==null?void 0:K(Le))??Le,[K]),st=w.useCallback(Le=>((H==null?void 0:H(Le))??Le).toString(),[H]);su(()=>{(W.valueAsNumber>o||W.valueAsNumber<i)&&(U==null||U("rangeOverflow",st(W.value),W.valueAsNumber))},[W.valueAsNumber,W.value,st,U]),Ws(()=>{if(!He.current)return;if(He.current.value!=W.value){const At=wt(He.current.value);W.setValue(Be(At))}},[wt,Be]);const gt=w.useCallback((Le=a)=>{be&&re(Le)},[re,be,a]),St=w.useCallback((Le=a)=>{be&&de(Le)},[de,be,a]),Ae=Hbe(gt,St);vI(ot,"disabled",Ae.stop,Ae.isSpinning),vI(Ve,"disabled",Ae.stop,Ae.isSpinning);const lt=w.useCallback(Le=>{if(Le.nativeEvent.isComposing)return;const $e=wt(Le.currentTarget.value);Q(Be($e)),Oe.current={start:Le.currentTarget.selectionStart,end:Le.currentTarget.selectionEnd}},[Q,Be,wt]),Mt=w.useCallback(Le=>{var At;G==null||G(Le),Oe.current&&(Le.target.selectionStart=Oe.current.start??((At=Le.currentTarget.value)==null?void 0:At.length),Le.currentTarget.selectionEnd=Oe.current.end??Le.currentTarget.selectionStart)},[G]),ut=w.useCallback(Le=>{if(Le.nativeEvent.isComposing)return;Ube(Le,X)||Le.preventDefault();const At=_t(Le)*a,$e=Le.key,tn={ArrowUp:()=>gt(At),ArrowDown:()=>St(At),Home:()=>Q(i),End:()=>Q(o)}[$e];tn&&(Le.preventDefault(),tn(Le))},[X,a,gt,St,Q,i,o]),_t=Le=>{let At=1;return(Le.metaKey||Le.ctrlKey)&&(At=.1),Le.shiftKey&&(At=10),At},ln=w.useMemo(()=>{const Le=Z==null?void 0:Z(W.value);if(Le!=null)return Le;const At=W.value.toString();return At||void 0},[W.value,Z]),ae=w.useCallback(()=>{let Le=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumber<i&&(Le=i),W.valueAsNumber>o&&(Le=o),W.cast(Le))},[W,o,i]),De=w.useCallback(()=>{Pe(!1),n&&ae()},[n,Pe,ae]),Ye=w.useCallback(()=>{t&&requestAnimationFrame(()=>{var Le;(Le=He.current)==null||Le.focus()})},[t]),Ke=w.useCallback(Le=>{Le.preventDefault(),Ae.up(),Ye()},[Ye,Ae]),xe=w.useCallback(Le=>{Le.preventDefault(),Ae.down(),Ye()},[Ye,Ae]);Rh(()=>He.current,"wheel",Le=>{var At;const vt=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!vt)return;Le.preventDefault();const tn=_t(Le)*a,Dn=Math.sign(Le.deltaY);Dn===-1?gt(tn):Dn===1&&St(tn)},{passive:!1});const Ne=w.useCallback((Le={},At=null)=>{const $e=l||r&&W.isAtMax;return{...Le,ref:Mn(At,ot),role:"button",tabIndex:-1,onPointerDown:Ol(Le.onPointerDown,vt=>{vt.button!==0||$e||Ke(vt)}),onPointerLeave:Ol(Le.onPointerLeave,Ae.stop),onPointerUp:Ol(Le.onPointerUp,Ae.stop),disabled:$e,"aria-disabled":lC($e)}},[W.isAtMax,r,Ke,Ae.stop,l]),Ct=w.useCallback((Le={},At=null)=>{const $e=l||r&&W.isAtMin;return{...Le,ref:Mn(At,Ve),role:"button",tabIndex:-1,onPointerDown:Ol(Le.onPointerDown,vt=>{vt.button!==0||$e||xe(vt)}),onPointerLeave:Ol(Le.onPointerLeave,Ae.stop),onPointerUp:Ol(Le.onPointerUp,Ae.stop),disabled:$e,"aria-disabled":lC($e)}},[W.isAtMin,r,xe,Ae.stop,l]),Dt=w.useCallback((Le={},At=null)=>({name:_,inputMode:g,type:"text",pattern:h,"aria-labelledby":A,"aria-label":T,"aria-describedby":k,id:b,disabled:l,...Le,readOnly:Le.readOnly??s,"aria-readonly":Le.readOnly??s,"aria-required":Le.required??u,required:Le.required??u,ref:Mn(He,At),value:st(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":lC(d??W.isOutOfRange),"aria-valuetext":ln,autoComplete:"off",autoCorrect:"off",onChange:Ol(Le.onChange,lt),onKeyDown:Ol(Le.onKeyDown,ut),onFocus:Ol(Le.onFocus,Mt,()=>Pe(!0)),onBlur:Ol(Le.onBlur,$,De)}),[_,g,h,A,T,st,k,b,l,u,s,d,W.value,W.valueAsNumber,W.isOutOfRange,i,o,ln,lt,ut,Mt,$,De]);return{value:st(W.value),valueAsNumber:W.valueAsNumber,isFocused:ve,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ne,getDecrementButtonProps:Ct,getInputProps:Dt,htmlProps:te}}var[qbe,Cx]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[Ybe,FE]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),zE=Ee(function(t,n){const r=Oi("NumberInput",t),i=Sn(t),o=vk(i),{htmlProps:a,...s}=Gbe(o),l=w.useMemo(()=>s,[s]);return N.createElement(Ybe,{value:l},N.createElement(qbe,{value:r},N.createElement(Ce.div,{...a,ref:n,className:tW("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});zE.displayName="NumberInput";var nW=Ee(function(t,n){const r=Cx();return N.createElement(Ce.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}})});nW.displayName="NumberInputStepper";var HE=Ee(function(t,n){const{getInputProps:r}=FE(),i=r(t,n),o=Cx();return N.createElement(Ce.input,{...i,className:tW("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});HE.displayName="NumberInputField";var rW=Ce("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),VE=Ee(function(t,n){const r=Cx(),{getDecrementButtonProps:i}=FE(),o=i(t,n);return N.createElement(rW,{...o,__css:r.stepper},t.children??N.createElement($be,null))});VE.displayName="NumberDecrementStepper";var WE=Ee(function(t,n){const{getIncrementButtonProps:r}=FE(),i=r(t,n),o=Cx();return N.createElement(rW,{...i,__css:o.stepper},t.children??N.createElement(Fbe,null))});WE.displayName="NumberIncrementStepper";var Iy=(...e)=>e.filter(Boolean).join(" ");function Kbe(e,...t){return Xbe(e)?e(...t):e}var Xbe=e=>typeof e=="function";function Ml(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Zbe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var[Qbe,dp]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[Jbe,Ry]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `}),Om={click:"click",hover:"hover"};function e4e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Om.click,openDelay:d=200,closeDelay:h=200,isLazy:g,lazyBehavior:v="unmount",computePositionOnMount:b,...S}=e,{isOpen:E,onClose:_,onOpen:k,onToggle:T}=Rk(e),A=w.useRef(null),M=w.useRef(null),R=w.useRef(null),D=w.useRef(!1),j=w.useRef(!1);E&&(j.current=!0);const[F,H]=w.useState(!1),[K,te]=w.useState(!1),G=w.useId(),$=i??G,[U,X,Z,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(lt=>`${lt}-${$}`),{referenceRef:Q,getArrowProps:re,getPopperProps:de,getArrowInnerProps:ve,forceUpdate:Pe}=Ik({...S,enabled:E||!!b}),be=QF({isOpen:E,ref:R});Hge({enabled:E,ref:M}),zF(R,{focusRef:M,visible:E,shouldFocus:o&&u===Om.click}),N0e(R,{focusRef:r,visible:E,shouldFocus:a&&u===Om.click});const He=Dk({wasSelected:j.current,enabled:g,mode:v,isSelected:be.present}),Oe=w.useCallback((lt={},Mt=null)=>{const ut={...lt,style:{...lt.style,transformOrigin:oi.transformOrigin.varRef,[oi.arrowSize.var]:s?`${s}px`:void 0,[oi.arrowShadowColor.var]:l},ref:Mn(R,Mt),children:He?lt.children:null,id:X,tabIndex:-1,role:"dialog",onKeyDown:Ml(lt.onKeyDown,_t=>{n&&_t.key==="Escape"&&_()}),onBlur:Ml(lt.onBlur,_t=>{const ln=bI(_t),ae=uC(R.current,ln),De=uC(M.current,ln);E&&t&&(!ae&&!De)&&_()}),"aria-labelledby":F?Z:void 0,"aria-describedby":K?W:void 0};return u===Om.hover&&(ut.role="tooltip",ut.onMouseEnter=Ml(lt.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=Ml(lt.onMouseLeave,_t=>{_t.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>_(),h))})),ut},[He,X,F,Z,K,W,u,n,_,E,t,h,l,s]),ot=w.useCallback((lt={},Mt=null)=>de({...lt,style:{visibility:E?"visible":"hidden",...lt.style}},Mt),[E,de]),Ve=w.useCallback((lt,Mt=null)=>({...lt,ref:Mn(Mt,A,Q)}),[A,Q]),Be=w.useRef(),wt=w.useRef(),st=w.useCallback(lt=>{A.current==null&&Q(lt)},[Q]),gt=w.useCallback((lt={},Mt=null)=>{const ut={...lt,ref:Mn(M,Mt,st),id:U,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":X};return u===Om.click&&(ut.onClick=Ml(lt.onClick,T)),u===Om.hover&&(ut.onFocus=Ml(lt.onFocus,()=>{Be.current===void 0&&k()}),ut.onBlur=Ml(lt.onBlur,_t=>{const ln=bI(_t),ae=!uC(R.current,ln);E&&t&&ae&&_()}),ut.onKeyDown=Ml(lt.onKeyDown,_t=>{_t.key==="Escape"&&_()}),ut.onMouseEnter=Ml(lt.onMouseEnter,()=>{D.current=!0,Be.current=window.setTimeout(()=>k(),d)}),ut.onMouseLeave=Ml(lt.onMouseLeave,()=>{D.current=!1,Be.current&&(clearTimeout(Be.current),Be.current=void 0),wt.current=window.setTimeout(()=>{D.current===!1&&_()},h)})),ut},[U,E,X,u,st,T,k,t,_,d,h]);w.useEffect(()=>()=>{Be.current&&clearTimeout(Be.current),wt.current&&clearTimeout(wt.current)},[]);const St=w.useCallback((lt={},Mt=null)=>({...lt,id:Z,ref:Mn(Mt,ut=>{H(!!ut)})}),[Z]),Ae=w.useCallback((lt={},Mt=null)=>({...lt,id:W,ref:Mn(Mt,ut=>{te(!!ut)})}),[W]);return{forceUpdate:Pe,isOpen:E,onAnimationComplete:be.onComplete,onClose:_,getAnchorProps:Ve,getArrowProps:re,getArrowInnerProps:ve,getPopoverPositionerProps:ot,getPopoverProps:Oe,getTriggerProps:gt,getHeaderProps:St,getBodyProps:Ae}}function uC(e,t){return e===t||(e==null?void 0:e.contains(t))}function bI(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function UE(e){const t=Oi("Popover",e),{children:n,...r}=Sn(e),i=rp(),o=e4e({...r,direction:i.direction});return N.createElement(Qbe,{value:o},N.createElement(Jbe,{value:t},Kbe(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})))}UE.displayName="Popover";function GE(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=dp(),a=Ry(),s=t??n??r;return N.createElement(Ce.div,{...i(),className:"chakra-popover__arrow-positioner"},N.createElement(Ce.div,{className:Iy("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}GE.displayName="PopoverArrow";var t4e=Ee(function(t,n){const{getBodyProps:r}=dp(),i=Ry();return N.createElement(Ce.div,{...r(t,n),className:Iy("chakra-popover__body",t.className),__css:i.body})});t4e.displayName="PopoverBody";var n4e=Ee(function(t,n){const{onClose:r}=dp(),i=Ry();return N.createElement(rx,{size:"sm",onClick:r,className:Iy("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});n4e.displayName="PopoverCloseButton";function r4e(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var i4e={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]}}},o4e=Ce(nl.section),iW=Ee(function(t,n){const{variants:r=i4e,...i}=t,{isOpen:o}=dp();return N.createElement(o4e,{ref:n,variants:r4e(r),initial:!1,animate:o?"enter":"exit",...i})});iW.displayName="PopoverTransition";var qE=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=dp(),u=Ry(),d={position:"relative",display:"flex",flexDirection:"column",...u.content};return N.createElement(Ce.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},N.createElement(iW,{...i,...a(o,n),onAnimationComplete:Zbe(l,o.onAnimationComplete),className:Iy("chakra-popover__content",t.className),__css:d}))});qE.displayName="PopoverContent";var a4e=Ee(function(t,n){const{getHeaderProps:r}=dp(),i=Ry();return N.createElement(Ce.header,{...r(t,n),className:Iy("chakra-popover__header",t.className),__css:i.header})});a4e.displayName="PopoverHeader";function YE(e){const t=w.Children.only(e.children),{getTriggerProps:n}=dp();return w.cloneElement(t,n(t.props,t.ref))}YE.displayName="PopoverTrigger";function s4e(e,t,n){return(e-t)*100/(n-t)}var l4e=tf({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),u4e=tf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),c4e=tf({"0%":{left:"-40%"},"100%":{left:"100%"}}),d4e=tf({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function oW(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=s4e(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 aW=e=>{const{size:t,isIndeterminate:n,...r}=e;return N.createElement(Ce.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${u4e} 2s linear infinite`:void 0},...r})};aW.displayName="Shape";var J9=e=>N.createElement(Ce.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});J9.displayName="Circle";var f4e=Ee((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:d="10px",color:h="#0078d4",trackColor:g="#edebe9",isIndeterminate:v,...b}=e,S=oW({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(S.percent??0)*2.64,_=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${l4e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:_,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return N.createElement(Ce.div,{ref:t,className:"chakra-progress",...S.bind,...b,__css:T},N.createElement(aW,{size:n,isIndeterminate:v},N.createElement(J9,{stroke:g,strokeWidth:d,className:"chakra-progress__track"}),N.createElement(J9,{stroke:h,strokeWidth:d,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:S.value===0&&!v?0:void 0,...k})),u)});f4e.displayName="CircularProgress";var[h4e,p4e]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `}),m4e=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=oW({value:i,min:n,max:r,isIndeterminate:o,role:a}),d={height:"100%",...p4e().filledTrack};return N.createElement(Ce.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:d})}),sW=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:d,"aria-label":h,"aria-labelledby":g,title:v,role:b,...S}=Sn(e),E=Oi("Progress",e),_=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${d4e} 1s linear infinite`},M={...!d&&a&&s&&k,...d&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${c4e} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return N.createElement(Ce.div,{ref:t,borderRadius:_,__css:R,...S},N.createElement(h4e,{value:E},N.createElement(m4e,{"aria-label":h,"aria-labelledby":g,min:i,max:o,value:r,isIndeterminate:d,css:M,borderRadius:_,title:v,role:b}),l))});sW.displayName="Progress";var g4e=Ce("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});g4e.displayName="CircularProgressLabel";var v4e=(...e)=>e.filter(Boolean).join(" "),y4e=e=>e?"":void 0;function b4e(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 lW=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return N.createElement(Ce.select,{...a,ref:n,className:v4e("chakra-select",o)},i&&N.createElement("option",{value:""},i),r)});lW.displayName="SelectField";var uW=Ee((e,t)=>{var n;const r=Oi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:d,minHeight:h,iconColor:g,iconSize:v,...b}=Sn(e),[S,E]=b4e(b,dne),_=gk(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return N.createElement(Ce.div,{className:"chakra-select__wrapper",__css:k,...S,...i},N.createElement(lW,{ref:t,height:u??l,minH:d??h,placeholder:o,..._,__css:T},e.children),N.createElement(cW,{"data-disabled":y4e(_.disabled),...(g||s)&&{color:g||s},__css:r.icon,...v&&{fontSize:v}},a))});uW.displayName="Select";var S4e=e=>N.createElement("svg",{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})),x4e=Ce("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),cW=e=>{const{children:t=N.createElement(S4e,null),...n}=e,r=w.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return N.createElement(x4e,{...n,className:"chakra-select__icon-wrapper"},w.isValidElement(t)?r:null)};cW.displayName="SelectIcon";function w4e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function C4e(e){const t=k4e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function dW(e){return!!e.touches}function _4e(e){return dW(e)&&e.touches.length>1}function k4e(e){return e.view??window}function E4e(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function P4e(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function fW(e,t="page"){return dW(e)?E4e(e,t):P4e(e,t)}function T4e(e){return t=>{const n=C4e(t);(!n||n&&t.button===0)&&e(t)}}function L4e(e,t=!1){function n(i){e(i,{point:fW(i)})}return t?T4e(n):n}function L4(e,t,n,r){return w4e(e,t,L4e(n,t==="pointerdown"),r)}function hW(e){const t=w.useRef(null);return t.current=e,t}var A4e=class{constructor(e,t,n){an(this,"history",[]);an(this,"startEvent",null);an(this,"lastEvent",null);an(this,"lastEventInfo",null);an(this,"handlers",{});an(this,"removeListeners",()=>{});an(this,"threshold",3);an(this,"win");an(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=cC(this.lastEventInfo,this.history),t=this.startEvent!==null,n=R4e(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=WL();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i==null||i(this.lastEvent,e),this.startEvent=this.lastEvent),o==null||o(this.lastEvent,e)});an(this,"onPointerMove",(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,_re.update(this.updatePoint,!0)});an(this,"onPointerUp",(e,t)=>{const n=cC(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i==null||i(e,n),this.end(),!(!r||!this.startEvent)&&(r==null||r(e,n))});if(this.win=e.view??window,_4e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:fW(e)},{timestamp:i}=WL();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o==null||o(e,cC(r,this.history)),this.removeListeners=I4e(L4(this.win,"pointermove",this.onPointerMove),L4(this.win,"pointerup",this.onPointerUp),L4(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),kre.update(this.updatePoint)}};function SI(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cC(e,t){return{point:e.point,delta:SI(e.point,t[t.length-1]),offset:SI(e.point,t[0]),velocity:M4e(t,.1)}}var O4e=e=>e*1e3;function M4e(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>O4e(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 I4e(...e){return t=>e.reduce((n,r)=>r(n),t)}function dC(e,t){return Math.abs(e-t)}function xI(e){return"x"in e&&"y"in e}function R4e(e,t){if(typeof e=="number"&&typeof t=="number")return dC(e,t);if(xI(e)&&xI(t)){const n=dC(e.x,t.x),r=dC(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function pW(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=w.useRef(null),d=hW({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(h,g){u.current=null,i==null||i(h,g)}});w.useEffect(()=>{var h;(h=u.current)==null||h.updateHandlers(d.current)}),w.useEffect(()=>{const h=e.current;if(!h||!l)return;function g(v){u.current=new A4e(v,d.current,s)}return L4(h,"pointerdown",g)},[e,l,d,s]),w.useEffect(()=>()=>{var h;(h=u.current)==null||h.end(),u.current=null},[])}function D4e(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 N4e=Boolean(globalThis==null?void 0:globalThis.document)?w.useLayoutEffect:w.useEffect;function j4e(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 mW({getNodes:e,observeMutation:t=!0}){const[n,r]=w.useState([]),[i,o]=w.useState(0);return N4e(()=>{const a=e(),s=a.map((l,u)=>D4e(l,d=>{r(h=>[...h.slice(0,u),d,...h.slice(u+1)])}));if(t){const l=a[0];s.push(j4e(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[i]),n}function B4e(e){return typeof e=="object"&&e!==null&&"current"in e}function $4e(e){const[t]=mW({observeMutation:!1,getNodes(){return[B4e(e)?e.current:e]}});return t}var F4e=Object.getOwnPropertyNames,z4e=(e,t)=>function(){return e&&(t=(0,e[F4e(e)[0]])(e=0)),t},lf=z4e({"../../../react-shim.js"(){}});lf();lf();lf();var Ja=e=>e?"":void 0,Rg=e=>e?!0:void 0,uf=(...e)=>e.filter(Boolean).join(" ");lf();function Dg(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}lf();lf();function H4e(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 _v(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var A4={width:0,height:0},kb=e=>e||A4;function gW(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=S=>{const E=r[S]??A4;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",..._v({orientation:t,vertical:{bottom:`calc(${n[S]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[S]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((S,E)=>kb(S).height>kb(E).height?S:E,A4):r.reduce((S,E)=>kb(S).width>kb(E).width?S:E,A4),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,..._v({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",..._v({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,d=[0,i?100-n[0]:n[0]],h=u?d:n;let g=h[0];!u&&i&&(g=100-g);const v=Math.abs(h[h.length-1]-h[0]),b={...l,..._v({orientation:t,vertical:i?{height:`${v}%`,top:`${g}%`}:{height:`${v}%`,bottom:`${g}%`},horizontal:i?{width:`${v}%`,right:`${g}%`}:{width:`${v}%`,left:`${g}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function vW(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function V4e(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:d,isReadOnly:h,onChangeStart:g,onChangeEnd:v,step:b=1,getAriaValueText:S,"aria-valuetext":E,"aria-label":_,"aria-labelledby":k,name:T,focusThumbOnChange:A=!0,minStepsBetweenThumbs:M=0,...R}=e,D=br(g),j=br(v),F=br(S),H=vW({isReversed:a,direction:s,orientation:l}),[K,te]=$S({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(K))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof K}\``);const[G,$]=w.useState(!1),[U,X]=w.useState(!1),[Z,W]=w.useState(-1),Q=!(d||h),re=w.useRef(K),de=K.map(Xe=>kg(Xe,t,n)),ve=M*b,Pe=W4e(de,t,n,ve),be=w.useRef({eventSource:null,value:[],valueBounds:[]});be.current.value=de,be.current.valueBounds=Pe;const He=de.map(Xe=>n-Xe+t),ot=(H?He:de).map(Xe=>f5(Xe,t,n)),Ve=l==="vertical",Be=w.useRef(null),wt=w.useRef(null),st=mW({getNodes(){const Xe=wt.current,xt=Xe==null?void 0:Xe.querySelectorAll("[role=slider]");return xt?Array.from(xt):[]}}),gt=w.useId(),Ae=H4e(u??gt),lt=w.useCallback(Xe=>{var xt;if(!Be.current)return;be.current.eventSource="pointer";const ht=Be.current.getBoundingClientRect(),{clientX:Ht,clientY:nn}=((xt=Xe.touches)==null?void 0:xt[0])??Xe,pr=Ve?ht.bottom-nn:Ht-ht.left,Mo=Ve?ht.height:ht.width;let Mi=pr/Mo;return H&&(Mi=1-Mi),hF(Mi,t,n)},[Ve,H,n,t]),Mt=(n-t)/10,ut=b||(n-t)/100,_t=w.useMemo(()=>({setValueAtIndex(Xe,xt){if(!Q)return;const ht=be.current.valueBounds[Xe];xt=parseFloat(q7(xt,ht.min,ut)),xt=kg(xt,ht.min,ht.max);const Ht=[...be.current.value];Ht[Xe]=xt,te(Ht)},setActiveIndex:W,stepUp(Xe,xt=ut){const ht=be.current.value[Xe],Ht=H?ht-xt:ht+xt;_t.setValueAtIndex(Xe,Ht)},stepDown(Xe,xt=ut){const ht=be.current.value[Xe],Ht=H?ht+xt:ht-xt;_t.setValueAtIndex(Xe,Ht)},reset(){te(re.current)}}),[ut,H,te,Q]),ln=w.useCallback(Xe=>{const xt=Xe.key,Ht={ArrowRight:()=>_t.stepUp(Z),ArrowUp:()=>_t.stepUp(Z),ArrowLeft:()=>_t.stepDown(Z),ArrowDown:()=>_t.stepDown(Z),PageUp:()=>_t.stepUp(Z,Mt),PageDown:()=>_t.stepDown(Z,Mt),Home:()=>{const{min:nn}=Pe[Z];_t.setValueAtIndex(Z,nn)},End:()=>{const{max:nn}=Pe[Z];_t.setValueAtIndex(Z,nn)}}[xt];Ht&&(Xe.preventDefault(),Xe.stopPropagation(),Ht(Xe),be.current.eventSource="keyboard")},[_t,Z,Mt,Pe]),{getThumbStyle:ae,rootStyle:De,trackStyle:Ye,innerTrackStyle:Ke}=w.useMemo(()=>gW({isReversed:H,orientation:l,thumbRects:st,thumbPercents:ot}),[H,l,ot,st]),xe=w.useCallback(Xe=>{var xt;const ht=Xe??Z;if(ht!==-1&&A){const Ht=Ae.getThumb(ht),nn=(xt=wt.current)==null?void 0:xt.ownerDocument.getElementById(Ht);nn&&setTimeout(()=>nn.focus())}},[A,Z,Ae]);su(()=>{be.current.eventSource==="keyboard"&&(j==null||j(be.current.value))},[de,j]);const Ne=Xe=>{const xt=lt(Xe)||0,ht=be.current.value.map(Mi=>Math.abs(Mi-xt)),Ht=Math.min(...ht);let nn=ht.indexOf(Ht);const pr=ht.filter(Mi=>Mi===Ht);pr.length>1&&xt>be.current.value[nn]&&(nn=nn+pr.length-1),W(nn),_t.setValueAtIndex(nn,xt),xe(nn)},Ct=Xe=>{if(Z==-1)return;const xt=lt(Xe)||0;W(Z),_t.setValueAtIndex(Z,xt),xe(Z)};pW(wt,{onPanSessionStart(Xe){Q&&($(!0),Ne(Xe),D==null||D(be.current.value))},onPanSessionEnd(){Q&&($(!1),j==null||j(be.current.value))},onPan(Xe){Q&&Ct(Xe)}});const Dt=w.useCallback((Xe={},xt=null)=>({...Xe,...R,id:Ae.root,ref:Mn(xt,wt),tabIndex:-1,"aria-disabled":Rg(d),"data-focused":Ja(U),style:{...Xe.style,...De}}),[R,d,U,De,Ae]),Le=w.useCallback((Xe={},xt=null)=>({...Xe,ref:Mn(xt,Be),id:Ae.track,"data-disabled":Ja(d),style:{...Xe.style,...Ye}}),[d,Ye,Ae]),At=w.useCallback((Xe={},xt=null)=>({...Xe,ref:xt,id:Ae.innerTrack,style:{...Xe.style,...Ke}}),[Ke,Ae]),$e=w.useCallback((Xe,xt=null)=>{const{index:ht,...Ht}=Xe,nn=de[ht];if(nn==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${ht}\`. The \`value\` or \`defaultValue\` length is : ${de.length}`);const pr=Pe[ht];return{...Ht,ref:xt,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(ht),"data-active":Ja(G&&Z===ht),"aria-valuetext":(F==null?void 0:F(nn))??(E==null?void 0:E[ht]),"aria-valuemin":pr.min,"aria-valuemax":pr.max,"aria-valuenow":nn,"aria-orientation":l,"aria-disabled":Rg(d),"aria-readonly":Rg(h),"aria-label":_==null?void 0:_[ht],"aria-labelledby":_!=null&&_[ht]||k==null?void 0:k[ht],style:{...Xe.style,...ae(ht)},onKeyDown:Dg(Xe.onKeyDown,ln),onFocus:Dg(Xe.onFocus,()=>{X(!0),W(ht)}),onBlur:Dg(Xe.onBlur,()=>{X(!1),W(-1)})}},[Ae,de,Pe,Q,G,Z,F,E,l,d,h,_,k,ae,ln,X]),vt=w.useCallback((Xe={},xt=null)=>({...Xe,ref:xt,id:Ae.output,htmlFor:de.map((ht,Ht)=>Ae.getThumb(Ht)).join(" "),"aria-live":"off"}),[Ae,de]),tn=w.useCallback((Xe,xt=null)=>{const{value:ht,...Ht}=Xe,nn=!(ht<t||ht>n),pr=ht>=de[0]&&ht<=de[de.length-1];let Mo=f5(ht,t,n);Mo=H?100-Mo:Mo;const Mi={position:"absolute",pointerEvents:"none",..._v({orientation:l,vertical:{bottom:`${Mo}%`},horizontal:{left:`${Mo}%`}})};return{...Ht,ref:xt,id:Ae.getMarker(Xe.value),role:"presentation","aria-hidden":!0,"data-disabled":Ja(d),"data-invalid":Ja(!nn),"data-highlighted":Ja(pr),style:{...Xe.style,...Mi}}},[d,H,n,t,l,de,Ae]),Dn=w.useCallback((Xe,xt=null)=>{const{index:ht,...Ht}=Xe;return{...Ht,ref:xt,id:Ae.getInput(ht),type:"hidden",value:de[ht],name:Array.isArray(T)?T[ht]:`${T}-${ht}`}},[T,de,Ae]);return{state:{value:de,isFocused:U,isDragging:G,getThumbPercent:Xe=>ot[Xe],getThumbMinValue:Xe=>Pe[Xe].min,getThumbMaxValue:Xe=>Pe[Xe].max},actions:_t,getRootProps:Dt,getTrackProps:Le,getInnerTrackProps:At,getThumbProps:$e,getMarkerProps:tn,getInputProps:Dn,getOutputProps:vt}}function W4e(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[U4e,_x]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[G4e,KE]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "<RangeSlider />" `}),yW=Ee(function(t,n){const r=Oi("Slider",t),i=Sn(t),{direction:o}=rp();i.direction=o;const{getRootProps:a,...s}=V4e(i),l=w.useMemo(()=>({...s,name:t.name}),[s,t.name]);return N.createElement(U4e,{value:l},N.createElement(G4e,{value:r},N.createElement(Ce.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});yW.defaultProps={orientation:"horizontal"};yW.displayName="RangeSlider";var q4e=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=_x(),a=KE(),s=r(t,n);return N.createElement(Ce.div,{...s,className:uf("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&N.createElement("input",{...i({index:t.index})}))});q4e.displayName="RangeSliderThumb";var Y4e=Ee(function(t,n){const{getTrackProps:r}=_x(),i=KE(),o=r(t,n);return N.createElement(Ce.div,{...o,className:uf("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Y4e.displayName="RangeSliderTrack";var K4e=Ee(function(t,n){const{getInnerTrackProps:r}=_x(),i=KE(),o=r(t,n);return N.createElement(Ce.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});K4e.displayName="RangeSliderFilledTrack";var X4e=Ee(function(t,n){const{getMarkerProps:r}=_x(),i=r(t,n);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__marker",t.className)})});X4e.displayName="RangeSliderMark";lf();lf();function Z4e(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:d,isReadOnly:h,onChangeStart:g,onChangeEnd:v,step:b=1,getAriaValueText:S,"aria-valuetext":E,"aria-label":_,"aria-labelledby":k,name:T,focusThumbOnChange:A=!0,...M}=e,R=br(g),D=br(v),j=br(S),F=vW({isReversed:a,direction:s,orientation:l}),[H,K]=$S({value:i,defaultValue:o??J4e(t,n),onChange:r}),[te,G]=w.useState(!1),[$,U]=w.useState(!1),X=!(d||h),Z=(n-t)/10,W=b||(n-t)/100,Q=kg(H,t,n),re=n-Q+t,ve=f5(F?re:Q,t,n),Pe=l==="vertical",be=hW({min:t,max:n,step:b,isDisabled:d,value:Q,isInteractive:X,isReversed:F,isVertical:Pe,eventSource:null,focusThumbOnChange:A,orientation:l}),He=w.useRef(null),Oe=w.useRef(null),ot=w.useRef(null),Ve=w.useId(),Be=u??Ve,[wt,st]=[`slider-thumb-${Be}`,`slider-track-${Be}`],gt=w.useCallback($e=>{var vt;if(!He.current)return;const tn=be.current;tn.eventSource="pointer";const Dn=He.current.getBoundingClientRect(),{clientX:Xe,clientY:xt}=((vt=$e.touches)==null?void 0:vt[0])??$e,ht=Pe?Dn.bottom-xt:Xe-Dn.left,Ht=Pe?Dn.height:Dn.width;let nn=ht/Ht;F&&(nn=1-nn);let pr=hF(nn,tn.min,tn.max);return tn.step&&(pr=parseFloat(q7(pr,tn.min,tn.step))),pr=kg(pr,tn.min,tn.max),pr},[Pe,F,be]),St=w.useCallback($e=>{const vt=be.current;vt.isInteractive&&($e=parseFloat(q7($e,vt.min,W)),$e=kg($e,vt.min,vt.max),K($e))},[W,K,be]),Ae=w.useMemo(()=>({stepUp($e=W){const vt=F?Q-$e:Q+$e;St(vt)},stepDown($e=W){const vt=F?Q+$e:Q-$e;St(vt)},reset(){St(o||0)},stepTo($e){St($e)}}),[St,F,Q,W,o]),lt=w.useCallback($e=>{const vt=be.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(Z),PageDown:()=>Ae.stepDown(Z),Home:()=>St(vt.min),End:()=>St(vt.max)}[$e.key];Dn&&($e.preventDefault(),$e.stopPropagation(),Dn($e),vt.eventSource="keyboard")},[Ae,St,Z,be]),Mt=(j==null?void 0:j(Q))??E,ut=$4e(Oe),{getThumbStyle:_t,rootStyle:ln,trackStyle:ae,innerTrackStyle:De}=w.useMemo(()=>{const $e=be.current,vt=ut??{width:0,height:0};return gW({isReversed:F,orientation:$e.orientation,thumbRects:[vt],thumbPercents:[ve]})},[F,ut,ve,be]),Ye=w.useCallback(()=>{be.current.focusThumbOnChange&&setTimeout(()=>{var vt;return(vt=Oe.current)==null?void 0:vt.focus()})},[be]);su(()=>{const $e=be.current;Ye(),$e.eventSource==="keyboard"&&(D==null||D($e.value))},[Q,D]);function Ke($e){const vt=gt($e);vt!=null&&vt!==be.current.value&&K(vt)}pW(ot,{onPanSessionStart($e){const vt=be.current;vt.isInteractive&&(G(!0),Ye(),Ke($e),R==null||R(vt.value))},onPanSessionEnd(){const $e=be.current;$e.isInteractive&&(G(!1),D==null||D($e.value))},onPan($e){be.current.isInteractive&&Ke($e)}});const xe=w.useCallback(($e={},vt=null)=>({...$e,...M,ref:Mn(vt,ot),tabIndex:-1,"aria-disabled":Rg(d),"data-focused":Ja($),style:{...$e.style,...ln}}),[M,d,$,ln]),Ne=w.useCallback(($e={},vt=null)=>({...$e,ref:Mn(vt,He),id:st,"data-disabled":Ja(d),style:{...$e.style,...ae}}),[d,st,ae]),Ct=w.useCallback(($e={},vt=null)=>({...$e,ref:vt,style:{...$e.style,...De}}),[De]),Dt=w.useCallback(($e={},vt=null)=>({...$e,ref:Mn(vt,Oe),role:"slider",tabIndex:X?0:void 0,id:wt,"data-active":Ja(te),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":Rg(d),"aria-readonly":Rg(h),"aria-label":_,"aria-labelledby":_?void 0:k,style:{...$e.style,..._t(0)},onKeyDown:Dg($e.onKeyDown,lt),onFocus:Dg($e.onFocus,()=>U(!0)),onBlur:Dg($e.onBlur,()=>U(!1))}),[X,wt,te,Mt,t,n,Q,l,d,h,_,k,_t,lt]),Le=w.useCallback(($e,vt=null)=>{const tn=!($e.value<t||$e.value>n),Dn=Q>=$e.value,Xe=f5($e.value,t,n),xt={position:"absolute",pointerEvents:"none",...Q4e({orientation:l,vertical:{bottom:F?`${100-Xe}%`:`${Xe}%`},horizontal:{left:F?`${100-Xe}%`:`${Xe}%`}})};return{...$e,ref:vt,role:"presentation","aria-hidden":!0,"data-disabled":Ja(d),"data-invalid":Ja(!tn),"data-highlighted":Ja(Dn),style:{...$e.style,...xt}}},[d,F,n,t,l,Q]),At=w.useCallback(($e={},vt=null)=>({...$e,ref:vt,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:$,isDragging:te},actions:Ae,getRootProps:xe,getTrackProps:Ne,getInnerTrackProps:Ct,getThumbProps:Dt,getMarkerProps:Le,getInputProps:At}}function Q4e(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function J4e(e,t){return t<e?e:e+(t-e)/2}var[e5e,kx]=xn({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[t5e,Ex]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),XE=Ee((e,t)=>{const n=Oi("Slider",e),r=Sn(e),{direction:i}=rp();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Z4e(r),l=a(),u=o({},t);return N.createElement(e5e,{value:s},N.createElement(t5e,{value:n},N.createElement(Ce.div,{...l,className:uf("chakra-slider",e.className),__css:n.container},e.children,N.createElement("input",{...u}))))});XE.defaultProps={orientation:"horizontal"};XE.displayName="Slider";var bW=Ee((e,t)=>{const{getThumbProps:n}=kx(),r=Ex(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__thumb",e.className),__css:r.thumb})});bW.displayName="SliderThumb";var SW=Ee((e,t)=>{const{getTrackProps:n}=kx(),r=Ex(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__track",e.className),__css:r.track})});SW.displayName="SliderTrack";var xW=Ee((e,t)=>{const{getInnerTrackProps:n}=kx(),r=Ex(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__filled-track",e.className),__css:r.filledTrack})});xW.displayName="SliderFilledTrack";var e_=Ee((e,t)=>{const{getMarkerProps:n}=kx(),r=Ex(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__marker",e.className),__css:r.mark})});e_.displayName="SliderMark";var n5e=(...e)=>e.filter(Boolean).join(" "),wI=e=>e?"":void 0,ZE=Ee(function(t,n){const r=Oi("Switch",t),{spacing:i="0.5rem",children:o,...a}=Sn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:d,getLabelProps:h}=dF(a),g=w.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=w.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=w.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return N.createElement(Ce.label,{...d(),className:n5e("chakra-switch",t.className),__css:g},N.createElement("input",{className:"chakra-switch__input",...l({},n)}),N.createElement(Ce.span,{...u(),className:"chakra-switch__track",__css:v},N.createElement(Ce.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":wI(s.isChecked),"data-hover":wI(s.isHovered)})),o&&N.createElement(Ce.span,{className:"chakra-switch__label",...h(),__css:b},o))});ZE.displayName="Switch";var _0=(...e)=>e.filter(Boolean).join(" ");function t_(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[r5e,wW,i5e,o5e]=$8();function a5e(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[d,h]=w.useState(t??0),[g,v]=$S({defaultValue:t??0,value:r,onChange:n});w.useEffect(()=>{r!=null&&h(r)},[r]);const b=i5e(),S=w.useId();return{id:`tabs-${e.id??S}`,selectedIndex:g,focusedIndex:d,setSelectedIndex:v,setFocusedIndex:h,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[s5e,Dy]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function l5e(e){const{focusedIndex:t,orientation:n,direction:r}=Dy(),i=wW(),o=w.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},d=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},h=n==="horizontal",g=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",S=r==="ltr"?"ArrowRight":"ArrowLeft",_={[b]:()=>h&&l(),[S]:()=>h&&s(),ArrowDown:()=>g&&s(),ArrowUp:()=>g&&l(),Home:u,End:d}[v];_&&(a.preventDefault(),_(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:t_(e.onKeyDown,o)}}function u5e(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Dy(),{index:u,register:d}=o5e({disabled:t&&!n}),h=u===l,g=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=IF({...r,ref:Mn(d,e.ref),isDisabled:t,isFocusable:n,onClick:t_(e.onClick,g)}),S="button";return{...b,id:CW(a,u),role:"tab",tabIndex:h?0:-1,type:S,"aria-selected":h,"aria-controls":_W(a,u),onFocus:t?void 0:t_(e.onFocus,v)}}var[c5e,d5e]=xn({});function f5e(e){const t=Dy(),{id:n,selectedIndex:r}=t,o=ex(e.children).map((a,s)=>w.createElement(c5e,{key:s,value:{isSelected:s===r,id:_W(n,s),tabId:CW(n,s),selectedIndex:r}},a));return{...e,children:o}}function h5e(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Dy(),{isSelected:o,id:a,tabId:s}=d5e(),l=w.useRef(!1);o&&(l.current=!0);const u=Dk({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 p5e(){const e=Dy(),t=wW(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=w.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=w.useState(!1);return Ws(()=>{if(n==null)return;const d=t.item(n);if(d==null)return;i&&s({left:d.node.offsetLeft,width:d.node.offsetWidth}),o&&s({top:d.node.offsetTop,height:d.node.offsetHeight});const h=requestAnimationFrame(()=>{u(!0)});return()=>{h&&cancelAnimationFrame(h)}},[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 CW(e,t){return`${e}--tab-${t}`}function _W(e,t){return`${e}--tabpanel-${t}`}var[m5e,Ny]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),kW=Ee(function(t,n){const r=Oi("Tabs",t),{children:i,className:o,...a}=Sn(t),{htmlProps:s,descendants:l,...u}=a5e(a),d=w.useMemo(()=>u,[u]),{isFitted:h,...g}=s;return N.createElement(r5e,{value:l},N.createElement(s5e,{value:d},N.createElement(m5e,{value:r},N.createElement(Ce.div,{className:_0("chakra-tabs",o),ref:n,...g,__css:r.root},i))))});kW.displayName="Tabs";var g5e=Ee(function(t,n){const r=p5e(),i={...t.style,...r},o=Ny();return N.createElement(Ce.div,{ref:n,...t,className:_0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});g5e.displayName="TabIndicator";var v5e=Ee(function(t,n){const r=l5e({...t,ref:n}),o={display:"flex",...Ny().tablist};return N.createElement(Ce.div,{...r,className:_0("chakra-tabs__tablist",t.className),__css:o})});v5e.displayName="TabList";var EW=Ee(function(t,n){const r=h5e({...t,ref:n}),i=Ny();return N.createElement(Ce.div,{outline:"0",...r,className:_0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});EW.displayName="TabPanel";var PW=Ee(function(t,n){const r=f5e(t),i=Ny();return N.createElement(Ce.div,{...r,width:"100%",ref:n,className:_0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});PW.displayName="TabPanels";var TW=Ee(function(t,n){const r=Ny(),i=u5e({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return N.createElement(Ce.button,{...i,className:_0("chakra-tabs__tab",t.className),__css:o})});TW.displayName="Tab";var y5e=(...e)=>e.filter(Boolean).join(" ");function b5e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var S5e=["h","minH","height","minHeight"],QE=Ee((e,t)=>{const n=Ao("Textarea",e),{className:r,rows:i,...o}=Sn(e),a=gk(o),s=i?b5e(n,S5e):n;return N.createElement(Ce.textarea,{ref:t,rows:i,...a,className:y5e("chakra-textarea",r),__css:s})});QE.displayName="Textarea";function x5e(e,t){const n=br(e);w.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function n_(e,...t){return w5e(e)?e(...t):e}var w5e=e=>typeof e=="function";function C5e(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==null?void 0:i[t])??n}var _5e=(e,t)=>e.find(n=>n.id===t);function CI(e,t){const n=LW(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function LW(e,t){for(const[n,r]of Object.entries(e))if(_5e(r,t))return n}function k5e(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 E5e(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 P5e={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Vl=T5e(P5e);function T5e(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=L5e(i,o),{position:s,id:l}=a;return r(u=>{const h=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:h}}),l},update:(i,o)=>{i&&r(a=>{const s={...a},{position:l,index:u}=CI(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:AW(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(d=>({...d,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=LW(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(CI(Vl.getState(),i).position)}}var _I=0;function L5e(e,t={}){_I+=1;const n=t.id??_I,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Vl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var A5e=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 N.createElement(oF,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},N.createElement(sF,null,l),N.createElement(Ce.div,{flex:"1",maxWidth:"100%"},i&&N.createElement(lF,{id:u==null?void 0:u.title},i),s&&N.createElement(aF,{id:u==null?void 0:u.description,display:"block"},s)),o&&N.createElement(rx,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function AW(e={}){const{render:t,toastComponent:n=A5e}=e;return i=>typeof t=="function"?t({...i,...e}):N.createElement(n,{...i,...e})}function O5e(e,t){const n=i=>({...t,...i,position:C5e((i==null?void 0:i.position)??(t==null?void 0:t.position),e)}),r=i=>{const o=n(i),a=AW(o);return Vl.notify(a,o)};return r.update=(i,o)=>{Vl.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,...n_(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...n_(o.error,s)}))},r.closeAll=Vl.closeAll,r.close=Vl.close,r.isActive=Vl.isActive,r}function jy(e){const{theme:t}=CB();return w.useMemo(()=>O5e(t.direction,e),[e,t.direction])}var M5e={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]}}},OW=w.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=M5e,toastSpacing:d="0.5rem"}=e,[h,g]=w.useState(s),v=rhe();su(()=>{v||r==null||r()},[v]),su(()=>{g(s)},[s]);const b=()=>g(null),S=()=>g(s),E=()=>{v&&i()};w.useEffect(()=>{v&&o&&i()},[v,o,i]),x5e(E,h);const _=w.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:d,...l}),[l,d]),k=w.useMemo(()=>k5e(a),[a]);return N.createElement(nl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:S,custom:{position:a},style:k},N.createElement(Ce.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:_},n_(n,{id:t,onClose:E})))});OW.displayName="ToastComponent";var I5e=e=>{const t=w.useSyncExternalStore(Vl.subscribe,Vl.getState,Vl.getState),{children:n,motionVariants:r,component:i=OW,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return N.createElement("ul",{role:"region","aria-live":"polite",key:l,id:`chakra-toast-manager-${l}`,style:E5e(l)},N.createElement(nf,{initial:!1},u.map(d=>N.createElement(i,{key:d.id,motionVariants:r,...d}))))});return N.createElement(N.Fragment,null,n,N.createElement(lp,{...o},s))};function R5e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function D5e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var N5e={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 nv(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var F5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},r_=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function j5e(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:d,id:h,isOpen:g,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:S,arrowPadding:E,modifiers:_,isDisabled:k,gutter:T,offset:A,direction:M,...R}=e,{isOpen:D,onOpen:j,onClose:F}=Rk({isOpen:g,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:H,getPopperProps:K,getArrowInnerProps:te,getArrowProps:G}=Ik({enabled:D,placement:d,arrowPadding:E,modifiers:_,gutter:T,offset:A,direction:M}),$=w.useId(),X=`tooltip-${h??$}`,Z=w.useRef(null),W=w.useRef(),Q=w.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0)},[]),re=w.useRef(),de=w.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=void 0)},[]),ve=w.useCallback(()=>{de(),F()},[F,de]),Pe=B5e(Z,ve),be=w.useCallback(()=>{if(!k&&!W.current){Pe();const gt=r_(Z);W.current=gt.setTimeout(j,t)}},[Pe,k,j,t]),He=w.useCallback(()=>{Q();const gt=r_(Z);re.current=gt.setTimeout(ve,n)},[n,ve,Q]),Oe=w.useCallback(()=>{D&&r&&He()},[r,He,D]),ot=w.useCallback(()=>{D&&a&&He()},[a,He,D]),Ve=w.useCallback(gt=>{D&>.key==="Escape"&&He()},[D,He]);Rh(()=>F5(Z),"keydown",s?Ve:void 0),Rh(()=>F5(Z),"scroll",()=>{D&&o&&ve()}),w.useEffect(()=>{k&&(Q(),D&&F())},[k,D,F,Q]),w.useEffect(()=>()=>{Q(),de()},[Q,de]),Rh(()=>Z.current,"pointerleave",He);const Be=w.useCallback((gt={},St=null)=>({...gt,ref:Mn(Z,St,H),onPointerEnter:nv(gt.onPointerEnter,lt=>{lt.pointerType!=="touch"&&be()}),onClick:nv(gt.onClick,Oe),onPointerDown:nv(gt.onPointerDown,ot),onFocus:nv(gt.onFocus,be),onBlur:nv(gt.onBlur,He),"aria-describedby":D?X:void 0}),[be,He,ot,D,X,Oe,H]),wt=w.useCallback((gt={},St=null)=>K({...gt,style:{...gt.style,[oi.arrowSize.var]:b?`${b}px`:void 0,[oi.arrowShadowColor.var]:S}},St),[K,b,S]),st=w.useCallback((gt={},St=null)=>{const Ae={...gt.style,position:"relative",transformOrigin:oi.transformOrigin.varRef};return{ref:St,...R,...gt,id:X,role:"tooltip",style:Ae}},[R,X]);return{isOpen:D,show:be,hide:He,getTriggerProps:Be,getTooltipProps:st,getTooltipPositionerProps:wt,getArrowProps:G,getArrowInnerProps:te}}var fC="chakra-ui:close-tooltip";function B5e(e,t){return w.useEffect(()=>{const n=F5(e);return n.addEventListener(fC,t),()=>n.removeEventListener(fC,t)},[t,e]),()=>{const n=F5(e),r=r_(e);n.dispatchEvent(new r.CustomEvent(fC))}}var $5e=Ce(nl.div),uo=Ee((e,t)=>{const n=Ao("Tooltip",e),r=Sn(e),i=rp(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:d,portalProps:h,background:g,backgroundColor:v,bgColor:b,motionProps:S,...E}=r,_=g??v??d??b;if(_){n.bg=_;const F=kne(i,"colors",_);n[oi.arrowBg.var]=F}const k=j5e({...E,direction:i.direction}),T=typeof o=="string"||s;let A;if(T)A=N.createElement(Ce.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const F=w.Children.only(o);A=w.cloneElement(F,k.getTriggerProps(F.props,F.ref))}const M=!!l,R=k.getTooltipProps({},t),D=M?R5e(R,["role","id"]):R,j=D5e(R,["role","id"]);return a?N.createElement(N.Fragment,null,A,N.createElement(nf,null,k.isOpen&&N.createElement(lp,{...h},N.createElement(Ce.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},N.createElement($5e,{variants:N5e,initial:"exit",animate:"enter",exit:"exit",...S,...D,__css:n},a,M&&N.createElement(Ce.span,{srOnly:!0,...j},l),u&&N.createElement(Ce.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},N.createElement(Ce.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))))))):N.createElement(N.Fragment,null,o)});uo.displayName="Tooltip";var F5e=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=N.createElement(MF,{environment:a},t);return N.createElement(gce,{theme:o,cssVarsRoot:s},N.createElement(Pj,{colorModeManager:n,options:o.config},i?N.createElement(Dge,null):N.createElement(Rge,null),N.createElement(yce,null),r?N.createElement(sV,{zIndex:r},l):l))};function z5e({children:e,theme:t=sce,toastOptions:n,...r}){return N.createElement(F5e,{theme:t,...r},e,N.createElement(I5e,{...n}))}var i_={},kI=Qs;i_.createRoot=kI.createRoot,i_.hydrateRoot=kI.hydrateRoot;var o_={},H5e={get exports(){return o_},set exports(e){o_=e}},MW={};/**
|
||
* @license React
|
||
* use-sync-external-store-shim.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var o0=w;function V5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var W5e=typeof Object.is=="function"?Object.is:V5e,U5e=o0.useState,G5e=o0.useEffect,q5e=o0.useLayoutEffect,Y5e=o0.useDebugValue;function K5e(e,t){var n=t(),r=U5e({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return q5e(function(){i.value=n,i.getSnapshot=t,hC(i)&&o({inst:i})},[e,n,t]),G5e(function(){return hC(i)&&o({inst:i}),e(function(){hC(i)&&o({inst:i})})},[e]),Y5e(n),n}function hC(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!W5e(e,n)}catch{return!0}}function X5e(e,t){return t()}var Z5e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?X5e:K5e;MW.useSyncExternalStore=o0.useSyncExternalStore!==void 0?o0.useSyncExternalStore:Z5e;(function(e){e.exports=MW})(H5e);var a_={},Q5e={get exports(){return a_},set exports(e){a_=e}},IW={};/**
|
||
* @license React
|
||
* use-sync-external-store-shim/with-selector.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Px=w,J5e=o_;function eSe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tSe=typeof Object.is=="function"?Object.is:eSe,nSe=J5e.useSyncExternalStore,rSe=Px.useRef,iSe=Px.useEffect,oSe=Px.useMemo,aSe=Px.useDebugValue;IW.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=rSe(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=oSe(function(){function l(v){if(!u){if(u=!0,d=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return h=b}return h=v}if(b=h,tSe(d,v))return b;var S=r(v);return i!==void 0&&i(b,S)?b:(d=v,h=S)}var u=!1,d,h,g=n===void 0?null:n;return[function(){return l(t())},g===null?void 0:function(){return l(g())}]},[t,n,r,i]);var s=nSe(e,o[0],o[1]);return iSe(function(){a.hasValue=!0,a.value=s},[s]),aSe(s),s};(function(e){e.exports=IW})(Q5e);function sSe(e){e()}let RW=sSe;const lSe=e=>RW=e,uSe=()=>RW,Xd=w.createContext(null);function DW(){return w.useContext(Xd)}const cSe=()=>{throw new Error("uSES not initialized!")};let NW=cSe;const dSe=e=>{NW=e},fSe=(e,t)=>e===t;function hSe(e=Xd){const t=e===Xd?DW:()=>w.useContext(e);return function(r,i=fSe){const{store:o,subscription:a,getServerState:s}=t(),l=NW(a.addNestedSub,o.getState,s||o.getState,r,i);return w.useDebugValue(l),l}}const pSe=hSe();var EI={},mSe={get exports(){return EI},set exports(e){EI=e}},zn={};/**
|
||
* @license React
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var JE=Symbol.for("react.element"),eP=Symbol.for("react.portal"),Tx=Symbol.for("react.fragment"),Lx=Symbol.for("react.strict_mode"),Ax=Symbol.for("react.profiler"),Ox=Symbol.for("react.provider"),Mx=Symbol.for("react.context"),gSe=Symbol.for("react.server_context"),Ix=Symbol.for("react.forward_ref"),Rx=Symbol.for("react.suspense"),Dx=Symbol.for("react.suspense_list"),Nx=Symbol.for("react.memo"),jx=Symbol.for("react.lazy"),vSe=Symbol.for("react.offscreen"),jW;jW=Symbol.for("react.module.reference");function ps(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case JE:switch(e=e.type,e){case Tx:case Ax:case Lx:case Rx:case Dx:return e;default:switch(e=e&&e.$$typeof,e){case gSe:case Mx:case Ix:case jx:case Nx:case Ox:return e;default:return t}}case eP:return t}}}zn.ContextConsumer=Mx;zn.ContextProvider=Ox;zn.Element=JE;zn.ForwardRef=Ix;zn.Fragment=Tx;zn.Lazy=jx;zn.Memo=Nx;zn.Portal=eP;zn.Profiler=Ax;zn.StrictMode=Lx;zn.Suspense=Rx;zn.SuspenseList=Dx;zn.isAsyncMode=function(){return!1};zn.isConcurrentMode=function(){return!1};zn.isContextConsumer=function(e){return ps(e)===Mx};zn.isContextProvider=function(e){return ps(e)===Ox};zn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===JE};zn.isForwardRef=function(e){return ps(e)===Ix};zn.isFragment=function(e){return ps(e)===Tx};zn.isLazy=function(e){return ps(e)===jx};zn.isMemo=function(e){return ps(e)===Nx};zn.isPortal=function(e){return ps(e)===eP};zn.isProfiler=function(e){return ps(e)===Ax};zn.isStrictMode=function(e){return ps(e)===Lx};zn.isSuspense=function(e){return ps(e)===Rx};zn.isSuspenseList=function(e){return ps(e)===Dx};zn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Tx||e===Ax||e===Lx||e===Rx||e===Dx||e===vSe||typeof e=="object"&&e!==null&&(e.$$typeof===jx||e.$$typeof===Nx||e.$$typeof===Ox||e.$$typeof===Mx||e.$$typeof===Ix||e.$$typeof===jW||e.getModuleId!==void 0)};zn.typeOf=ps;(function(e){e.exports=zn})(mSe);function ySe(){const e=uSe();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 PI={notify(){},get:()=>[]};function bSe(e,t){let n,r=PI;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function a(){d.onStateChange&&d.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=ySe())}function u(){n&&(n(),n=void 0,r.clear(),r=PI)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return d}const SSe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xSe=SSe?w.useLayoutEffect:w.useEffect;function wSe({store:e,context:t,children:n,serverState:r}){const i=w.useMemo(()=>{const s=bSe(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=w.useMemo(()=>e.getState(),[e]);xSe(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]);const a=t||Xd;return N.createElement(a.Provider,{value:i},n)}function BW(e=Xd){const t=e===Xd?DW:()=>w.useContext(e);return function(){const{store:r}=t();return r}}const CSe=BW();function _Se(e=Xd){const t=e===Xd?CSe:BW(e);return function(){return t().dispatch}}const kSe=_Se();dSe(a_.useSyncExternalStoreWithSelector);lSe(Qs.unstable_batchedUpdates);function O4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O4=function(n){return typeof n}:O4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},O4(e)}function ESe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PSe(e,t,n){return t&&TI(e.prototype,t),n&&TI(e,n),e}function TSe(e,t){return t&&(O4(t)==="object"||typeof t=="function")?t:M4(e)}function s_(e){return s_=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s_(e)}function M4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l_(e,t)}function l_(e,t){return l_=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},l_(e,t)}function I4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $W=function(e){LSe(t,e);function t(){var n,r;ESe(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=TSe(this,(n=s_(t)).call.apply(n,[this].concat(o))),I4(M4(r),"state",{bootstrapped:!1}),I4(M4(r),"_unsubscribe",void 0),I4(M4(r),"handlePersistorState",function(){var s=r.props.persistor,l=s.getState(),u=l.bootstrapped;u&&(r.props.onBeforeLift?Promise.resolve(r.props.onBeforeLift()).finally(function(){return r.setState({bootstrapped:!0})}):r.setState({bootstrapped:!0}),r._unsubscribe&&r._unsubscribe())}),r}return PSe(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t}(w.PureComponent);I4($W,"defaultProps",{children:null,loading:null});function zs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Zd(e){return!!e&&!!e[vr]}function ac(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===BSe}(e)||Array.isArray(e)||!!e[DI]||!!(!((t=e.constructor)===null||t===void 0)&&t[DI])||tP(e)||nP(e))}function Jh(e,t,n){n===void 0&&(n=!1),k0(e)===0?(n?Object.keys:jg)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function k0(e){var t=e[vr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:tP(e)?2:nP(e)?3:0}function Ng(e,t){return k0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ASe(e,t){return k0(e)===2?e.get(t):e[t]}function FW(e,t,n){var r=k0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function zW(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function tP(e){return NSe&&e instanceof Map}function nP(e){return jSe&&e instanceof Set}function hh(e){return e.o||e.t}function rP(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=VW(e);delete t[vr];for(var n=jg(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function iP(e,t){return t===void 0&&(t=!1),oP(e)||Zd(e)||!ac(e)||(k0(e)>1&&(e.set=e.add=e.clear=e.delete=OSe),Object.freeze(e),t&&Jh(e,function(n,r){return iP(r,!0)},!0)),e}function OSe(){zs(2)}function oP(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tu(e){var t=f_[e];return t||zs(18,e),t}function MSe(e,t){f_[e]||(f_[e]=t)}function u_(){return Z2}function pC(e,t){t&&(tu("Patches"),e.u=[],e.s=[],e.v=t)}function z5(e){c_(e),e.p.forEach(ISe),e.p=null}function c_(e){e===Z2&&(Z2=e.l)}function LI(e){return Z2={p:[],l:Z2,h:e,m:!0,_:0}}function ISe(e){var t=e[vr];t.i===0||t.i===1?t.j():t.O=!0}function mC(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||tu("ES5").S(t,e,r),r?(n[vr].P&&(z5(t),zs(4)),ac(e)&&(e=H5(t,e),t.l||V5(t,e)),t.u&&tu("Patches").M(n[vr].t,e,t.u,t.s)):e=H5(t,n,[]),z5(t),t.u&&t.v(t.u,t.s),e!==HW?e:void 0}function H5(e,t,n){if(oP(t))return t;var r=t[vr];if(!r)return Jh(t,function(o,a){return AI(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return V5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=rP(r.k):r.o;Jh(r.i===3?new Set(i):i,function(o,a){return AI(e,r,i,o,a,n)}),V5(e,i,!1),n&&e.u&&tu("Patches").R(r,n,e.u,e.s)}return r.o}function AI(e,t,n,r,i,o){if(Zd(i)){var a=H5(e,i,o&&t&&t.i!==3&&!Ng(t.D,r)?o.concat(r):void 0);if(FW(n,r,a),!Zd(a))return;e.m=!1}if(ac(i)&&!oP(i)){if(!e.h.F&&e._<1)return;H5(e,i),t&&t.A.l||V5(e,i)}}function V5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&iP(t,n)}function gC(e,t){var n=e[vr];return(n?hh(n):e)[t]}function OI(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 xd(e){e.P||(e.P=!0,e.l&&xd(e.l))}function vC(e){e.o||(e.o=rP(e.t))}function d_(e,t,n){var r=tP(t)?tu("MapSet").N(t,n):nP(t)?tu("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:u_(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Q2;a&&(l=[s],u=kv);var d=Proxy.revocable(l,u),h=d.revoke,g=d.proxy;return s.k=g,s.j=h,g}(t,n):tu("ES5").J(t,n);return(n?n.A:u_()).p.push(r),r}function RSe(e){return Zd(e)||zs(22,e),function t(n){if(!ac(n))return n;var r,i=n[vr],o=k0(n);if(i){if(!i.P&&(i.i<4||!tu("ES5").K(i)))return i.t;i.I=!0,r=MI(n,o),i.I=!1}else r=MI(n,o);return Jh(r,function(a,s){i&&ASe(i.t,a)===s||FW(r,a,t(s))}),o===3?new Set(r):r}(e)}function MI(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return rP(e)}function DSe(){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[vr];return Q2.get(l,o)},set:function(l){var u=this[vr];Q2.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][vr];if(!s.P)switch(s.i){case 5:r(s)&&xd(s);break;case 4:n(s)&&xd(s)}}}function n(o){for(var a=o.t,s=o.k,l=jg(s),u=l.length-1;u>=0;u--){var d=l[u];if(d!==vr){var h=a[d];if(h===void 0&&!Ng(a,d))return!0;var g=s[d],v=g&&g[vr];if(v?v.t!==h:!zW(g,h))return!0}}var b=!!a[vr];return l.length!==jg(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l<a.length;l++)if(!a.hasOwnProperty(l))return!0;return!1}var i={};MSe("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(d,h){if(d){for(var g=Array(h.length),v=0;v<h.length;v++)Object.defineProperty(g,""+v,e(v,!0));return g}var b=VW(h);delete b[vr];for(var S=jg(b),E=0;E<S.length;E++){var _=S[E];b[_]=e(_,d||!!b[_].enumerable)}return Object.create(Object.getPrototypeOf(h),b)}(s,o),u={i:s?5:4,A:a?a.A:u_(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,vr,{value:u,writable:!0}),l},S:function(o,a,s){s?Zd(a)&&a[vr].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var d=u[vr];if(d){var h=d.t,g=d.k,v=d.D,b=d.i;if(b===4)Jh(g,function(T){T!==vr&&(h[T]!==void 0||Ng(h,T)?v[T]||l(g[T]):(v[T]=!0,xd(d)))}),Jh(h,function(T){g[T]!==void 0||Ng(g,T)||(v[T]=!1,xd(d))});else if(b===5){if(r(d)&&(xd(d),v.length=!0),g.length<h.length)for(var S=g.length;S<h.length;S++)v[S]=!1;else for(var E=h.length;E<g.length;E++)v[E]=!0;for(var _=Math.min(g.length,h.length),k=0;k<_;k++)g.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&l(g[k])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var II,Z2,aP=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",NSe=typeof Map<"u",jSe=typeof Set<"u",RI=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",HW=aP?Symbol.for("immer-nothing"):((II={})["immer-nothing"]=!0,II),DI=aP?Symbol.for("immer-draftable"):"__$immer_draftable",vr=aP?Symbol.for("immer-state"):"__$immer_state",BSe=""+Object.prototype.constructor,jg=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,VW=Object.getOwnPropertyDescriptors||function(e){var t={};return jg(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},f_={},Q2={get:function(e,t){if(t===vr)return e;var n=hh(e);if(!Ng(n,t))return function(i,o,a){var s,l=OI(o,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!ac(r)?r:r===gC(e.t,t)?(vC(e),e.o[t]=d_(e.A.h,r,e)):r},has:function(e,t){return t in hh(e)},ownKeys:function(e){return Reflect.ownKeys(hh(e))},set:function(e,t,n){var r=OI(hh(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=gC(hh(e),t),o=i==null?void 0:i[vr];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(zW(n,i)&&(n!==void 0||Ng(e.t,t)))return!0;vC(e),xd(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return gC(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,vC(e),xd(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=hh(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){zs(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){zs(12)}},kv={};Jh(Q2,function(e,t){kv[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),kv.deleteProperty=function(e,t){return kv.set.call(this,e,t,void 0)},kv.set=function(e,t,n){return Q2.set.call(this,e[0],t,n,e[0])};var $Se=function(){function e(n){var r=this;this.g=RI,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var l=r;return function(S){var E=this;S===void 0&&(S=s);for(var _=arguments.length,k=Array(_>1?_-1:0),T=1;T<_;T++)k[T-1]=arguments[T];return l.produce(S,function(A){var M;return(M=o).call.apply(M,[E,A].concat(k))})}}var u;if(typeof o!="function"&&zs(6),a!==void 0&&typeof a!="function"&&zs(7),ac(i)){var d=LI(r),h=d_(r,i,void 0),g=!0;try{u=o(h),g=!1}finally{g?z5(d):c_(d)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return pC(d,a),mC(S,d)},function(S){throw z5(d),S}):(pC(d,a),mC(u,d))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===HW&&(u=void 0),r.F&&iP(u,!0),a){var v=[],b=[];tu("Patches").M(i,u,v,b),a(v,b)}return u}zs(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var d=arguments.length,h=Array(d>1?d-1:0),g=1;g<d;g++)h[g-1]=arguments[g];return r.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(h))})};var a,s,l=r.produce(i,o,function(u,d){a=u,s=d});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,a,s]}):[l,a,s]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){ac(n)||zs(8),Zd(n)&&(n=RSe(n));var r=LI(this),i=d_(this,n,void 0);return i[vr].C=!0,c_(r),i},t.finishDraft=function(n,r){var i=n&&n[vr],o=i.A;return pC(o,r),mC(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!RI&&zs(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=tu("Patches").$;return Zd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Ia=new $Se,WW=Ia.produce;Ia.produceWithPatches.bind(Ia);Ia.setAutoFreeze.bind(Ia);Ia.setUseProxies.bind(Ia);Ia.applyPatches.bind(Ia);Ia.createDraft.bind(Ia);Ia.finishDraft.bind(Ia);function NI(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 jI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NI(Object(n),!0).forEach(function(r){wV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function io(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var BI=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),yC=function(){return Math.random().toString(36).substring(7).split("").join(".")},W5={INIT:"@@redux/INIT"+yC(),REPLACE:"@@redux/REPLACE"+yC(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+yC()}};function FSe(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function sP(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(io(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(io(1));return n(sP)(e,t)}if(typeof e!="function")throw new Error(io(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(io(3));return o}function h(S){if(typeof S!="function")throw new Error(io(4));if(l)throw new Error(io(5));var E=!0;return u(),s.push(S),function(){if(E){if(l)throw new Error(io(6));E=!1,u();var k=s.indexOf(S);s.splice(k,1),a=null}}}function g(S){if(!FSe(S))throw new Error(io(7));if(typeof S.type>"u")throw new Error(io(8));if(l)throw new Error(io(9));try{l=!0,o=i(o,S)}finally{l=!1}for(var E=a=s,_=0;_<E.length;_++){var k=E[_];k()}return S}function v(S){if(typeof S!="function")throw new Error(io(10));i=S,g({type:W5.REPLACE})}function b(){var S,E=h;return S={subscribe:function(k){if(typeof k!="object"||k===null)throw new Error(io(11));function T(){k.next&&k.next(d())}T();var A=E(T);return{unsubscribe:A}}},S[BI]=function(){return this},S}return g({type:W5.INIT}),r={dispatch:g,subscribe:h,getState:d,replaceReducer:v},r[BI]=b,r}function zSe(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:W5.INIT});if(typeof r>"u")throw new Error(io(12));if(typeof n(void 0,{type:W5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(io(13))})}function UW(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var o=Object.keys(n),a;try{zSe(n)}catch(s){a=s}return function(l,u){if(l===void 0&&(l={}),a)throw a;for(var d=!1,h={},g=0;g<o.length;g++){var v=o[g],b=n[v],S=l[v],E=b(S,u);if(typeof E>"u")throw u&&u.type,new Error(io(14));h[v]=E,d=d||E!==S}return d=d||o.length!==Object.keys(l).length,d?h:l}}function U5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function HSe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(io(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(l){return l(a)});return o=U5.apply(void 0,s)(i.dispatch),jI(jI({},i),{},{dispatch:o})}}}var G5="NOT_FOUND";function VSe(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:G5},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function WSe(e,t){var n=[];function r(s){var l=n.findIndex(function(d){return t(s,d.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G5}function i(s,l){r(s)===G5&&(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 USe=function(t,n){return t===n};function GSe(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function qSe(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?USe:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=GSe(i),u=a===1?VSe(l):WSe(a,l);function d(){var h=u.get(arguments);if(h===G5){if(h=e.apply(null,arguments),s){var g=u.getEntries(),v=g.find(function(b){return s(b.value,h)});v&&(h=v.value)}u.put(arguments,h)}return h}return d.clearCache=function(){return u.clear()},d}function YSe(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function KSe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=0,d,h={memoizeOptions:void 0},g=s.pop();if(typeof g=="object"&&(h=g,g=s.pop()),typeof g!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof g+"]");var v=h,b=v.memoizeOptions,S=b===void 0?n:b,E=Array.isArray(S)?S:[S],_=YSe(s),k=e.apply(void 0,[function(){return u++,g.apply(null,arguments)}].concat(E)),T=e(function(){for(var M=[],R=_.length,D=0;D<R;D++)M.push(_[D].apply(null,arguments));return d=k.apply(null,M),d});return Object.assign(T,{resultFunc:g,memoizedResultFunc:k,dependencies:_,lastResult:function(){return d},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),T};return i}var at=KSe(qSe);function GW(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(a){return function(s){return typeof s=="function"?s(i,o,e):a(s)}}};return t}var qW=GW();qW.withExtraArgument=GW;const $I=qW;var XSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ZSe=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},q5=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},QSe=Object.defineProperty,JSe=Object.defineProperties,exe=Object.getOwnPropertyDescriptors,FI=Object.getOwnPropertySymbols,txe=Object.prototype.hasOwnProperty,nxe=Object.prototype.propertyIsEnumerable,zI=function(e,t,n){return t in e?QSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Bd=function(e,t){for(var n in t||(t={}))txe.call(t,n)&&zI(e,n,t[n]);if(FI)for(var r=0,i=FI(t);r<i.length;r++){var n=i[r];nxe.call(t,n)&&zI(e,n,t[n])}return e},bC=function(e,t){return JSe(e,exe(t))},rxe=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{s(n.next(l))}catch(u){i(u)}},a=function(l){try{s(n.throw(l))}catch(u){i(u)}},s=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,a)};s((n=n.apply(e,t)).next())})},ixe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?U5:U5.apply(null,arguments)};function oxe(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var axe=function(e){XSe(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,q5([void 0],n[0].concat(this)))):new(t.bind.apply(t,q5([void 0],n.concat(this))))},t}(Array);function h_(e){return ac(e)?WW(e,function(){}):e}function sxe(e){return typeof e=="boolean"}function lxe(){return function(t){return uxe(t)}}function uxe(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new axe;return n&&(sxe(n)?r.push($I):r.push($I.withExtraArgument(n.extraArgument))),r}var cxe=!0;function dxe(e){var t=lxe(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,a=o===void 0?t():o,s=n.devTools,l=s===void 0?!0:s,u=n.preloadedState,d=u===void 0?void 0:u,h=n.enhancers,g=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(oxe(i))v=UW(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=a;typeof b=="function"&&(b=b(t));var S=HSe.apply(void 0,b),E=U5;l&&(E=ixe(Bd({trace:!cxe},typeof l=="object"&&l)));var _=[S];Array.isArray(g)?_=q5([S],g):typeof g=="function"&&(_=g(_));var k=E.apply(void 0,_);return sP(v,d,k)}function zr(e,t){function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return Bd(Bd({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function YW(e){var t={},n=[],r,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=a,i},addMatcher:function(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function fxe(e){return typeof e=="function"}function hxe(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?YW(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(fxe(e))l=function(){return h_(e())};else{var u=h_(e);l=function(){return u}}function d(h,g){h===void 0&&(h=l());var v=q5([o[g.type]],a.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[s]),v.reduce(function(b,S){if(S)if(Zd(b)){var E=b,_=S(E,g);return _===void 0?b:_}else{if(ac(b))return WW(b,function(k){return S(k,g)});var _=S(b,g);if(_===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return b},h)}return d.getInitialState=l,d}function pxe(e,t){return e+"/"+t}function fp(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:h_(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(d){var h=r[d],g=pxe(t,d),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,o[d]=v,a[g]=v,s[d]=b?zr(g,b):zr(g)});function l(){var d=typeof e.extraReducers=="function"?YW(e.extraReducers):[e.extraReducers],h=d[0],g=h===void 0?{}:h,v=d[1],b=v===void 0?[]:v,S=d[2],E=S===void 0?void 0:S,_=Bd(Bd({},g),a);return hxe(n,function(k){for(var T in _)k.addCase(T,_[T]);for(var A=0,M=b;A<M.length;A++){var R=M[A];k.addMatcher(R.matcher,R.reducer)}E&&k.addDefaultCase(E)})}var u;return{name:t,reducer:function(d,h){return u||(u=l()),u(d,h)},actions:s,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var mxe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gxe=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=mxe[Math.random()*64|0];return t},vxe=["name","message","stack","code"],SC=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),HI=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),yxe=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=vxe;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}};(function(){function e(t,n,r){var i=zr(t+"/fulfilled",function(u,d,h,g){return{payload:u,meta:bC(Bd({},g||{}),{arg:h,requestId:d,requestStatus:"fulfilled"})}}),o=zr(t+"/pending",function(u,d,h){return{payload:void 0,meta:bC(Bd({},h||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),a=zr(t+"/rejected",function(u,d,h,g,v){return{payload:g,error:(r&&r.serializeError||yxe)(u||"Rejected"),meta:bC(Bd({},v||{}),{arg:h,requestId:d,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"})}}),s=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function l(u){return function(d,h,g){var v=r!=null&&r.idGenerator?r.idGenerator(u):gxe(),b=new s,S,E=new Promise(function(A,M){return b.signal.addEventListener("abort",function(){return M({name:"AbortError",message:S||"Aborted"})})}),_=!1;function k(A){_&&(S=A,b.abort())}var T=function(){return rxe(this,null,function(){var A,M,R,D,j,F;return ZSe(this,function(H){switch(H.label){case 0:return H.trys.push([0,4,,5]),D=(A=r==null?void 0:r.condition)==null?void 0:A.call(r,u,{getState:h,extra:g}),Sxe(D)?[4,D]:[3,2];case 1:D=H.sent(),H.label=2;case 2:if(D===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,d(o(v,u,(M=r==null?void 0:r.getPendingMeta)==null?void 0:M.call(r,{requestId:v,arg:u},{getState:h,extra:g}))),[4,Promise.race([E,Promise.resolve(n(u,{dispatch:d,getState:h,extra:g,requestId:v,signal:b.signal,abort:k,rejectWithValue:function(K,te){return new SC(K,te)},fulfillWithValue:function(K,te){return new HI(K,te)}})).then(function(K){if(K instanceof SC)throw K;return K instanceof HI?i(K.payload,v,u,K.meta):i(K,v,u)})])];case 3:return R=H.sent(),[3,5];case 4:return j=H.sent(),R=j instanceof SC?a(null,v,u,j.payload,j.meta):a(j,v,u),[3,5];case 5:return F=r&&!r.dispatchConditionRejection&&a.match(R)&&R.meta.condition,F||d(R),[2,R]}})})}();return Object.assign(T,{abort:k,requestId:v,arg:u,unwrap:function(){return T.then(bxe)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=e,e})();function bxe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Sxe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var lP="listenerMiddleware";zr(lP+"/add");zr(lP+"/removeAll");zr(lP+"/remove");var VI;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:global);DSe();var uP="persist:",KW="persist/FLUSH",cP="persist/REHYDRATE",XW="persist/PAUSE",ZW="persist/PERSIST",QW="persist/PURGE",JW="persist/REGISTER",xxe=-1;function R4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R4=function(n){return typeof n}:R4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},R4(e)}function WI(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 wxe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WI(n,!0).forEach(function(r){Cxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WI(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cxe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _xe(e,t,n,r){r.debug;var i=wxe({},n);return e&&R4(e)==="object"&&Object.keys(e).forEach(function(o){o!=="_persist"&&t[o]===n[o]&&(i[o]=e[o])}),i}function kxe(e){var t=e.blacklist||null,n=e.whitelist||null,r=e.transforms||[],i=e.throttle||0,o=e.debounce||0,a="".concat(e.keyPrefix!==void 0?e.keyPrefix:uP).concat(e.key),s=e.storage,l;e.serialize===!1?l=function(D){return D}:typeof e.serialize=="function"?l=e.serialize:l=Exe;var u=e.writeFailHandler||null,d={},h={},g=[],v=null,b=null;let S=0;function E(R){clearTimeout(S),S=setTimeout(()=>{Object.keys(R).forEach(function(D){T(D)&&d[D]!==R[D]&&g.indexOf(D)===-1&&g.push(D)}),Object.keys(d).forEach(function(D){R[D]===void 0&&T(D)&&g.indexOf(D)===-1&&d[D]!==void 0&&g.push(D)}),v===null&&(v=setInterval(_,i)),d=R},o)}function _(){if(g.length===0){v&&clearInterval(v),v=null;return}var R=g.shift(),D=r.reduce(function(j,F){return F.in(j,R,d)},d[R]);if(D!==void 0)try{h[R]=l(D)}catch(j){console.error("redux-persist/createPersistoid: error serializing state",j)}else delete h[R];g.length===0&&k()}function k(){Object.keys(h).forEach(function(R){d[R]===void 0&&delete h[R]}),b=s.setItem(a,l(h)).catch(A)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function A(R){u&&u(R)}var M=function(){for(;g.length!==0;)_();return b||Promise.resolve()};return{update:E,flush:M}}function Exe(e){return JSON.stringify(e)}function Pxe(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:uP).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=Txe,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,d){return d.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function Txe(e){return JSON.parse(e)}function Lxe(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:uP).concat(e.key);return t.removeItem(n,Axe)}function Axe(e){}function UI(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 Fu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UI(n,!0).forEach(function(r){Oxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UI(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oxe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mxe(e,t){if(e==null)return{};var n=Ixe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ixe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Rxe=5e3;function Dxe(e,t){var n=e.version!==void 0?e.version:xxe;e.debug;var r=e.stateReconciler===void 0?_xe:e.stateReconciler,i=e.getStoredState||Pxe,o=e.timeout!==void 0?e.timeout:Rxe,a=null,s=!1,l=!0,u=function(h){return h._persist.rehydrated&&a&&!l&&a.update(h),h};return function(d,h){var g=d||{},v=g._persist,b=Mxe(g,["_persist"]),S=b;if(h.type===ZW){var E=!1,_=function(j,F){E||(h.rehydrate(e.key,j,F),E=!0)};if(o&&setTimeout(function(){!E&&_(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=kxe(e)),v)return Fu({},t(S,h),{_persist:v});if(typeof h.rehydrate!="function"||typeof h.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 h.register(e.key),i(e).then(function(D){var j=e.migrate||function(F,H){return Promise.resolve(F)};j(D,n).then(function(F){_(F)},function(F){_(void 0,F)})},function(D){_(void 0,D)}),Fu({},t(S,h),{_persist:{version:n,rehydrated:!1}})}else{if(h.type===QW)return s=!0,h.result(Lxe(e)),Fu({},t(S,h),{_persist:v});if(h.type===KW)return h.result(a&&a.flush()),Fu({},t(S,h),{_persist:v});if(h.type===XW)l=!0;else if(h.type===cP){if(s)return Fu({},S,{_persist:Fu({},v,{rehydrated:!0})});if(h.key===e.key){var k=t(S,h),T=h.payload,A=r!==!1&&T!==void 0?r(T,d,k,e):k,M=Fu({},A,{_persist:Fu({},v,{rehydrated:!0})});return u(M)}}}if(!v)return t(d,h);var R=t(S,h);return R===S?d:u(Fu({},R,{_persist:v}))}}function GI(e){return Bxe(e)||jxe(e)||Nxe()}function Nxe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function jxe(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function Bxe(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function qI(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 p_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qI(n,!0).forEach(function(r){$xe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qI(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eU={registry:[],bootstrapped:!1},Fxe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eU,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case JW:return p_({},t,{registry:[].concat(GI(t.registry),[n.key])});case cP:var r=t.registry.indexOf(n.key),i=GI(t.registry);return i.splice(r,1),p_({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function zxe(e,t,n){var r=n||!1,i=sP(Fxe,eU,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:JW,key:u})},a=function(u,d,h){var g={type:cP,payload:d,err:h,key:u};e.dispatch(g),i.dispatch(g),r&&s.getState().bootstrapped&&(r(),r=!1)},s=p_({},i,{purge:function(){var u=[];return e.dispatch({type:QW,result:function(h){u.push(h)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:KW,result:function(h){u.push(h)}}),Promise.all(u)},pause:function(){e.dispatch({type:XW})},persist:function(){e.dispatch({type:ZW,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var dP={},fP={};fP.__esModule=!0;fP.default=Wxe;function D4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D4=function(n){return typeof n}:D4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},D4(e)}function xC(){}var Hxe={getItem:xC,setItem:xC,removeItem:xC};function Vxe(e){if((typeof self>"u"?"undefined":D4(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 Wxe(e){var t="".concat(e,"Storage");return Vxe(t)?self[t]:Hxe}dP.__esModule=!0;dP.default=qxe;var Uxe=Gxe(fP);function Gxe(e){return e&&e.__esModule?e:{default:e}}function qxe(e){var t=(0,Uxe.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 tU=void 0,Yxe=Kxe(dP);function Kxe(e){return e&&e.__esModule?e:{default:e}}var Xxe=(0,Yxe.default)("local");tU=Xxe;var nU={},rU={},ep={};Object.defineProperty(ep,"__esModule",{value:!0});ep.PLACEHOLDER_UNDEFINED=ep.PACKAGE_NAME=void 0;ep.PACKAGE_NAME="redux-deep-persist";ep.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var hP={};(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={}))})(hP);(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=ep,n=hP,r=function(G){return typeof G=="object"&&G!==null};e.isObjectLike=r;const i=function(G){return typeof G=="number"&&G>-1&&G%1==0&&G<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(G){return(0,e.isLength)(G&&G.length)&&Object.prototype.toString.call(G)==="[object Array]"};const o=function(G){return!!G&&typeof G=="object"&&!(0,e.isArray)(G)};e.isPlainObject=o;const a=function(G){return String(~~G)===G&&Number(G)>=0};e.isIntegerString=a;const s=function(G){return Object.prototype.toString.call(G)==="[object String]"};e.isString=s;const l=function(G){return Object.prototype.toString.call(G)==="[object Date]"};e.isDate=l;const u=function(G){return Object.keys(G).length===0};e.isEmpty=u;const d=Object.prototype.hasOwnProperty,h=function(G,$,U){U||(U=new Set([G])),$||($="");for(const X in G){const Z=$?`${$}.${X}`:X,W=G[X];if((0,e.isObjectLike)(W))return U.has(W)?`${$}.${X}:<Circular>`:(U.add(W),(0,e.getCircularPath)(W,Z,U))}return null};e.getCircularPath=h;const g=function(G){if(!(0,e.isObjectLike)(G))return G;if((0,e.isDate)(G))return new Date(+G);const $=(0,e.isArray)(G)?[]:{};for(const U in G){const X=G[U];$[U]=(0,e._cloneDeep)(X)}return $};e._cloneDeep=g;const v=function(G){const $=(0,e.getCircularPath)(G);if($)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${$}' of object you're trying to persist: ${G}`);return(0,e._cloneDeep)(G)};e.cloneDeep=v;const b=function(G,$){if(G===$)return{};if(!(0,e.isObjectLike)(G)||!(0,e.isObjectLike)($))return $;const U=(0,e.cloneDeep)(G),X=(0,e.cloneDeep)($),Z=Object.keys(U).reduce((Q,re)=>(d.call(X,re)||(Q[re]=void 0),Q),{});if((0,e.isDate)(U)||(0,e.isDate)(X))return U.valueOf()===X.valueOf()?{}:X;const W=Object.keys(X).reduce((Q,re)=>{if(!d.call(U,re))return Q[re]=X[re],Q;const de=(0,e.difference)(U[re],X[re]);return(0,e.isObjectLike)(de)&&(0,e.isEmpty)(de)&&!(0,e.isDate)(de)?(0,e.isArray)(U)&&!(0,e.isArray)(X)||!(0,e.isArray)(U)&&(0,e.isArray)(X)?X:Q:(Q[re]=de,Q)},Z);return delete W._persist,W};e.difference=b;const S=function(G,$){return $.reduce((U,X)=>{if(U){const Z=parseInt(X,10),W=(0,e.isIntegerString)(X)&&Z<0?U.length+Z:X;return(0,e.isString)(U)?U.charAt(W):U[W]}},G)};e.path=S;const E=function(G,$){return[...G].reverse().reduce((Z,W,Q)=>{const re=(0,e.isIntegerString)(W)?[]:{};return re[W]=Q===0?$:Z,re},{})};e.assocPath=E;const _=function(G,$){const U=(0,e.cloneDeep)(G);return $.reduce((X,Z,W)=>(W===$.length-1&&X&&(0,e.isObjectLike)(X)&&delete X[Z],X&&X[Z]),U),U};e.dissocPath=_;const k=function(G,$,...U){if(!U||!U.length)return $;const X=U.shift(),{preservePlaceholder:Z,preserveUndefined:W}=G;if((0,e.isObjectLike)($)&&(0,e.isObjectLike)(X))for(const Q in X)if((0,e.isObjectLike)(X[Q])&&(0,e.isObjectLike)($[Q]))$[Q]||($[Q]={}),k(G,$[Q],X[Q]);else if((0,e.isArray)($)){let re=X[Q];const de=Z?t.PLACEHOLDER_UNDEFINED:void 0;W||(re=typeof re<"u"?re:$[parseInt(Q,10)]),re=re!==t.PLACEHOLDER_UNDEFINED?re:de,$[parseInt(Q,10)]=re}else{const re=X[Q]!==t.PLACEHOLDER_UNDEFINED?X[Q]:void 0;$[Q]=re}return k(G,$,...U)},T=function(G,$,U){return k({preservePlaceholder:U==null?void 0:U.preservePlaceholder,preserveUndefined:U==null?void 0:U.preserveUndefined},(0,e.cloneDeep)(G),(0,e.cloneDeep)($))};e.mergeDeep=T;const A=function(G,$=[],U,X,Z){if(!(0,e.isObjectLike)(G))return G;for(const W in G){const Q=G[W],re=(0,e.isArray)(G),de=X?X+"."+W:W;Q===null&&(U===n.ConfigType.WHITELIST&&$.indexOf(de)===-1||U===n.ConfigType.BLACKLIST&&$.indexOf(de)!==-1)&&re&&(G[parseInt(W,10)]=void 0),Q===void 0&&Z&&U===n.ConfigType.BLACKLIST&&$.indexOf(de)===-1&&re&&(G[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),A(Q,$,U,de,Z)}},M=function(G,$,U,X){const Z=(0,e.cloneDeep)(G);return A(Z,$,U,"",X),Z};e.preserveUndefined=M;const R=function(G,$,U){return U.indexOf(G)===$};e.unique=R;const D=function(G){return G.reduce(($,U)=>{const X=G.filter(ve=>ve===U),Z=G.filter(ve=>(U+".").indexOf(ve+".")===0),{duplicates:W,subsets:Q}=$,re=X.length>1&&W.indexOf(U)===-1,de=Z.length>1;return{duplicates:[...W,...re?X:[]],subsets:[...Q,...de?Z:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const j=function(G,$,U){const X=U===n.ConfigType.WHITELIST?"whitelist":"blacklist",Z=`${t.PACKAGE_NAME}: incorrect ${X} configuration.`,W=`Check your create${U===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
|
||
|
||
`;if(!(0,e.isString)($)||$.length<1)throw new Error(`${Z} Name (key) of reducer is required. ${W}`);if(!G||!G.length)return;const{duplicates:Q,subsets:re}=(0,e.findDuplicatesAndSubsets)(G);if(Q.length>1)throw new Error(`${Z} Duplicated paths.
|
||
|
||
${JSON.stringify(Q)}
|
||
|
||
${W}`);if(re.length>1)throw new Error(`${Z} You are trying to persist an entire property and also some of its subset.
|
||
|
||
${JSON.stringify(re)}
|
||
|
||
${W}`)};e.singleTransformValidator=j;const F=function(G){if(!(0,e.isArray)(G))return;const $=(G==null?void 0:G.map(U=>U.deepPersistKey).filter(U=>U))||[];if($.length){const U=$.filter((X,Z)=>$.indexOf(X)!==Z);if(U.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed.
|
||
|
||
Duplicates: ${JSON.stringify(U)}`)}};e.transformsValidator=F;const H=function({whitelist:G,blacklist:$}){if(G&&G.length&&$&&$.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(G){const{duplicates:U,subsets:X}=(0,e.findDuplicatesAndSubsets)(G);(0,e.throwError)({duplicates:U,subsets:X},"whitelist")}if($){const{duplicates:U,subsets:X}=(0,e.findDuplicatesAndSubsets)($);(0,e.throwError)({duplicates:U,subsets:X},"blacklist")}};e.configValidator=H;const K=function({duplicates:G,subsets:$},U){if(G.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${U}.
|
||
|
||
${JSON.stringify(G)}`);if($.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${U}. You must decide if you want to persist an entire path or its specific subset.
|
||
|
||
${JSON.stringify($)}`)};e.throwError=K;const te=function(G){return(0,e.isArray)(G)?G.filter(e.unique).reduce(($,U)=>{const X=U.split("."),Z=X[0],W=X.slice(1).join(".")||void 0,Q=$.filter(de=>Object.keys(de)[0]===Z)[0],re=Q?Object.values(Q)[0]:void 0;return Q||$.push({[Z]:W?[W]:void 0}),Q&&!re&&W&&(Q[Z]=[W]),Q&&re&&W&&re.push(W),$},[]):[]};e.getRootKeysGroup=te})(rU);(function(e){var t=Co&&Co.__rest||function(h,g){var v={};for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&g.indexOf(b)<0&&(v[b]=h[b]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,b=Object.getOwnPropertySymbols(h);S<b.length;S++)g.indexOf(b[S])<0&&Object.prototype.propertyIsEnumerable.call(h,b[S])&&(v[b[S]]=h[b[S]]);return v};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;const n=rU,r=ep,i=hP,o=function(h,g,v={}){const b=v.whitelist||null,S=v.blacklist||null;function E(_){return!!(b&&b.indexOf(_)===-1||S&&S.indexOf(_)!==-1)}return{in:(_,k,T)=>!E(k)&&h?h(_,k,T):_,out:(_,k,T)=>!E(k)&&g?g(_,k,T):_,deepPersistKey:b&&b[0]}},a=(h,g,v,{debug:b,whitelist:S,blacklist:E,transforms:_})=>{if(S||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)(_);const k=(0,n.cloneDeep)(v);let T=h;if(T&&(0,n.isObjectLike)(T)){const A=(0,n.difference)(g,v);(0,n.isEmpty)(A)||(T=(0,n.mergeDeep)(h,A,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(A)}`)),Object.keys(T).forEach(M=>{if(M!=="_persist"){if((0,n.isObjectLike)(k[M])){k[M]=(0,n.mergeDeep)(k[M],T[M]);return}k[M]=T[M]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(h,g)=>((0,n.singleTransformValidator)(g,h,i.ConfigType.WHITELIST),o(v=>{if(!g||!g.length)return v;let b=null,S;return g.forEach(E=>{const _=E.split(".");S=(0,n.path)(v,_),typeof S>"u"&&(0,n.isIntegerString)(_[_.length-1])&&(S=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(_,S),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,g,i.ConfigType.WHITELIST),{whitelist:[h]}));e.createWhitelist=s;const l=(h,g)=>((0,n.singleTransformValidator)(g,h,i.ConfigType.BLACKLIST),o(v=>{if(!g||!g.length)return;const b=(0,n.preserveUndefined)(v,g,i.ConfigType.BLACKLIST,!0);return g.map(E=>E.split(".")).reduce((E,_)=>(0,n.dissocPath)(E,_),b)},v=>(0,n.preserveUndefined)(v,g,i.ConfigType.BLACKLIST),{whitelist:[h]}));e.createBlacklist=l;const u=function(h,g){return g.map(v=>{const b=Object.keys(v)[0],S=v[b];return h===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,S):(0,e.createBlacklist)(b,S)})};e.getTransforms=u;const d=h=>{var{key:g,whitelist:v,blacklist:b,storage:S,transforms:E,rootReducer:_}=h,k=t(h,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),A=(0,n.getRootKeysGroup)(b),M=Object.keys(_(void 0,{type:""})),R=T.map(te=>Object.keys(te)[0]),D=A.map(te=>Object.keys(te)[0]),j=M.filter(te=>R.indexOf(te)===-1&&D.indexOf(te)===-1),F=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),H=(0,e.getTransforms)(i.ConfigType.BLACKLIST,A),K=(0,n.isArray)(v)?j.map(te=>(0,e.createBlacklist)(te)):[];return Object.assign(Object.assign({},k),{key:g,storage:S,transforms:[...F,...H,...K,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=d})(nU);const Pd=(e,t)=>Math.floor(e/t)*t,ql=(e,t)=>Math.round(e/t)*t;var ke={},Zxe={get exports(){return ke},set exports(e){ke=e}};/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",h=1,g=2,v=4,b=1,S=2,E=1,_=2,k=4,T=8,A=16,M=32,R=64,D=128,j=256,F=512,H=30,K="...",te=800,G=16,$=1,U=2,X=3,Z=1/0,W=9007199254740991,Q=17976931348623157e292,re=0/0,de=4294967295,ve=de-1,Pe=de>>>1,be=[["ary",D],["bind",E],["bindKey",_],["curry",T],["curryRight",A],["flip",F],["partial",M],["partialRight",R],["rearg",j]],He="[object Arguments]",Oe="[object Array]",ot="[object AsyncFunction]",Ve="[object Boolean]",Be="[object Date]",wt="[object DOMException]",st="[object Error]",gt="[object Function]",St="[object GeneratorFunction]",Ae="[object Map]",lt="[object Number]",Mt="[object Null]",ut="[object Object]",_t="[object Promise]",ln="[object Proxy]",ae="[object RegExp]",De="[object Set]",Ye="[object String]",Ke="[object Symbol]",xe="[object Undefined]",Ne="[object WeakMap]",Ct="[object WeakSet]",Dt="[object ArrayBuffer]",Le="[object DataView]",At="[object Float32Array]",$e="[object Float64Array]",vt="[object Int8Array]",tn="[object Int16Array]",Dn="[object Int32Array]",Xe="[object Uint8Array]",xt="[object Uint8ClampedArray]",ht="[object Uint16Array]",Ht="[object Uint32Array]",nn=/\b__p \+= '';/g,pr=/\b(__p \+=) '' \+/g,Mo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mi=/&(?:amp|lt|gt|quot|#39);/g,il=/[&<>"']/g,R0=RegExp(Mi.source),Ba=RegExp(il.source),Pp=/<%-([\s\S]+?)%>/g,D0=/<%([\s\S]+?)%>/g,bc=/<%=([\s\S]+?)%>/g,Tp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lp=/^\w*$/,ia=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vf=/[\\^$.*+?()[\]{}|]/g,N0=RegExp(vf.source),Sc=/^\s+/,yf=/\s/,j0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ol=/\{\n\/\* \[wrapped with (.+)\] \*/,xc=/,? & /,B0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$0=/[()=,{}\[\]\/\s]/,F0=/\\(\\)?/g,z0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ms=/\w*$/,H0=/^[-+]0x[0-9a-f]+$/i,V0=/^0b[01]+$/i,W0=/^\[object .+?Constructor\]$/,U0=/^0o[0-7]+$/i,G0=/^(?:0|[1-9]\d*)$/,q0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,al=/($^)/,Y0=/['\n\r\u2028\u2029\\]/g,gs="\\ud800-\\udfff",yu="\\u0300-\\u036f",bu="\\ufe20-\\ufe2f",sl="\\u20d0-\\u20ff",Su=yu+bu+sl,Ap="\\u2700-\\u27bf",wc="a-z\\xdf-\\xf6\\xf8-\\xff",ll="\\xac\\xb1\\xd7\\xf7",oa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Nn="\\u2000-\\u206f",Tn=" \\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",aa="A-Z\\xc0-\\xd6\\xd8-\\xde",Hr="\\ufe0e\\ufe0f",li=ll+oa+Nn+Tn,sa="['’]",ul="["+gs+"]",ui="["+li+"]",vs="["+Su+"]",bf="\\d+",xu="["+Ap+"]",ys="["+wc+"]",Sf="[^"+gs+li+bf+Ap+wc+aa+"]",Ii="\\ud83c[\\udffb-\\udfff]",Op="(?:"+vs+"|"+Ii+")",Mp="[^"+gs+"]",xf="(?:\\ud83c[\\udde6-\\uddff]){2}",cl="[\\ud800-\\udbff][\\udc00-\\udfff]",Io="["+aa+"]",dl="\\u200d",wu="(?:"+ys+"|"+Sf+")",K0="(?:"+Io+"|"+Sf+")",Cc="(?:"+sa+"(?:d|ll|m|re|s|t|ve))?",_c="(?:"+sa+"(?:D|LL|M|RE|S|T|VE))?",wf=Op+"?",kc="["+Hr+"]?",$a="(?:"+dl+"(?:"+[Mp,xf,cl].join("|")+")"+kc+wf+")*",Cf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Yt=kc+wf+$a,Ip="(?:"+[xu,xf,cl].join("|")+")"+Yt,Ec="(?:"+[Mp+vs+"?",vs,xf,cl,ul].join("|")+")",Pc=RegExp(sa,"g"),Rp=RegExp(vs,"g"),la=RegExp(Ii+"(?="+Ii+")|"+Ec+Yt,"g"),Kn=RegExp([Io+"?"+ys+"+"+Cc+"(?="+[ui,Io,"$"].join("|")+")",K0+"+"+_c+"(?="+[ui,Io+wu,"$"].join("|")+")",Io+"?"+wu+"+"+Cc,Io+"+"+_c,Cu,Cf,bf,Ip].join("|"),"g"),_f=RegExp("["+dl+gs+Su+Hr+"]"),Dp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kf=["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"],Np=-1,mn={};mn[At]=mn[$e]=mn[vt]=mn[tn]=mn[Dn]=mn[Xe]=mn[xt]=mn[ht]=mn[Ht]=!0,mn[He]=mn[Oe]=mn[Dt]=mn[Ve]=mn[Le]=mn[Be]=mn[st]=mn[gt]=mn[Ae]=mn[lt]=mn[ut]=mn[ae]=mn[De]=mn[Ye]=mn[Ne]=!1;var Kt={};Kt[He]=Kt[Oe]=Kt[Dt]=Kt[Le]=Kt[Ve]=Kt[Be]=Kt[At]=Kt[$e]=Kt[vt]=Kt[tn]=Kt[Dn]=Kt[Ae]=Kt[lt]=Kt[ut]=Kt[ae]=Kt[De]=Kt[Ye]=Kt[Ke]=Kt[Xe]=Kt[xt]=Kt[ht]=Kt[Ht]=!0,Kt[st]=Kt[gt]=Kt[Ne]=!1;var jp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},X0={"&":"&","<":"<",">":">",'"':""","'":"'"},Y={"&":"&","<":"<",">":">",""":'"',"'":"'"},ie={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},me=parseFloat,it=parseInt,Wt=typeof Co=="object"&&Co&&Co.Object===Object&&Co,wn=typeof self=="object"&&self&&self.Object===Object&&self,kt=Wt||wn||Function("return this")(),Nt=t&&!t.nodeType&&t,Xt=Nt&&!0&&e&&!e.nodeType&&e,Jr=Xt&&Xt.exports===Nt,Ir=Jr&&Wt.process,Cn=function(){try{var oe=Xt&&Xt.require&&Xt.require("util").types;return oe||Ir&&Ir.binding&&Ir.binding("util")}catch{}}(),ci=Cn&&Cn.isArrayBuffer,Ro=Cn&&Cn.isDate,co=Cn&&Cn.isMap,Fa=Cn&&Cn.isRegExp,fl=Cn&&Cn.isSet,Z0=Cn&&Cn.isTypedArray;function Ri(oe,we,ye){switch(ye.length){case 0:return oe.call(we);case 1:return oe.call(we,ye[0]);case 2:return oe.call(we,ye[0],ye[1]);case 3:return oe.call(we,ye[0],ye[1],ye[2])}return oe.apply(we,ye)}function Q0(oe,we,ye,nt){for(var It=-1,rn=oe==null?0:oe.length;++It<rn;){var $t=oe[It];we(nt,$t,ye($t),oe)}return nt}function Xn(oe,we){for(var ye=-1,nt=oe==null?0:oe.length;++ye<nt&&we(oe[ye],ye,oe)!==!1;);return oe}function Do(oe,we){for(var ye=oe==null?0:oe.length;ye--&&we(oe[ye],ye,oe)!==!1;);return oe}function Wn(oe,we){for(var ye=-1,nt=oe==null?0:oe.length;++ye<nt;)if(!we(oe[ye],ye,oe))return!1;return!0}function No(oe,we){for(var ye=-1,nt=oe==null?0:oe.length,It=0,rn=[];++ye<nt;){var $t=oe[ye];we($t,ye,oe)&&(rn[It++]=$t)}return rn}function Xi(oe,we){var ye=oe==null?0:oe.length;return!!ye&&Ac(oe,we,0)>-1}function Bp(oe,we,ye){for(var nt=-1,It=oe==null?0:oe.length;++nt<It;)if(ye(we,oe[nt]))return!0;return!1}function Un(oe,we){for(var ye=-1,nt=oe==null?0:oe.length,It=Array(nt);++ye<nt;)It[ye]=we(oe[ye],ye,oe);return It}function za(oe,we){for(var ye=-1,nt=we.length,It=oe.length;++ye<nt;)oe[It+ye]=we[ye];return oe}function Ef(oe,we,ye,nt){var It=-1,rn=oe==null?0:oe.length;for(nt&&rn&&(ye=oe[++It]);++It<rn;)ye=we(ye,oe[It],It,oe);return ye}function Qy(oe,we,ye,nt){var It=oe==null?0:oe.length;for(nt&&It&&(ye=oe[--It]);It--;)ye=we(ye,oe[It],It,oe);return ye}function Tc(oe,we){for(var ye=-1,nt=oe==null?0:oe.length;++ye<nt;)if(we(oe[ye],ye,oe))return!0;return!1}var Jy=hl("length");function Lc(oe){return oe.split("")}function J0(oe){return oe.match(B0)||[]}function e3(oe,we,ye){var nt;return ye(oe,function(It,rn,$t){if(we(It,rn,$t))return nt=rn,!1}),nt}function _u(oe,we,ye,nt){for(var It=oe.length,rn=ye+(nt?1:-1);nt?rn--:++rn<It;)if(we(oe[rn],rn,oe))return rn;return-1}function Ac(oe,we,ye){return we===we?o3(oe,we,ye):_u(oe,Pf,ye)}function ua(oe,we,ye,nt){for(var It=ye-1,rn=oe.length;++It<rn;)if(nt(oe[It],we))return It;return-1}function Pf(oe){return oe!==oe}function Tf(oe,we){var ye=oe==null?0:oe.length;return ye?Af(oe,we)/ye:re}function hl(oe){return function(we){return we==null?n:we[oe]}}function Lf(oe){return function(we){return oe==null?n:oe[we]}}function $p(oe,we,ye,nt,It){return It(oe,function(rn,$t,gn){ye=nt?(nt=!1,rn):we(ye,rn,$t,gn)}),ye}function t3(oe,we){var ye=oe.length;for(oe.sort(we);ye--;)oe[ye]=oe[ye].value;return oe}function Af(oe,we){for(var ye,nt=-1,It=oe.length;++nt<It;){var rn=we(oe[nt]);rn!==n&&(ye=ye===n?rn:ye+rn)}return ye}function Of(oe,we){for(var ye=-1,nt=Array(oe);++ye<oe;)nt[ye]=we(ye);return nt}function Oc(oe,we){return Un(we,function(ye){return[ye,oe[ye]]})}function fo(oe){return oe&&oe.slice(0,n1(oe)+1).replace(Sc,"")}function Vr(oe){return function(we){return oe(we)}}function Mf(oe,we){return Un(we,function(ye){return oe[ye]})}function Mc(oe,we){return oe.has(we)}function ca(oe,we){for(var ye=-1,nt=oe.length;++ye<nt&&Ac(we,oe[ye],0)>-1;);return ye}function bs(oe,we){for(var ye=oe.length;ye--&&Ac(we,oe[ye],0)>-1;);return ye}function e1(oe,we){for(var ye=oe.length,nt=0;ye--;)oe[ye]===we&&++nt;return nt}var n3=Lf(jp),Ss=Lf(X0);function pl(oe){return"\\"+ie[oe]}function Fp(oe,we){return oe==null?n:oe[we]}function ku(oe){return _f.test(oe)}function zp(oe){return Dp.test(oe)}function r3(oe){for(var we,ye=[];!(we=oe.next()).done;)ye.push(we.value);return ye}function Hp(oe){var we=-1,ye=Array(oe.size);return oe.forEach(function(nt,It){ye[++we]=[It,nt]}),ye}function Vp(oe,we){return function(ye){return oe(we(ye))}}function da(oe,we){for(var ye=-1,nt=oe.length,It=0,rn=[];++ye<nt;){var $t=oe[ye];($t===we||$t===d)&&(oe[ye]=d,rn[It++]=ye)}return rn}function If(oe){var we=-1,ye=Array(oe.size);return oe.forEach(function(nt){ye[++we]=nt}),ye}function i3(oe){var we=-1,ye=Array(oe.size);return oe.forEach(function(nt){ye[++we]=[nt,nt]}),ye}function o3(oe,we,ye){for(var nt=ye-1,It=oe.length;++nt<It;)if(oe[nt]===we)return nt;return-1}function t1(oe,we,ye){for(var nt=ye+1;nt--;)if(oe[nt]===we)return nt;return nt}function Ha(oe){return ku(oe)?Ic(oe):Jy(oe)}function Zi(oe){return ku(oe)?s3(oe):Lc(oe)}function n1(oe){for(var we=oe.length;we--&&yf.test(oe.charAt(we)););return we}var a3=Lf(Y);function Ic(oe){for(var we=la.lastIndex=0;la.test(oe);)++we;return we}function s3(oe){return oe.match(la)||[]}function Rf(oe){return oe.match(Kn)||[]}var jo=function oe(we){we=we==null?kt:Va.defaults(kt.Object(),we,Va.pick(kt,kf));var ye=we.Array,nt=we.Date,It=we.Error,rn=we.Function,$t=we.Math,gn=we.Object,Df=we.RegExp,r1=we.String,Di=we.TypeError,Rc=ye.prototype,Eu=rn.prototype,Ln=gn.prototype,mr=we["__core-js_shared__"],Sr=Eu.toString,un=Ln.hasOwnProperty,Nf=0,Dc=function(){var c=/[^.]+$/.exec(mr&&mr.keys&&mr.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),Wp=Ln.toString,Si=Sr.call(gn),i1=kt._,o1=Df("^"+Sr.call(un).replace(vf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nc=Jr?we.Buffer:n,di=we.Symbol,Ni=we.Uint8Array,jc=Nc?Nc.allocUnsafe:n,Bc=Vp(gn.getPrototypeOf,gn),Up=gn.create,a1=Ln.propertyIsEnumerable,jf=Rc.splice,s1=di?di.isConcatSpreadable:n,$c=di?di.iterator:n,ml=di?di.toStringTag:n,Bf=function(){try{var c=Gt(gn,"defineProperty");return c({},"",{}),c}catch{}}(),l3=we.clearTimeout!==kt.clearTimeout&&we.clearTimeout,u3=nt&&nt.now!==kt.Date.now&&nt.now,$f=we.setTimeout!==kt.setTimeout&&we.setTimeout,Ff=$t.ceil,Pu=$t.floor,Fc=gn.getOwnPropertySymbols,c3=Nc?Nc.isBuffer:n,Gp=we.isFinite,d3=Rc.join,f3=Vp(gn.keys,gn),Rr=$t.max,fi=$t.min,l1=nt.now,h3=we.parseInt,u1=$t.random,p3=Rc.reverse,c1=Gt(we,"DataView"),zc=Gt(we,"Map"),d1=Gt(we,"Promise"),Hc=Gt(we,"Set"),Vc=Gt(we,"WeakMap"),Wc=Gt(gn,"create"),zf=Vc&&new Vc,xs={},bw=th(c1),Sw=th(zc),xw=th(d1),Uc=th(Hc),f1=th(Vc),Gc=di?di.prototype:n,Hf=Gc?Gc.valueOf:n,h1=Gc?Gc.toString:n;function z(c){if(Br(c)&&!Ft(c)&&!(c instanceof Zt)){if(c instanceof ho)return c;if(un.call(c,"__wrapped__"))return HT(c)}return new ho(c)}var Tu=function(){function c(){}return function(m){if(!Cr(m))return{};if(Up)return Up(m);c.prototype=m;var C=new c;return c.prototype=n,C}}();function Vf(){}function ho(c,m){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!m,this.__index__=0,this.__values__=n}z.templateSettings={escape:Pp,evaluate:D0,interpolate:bc,variable:"",imports:{_:z}},z.prototype=Vf.prototype,z.prototype.constructor=z,ho.prototype=Tu(Vf.prototype),ho.prototype.constructor=ho;function Zt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=de,this.__views__=[]}function Qi(){var c=new Zt(this.__wrapped__);return c.__actions__=Fi(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Fi(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Fi(this.__views__),c}function ji(){if(this.__filtered__){var c=new Zt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function m3(){var c=this.__wrapped__.value(),m=this.__dir__,C=Ft(c),O=m<0,B=C?c.length:0,V=aX(0,B,this.__views__),J=V.start,ne=V.end,ce=ne-J,_e=O?ne:J-1,Te=this.__iteratees__,Re=Te.length,tt=0,bt=fi(ce,this.__takeCount__);if(!C||!O&&B==ce&&bt==ce)return Cl(c,this.__actions__);var Pt=[];e:for(;ce--&&tt<bt;){_e+=m;for(var qt=-1,Tt=c[_e];++qt<Re;){var Qt=Te[qt],on=Qt.iteratee,Sa=Qt.type,yo=on(Tt);if(Sa==U)Tt=yo;else if(!yo){if(Sa==$)continue e;break e}}Pt[tt++]=Tt}return Pt}Zt.prototype=Tu(Vf.prototype),Zt.prototype.constructor=Zt;function gl(c){var m=-1,C=c==null?0:c.length;for(this.clear();++m<C;){var O=c[m];this.set(O[0],O[1])}}function g3(){this.__data__=Wc?Wc(null):{},this.size=0}function v3(c){var m=this.has(c)&&delete this.__data__[c];return this.size-=m?1:0,m}function y3(c){var m=this.__data__;if(Wc){var C=m[c];return C===l?n:C}return un.call(m,c)?m[c]:n}function p1(c){var m=this.__data__;return Wc?m[c]!==n:un.call(m,c)}function b3(c,m){var C=this.__data__;return this.size+=this.has(c)?0:1,C[c]=Wc&&m===n?l:m,this}gl.prototype.clear=g3,gl.prototype.delete=v3,gl.prototype.get=y3,gl.prototype.has=p1,gl.prototype.set=b3;function fa(c){var m=-1,C=c==null?0:c.length;for(this.clear();++m<C;){var O=c[m];this.set(O[0],O[1])}}function S3(){this.__data__=[],this.size=0}function x3(c){var m=this.__data__,C=Wr(m,c);if(C<0)return!1;var O=m.length-1;return C==O?m.pop():jf.call(m,C,1),--this.size,!0}function m1(c){var m=this.__data__,C=Wr(m,c);return C<0?n:m[C][1]}function g1(c){return Wr(this.__data__,c)>-1}function w3(c,m){var C=this.__data__,O=Wr(C,c);return O<0?(++this.size,C.push([c,m])):C[O][1]=m,this}fa.prototype.clear=S3,fa.prototype.delete=x3,fa.prototype.get=m1,fa.prototype.has=g1,fa.prototype.set=w3;function ha(c){var m=-1,C=c==null?0:c.length;for(this.clear();++m<C;){var O=c[m];this.set(O[0],O[1])}}function qp(){this.size=0,this.__data__={hash:new gl,map:new(zc||fa),string:new gl}}function ww(c){var m=Bt(this,c).delete(c);return this.size-=m?1:0,m}function C3(c){return Bt(this,c).get(c)}function v1(c){return Bt(this,c).has(c)}function _3(c,m){var C=Bt(this,c),O=C.size;return C.set(c,m),this.size+=C.size==O?0:1,this}ha.prototype.clear=qp,ha.prototype.delete=ww,ha.prototype.get=C3,ha.prototype.has=v1,ha.prototype.set=_3;function Wa(c){var m=-1,C=c==null?0:c.length;for(this.__data__=new ha;++m<C;)this.add(c[m])}function ws(c){return this.__data__.set(c,l),this}function Cw(c){return this.__data__.has(c)}Wa.prototype.add=Wa.prototype.push=ws,Wa.prototype.has=Cw;function Dr(c){var m=this.__data__=new fa(c);this.size=m.size}function k3(){this.__data__=new fa,this.size=0}function Wf(c){var m=this.__data__,C=m.delete(c);return this.size=m.size,C}function Uf(c){return this.__data__.get(c)}function Yp(c){return this.__data__.has(c)}function Kp(c,m){var C=this.__data__;if(C instanceof fa){var O=C.__data__;if(!zc||O.length<i-1)return O.push([c,m]),this.size=++C.size,this;C=this.__data__=new ha(O)}return C.set(c,m),this.size=C.size,this}Dr.prototype.clear=k3,Dr.prototype.delete=Wf,Dr.prototype.get=Uf,Dr.prototype.has=Yp,Dr.prototype.set=Kp;function y1(c,m){var C=Ft(c),O=!C&&nh(c),B=!C&&!O&&id(c),V=!C&&!O&&!B&&xm(c),J=C||O||B||V,ne=J?Of(c.length,r1):[],ce=ne.length;for(var _e in c)(m||un.call(c,_e))&&!(J&&(_e=="length"||B&&(_e=="offset"||_e=="parent")||V&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||Iu(_e,ce)))&&ne.push(_e);return ne}function qc(c){var m=c.length;return m?c[qf(0,m-1)]:n}function xi(c,m){return A3(Fi(c),Lu(m,0,c.length))}function _w(c){return A3(Fi(c))}function b1(c,m,C){(C!==n&&!Ts(c[m],C)||C===n&&!(m in c))&&pa(c,m,C)}function vl(c,m,C){var O=c[m];(!(un.call(c,m)&&Ts(O,C))||C===n&&!(m in c))&&pa(c,m,C)}function Wr(c,m){for(var C=c.length;C--;)if(Ts(c[C][0],m))return C;return-1}function kw(c,m,C,O){return Cs(c,function(B,V,J){m(O,B,C(B),J)}),O}function ct(c,m){return c&&Ua(m,Ei(m),c)}function Yc(c,m){return c&&Ua(m,Vo(m),c)}function pa(c,m,C){m=="__proto__"&&Bf?Bf(c,m,{configurable:!0,enumerable:!0,value:C,writable:!0}):c[m]=C}function Xp(c,m){for(var C=-1,O=m.length,B=ye(O),V=c==null;++C<O;)B[C]=V?n:$w(c,m[C]);return B}function Lu(c,m,C){return c===c&&(C!==n&&(c=c<=C?c:C),m!==n&&(c=c>=m?c:m)),c}function wi(c,m,C,O,B,V){var J,ne=m&h,ce=m&g,_e=m&v;if(C&&(J=B?C(c,O,B,V):C(c)),J!==n)return J;if(!Cr(c))return c;var Te=Ft(c);if(Te){if(J=lX(c),!ne)return Fi(c,J)}else{var Re=ki(c),tt=Re==gt||Re==St;if(id(c))return kl(c,ne);if(Re==ut||Re==He||tt&&!B){if(J=ce||tt?{}:IT(c),!ne)return ce?R1(c,Yc(J,c)):zo(c,ct(J,c))}else{if(!Kt[Re])return B?c:{};J=uX(c,Re,ne)}}V||(V=new Dr);var bt=V.get(c);if(bt)return bt;V.set(c,J),lL(c)?c.forEach(function(Tt){J.add(wi(Tt,m,C,Tt,c,V))}):aL(c)&&c.forEach(function(Tt,Qt){J.set(Qt,wi(Tt,m,C,Qt,c,V))});var Pt=_e?ce?ge:ya:ce?Vo:Ei,qt=Te?n:Pt(c);return Xn(qt||c,function(Tt,Qt){qt&&(Qt=Tt,Tt=c[Qt]),vl(J,Qt,wi(Tt,m,C,Qt,c,V))}),J}function Zp(c){var m=Ei(c);return function(C){return Qp(C,c,m)}}function Qp(c,m,C){var O=C.length;if(c==null)return!O;for(c=gn(c);O--;){var B=C[O],V=m[B],J=c[B];if(J===n&&!(B in c)||!V(J))return!1}return!0}function S1(c,m,C){if(typeof c!="function")throw new Di(a);return $1(function(){c.apply(n,C)},m)}function Kc(c,m,C,O){var B=-1,V=Xi,J=!0,ne=c.length,ce=[],_e=m.length;if(!ne)return ce;C&&(m=Un(m,Vr(C))),O?(V=Bp,J=!1):m.length>=i&&(V=Mc,J=!1,m=new Wa(m));e:for(;++B<ne;){var Te=c[B],Re=C==null?Te:C(Te);if(Te=O||Te!==0?Te:0,J&&Re===Re){for(var tt=_e;tt--;)if(m[tt]===Re)continue e;ce.push(Te)}else V(m,Re,O)||ce.push(Te)}return ce}var Cs=Zf(va),Jp=Zf($o,!0);function x1(c,m){var C=!0;return Cs(c,function(O,B,V){return C=!!m(O,B,V),C}),C}function Nr(c,m,C){for(var O=-1,B=c.length;++O<B;){var V=c[O],J=m(V);if(J!=null&&(ne===n?J===J&&!ba(J):C(J,ne)))var ne=J,ce=V}return ce}function ma(c,m,C,O){var B=c.length;for(C=Vt(C),C<0&&(C=-C>B?0:B+C),O=O===n||O>B?B:Vt(O),O<0&&(O+=B),O=C>O?0:cL(O);C<O;)c[C++]=m;return c}function ga(c,m){var C=[];return Cs(c,function(O,B,V){m(O,B,V)&&C.push(O)}),C}function Ur(c,m,C,O,B){var V=-1,J=c.length;for(C||(C=dX),B||(B=[]);++V<J;){var ne=c[V];m>0&&C(ne)?m>1?Ur(ne,m-1,C,O,B):za(B,ne):O||(B[B.length]=ne)}return B}var em=El(),Bo=El(!0);function va(c,m){return c&&em(c,m,Ei)}function $o(c,m){return c&&Bo(c,m,Ei)}function tm(c,m){return No(m,function(C){return Ru(c[C])})}function yl(c,m){m=_l(m,c);for(var C=0,O=m.length;c!=null&&C<O;)c=c[Tl(m[C++])];return C&&C==O?c:n}function w1(c,m,C){var O=m(c);return Ft(c)?O:za(O,C(c))}function Ci(c){return c==null?c===n?xe:Mt:ml&&ml in gn(c)?ti(c):yX(c)}function nm(c,m){return c>m}function rm(c,m){return c!=null&&un.call(c,m)}function im(c,m){return c!=null&&m in gn(c)}function om(c,m,C){return c>=fi(m,C)&&c<Rr(m,C)}function Xc(c,m,C){for(var O=C?Bp:Xi,B=c[0].length,V=c.length,J=V,ne=ye(V),ce=1/0,_e=[];J--;){var Te=c[J];J&&m&&(Te=Un(Te,Vr(m))),ce=fi(Te.length,ce),ne[J]=!C&&(m||B>=120&&Te.length>=120)?new Wa(J&&Te):n}Te=c[0];var Re=-1,tt=ne[0];e:for(;++Re<B&&_e.length<ce;){var bt=Te[Re],Pt=m?m(bt):bt;if(bt=C||bt!==0?bt:0,!(tt?Mc(tt,Pt):O(_e,Pt,C))){for(J=V;--J;){var qt=ne[J];if(!(qt?Mc(qt,Pt):O(c[J],Pt,C)))continue e}tt&&tt.push(Pt),_e.push(bt)}}return _e}function am(c,m,C,O){return va(c,function(B,V,J){m(O,C(B),V,J)}),O}function _s(c,m,C){m=_l(m,c),c=jT(c,m);var O=c==null?c:c[Tl(Ga(m))];return O==null?n:Ri(O,c,C)}function sm(c){return Br(c)&&Ci(c)==He}function C1(c){return Br(c)&&Ci(c)==Dt}function _1(c){return Br(c)&&Ci(c)==Be}function Zc(c,m,C,O,B){return c===m?!0:c==null||m==null||!Br(c)&&!Br(m)?c!==c&&m!==m:k1(c,m,C,O,Zc,B)}function k1(c,m,C,O,B,V){var J=Ft(c),ne=Ft(m),ce=J?Oe:ki(c),_e=ne?Oe:ki(m);ce=ce==He?ut:ce,_e=_e==He?ut:_e;var Te=ce==ut,Re=_e==ut,tt=ce==_e;if(tt&&id(c)){if(!id(m))return!1;J=!0,Te=!1}if(tt&&!Te)return V||(V=new Dr),J||xm(c)?rt(c,m,C,O,B,V):Gn(c,m,ce,C,O,B,V);if(!(C&b)){var bt=Te&&un.call(c,"__wrapped__"),Pt=Re&&un.call(m,"__wrapped__");if(bt||Pt){var qt=bt?c.value():c,Tt=Pt?m.value():m;return V||(V=new Dr),B(qt,Tt,C,O,V)}}return tt?(V||(V=new Dr),jn(c,m,C,O,B,V)):!1}function Ew(c){return Br(c)&&ki(c)==Ae}function Qc(c,m,C,O){var B=C.length,V=B,J=!O;if(c==null)return!V;for(c=gn(c);B--;){var ne=C[B];if(J&&ne[2]?ne[1]!==c[ne[0]]:!(ne[0]in c))return!1}for(;++B<V;){ne=C[B];var ce=ne[0],_e=c[ce],Te=ne[1];if(J&&ne[2]){if(_e===n&&!(ce in c))return!1}else{var Re=new Dr;if(O)var tt=O(_e,Te,ce,c,m,Re);if(!(tt===n?Zc(Te,_e,b|S,O,Re):tt))return!1}}return!0}function lm(c){if(!Cr(c)||hX(c))return!1;var m=Ru(c)?o1:W0;return m.test(th(c))}function xr(c){return Br(c)&&Ci(c)==ae}function Ut(c){return Br(c)&&ki(c)==De}function ei(c){return Br(c)&&N3(c.length)&&!!mn[Ci(c)]}function wr(c){return typeof c=="function"?c:c==null?Wo:typeof c=="object"?Ft(c)?Sl(c[0],c[1]):Jc(c):xL(c)}function Gr(c){if(!B1(c))return f3(c);var m=[];for(var C in gn(c))un.call(c,C)&&C!="constructor"&&m.push(C);return m}function po(c){if(!Cr(c))return vX(c);var m=B1(c),C=[];for(var O in c)O=="constructor"&&(m||!un.call(c,O))||C.push(O);return C}function bl(c,m){return c<m}function jr(c,m){var C=-1,O=Ho(c)?ye(c.length):[];return Cs(c,function(B,V,J){O[++C]=m(B,V,J)}),O}function Jc(c){var m=Rt(c);return m.length==1&&m[0][2]?DT(m[0][0],m[0][1]):function(C){return C===c||Qc(C,c,m)}}function Sl(c,m){return Lw(c)&&RT(m)?DT(Tl(c),m):function(C){var O=$w(C,c);return O===n&&O===m?Fw(C,c):Zc(m,O,b|S)}}function Au(c,m,C,O,B){c!==m&&em(m,function(V,J){if(B||(B=new Dr),Cr(V))E1(c,m,J,C,Au,O,B);else{var ne=O?O(Ow(c,J),V,J+"",c,m,B):n;ne===n&&(ne=V),b1(c,J,ne)}},Vo)}function E1(c,m,C,O,B,V,J){var ne=Ow(c,C),ce=Ow(m,C),_e=J.get(ce);if(_e){b1(c,C,_e);return}var Te=V?V(ne,ce,C+"",c,m,J):n,Re=Te===n;if(Re){var tt=Ft(ce),bt=!tt&&id(ce),Pt=!tt&&!bt&&xm(ce);Te=ce,tt||bt||Pt?Ft(ne)?Te=ne:Yr(ne)?Te=Fi(ne):bt?(Re=!1,Te=kl(ce,!0)):Pt?(Re=!1,Te=P3(ce,!0)):Te=[]:F1(ce)||nh(ce)?(Te=ne,nh(ne)?Te=dL(ne):(!Cr(ne)||Ru(ne))&&(Te=IT(ce))):Re=!1}Re&&(J.set(ce,Te),B(Te,ce,O,V,J),J.delete(ce)),b1(c,C,Te)}function ed(c,m){var C=c.length;if(C)return m+=m<0?C:0,Iu(m,C)?c[m]:n}function Bi(c,m,C){m.length?m=Un(m,function(V){return Ft(V)?function(J){return yl(J,V.length===1?V[0]:V)}:V}):m=[Wo];var O=-1;m=Un(m,Vr(Me()));var B=jr(c,function(V,J,ne){var ce=Un(m,function(_e){return _e(V)});return{criteria:ce,index:++O,value:V}});return t3(B,function(V,J){return Tw(V,J,C)})}function P1(c,m){return um(c,m,function(C,O){return Fw(c,O)})}function um(c,m,C){for(var O=-1,B=m.length,V={};++O<B;){var J=m[O],ne=yl(c,J);C(ne,J)&&Ou(V,_l(J,c),ne)}return V}function ks(c){return function(m){return yl(m,c)}}function xl(c,m,C,O){var B=O?ua:Ac,V=-1,J=m.length,ne=c;for(c===m&&(m=Fi(m)),C&&(ne=Un(c,Vr(C)));++V<J;)for(var ce=0,_e=m[V],Te=C?C(_e):_e;(ce=B(ne,Te,ce,O))>-1;)ne!==c&&jf.call(ne,ce,1),jf.call(c,ce,1);return c}function Gf(c,m){for(var C=c?m.length:0,O=C-1;C--;){var B=m[C];if(C==O||B!==V){var V=B;Iu(B)?jf.call(c,B,1):mm(c,B)}}return c}function qf(c,m){return c+Pu(u1()*(m-c+1))}function wl(c,m,C,O){for(var B=-1,V=Rr(Ff((m-c)/(C||1)),0),J=ye(V);V--;)J[O?V:++B]=c,c+=C;return J}function td(c,m){var C="";if(!c||m<1||m>W)return C;do m%2&&(C+=c),m=Pu(m/2),m&&(c+=c);while(m);return C}function Ot(c,m){return Mw(NT(c,m,Wo),c+"")}function cm(c){return qc(wm(c))}function Yf(c,m){var C=wm(c);return A3(C,Lu(m,0,C.length))}function Ou(c,m,C,O){if(!Cr(c))return c;m=_l(m,c);for(var B=-1,V=m.length,J=V-1,ne=c;ne!=null&&++B<V;){var ce=Tl(m[B]),_e=C;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return c;if(B!=J){var Te=ne[ce];_e=O?O(Te,ce,ne):n,_e===n&&(_e=Cr(Te)?Te:Iu(m[B+1])?[]:{})}vl(ne,ce,_e),ne=ne[ce]}return c}var Kf=zf?function(c,m){return zf.set(c,m),c}:Wo,dm=Bf?function(c,m){return Bf(c,"toString",{configurable:!0,enumerable:!1,value:Hw(m),writable:!0})}:Wo;function _i(c){return A3(wm(c))}function qr(c,m,C){var O=-1,B=c.length;m<0&&(m=-m>B?0:B+m),C=C>B?B:C,C<0&&(C+=B),B=m>C?0:C-m>>>0,m>>>=0;for(var V=ye(B);++O<B;)V[O]=c[O+m];return V}function Fo(c,m){var C;return Cs(c,function(O,B,V){return C=m(O,B,V),!C}),!!C}function hi(c,m,C){var O=0,B=c==null?O:c.length;if(typeof m=="number"&&m===m&&B<=Pe){for(;O<B;){var V=O+B>>>1,J=c[V];J!==null&&!ba(J)&&(C?J<=m:J<m)?O=V+1:B=V}return B}return fm(c,m,Wo,C)}function fm(c,m,C,O){var B=0,V=c==null?0:c.length;if(V===0)return 0;m=C(m);for(var J=m!==m,ne=m===null,ce=ba(m),_e=m===n;B<V;){var Te=Pu((B+V)/2),Re=C(c[Te]),tt=Re!==n,bt=Re===null,Pt=Re===Re,qt=ba(Re);if(J)var Tt=O||Pt;else _e?Tt=Pt&&(O||tt):ne?Tt=Pt&&tt&&(O||!bt):ce?Tt=Pt&&tt&&!bt&&(O||!qt):bt||qt?Tt=!1:Tt=O?Re<=m:Re<m;Tt?B=Te+1:V=Te}return fi(V,ve)}function hm(c,m){for(var C=-1,O=c.length,B=0,V=[];++C<O;){var J=c[C],ne=m?m(J):J;if(!C||!Ts(ne,ce)){var ce=ne;V[B++]=J===0?0:J}}return V}function pm(c){return typeof c=="number"?c:ba(c)?re:+c}function mo(c){if(typeof c=="string")return c;if(Ft(c))return Un(c,mo)+"";if(ba(c))return h1?h1.call(c):"";var m=c+"";return m=="0"&&1/c==-Z?"-0":m}function $i(c,m,C){var O=-1,B=Xi,V=c.length,J=!0,ne=[],ce=ne;if(C)J=!1,B=Bp;else if(V>=i){var _e=m?null:q(c);if(_e)return If(_e);J=!1,B=Mc,ce=new Wa}else ce=m?[]:ne;e:for(;++O<V;){var Te=c[O],Re=m?m(Te):Te;if(Te=C||Te!==0?Te:0,J&&Re===Re){for(var tt=ce.length;tt--;)if(ce[tt]===Re)continue e;m&&ce.push(Re),ne.push(Te)}else B(ce,Re,C)||(ce!==ne&&ce.push(Re),ne.push(Te))}return ne}function mm(c,m){return m=_l(m,c),c=jT(c,m),c==null||delete c[Tl(Ga(m))]}function T1(c,m,C,O){return Ou(c,m,C(yl(c,m)),O)}function nd(c,m,C,O){for(var B=c.length,V=O?B:-1;(O?V--:++V<B)&&m(c[V],V,c););return C?qr(c,O?0:V,O?V+1:B):qr(c,O?V+1:0,O?B:V)}function Cl(c,m){var C=c;return C instanceof Zt&&(C=C.value()),Ef(m,function(O,B){return B.func.apply(B.thisArg,za([O],B.args))},C)}function gm(c,m,C){var O=c.length;if(O<2)return O?$i(c[0]):[];for(var B=-1,V=ye(O);++B<O;)for(var J=c[B],ne=-1;++ne<O;)ne!=B&&(V[B]=Kc(V[B]||J,c[ne],m,C));return $i(Ur(V,1),m,C)}function L1(c,m,C){for(var O=-1,B=c.length,V=m.length,J={};++O<B;){var ne=O<V?m[O]:n;C(J,c[O],ne)}return J}function Xf(c){return Yr(c)?c:[]}function rd(c){return typeof c=="function"?c:Wo}function _l(c,m){return Ft(c)?c:Lw(c,m)?[c]:zT(An(c))}var Pw=Ot;function Es(c,m,C){var O=c.length;return C=C===n?O:C,!m&&C>=O?c:qr(c,m,C)}var A1=l3||function(c){return kt.clearTimeout(c)};function kl(c,m){if(m)return c.slice();var C=c.length,O=jc?jc(C):new c.constructor(C);return c.copy(O),O}function O1(c){var m=new c.constructor(c.byteLength);return new Ni(m).set(new Ni(c)),m}function Mu(c,m){var C=m?O1(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.byteLength)}function E3(c){var m=new c.constructor(c.source,ms.exec(c));return m.lastIndex=c.lastIndex,m}function Zn(c){return Hf?gn(Hf.call(c)):{}}function P3(c,m){var C=m?O1(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.length)}function M1(c,m){if(c!==m){var C=c!==n,O=c===null,B=c===c,V=ba(c),J=m!==n,ne=m===null,ce=m===m,_e=ba(m);if(!ne&&!_e&&!V&&c>m||V&&J&&ce&&!ne&&!_e||O&&J&&ce||!C&&ce||!B)return 1;if(!O&&!V&&!_e&&c<m||_e&&C&&B&&!O&&!V||ne&&C&&B||!J&&B||!ce)return-1}return 0}function Tw(c,m,C){for(var O=-1,B=c.criteria,V=m.criteria,J=B.length,ne=C.length;++O<J;){var ce=M1(B[O],V[O]);if(ce){if(O>=ne)return ce;var _e=C[O];return ce*(_e=="desc"?-1:1)}}return c.index-m.index}function T3(c,m,C,O){for(var B=-1,V=c.length,J=C.length,ne=-1,ce=m.length,_e=Rr(V-J,0),Te=ye(ce+_e),Re=!O;++ne<ce;)Te[ne]=m[ne];for(;++B<J;)(Re||B<V)&&(Te[C[B]]=c[B]);for(;_e--;)Te[ne++]=c[B++];return Te}function I1(c,m,C,O){for(var B=-1,V=c.length,J=-1,ne=C.length,ce=-1,_e=m.length,Te=Rr(V-ne,0),Re=ye(Te+_e),tt=!O;++B<Te;)Re[B]=c[B];for(var bt=B;++ce<_e;)Re[bt+ce]=m[ce];for(;++J<ne;)(tt||B<V)&&(Re[bt+C[J]]=c[B++]);return Re}function Fi(c,m){var C=-1,O=c.length;for(m||(m=ye(O));++C<O;)m[C]=c[C];return m}function Ua(c,m,C,O){var B=!C;C||(C={});for(var V=-1,J=m.length;++V<J;){var ne=m[V],ce=O?O(C[ne],c[ne],ne,C,c):n;ce===n&&(ce=c[ne]),B?pa(C,ne,ce):vl(C,ne,ce)}return C}function zo(c,m){return Ua(c,Jt(c),m)}function R1(c,m){return Ua(c,Ps(c),m)}function vm(c,m){return function(C,O){var B=Ft(C)?Q0:kw,V=m?m():{};return B(C,c,Me(O,2),V)}}function go(c){return Ot(function(m,C){var O=-1,B=C.length,V=B>1?C[B-1]:n,J=B>2?C[2]:n;for(V=c.length>3&&typeof V=="function"?(B--,V):n,J&&vo(C[0],C[1],J)&&(V=B<3?n:V,B=1),m=gn(m);++O<B;){var ne=C[O];ne&&c(m,ne,O,V)}return m})}function Zf(c,m){return function(C,O){if(C==null)return C;if(!Ho(C))return c(C,O);for(var B=C.length,V=m?B:-1,J=gn(C);(m?V--:++V<B)&&O(J[V],V,J)!==!1;);return C}}function El(c){return function(m,C,O){for(var B=-1,V=gn(m),J=O(m),ne=J.length;ne--;){var ce=J[c?ne:++B];if(C(V[ce],ce,V)===!1)break}return m}}function ym(c,m,C){var O=m&E,B=Qf(c);function V(){var J=this&&this!==kt&&this instanceof V?B:c;return J.apply(O?C:this,arguments)}return V}function bm(c){return function(m){m=An(m);var C=ku(m)?Zi(m):n,O=C?C[0]:m.charAt(0),B=C?Es(C,1).join(""):m.slice(1);return O[c]()+B}}function Pl(c){return function(m){return Ef(bL(yL(m).replace(Pc,"")),c,"")}}function Qf(c){return function(){var m=arguments;switch(m.length){case 0:return new c;case 1:return new c(m[0]);case 2:return new c(m[0],m[1]);case 3:return new c(m[0],m[1],m[2]);case 4:return new c(m[0],m[1],m[2],m[3]);case 5:return new c(m[0],m[1],m[2],m[3],m[4]);case 6:return new c(m[0],m[1],m[2],m[3],m[4],m[5]);case 7:return new c(m[0],m[1],m[2],m[3],m[4],m[5],m[6])}var C=Tu(c.prototype),O=c.apply(C,m);return Cr(O)?O:C}}function L3(c,m,C){var O=Qf(c);function B(){for(var V=arguments.length,J=ye(V),ne=V,ce=et(B);ne--;)J[ne]=arguments[ne];var _e=V<3&&J[0]!==ce&&J[V-1]!==ce?[]:da(J,ce);if(V-=_e.length,V<C)return L(c,m,Jf,B.placeholder,n,J,_e,n,n,C-V);var Te=this&&this!==kt&&this instanceof B?O:c;return Ri(Te,this,J)}return B}function D1(c){return function(m,C,O){var B=gn(m);if(!Ho(m)){var V=Me(C,3);m=Ei(m),C=function(ne){return V(B[ne],ne,B)}}var J=c(m,C,O);return J>-1?B[V?m[J]:J]:n}}function N1(c){return gr(function(m){var C=m.length,O=C,B=ho.prototype.thru;for(c&&m.reverse();O--;){var V=m[O];if(typeof V!="function")throw new Di(a);if(B&&!J&&Se(V)=="wrapper")var J=new ho([],!0)}for(O=J?O:C;++O<C;){V=m[O];var ne=Se(V),ce=ne=="wrapper"?ue(V):n;ce&&Aw(ce[0])&&ce[1]==(D|T|M|j)&&!ce[4].length&&ce[9]==1?J=J[Se(ce[0])].apply(J,ce[3]):J=V.length==1&&Aw(V)?J[ne]():J.thru(V)}return function(){var _e=arguments,Te=_e[0];if(J&&_e.length==1&&Ft(Te))return J.plant(Te).value();for(var Re=0,tt=C?m[Re].apply(this,_e):Te;++Re<C;)tt=m[Re].call(this,tt);return tt}})}function Jf(c,m,C,O,B,V,J,ne,ce,_e){var Te=m&D,Re=m&E,tt=m&_,bt=m&(T|A),Pt=m&F,qt=tt?n:Qf(c);function Tt(){for(var Qt=arguments.length,on=ye(Qt),Sa=Qt;Sa--;)on[Sa]=arguments[Sa];if(bt)var yo=et(Tt),xa=e1(on,yo);if(O&&(on=T3(on,O,B,bt)),V&&(on=I1(on,V,J,bt)),Qt-=xa,bt&&Qt<_e){var Kr=da(on,yo);return L(c,m,Jf,Tt.placeholder,C,on,Kr,ne,ce,_e-Qt)}var Ls=Re?C:this,Nu=tt?Ls[c]:c;return Qt=on.length,ne?on=bX(on,ne):Pt&&Qt>1&&on.reverse(),Te&&ce<Qt&&(on.length=ce),this&&this!==kt&&this instanceof Tt&&(Nu=qt||Qf(Nu)),Nu.apply(Ls,on)}return Tt}function eh(c,m){return function(C,O){return am(C,c,m(O),{})}}function Sm(c,m){return function(C,O){var B;if(C===n&&O===n)return m;if(C!==n&&(B=C),O!==n){if(B===n)return O;typeof C=="string"||typeof O=="string"?(C=mo(C),O=mo(O)):(C=pm(C),O=pm(O)),B=c(C,O)}return B}}function j1(c){return gr(function(m){return m=Un(m,Vr(Me())),Ot(function(C){var O=this;return c(m,function(B){return Ri(B,O,C)})})})}function f(c,m){m=m===n?" ":mo(m);var C=m.length;if(C<2)return C?td(m,c):m;var O=td(m,Ff(c/Ha(m)));return ku(m)?Es(Zi(O),0,c).join(""):O.slice(0,c)}function p(c,m,C,O){var B=m&E,V=Qf(c);function J(){for(var ne=-1,ce=arguments.length,_e=-1,Te=O.length,Re=ye(Te+ce),tt=this&&this!==kt&&this instanceof J?V:c;++_e<Te;)Re[_e]=O[_e];for(;ce--;)Re[_e++]=arguments[++ne];return Ri(tt,B?C:this,Re)}return J}function x(c){return function(m,C,O){return O&&typeof O!="number"&&vo(m,C,O)&&(C=O=n),m=Du(m),C===n?(C=m,m=0):C=Du(C),O=O===n?m<C?1:-1:Du(O),wl(m,C,O,c)}}function P(c){return function(m,C){return typeof m=="string"&&typeof C=="string"||(m=qa(m),C=qa(C)),c(m,C)}}function L(c,m,C,O,B,V,J,ne,ce,_e){var Te=m&T,Re=Te?J:n,tt=Te?n:J,bt=Te?V:n,Pt=Te?n:V;m|=Te?M:R,m&=~(Te?R:M),m&k||(m&=~(E|_));var qt=[c,m,B,bt,Re,Pt,tt,ne,ce,_e],Tt=C.apply(n,qt);return Aw(c)&&BT(Tt,qt),Tt.placeholder=O,$T(Tt,c,m)}function I(c){var m=$t[c];return function(C,O){if(C=qa(C),O=O==null?0:fi(Vt(O),292),O&&Gp(C)){var B=(An(C)+"e").split("e"),V=m(B[0]+"e"+(+B[1]+O));return B=(An(V)+"e").split("e"),+(B[0]+"e"+(+B[1]-O))}return m(C)}}var q=Hc&&1/If(new Hc([,-0]))[1]==Z?function(c){return new Hc(c)}:Uw;function le(c){return function(m){var C=ki(m);return C==Ae?Hp(m):C==De?i3(m):Oc(m,c(m))}}function pe(c,m,C,O,B,V,J,ne){var ce=m&_;if(!ce&&typeof c!="function")throw new Di(a);var _e=O?O.length:0;if(_e||(m&=~(M|R),O=B=n),J=J===n?J:Rr(Vt(J),0),ne=ne===n?ne:Vt(ne),_e-=B?B.length:0,m&R){var Te=O,Re=B;O=B=n}var tt=ce?n:ue(c),bt=[c,m,C,O,B,Te,Re,V,J,ne];if(tt&&gX(bt,tt),c=bt[0],m=bt[1],C=bt[2],O=bt[3],B=bt[4],ne=bt[9]=bt[9]===n?ce?0:c.length:Rr(bt[9]-_e,0),!ne&&m&(T|A)&&(m&=~(T|A)),!m||m==E)var Pt=ym(c,m,C);else m==T||m==A?Pt=L3(c,m,ne):(m==M||m==(E|M))&&!B.length?Pt=p(c,m,C,O):Pt=Jf.apply(n,bt);var qt=tt?Kf:BT;return $T(qt(Pt,bt),c,m)}function ze(c,m,C,O){return c===n||Ts(c,Ln[C])&&!un.call(O,C)?m:c}function ft(c,m,C,O,B,V){return Cr(c)&&Cr(m)&&(V.set(m,c),Au(c,m,n,ft,V),V.delete(m)),c}function jt(c){return F1(c)?n:c}function rt(c,m,C,O,B,V){var J=C&b,ne=c.length,ce=m.length;if(ne!=ce&&!(J&&ce>ne))return!1;var _e=V.get(c),Te=V.get(m);if(_e&&Te)return _e==m&&Te==c;var Re=-1,tt=!0,bt=C&S?new Wa:n;for(V.set(c,m),V.set(m,c);++Re<ne;){var Pt=c[Re],qt=m[Re];if(O)var Tt=J?O(qt,Pt,Re,m,c,V):O(Pt,qt,Re,c,m,V);if(Tt!==n){if(Tt)continue;tt=!1;break}if(bt){if(!Tc(m,function(Qt,on){if(!Mc(bt,on)&&(Pt===Qt||B(Pt,Qt,C,O,V)))return bt.push(on)})){tt=!1;break}}else if(!(Pt===qt||B(Pt,qt,C,O,V))){tt=!1;break}}return V.delete(c),V.delete(m),tt}function Gn(c,m,C,O,B,V,J){switch(C){case Le:if(c.byteLength!=m.byteLength||c.byteOffset!=m.byteOffset)return!1;c=c.buffer,m=m.buffer;case Dt:return!(c.byteLength!=m.byteLength||!V(new Ni(c),new Ni(m)));case Ve:case Be:case lt:return Ts(+c,+m);case st:return c.name==m.name&&c.message==m.message;case ae:case Ye:return c==m+"";case Ae:var ne=Hp;case De:var ce=O&b;if(ne||(ne=If),c.size!=m.size&&!ce)return!1;var _e=J.get(c);if(_e)return _e==m;O|=S,J.set(c,m);var Te=rt(ne(c),ne(m),O,B,V,J);return J.delete(c),Te;case Ke:if(Hf)return Hf.call(c)==Hf.call(m)}return!1}function jn(c,m,C,O,B,V){var J=C&b,ne=ya(c),ce=ne.length,_e=ya(m),Te=_e.length;if(ce!=Te&&!J)return!1;for(var Re=ce;Re--;){var tt=ne[Re];if(!(J?tt in m:un.call(m,tt)))return!1}var bt=V.get(c),Pt=V.get(m);if(bt&&Pt)return bt==m&&Pt==c;var qt=!0;V.set(c,m),V.set(m,c);for(var Tt=J;++Re<ce;){tt=ne[Re];var Qt=c[tt],on=m[tt];if(O)var Sa=J?O(on,Qt,tt,m,c,V):O(Qt,on,tt,c,m,V);if(!(Sa===n?Qt===on||B(Qt,on,C,O,V):Sa)){qt=!1;break}Tt||(Tt=tt=="constructor")}if(qt&&!Tt){var yo=c.constructor,xa=m.constructor;yo!=xa&&"constructor"in c&&"constructor"in m&&!(typeof yo=="function"&&yo instanceof yo&&typeof xa=="function"&&xa instanceof xa)&&(qt=!1)}return V.delete(c),V.delete(m),qt}function gr(c){return Mw(NT(c,n,UT),c+"")}function ya(c){return w1(c,Ei,Jt)}function ge(c){return w1(c,Vo,Ps)}var ue=zf?function(c){return zf.get(c)}:Uw;function Se(c){for(var m=c.name+"",C=xs[m],O=un.call(xs,m)?C.length:0;O--;){var B=C[O],V=B.func;if(V==null||V==c)return B.name}return m}function et(c){var m=un.call(z,"placeholder")?z:c;return m.placeholder}function Me(){var c=z.iteratee||Vw;return c=c===Vw?wr:c,arguments.length?c(arguments[0],arguments[1]):c}function Bt(c,m){var C=c.__data__;return fX(m)?C[typeof m=="string"?"string":"hash"]:C.map}function Rt(c){for(var m=Ei(c),C=m.length;C--;){var O=m[C],B=c[O];m[C]=[O,B,RT(B)]}return m}function Gt(c,m){var C=Fp(c,m);return lm(C)?C:n}function ti(c){var m=un.call(c,ml),C=c[ml];try{c[ml]=n;var O=!0}catch{}var B=Wp.call(c);return O&&(m?c[ml]=C:delete c[ml]),B}var Jt=Fc?function(c){return c==null?[]:(c=gn(c),No(Fc(c),function(m){return a1.call(c,m)}))}:Gw,Ps=Fc?function(c){for(var m=[];c;)za(m,Jt(c)),c=Bc(c);return m}:Gw,ki=Ci;(c1&&ki(new c1(new ArrayBuffer(1)))!=Le||zc&&ki(new zc)!=Ae||d1&&ki(d1.resolve())!=_t||Hc&&ki(new Hc)!=De||Vc&&ki(new Vc)!=Ne)&&(ki=function(c){var m=Ci(c),C=m==ut?c.constructor:n,O=C?th(C):"";if(O)switch(O){case bw:return Le;case Sw:return Ae;case xw:return _t;case Uc:return De;case f1:return Ne}return m});function aX(c,m,C){for(var O=-1,B=C.length;++O<B;){var V=C[O],J=V.size;switch(V.type){case"drop":c+=J;break;case"dropRight":m-=J;break;case"take":m=fi(m,c+J);break;case"takeRight":c=Rr(c,m-J);break}}return{start:c,end:m}}function sX(c){var m=c.match(ol);return m?m[1].split(xc):[]}function MT(c,m,C){m=_l(m,c);for(var O=-1,B=m.length,V=!1;++O<B;){var J=Tl(m[O]);if(!(V=c!=null&&C(c,J)))break;c=c[J]}return V||++O!=B?V:(B=c==null?0:c.length,!!B&&N3(B)&&Iu(J,B)&&(Ft(c)||nh(c)))}function lX(c){var m=c.length,C=new c.constructor(m);return m&&typeof c[0]=="string"&&un.call(c,"index")&&(C.index=c.index,C.input=c.input),C}function IT(c){return typeof c.constructor=="function"&&!B1(c)?Tu(Bc(c)):{}}function uX(c,m,C){var O=c.constructor;switch(m){case Dt:return O1(c);case Ve:case Be:return new O(+c);case Le:return Mu(c,C);case At:case $e:case vt:case tn:case Dn:case Xe:case xt:case ht:case Ht:return P3(c,C);case Ae:return new O;case lt:case Ye:return new O(c);case ae:return E3(c);case De:return new O;case Ke:return Zn(c)}}function cX(c,m){var C=m.length;if(!C)return c;var O=C-1;return m[O]=(C>1?"& ":"")+m[O],m=m.join(C>2?", ":" "),c.replace(j0,`{
|
||
/* [wrapped with `+m+`] */
|
||
`)}function dX(c){return Ft(c)||nh(c)||!!(s1&&c&&c[s1])}function Iu(c,m){var C=typeof c;return m=m??W,!!m&&(C=="number"||C!="symbol"&&G0.test(c))&&c>-1&&c%1==0&&c<m}function vo(c,m,C){if(!Cr(C))return!1;var O=typeof m;return(O=="number"?Ho(C)&&Iu(m,C.length):O=="string"&&m in C)?Ts(C[m],c):!1}function Lw(c,m){if(Ft(c))return!1;var C=typeof c;return C=="number"||C=="symbol"||C=="boolean"||c==null||ba(c)?!0:Lp.test(c)||!Tp.test(c)||m!=null&&c in gn(m)}function fX(c){var m=typeof c;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?c!=="__proto__":c===null}function Aw(c){var m=Se(c),C=z[m];if(typeof C!="function"||!(m in Zt.prototype))return!1;if(c===C)return!0;var O=ue(C);return!!O&&c===O[0]}function hX(c){return!!Dc&&Dc in c}var pX=mr?Ru:qw;function B1(c){var m=c&&c.constructor,C=typeof m=="function"&&m.prototype||Ln;return c===C}function RT(c){return c===c&&!Cr(c)}function DT(c,m){return function(C){return C==null?!1:C[c]===m&&(m!==n||c in gn(C))}}function mX(c){var m=R3(c,function(O){return C.size===u&&C.clear(),O}),C=m.cache;return m}function gX(c,m){var C=c[1],O=m[1],B=C|O,V=B<(E|_|D),J=O==D&&C==T||O==D&&C==j&&c[7].length<=m[8]||O==(D|j)&&m[7].length<=m[8]&&C==T;if(!(V||J))return c;O&E&&(c[2]=m[2],B|=C&E?0:k);var ne=m[3];if(ne){var ce=c[3];c[3]=ce?T3(ce,ne,m[4]):ne,c[4]=ce?da(c[3],d):m[4]}return ne=m[5],ne&&(ce=c[5],c[5]=ce?I1(ce,ne,m[6]):ne,c[6]=ce?da(c[5],d):m[6]),ne=m[7],ne&&(c[7]=ne),O&D&&(c[8]=c[8]==null?m[8]:fi(c[8],m[8])),c[9]==null&&(c[9]=m[9]),c[0]=m[0],c[1]=B,c}function vX(c){var m=[];if(c!=null)for(var C in gn(c))m.push(C);return m}function yX(c){return Wp.call(c)}function NT(c,m,C){return m=Rr(m===n?c.length-1:m,0),function(){for(var O=arguments,B=-1,V=Rr(O.length-m,0),J=ye(V);++B<V;)J[B]=O[m+B];B=-1;for(var ne=ye(m+1);++B<m;)ne[B]=O[B];return ne[m]=C(J),Ri(c,this,ne)}}function jT(c,m){return m.length<2?c:yl(c,qr(m,0,-1))}function bX(c,m){for(var C=c.length,O=fi(m.length,C),B=Fi(c);O--;){var V=m[O];c[O]=Iu(V,C)?B[V]:n}return c}function Ow(c,m){if(!(m==="constructor"&&typeof c[m]=="function")&&m!="__proto__")return c[m]}var BT=FT(Kf),$1=$f||function(c,m){return kt.setTimeout(c,m)},Mw=FT(dm);function $T(c,m,C){var O=m+"";return Mw(c,cX(O,SX(sX(O),C)))}function FT(c){var m=0,C=0;return function(){var O=l1(),B=G-(O-C);if(C=O,B>0){if(++m>=te)return arguments[0]}else m=0;return c.apply(n,arguments)}}function A3(c,m){var C=-1,O=c.length,B=O-1;for(m=m===n?O:m;++C<m;){var V=qf(C,B),J=c[V];c[V]=c[C],c[C]=J}return c.length=m,c}var zT=mX(function(c){var m=[];return c.charCodeAt(0)===46&&m.push(""),c.replace(ia,function(C,O,B,V){m.push(B?V.replace(F0,"$1"):O||C)}),m});function Tl(c){if(typeof c=="string"||ba(c))return c;var m=c+"";return m=="0"&&1/c==-Z?"-0":m}function th(c){if(c!=null){try{return Sr.call(c)}catch{}try{return c+""}catch{}}return""}function SX(c,m){return Xn(be,function(C){var O="_."+C[0];m&C[1]&&!Xi(c,O)&&c.push(O)}),c.sort()}function HT(c){if(c instanceof Zt)return c.clone();var m=new ho(c.__wrapped__,c.__chain__);return m.__actions__=Fi(c.__actions__),m.__index__=c.__index__,m.__values__=c.__values__,m}function xX(c,m,C){(C?vo(c,m,C):m===n)?m=1:m=Rr(Vt(m),0);var O=c==null?0:c.length;if(!O||m<1)return[];for(var B=0,V=0,J=ye(Ff(O/m));B<O;)J[V++]=qr(c,B,B+=m);return J}function wX(c){for(var m=-1,C=c==null?0:c.length,O=0,B=[];++m<C;){var V=c[m];V&&(B[O++]=V)}return B}function CX(){var c=arguments.length;if(!c)return[];for(var m=ye(c-1),C=arguments[0],O=c;O--;)m[O-1]=arguments[O];return za(Ft(C)?Fi(C):[C],Ur(m,1))}var _X=Ot(function(c,m){return Yr(c)?Kc(c,Ur(m,1,Yr,!0)):[]}),kX=Ot(function(c,m){var C=Ga(m);return Yr(C)&&(C=n),Yr(c)?Kc(c,Ur(m,1,Yr,!0),Me(C,2)):[]}),EX=Ot(function(c,m){var C=Ga(m);return Yr(C)&&(C=n),Yr(c)?Kc(c,Ur(m,1,Yr,!0),n,C):[]});function PX(c,m,C){var O=c==null?0:c.length;return O?(m=C||m===n?1:Vt(m),qr(c,m<0?0:m,O)):[]}function TX(c,m,C){var O=c==null?0:c.length;return O?(m=C||m===n?1:Vt(m),m=O-m,qr(c,0,m<0?0:m)):[]}function LX(c,m){return c&&c.length?nd(c,Me(m,3),!0,!0):[]}function AX(c,m){return c&&c.length?nd(c,Me(m,3),!0):[]}function OX(c,m,C,O){var B=c==null?0:c.length;return B?(C&&typeof C!="number"&&vo(c,m,C)&&(C=0,O=B),ma(c,m,C,O)):[]}function VT(c,m,C){var O=c==null?0:c.length;if(!O)return-1;var B=C==null?0:Vt(C);return B<0&&(B=Rr(O+B,0)),_u(c,Me(m,3),B)}function WT(c,m,C){var O=c==null?0:c.length;if(!O)return-1;var B=O-1;return C!==n&&(B=Vt(C),B=C<0?Rr(O+B,0):fi(B,O-1)),_u(c,Me(m,3),B,!0)}function UT(c){var m=c==null?0:c.length;return m?Ur(c,1):[]}function MX(c){var m=c==null?0:c.length;return m?Ur(c,Z):[]}function IX(c,m){var C=c==null?0:c.length;return C?(m=m===n?1:Vt(m),Ur(c,m)):[]}function RX(c){for(var m=-1,C=c==null?0:c.length,O={};++m<C;){var B=c[m];O[B[0]]=B[1]}return O}function GT(c){return c&&c.length?c[0]:n}function DX(c,m,C){var O=c==null?0:c.length;if(!O)return-1;var B=C==null?0:Vt(C);return B<0&&(B=Rr(O+B,0)),Ac(c,m,B)}function NX(c){var m=c==null?0:c.length;return m?qr(c,0,-1):[]}var jX=Ot(function(c){var m=Un(c,Xf);return m.length&&m[0]===c[0]?Xc(m):[]}),BX=Ot(function(c){var m=Ga(c),C=Un(c,Xf);return m===Ga(C)?m=n:C.pop(),C.length&&C[0]===c[0]?Xc(C,Me(m,2)):[]}),$X=Ot(function(c){var m=Ga(c),C=Un(c,Xf);return m=typeof m=="function"?m:n,m&&C.pop(),C.length&&C[0]===c[0]?Xc(C,n,m):[]});function FX(c,m){return c==null?"":d3.call(c,m)}function Ga(c){var m=c==null?0:c.length;return m?c[m-1]:n}function zX(c,m,C){var O=c==null?0:c.length;if(!O)return-1;var B=O;return C!==n&&(B=Vt(C),B=B<0?Rr(O+B,0):fi(B,O-1)),m===m?t1(c,m,B):_u(c,Pf,B,!0)}function HX(c,m){return c&&c.length?ed(c,Vt(m)):n}var VX=Ot(qT);function qT(c,m){return c&&c.length&&m&&m.length?xl(c,m):c}function WX(c,m,C){return c&&c.length&&m&&m.length?xl(c,m,Me(C,2)):c}function UX(c,m,C){return c&&c.length&&m&&m.length?xl(c,m,n,C):c}var GX=gr(function(c,m){var C=c==null?0:c.length,O=Xp(c,m);return Gf(c,Un(m,function(B){return Iu(B,C)?+B:B}).sort(M1)),O});function qX(c,m){var C=[];if(!(c&&c.length))return C;var O=-1,B=[],V=c.length;for(m=Me(m,3);++O<V;){var J=c[O];m(J,O,c)&&(C.push(J),B.push(O))}return Gf(c,B),C}function Iw(c){return c==null?c:p3.call(c)}function YX(c,m,C){var O=c==null?0:c.length;return O?(C&&typeof C!="number"&&vo(c,m,C)?(m=0,C=O):(m=m==null?0:Vt(m),C=C===n?O:Vt(C)),qr(c,m,C)):[]}function KX(c,m){return hi(c,m)}function XX(c,m,C){return fm(c,m,Me(C,2))}function ZX(c,m){var C=c==null?0:c.length;if(C){var O=hi(c,m);if(O<C&&Ts(c[O],m))return O}return-1}function QX(c,m){return hi(c,m,!0)}function JX(c,m,C){return fm(c,m,Me(C,2),!0)}function eZ(c,m){var C=c==null?0:c.length;if(C){var O=hi(c,m,!0)-1;if(Ts(c[O],m))return O}return-1}function tZ(c){return c&&c.length?hm(c):[]}function nZ(c,m){return c&&c.length?hm(c,Me(m,2)):[]}function rZ(c){var m=c==null?0:c.length;return m?qr(c,1,m):[]}function iZ(c,m,C){return c&&c.length?(m=C||m===n?1:Vt(m),qr(c,0,m<0?0:m)):[]}function oZ(c,m,C){var O=c==null?0:c.length;return O?(m=C||m===n?1:Vt(m),m=O-m,qr(c,m<0?0:m,O)):[]}function aZ(c,m){return c&&c.length?nd(c,Me(m,3),!1,!0):[]}function sZ(c,m){return c&&c.length?nd(c,Me(m,3)):[]}var lZ=Ot(function(c){return $i(Ur(c,1,Yr,!0))}),uZ=Ot(function(c){var m=Ga(c);return Yr(m)&&(m=n),$i(Ur(c,1,Yr,!0),Me(m,2))}),cZ=Ot(function(c){var m=Ga(c);return m=typeof m=="function"?m:n,$i(Ur(c,1,Yr,!0),n,m)});function dZ(c){return c&&c.length?$i(c):[]}function fZ(c,m){return c&&c.length?$i(c,Me(m,2)):[]}function hZ(c,m){return m=typeof m=="function"?m:n,c&&c.length?$i(c,n,m):[]}function Rw(c){if(!(c&&c.length))return[];var m=0;return c=No(c,function(C){if(Yr(C))return m=Rr(C.length,m),!0}),Of(m,function(C){return Un(c,hl(C))})}function YT(c,m){if(!(c&&c.length))return[];var C=Rw(c);return m==null?C:Un(C,function(O){return Ri(m,n,O)})}var pZ=Ot(function(c,m){return Yr(c)?Kc(c,m):[]}),mZ=Ot(function(c){return gm(No(c,Yr))}),gZ=Ot(function(c){var m=Ga(c);return Yr(m)&&(m=n),gm(No(c,Yr),Me(m,2))}),vZ=Ot(function(c){var m=Ga(c);return m=typeof m=="function"?m:n,gm(No(c,Yr),n,m)}),yZ=Ot(Rw);function bZ(c,m){return L1(c||[],m||[],vl)}function SZ(c,m){return L1(c||[],m||[],Ou)}var xZ=Ot(function(c){var m=c.length,C=m>1?c[m-1]:n;return C=typeof C=="function"?(c.pop(),C):n,YT(c,C)});function KT(c){var m=z(c);return m.__chain__=!0,m}function wZ(c,m){return m(c),c}function O3(c,m){return m(c)}var CZ=gr(function(c){var m=c.length,C=m?c[0]:0,O=this.__wrapped__,B=function(V){return Xp(V,c)};return m>1||this.__actions__.length||!(O instanceof Zt)||!Iu(C)?this.thru(B):(O=O.slice(C,+C+(m?1:0)),O.__actions__.push({func:O3,args:[B],thisArg:n}),new ho(O,this.__chain__).thru(function(V){return m&&!V.length&&V.push(n),V}))});function _Z(){return KT(this)}function kZ(){return new ho(this.value(),this.__chain__)}function EZ(){this.__values__===n&&(this.__values__=uL(this.value()));var c=this.__index__>=this.__values__.length,m=c?n:this.__values__[this.__index__++];return{done:c,value:m}}function PZ(){return this}function TZ(c){for(var m,C=this;C instanceof Vf;){var O=HT(C);O.__index__=0,O.__values__=n,m?B.__wrapped__=O:m=O;var B=O;C=C.__wrapped__}return B.__wrapped__=c,m}function LZ(){var c=this.__wrapped__;if(c instanceof Zt){var m=c;return this.__actions__.length&&(m=new Zt(this)),m=m.reverse(),m.__actions__.push({func:O3,args:[Iw],thisArg:n}),new ho(m,this.__chain__)}return this.thru(Iw)}function AZ(){return Cl(this.__wrapped__,this.__actions__)}var OZ=vm(function(c,m,C){un.call(c,C)?++c[C]:pa(c,C,1)});function MZ(c,m,C){var O=Ft(c)?Wn:x1;return C&&vo(c,m,C)&&(m=n),O(c,Me(m,3))}function IZ(c,m){var C=Ft(c)?No:ga;return C(c,Me(m,3))}var RZ=D1(VT),DZ=D1(WT);function NZ(c,m){return Ur(M3(c,m),1)}function jZ(c,m){return Ur(M3(c,m),Z)}function BZ(c,m,C){return C=C===n?1:Vt(C),Ur(M3(c,m),C)}function XT(c,m){var C=Ft(c)?Xn:Cs;return C(c,Me(m,3))}function ZT(c,m){var C=Ft(c)?Do:Jp;return C(c,Me(m,3))}var $Z=vm(function(c,m,C){un.call(c,C)?c[C].push(m):pa(c,C,[m])});function FZ(c,m,C,O){c=Ho(c)?c:wm(c),C=C&&!O?Vt(C):0;var B=c.length;return C<0&&(C=Rr(B+C,0)),j3(c)?C<=B&&c.indexOf(m,C)>-1:!!B&&Ac(c,m,C)>-1}var zZ=Ot(function(c,m,C){var O=-1,B=typeof m=="function",V=Ho(c)?ye(c.length):[];return Cs(c,function(J){V[++O]=B?Ri(m,J,C):_s(J,m,C)}),V}),HZ=vm(function(c,m,C){pa(c,C,m)});function M3(c,m){var C=Ft(c)?Un:jr;return C(c,Me(m,3))}function VZ(c,m,C,O){return c==null?[]:(Ft(m)||(m=m==null?[]:[m]),C=O?n:C,Ft(C)||(C=C==null?[]:[C]),Bi(c,m,C))}var WZ=vm(function(c,m,C){c[C?0:1].push(m)},function(){return[[],[]]});function UZ(c,m,C){var O=Ft(c)?Ef:$p,B=arguments.length<3;return O(c,Me(m,4),C,B,Cs)}function GZ(c,m,C){var O=Ft(c)?Qy:$p,B=arguments.length<3;return O(c,Me(m,4),C,B,Jp)}function qZ(c,m){var C=Ft(c)?No:ga;return C(c,D3(Me(m,3)))}function YZ(c){var m=Ft(c)?qc:cm;return m(c)}function KZ(c,m,C){(C?vo(c,m,C):m===n)?m=1:m=Vt(m);var O=Ft(c)?xi:Yf;return O(c,m)}function XZ(c){var m=Ft(c)?_w:_i;return m(c)}function ZZ(c){if(c==null)return 0;if(Ho(c))return j3(c)?Ha(c):c.length;var m=ki(c);return m==Ae||m==De?c.size:Gr(c).length}function QZ(c,m,C){var O=Ft(c)?Tc:Fo;return C&&vo(c,m,C)&&(m=n),O(c,Me(m,3))}var JZ=Ot(function(c,m){if(c==null)return[];var C=m.length;return C>1&&vo(c,m[0],m[1])?m=[]:C>2&&vo(m[0],m[1],m[2])&&(m=[m[0]]),Bi(c,Ur(m,1),[])}),I3=u3||function(){return kt.Date.now()};function eQ(c,m){if(typeof m!="function")throw new Di(a);return c=Vt(c),function(){if(--c<1)return m.apply(this,arguments)}}function QT(c,m,C){return m=C?n:m,m=c&&m==null?c.length:m,pe(c,D,n,n,n,n,m)}function JT(c,m){var C;if(typeof m!="function")throw new Di(a);return c=Vt(c),function(){return--c>0&&(C=m.apply(this,arguments)),c<=1&&(m=n),C}}var Dw=Ot(function(c,m,C){var O=E;if(C.length){var B=da(C,et(Dw));O|=M}return pe(c,O,m,C,B)}),eL=Ot(function(c,m,C){var O=E|_;if(C.length){var B=da(C,et(eL));O|=M}return pe(m,O,c,C,B)});function tL(c,m,C){m=C?n:m;var O=pe(c,T,n,n,n,n,n,m);return O.placeholder=tL.placeholder,O}function nL(c,m,C){m=C?n:m;var O=pe(c,A,n,n,n,n,n,m);return O.placeholder=nL.placeholder,O}function rL(c,m,C){var O,B,V,J,ne,ce,_e=0,Te=!1,Re=!1,tt=!0;if(typeof c!="function")throw new Di(a);m=qa(m)||0,Cr(C)&&(Te=!!C.leading,Re="maxWait"in C,V=Re?Rr(qa(C.maxWait)||0,m):V,tt="trailing"in C?!!C.trailing:tt);function bt(Kr){var Ls=O,Nu=B;return O=B=n,_e=Kr,J=c.apply(Nu,Ls),J}function Pt(Kr){return _e=Kr,ne=$1(Qt,m),Te?bt(Kr):J}function qt(Kr){var Ls=Kr-ce,Nu=Kr-_e,wL=m-Ls;return Re?fi(wL,V-Nu):wL}function Tt(Kr){var Ls=Kr-ce,Nu=Kr-_e;return ce===n||Ls>=m||Ls<0||Re&&Nu>=V}function Qt(){var Kr=I3();if(Tt(Kr))return on(Kr);ne=$1(Qt,qt(Kr))}function on(Kr){return ne=n,tt&&O?bt(Kr):(O=B=n,J)}function Sa(){ne!==n&&A1(ne),_e=0,O=ce=B=ne=n}function yo(){return ne===n?J:on(I3())}function xa(){var Kr=I3(),Ls=Tt(Kr);if(O=arguments,B=this,ce=Kr,Ls){if(ne===n)return Pt(ce);if(Re)return A1(ne),ne=$1(Qt,m),bt(ce)}return ne===n&&(ne=$1(Qt,m)),J}return xa.cancel=Sa,xa.flush=yo,xa}var tQ=Ot(function(c,m){return S1(c,1,m)}),nQ=Ot(function(c,m,C){return S1(c,qa(m)||0,C)});function rQ(c){return pe(c,F)}function R3(c,m){if(typeof c!="function"||m!=null&&typeof m!="function")throw new Di(a);var C=function(){var O=arguments,B=m?m.apply(this,O):O[0],V=C.cache;if(V.has(B))return V.get(B);var J=c.apply(this,O);return C.cache=V.set(B,J)||V,J};return C.cache=new(R3.Cache||ha),C}R3.Cache=ha;function D3(c){if(typeof c!="function")throw new Di(a);return function(){var m=arguments;switch(m.length){case 0:return!c.call(this);case 1:return!c.call(this,m[0]);case 2:return!c.call(this,m[0],m[1]);case 3:return!c.call(this,m[0],m[1],m[2])}return!c.apply(this,m)}}function iQ(c){return JT(2,c)}var oQ=Pw(function(c,m){m=m.length==1&&Ft(m[0])?Un(m[0],Vr(Me())):Un(Ur(m,1),Vr(Me()));var C=m.length;return Ot(function(O){for(var B=-1,V=fi(O.length,C);++B<V;)O[B]=m[B].call(this,O[B]);return Ri(c,this,O)})}),Nw=Ot(function(c,m){var C=da(m,et(Nw));return pe(c,M,n,m,C)}),iL=Ot(function(c,m){var C=da(m,et(iL));return pe(c,R,n,m,C)}),aQ=gr(function(c,m){return pe(c,j,n,n,n,m)});function sQ(c,m){if(typeof c!="function")throw new Di(a);return m=m===n?m:Vt(m),Ot(c,m)}function lQ(c,m){if(typeof c!="function")throw new Di(a);return m=m==null?0:Rr(Vt(m),0),Ot(function(C){var O=C[m],B=Es(C,0,m);return O&&za(B,O),Ri(c,this,B)})}function uQ(c,m,C){var O=!0,B=!0;if(typeof c!="function")throw new Di(a);return Cr(C)&&(O="leading"in C?!!C.leading:O,B="trailing"in C?!!C.trailing:B),rL(c,m,{leading:O,maxWait:m,trailing:B})}function cQ(c){return QT(c,1)}function dQ(c,m){return Nw(rd(m),c)}function fQ(){if(!arguments.length)return[];var c=arguments[0];return Ft(c)?c:[c]}function hQ(c){return wi(c,v)}function pQ(c,m){return m=typeof m=="function"?m:n,wi(c,v,m)}function mQ(c){return wi(c,h|v)}function gQ(c,m){return m=typeof m=="function"?m:n,wi(c,h|v,m)}function vQ(c,m){return m==null||Qp(c,m,Ei(m))}function Ts(c,m){return c===m||c!==c&&m!==m}var yQ=P(nm),bQ=P(function(c,m){return c>=m}),nh=sm(function(){return arguments}())?sm:function(c){return Br(c)&&un.call(c,"callee")&&!a1.call(c,"callee")},Ft=ye.isArray,SQ=ci?Vr(ci):C1;function Ho(c){return c!=null&&N3(c.length)&&!Ru(c)}function Yr(c){return Br(c)&&Ho(c)}function xQ(c){return c===!0||c===!1||Br(c)&&Ci(c)==Ve}var id=c3||qw,wQ=Ro?Vr(Ro):_1;function CQ(c){return Br(c)&&c.nodeType===1&&!F1(c)}function _Q(c){if(c==null)return!0;if(Ho(c)&&(Ft(c)||typeof c=="string"||typeof c.splice=="function"||id(c)||xm(c)||nh(c)))return!c.length;var m=ki(c);if(m==Ae||m==De)return!c.size;if(B1(c))return!Gr(c).length;for(var C in c)if(un.call(c,C))return!1;return!0}function kQ(c,m){return Zc(c,m)}function EQ(c,m,C){C=typeof C=="function"?C:n;var O=C?C(c,m):n;return O===n?Zc(c,m,n,C):!!O}function jw(c){if(!Br(c))return!1;var m=Ci(c);return m==st||m==wt||typeof c.message=="string"&&typeof c.name=="string"&&!F1(c)}function PQ(c){return typeof c=="number"&&Gp(c)}function Ru(c){if(!Cr(c))return!1;var m=Ci(c);return m==gt||m==St||m==ot||m==ln}function oL(c){return typeof c=="number"&&c==Vt(c)}function N3(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function Cr(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}function Br(c){return c!=null&&typeof c=="object"}var aL=co?Vr(co):Ew;function TQ(c,m){return c===m||Qc(c,m,Rt(m))}function LQ(c,m,C){return C=typeof C=="function"?C:n,Qc(c,m,Rt(m),C)}function AQ(c){return sL(c)&&c!=+c}function OQ(c){if(pX(c))throw new It(o);return lm(c)}function MQ(c){return c===null}function IQ(c){return c==null}function sL(c){return typeof c=="number"||Br(c)&&Ci(c)==lt}function F1(c){if(!Br(c)||Ci(c)!=ut)return!1;var m=Bc(c);if(m===null)return!0;var C=un.call(m,"constructor")&&m.constructor;return typeof C=="function"&&C instanceof C&&Sr.call(C)==Si}var Bw=Fa?Vr(Fa):xr;function RQ(c){return oL(c)&&c>=-W&&c<=W}var lL=fl?Vr(fl):Ut;function j3(c){return typeof c=="string"||!Ft(c)&&Br(c)&&Ci(c)==Ye}function ba(c){return typeof c=="symbol"||Br(c)&&Ci(c)==Ke}var xm=Z0?Vr(Z0):ei;function DQ(c){return c===n}function NQ(c){return Br(c)&&ki(c)==Ne}function jQ(c){return Br(c)&&Ci(c)==Ct}var BQ=P(bl),$Q=P(function(c,m){return c<=m});function uL(c){if(!c)return[];if(Ho(c))return j3(c)?Zi(c):Fi(c);if($c&&c[$c])return r3(c[$c]());var m=ki(c),C=m==Ae?Hp:m==De?If:wm;return C(c)}function Du(c){if(!c)return c===0?c:0;if(c=qa(c),c===Z||c===-Z){var m=c<0?-1:1;return m*Q}return c===c?c:0}function Vt(c){var m=Du(c),C=m%1;return m===m?C?m-C:m:0}function cL(c){return c?Lu(Vt(c),0,de):0}function qa(c){if(typeof c=="number")return c;if(ba(c))return re;if(Cr(c)){var m=typeof c.valueOf=="function"?c.valueOf():c;c=Cr(m)?m+"":m}if(typeof c!="string")return c===0?c:+c;c=fo(c);var C=V0.test(c);return C||U0.test(c)?it(c.slice(2),C?2:8):H0.test(c)?re:+c}function dL(c){return Ua(c,Vo(c))}function FQ(c){return c?Lu(Vt(c),-W,W):c===0?c:0}function An(c){return c==null?"":mo(c)}var zQ=go(function(c,m){if(B1(m)||Ho(m)){Ua(m,Ei(m),c);return}for(var C in m)un.call(m,C)&&vl(c,C,m[C])}),fL=go(function(c,m){Ua(m,Vo(m),c)}),B3=go(function(c,m,C,O){Ua(m,Vo(m),c,O)}),HQ=go(function(c,m,C,O){Ua(m,Ei(m),c,O)}),VQ=gr(Xp);function WQ(c,m){var C=Tu(c);return m==null?C:ct(C,m)}var UQ=Ot(function(c,m){c=gn(c);var C=-1,O=m.length,B=O>2?m[2]:n;for(B&&vo(m[0],m[1],B)&&(O=1);++C<O;)for(var V=m[C],J=Vo(V),ne=-1,ce=J.length;++ne<ce;){var _e=J[ne],Te=c[_e];(Te===n||Ts(Te,Ln[_e])&&!un.call(c,_e))&&(c[_e]=V[_e])}return c}),GQ=Ot(function(c){return c.push(n,ft),Ri(hL,n,c)});function qQ(c,m){return e3(c,Me(m,3),va)}function YQ(c,m){return e3(c,Me(m,3),$o)}function KQ(c,m){return c==null?c:em(c,Me(m,3),Vo)}function XQ(c,m){return c==null?c:Bo(c,Me(m,3),Vo)}function ZQ(c,m){return c&&va(c,Me(m,3))}function QQ(c,m){return c&&$o(c,Me(m,3))}function JQ(c){return c==null?[]:tm(c,Ei(c))}function eJ(c){return c==null?[]:tm(c,Vo(c))}function $w(c,m,C){var O=c==null?n:yl(c,m);return O===n?C:O}function tJ(c,m){return c!=null&&MT(c,m,rm)}function Fw(c,m){return c!=null&&MT(c,m,im)}var nJ=eh(function(c,m,C){m!=null&&typeof m.toString!="function"&&(m=Wp.call(m)),c[m]=C},Hw(Wo)),rJ=eh(function(c,m,C){m!=null&&typeof m.toString!="function"&&(m=Wp.call(m)),un.call(c,m)?c[m].push(C):c[m]=[C]},Me),iJ=Ot(_s);function Ei(c){return Ho(c)?y1(c):Gr(c)}function Vo(c){return Ho(c)?y1(c,!0):po(c)}function oJ(c,m){var C={};return m=Me(m,3),va(c,function(O,B,V){pa(C,m(O,B,V),O)}),C}function aJ(c,m){var C={};return m=Me(m,3),va(c,function(O,B,V){pa(C,B,m(O,B,V))}),C}var sJ=go(function(c,m,C){Au(c,m,C)}),hL=go(function(c,m,C,O){Au(c,m,C,O)}),lJ=gr(function(c,m){var C={};if(c==null)return C;var O=!1;m=Un(m,function(V){return V=_l(V,c),O||(O=V.length>1),V}),Ua(c,ge(c),C),O&&(C=wi(C,h|g|v,jt));for(var B=m.length;B--;)mm(C,m[B]);return C});function uJ(c,m){return pL(c,D3(Me(m)))}var cJ=gr(function(c,m){return c==null?{}:P1(c,m)});function pL(c,m){if(c==null)return{};var C=Un(ge(c),function(O){return[O]});return m=Me(m),um(c,C,function(O,B){return m(O,B[0])})}function dJ(c,m,C){m=_l(m,c);var O=-1,B=m.length;for(B||(B=1,c=n);++O<B;){var V=c==null?n:c[Tl(m[O])];V===n&&(O=B,V=C),c=Ru(V)?V.call(c):V}return c}function fJ(c,m,C){return c==null?c:Ou(c,m,C)}function hJ(c,m,C,O){return O=typeof O=="function"?O:n,c==null?c:Ou(c,m,C,O)}var mL=le(Ei),gL=le(Vo);function pJ(c,m,C){var O=Ft(c),B=O||id(c)||xm(c);if(m=Me(m,4),C==null){var V=c&&c.constructor;B?C=O?new V:[]:Cr(c)?C=Ru(V)?Tu(Bc(c)):{}:C={}}return(B?Xn:va)(c,function(J,ne,ce){return m(C,J,ne,ce)}),C}function mJ(c,m){return c==null?!0:mm(c,m)}function gJ(c,m,C){return c==null?c:T1(c,m,rd(C))}function vJ(c,m,C,O){return O=typeof O=="function"?O:n,c==null?c:T1(c,m,rd(C),O)}function wm(c){return c==null?[]:Mf(c,Ei(c))}function yJ(c){return c==null?[]:Mf(c,Vo(c))}function bJ(c,m,C){return C===n&&(C=m,m=n),C!==n&&(C=qa(C),C=C===C?C:0),m!==n&&(m=qa(m),m=m===m?m:0),Lu(qa(c),m,C)}function SJ(c,m,C){return m=Du(m),C===n?(C=m,m=0):C=Du(C),c=qa(c),om(c,m,C)}function xJ(c,m,C){if(C&&typeof C!="boolean"&&vo(c,m,C)&&(m=C=n),C===n&&(typeof m=="boolean"?(C=m,m=n):typeof c=="boolean"&&(C=c,c=n)),c===n&&m===n?(c=0,m=1):(c=Du(c),m===n?(m=c,c=0):m=Du(m)),c>m){var O=c;c=m,m=O}if(C||c%1||m%1){var B=u1();return fi(c+B*(m-c+me("1e-"+((B+"").length-1))),m)}return qf(c,m)}var wJ=Pl(function(c,m,C){return m=m.toLowerCase(),c+(C?vL(m):m)});function vL(c){return zw(An(c).toLowerCase())}function yL(c){return c=An(c),c&&c.replace(q0,n3).replace(Rp,"")}function CJ(c,m,C){c=An(c),m=mo(m);var O=c.length;C=C===n?O:Lu(Vt(C),0,O);var B=C;return C-=m.length,C>=0&&c.slice(C,B)==m}function _J(c){return c=An(c),c&&Ba.test(c)?c.replace(il,Ss):c}function kJ(c){return c=An(c),c&&N0.test(c)?c.replace(vf,"\\$&"):c}var EJ=Pl(function(c,m,C){return c+(C?"-":"")+m.toLowerCase()}),PJ=Pl(function(c,m,C){return c+(C?" ":"")+m.toLowerCase()}),TJ=bm("toLowerCase");function LJ(c,m,C){c=An(c),m=Vt(m);var O=m?Ha(c):0;if(!m||O>=m)return c;var B=(m-O)/2;return f(Pu(B),C)+c+f(Ff(B),C)}function AJ(c,m,C){c=An(c),m=Vt(m);var O=m?Ha(c):0;return m&&O<m?c+f(m-O,C):c}function OJ(c,m,C){c=An(c),m=Vt(m);var O=m?Ha(c):0;return m&&O<m?f(m-O,C)+c:c}function MJ(c,m,C){return C||m==null?m=0:m&&(m=+m),h3(An(c).replace(Sc,""),m||0)}function IJ(c,m,C){return(C?vo(c,m,C):m===n)?m=1:m=Vt(m),td(An(c),m)}function RJ(){var c=arguments,m=An(c[0]);return c.length<3?m:m.replace(c[1],c[2])}var DJ=Pl(function(c,m,C){return c+(C?"_":"")+m.toLowerCase()});function NJ(c,m,C){return C&&typeof C!="number"&&vo(c,m,C)&&(m=C=n),C=C===n?de:C>>>0,C?(c=An(c),c&&(typeof m=="string"||m!=null&&!Bw(m))&&(m=mo(m),!m&&ku(c))?Es(Zi(c),0,C):c.split(m,C)):[]}var jJ=Pl(function(c,m,C){return c+(C?" ":"")+zw(m)});function BJ(c,m,C){return c=An(c),C=C==null?0:Lu(Vt(C),0,c.length),m=mo(m),c.slice(C,C+m.length)==m}function $J(c,m,C){var O=z.templateSettings;C&&vo(c,m,C)&&(m=n),c=An(c),m=B3({},m,O,ze);var B=B3({},m.imports,O.imports,ze),V=Ei(B),J=Mf(B,V),ne,ce,_e=0,Te=m.interpolate||al,Re="__p += '",tt=Df((m.escape||al).source+"|"+Te.source+"|"+(Te===bc?z0:al).source+"|"+(m.evaluate||al).source+"|$","g"),bt="//# sourceURL="+(un.call(m,"sourceURL")?(m.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Np+"]")+`
|
||
`;c.replace(tt,function(Tt,Qt,on,Sa,yo,xa){return on||(on=Sa),Re+=c.slice(_e,xa).replace(Y0,pl),Qt&&(ne=!0,Re+=`' +
|
||
__e(`+Qt+`) +
|
||
'`),yo&&(ce=!0,Re+=`';
|
||
`+yo+`;
|
||
__p += '`),on&&(Re+=`' +
|
||
((__t = (`+on+`)) == null ? '' : __t) +
|
||
'`),_e=xa+Tt.length,Tt}),Re+=`';
|
||
`;var Pt=un.call(m,"variable")&&m.variable;if(!Pt)Re=`with (obj) {
|
||
`+Re+`
|
||
}
|
||
`;else if($0.test(Pt))throw new It(s);Re=(ce?Re.replace(nn,""):Re).replace(pr,"$1").replace(Mo,"$1;"),Re="function("+(Pt||"obj")+`) {
|
||
`+(Pt?"":`obj || (obj = {});
|
||
`)+"var __t, __p = ''"+(ne?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
|
||
function print() { __p += __j.call(arguments, '') }
|
||
`:`;
|
||
`)+Re+`return __p
|
||
}`;var qt=SL(function(){return rn(V,bt+"return "+Re).apply(n,J)});if(qt.source=Re,jw(qt))throw qt;return qt}function FJ(c){return An(c).toLowerCase()}function zJ(c){return An(c).toUpperCase()}function HJ(c,m,C){if(c=An(c),c&&(C||m===n))return fo(c);if(!c||!(m=mo(m)))return c;var O=Zi(c),B=Zi(m),V=ca(O,B),J=bs(O,B)+1;return Es(O,V,J).join("")}function VJ(c,m,C){if(c=An(c),c&&(C||m===n))return c.slice(0,n1(c)+1);if(!c||!(m=mo(m)))return c;var O=Zi(c),B=bs(O,Zi(m))+1;return Es(O,0,B).join("")}function WJ(c,m,C){if(c=An(c),c&&(C||m===n))return c.replace(Sc,"");if(!c||!(m=mo(m)))return c;var O=Zi(c),B=ca(O,Zi(m));return Es(O,B).join("")}function UJ(c,m){var C=H,O=K;if(Cr(m)){var B="separator"in m?m.separator:B;C="length"in m?Vt(m.length):C,O="omission"in m?mo(m.omission):O}c=An(c);var V=c.length;if(ku(c)){var J=Zi(c);V=J.length}if(C>=V)return c;var ne=C-Ha(O);if(ne<1)return O;var ce=J?Es(J,0,ne).join(""):c.slice(0,ne);if(B===n)return ce+O;if(J&&(ne+=ce.length-ne),Bw(B)){if(c.slice(ne).search(B)){var _e,Te=ce;for(B.global||(B=Df(B.source,An(ms.exec(B))+"g")),B.lastIndex=0;_e=B.exec(Te);)var Re=_e.index;ce=ce.slice(0,Re===n?ne:Re)}}else if(c.indexOf(mo(B),ne)!=ne){var tt=ce.lastIndexOf(B);tt>-1&&(ce=ce.slice(0,tt))}return ce+O}function GJ(c){return c=An(c),c&&R0.test(c)?c.replace(Mi,a3):c}var qJ=Pl(function(c,m,C){return c+(C?" ":"")+m.toUpperCase()}),zw=bm("toUpperCase");function bL(c,m,C){return c=An(c),m=C?n:m,m===n?zp(c)?Rf(c):J0(c):c.match(m)||[]}var SL=Ot(function(c,m){try{return Ri(c,n,m)}catch(C){return jw(C)?C:new It(C)}}),YJ=gr(function(c,m){return Xn(m,function(C){C=Tl(C),pa(c,C,Dw(c[C],c))}),c});function KJ(c){var m=c==null?0:c.length,C=Me();return c=m?Un(c,function(O){if(typeof O[1]!="function")throw new Di(a);return[C(O[0]),O[1]]}):[],Ot(function(O){for(var B=-1;++B<m;){var V=c[B];if(Ri(V[0],this,O))return Ri(V[1],this,O)}})}function XJ(c){return Zp(wi(c,h))}function Hw(c){return function(){return c}}function ZJ(c,m){return c==null||c!==c?m:c}var QJ=N1(),JJ=N1(!0);function Wo(c){return c}function Vw(c){return wr(typeof c=="function"?c:wi(c,h))}function eee(c){return Jc(wi(c,h))}function tee(c,m){return Sl(c,wi(m,h))}var nee=Ot(function(c,m){return function(C){return _s(C,c,m)}}),ree=Ot(function(c,m){return function(C){return _s(c,C,m)}});function Ww(c,m,C){var O=Ei(m),B=tm(m,O);C==null&&!(Cr(m)&&(B.length||!O.length))&&(C=m,m=c,c=this,B=tm(m,Ei(m)));var V=!(Cr(C)&&"chain"in C)||!!C.chain,J=Ru(c);return Xn(B,function(ne){var ce=m[ne];c[ne]=ce,J&&(c.prototype[ne]=function(){var _e=this.__chain__;if(V||_e){var Te=c(this.__wrapped__),Re=Te.__actions__=Fi(this.__actions__);return Re.push({func:ce,args:arguments,thisArg:c}),Te.__chain__=_e,Te}return ce.apply(c,za([this.value()],arguments))})}),c}function iee(){return kt._===this&&(kt._=i1),this}function Uw(){}function oee(c){return c=Vt(c),Ot(function(m){return ed(m,c)})}var aee=j1(Un),see=j1(Wn),lee=j1(Tc);function xL(c){return Lw(c)?hl(Tl(c)):ks(c)}function uee(c){return function(m){return c==null?n:yl(c,m)}}var cee=x(),dee=x(!0);function Gw(){return[]}function qw(){return!1}function fee(){return{}}function hee(){return""}function pee(){return!0}function mee(c,m){if(c=Vt(c),c<1||c>W)return[];var C=de,O=fi(c,de);m=Me(m),c-=de;for(var B=Of(O,m);++C<c;)m(C);return B}function gee(c){return Ft(c)?Un(c,Tl):ba(c)?[c]:Fi(zT(An(c)))}function vee(c){var m=++Nf;return An(c)+m}var yee=Sm(function(c,m){return c+m},0),bee=I("ceil"),See=Sm(function(c,m){return c/m},1),xee=I("floor");function wee(c){return c&&c.length?Nr(c,Wo,nm):n}function Cee(c,m){return c&&c.length?Nr(c,Me(m,2),nm):n}function _ee(c){return Tf(c,Wo)}function kee(c,m){return Tf(c,Me(m,2))}function Eee(c){return c&&c.length?Nr(c,Wo,bl):n}function Pee(c,m){return c&&c.length?Nr(c,Me(m,2),bl):n}var Tee=Sm(function(c,m){return c*m},1),Lee=I("round"),Aee=Sm(function(c,m){return c-m},0);function Oee(c){return c&&c.length?Af(c,Wo):0}function Mee(c,m){return c&&c.length?Af(c,Me(m,2)):0}return z.after=eQ,z.ary=QT,z.assign=zQ,z.assignIn=fL,z.assignInWith=B3,z.assignWith=HQ,z.at=VQ,z.before=JT,z.bind=Dw,z.bindAll=YJ,z.bindKey=eL,z.castArray=fQ,z.chain=KT,z.chunk=xX,z.compact=wX,z.concat=CX,z.cond=KJ,z.conforms=XJ,z.constant=Hw,z.countBy=OZ,z.create=WQ,z.curry=tL,z.curryRight=nL,z.debounce=rL,z.defaults=UQ,z.defaultsDeep=GQ,z.defer=tQ,z.delay=nQ,z.difference=_X,z.differenceBy=kX,z.differenceWith=EX,z.drop=PX,z.dropRight=TX,z.dropRightWhile=LX,z.dropWhile=AX,z.fill=OX,z.filter=IZ,z.flatMap=NZ,z.flatMapDeep=jZ,z.flatMapDepth=BZ,z.flatten=UT,z.flattenDeep=MX,z.flattenDepth=IX,z.flip=rQ,z.flow=QJ,z.flowRight=JJ,z.fromPairs=RX,z.functions=JQ,z.functionsIn=eJ,z.groupBy=$Z,z.initial=NX,z.intersection=jX,z.intersectionBy=BX,z.intersectionWith=$X,z.invert=nJ,z.invertBy=rJ,z.invokeMap=zZ,z.iteratee=Vw,z.keyBy=HZ,z.keys=Ei,z.keysIn=Vo,z.map=M3,z.mapKeys=oJ,z.mapValues=aJ,z.matches=eee,z.matchesProperty=tee,z.memoize=R3,z.merge=sJ,z.mergeWith=hL,z.method=nee,z.methodOf=ree,z.mixin=Ww,z.negate=D3,z.nthArg=oee,z.omit=lJ,z.omitBy=uJ,z.once=iQ,z.orderBy=VZ,z.over=aee,z.overArgs=oQ,z.overEvery=see,z.overSome=lee,z.partial=Nw,z.partialRight=iL,z.partition=WZ,z.pick=cJ,z.pickBy=pL,z.property=xL,z.propertyOf=uee,z.pull=VX,z.pullAll=qT,z.pullAllBy=WX,z.pullAllWith=UX,z.pullAt=GX,z.range=cee,z.rangeRight=dee,z.rearg=aQ,z.reject=qZ,z.remove=qX,z.rest=sQ,z.reverse=Iw,z.sampleSize=KZ,z.set=fJ,z.setWith=hJ,z.shuffle=XZ,z.slice=YX,z.sortBy=JZ,z.sortedUniq=tZ,z.sortedUniqBy=nZ,z.split=NJ,z.spread=lQ,z.tail=rZ,z.take=iZ,z.takeRight=oZ,z.takeRightWhile=aZ,z.takeWhile=sZ,z.tap=wZ,z.throttle=uQ,z.thru=O3,z.toArray=uL,z.toPairs=mL,z.toPairsIn=gL,z.toPath=gee,z.toPlainObject=dL,z.transform=pJ,z.unary=cQ,z.union=lZ,z.unionBy=uZ,z.unionWith=cZ,z.uniq=dZ,z.uniqBy=fZ,z.uniqWith=hZ,z.unset=mJ,z.unzip=Rw,z.unzipWith=YT,z.update=gJ,z.updateWith=vJ,z.values=wm,z.valuesIn=yJ,z.without=pZ,z.words=bL,z.wrap=dQ,z.xor=mZ,z.xorBy=gZ,z.xorWith=vZ,z.zip=yZ,z.zipObject=bZ,z.zipObjectDeep=SZ,z.zipWith=xZ,z.entries=mL,z.entriesIn=gL,z.extend=fL,z.extendWith=B3,Ww(z,z),z.add=yee,z.attempt=SL,z.camelCase=wJ,z.capitalize=vL,z.ceil=bee,z.clamp=bJ,z.clone=hQ,z.cloneDeep=mQ,z.cloneDeepWith=gQ,z.cloneWith=pQ,z.conformsTo=vQ,z.deburr=yL,z.defaultTo=ZJ,z.divide=See,z.endsWith=CJ,z.eq=Ts,z.escape=_J,z.escapeRegExp=kJ,z.every=MZ,z.find=RZ,z.findIndex=VT,z.findKey=qQ,z.findLast=DZ,z.findLastIndex=WT,z.findLastKey=YQ,z.floor=xee,z.forEach=XT,z.forEachRight=ZT,z.forIn=KQ,z.forInRight=XQ,z.forOwn=ZQ,z.forOwnRight=QQ,z.get=$w,z.gt=yQ,z.gte=bQ,z.has=tJ,z.hasIn=Fw,z.head=GT,z.identity=Wo,z.includes=FZ,z.indexOf=DX,z.inRange=SJ,z.invoke=iJ,z.isArguments=nh,z.isArray=Ft,z.isArrayBuffer=SQ,z.isArrayLike=Ho,z.isArrayLikeObject=Yr,z.isBoolean=xQ,z.isBuffer=id,z.isDate=wQ,z.isElement=CQ,z.isEmpty=_Q,z.isEqual=kQ,z.isEqualWith=EQ,z.isError=jw,z.isFinite=PQ,z.isFunction=Ru,z.isInteger=oL,z.isLength=N3,z.isMap=aL,z.isMatch=TQ,z.isMatchWith=LQ,z.isNaN=AQ,z.isNative=OQ,z.isNil=IQ,z.isNull=MQ,z.isNumber=sL,z.isObject=Cr,z.isObjectLike=Br,z.isPlainObject=F1,z.isRegExp=Bw,z.isSafeInteger=RQ,z.isSet=lL,z.isString=j3,z.isSymbol=ba,z.isTypedArray=xm,z.isUndefined=DQ,z.isWeakMap=NQ,z.isWeakSet=jQ,z.join=FX,z.kebabCase=EJ,z.last=Ga,z.lastIndexOf=zX,z.lowerCase=PJ,z.lowerFirst=TJ,z.lt=BQ,z.lte=$Q,z.max=wee,z.maxBy=Cee,z.mean=_ee,z.meanBy=kee,z.min=Eee,z.minBy=Pee,z.stubArray=Gw,z.stubFalse=qw,z.stubObject=fee,z.stubString=hee,z.stubTrue=pee,z.multiply=Tee,z.nth=HX,z.noConflict=iee,z.noop=Uw,z.now=I3,z.pad=LJ,z.padEnd=AJ,z.padStart=OJ,z.parseInt=MJ,z.random=xJ,z.reduce=UZ,z.reduceRight=GZ,z.repeat=IJ,z.replace=RJ,z.result=dJ,z.round=Lee,z.runInContext=oe,z.sample=YZ,z.size=ZZ,z.snakeCase=DJ,z.some=QZ,z.sortedIndex=KX,z.sortedIndexBy=XX,z.sortedIndexOf=ZX,z.sortedLastIndex=QX,z.sortedLastIndexBy=JX,z.sortedLastIndexOf=eZ,z.startCase=jJ,z.startsWith=BJ,z.subtract=Aee,z.sum=Oee,z.sumBy=Mee,z.template=$J,z.times=mee,z.toFinite=Du,z.toInteger=Vt,z.toLength=cL,z.toLower=FJ,z.toNumber=qa,z.toSafeInteger=FQ,z.toString=An,z.toUpper=zJ,z.trim=HJ,z.trimEnd=VJ,z.trimStart=WJ,z.truncate=UJ,z.unescape=GJ,z.uniqueId=vee,z.upperCase=qJ,z.upperFirst=zw,z.each=XT,z.eachRight=ZT,z.first=GT,Ww(z,function(){var c={};return va(z,function(m,C){un.call(z.prototype,C)||(c[C]=m)}),c}(),{chain:!1}),z.VERSION=r,Xn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){z[c].placeholder=z}),Xn(["drop","take"],function(c,m){Zt.prototype[c]=function(C){C=C===n?1:Rr(Vt(C),0);var O=this.__filtered__&&!m?new Zt(this):this.clone();return O.__filtered__?O.__takeCount__=fi(C,O.__takeCount__):O.__views__.push({size:fi(C,de),type:c+(O.__dir__<0?"Right":"")}),O},Zt.prototype[c+"Right"]=function(C){return this.reverse()[c](C).reverse()}}),Xn(["filter","map","takeWhile"],function(c,m){var C=m+1,O=C==$||C==X;Zt.prototype[c]=function(B){var V=this.clone();return V.__iteratees__.push({iteratee:Me(B,3),type:C}),V.__filtered__=V.__filtered__||O,V}}),Xn(["head","last"],function(c,m){var C="take"+(m?"Right":"");Zt.prototype[c]=function(){return this[C](1).value()[0]}}),Xn(["initial","tail"],function(c,m){var C="drop"+(m?"":"Right");Zt.prototype[c]=function(){return this.__filtered__?new Zt(this):this[C](1)}}),Zt.prototype.compact=function(){return this.filter(Wo)},Zt.prototype.find=function(c){return this.filter(c).head()},Zt.prototype.findLast=function(c){return this.reverse().find(c)},Zt.prototype.invokeMap=Ot(function(c,m){return typeof c=="function"?new Zt(this):this.map(function(C){return _s(C,c,m)})}),Zt.prototype.reject=function(c){return this.filter(D3(Me(c)))},Zt.prototype.slice=function(c,m){c=Vt(c);var C=this;return C.__filtered__&&(c>0||m<0)?new Zt(C):(c<0?C=C.takeRight(-c):c&&(C=C.drop(c)),m!==n&&(m=Vt(m),C=m<0?C.dropRight(-m):C.take(m-c)),C)},Zt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Zt.prototype.toArray=function(){return this.take(de)},va(Zt.prototype,function(c,m){var C=/^(?:filter|find|map|reject)|While$/.test(m),O=/^(?:head|last)$/.test(m),B=z[O?"take"+(m=="last"?"Right":""):m],V=O||/^find/.test(m);B&&(z.prototype[m]=function(){var J=this.__wrapped__,ne=O?[1]:arguments,ce=J instanceof Zt,_e=ne[0],Te=ce||Ft(J),Re=function(Qt){var on=B.apply(z,za([Qt],ne));return O&&tt?on[0]:on};Te&&C&&typeof _e=="function"&&_e.length!=1&&(ce=Te=!1);var tt=this.__chain__,bt=!!this.__actions__.length,Pt=V&&!tt,qt=ce&&!bt;if(!V&&Te){J=qt?J:new Zt(this);var Tt=c.apply(J,ne);return Tt.__actions__.push({func:O3,args:[Re],thisArg:n}),new ho(Tt,tt)}return Pt&&qt?c.apply(this,ne):(Tt=this.thru(Re),Pt?O?Tt.value()[0]:Tt.value():Tt)})}),Xn(["pop","push","shift","sort","splice","unshift"],function(c){var m=Rc[c],C=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",O=/^(?:pop|shift)$/.test(c);z.prototype[c]=function(){var B=arguments;if(O&&!this.__chain__){var V=this.value();return m.apply(Ft(V)?V:[],B)}return this[C](function(J){return m.apply(Ft(J)?J:[],B)})}}),va(Zt.prototype,function(c,m){var C=z[m];if(C){var O=C.name+"";un.call(xs,O)||(xs[O]=[]),xs[O].push({name:m,func:C})}}),xs[Jf(n,_).name]=[{name:"wrapper",func:n}],Zt.prototype.clone=Qi,Zt.prototype.reverse=ji,Zt.prototype.value=m3,z.prototype.at=CZ,z.prototype.chain=_Z,z.prototype.commit=kZ,z.prototype.next=EZ,z.prototype.plant=TZ,z.prototype.reverse=LZ,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=AZ,z.prototype.first=z.prototype.head,$c&&(z.prototype[$c]=PZ),z},Va=jo();Xt?((Xt.exports=Va)._=Va,Nt._=Va):kt._=Va}).call(Co)})(Zxe,ke);const Mm=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Im=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Qxe=.999,Jxe=.1,ewe=20,rv=.95,YI=30,m_=10,KI=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),oh=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a<i;)if(s+=64,t===n){r.width=512,r.height=512;break}else o>1?(r.width=s,r.height=ql(s/o,64)):o<1&&(r.height=s,r.width=ql(s*o,64)),a=r.width*r.height;return r},twe=e=>({width:ql(e.width,64),height:ql(e.height,64)}),iU=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],nwe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],pP=e=>e.kind==="line"&&e.layer==="mask",rwe=e=>e.kind==="line"&&e.layer==="base",Y5=e=>e.kind==="image"&&e.layer==="base",iwe=e=>e.kind==="fillRect"&&e.layer==="base",owe=e=>e.kind==="eraseRect"&&e.layer==="base",awe=e=>e.kind==="line",Ev={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},swe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:Ev,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},oU=fp({name:"canvas",initialState:swe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!pP(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:Pd(ke.clamp(n.width,64,512),64),height:Pd(ke.clamp(n.height,64,512),64)},o={x:ql(n.width/2-i.width/2,64),y:ql(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=oh(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.layerState={...Ev,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Im(r.width,r.height,n.width,n.height,rv),s=Mm(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=twe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=oh(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=KI(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...Ev.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(awe);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(ke.cloneDeep(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.layerState=Ev,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(Y5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const d=Im(i.width,i.height,512,512,rv),h=Mm(i.width,i.height,0,0,512,512,d),g={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=g,e.boundingBoxScaleMethod==="auto"){const v=oh(g);e.scaledBoundingBoxDimensions=v}return}const{width:o,height:a}=r,l=Im(t,n,o,a,.95),u=Mm(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=KI(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(Y5)){const i=Im(r.width,r.height,512,512,rv),o=Mm(r.width,r.height,0,0,512,512,i),a={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=a,e.boundingBoxScaleMethod==="auto"){const s=oh(a);e.scaledBoundingBoxDimensions=s}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:o}}=e,{x:a,y:s,width:l,height:u}=n;if(l!==0&&u!==0){const d=r?1:Im(i,o,l,u,rv),h=Mm(i,o,a,s,l,u,d);e.stageScale=d,e.stageCoordinates=h}else{const d=Im(i,o,512,512,rv),h=Mm(i,o,0,0,512,512,d),g={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=g,e.boundingBoxScaleMethod==="auto"){const v=oh(g);e.scaledBoundingBoxDimensions=v}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...Ev.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:Pd(ke.clamp(o,64,512),64),height:Pd(ke.clamp(a,64,512),64)},l={x:ql(o/2-s.width/2,64),y:ql(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=oh(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=oh(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(ke.cloneDeep(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}}}),{addEraseRect:aU,addFillRect:sU,addImageToStagingArea:lwe,addLine:uwe,addPointToCurrentLine:lU,clearCanvasHistory:uU,clearMask:mP,commitColorPickerColor:cwe,commitStagingAreaImage:dwe,discardStagedImages:fwe,fitBoundingBoxToStage:Xze,mouseLeftCanvas:hwe,nextStagingAreaImage:pwe,prevStagingAreaImage:mwe,redo:gwe,resetCanvas:gP,resetCanvasInteractionState:vwe,resetCanvasView:cU,resizeAndScaleCanvas:Bx,resizeCanvas:ywe,setBoundingBoxCoordinates:wC,setBoundingBoxDimensions:Pv,setBoundingBoxPreviewFill:Zze,setBoundingBoxScaleMethod:bwe,setBrushColor:Bg,setBrushSize:$g,setCanvasContainerDimensions:Swe,setColorPickerColor:xwe,setCursorPosition:wwe,setDoesCanvasNeedScaling:vi,setInitialCanvasImage:$x,setIsDrawing:dU,setIsMaskEnabled:By,setIsMouseOverBoundingBox:Eb,setIsMoveBoundingBoxKeyHeld:Qze,setIsMoveStageKeyHeld:Jze,setIsMovingBoundingBox:CC,setIsMovingStage:K5,setIsTransformingBoundingBox:_C,setLayer:X5,setMaskColor:fU,setMergedCanvas:Cwe,setShouldAutoSave:hU,setShouldCropToBoundingBoxOnSave:pU,setShouldDarkenOutsideBoundingBox:mU,setShouldLockBoundingBox:eHe,setShouldPreserveMaskedArea:gU,setShouldShowBoundingBox:_we,setShouldShowBrush:tHe,setShouldShowBrushPreview:nHe,setShouldShowCanvasDebugInfo:vU,setShouldShowCheckboardTransparency:rHe,setShouldShowGrid:yU,setShouldShowIntermediates:bU,setShouldShowStagingImage:kwe,setShouldShowStagingOutline:XI,setShouldSnapToGrid:Z5,setStageCoordinates:SU,setStageScale:Ewe,setTool:nu,toggleShouldLockBoundingBox:iHe,toggleTool:oHe,undo:Pwe,setScaledBoundingBoxDimensions:Pb,setShouldRestrictStrokesToBox:xU}=oU.actions,Twe=oU.reducer,Lwe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},wU=fp({name:"gallery",initialState:Lwe,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=ke.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r<n.length-1){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:ug,clearIntermediateImage:kC,removeImage:CU,setCurrentImage:ZI,addGalleryImages:Awe,setIntermediateImage:Owe,selectNextImage:vP,selectPrevImage:yP,setShouldPinGallery:Mwe,setShouldShowGallery:$d,setGalleryScrollPosition:Iwe,setGalleryImageMinimumWidth:iv,setGalleryImageObjectFit:Rwe,setShouldHoldGalleryOpen:_U,setShouldAutoSwitchToNewImages:Dwe,setCurrentCategory:Tb,setGalleryWidth:Nwe,setShouldUseSingleGalleryColumn:jwe}=wU.actions,Bwe=wU.reducer,$we={isLightboxOpen:!1},Fwe=$we,kU=fp({name:"lightbox",initialState:Fwe,reducers:{setIsLightboxOpen:(e,t)=>{e.isLightboxOpen=t.payload}}}),{setIsLightboxOpen:Fg}=kU.actions,zwe=kU.reducer,o2=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" ");function bP(e){let t=o2(e),n=null;const r=new RegExp(/\[([^\][]*)]/,"gi"),i=[...t.matchAll(r)].map(o=>o[1]);return i.length&&(n=i.join(" "),i.forEach(o=>{t=t.replace(`[${o}]`,"").replaceAll("[]","").trim()})),[t,n]}const Hwe=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return SP(r)?r:!1},SP=e=>Boolean(typeof e=="string"?Hwe(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)})),Q5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Vwe=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0],10),parseFloat(r[1])]),EU={cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,maskPath:"",perlin:0,prompt:"",negativePrompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:30,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,tileSize:32,variationAmount:.1,width:512},Wwe=EU,PU=fp({name:"generation",initialState:Wwe,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=o2(n)},setNegativePrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.negativePrompt=n:e.negativePrompt=o2(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},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:d,hires_fix:h,width:g,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=Q5(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=o2(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),typeof l>"u"?e.threshold=0:e.threshold=l,typeof u>"u"?e.perlin=0:e.perlin=u,typeof d=="boolean"&&(e.seamless=d),g&&(e.width=g),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:d,seamless:h,hires_fix:g,width:v,height:b,strength:S,fit:E,init_image_path:_,mask_image_path:k}=t.payload.image;if(n==="img2img"&&(_&&(e.initialImage=_),k&&(e.maskPath=k),S&&(e.img2imgStrength=S),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=Q5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i){const[T,A]=bP(i);T&&(e.prompt=T),A?e.negativePrompt=A:e.negativePrompt=""}r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),typeof u>"u"?e.threshold=0:e.threshold=u,typeof d>"u"?e.perlin=0:e.perlin=d,typeof h=="boolean"&&(e.seamless=h),v&&(e.width=v),b&&(e.height=b)},resetParametersState:e=>({...e,...EU}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:TU,resetParametersState:aHe,resetSeed:sHe,setAllImageToImageParameters:Uwe,setAllParameters:LU,setAllTextToImageParameters:lHe,setCfgScale:AU,setHeight:OU,setImg2imgStrength:g_,setInfillMethod:MU,setInitialImage:E0,setIterations:Gwe,setMaskPath:IU,setParameter:uHe,setPerlin:RU,setPrompt:Fx,setNegativePrompt:J2,setSampler:DU,setSeamBlur:QI,setSeamless:NU,setSeamSize:JI,setSeamSteps:eR,setSeamStrength:tR,setSeed:$y,setSeedWeights:jU,setShouldFitToWidthHeight:BU,setShouldGenerateVariations:qwe,setShouldRandomizeSeed:Ywe,setSteps:$U,setThreshold:FU,setTileSize:nR,setVariationAmount:Kwe,setWidth:zU}=PU.actions,Xwe=PU.reducer,HU={codeformerFidelity:.75,facetoolStrength:.8,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingDenoising:.75,upscalingStrength:.75},Zwe=HU,VU=fp({name:"postprocessing",initialState:Zwe,reducers:{setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingDenoising:(e,t)=>{e.upscalingDenoising=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setHiresStrength:(e,t)=>{e.hiresStrength=t.payload},resetPostprocessingState:e=>({...e,...HU}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload}}}),{resetPostprocessingState:cHe,setCodeformerFidelity:WU,setFacetoolStrength:v_,setFacetoolType:N4,setHiresFix:xP,setHiresStrength:rR,setShouldLoopback:Qwe,setShouldRunESRGAN:Jwe,setShouldRunFacetool:e6e,setUpscalingLevel:UU,setUpscalingDenoising:y_,setUpscalingStrength:b_}=VU.actions,t6e=VU.reducer;function Xs(e){return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xs(e)}function pu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n6e(e,t){if(Xs(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GU(e){var t=n6e(e,"string");return Xs(t)==="symbol"?t:String(t)}function iR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,GU(r.key),r)}}function mu(e,t,n){return t&&iR(e.prototype,t),n&&iR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S_(e,t){return S_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},S_(e,t)}function zx(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S_(e,t)}function Fy(e,t){if(t&&(Xs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fd(e)}function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uu(e)}function cf(e,t,n){return t=GU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r6e(e){if(Array.isArray(e))return e}function i6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o6e(e,t){if(e){if(typeof e=="string")return oR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oR(e,t)}}function a6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s6e(e){return r6e(e)||i6e(e)||o6e(e)||a6e()}function aR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aR(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var l6e={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},u6e=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pu(this,e),this.init(t,n)}return mu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||l6e,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,o){return o&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,sR(sR({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Yl=new u6e,Qd=function(){function e(){pu(this,e),this.observers={}}return mu(e,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.observers[n]){var a=[].concat(this.observers[n]);a.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),e}();function ov(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}function lR(e){return e==null?"":""+e}function c6e(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function wP(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function uR(e,t,n){var r=wP(e,t,Object),i=r.obj,o=r.k;i[o]=n}function d6e(e,t,n,r){var i=wP(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}function J5(e,t){var n=wP(e,t),r=n.obj,i=n.k;if(r)return r[i]}function cR(e,t,n){var r=J5(e,n);return r!==void 0?r:J5(t,n)}function qU(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):qU(e[r],t[r],n):e[r]=t[r]);return e}function Rm(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var f6e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function h6e(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return f6e[t]}):e}var Hx=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,p6e=[" ",",","?","!",";"];function m6e(e,t,n){t=t||"",n=n||"";var r=p6e.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function dR(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 Lb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dR(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g6e(e){var t=v6e();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Fy(this,i)}}function v6e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function YU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];l===void 0&&r.length>o+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=r.slice(o+a).join(n);return u?YU(l,u,n):void 0}i=i[r[o]]}return i}}var y6e=function(e){zx(n,e);var t=g6e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return pu(this,n),i=t.call(this),Hx&&Qd.call(Fd(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return mu(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,d=[i,o];a&&typeof a!="string"&&(d=d.concat(a)),a&&typeof a=="string"&&(d=d.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(d=i.split("."));var h=J5(this.data,d);return h||!u||typeof a!="string"?h:YU(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var d=[i,o];a&&(d=d.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(d=i.split("."),s=o,o=d[1]),this.addNamespaces(o),uR(this.data,d,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[i,o];i.indexOf(".")>-1&&(d=i.split("."),s=a,a=o,o=d[1]),this.addNamespaces(o);var h=J5(this.data,d)||{};s?qU(h,a,l):h=Lb(Lb({},h),a),uR(this.data,d,h),u.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Lb(Lb({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Qd),KU={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,i,o))}),n}};function fR(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 So(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fR(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b6e(e){var t=S6e();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Fy(this,i)}}function S6e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var hR={},pR=function(e){zx(n,e);var t=b6e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return pu(this,n),i=t.call(this),Hx&&Qd.call(Fd(i)),c6e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Fd(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Yl.create("translator"),i}return mu(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!m6e(i,a,s);if(u&&!d){var h=i.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:i,namespaces:l};var g=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(g[0])>-1)&&(l=g.shift()),i=g.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(Xs(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,d=this.extractFromKey(i[i.length-1],o),h=d.key,g=d.namespaces,v=g[g.length-1],b=o.lng||this.language,S=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b&&b.toLowerCase()==="cimode"){if(S){var E=o.nsSeparator||this.options.nsSeparator;return l?(_.res="".concat(v).concat(E).concat(h),_):"".concat(v).concat(E).concat(h)}return l?(_.res=h,_):h}var _=this.resolve(i,o),k=_&&_.res,T=_&&_.usedKey||h,A=_&&_.exactUsedKey||h,M=Object.prototype.toString.apply(k),R=["[object Number]","[object Function]","[object RegExp]"],D=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,F=typeof k!="string"&&typeof k!="boolean"&&typeof k!="number";if(j&&k&&F&&R.indexOf(M)<0&&!(typeof D=="string"&&M==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var H=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,k,So(So({},o),{},{ns:g})):"key '".concat(h," (").concat(this.language,")' returned an object instead of string.");return l?(_.res=H,_):H}if(u){var K=M==="[object Array]",te=K?[]:{},G=K?A:T;for(var $ in k)if(Object.prototype.hasOwnProperty.call(k,$)){var U="".concat(G).concat(u).concat($);te[$]=this.translate(U,So(So({},o),{joinArrays:!1,ns:g})),te[$]===U&&(te[$]=k[$])}k=te}}else if(j&&typeof D=="string"&&M==="[object Array]")k=k.join(D),k&&(k=this.extendTranslation(k,i,o,a));else{var X=!1,Z=!1,W=o.count!==void 0&&typeof o.count!="string",Q=n.hasDefaultValue(o),re=W?this.pluralResolver.getSuffix(b,o.count,o):"",de=o["defaultValue".concat(re)]||o.defaultValue;!this.isValidLookup(k)&&Q&&(X=!0,k=de),this.isValidLookup(k)||(Z=!0,k=h);var ve=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Pe=ve&&Z?void 0:k,be=Q&&de!==k&&this.options.updateMissing;if(Z||X||be){if(this.logger.log(be?"updateKey":"missingKey",b,v,h,be?de:k),u){var He=this.resolve(h,So(So({},o),{},{keySeparator:!1}));He&&He.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var Oe=[],ot=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ot&&ot[0])for(var Ve=0;Ve<ot.length;Ve++)Oe.push(ot[Ve]);else this.options.saveMissingTo==="all"?Oe=this.languageUtils.toResolveHierarchy(o.lng||this.language):Oe.push(o.lng||this.language);var Be=function(st,gt,St){var Ae=Q&&St!==k?St:Pe;s.options.missingKeyHandler?s.options.missingKeyHandler(st,v,gt,Ae,be,o):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(st,v,gt,Ae,be,o),s.emit("missingKey",st,v,gt,k)};this.options.saveMissing&&(this.options.saveMissingPlurals&&W?Oe.forEach(function(wt){s.pluralResolver.getSuffixes(wt,o).forEach(function(st){Be([wt],h+st,o["defaultValue".concat(st)]||de)})}):Be(Oe,h,de))}k=this.extendTranslation(k,i,o,_,a),Z&&k===h&&this.options.appendNamespaceToMissingKey&&(k="".concat(v,":").concat(h)),(Z||X)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?k=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(v,":").concat(h):h,X?k:void 0):k=this.options.parseMissingKeyHandler(k))}return l?(_.res=k,_):k}},{key:"extendTranslation",value:function(i,o,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,So(So({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(So(So({},a),{interpolation:So(So({},this.options.interpolation),a.interpolation)}));var d=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),h;if(d){var g=i.match(this.interpolator.nestingRegexp);h=g&&g.length}var v=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(v=So(So({},this.options.interpolation.defaultVariables),v)),i=this.interpolator.interpolate(i,v,a.lng||this.language,a),d){var b=i.match(this.interpolator.nestingRegexp),S=b&&b.length;h<S&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var k=arguments.length,T=new Array(k),A=0;A<k;A++)T[A]=arguments[A];return l&&l[0]===T[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(T[0]," in key: ").concat(o[0])),null):u.translate.apply(u,T.concat([o]))},a)),a.interpolation&&this.interpolator.reset()}var E=a.postProcess||this.options.postProcess,_=typeof E=="string"?[E]:E;return i!=null&&_&&_.length&&a.applyPostProcessor!==!1&&(i=KU.handle(_,i,o,this.options&&this.options.postProcessPassResolved?So({i18nResolved:s},a):a,this)),i}},{key:"resolve",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,d,h;return typeof i=="string"&&(i=[i]),i.forEach(function(g){if(!o.isValidLookup(s)){var v=o.extractFromKey(g,a),b=v.key;l=b;var S=v.namespaces;o.options.fallbackNS&&(S=S.concat(o.options.fallbackNS));var E=a.count!==void 0&&typeof a.count!="string",_=E&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),k=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",T=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);S.forEach(function(A){o.isValidLookup(s)||(h=A,!hR["".concat(T[0],"-").concat(A)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(h)&&(hR["".concat(T[0],"-").concat(A)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(T.join(", "),`" won't get resolved as namespace "`).concat(h,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(function(M){if(!o.isValidLookup(s)){d=M;var R=[b];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(R,b,M,A,a);else{var D;E&&(D=o.pluralResolver.getSuffix(M,a.count,a));var j="".concat(o.options.pluralSeparator,"zero");if(E&&(R.push(b+D),_&&R.push(b+j)),k){var F="".concat(b).concat(o.options.contextSeparator).concat(a.context);R.push(F),E&&(R.push(F+D),_&&R.push(F+j))}}for(var H;H=R.pop();)o.isValidLookup(s)||(u=H,s=o.getResource(M,A,H,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:d,usedNS:h}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),n}(Qd);function EC(e){return e.charAt(0).toUpperCase()+e.slice(1)}var mR=function(){function e(t){pu(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yl.create("languageUtils")}return mu(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=EC(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=EC(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=EC(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var a=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var a=r.getLanguagePartFromCode(o);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){u&&(i.isSupportedCode(u)?a.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),x6e=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],w6e={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},C6e=["v1","v2","v3"],gR={zero:0,one:1,two:2,few:3,many:4,other:5};function _6e(){var e={};return x6e.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:w6e[t.fc]}})}),e}var k6e=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pu(this,e),this.languageUtils=t,this.options=n,this.logger=Yl.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=_6e()}return mu(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return gR[a]-gR[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):o.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!C6e.includes(this.options.compatibilityJSON)}}]),e}();function vR(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 Rs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vR(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var E6e=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pu(this,e),this.logger=Yl.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return mu(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:h6e,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Rm(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Rm(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Rm(r.nestingPrefix):r.nestingPrefixEscaped||Rm("$t("),this.nestingSuffix=r.nestingSuffix?Rm(r.nestingSuffix):r.nestingSuffixEscaped||Rm(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var a=this,s,l,u,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function h(E){return E.replace(/\$/g,"$$$$")}var g=function(_){if(_.indexOf(a.formatSeparator)<0){var k=cR(r,d,_);return a.alwaysFormat?a.format(k,void 0,i,Rs(Rs(Rs({},o),r),{},{interpolationkey:_})):k}var T=_.split(a.formatSeparator),A=T.shift().trim(),M=T.join(a.formatSeparator).trim();return a.format(cR(r,d,A),M,i,Rs(Rs(Rs({},o),r),{},{interpolationkey:A}))};this.resetRegExp();var v=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,b=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,S=[{regex:this.regexpUnescape,safeValue:function(_){return h(_)}},{regex:this.regexp,safeValue:function(_){return a.escapeValue?h(a.escape(_)):h(_)}}];return S.forEach(function(E){for(u=0;s=E.regex.exec(n);){var _=s[1].trim();if(l=g(_),l===void 0)if(typeof v=="function"){var k=v(n,s,o);l=typeof k=="string"?k:""}else if(o&&o.hasOwnProperty(_))l="";else if(b){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(_," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=lR(l));var T=E.safeValue(l);if(n=n.replace(s[0],T),b?(E.regex.lastIndex+=l.length,E.regex.lastIndex-=s[0].length):E.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(v,b){var S=this.nestingOptionsSeparator;if(v.indexOf(S)<0)return v;var E=v.split(new RegExp("".concat(S,"[ ]*{"))),_="{".concat(E[1]);v=E[0],_=this.interpolate(_,l);var k=_.match(/'/g),T=_.match(/"/g);(k&&k.length%2===0&&!T||T.length%2!==0)&&(_=_.replace(/'/g,'"'));try{l=JSON.parse(_),b&&(l=Rs(Rs({},b),l))}catch(A){return this.logger.warn("failed parsing options string in nesting for key ".concat(v),A),"".concat(v).concat(S).concat(_)}return delete l.defaultValue,v}for(;a=this.nestingRegexp.exec(n);){var d=[];l=Rs({},o),l.applyPostProcessor=!1,delete l.defaultValue;var h=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var g=a[1].split(this.formatSeparator).map(function(v){return v.trim()});a[1]=g.shift(),d=g,h=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=lR(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),h&&(s=d.reduce(function(v,b){return i.format(v,b,o.lng,Rs(Rs({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function yR(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 ud(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yR(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P6e(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(a){var s=a.split(":"),l=s6e(s),u=l[0],d=l.slice(1),h=d.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=h),h==="false"&&(n[u.trim()]=!1),h==="true"&&(n[u.trim()]=!0),isNaN(h)||(n[u.trim()]=parseInt(h,10))}})}}return{formatName:t,formatOptions:n}}function Dm(e){var t={};return function(r,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(r)}}var T6e=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pu(this,e),this.logger=Yl.create("formatter"),this.options=t,this.formats={number:Dm(function(n,r){var i=new Intl.NumberFormat(n,r);return function(o){return i.format(o)}}),currency:Dm(function(n,r){var i=new Intl.NumberFormat(n,ud(ud({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:Dm(function(n,r){var i=new Intl.DateTimeFormat(n,ud({},r));return function(o){return i.format(o)}}),relativetime:Dm(function(n,r){var i=new Intl.RelativeTimeFormat(n,ud({},r));return function(o){return i.format(o,r.range||"day")}}),list:Dm(function(n,r){var i=new Intl.ListFormat(n,ud({},r));return function(o){return i.format(o)}})},this.init(t)}return mu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Dm(r)}},{key:"format",value:function(n,r,i,o){var a=this,s=r.split(this.formatSeparator),l=s.reduce(function(u,d){var h=P6e(d),g=h.formatName,v=h.formatOptions;if(a.formats[g]){var b=u;try{var S=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},E=S.locale||S.lng||o.locale||o.lng||i;b=a.formats[g](u,E,ud(ud(ud({},v),o),S))}catch(_){a.logger.warn(_)}return b}else a.logger.warn("there was no format function for ".concat(g));return u},n);return l}}]),e}();function bR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function SR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bR(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L6e(e){var t=A6e();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Fy(this,i)}}function A6e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function O6e(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var M6e=function(e){zx(n,e);var t=L6e(n);function n(r,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return pu(this,n),a=t.call(this),Hx&&Qd.call(Fd(a)),a.backend=r,a.store=i,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=Yl.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return mu(n,[{key:"queueLoad",value:function(i,o,a,s){var l=this,u={},d={},h={},g={};return i.forEach(function(v){var b=!0;o.forEach(function(S){var E="".concat(v,"|").concat(S);!a.reload&&l.store.hasResourceBundle(v,S)?l.state[E]=2:l.state[E]<0||(l.state[E]===1?d[E]===void 0&&(d[E]=!0):(l.state[E]=1,b=!1,d[E]===void 0&&(d[E]=!0),u[E]===void 0&&(u[E]=!0),g[S]===void 0&&(g[S]=!0)))}),b||(h[v]=!0)}),(Object.keys(u).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(g)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],u=s[1];o&&this.emit("failedLoading",l,u,o),a&&this.store.addResourceBundle(l,u,a),this.state[i]=o?-1:2;var d={};this.queue.forEach(function(h){d6e(h.loaded,[l],u),O6e(h,i),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(function(g){d[g]||(d[g]={});var v=h.loaded[g];v.length&&v.forEach(function(b){d[g][b]===void 0&&(d[g][b]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(h){return!h.done})}},{key:"read",value:function(i,o,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,d=arguments.length>5?arguments[5]:void 0;if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:u,callback:d});return}this.readingCalls++;var h=function(S,E){if(s.readingCalls--,s.waitingReads.length>0){var _=s.waitingReads.shift();s.read(_.lng,_.ns,_.fcName,_.tried,_.wait,_.callback)}if(S&&E&&l<s.maxRetries){setTimeout(function(){s.read.call(s,i,o,a,l+1,u*2,d)},u);return}d(S,E)},g=this.backend[a].bind(this.backend);if(g.length===2){try{var v=g(i,o);v&&typeof v.then=="function"?v.then(function(b){return h(null,b)}).catch(h):h(null,v)}catch(b){h(b)}return}return g(i,o,h)}},{key:"prepareLoading",value:function(i,o){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(d){a.loadOne(d)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(d,h){d&&o.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),d),!d&&h&&o.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),h),o.loaded(i,d,h)})}},{key:"saveMissing",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var h=SR(SR({},u),{},{isUpdate:l}),g=this.backend.create.bind(this.backend);if(g.length<6)try{var v;g.length===5?v=g(i,o,a,s,h):v=g(i,o,a,s),v&&typeof v.then=="function"?v.then(function(b){return d(null,b)}).catch(d):d(null,v)}catch(b){d(b)}else g(i,o,a,s,d,h)}!i||!i[0]||this.store.addResource(i[0],o,a,s)}}}]),n}(Qd);function xR(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Xs(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Xs(t[2])==="object"||Xs(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function wR(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function CR(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 Il(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CR(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I6e(e){var t=R6e();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Fy(this,i)}}function R6e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ab(){}function D6e(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var eS=function(e){zx(n,e);var t=I6e(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(pu(this,n),r=t.call(this),Hx&&Qd.call(Fd(r)),r.options=wR(i),r.services={},r.logger=Yl,r.modules={external:[]},D6e(Fd(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),Fy(r,Fd(r));setTimeout(function(){r.init(i,o)},0)}return r}return mu(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=xR();this.options=Il(Il(Il({},s),this.options),wR(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Il(Il({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(_){return _?typeof _=="function"?new _:_:null}if(!this.options.isClone){this.modules.logger?Yl.init(l(this.modules.logger),this.options):Yl.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=T6e);var d=new mR(this.options);this.store=new y6e(this.options.resources,this.options);var h=this.services;h.logger=Yl,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new k6e(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=l(u),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new E6e(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new M6e(l(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(_){for(var k=arguments.length,T=new Array(k>1?k-1:0),A=1;A<k;A++)T[A-1]=arguments[A];i.emit.apply(i,[_].concat(T))}),this.modules.languageDetector&&(h.languageDetector=l(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=l(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new pR(this.services,this.options),this.translator.on("*",function(_){for(var k=arguments.length,T=new Array(k>1?k-1:0),A=1;A<k;A++)T[A-1]=arguments[A];i.emit.apply(i,[_].concat(T))}),this.modules.external.forEach(function(_){_.init&&_.init(i)})}if(this.format=this.options.interpolation.format,a||(a=Ab),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var v=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];v.forEach(function(_){i[_]=function(){var k;return(k=i.store)[_].apply(k,arguments)}});var b=["addResource","addResources","addResourceBundle","removeResourceBundle"];b.forEach(function(_){i[_]=function(){var k;return(k=i.store)[_].apply(k,arguments),i}});var S=ov(),E=function(){var k=function(A,M){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),S.resolve(M),a(A,M)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return k(null,i.t.bind(i));i.changeLanguage(i.options.lng,k)};return this.options.resources||!this.options.initImmediate?E():setTimeout(E,0),S}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ab,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],d=function(v){if(v){var b=o.services.languageUtils.toResolveHierarchy(v);b.forEach(function(S){u.indexOf(S)<0&&u.push(S)})}};if(l)d(l);else{var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.forEach(function(g){return d(g)})}this.options.preload&&this.options.preload.forEach(function(g){return d(g)}),this.services.backendConnector.load(u,this.options.ns,function(g){!g&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(g)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=ov();return i||(i=this.languages),o||(o=this.options.ns),a||(a=Ab),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&KU.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var a=this.languages[o];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=ov();this.emit("languageChanging",i);var l=function(g){a.language=g,a.languages=a.services.languageUtils.toResolveHierarchy(g),a.resolvedLanguage=void 0,a.setResolvedLanguage(g)},u=function(g,v){v?(l(v),a.translator.changeLanguage(v),a.isLanguageChangingTo=void 0,a.emit("languageChanged",v),a.logger.log("languageChanged",v)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(g,function(){return a.t.apply(a,arguments)})},d=function(g){!i&&!g&&a.services.languageDetector&&(g=[]);var v=typeof g=="string"?g:a.services.languageUtils.getBestMatchFromCodes(g);v&&(a.language||l(v),a.translator.language||a.translator.changeLanguage(v),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(v)),a.loadResources(v,function(b){u(b,v)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function u(d,h){var g;if(Xs(h)!=="object"){for(var v=arguments.length,b=new Array(v>2?v-2:0),S=2;S<v;S++)b[S-2]=arguments[S];g=s.options.overloadTranslationOptionHandler([d,h].concat(b))}else g=Il({},h);g.lng=g.lng||u.lng,g.lngs=g.lngs||u.lngs,g.ns=g.ns||u.ns,g.keyPrefix=g.keyPrefix||a||u.keyPrefix;var E=s.options.keySeparator||".",_=g.keyPrefix?"".concat(g.keyPrefix).concat(E).concat(d):d;return s.t(_,g)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=a,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var d=function(v,b){var S=o.services.backendConnector.state["".concat(v,"|").concat(b)];return S===-1||S===2};if(a.precheck){var h=a.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(s,i)&&(!l||d(u,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=ov();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=ov();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),o&&o(u)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new mR(xR());return o.indexOf(a.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ab,s=Il(Il(Il({},this.options),o),{isClone:!0}),l=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(d){l[d]=i[d]}),l.services=Il({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new pR(l.services,l.options),l.translator.on("*",function(d){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];l.emit.apply(l,[d].concat(g))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Qd);cf(eS,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new eS(e,t)});var zt=eS.createInstance();zt.createInstance=eS.createInstance;zt.createInstance;zt.dir;zt.init;zt.loadResources;zt.reloadResources;zt.use;zt.changeLanguage;zt.getFixedT;zt.t;zt.exists;zt.setDefaultNamespace;zt.hasLoadedNamespace;zt.loadNamespaces;zt.loadLanguages;function N6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ey(e){return ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ey(e)}function j6e(e,t){if(ey(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ey(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B6e(e){var t=j6e(e,"string");return ey(t)==="symbol"?t:String(t)}function _R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B6e(r.key),r)}}function $6e(e,t,n){return t&&_R(e.prototype,t),n&&_R(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var XU=[],F6e=XU.forEach,z6e=XU.slice;function H6e(e){return F6e.call(z6e.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var kR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,V6e=function(t,n,r){var i=r||{};i.path=i.path||"/";var o=encodeURIComponent(n),a="".concat(t,"=").concat(o);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!kR.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!kR.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},ER={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=V6e(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i<r.length;i++){for(var o=r[i];o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(n)===0)return o.substring(n.length,o.length)}return null},remove:function(t){this.create(t,"",-1)}},W6e={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=ER.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&ER.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},U6e={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),a=0;a<o.length;a++){var s=o[a].indexOf("=");if(s>0){var l=o[a].substring(0,s);l===t.lookupQuerystring&&(n=o[a].substring(s+1))}}}return n}},av=null,PR=function(){if(av!==null)return av;try{av=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{av=!1}return av},G6e={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&PR()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&PR()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},sv=null,TR=function(){if(sv!==null)return sv;try{sv=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{sv=!1}return sv},q6e={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&TR()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&TR()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},Y6e={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},K6e={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},X6e={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},Z6e={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function Q6e(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var ZU=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};N6e(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return $6e(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=H6e(r,this.options||{},Q6e()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(W6e),this.addDetector(U6e),this.addDetector(G6e),this.addDetector(q6e),this.addDetector(Y6e),this.addDetector(K6e),this.addDetector(X6e),this.addDetector(Z6e)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var a=r.detectors[o].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();ZU.type="languageDetector";function x_(e){return x_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x_(e)}var QU=[],J6e=QU.forEach,eCe=QU.slice;function w_(e){return J6e.call(eCe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function JU(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":x_(XMLHttpRequest))==="object"}function tCe(e){return!!e&&typeof e.then=="function"}function nCe(e){return tCe(e)?e:Promise.resolve(e)}function rCe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ty={},iCe={get exports(){return ty},set exports(e){ty=e}},a2={},oCe={get exports(){return a2},set exports(e){a2=e}},LR;function aCe(){return LR||(LR=1,function(e,t){var n=typeof self<"u"?self:Co,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l($){return $&&DataView.prototype.isPrototypeOf($)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function($){return $&&u.indexOf(Object.prototype.toString.call($))>-1};function h($){if(typeof $!="string"&&($=String($)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test($))throw new TypeError("Invalid character in header field name");return $.toLowerCase()}function g($){return typeof $!="string"&&($=String($)),$}function v($){var U={next:function(){var X=$.shift();return{done:X===void 0,value:X}}};return s.iterable&&(U[Symbol.iterator]=function(){return U}),U}function b($){this.map={},$ instanceof b?$.forEach(function(U,X){this.append(X,U)},this):Array.isArray($)?$.forEach(function(U){this.append(U[0],U[1])},this):$&&Object.getOwnPropertyNames($).forEach(function(U){this.append(U,$[U])},this)}b.prototype.append=function($,U){$=h($),U=g(U);var X=this.map[$];this.map[$]=X?X+", "+U:U},b.prototype.delete=function($){delete this.map[h($)]},b.prototype.get=function($){return $=h($),this.has($)?this.map[$]:null},b.prototype.has=function($){return this.map.hasOwnProperty(h($))},b.prototype.set=function($,U){this.map[h($)]=g(U)},b.prototype.forEach=function($,U){for(var X in this.map)this.map.hasOwnProperty(X)&&$.call(U,this.map[X],X,this)},b.prototype.keys=function(){var $=[];return this.forEach(function(U,X){$.push(X)}),v($)},b.prototype.values=function(){var $=[];return this.forEach(function(U){$.push(U)}),v($)},b.prototype.entries=function(){var $=[];return this.forEach(function(U,X){$.push([X,U])}),v($)},s.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function S($){if($.bodyUsed)return Promise.reject(new TypeError("Already read"));$.bodyUsed=!0}function E($){return new Promise(function(U,X){$.onload=function(){U($.result)},$.onerror=function(){X($.error)}})}function _($){var U=new FileReader,X=E(U);return U.readAsArrayBuffer($),X}function k($){var U=new FileReader,X=E(U);return U.readAsText($),X}function T($){for(var U=new Uint8Array($),X=new Array(U.length),Z=0;Z<U.length;Z++)X[Z]=String.fromCharCode(U[Z]);return X.join("")}function A($){if($.slice)return $.slice(0);var U=new Uint8Array($.byteLength);return U.set(new Uint8Array($)),U.buffer}function M(){return this.bodyUsed=!1,this._initBody=function($){this._bodyInit=$,$?typeof $=="string"?this._bodyText=$:s.blob&&Blob.prototype.isPrototypeOf($)?this._bodyBlob=$:s.formData&&FormData.prototype.isPrototypeOf($)?this._bodyFormData=$:s.searchParams&&URLSearchParams.prototype.isPrototypeOf($)?this._bodyText=$.toString():s.arrayBuffer&&s.blob&&l($)?(this._bodyArrayBuffer=A($.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf($)||d($))?this._bodyArrayBuffer=A($):this._bodyText=$=Object.prototype.toString.call($):this._bodyText="",this.headers.get("content-type")||(typeof $=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf($)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var $=S(this);if($)return $;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?S(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var $=S(this);if($)return $;if(this._bodyBlob)return k(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(F)}),this.json=function(){return this.text().then(JSON.parse)},this}var R=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function D($){var U=$.toUpperCase();return R.indexOf(U)>-1?U:$}function j($,U){U=U||{};var X=U.body;if($ instanceof j){if($.bodyUsed)throw new TypeError("Already read");this.url=$.url,this.credentials=$.credentials,U.headers||(this.headers=new b($.headers)),this.method=$.method,this.mode=$.mode,this.signal=$.signal,!X&&$._bodyInit!=null&&(X=$._bodyInit,$.bodyUsed=!0)}else this.url=String($);if(this.credentials=U.credentials||this.credentials||"same-origin",(U.headers||!this.headers)&&(this.headers=new b(U.headers)),this.method=D(U.method||this.method||"GET"),this.mode=U.mode||this.mode||null,this.signal=U.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}j.prototype.clone=function(){return new j(this,{body:this._bodyInit})};function F($){var U=new FormData;return $.trim().split("&").forEach(function(X){if(X){var Z=X.split("="),W=Z.shift().replace(/\+/g," "),Q=Z.join("=").replace(/\+/g," ");U.append(decodeURIComponent(W),decodeURIComponent(Q))}}),U}function H($){var U=new b,X=$.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(Z){var W=Z.split(":"),Q=W.shift().trim();if(Q){var re=W.join(":").trim();U.append(Q,re)}}),U}M.call(j.prototype);function K($,U){U||(U={}),this.type="default",this.status=U.status===void 0?200:U.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in U?U.statusText:"OK",this.headers=new b(U.headers),this.url=U.url||"",this._initBody($)}M.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},K.error=function(){var $=new K(null,{status:0,statusText:""});return $.type="error",$};var te=[301,302,303,307,308];K.redirect=function($,U){if(te.indexOf(U)===-1)throw new RangeError("Invalid status code");return new K(null,{status:U,headers:{location:$}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(U,X){this.message=U,this.name=X;var Z=Error(U);this.stack=Z.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function G($,U){return new Promise(function(X,Z){var W=new j($,U);if(W.signal&&W.signal.aborted)return Z(new a.DOMException("Aborted","AbortError"));var Q=new XMLHttpRequest;function re(){Q.abort()}Q.onload=function(){var de={status:Q.status,statusText:Q.statusText,headers:H(Q.getAllResponseHeaders()||"")};de.url="responseURL"in Q?Q.responseURL:de.headers.get("X-Request-URL");var ve="response"in Q?Q.response:Q.responseText;X(new K(ve,de))},Q.onerror=function(){Z(new TypeError("Network request failed"))},Q.ontimeout=function(){Z(new TypeError("Network request failed"))},Q.onabort=function(){Z(new a.DOMException("Aborted","AbortError"))},Q.open(W.method,W.url,!0),W.credentials==="include"?Q.withCredentials=!0:W.credentials==="omit"&&(Q.withCredentials=!1),"responseType"in Q&&s.blob&&(Q.responseType="blob"),W.headers.forEach(function(de,ve){Q.setRequestHeader(ve,de)}),W.signal&&(W.signal.addEventListener("abort",re),Q.onreadystatechange=function(){Q.readyState===4&&W.signal.removeEventListener("abort",re)}),Q.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return G.polyfill=!0,o.fetch||(o.fetch=G,o.Headers=b,o.Request=j,o.Response=K),a.Headers=b,a.Request=j,a.Response=K,a.fetch=G,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(oCe,a2)),a2}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Co<"u"&&Co.fetch?n=Co.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof rCe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||aCe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(iCe,ty);const eG=ty,AR=yj({__proto__:null,default:eG},[ty]);function tS(e){return tS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tS(e)}var Ku;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Ku=global.fetch:typeof window<"u"&&window.fetch?Ku=window.fetch:Ku=fetch);var ny;JU()&&(typeof global<"u"&&global.XMLHttpRequest?ny=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(ny=window.XMLHttpRequest));var nS;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?nS=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(nS=window.ActiveXObject));!Ku&&AR&&!ny&&!nS&&(Ku=eG||AR);typeof Ku!="function"&&(Ku=void 0);var C_=function(t,n){if(n&&tS(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},OR=function(t,n,r){Ku(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},MR=!1,sCe=function(t,n,r,i){t.queryStringParams&&(n=C_(n,t.queryStringParams));var o=w_({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=w_({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},MR?{}:a);try{OR(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),OR(n,s,i),MR=!0}catch(u){i(u)}}},lCe=function(t,n,r,i){r&&tS(r)==="object"&&(r=C_("",r).slice(1)),t.queryStringParams&&(n=C_(n,t.queryStringParams));try{var o;ny?o=new ny:o=new nS("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},uCe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Ku&&n.indexOf("file:")!==0)return sCe(t,n,r,i);if(JU()||typeof ActiveXObject=="function")return lCe(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function ry(e){return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function cCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tG(r.key),r)}}function dCe(e,t,n){return t&&IR(e.prototype,t),n&&IR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fCe(e,t,n){return t=tG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tG(e){var t=hCe(e,"string");return ry(t)==="symbol"?t:String(t)}function hCe(e,t){if(ry(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ry(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pCe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return fCe({},r,i||"")},request:uCe,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},nG=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};cCe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return dCe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=w_(i,this.options||{},pCe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=nCe(l),l.then(function(u){if(!u)return a(null,{});var d=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(d,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this;this.options.request(this.options,n,void 0,function(s,l){if(l&&(l.status>=500&&l.status<600||!l.status))return r("failed loading "+n+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return r("failed loading "+n+"; status code: "+l.status,!1);if(!l&&s&&s.message&&s.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+s.message,!0);if(s)return r(s,!1);var u,d;try{typeof l.data=="string"?u=a.options.parse(l.data,i,o):u=l.data}catch{d="failed parsing "+n+" to json"}if(d)return r(d,!1);r(null,u)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,d=[],h=[];n.forEach(function(g){var v=s.options.addPath;typeof s.options.addPath=="function"&&(v=s.options.addPath(g,r));var b=s.services.interpolator.interpolate(v,{lng:g,ns:r});s.options.request(s.options,b,l,function(S,E){u+=1,d.push(S),h.push(E),u===n.length&&a&&a(d,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(h){var g=o.toResolveHierarchy(h);g.forEach(function(v){l.indexOf(v)<0&&l.push(v)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return u(d)}),l.forEach(function(d){n.allOptions.ns.forEach(function(h){i.read(d,h,"read",null,null,function(g,v){g&&a.warn("loading namespace ".concat(h," for language ").concat(d," failed"),g),!g&&v&&a.log("loaded namespace ".concat(h," for language ").concat(d),v),i.loaded("".concat(d,"|").concat(h),g,v)})})})}}}]),e}();nG.type="backend";function iy(e){return iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iy(e)}function mCe(e,t){if(iy(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(iy(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rG(e){var t=mCe(e,"string");return iy(t)==="symbol"?t:String(t)}function iG(e,t,n){return t=rG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gCe(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var RR={};function __(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&RR[t[0]]||(typeof t[0]=="string"&&(RR[t[0]]=new Date),gCe.apply(void 0,t))}function DR(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function i(){setTimeout(function(){e.off("initialized",i)},0),n()};e.on("initialized",r)}})}function vCe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var d=t.services.backendConnector.state["".concat(l,"|").concat(u)];return d===-1||d===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function yCe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return __("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):vCe(e,t,n)}var bCe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,SCe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},xCe=function(t){return SCe[t]},wCe=function(t){return t.replace(bCe,xCe)};function NR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NR(Object(n),!0).forEach(function(r){iG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var k_={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:wCe};function CCe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};k_=jR(jR({},k_),e)}function _Ce(){return k_}var oG;function kCe(e){oG=e}function ECe(){return oG}function PCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rG(r.key),r)}}function TCe(e,t,n){return t&&BR(e.prototype,t),n&&BR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var LCe={type:"3rdParty",init:function(t){CCe(t.options.react),kCe(t)}},ACe=w.createContext(),OCe=function(){function e(){PCe(this,e),this.usedNamespaces={}}return TCe(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function MCe(e){if(Array.isArray(e))return e}function ICe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function $R(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RCe(e,t){if(e){if(typeof e=="string")return $R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $R(e,t)}}function DCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NCe(e,t){return MCe(e)||ICe(e,t)||RCe(e,t)||DCe()}function FR(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 PC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FR(Object(n),!0).forEach(function(r){iG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var jCe=function(t,n){var r=w.useRef();return w.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function We(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=w.useContext(ACe)||{},i=r.i18n,o=r.defaultNS,a=n||i||ECe();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new OCe),!a){__("You will need to pass in an i18next instance by using initReactI18next");var s=function(F){return Array.isArray(F)?F[F.length-1]:F},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&__("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=PC(PC(PC({},_Ce()),a.options.react),t),d=u.useSuspense,h=u.keyPrefix,g=e||o||a.options&&a.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(g);var v=(a.isInitialized||a.initializedStoreOnce)&&g.every(function(j){return yCe(j,a,u)});function b(){return a.getFixedT(null,u.nsMode==="fallback"?g:g[0],h)}var S=w.useState(b),E=NCe(S,2),_=E[0],k=E[1],T=g.join(),A=jCe(T),M=w.useRef(!0);w.useEffect(function(){var j=u.bindI18n,F=u.bindI18nStore;M.current=!0,!v&&!d&&DR(a,g,function(){M.current&&k(b)}),v&&A&&A!==T&&M.current&&k(b);function H(){M.current&&k(b)}return j&&a&&a.on(j,H),F&&a&&a.store.on(F,H),function(){M.current=!1,j&&a&&j.split(" ").forEach(function(K){return a.off(K,H)}),F&&a&&F.split(" ").forEach(function(K){return a.store.off(K,H)})}},[a,T]);var R=w.useRef(!0);w.useEffect(function(){M.current&&!R.current&&k(b),R.current=!1},[a,h]);var D=[_,a,v];if(D.t=_,D.i18n=a,D.ready=v,v||!v&&!d)return D;throw new Promise(function(j){DR(a,g,function(){j()})})}zt.use(nG).use(ZU).use(LCe).init({fallbackLng:"en",debug:!1,ns:["common","gallery","hotkeys","parameters","settings","modelmanager","toast","tooltip","unifiedcanvas"],backend:{loadPath:"/locales/{{ns}}/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const BCe={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:zt.isInitialized?zt.t("common:statusDisconnected"):"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[],searchFolder:null,foundModels:null,openModel:null,cancelOptions:{cancelType:"immediate",cancelAfter:null}},aG=fp({name:"system",initialState:BCe,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=zt.t("common:statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?zt.t("common:statusConnected"):zt.t("common:statusDisconnected")},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=zt.t("common:statusProcessingCanceled")},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=zt.t("common:statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=zt.t("common:statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1},setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setFoundModels:(e,t)=>{e.foundModels=t.payload},setOpenModel:(e,t)=>{e.openModel=t.payload},setCancelType:(e,t)=>{e.cancelOptions.cancelType=t.payload},setCancelAfter:(e,t)=>{e.cancelOptions.cancelAfter=t.payload}}}),{setShouldDisplayInProgressType:$Ce,setIsProcessing:Hs,addLogEntry:no,setShouldShowLogViewer:TC,setIsConnected:zR,setSocketId:dHe,setShouldConfirmOnDelete:sG,setOpenAccordions:FCe,setSystemStatus:zCe,setCurrentStatus:j4,setSystemConfig:HCe,setShouldDisplayGuides:VCe,processingCanceled:WCe,errorOccurred:HR,errorSeen:lG,setModelList:Ob,setIsCancelable:cg,modelChangeRequested:UCe,setSaveIntermediatesInterval:GCe,setEnableImageDebugging:qCe,generationRequested:YCe,addToast:Th,clearToastQueue:KCe,setProcessingIndeterminateTask:XCe,setSearchFolder:uG,setFoundModels:cG,setOpenModel:VR,setCancelType:WR,setCancelAfter:LC}=aG.actions,ZCe=aG.reducer,CP=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],QCe={activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldHoldParametersPanelOpen:!1,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowDualDisplay:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,addNewModelUIOption:null},JCe=QCe,dG=fp({name:"ui",initialState:JCe,reducers:{setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=CP.indexOf(t.payload)},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setParametersPanelScrollPosition:(e,t)=>{e.parametersPanelScrollPosition=t.payload},setShouldPinParametersPanel:(e,t)=>{e.shouldPinParametersPanel=t.payload},setShouldShowParametersPanel:(e,t)=>{e.shouldShowParametersPanel=t.payload},setShouldHoldParametersPanelOpen:(e,t)=>{e.shouldHoldParametersPanelOpen=t.payload},setShouldShowDualDisplay:(e,t)=>{e.shouldShowDualDisplay=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setAddNewModelUIOption:(e,t)=>{e.addNewModelUIOption=t.payload}}}),{setActiveTab:qo,setCurrentTheme:e7e,setParametersPanelScrollPosition:t7e,setShouldHoldParametersPanelOpen:n7e,setShouldPinParametersPanel:r7e,setShouldShowParametersPanel:Xu,setShouldShowDualDisplay:i7e,setShouldShowImageDetails:fG,setShouldUseCanvasBetaLayout:o7e,setShouldShowExistingModelsInSearch:a7e,setAddNewModelUIOption:zh}=dG.actions,s7e=dG.reducer,cu=Object.create(null);cu.open="0";cu.close="1";cu.ping="2";cu.pong="3";cu.message="4";cu.upgrade="5";cu.noop="6";const B4=Object.create(null);Object.keys(cu).forEach(e=>{B4[cu[e]]=e});const l7e={type:"error",data:"parser error"},u7e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",c7e=typeof ArrayBuffer=="function",d7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hG=({type:e,data:t},n,r)=>u7e&&t instanceof Blob?n?r(t):UR(t,r):c7e&&(t instanceof ArrayBuffer||d7e(t))?n?r(t):UR(new Blob([t]),r):r(cu[e]+(t||"")),UR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},GR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<GR.length;e++)Tv[GR.charCodeAt(e)]=e;const f7e=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),d=new Uint8Array(u);for(r=0;r<n;r+=4)o=Tv[e.charCodeAt(r)],a=Tv[e.charCodeAt(r+1)],s=Tv[e.charCodeAt(r+2)],l=Tv[e.charCodeAt(r+3)],d[i++]=o<<2|a>>4,d[i++]=(a&15)<<4|s>>2,d[i++]=(s&3)<<6|l&63;return u},h7e=typeof ArrayBuffer=="function",pG=(e,t)=>{if(typeof e!="string")return{type:"message",data:mG(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:p7e(e.substring(1),t)}:B4[n]?e.length>1?{type:B4[n],data:e.substring(1)}:{type:B4[n]}:l7e},p7e=(e,t)=>{if(h7e){const n=f7e(e);return mG(n,t)}else return{base64:!0,data:e}},mG=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},gG=String.fromCharCode(30),m7e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hG(o,!1,s=>{r[a]=s,++i===n&&t(r.join(gG))})})},g7e=(e,t)=>{const n=e.split(gG),r=[];for(let i=0;i<n.length;i++){const o=pG(n[i],t);if(r.push(o),o.type==="error")break}return r},vG=4;function si(e){if(e)return v7e(e)}function v7e(e){for(var t in si.prototype)e[t]=si.prototype[t];return e}si.prototype.on=si.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};si.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};si.prototype.off=si.prototype.removeListener=si.prototype.removeAllListeners=si.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};si.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};si.prototype.emitReserved=si.prototype.emit;si.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};si.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Td=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yG(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const y7e=setTimeout,b7e=clearTimeout;function Vx(e,t){t.useNativeTimers?(e.setTimeoutFn=y7e.bind(Td),e.clearTimeoutFn=b7e.bind(Td)):(e.setTimeoutFn=setTimeout.bind(Td),e.clearTimeoutFn=clearTimeout.bind(Td))}const S7e=1.33;function x7e(e){return typeof e=="string"?w7e(e):Math.ceil((e.byteLength||e.size)*S7e)}function w7e(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}class C7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class bG extends si{constructor(t){super(),this.writable=!1,Vx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new C7e(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=pG(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const SG="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),E_=64,_7e={};let qR=0,Mb=0,YR;function KR(e){let t="";do t=SG[e%E_]+t,e=Math.floor(e/E_);while(e>0);return t}function xG(){const e=KR(+new Date);return e!==YR?(qR=0,YR=e):e+"."+KR(qR++)}for(;Mb<E_;Mb++)_7e[SG[Mb]]=Mb;function wG(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function k7e(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let CG=!1;try{CG=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const E7e=CG;function _G(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||E7e))return new XMLHttpRequest}catch{}if(!t)try{return new Td[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function P7e(){}const T7e=function(){return new _G({xdomain:!1}).responseType!=null}();class L7e extends bG{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const n=t&&t.forceBase64;this.supportsBinary=T7e&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};g7e(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]=xG()),!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=wG(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 ru(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 ru extends si{constructor(t,n){super(),Vx(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=yG(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 _G(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=ru.requestsCount++,ru.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=P7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ru.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()}}ru.requestsCount=0;ru.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",XR);else if(typeof addEventListener=="function"){const e="onpagehide"in Td?"pagehide":"unload";addEventListener(e,XR,!1)}}function XR(){for(let e in ru.requests)ru.requests.hasOwnProperty(e)&&ru.requests[e].abort()}const kG=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Ib=Td.WebSocket||Td.MozWebSocket,ZR=!0,A7e="arraybuffer",QR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class O7e extends bG{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=QR?{}:yG(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=ZR&&!QR?n?new Ib(t,n):new Ib(t):new Ib(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||A7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;hG(r,this.supportsBinary,o=>{const a={};try{ZR&&this.ws.send(o)}catch{}i&&kG(()=>{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]=xG()),this.supportsBinary||(t.b64=1);const i=wG(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!!Ib}}const M7e={websocket:O7e,polling:L7e},I7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,R7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function P_(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=I7e.exec(e||""),o={},a=14;for(;a--;)o[R7e[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=D7e(o,o.path),o.queryKey=N7e(o,o.query),o}function D7e(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 N7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let EG=class zm extends si{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=P_(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=P_(n.host).host),Vx(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=k7e(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=vG,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 M7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&zm.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;zm.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;zm.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const a=h=>{const g=new Error("probe error: "+h);g.transport=n.name,o(),this.emitReserved("upgradeError",g)};function s(){a("transport closed")}function l(){a("socket closed")}function u(h){n&&h.name!==n.name&&o()}const d=()=>{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",zm.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=x7e(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){zm.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};EG.protocol=vG;function j7e(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=P_(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const B7e=typeof ArrayBuffer=="function",$7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,PG=Object.prototype.toString,F7e=typeof Blob=="function"||typeof Blob<"u"&&PG.call(Blob)==="[object BlobConstructor]",z7e=typeof File=="function"||typeof File<"u"&&PG.call(File)==="[object FileConstructor]";function _P(e){return B7e&&(e instanceof ArrayBuffer||$7e(e))||F7e&&e instanceof Blob||z7e&&e instanceof File}function $4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if($4(e[n]))return!0;return!1}if(_P(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return $4(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&$4(e[n]))return!0;return!1}function H7e(e){const t=[],n=e.data,r=e;return r.data=T_(n,t),r.attachments=t.length,{packet:r,buffers:t}}function T_(e,t){if(!e)return e;if(_P(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=T_(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=T_(e[r],t));return n}return e}function V7e(e,t){return e.data=L_(e.data,t),e.attachments=void 0,e}function L_(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=L_(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=L_(e[n],t));return e}const W7e=5;var cn;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(cn||(cn={}));class U7e{constructor(t){this.replacer=t}encode(t){return(t.type===cn.EVENT||t.type===cn.ACK)&&$4(t)?(t.type=t.type===cn.EVENT?cn.BINARY_EVENT:cn.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===cn.BINARY_EVENT||t.type===cn.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=H7e(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class kP extends si{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t),n.type===cn.BINARY_EVENT||n.type===cn.BINARY_ACK?(this.reconstructor=new G7e(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(_P(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(cn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===cn.BINARY_EVENT||r.type===cn.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(o,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(kP.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case cn.CONNECT:return typeof n=="object";case cn.DISCONNECT:return n===void 0;case cn.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case cn.EVENT:case cn.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case cn.ACK:case cn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class G7e{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=V7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const q7e=Object.freeze(Object.defineProperty({__proto__:null,Decoder:kP,Encoder:U7e,get PacketType(){return cn},protocol:W7e},Symbol.toStringTag,{value:"Module"}));function Bs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Y7e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TG extends si{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=[Bs(t,"open",this.onopen.bind(this)),Bs(t,"packet",this.onpacket.bind(this)),Bs(t,"error",this.onerror.bind(this)),Bs(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(Y7e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:cn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:cn.CONNECT,data:t})}):this.packet({type:cn.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 cn.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 cn.EVENT:case cn.BINARY_EVENT:this.onevent(t);break;case cn.ACK:case cn.BINARY_ACK:this.onack(t);break;case cn.DISCONNECT:this.ondisconnect();break;case cn.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:cn.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:cn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function P0(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}P0.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?e+n:e-n}return Math.min(e,this.max)|0};P0.prototype.reset=function(){this.attempts=0};P0.prototype.setMin=function(e){this.ms=e};P0.prototype.setMax=function(e){this.max=e};P0.prototype.setJitter=function(e){this.jitter=e};class A_ extends si{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,Vx(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 P0({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||q7e;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 EG(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Bs(n,"open",function(){r.onopen(),t&&t()}),o=Bs(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(Bs(t,"ping",this.onping.bind(this)),Bs(t,"data",this.ondata.bind(this)),Bs(t,"error",this.onerror.bind(this)),Bs(t,"close",this.onclose.bind(this)),Bs(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){kG(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new TG(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const lv={};function F4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=j7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=lv[i]&&o in lv[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new A_(r,t):(lv[i]||(lv[i]=new A_(r,t)),l=lv[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(F4,{Manager:A_,Socket:TG,io:F4,connect:F4});const K7e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],X7e=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],Z7e=[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],Q7e=[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],J7e=[{key:"2x",value:2},{key:"4x",value:4}],EP=0,PP=4294967295,e9e=["gfpgan","codeformer"],t9e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}];var n9e=Math.PI/180;function r9e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const zg=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},mt={_global:zg,version:"8.3.14",isBrowser:r9e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return mt.angleDeg?e*n9e: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 mt.DD.isDragging},isDragReady(){return!!mt.DD.node},releaseCanvasOnDestroy:!0,document:zg.document,_injectGlobal(e){zg.Konva=e}},Ar=e=>{mt[e.prototype.getClassName()]=e};mt._injectGlobal(mt);class ka{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 ka(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 d=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/d):-Math.acos(r/d)),l.scaleX=s/d,l.scaleY=d,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var i9e="[object Array]",o9e="[object Number]",a9e="[object String]",s9e="[object Boolean]",l9e=Math.PI/180,u9e=180/Math.PI,AC="#",c9e="",d9e="0",f9e="Konva warning: ",JR="Konva error: ",h9e="rgb(",OC={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]},p9e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Rb=[];const m9e=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)===i9e},_isNumber(e){return Object.prototype.toString.call(e)===o9e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===a9e},_isBoolean(e){return Object.prototype.toString.call(e)===s9e},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){Rb.push(e),Rb.length===1&&m9e(function(){const t=Rb;Rb=[],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(AC,c9e);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=d9e+e;return AC+e},getRGB(e){var t;return e in OC?(t=OC[e],{r:t[0],g:t[1],b:t[2]}):e[0]===AC?this._hexToRgb(e.substring(1)):e.substr(0,4)===h9e?(t=p9e.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=OC[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,d=[0,0,0];for(let h=0;h<3;h++)s=r+1/3*-(h-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,d[h]=l*255;return{r:Math.round(d[0]),g:Math.round(d[1]),b:Math.round(d[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*l9e},radToDeg(e){return e*u9e},_degToRad(e){return fe.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),fe.degToRad(e)},_radToDeg(e){return fe.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),fe.radToDeg(e)},_getRotation(e){return mt.angleDeg?fe.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(JR+e)},error(e){console.error(JR+e)},warn(e){mt.showWarnings&&console.warn(f9e+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,o){var a,s,l,u=(e-n)*(e-n)+(t-r)*(t-r);if(u==0)a=e,s=t,l=(i-n)*(i-n)+(o-r)*(o-r);else{var d=((i-e)*(n-e)+(o-t)*(r-t))/u;d<0?(a=e,s=t,l=(e-i)*(e-i)+(t-o)*(t-o)):d>1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+d*(n-e),s=t+d*(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],d=l[1],h=l[2];h<i&&(r.x=u,r.y=d,i=h)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],o=[];if(e.length>t.length){var a=t;t=e,e=a}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)o.push({x:t[r],y:t[r+1]});var s=[];return o.forEach(function(l){var u=fe._getProjectionToLine(l,i,n);s.push(u.x),s.push(u.y)}),s},_prepareToStringify(e){var t;e.visitedByCircularReferenceRemoval=!0;for(var n in e)if(e.hasOwnProperty(n)&&e[n]&&typeof e[n]=="object"){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||fe._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(fe._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){mt.releaseCanvasOnDestroy&&e.forEach(t=>{t.width=0,t.height=0})}};function df(e){return fe._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||fe._isBoolean(e)?e:Object.prototype.toString.call(e)}function LG(e){return e>255?255:e<0?0:Math.round(e)}function qe(){if(mt.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function AG(e){if(mt.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(df(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function TP(){if(mt.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function T0(){if(mt.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function OG(){if(mt.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(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function g9e(){if(mt.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(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function rl(){if(mt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function v9e(e){if(mt.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(df(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var uv="get",cv="set";const ee={addGetterSetter(e,t,n,r,i){ee.addGetter(e,t,n),ee.addSetter(e,t,r,i),ee.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=uv+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=cv+fe._capitalize(t);e.prototype[i]||ee.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=cv+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=uv+a(t),l=cv+a(t),u,d;e.prototype[s]=function(){var g={};for(u=0;u<o;u++)d=n[u],g[d]=this.getAttr(t+a(d));return g};var h=v9e(n);e.prototype[l]=function(g){var v=this.attrs[t],b;r&&(g=r.call(this,g)),h&&h.call(this,g,t);for(b in g)g.hasOwnProperty(b)&&this._setAttr(t+a(b),g[b]);return g||n.forEach(S=>{this._setAttr(t+a(S),void 0)}),this._fireChangeEvent(t,v,g),i&&i.call(this),this},ee.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=cv+n,i=uv+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=uv+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},ee.addSetter(e,t,r,function(){fe.error(o)}),ee.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=uv+fe._capitalize(n),a=cv+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 y9e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;i<n;i++)o=e[i],r._isNumber(o)?o=Math.round(o*1e3)/1e3:r._isString(o)||(o=o+""),t.push(o);return t}var eD=",",b9e="(",S9e=")",x9e="([",w9e="])",C9e=";",_9e="()",k9e="=",tD=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],E9e=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const P9e=100;let Wx=class{constructor(t){this.canvas=t,mt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,i=r.length,o="",a,s,l,u;for(a=0;a<i;a++)s=r[a],l=s.method,l?(u=s.args,o+=l,t?o+=_9e:fe._isArray(u[0])?o+=x9e+u.join(eD)+w9e:(n&&(u=u.map(d=>typeof d=="number"?Math.floor(d):d)),o+=b9e+u.join(eD)+S9e)):(o+=s.property,t||(o+=k9e+s.val)),o+=C9e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=P9e&&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 d=arguments,h=this._context;d.length===3?h.drawImage(t,n,r):d.length===5?h.drawImage(t,n,r,i,o):d.length===9&&h.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=tD.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=y9e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i<n;i++)a(tD[i]);t.setAttr=function(){r.apply(t,arguments);var s=arguments[0],l=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:s,val:l})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}};E9e.forEach(function(e){Object.defineProperty(Wx.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class T9e extends Wx{constructor(t){super(t),this._context=t._canvas.getContext("2d")}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){var n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){var n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}var i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}var o=t.getFillLinearGradientColorStops();if(o&&r==="linear-gradient"){this._fillLinearGradient(t);return}var a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):i?this._fillPattern(t):o?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){var n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(n.x,n.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)o.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",o)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var o=t.getStrokeLinearGradientColorStops();o?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,i,o=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,s=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),d=l.x*u,h=l.y*u;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(d),Math.abs(h))),this.setAttr("shadowOffsetX",s.x*d),this.setAttr("shadowOffsetY",s.y*h)}}class L9e extends Wx{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var n=t.getStrokeScaleEnabled();if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);var i=t.hitStrokeWidth(),o=i==="auto"?t.strokeWidth():i;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),n||this.restore()}}}var Db;function A9e(){if(Db)return Db;var e=fe.createCanvasElement(),t=e.getContext("2d");return Db=function(){var n=mt._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),fe.releaseCanvas(e),Db}class Ux{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||mt.pixelRatio||A9e();this.pixelRatio=r,this._canvas=fe.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch{try{return this._canvas.toDataURL()}catch(i){return fe.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}ee.addGetterSetter(Ux,"pixelRatio",void 0,qe());class Hg extends Ux{constructor(t={width:0,height:0}){super(t),this.context=new T9e(this),this.setSize(t.width,t.height)}}class LP extends Ux{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new L9e(this),this.setSize(t.width,t.height)}}const vn={get isDragging(){var e=!1;return vn._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return vn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];vn._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<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];vn._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")&&(vn.justDragged=!0,mt._mouseListenClick=!1,mt._touchListenClick=!1,mt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof mt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){vn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&vn._dragElements.delete(n)})}};mt.isBrowser&&(window.addEventListener("mouseup",vn._endDragBefore,!0),window.addEventListener("touchend",vn._endDragBefore,!0),window.addEventListener("mousemove",vn._drag),window.addEventListener("touchmove",vn._drag),window.addEventListener("mouseup",vn._endDragAfter,!1),window.addEventListener("touchend",vn._endDragAfter,!1));var z4="absoluteOpacity",Nb="allEventListeners",zu="absoluteTransform",nD="absoluteScale",ah="canvas",O9e="Change",M9e="children",I9e="konva",O_="listening",rD="mouseenter",iD="mouseleave",oD="set",aD="Shape",H4=" ",sD="stage",hd="transform",R9e="Stage",M_="visible",D9e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(H4);let N9e=1,Qe=class I_{constructor(t){this._id=N9e++,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===hd||t===zu)&&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===hd||t===zu,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(H4);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(ah)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===zu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(ah)){const{scene:t,filter:n,hit:r}=this._cache.get(ah);fe.releaseCanvas(t,n,r),this._cache.delete(ah)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,d=n.drawBorder||!1,h=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 g=new Hg({pixelRatio:a,width:i,height:o}),v=new Hg({pixelRatio:a,width:0,height:0}),b=new LP({pixelRatio:h,width:i,height:o}),S=g.getContext(),E=b.getContext();return b.isCache=!0,g.isCache=!0,this._cache.delete(ah),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(g.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),S.save(),E.save(),S.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(z4),this._clearSelfAndDescendantCache(nD),this.drawScene(g,this),this.drawHit(b,this),this._isUnderCache=!1,S.restore(),E.restore(),d&&(S.save(),S.beginPath(),S.rect(0,0,i,o),S.closePath(),S.setAttr("strokeStyle","red"),S.setAttr("lineWidth",5),S.stroke(),S.restore()),this._cache.set(ah,{scene:g,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(ah)}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 d=l.point(u);i===void 0&&(i=a=d.x,o=s=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),a=Math.max(a,d.x),s=Math.max(s,d.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 d=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()/d,r.getHeight()/d),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<a;l++){if(u=t[l],typeof u!="function"){fe.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,s),o.putImageData(s,0,0)}}catch(h){fe.error("Unable to apply filter. "+h.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,n){if(this._cache&&this._cache.delete(Nb),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(H4),i=r.length,o,a,s,l,u;for(o=0;o<i;o++)a=r[o],s=a.split("."),l=s[0],u=s[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(H4),i=r.length,o,a,s,l,u,d;if(this._cache&&this._cache.delete(Nb),!t)for(a in this.eventListeners)this._off(a);for(o=0;o<i;o++)if(s=r[o],l=s.split("."),u=l[0],d=l[1],u)this.eventListeners[u]&&this._off(u,d,n);else for(a in this.eventListeners)this._off(a,d,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var i=this;this.on(t,function(o){for(var a=o.target.findAncestors(n,!0,i),s=0;s<a.length;s++)o=fe.cloneObject(o),o.currentTarget=a[s],r.call(a[s],o)})}remove(){return this.isDragging()&&this.stopDrag(),vn._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(zu),this._clearSelfAndDescendantCache(z4),this._clearSelfAndDescendantCache(nD),this._clearSelfAndDescendantCache(sD),this._clearSelfAndDescendantCache(M_),this._clearSelfAndDescendantCache(O_)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+fe._capitalize(t);return fe._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==M9e&&(r=oD+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(O_,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(M_,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;vn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!mt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a<o;a++)s=u[a],r++,s.nodeType!==aD&&(i=i.concat(s.getChildren().slice())),s._id===n._id&&(a=o);i.length>0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==R9e&&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(hd),this._clearSelfAndDescendantCache(zu)),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 ka,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(hd);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(hd),this._clearSelfAndDescendantCache(zu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a<o;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return fe.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return fe.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return fe.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return 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(z4,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<r;i++)if(o=n[i],fe.isValidSelector(o)||(fe.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),fe.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),fe.warn("Konva is awesome, right?")),o.charAt(0)==="#"){if(this.id()===o.slice(1))return!0}else if(o.charAt(0)==="."){if(this.hasName(o.slice(1)))return!0}else if(this.className===o||this.nodeType===o)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(sD,this._getStage)}_getStage(){var t=this.getParent();if(t)return t.getStage()}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(zu,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new ka,this._eachAncestorReverse(function(i){var o=i.transformsEnabled();o==="all"?n.multiply(i.getTransform()):o==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),n;n=this._cache.get(zu)||new ka,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,o=this.attrs.y||0,a=this.attrs.offsetX||0,s=this.attrs.offsetY||0;n.translate(i-a,o-s)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(hd,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(hd)||new ka;r.reset();var i=this.x(),o=this.y(),a=mt.getAngle(this.rotation()),s=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,d=this.attrs.skewY||0,h=this.attrs.offsetX||0,g=this.attrs.offsetY||0;return(i!==0||o!==0)&&r.translate(i,o),a!==0&&r.rotate(a),(u!==0||d!==0)&&r.skew(u,d),(s!==1||l!==1)&&r.scale(s,l),(h!==0||g!==0)&&r.translate(-1*h,-1*g),r.dirty=!1,r}clone(t){var n=fe.cloneObject(this.attrs),r,i,o,a,s;for(r in t)n[r]=t[r];var l=new this.constructor(n);for(r in this.eventListeners)for(i=this.eventListeners[r],o=i.length,a=0;a<o;a++)s=i[a],s.name.indexOf(I9e)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(s));return l}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(n.x),o=t.y!==void 0?t.y:Math.floor(n.y),a=t.pixelRatio||1,s=new Hg({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:a}),l=s.getContext();return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||o)&&l.translate(-1*i,-1*o),this.drawScene(s),l.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():mt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o<i.length;o++)if(a=i[o].name,s=i[o].handler,(a!=="konva"||n==="konva")&&(!n||a===n)&&(!r||r===s)){if(i.splice(o,1),i.length===0){delete this.eventListeners[t];break}o--}}_fireChangeEvent(t,n,r){this._fire(t+O9e,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[oD+fe._capitalize(t)];return fe._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(mt.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!fe.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,n,r){n&&this.nodeType===aD&&(n.target=this);var i=(t===rD||t===iD)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,n);var o=(t===rD||t===iD)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!o&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){let n=this._cache.get(Nb);if(!n){n={};let i=Object.getPrototypeOf(this);for(;i;){if(!i.eventListeners){i=Object.getPrototypeOf(i);continue}for(var r in i.eventListeners){const o=i.eventListeners[r],a=n[r]||[];n[r]=o.concat(a)}i=Object.getPrototypeOf(i)}this._cache.set(Nb,n)}return n[t]}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,n);const o=this.eventListeners[t];if(o)for(var i=0;i<o.length;i++)o[i].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition(),o=r._getPointerById(n)||r._changedPointerPositions[0]||i;vn._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-i.x,y:o.y-i.y},dragStatus:"ready",pointerId:n})}startDrag(t,n=!0){vn._dragElements.has(this._id)||this._createDragElement(t);const r=vn._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var i={x:r.x-n.offset.x,y:r.y-n.offset.y},o=this.dragBoundFunc();if(o!==void 0){const a=o.call(this,i,t);a?i=a:fe.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const n=vn._dragElements.get(this._id);n&&(n.dragStatus="stopped"),vn._endDragBefore(t),vn._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=vn._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||mt.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var i=!1;vn._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=vn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&vn._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=I_.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),mt[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=mt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(I_._createNode(i[s]));return o}};Qe.prototype.nodeType="Node";Qe.prototype._attrsAffectingSize=[];Qe.prototype.eventListeners={};Qe.prototype.on.call(Qe.prototype,D9e,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(hd),this._clearSelfAndDescendantCache(zu)});Qe.prototype.on.call(Qe.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(M_)});Qe.prototype.on.call(Qe.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(O_)});Qe.prototype.on.call(Qe.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(z4)});const Yn=ee.addGetterSetter;Yn(Qe,"zIndex");Yn(Qe,"absolutePosition");Yn(Qe,"position");Yn(Qe,"x",0,qe());Yn(Qe,"y",0,qe());Yn(Qe,"globalCompositeOperation","source-over",T0());Yn(Qe,"opacity",1,qe());Yn(Qe,"name","",T0());Yn(Qe,"id","",T0());Yn(Qe,"rotation",0,qe());ee.addComponentsGetterSetter(Qe,"scale",["x","y"]);Yn(Qe,"scaleX",1,qe());Yn(Qe,"scaleY",1,qe());ee.addComponentsGetterSetter(Qe,"skew",["x","y"]);Yn(Qe,"skewX",0,qe());Yn(Qe,"skewY",0,qe());ee.addComponentsGetterSetter(Qe,"offset",["x","y"]);Yn(Qe,"offsetX",0,qe());Yn(Qe,"offsetY",0,qe());Yn(Qe,"dragDistance",null,qe());Yn(Qe,"width",0,qe());Yn(Qe,"height",0,qe());Yn(Qe,"listening",!0,rl());Yn(Qe,"preventDefault",!0,rl());Yn(Qe,"filters",null,function(e){return this._filterUpToDate=!1,e});Yn(Qe,"visible",!0,rl());Yn(Qe,"transformsEnabled","all",T0());Yn(Qe,"size");Yn(Qe,"dragBoundFunc");Yn(Qe,"draggable",!1,rl());ee.backCompat(Qe,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Aa extends Qe{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(i){t(i)&&r.push(i)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}var r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Qe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Qe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const d=r===this;if(u){o.save();var h=this.getAbsoluteTransform(r),g=h.getMatrix();if(o.transform(g[0],g[1],g[2],g[3],g[4],g[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(),g=h.copy().invert().getMatrix(),o.transform(g[0],g[1],g[2],g[3],g[4],g[5])}var S=!d&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";S&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),S&&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},d=this;(n=this.children)===null||n===void 0||n.forEach(function(S){if(S.visible()){var E=S.getClientRect({relativeTo:d,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 h=this.find("Shape"),g=!1,v=0;v<h.length;v++){var b=h[v];if(b._isVisible(this)){g=!0;break}}return g&&o!==void 0?u={x:o,y:a,width:s-o,height:l-a}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,i)}}ee.addComponentsGetterSetter(Aa,"clip",["x","y","width","height"]);ee.addGetterSetter(Aa,"clipX",void 0,qe());ee.addGetterSetter(Aa,"clipY",void 0,qe());ee.addGetterSetter(Aa,"clipWidth",void 0,qe());ee.addGetterSetter(Aa,"clipHeight",void 0,qe());ee.addGetterSetter(Aa,"clipFunc");const oy=new Map,MG=mt._global.PointerEvent!==void 0;function MC(e){return oy.get(e)}function AP(e){return{evt:e,pointerId:e.pointerId}}function IG(e,t){return oy.get(e)===t}function RG(e,t){s2(e),t.getStage()&&(oy.set(e,t),MG&&t._fire("gotpointercapture",AP(new PointerEvent("gotpointercapture"))))}function s2(e,t){const n=oy.get(e);if(!n)return;const r=n.getStage();r&&r.content,oy.delete(e),MG&&n._fire("lostpointercapture",AP(new PointerEvent("lostpointercapture")))}var j9e="Stage",B9e="string",lD="px",$9e="mouseout",DG="mouseleave",NG="mouseover",jG="mouseenter",BG="mousemove",$G="mousedown",FG="mouseup",Lv="pointermove",Av="pointerdown",dg="pointerup",Ov="pointercancel",F9e="lostpointercapture",jb="pointerout",Bb="pointerleave",$b="pointerover",Fb="pointerenter",R_="contextmenu",zG="touchstart",HG="touchend",VG="touchmove",WG="touchcancel",D_="wheel",z9e=5,H9e=[[jG,"_pointerenter"],[$G,"_pointerdown"],[BG,"_pointermove"],[FG,"_pointerup"],[DG,"_pointerleave"],[zG,"_pointerdown"],[VG,"_pointermove"],[HG,"_pointerup"],[WG,"_pointercancel"],[NG,"_pointerover"],[D_,"_wheel"],[R_,"_contextmenu"],[Av,"_pointerdown"],[Lv,"_pointermove"],[dg,"_pointerup"],[Ov,"_pointercancel"],[F9e,"_lostpointercapture"]];const IC={mouse:{[jb]:$9e,[Bb]:DG,[$b]:NG,[Fb]:jG,[Lv]:BG,[Av]:$G,[dg]:FG,[Ov]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[jb]:"touchout",[Bb]:"touchleave",[$b]:"touchover",[Fb]:"touchenter",[Lv]:VG,[Av]:zG,[dg]:HG,[Ov]:WG,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[jb]:jb,[Bb]:Bb,[$b]:$b,[Fb]:Fb,[Lv]:Lv,[Av]:Av,[dg]:dg,[Ov]:Ov,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Mv=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Nm=e=>{const t=Mv(e);if(t==="pointer")return mt.pointerEventsEnabled&&IC.pointer;if(t==="touch")return IC.touch;if(t==="mouse")return IC.mouse};function uD(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const V9e="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);",V4=[];let Gx=class extends Aa{constructor(t){super(uD(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),V4.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{uD(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===B9e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r<n;r++)t[r].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),Aa.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&fe._isInDocument(t)&&this.container().removeChild(t);var n=V4.indexOf(this);return n>-1&&V4.splice(n,1),fe.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(V9e),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 Hg({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+lD,this.content.style.height=n+lD),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(t);var i=this.children.length;return i>z9e&&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(),mt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return IG(t,this)}setPointerCapture(t){RG(t,this)}releaseCapture(t){s2(t)}getLayers(){return this.children}_bindContentEvents(){mt.isBrowser&&H9e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Nm(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Nm(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=Nm(t.type),r=Mv(t.type);if(n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!vn.isDragging||mt.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=Nm(t.type),r=Mv(t.type);if(n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(vn.justDragged=!1,mt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;mt.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=Nm(t.type),r=Mv(t.type);if(!n)return;vn.isDragging&&vn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!vn.isDragging||mt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=MC(l.id)||this.getIntersection(l),d=l.id,h={evt:t,pointerId:d};var g=s!==u;if(g&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},h),u),s._fireAndBubble(n.pointerleave,Object.assign({},h),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,g&&(u._fireAndBubble(n.pointerover,Object.assign({},h),s),u._fireAndBubble(n.pointerenter,Object.assign({},h),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},h))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:d}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Nm(t.type),r=Mv(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=MC(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const d=l.id,h={evt:t,pointerId:d};let g=!1;mt["_"+r+"InDblClickWindow"]?(g=!0,clearTimeout(this[r+"DblTimeout"])):vn.justDragged||(mt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){mt["_"+r+"InDblClickWindow"]=!1},mt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},h)),mt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},h)),g&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},h)))):(this[r+"ClickEndShape"]=null,mt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:d}),g&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:d}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),mt["_"+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(R_,{evt:t}):this._fire(R_,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(D_,{evt:t}):this._fire(D_,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=MC(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(dg,AP(t)),s2(t.pointerId)}_lostpointercapture(t){s2(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 Hg({width:this.width(),height:this.height()}),this.bufferHitCanvas=new LP({pixelRatio:1,width:this.width(),height:this.height()}),!!mt.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}};Gx.prototype.nodeType=j9e;Ar(Gx);ee.addGetterSetter(Gx,"container");var UG="hasShadow",GG="shadowRGBA",qG="patternImage",YG="linearGradient",KG="radialGradient";let zb;function RC(){return zb||(zb=fe.createCanvasElement().getContext("2d"),zb)}const l2={};function W9e(e){e.fill()}function U9e(e){e.stroke()}function G9e(e){e.fill()}function q9e(e){e.stroke()}function Y9e(){this._clearCache(UG)}function K9e(){this._clearCache(GG)}function X9e(){this._clearCache(qG)}function Z9e(){this._clearCache(YG)}function Q9e(){this._clearCache(KG)}class je extends Qe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in l2)););this.colorKey=n,l2[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(UG,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(qG,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=RC();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ka;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(mt.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(YG,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=RC(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}_getRadialGradient(){return this._getCache(KG,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var n=RC(),r=this.fillRadialGradientStartPoint(),i=this.fillRadialGradientEndPoint(),o=n.createRadialGradient(r.x,r.y,this.fillRadialGradientStartRadius(),i.x,i.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}getShadowRGBA(){return this._getCache(GG,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var t=fe.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Qe.prototype.destroy.call(this),delete l2[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(),d=u?this.shadowOffsetX():0,h=u?this.shadowOffsetY():0,g=s+Math.abs(d),v=l+Math.abs(h),b=u&&this.shadowBlur()||0,S=g+b*2,E=v+b*2,_={width:S,height:E,x:-(a/2+b)+Math.min(d,0)+i.x,y:-(a/2+b)+Math.min(h,0)+i.y};return n?_:this._transformedRect(_,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,d,h,g=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()&&!g){u=this.getStage(),d=u.bufferCanvas,h=d.getContext(),h.clear(),h.save(),h._applyLineJoin(this);var S=this.getAbsoluteTransform(n).getMatrix();h.transform(S[0],S[1],S[2],S[3],S[4],S[5]),s.call(this,h,this),h.restore();var E=d.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(d._canvas,0,0,d.width/E,d.height/E)}else{if(o._applyLineJoin(this),!v){var S=this.getAbsoluteTransform(n).getMatrix();o.transform(S[0],S[1],S[2],S[3],S[4],S[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 d=this.getAbsoluteTransform(n).getMatrix();return a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var g=this.getAbsoluteTransform(n).getMatrix();a.transform(g[0],g[1],g[2],g[3],g[4],g[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,d,h,g,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,d=u.length,h=fe._hexToRgb(this.colorKey),g=0;g<d;g+=4)v=u[g+3],v>t?(u[g]=h.r,u[g+1]=h.g,u[g+2]=h.b,u[g+3]=255):u[g+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 IG(t,this)}setPointerCapture(t){RG(t,this)}releaseCapture(t){s2(t)}}je.prototype._fillFunc=W9e;je.prototype._strokeFunc=U9e;je.prototype._fillFuncHit=G9e;je.prototype._strokeFuncHit=q9e;je.prototype._centroid=!1;je.prototype.nodeType="Shape";Ar(je);je.prototype.eventListeners={};je.prototype.on.call(je.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Y9e);je.prototype.on.call(je.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",K9e);je.prototype.on.call(je.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",X9e);je.prototype.on.call(je.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Z9e);je.prototype.on.call(je.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Q9e);ee.addGetterSetter(je,"stroke",void 0,OG());ee.addGetterSetter(je,"strokeWidth",2,qe());ee.addGetterSetter(je,"fillAfterStrokeEnabled",!1);ee.addGetterSetter(je,"hitStrokeWidth","auto",TP());ee.addGetterSetter(je,"strokeHitEnabled",!0,rl());ee.addGetterSetter(je,"perfectDrawEnabled",!0,rl());ee.addGetterSetter(je,"shadowForStrokeEnabled",!0,rl());ee.addGetterSetter(je,"lineJoin");ee.addGetterSetter(je,"lineCap");ee.addGetterSetter(je,"sceneFunc");ee.addGetterSetter(je,"hitFunc");ee.addGetterSetter(je,"dash");ee.addGetterSetter(je,"dashOffset",0,qe());ee.addGetterSetter(je,"shadowColor",void 0,T0());ee.addGetterSetter(je,"shadowBlur",0,qe());ee.addGetterSetter(je,"shadowOpacity",1,qe());ee.addComponentsGetterSetter(je,"shadowOffset",["x","y"]);ee.addGetterSetter(je,"shadowOffsetX",0,qe());ee.addGetterSetter(je,"shadowOffsetY",0,qe());ee.addGetterSetter(je,"fillPatternImage");ee.addGetterSetter(je,"fill",void 0,OG());ee.addGetterSetter(je,"fillPatternX",0,qe());ee.addGetterSetter(je,"fillPatternY",0,qe());ee.addGetterSetter(je,"fillLinearGradientColorStops");ee.addGetterSetter(je,"strokeLinearGradientColorStops");ee.addGetterSetter(je,"fillRadialGradientStartRadius",0);ee.addGetterSetter(je,"fillRadialGradientEndRadius",0);ee.addGetterSetter(je,"fillRadialGradientColorStops");ee.addGetterSetter(je,"fillPatternRepeat","repeat");ee.addGetterSetter(je,"fillEnabled",!0);ee.addGetterSetter(je,"strokeEnabled",!0);ee.addGetterSetter(je,"shadowEnabled",!0);ee.addGetterSetter(je,"dashEnabled",!0);ee.addGetterSetter(je,"strokeScaleEnabled",!0);ee.addGetterSetter(je,"fillPriority","color");ee.addComponentsGetterSetter(je,"fillPatternOffset",["x","y"]);ee.addGetterSetter(je,"fillPatternOffsetX",0,qe());ee.addGetterSetter(je,"fillPatternOffsetY",0,qe());ee.addComponentsGetterSetter(je,"fillPatternScale",["x","y"]);ee.addGetterSetter(je,"fillPatternScaleX",1,qe());ee.addGetterSetter(je,"fillPatternScaleY",1,qe());ee.addComponentsGetterSetter(je,"fillLinearGradientStartPoint",["x","y"]);ee.addComponentsGetterSetter(je,"strokeLinearGradientStartPoint",["x","y"]);ee.addGetterSetter(je,"fillLinearGradientStartPointX",0);ee.addGetterSetter(je,"strokeLinearGradientStartPointX",0);ee.addGetterSetter(je,"fillLinearGradientStartPointY",0);ee.addGetterSetter(je,"strokeLinearGradientStartPointY",0);ee.addComponentsGetterSetter(je,"fillLinearGradientEndPoint",["x","y"]);ee.addComponentsGetterSetter(je,"strokeLinearGradientEndPoint",["x","y"]);ee.addGetterSetter(je,"fillLinearGradientEndPointX",0);ee.addGetterSetter(je,"strokeLinearGradientEndPointX",0);ee.addGetterSetter(je,"fillLinearGradientEndPointY",0);ee.addGetterSetter(je,"strokeLinearGradientEndPointY",0);ee.addComponentsGetterSetter(je,"fillRadialGradientStartPoint",["x","y"]);ee.addGetterSetter(je,"fillRadialGradientStartPointX",0);ee.addGetterSetter(je,"fillRadialGradientStartPointY",0);ee.addComponentsGetterSetter(je,"fillRadialGradientEndPoint",["x","y"]);ee.addGetterSetter(je,"fillRadialGradientEndPointX",0);ee.addGetterSetter(je,"fillRadialGradientEndPointY",0);ee.addGetterSetter(je,"fillPatternRotation",0);ee.backCompat(je,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var J9e="#",e_e="beforeDraw",t_e="draw",XG=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],n_e=XG.length;let hp=class extends Aa{constructor(t){super(t),this.canvas=new Hg,this.hitCanvas=new LP({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Qe.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=Qe.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Qe.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Qe.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return Qe.prototype.remove.call(this),t&&t.parentNode&&fe._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),Qe.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){fe.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){fe.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,fe.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<n_e;i++){const o=XG[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=fe._rgbToHex(r[0],r[1],r[2]),a=l2[J9e+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(e_e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Aa.prototype.drawScene.call(this,i,n),this._fire(t_e,{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)}}destroy(){return fe.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};hp.prototype.nodeType="Layer";Ar(hp);ee.addGetterSetter(hp,"imageSmoothingEnabled",!0);ee.addGetterSetter(hp,"clearBeforeDraw",!0);ee.addGetterSetter(hp,"hitGraphEnabled",!0,rl());class OP extends hp{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}OP.prototype.nodeType="FastLayer";Ar(OP);let a0=class extends Aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}};a0.prototype.nodeType="Group";Ar(a0);var DC=function(){return zg.performance&&zg.performance.now?function(){return zg.performance.now()}:function(){return new Date().getTime()}}();class ts{constructor(t,n){this.id=ts.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:DC(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;i<r;i++)if(n[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t=ts,n=t.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=DC(),ts._addAnimation(this),this}stop(){return ts._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var n=t.id,r=this.animations,i=r.length,o;for(o=0;o<i;o++)if(r[o].id===n){this.animations.splice(o,1);break}}static _runFrames(){var t={},n=this.animations,r,i,o,a,s,l,u,d,h;for(a=0;a<n.length;a++)if(r=n[a],i=r.layers,o=r.func,r._updateFrameObject(DC()),l=i.length,o?h=o.call(r,r.frame)!==!1:h=!0,!!h)for(s=0;s<l;s++)u=i[s],u._id!==void 0&&(t[u._id]=u);for(d in t)t.hasOwnProperty(d)&&t[d].batchDraw()}static _animationLoop(){var t=ts;t.animations.length?(t._runFrames(),fe.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,fe.requestAnimFrame(this._animationLoop))}}ts.animations=[];ts.animIdCounter=0;ts.animRunning=!1;var r_e={node:1,duration:1,easing:1,onFinish:1,yoyo:1},i_e=1,cD=2,dD=3,o_e=0,fD=["fill","stroke","shadowColor"];class a_e{constructor(t,n,r,i,o,a,s){this.prop=t,this.propFunc=n,this.begin=i,this._pos=i,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=o-this.begin,this.pause()}fire(t){var n=this[t];n&&n()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=cD,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=dD,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===cD?this.setTime(t):this.state===dD&&this.setTime(this.duration-t)}pause(){this.state=i_e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Xr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||u2.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=o_e++;var u=r.getLayer()||(r instanceof mt.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 ts(function(){n.tween.onEnterFrame()},u),this.tween=new a_e(l,function(d){n._tweenFunc(d)},a,0,1,o*1e3,s),this._addListeners(),Xr.attrs[i]||(Xr.attrs[i]={}),Xr.attrs[i][this._id]||(Xr.attrs[i][this._id]={}),Xr.tweens[i]||(Xr.tweens[i]={});for(l in t)r_e[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,d,h,g;if(s=Xr.tweens[i][t],s&&delete Xr.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?(h=o,o=fe._prepareArrayForTween(o,n,r.closed())):(d=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l<u;l++)if(l%2===0)a.push(n[l]-o[l]);else{var v=fe.colorToRGBA(o[l]);g=fe.colorToRGBA(n[l]),o[l]=v,a.push({r:g.r-v.r,g:g.g-v.g,b:g.b-v.b,a:g.a-v.a})}else for(l=0;l<u;l++)a.push(n[l]-o[l]);else fD.indexOf(t)!==-1?(o=fe.colorToRGBA(o),g=fe.colorToRGBA(n),a={r:g.r-o.r,g:g.g-o.g,b:g.b-o.b,a:g.a-o.a}):a=n-o;Xr.attrs[i][this._id][t]={start:o,diff:a,end:n,trueEnd:d,trueStart:h},Xr.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=Xr.attrs[n._id][this._id],i,o,a,s,l,u,d,h;for(i in r){if(o=r[i],a=o.start,s=o.diff,h=o.end,fe._isArray(a))if(l=[],d=Math.max(a.length,h.length),i.indexOf("fill")===0)for(u=0;u<d;u++)u%2===0?l.push((a[u]||0)+s[u]*t):l.push("rgba("+Math.round(a[u].r+s[u].r*t)+","+Math.round(a[u].g+s[u].g*t)+","+Math.round(a[u].b+s[u].b*t)+","+(a[u].a+s[u].a*t)+")");else for(u=0;u<d;u++)l.push((a[u]||0)+s[u]*t);else fD.indexOf(i)!==-1?l="rgba("+Math.round(a.r+s.r*t)+","+Math.round(a.g+s.g*t)+","+Math.round(a.b+s.b*t)+","+(a.a+s.a*t)+")":l=a+s*t;n.setAttr(i,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Xr.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=Xr.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=Xr.tweens[t],i;this.pause();for(i in r)delete Xr.tweens[t][i];delete Xr.attrs[t][n]}}Xr.attrs={};Xr.tweens={};Qe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Xr(e);n.play()};const u2={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t)},ElasticEaseOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/o)+n+t)},ElasticEaseInOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r/2)===2?t+n:(o||(o=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-u2.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?u2.BounceEaseIn(e*2,0,n,r)*.5+t:u2.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},tp=fe._assign(mt,{Util:fe,Transform:ka,Node:Qe,Container:Aa,Stage:Gx,stages:V4,Layer:hp,FastLayer:OP,Group:a0,DD:vn,Shape:je,shapes:l2,Animation:ts,Tween:Xr,Easings:u2,Context:Wx,Canvas:Ux});class dc extends je{_sceneFunc(t){var n=mt.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,n,r),t.arc(0,0,this.innerRadius(),n,0,!r),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),i=mt.getAngle(r?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),l=Math.sin(Math.min(i,Math.PI/2)),u=o*(o>0?t:n),d=a*n,h=s*(s>0?t:n),g=l*(l>0?n:t);return{x:u,y:r?-1*g:h,width:d-u,height:g-h}}}dc.prototype._centroid=!0;dc.prototype.className="Arc";dc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Ar(dc);ee.addGetterSetter(dc,"innerRadius",0,qe());ee.addGetterSetter(dc,"outerRadius",0,qe());ee.addGetterSetter(dc,"angle",0,qe());ee.addGetterSetter(dc,"clockwise",!1,rl());function N_(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),d=a*l/(s+l),h=n-u*(i-e),g=r-u*(o-t),v=n+d*(i-e),b=r+d*(o-t);return[h,g,v,b]}function hD(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=N_(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(o[0])&&(r.push(o[0]),r.push(o[1]),r.push(e[i]),r.push(e[i+1]),r.push(o[2]),r.push(o[3]));return r}let fc=class extends je{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,i=this.tension(),o=this.closed(),a=this.bezier(),s,l,u;if(r){if(t.beginPath(),t.moveTo(n[0],n[1]),i!==0&&r>4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u<l-2;)t.bezierCurveTo(s[u++],s[u++],s[u++],s[u++],s[u++],s[u++]);o||t.quadraticCurveTo(s[l-2],s[l-1],n[r-2],n[r-1])}else if(a)for(u=2;u<r;)t.bezierCurveTo(n[u++],n[u++],n[u++],n[u++],n[u++],n[u++]);else for(u=2;u<r;u+=2)t.lineTo(n[u],n[u+1]);o?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():hD(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=N_(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=N_(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),a=hD(t,r),s=[i[2],i[3]].concat(a).concat([o[0],o[1],t[n-2],t[n-1],o[2],o[3],i[0],i[1],t[0],t[1]]);return s}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);return{x:n,y:i,width:r-n,height:o-i}}};fc.prototype.className="Line";fc.prototype._attrsAffectingSize=["points","bezier","tension"];Ar(fc);ee.addGetterSetter(fc,"closed",!1);ee.addGetterSetter(fc,"bezier",!1);ee.addGetterSetter(fc,"tension",0,qe());ee.addGetterSetter(fc,"points",[],g9e());class Hn extends je{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=Hn.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on("dataChange.konva",function(){this.dataArray=Hn.parsePathData(this.data()),this.pathLength=0;for(var r=0;r<this.dataArray.length;++r)this.pathLength+=this.dataArray[r].pathLength})}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;i<n.length;i++){var o=n[i].command,a=n[i].points;switch(o){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var s=a[0],l=a[1],u=a[2],d=a[3],h=a[4],g=a[5],v=a[6],b=a[7],S=u>d?u:d,E=u>d?1:u/d,_=u>d?d/u:1;t.translate(s,l),t.rotate(v),t.scale(E,_),t.arc(0,0,S,h,h+g,1-b),t.scale(1/E,1/_),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 d=u.points[4],h=u.points[5],g=u.points[4]+h,v=Math.PI/180;if(Math.abs(d-g)<v&&(v=Math.abs(d-g)),h<0)for(let b=d-v;b>g;b-=v){const S=Hn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(S.x,S.y)}else for(let b=d+v;b<g;b+=v){const S=Hn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(S.x,S.y)}}else if(u.command==="C")for(let b=0;b<=1;b+=.01){const S=Hn.getPointOnCubicBezier(b,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);t.push(S.x,S.y)}else t=t.concat(u.points)});for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],isNaN(a)||(n=Math.min(n,a),r=Math.max(r,a)),isNaN(s)||(i=Math.min(i,s),o=Math.max(o,s));return{x:n,y:i,width:r-n,height:o-i}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Hn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Hn.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 Hn.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],d=a[3],h=a[4],g=a[5],v=a[6];return h+=g*t/o.pathLength,Hn.getPointOnEllipticalArc(s,l,u,d,h,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i<n&&(u*=-1);var d=l*u,h;if(i===n)h={x:a,y:s+d};else if((s-r)/(a-n+1e-8)===l)h={x:a+u,y:s+d};else{var g,v,b=this.getLineLength(n,r,i,o),S=(a-n)*(i-n)+(s-r)*(o-r);S=S/(b*b),g=n+S*(i-n),v=r+S*(o-r);var E=this.getLineLength(a,s,g,v),_=Math.sqrt(t*t-E*E);u=Math.sqrt(_*_/(1+l*l)),i<n&&(u*=-1),d=l*u,h={x:g+u,y:v+d}}return h}static getPointOnCubicBezier(t,n,r,i,o,a,s,l,u){function d(E){return E*E*E}function h(E){return 3*E*E*(1-E)}function g(E){return 3*E*(1-E)*(1-E)}function v(E){return(1-E)*(1-E)*(1-E)}var b=l*d(t)+a*h(t)+i*g(t)+n*v(t),S=u*d(t)+s*h(t)+o*g(t)+r*v(t);return{x:b,y:S}}static getPointOnQuadraticBezier(t,n,r,i,o,a,s){function l(v){return v*v}function u(v){return 2*v*(1-v)}function d(v){return(1-v)*(1-v)}var h=a*l(t)+i*u(t)+n*d(t),g=s*l(t)+o*u(t)+r*d(t);return{x:h,y:g}}static getPointOnEllipticalArc(t,n,r,i,o,a){var s=Math.cos(a),l=Math.sin(a),u={x:r*Math.cos(o),y:i*Math.sin(o)};return{x:t+(u.x*s-u.y*l),y:n+(u.x*l+u.y*s)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)n=n.replace(new RegExp(r[i],"g"),"|"+r[i]);var o=n.split("|"),a=[],s=[],l=0,u=0,d=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,h;for(i=1;i<o.length;i++){var g=o[i],v=g.charAt(0);for(g=g.slice(1),s.length=0;h=d.exec(g);)s.push(h[0]);for(var b=[],S=0,E=s.length;S<E;S++){if(s[S]==="00"){b.push(0,0);continue}var _=parseFloat(s[S]);isNaN(_)?b.push(0):b.push(_)}for(;b.length>0&&!isNaN(b[0]);){var k=null,T=[],A=l,M=u,R,D,j,F,H,K,te,G,$,U;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var X=b.shift(),Z=b.shift();if(l+=X,u+=Z,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]+X,u=a[W].points[1]+Z;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":D=l,j=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),j=u+(u-R.points[3])),T.push(D,j,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":D=l,j=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),j=u+(u-R.points[3])),T.push(D,j,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":D=l,j=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),j=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(D,j,l,u);break;case"t":D=l,j=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),j=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(D,j,l,u);break;case"A":F=b.shift(),H=b.shift(),K=b.shift(),te=b.shift(),G=b.shift(),$=l,U=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization($,U,l,u,te,G,F,H,K);break;case"a":F=b.shift(),H=b.shift(),K=b.shift(),te=b.shift(),G=b.shift(),$=l,U=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization($,U,l,u,te,G,F,H,K);break}a.push({command:k||v,points:T,start:{x:A,y:M},pathLength:this.calcLength(A,M,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Hn;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 d=i[4],h=i[5],g=i[4]+h,v=Math.PI/180;if(Math.abs(d-g)<v&&(v=Math.abs(d-g)),a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],d,0),h<0)for(l=d-v;l>g;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=d+v;l<g;l+=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],g,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),o}return 0}static convertEndpointToCenterParameterization(t,n,r,i,o,a,s,l,u){var d=u*(Math.PI/180),h=Math.cos(d)*(t-r)/2+Math.sin(d)*(n-i)/2,g=-1*Math.sin(d)*(t-r)/2+Math.cos(d)*(n-i)/2,v=h*h/(s*s)+g*g/(l*l);v>1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(g*g)-l*l*(h*h))/(s*s*(g*g)+l*l*(h*h)));o===a&&(b*=-1),isNaN(b)&&(b=0);var S=b*s*g/l,E=b*-l*h/s,_=(t+r)/2+Math.cos(d)*S-Math.sin(d)*E,k=(n+i)/2+Math.sin(d)*S+Math.cos(d)*E,T=function(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])},A=function(H,K){return(H[0]*K[0]+H[1]*K[1])/(T(H)*T(K))},M=function(H,K){return(H[0]*K[1]<H[1]*K[0]?-1:1)*Math.acos(A(H,K))},R=M([1,0],[(h-S)/s,(g-E)/l]),D=[(h-S)/s,(g-E)/l],j=[(-1*h-S)/s,(-1*g-E)/l],F=M(D,j);return A(D,j)<=-1&&(F=Math.PI),A(D,j)>=1&&(F=0),a===0&&F>0&&(F=F-2*Math.PI),a===1&&F<0&&(F=F+2*Math.PI),[_,k,s,l,R,F,d,a]}}Hn.prototype.className="Path";Hn.prototype._attrsAffectingSize=["data"];Ar(Hn);ee.addGetterSetter(Hn,"data");class pp extends fc{_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 g=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Hn.calcLength(i[i.length-4],i[i.length-3],"C",g),b=Hn.getPointOnQuadraticBezier(Math.min(1,1-a/v),g[0],g[1],g[2],g[3],g[4],g[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 d=(Math.atan2(u,l)+n)%n,h=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(d),t.moveTo(0,0),t.lineTo(-a,h/2),t.lineTo(-a,-h/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,h/2),t.lineTo(-a,-h/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}pp.prototype.className="Arrow";Ar(pp);ee.addGetterSetter(pp,"pointerLength",10,qe());ee.addGetterSetter(pp,"pointerWidth",10,qe());ee.addGetterSetter(pp,"pointerAtBeginning",!1);ee.addGetterSetter(pp,"pointerAtEnding",!0);let L0=class extends je{_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)}};L0.prototype._centroid=!0;L0.prototype.className="Circle";L0.prototype._attrsAffectingSize=["radius"];Ar(L0);ee.addGetterSetter(L0,"radius",0,qe());class ff extends je{_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)}}ff.prototype.className="Ellipse";ff.prototype._centroid=!0;ff.prototype._attrsAffectingSize=["radiusX","radiusY"];Ar(ff);ee.addComponentsGetterSetter(ff,"radius",["x","y"]);ee.addGetterSetter(ff,"radiusX",0,qe());ee.addGetterSetter(ff,"radiusY",0,qe());let hc=class ZG extends je{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 ZG({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};hc.prototype.className="Image";Ar(hc);ee.addGetterSetter(hc,"image");ee.addComponentsGetterSetter(hc,"crop",["x","y","width","height"]);ee.addGetterSetter(hc,"cropX",0,qe());ee.addGetterSetter(hc,"cropY",0,qe());ee.addGetterSetter(hc,"cropWidth",0,qe());ee.addGetterSetter(hc,"cropHeight",0,qe());var QG=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],s_e="Change.konva",l_e="none",j_="up",B_="right",$_="down",F_="left",u_e=QG.length;class MP extends a0{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<u_e;r++)t.on(QG[r]+s_e,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),n=this.getTag(),r,i,o,a,s,l,u;if(t&&n){switch(r=t.width(),i=t.height(),o=n.pointerDirection(),a=n.pointerWidth(),u=n.pointerHeight(),s=0,l=0,o){case j_:s=r/2,l=-1*u;break;case B_:s=r+a,l=i/2;break;case $_:s=r/2,l=i+u;break;case F_:s=-1*a,l=i/2;break}n.setAttrs({x:-1*s,y:-1*l,width:r,height:i}),t.setAttrs({x:-1*s,y:-1*l})}}}MP.prototype.className="Label";Ar(MP);class mp extends je{_sceneFunc(t){var n=this.width(),r=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let l=0,u=0,d=0,h=0;typeof s=="number"?l=u=d=h=Math.min(s,n/2,r/2):(l=Math.min(s[0]||0,n/2,r/2),u=Math.min(s[1]||0,n/2,r/2),h=Math.min(s[2]||0,n/2,r/2),d=Math.min(s[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(l,0),i===j_&&(t.lineTo((n-o)/2,0),t.lineTo(n/2,-1*a),t.lineTo((n+o)/2,0)),t.lineTo(n-u,0),t.arc(n-u,u,u,Math.PI*3/2,0,!1),i===B_&&(t.lineTo(n,(r-a)/2),t.lineTo(n+o,r/2),t.lineTo(n,(r+a)/2)),t.lineTo(n,r-h),t.arc(n-h,r-h,h,0,Math.PI/2,!1),i===$_&&(t.lineTo((n+o)/2,r),t.lineTo(n/2,r+a),t.lineTo((n-o)/2,r)),t.lineTo(d,r),t.arc(d,r-d,d,Math.PI/2,Math.PI,!1),i===F_&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*o,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,n=0,r=this.pointerWidth(),i=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),s=this.height();return o===j_?(n-=i,s+=i):o===$_?s+=i:o===F_?(t-=r*1.5,a+=r):o===B_&&(a+=r*1.5),{x:t,y:n,width:a,height:s}}}mp.prototype.className="Tag";Ar(mp);ee.addGetterSetter(mp,"pointerDirection",l_e);ee.addGetterSetter(mp,"pointerWidth",0,qe());ee.addGetterSetter(mp,"pointerHeight",0,qe());ee.addGetterSetter(mp,"cornerRadius",0,AG(4));let zy=class extends je{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),i=this.height();if(t.beginPath(),!n)t.rect(0,0,r,i);else{let o=0,a=0,s=0,l=0;typeof n=="number"?o=a=s=l=Math.min(n,r/2,i/2):(o=Math.min(n[0]||0,r/2,i/2),a=Math.min(n[1]||0,r/2,i/2),l=Math.min(n[2]||0,r/2,i/2),s=Math.min(n[3]||0,r/2,i/2)),t.moveTo(o,0),t.lineTo(r-a,0),t.arc(r-a,a,a,Math.PI*3/2,0,!1),t.lineTo(r,i-l),t.arc(r-l,i-l,l,0,Math.PI/2,!1),t.lineTo(s,i),t.arc(s,i-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,o),t.arc(o,o,o,Math.PI,Math.PI*3/2,!1)}t.closePath(),t.fillStrokeShape(this)}};zy.prototype.className="Rect";Ar(zy);ee.addGetterSetter(zy,"cornerRadius",0,AG(4));class gp extends je{_sceneFunc(t){const n=this._getPoints();t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,n=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:n*Math.sin(i*2*Math.PI/t),y:-1*n*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var n=t[0].x,r=t[0].y,i=t[0].x,o=t[0].y;return t.forEach(a=>{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}gp.prototype.className="RegularPolygon";gp.prototype._centroid=!0;gp.prototype._attrsAffectingSize=["radius"];Ar(gp);ee.addGetterSetter(gp,"radius",0,qe());ee.addGetterSetter(gp,"sides",0,qe());var pD=Math.PI*2;class vp extends je{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,pD,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),pD,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}vp.prototype.className="Ring";vp.prototype._centroid=!0;vp.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Ar(vp);ee.addGetterSetter(vp,"innerRadius",0,qe());ee.addGetterSetter(vp,"outerRadius",0,qe());class gu extends je{constructor(t){super(t),this._updated=!0,this.anim=new ts(()=>{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],d=o[i+3],h=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,d),t.closePath(),t.fillStrokeShape(this)),h)if(a){var g=a[n],v=r*2;t.drawImage(h,s,l,u,d,g[v+0],g[v+1],u,d)}else t.drawImage(h,s,l,u,d,0,0,u,d)}_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],d=r*2;t.rect(u[d+0],u[d+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t<o-1?this.frameIndex(t+1):this.frameIndex(0)}}gu.prototype.className="Sprite";Ar(gu);ee.addGetterSetter(gu,"animation");ee.addGetterSetter(gu,"animations");ee.addGetterSetter(gu,"frameOffsets");ee.addGetterSetter(gu,"image");ee.addGetterSetter(gu,"frameIndex",0,qe());ee.addGetterSetter(gu,"frameRate",17,qe());ee.backCompat(gu,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class hf extends je{_sceneFunc(t){var n=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var o=1;o<i*2;o++){var a=o%2===0?r:n,s=a*Math.sin(o*Math.PI/i),l=-1*a*Math.cos(o*Math.PI/i);t.lineTo(s,l)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}hf.prototype.className="Star";hf.prototype._centroid=!0;hf.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Ar(hf);ee.addGetterSetter(hf,"numPoints",5,qe());ee.addGetterSetter(hf,"innerRadius",0,qe());ee.addGetterSetter(hf,"outerRadius",0,qe());function JG(e){return Array.from(e)}var jm="auto",c_e="center",dv="justify",d_e="Change.konva",f_e="2d",mD="-",eq="left",h_e="text",p_e="Text",m_e="top",g_e="bottom",gD="middle",tq="normal",v_e="px ",Hb=" ",y_e="right",b_e="word",S_e="char",vD="none",NC="…",nq=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],x_e=nq.length;function w_e(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Vb;function jC(){return Vb||(Vb=fe.createCanvasElement().getContext(f_e),Vb)}function C_e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function __e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function k_e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class Lr extends je{constructor(t){super(k_e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<x_e;n++)this.on(nq[n]+d_e,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),l=0,u=this.align(),d=this.getWidth(),h=this.letterSpacing(),g=this.fill(),v=this.textDecoration(),b=v.indexOf("underline")!==-1,S=v.indexOf("line-through")!==-1,E,_=0,_=a/2,k=0,T=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",gD),t.setAttr("textAlign",eq),s===gD?l=(this.getHeight()-r*a-i*2)/2:s===g_e&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),E=0;E<r;E++){var k=0,T=0,A=n[E],M=A.text,R=A.width,D=A.lastInParagraph,j,F,H;if(t.save(),u===y_e?k+=d-R-i*2:u===c_e&&(k+=(d-R-i*2)/2),b&&(t.save(),t.beginPath(),t.moveTo(k,_+T+Math.round(o/2)),j=M.split(" ").length-1,F=j===0,H=u===dv&&D&&!F?d-i*2:R,t.lineTo(k+Math.round(H),_+T+Math.round(o/2)),t.lineWidth=o/15,t.strokeStyle=g,t.stroke(),t.restore()),S&&(t.save(),t.beginPath(),t.moveTo(k,_+T),j=M.split(" ").length-1,F=j===0,H=u===dv&&D&&!F?d-i*2:R,t.lineTo(k+Math.round(H),_+T),t.lineWidth=o/15,t.strokeStyle=g,t.stroke(),t.restore()),h!==0||u===dv){j=M.split(" ").length-1;for(var K=JG(M),te=0;te<K.length;te++){var G=K[te];G===" "&&!D&&u===dv&&(k+=(d-i*2-R)/j),this._partialTextX=k,this._partialTextY=_+T,this._partialText=G,t.fillStrokeShape(this),k+=this.measureSize(G).width+h}}else this._partialTextX=k,this._partialTextY=_+T,this._partialText=M,t.fillStrokeShape(this);t.restore(),r>1&&(_+=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(h_e,n),this}getWidth(){var t=this.attrs.width===jm||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===jm||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=jC(),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()+Hb+this.fontVariant()+Hb+(this.fontSize()+v_e)+w_e(this.fontFamily())}_addTextLine(t){this.align()===dv&&(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 jC().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!==jm&&o!==void 0,l=a!==jm&&a!==void 0,u=this.padding(),d=o-u*2,h=a-u*2,g=0,v=this.wrap(),b=v!==vD,S=v!==S_e&&b,E=this.ellipsis();this.textArr=[],jC().font=this._getContextFont();for(var _=E?this._getTextWidth(NC):0,k=0,T=t.length;k<T;++k){var A=t[k],M=this._getTextWidth(A);if(s&&M>d)for(;A.length>0;){for(var R=0,D=A.length,j="",F=0;R<D;){var H=R+D>>>1,K=A.slice(0,H+1),te=this._getTextWidth(K)+_;te<=d?(R=H+1,j=K,F=te):D=H}if(j){if(S){var G,$=A[j.length],U=$===Hb||$===mD;U&&F<=d?G=j.length:G=Math.max(j.lastIndexOf(Hb),j.lastIndexOf(mD))+1,G>0&&(R=G,j=j.slice(0,R),F=this._getTextWidth(j))}j=j.trimRight(),this._addTextLine(j),r=Math.max(r,F),g+=i;var X=this._shouldHandleEllipsis(g);if(X){this._tryToAddEllipsisToLastLine();break}if(A=A.slice(R),A=A.trimLeft(),A.length>0&&(M=this._getTextWidth(A),M<=d)){this._addTextLine(A),g+=i,r=Math.max(r,M);break}}else break}else this._addTextLine(A),g+=i,r=Math.max(r,M),this._shouldHandleEllipsis(g)&&k<T-1&&this._tryToAddEllipsisToLastLine();if(l&&g+i>h)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!==jm&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==vD;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==jm&&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+NC)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+NC)}}getStrokeScaleEnabled(){return!0}}Lr.prototype._fillFunc=C_e;Lr.prototype._strokeFunc=__e;Lr.prototype.className=p_e;Lr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];Ar(Lr);ee.overWriteSetter(Lr,"width",TP());ee.overWriteSetter(Lr,"height",TP());ee.addGetterSetter(Lr,"fontFamily","Arial");ee.addGetterSetter(Lr,"fontSize",12,qe());ee.addGetterSetter(Lr,"fontStyle",tq);ee.addGetterSetter(Lr,"fontVariant",tq);ee.addGetterSetter(Lr,"padding",0,qe());ee.addGetterSetter(Lr,"align",eq);ee.addGetterSetter(Lr,"verticalAlign",m_e);ee.addGetterSetter(Lr,"lineHeight",1,qe());ee.addGetterSetter(Lr,"wrap",b_e);ee.addGetterSetter(Lr,"ellipsis",!1,rl());ee.addGetterSetter(Lr,"letterSpacing",0,qe());ee.addGetterSetter(Lr,"text","",T0());ee.addGetterSetter(Lr,"textDecoration","");var E_e="",rq="normal";function iq(e){e.fillText(this.partialText,0,0)}function oq(e){e.strokeText(this.partialText,0,0)}class bi extends je{constructor(t){super(t),this.dummyCanvas=fe.createCanvasElement(),this.dataArray=[],this.dataArray=Hn.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=Hn.parsePathData(this.attrs.data),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a<o.length;a++){t.save();var s=o[a].p0;t.translate(s.x,s.y),t.rotate(o[a].rotation),this.partialText=o[a].text,t.fillStrokeShape(this),n==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}n==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var n=this.glyphInfo;if(n.length>=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<n.length;i++){var o=n[i].p1;t.lineTo(o.x,o.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return Lr.prototype.setText.call(this,t)}_getContextFont(){return Lr.prototype._getContextFont.call(this)}_getTextSize(t){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,n=this._getTextSize(this.attrs.text),r=this.letterSpacing(),i=this.align(),o=this.kerningFunc();this.textWidth=n.width,this.textHeight=n.height;var a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);this.glyphInfo=[];for(var s=0,l=0;l<t.dataArray.length;l++)t.dataArray[l].pathLength>0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var d=JG(this.text()),h=this.text().split(" ").length-1,g,v,b,S=-1,E=0,_=function(){E=0;for(var te=t.dataArray,G=S+1;G<te.length;G++){if(te[G].pathLength>0)return S=G,te[G];te[G].command==="M"&&(g={x:te[G].points[0],y:te[G].points[1]})}return{}},k=function(te){var G=t._getTextSize(te).width+r;te===" "&&i==="justify"&&(G+=(s-a)/h);var $=0,U=0;for(v=void 0;Math.abs(G-$)/G>.01&&U<20;){U++;for(var X=$;b===void 0;)b=_(),b&&X+b.pathLength<G&&(X+=b.pathLength,b=void 0);if(Object.keys(b).length===0||g===void 0)return;var Z=!1;switch(b.command){case"L":Hn.getLineLength(g.x,g.y,b.points[0],b.points[1])>G?v=Hn.getPointOnLine(G,g.x,g.y,b.points[0],b.points[1],g.x,g.y):b=void 0;break;case"A":var W=b.points[4],Q=b.points[5],re=b.points[4]+Q;E===0?E=W+1e-8:G>$?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E<re||Q>=0&&E>re)&&(E=re,Z=!0),v=Hn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?G>b.pathLength?E=1e-8:E=G/b.pathLength:G>$?E+=(G-$)/b.pathLength/2:E=Math.max(E-($-G)/b.pathLength/2,0),E>1&&(E=1,Z=!0),v=Hn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=G/b.pathLength:G>$?E+=(G-$)/b.pathLength:E-=($-G)/b.pathLength,E>1&&(E=1,Z=!0),v=Hn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&($=Hn.getLineLength(g.x,g.y,v.x,v.y)),Z&&(Z=!1,b=void 0)}},T="C",A=t._getTextSize(T).width+r,M=u/A-1,R=0;R<M&&(k(T),!(g===void 0||v===void 0));R++)g=v;for(var D=0;D<d.length&&(k(d[D]),!(g===void 0||v===void 0));D++){var j=Hn.getLineLength(g.x,g.y,v.x,v.y),F=0;if(o)try{F=o(d[D-1],d[D])*this.fontSize()}catch{F=0}g.x+=F,v.x+=F,this.textWidth+=F;var H=Hn.getPointOnLine(F+j/2,g.x,g.y,v.x,v.y),K=Math.atan2(v.y-g.y,v.x-g.x);this.glyphInfo.push({transposeX:H.x,transposeY:H.y,text:d[D],rotation:K,p0:g,p1:v}),g=v}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(d){t.push(d.p0.x),t.push(d.p0.y),t.push(d.p1.x),t.push(d.p1.y)});for(var n=t[0]||0,r=t[0]||0,i=t[1]||0,o=t[1]||0,a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);var u=this.fontSize();return{x:n-u/2,y:i-u/2,width:r-n+u,height:o-i+u}}destroy(){return fe.releaseCanvas(this.dummyCanvas),super.destroy()}}bi.prototype._fillFunc=iq;bi.prototype._strokeFunc=oq;bi.prototype._fillFuncHit=iq;bi.prototype._strokeFuncHit=oq;bi.prototype.className="TextPath";bi.prototype._attrsAffectingSize=["text","fontSize","data"];Ar(bi);ee.addGetterSetter(bi,"data");ee.addGetterSetter(bi,"fontFamily","Arial");ee.addGetterSetter(bi,"fontSize",12,qe());ee.addGetterSetter(bi,"fontStyle",rq);ee.addGetterSetter(bi,"align","left");ee.addGetterSetter(bi,"letterSpacing",0,qe());ee.addGetterSetter(bi,"textBaseline","middle");ee.addGetterSetter(bi,"fontVariant",rq);ee.addGetterSetter(bi,"text",E_e);ee.addGetterSetter(bi,"textDecoration",null);ee.addGetterSetter(bi,"kerningFunc",null);var aq="tr-konva",P_e=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(e=>e+`.${aq}`).join(" "),yD="nodesRect",T_e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],L_e={"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 A_e="ontouchstart"in mt._global;function O_e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(L_e[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 rS=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],bD=1e8;function M_e(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 sq(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 I_e(e,t){const n=M_e(e);return sq(e,t,n)}function R_e(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=mt.getAngle(e[i]),a=Math.abs(o-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<n&&(r=o)}return r}let Rn=class extends a0{constructor(t){super(t),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(P_e,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return fe.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return aq+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(r=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(T_e.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(yD),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(yD,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=(mt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),d={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 sq(d,-mt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-bD,y:-bD,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const d=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var h=[{x:d.x,y:d.y},{x:d.x+d.width,y:d.y},{x:d.x+d.width,y:d.y+d.height},{x:d.x,y:d.y+d.height}],g=u.getAbsoluteTransform();h.forEach(function(v){var b=g.point(v);n.push(b)})});const r=new ka;r.rotate(-mt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var d=r.point(u);i===void 0&&(i=a=d.x,o=s=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),a=Math.max(a,d.x),s=Math.max(s,d.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:mt.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(),rS.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new zy({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:A_e?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=mt.getAngle(this.rotation()),o=O_e(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 je({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 d=o.getAbsolutePosition();if(!(u.x===d.x&&u.y===d.y)){if(this._movingAnchorName==="rotater"){var h=this._getNodeRect();n=o.x()-h.width/2,r=-o.y()+h.height/2;let te=Math.atan2(-r,n)+Math.PI/2;h.height<0&&(te-=Math.PI);var g=mt.getAngle(this.rotation());const G=g+te,$=mt.getAngle(this.rotationSnapTolerance()),X=R_e(this.rotationSnaps(),G,$)-h.rotation,Z=I_e(h,X);this._fitNodesInto(Z,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 S=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*S,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 S=this.findOne(".top-right").x()<b.x?-1:1,E=this.findOne(".top-right").y()>b.y?-1:1;n=i*this.cos*S,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var _=o.position();this.findOne(".top-left").y(_.y),this.findOne(".bottom-right").x(_.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 S=b.x<o.x()?-1:1,E=o.y()<b.y?-1:1;n=i*this.cos*S,r=i*this.sin*E,o.x(b.x-n),o.y(b.y+r)}_=o.position(),this.findOne(".top-left").x(_.x),this.findOne(".bottom-right").y(_.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(v){var b=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(o.y()-b.y,2));var S=this.findOne(".bottom-right").x()<b.x?-1:1,E=this.findOne(".bottom-right").y()<b.y?-1:1;n=i*this.cos*S,r=i*this.sin*E,this.findOne(".bottom-right").x(b.x+n),this.findOne(".bottom-right").y(b.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var k=this.centeredScaling()||t.altKey;if(k){var T=this.findOne(".top-left"),A=this.findOne(".bottom-right"),M=T.x(),R=T.y(),D=this.getWidth()-A.x(),j=this.getHeight()-A.y();A.move({x:-M,y:-R}),T.move({x:D,y:j})}var F=this.findOne(".top-left").getAbsolutePosition();n=F.x,r=F.y;var H=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),K=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:H,height:K,rotation:mt.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var n=this.getNode();this._fire("transformend",{evt:t,target:n}),n&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(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 ka;if(a.rotate(mt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const h=a.point({x:-this.padding()*2,y:0});if(t.x+=h.x,t.y+=h.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const h=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const h=a.point({x:0,y:-this.padding()*2});if(t.x+=h.x,t.y+=h.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const h=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const h=this.boundBoxFunc()(r,t);h?t=h:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ka;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ka;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const d=u.multiply(l.invert());this._nodes.forEach(h=>{var g;const v=h.getParent().getAbsoluteTransform(),b=h.getTransform().copy();b.translate(h.offsetX(),h.offsetY());const S=new ka;S.multiply(v.copy().invert()).multiply(d).multiply(v).multiply(b);const E=S.decompose();h.setAttrs(E),this._fire("transform",{evt:n,target:h}),h._fire("transform",{evt:n,target:h}),(g=h.getLayer())===null||g===void 0||g.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=""),a0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Qe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};function D_e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){rS.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+rS.join(", "))}),e||[]}Rn.prototype.className="Transformer";Ar(Rn);ee.addGetterSetter(Rn,"enabledAnchors",rS,D_e);ee.addGetterSetter(Rn,"flipEnabled",!0,rl());ee.addGetterSetter(Rn,"resizeEnabled",!0);ee.addGetterSetter(Rn,"anchorSize",10,qe());ee.addGetterSetter(Rn,"rotateEnabled",!0);ee.addGetterSetter(Rn,"rotationSnaps",[]);ee.addGetterSetter(Rn,"rotateAnchorOffset",50,qe());ee.addGetterSetter(Rn,"rotationSnapTolerance",5,qe());ee.addGetterSetter(Rn,"borderEnabled",!0);ee.addGetterSetter(Rn,"anchorStroke","rgb(0, 161, 255)");ee.addGetterSetter(Rn,"anchorStrokeWidth",1,qe());ee.addGetterSetter(Rn,"anchorFill","white");ee.addGetterSetter(Rn,"anchorCornerRadius",0,qe());ee.addGetterSetter(Rn,"borderStroke","rgb(0, 161, 255)");ee.addGetterSetter(Rn,"borderStrokeWidth",1,qe());ee.addGetterSetter(Rn,"borderDash");ee.addGetterSetter(Rn,"keepRatio",!0);ee.addGetterSetter(Rn,"centeredScaling",!1);ee.addGetterSetter(Rn,"ignoreStroke",!1);ee.addGetterSetter(Rn,"padding",0,qe());ee.addGetterSetter(Rn,"node");ee.addGetterSetter(Rn,"nodes");ee.addGetterSetter(Rn,"boundBoxFunc");ee.addGetterSetter(Rn,"anchorDragBoundFunc");ee.addGetterSetter(Rn,"shouldOverdrawWholeArea",!1);ee.addGetterSetter(Rn,"useSingleNodeRotation",!0);ee.backCompat(Rn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class pc extends je{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,mt.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)}}pc.prototype.className="Wedge";pc.prototype._centroid=!0;pc.prototype._attrsAffectingSize=["radius"];Ar(pc);ee.addGetterSetter(pc,"radius",0,qe());ee.addGetterSetter(pc,"angle",0,qe());ee.addGetterSetter(pc,"clockwise",!1);ee.backCompat(pc,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function SD(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var N_e=[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],j_e=[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 B_e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,d,h,g,v,b,S,E,_,k,T,A,M,R,D,j,F,H,K,te,G=t+t+1,$=r-1,U=i-1,X=t+1,Z=X*(X+1)/2,W=new SD,Q=null,re=W,de=null,ve=null,Pe=N_e[t],be=j_e[t];for(s=1;s<G;s++)re=re.next=new SD,s===X&&(Q=re);for(re.next=W,h=d=0,a=0;a<i;a++){for(A=M=R=D=g=v=b=S=0,E=X*(j=n[d]),_=X*(F=n[d+1]),k=X*(H=n[d+2]),T=X*(K=n[d+3]),g+=Z*j,v+=Z*F,b+=Z*H,S+=Z*K,re=W,s=0;s<X;s++)re.r=j,re.g=F,re.b=H,re.a=K,re=re.next;for(s=1;s<X;s++)l=d+(($<s?$:s)<<2),g+=(re.r=j=n[l])*(te=X-s),v+=(re.g=F=n[l+1])*te,b+=(re.b=H=n[l+2])*te,S+=(re.a=K=n[l+3])*te,A+=j,M+=F,R+=H,D+=K,re=re.next;for(de=W,ve=Q,o=0;o<r;o++)n[d+3]=K=S*Pe>>be,K!==0?(K=255/K,n[d]=(g*Pe>>be)*K,n[d+1]=(v*Pe>>be)*K,n[d+2]=(b*Pe>>be)*K):n[d]=n[d+1]=n[d+2]=0,g-=E,v-=_,b-=k,S-=T,E-=de.r,_-=de.g,k-=de.b,T-=de.a,l=h+((l=o+t+1)<$?l:$)<<2,A+=de.r=n[l],M+=de.g=n[l+1],R+=de.b=n[l+2],D+=de.a=n[l+3],g+=A,v+=M,b+=R,S+=D,de=de.next,E+=j=ve.r,_+=F=ve.g,k+=H=ve.b,T+=K=ve.a,A-=j,M-=F,R-=H,D-=K,ve=ve.next,d+=4;h+=r}for(o=0;o<r;o++){for(M=R=D=A=v=b=S=g=0,d=o<<2,E=X*(j=n[d]),_=X*(F=n[d+1]),k=X*(H=n[d+2]),T=X*(K=n[d+3]),g+=Z*j,v+=Z*F,b+=Z*H,S+=Z*K,re=W,s=0;s<X;s++)re.r=j,re.g=F,re.b=H,re.a=K,re=re.next;for(u=r,s=1;s<=t;s++)d=u+o<<2,g+=(re.r=j=n[d])*(te=X-s),v+=(re.g=F=n[d+1])*te,b+=(re.b=H=n[d+2])*te,S+=(re.a=K=n[d+3])*te,A+=j,M+=F,R+=H,D+=K,re=re.next,s<U&&(u+=r);for(d=o,de=W,ve=Q,a=0;a<i;a++)l=d<<2,n[l+3]=K=S*Pe>>be,K>0?(K=255/K,n[l]=(g*Pe>>be)*K,n[l+1]=(v*Pe>>be)*K,n[l+2]=(b*Pe>>be)*K):n[l]=n[l+1]=n[l+2]=0,g-=E,v-=_,b-=k,S-=T,E-=de.r,_-=de.g,k-=de.b,T-=de.a,l=o+((l=a+X)<U?l:U)*r<<2,g+=A+=de.r=n[l],v+=M+=de.g=n[l+1],b+=R+=de.b=n[l+2],S+=D+=de.a=n[l+3],de=de.next,E+=j=ve.r,_+=F=ve.g,k+=H=ve.b,T+=K=ve.a,A-=j,M-=F,R-=H,D-=K,ve=ve.next,d+=r}}const $_e=function(t){var n=Math.round(this.blurRadius());n>0&&B_e(t,n)};ee.addGetterSetter(Qe,"blurRadius",0,qe(),ee.afterSetFilter);const F_e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};ee.addGetterSetter(Qe,"brightness",0,qe(),ee.afterSetFilter);const z_e=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,i=150,o=150,a=150,s;for(s=0;s<r;s+=4)i=n[s],o=n[s+1],a=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};ee.addGetterSetter(Qe,"contrast",0,qe(),ee.afterSetFilter);const H_e=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,d=l*4,h=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 g=(h-1)*d,v=o;h+v<1&&(v=0),h+v>u&&(v=0);var b=(h-1+v)*l*4,S=l;do{var E=g+(S-1)*4,_=a;S+_<1&&(_=0),S+_>l&&(_=0);var k=b+(S-1+_)*4,T=s[E]-s[k],A=s[E+1]-s[k+1],M=s[E+2]-s[k+2],R=T,D=R>0?R:-R,j=A>0?A:-A,F=M>0?M:-M;if(j>D&&(R=A),F>D&&(R=M),R*=t,i){var H=s[E]+R,K=s[E+1]+R,te=s[E+2]+R;s[E]=H>255?255:H<0?0:H,s[E+1]=K>255?255:K<0?0:K,s[E+2]=te>255?255:te<0?0:te}else{var G=n-R;G<0?G=0:G>255&&(G=255),s[E]=s[E+1]=s[E+2]=G}}while(--S)}while(--h)};ee.addGetterSetter(Qe,"embossStrength",.5,qe(),ee.afterSetFilter);ee.addGetterSetter(Qe,"embossWhiteLevel",.5,qe(),ee.afterSetFilter);ee.addGetterSetter(Qe,"embossDirection","top-left",null,ee.afterSetFilter);ee.addGetterSetter(Qe,"embossBlend",!1,null,ee.afterSetFilter);function BC(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 V_e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],d=u,h,g,v=this.enhance();if(v!==0){for(g=0;g<n;g+=4)o=t[g+0],o<r?r=o:o>i&&(i=o),l=t[g+1],l<a?a=l:l>s&&(s=l),h=t[g+2],h<u?u=h:h>d&&(d=h);i===r&&(i=255,r=0),s===a&&(s=255,a=0),d===u&&(d=255,u=0);var b,S,E,_,k,T,A,M,R;for(v>0?(S=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),M=d+v*(255-d),R=u-v*(u-0)):(b=(i+r)*.5,S=i+v*(i-b),E=r+v*(r-b),_=(s+a)*.5,k=s+v*(s-_),T=a+v*(a-_),A=(d+u)*.5,M=d+v*(d-A),R=u+v*(u-A)),g=0;g<n;g+=4)t[g+0]=BC(t[g+0],r,i,E,S),t[g+1]=BC(t[g+1],a,s,T,k),t[g+2]=BC(t[g+2],u,d,R,M)}};ee.addGetterSetter(Qe,"enhance",0,qe(),ee.afterSetFilter);const W_e=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};ee.addGetterSetter(Qe,"hue",0,qe(),ee.afterSetFilter);ee.addGetterSetter(Qe,"saturation",0,qe(),ee.afterSetFilter);ee.addGetterSetter(Qe,"luminance",0,qe(),ee.afterSetFilter);const U_e=function(e){var t=e.data,n=t.length,r=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=this.luminance()*127,s,l=r*i*Math.cos(o*Math.PI/180),u=r*i*Math.sin(o*Math.PI/180),d=.299*r+.701*l+.167*u,h=.587*r-.587*l+.33*u,g=.114*r-.114*l-.497*u,v=.299*r-.299*l-.328*u,b=.587*r+.413*l+.035*u,S=.114*r-.114*l+.293*u,E=.299*r-.3*l+1.25*u,_=.587*r-.586*l-1.05*u,k=.114*r+.886*l-.2*u,T,A,M,R;for(s=0;s<n;s+=4)T=t[s+0],A=t[s+1],M=t[s+2],R=t[s+3],t[s+0]=d*T+h*A+g*M+a,t[s+1]=v*T+b*A+S*M+a,t[s+2]=E*T+_*A+k*M+a,t[s+3]=R},G_e=function(e){var t=e.data,n=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a,s=r*i*Math.cos(o*Math.PI/180),l=r*i*Math.sin(o*Math.PI/180),u=.299*r+.701*s+.167*l,d=.587*r-.587*s+.33*l,h=.114*r-.114*s-.497*l,g=.299*r-.299*s-.328*l,v=.587*r+.413*s+.035*l,b=.114*r-.114*s+.293*l,S=.299*r-.3*s+1.25*l,E=.587*r-.586*s-1.05*l,_=.114*r+.886*s-.2*l,k,T,A,M;for(a=0;a<n;a+=4)k=t[a+0],T=t[a+1],A=t[a+2],M=t[a+3],t[a+0]=u*k+d*T+h*A,t[a+1]=g*k+v*T+b*A,t[a+2]=S*k+E*T+_*A,t[a+3]=M};ee.addGetterSetter(Qe,"hue",0,qe(),ee.afterSetFilter);ee.addGetterSetter(Qe,"saturation",0,qe(),ee.afterSetFilter);ee.addGetterSetter(Qe,"value",0,qe(),ee.afterSetFilter);const q_e=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};var Y_e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,d,h,g=0,v=0,b=0,S=0,E,_=Math.sqrt(s*s+l*l);d=o-s,h=a-l,E=Math.sqrt(d*d+h*h),_=E>_?E:_;var k=a,T=o,A,M,R=360/T*Math.PI/180,D,j;for(M=0;M<T;M+=1)for(D=Math.sin(M*R),j=Math.cos(M*R),A=0;A<k;A+=1)d=Math.floor(s+_*A/k*j),h=Math.floor(l+_*A/k*D),u=(h*o+d)*4,g=r[u+0],v=r[u+1],b=r[u+2],S=r[u+3],u=(M+A*o)*4,i[u+0]=g,i[u+1]=v,i[u+2]=b,i[u+3]=S},K_e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,d,h,g,v,b=0,S=0,E=0,_=0,k,T=Math.sqrt(s*s+l*l);d=o-s,h=a-l,k=Math.sqrt(d*d+h*h),T=k>T?k:T;var A=a,M=o,R,D,j=n.polarRotation||0,F,H;for(d=0;d<o;d+=1)for(h=0;h<a;h+=1)g=d-s,v=h-l,R=Math.sqrt(g*g+v*v)*A/T,D=(Math.atan2(v,g)*180/Math.PI+360+j)%360,D=D*M/360,F=Math.floor(D),H=Math.floor(R),u=(H*o+F)*4,b=r[u+0],S=r[u+1],E=r[u+2],_=r[u+3],u=(h*o+d)*4,i[u+0]=b,i[u+1]=S,i[u+2]=E,i[u+3]=_};const X_e=function(e){var t=e.width,n=e.height,r,i,o,a,s,l,u,d,h,g,v=Math.round(this.kaleidoscopePower()),b=Math.round(this.kaleidoscopeAngle()),S=Math.floor(t*(b%360)/360);if(!(v<1)){var E=fe.createCanvasElement();E.width=t,E.height=n;var _=E.getContext("2d").getImageData(0,0,t,n);fe.releaseCanvas(E),Y_e(e,_,{polarCenterX:t/2,polarCenterY:n/2});for(var k=t/Math.pow(2,v);k<=8;)k=k*2,v-=1;k=Math.ceil(k);var T=k,A=0,M=T,R=1;for(S+k>t&&(A=T,M=0,R=-1),i=0;i<n;i+=1)for(r=A;r!==M;r+=R)o=Math.round(r+S)%t,h=(t*i+o)*4,s=_.data[h+0],l=_.data[h+1],u=_.data[h+2],d=_.data[h+3],g=(t*i+r)*4,_.data[g+0]=s,_.data[g+1]=l,_.data[g+2]=u,_.data[g+3]=d;for(i=0;i<n;i+=1)for(T=Math.floor(k),a=0;a<v;a+=1){for(r=0;r<T+1;r+=1)h=(t*i+r)*4,s=_.data[h+0],l=_.data[h+1],u=_.data[h+2],d=_.data[h+3],g=(t*i+T*2-r-1)*4,_.data[g+0]=s,_.data[g+1]=l,_.data[g+2]=u,_.data[g+3]=d;T*=2}K_e(_,e,{polarRotation:0})}};ee.addGetterSetter(Qe,"kaleidoscopePower",2,qe(),ee.afterSetFilter);ee.addGetterSetter(Qe,"kaleidoscopeAngle",0,qe(),ee.afterSetFilter);function Wb(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function fv(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function Z_e(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function Q_e(e,t){var n=Wb(e,0,0),r=Wb(e,e.width-1,0),i=Wb(e,0,e.height-1),o=Wb(e,e.width-1,e.height-1),a=t||10;if(fv(n,r)<a&&fv(r,o)<a&&fv(o,i)<a&&fv(i,n)<a){for(var s=Z_e([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var d=fv(s,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=d<a?0:255}return l}}function J_e(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function e8e(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,d=0,h=0;h<i;h++)for(var g=0;g<i;g++){var v=s+h-o,b=l+g-o;if(v>=0&&v<n&&b>=0&&b<t){var S=v*t+b,E=r[h*i+g];d+=e[S]*E}}a[u]=d===255*8?255:0}return a}function t8e(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,d=0,h=0;h<i;h++)for(var g=0;g<i;g++){var v=s+h-o,b=l+g-o;if(v>=0&&v<n&&b>=0&&b<t){var S=v*t+b,E=r[h*i+g];d+=e[S]*E}}a[u]=d>=255*4?255:0}return a}function n8e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,d=0,h=0;h<i;h++)for(var g=0;g<i;g++){var v=s+h-o,b=l+g-o;if(v>=0&&v<n&&b>=0&&b<t){var S=v*t+b,E=r[h*i+g];d+=e[S]*E}}a[u]=d}return a}const r8e=function(e){var t=this.threshold(),n=Q_e(e,t);return n&&(n=e8e(n,e.width,e.height),n=t8e(n,e.width,e.height),n=n8e(n,e.width,e.height),J_e(e,n)),e};ee.addGetterSetter(Qe,"threshold",0,qe(),ee.afterSetFilter);const i8e=function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,o;for(o=0;o<r;o+=4)n[o+0]+=i-2*i*Math.random(),n[o+1]+=i-2*i*Math.random(),n[o+2]+=i-2*i*Math.random()};ee.addGetterSetter(Qe,"noise",.2,qe(),ee.afterSetFilter);const o8e=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,o,a,s,l,u,d,h=Math.ceil(n/t),g=Math.ceil(r/t),v,b,S,E,_,k,T,A=e.data;if(t<=0){fe.error("pixelSize value can not be <= 0");return}for(_=0;_<h;_+=1)for(k=0;k<g;k+=1){for(s=0,l=0,u=0,d=0,v=_*t,b=v+t,S=k*t,E=S+t,T=0,i=v;i<b;i+=1)if(!(i>=n))for(o=S;o<E;o+=1)o>=r||(a=(n*o+i)*4,s+=A[a+0],l+=A[a+1],u+=A[a+2],d+=A[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,d=d/T,i=v;i<b;i+=1)if(!(i>=n))for(o=S;o<E;o+=1)o>=r||(a=(n*o+i)*4,A[a+0]=s,A[a+1]=l,A[a+2]=u,A[a+3]=d)}};ee.addGetterSetter(Qe,"pixelSize",8,qe(),ee.afterSetFilter);const a8e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o<r;o+=1)n[o]=Math.floor(n[o]/i)*i};ee.addGetterSetter(Qe,"levels",.5,qe(),ee.afterSetFilter);const s8e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a,s;for(a=0;a<n;a+=4)s=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=s*r,t[a+1]=s*i,t[a+2]=s*o,t[a+3]=t[a+3]};ee.addGetterSetter(Qe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"blue",0,LG,ee.afterSetFilter);const l8e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s<n;s+=4)l=1-a,t[s]=r*a+t[s]*l,t[s+1]=i*a+t[s+1]*l,t[s+2]=o*a+t[s+2]*l};ee.addGetterSetter(Qe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"blue",0,LG,ee.afterSetFilter);ee.addGetterSetter(Qe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const u8e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r<n;r+=4)i=t[r+0],o=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+o*.769+a*.189),t[r+1]=Math.min(255,i*.349+o*.686+a*.168),t[r+2]=Math.min(255,i*.272+o*.534+a*.131)},c8e=function(e){var t=e.data,n=e.width,r=e.height,i=n*4,o=r;do{var a=(o-1)*i,s=n;do{var l=a+(s-1)*4,u=t[l],d=t[l+1],h=t[l+2];u>127&&(u=255-u),d>127&&(d=255-d),h>127&&(h=255-h),t[l]=u,t[l+1]=d,t[l+2]=h}while(--s)}while(--o)},d8e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255};ee.addGetterSetter(Qe,"threshold",.5,qe(),ee.afterSetFilter);const Hm=tp.Util._assign(tp,{Arc:dc,Arrow:pp,Circle:L0,Ellipse:ff,Image:hc,Label:MP,Tag:mp,Line:fc,Path:Hn,Rect:zy,RegularPolygon:gp,Ring:vp,Sprite:gu,Star:hf,Text:Lr,TextPath:bi,Transformer:Rn,Wedge:pc,Filters:{Blur:$_e,Brighten:F_e,Contrast:z_e,Emboss:H_e,Enhance:V_e,Grayscale:W_e,HSL:U_e,HSV:G_e,Invert:q_e,Kaleidoscope:X_e,Mask:r8e,Noise:i8e,Pixelate:o8e,Posterize:a8e,RGB:s8e,RGBA:l8e,Sepia:u8e,Solarize:c8e,Threshold:d8e}}),f8e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Hm.Stage({container:i,width:n,height:r}),a=new Hm.Layer,s=new Hm.Layer;a.add(new Hm.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Hm.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};let lq=null,uq=null;const h8e=e=>{lq=e},el=()=>lq,p8e=e=>{uq=e},cq=()=>uq,m8e=e=>{const t=window.open("");t&&e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("</br>"),t.document.write(r.outerHTML),t.document.write("</br></br>")})},dq=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),g8e=e=>{const t=el(),{generationMode:n,generationState:r,postprocessingState:i,canvasState:o,systemState:a}=e,{codeformerFidelity:s,facetoolStrength:l,facetoolType:u,hiresFix:d,hiresStrength:h,shouldRunESRGAN:g,shouldRunFacetool:v,upscalingLevel:b,upscalingStrength:S,upscalingDenoising:E}=i,{cfgScale:_,height:k,img2imgStrength:T,infillMethod:A,initialImage:M,iterations:R,perlin:D,prompt:j,negativePrompt:F,sampler:H,seamBlur:K,seamless:te,seamSize:G,seamSteps:$,seamStrength:U,seed:X,seedWeights:Z,shouldFitToWidthHeight:W,shouldGenerateVariations:Q,shouldRandomizeSeed:re,steps:de,threshold:ve,tileSize:Pe,variationAmount:be,width:He}=r,{shouldDisplayInProgressType:Oe,saveIntermediatesInterval:ot,enableImageDebugging:Ve}=a,Be={prompt:j,iterations:R,steps:de,cfg_scale:_,threshold:ve,perlin:D,height:k,width:He,sampler_name:H,seed:X,progress_images:Oe==="full-res",progress_latents:Oe==="latents",save_intermediates:ot,generation_mode:n,init_mask:""};let wt=!1,st=!1;if(F!==""&&(Be.prompt=`${j} [${F}]`),Be.seed=re?dq(EP,PP):X,["txt2img","img2img"].includes(n)&&(Be.seamless=te,Be.hires_fix=d,d&&(Be.strength=h),g&&(wt={level:b,denoise_str:E,strength:S}),v&&(st={type:u,strength:l},u==="codeformer"&&(st.codeformer_fidelity=s))),n==="img2img"&&M&&(Be.init_img=typeof M=="string"?M:M.url,Be.strength=T,Be.fit=W),n==="unifiedCanvas"&&t){const{layerState:{objects:gt},boundingBoxCoordinates:St,boundingBoxDimensions:Ae,stageScale:lt,isMaskEnabled:Mt,shouldPreserveMaskedArea:ut,boundingBoxScaleMethod:_t,scaledBoundingBoxDimensions:ln}=o,ae={...St,...Ae},De=f8e(Mt?gt.filter(pP):[],ae);Be.init_mask=De,Be.fit=!1,Be.strength=T,Be.invert_mask=ut,Be.bounding_box=ae;const Ye=t.scale();t.scale({x:1/lt,y:1/lt});const Ke=t.getAbsolutePosition(),xe=t.toDataURL({x:ae.x+Ke.x,y:ae.y+Ke.y,width:ae.width,height:ae.height});Ve&&m8e([{base64:De,caption:"mask sent as init_mask"},{base64:xe,caption:"image sent as init_img"}]),t.scale(Ye),Be.init_img=xe,Be.progress_images=!1,_t!=="none"&&(Be.inpaint_width=ln.width,Be.inpaint_height=ln.height),Be.seam_size=G,Be.seam_blur=K,Be.seam_strength=U,Be.seam_steps=$,Be.tile_size=Pe,Be.infill_method=A,Be.force_outpaint=!1}return Q?(Be.variation_amount=be,Z&&(Be.with_variations=Vwe(Z))):Be.variation_amount=0,Ve&&(Be.enable_image_debugging=Ve),{generationParameters:Be,esrganParameters:wt,facetoolParameters:st}};var v8e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,y8e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,b8e=/[^-+\dA-Z]/g;function ro(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(xD[t]||t||xD.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"]()},d=function(){return e[o()+"Hours"]()},h=function(){return e[o()+"Minutes"]()},g=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},S=function(){return S8e(e)},E=function(){return x8e(e)},_={d:function(){return a()},dd:function(){return wa(a())},ddd:function(){return Uo.dayNames[s()]},DDD:function(){return wD({y:u(),m:l(),d:a(),_:o(),dayName:Uo.dayNames[s()],short:!0})},dddd:function(){return Uo.dayNames[s()+7]},DDDD:function(){return wD({y:u(),m:l(),d:a(),_:o(),dayName:Uo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return wa(l()+1)},mmm:function(){return Uo.monthNames[l()]},mmmm:function(){return Uo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return wa(u(),4)},h:function(){return d()%12||12},hh:function(){return wa(d()%12||12)},H:function(){return d()},HH:function(){return wa(d())},M:function(){return h()},MM:function(){return wa(h())},s:function(){return g()},ss:function(){return wa(g())},l:function(){return wa(v(),3)},L:function(){return wa(Math.floor(v()/10))},t:function(){return d()<12?Uo.timeNames[0]:Uo.timeNames[1]},tt:function(){return d()<12?Uo.timeNames[2]:Uo.timeNames[3]},T:function(){return d()<12?Uo.timeNames[4]:Uo.timeNames[5]},TT:function(){return d()<12?Uo.timeNames[6]:Uo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":w8e(e)},o:function(){return(b()>0?"-":"+")+wa(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+wa(Math.floor(Math.abs(b())/60),2)+":"+wa(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 S()},WW:function(){return wa(S())},N:function(){return E()}};return t.replace(v8e,function(k){return k in _?_[k]():k.slice(1,k.length-1)})}var xD={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"},Uo={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"]},wa=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},wD=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,d=new Date;d.setDate(d[o+"Date"]()-1);var h=new Date;h.setDate(h[o+"Date"]()+1);var g=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},S=function(){return d[o+"Date"]()},E=function(){return d[o+"Month"]()},_=function(){return d[o+"FullYear"]()},k=function(){return h[o+"Date"]()},T=function(){return h[o+"Month"]()},A=function(){return h[o+"FullYear"]()};return b()===n&&v()===r&&g()===i?l?"Tdy":"Today":_()===n&&E()===r&&S()===i?l?"Ysd":"Yesterday":A()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},S8e=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)},x8e=function(t){var n=t.getDay();return n===0&&(n=7),n},w8e=function(t){return(String(t).match(y8e)||[""]).pop().replace(b8e,"").replace(/GMT\+0000/g,"UTC")};const C8e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Hs(!0));const o=r(),{generation:a,postprocessing:s,system:l,canvas:u}=o,d={generationMode:i,generationState:a,postprocessingState:s,canvasState:u,systemState:l};n(YCe());const{generationParameters:h,esrganParameters:g,facetoolParameters:v}=g8e(d);t.emit("generateImage",h,g,v),h.init_mask&&(h.init_mask=h.init_mask.substr(0,64).concat("...")),h.init_img&&(h.init_img=h.init_img.substr(0,64).concat("...")),n(no({timestamp:ro(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...h,...g,...v})}`}))},emitRunESRGAN:i=>{n(Hs(!0));const{postprocessing:{upscalingLevel:o,upscalingDenoising:a,upscalingStrength:s}}=r(),l={upscale:[o,a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(no({timestamp:ro(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Hs(!0));const{postprocessing:{facetoolType:o,facetoolStrength:a,codeformerFidelity:s}}=r(),l={facetool_strength:a};o==="codeformer"&&(l.codeformer_fidelity=s),t.emit("runPostprocessing",i,{type:o,...l}),n(no({timestamp:ro(new Date,"isoDateTime"),message:`Face restoration (${o}) requested: ${JSON.stringify({file:i.url,...l})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(CU(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitSearchForModels:i=>{t.emit("searchForModels",i)},emitAddNewModel:i=>{t.emit("addNewModel",i)},emitDeleteModel:i=>{t.emit("deleteModel",i)},emitRequestModelChange:i=>{n(UCe()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}};let Ub;const _8e=new Uint8Array(16);function k8e(){if(!Ub&&(Ub=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ub))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ub(_8e)}const Hi=[];for(let e=0;e<256;++e)Hi.push((e+256).toString(16).slice(1));function E8e(e,t=0){return(Hi[e[t+0]]+Hi[e[t+1]]+Hi[e[t+2]]+Hi[e[t+3]]+"-"+Hi[e[t+4]]+Hi[e[t+5]]+"-"+Hi[e[t+6]]+Hi[e[t+7]]+"-"+Hi[e[t+8]]+Hi[e[t+9]]+"-"+Hi[e[t+10]]+Hi[e[t+11]]+Hi[e[t+12]]+Hi[e[t+13]]+Hi[e[t+14]]+Hi[e[t+15]]).toLowerCase()}const P8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),CD={randomUUID:P8e};function fg(e,t,n){if(CD.randomUUID&&!t&&!e)return CD.randomUUID();e=e||{};const r=e.random||(e.rng||k8e)();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 E8e(r)}const z_=zr("socketio/generateImage"),T8e=zr("socketio/runESRGAN"),L8e=zr("socketio/runFacetool"),A8e=zr("socketio/deleteImage"),H_=zr("socketio/requestImages"),_D=zr("socketio/requestNewImages"),O8e=zr("socketio/cancelProcessing"),M8e=zr("socketio/requestSystemConfig"),kD=zr("socketio/searchForModels"),Hy=zr("socketio/addNewModel"),I8e=zr("socketio/deleteModel"),fq=zr("socketio/requestModelChange"),R8e=zr("socketio/saveStagingAreaImageToGallery"),D8e=zr("socketio/requestEmptyTempFolder"),N8e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(zR(!0)),t(j4(zt.t("common:statusConnected"))),t(M8e());const r=n().gallery;r.categories.result.latest_mtime?t(_D("result")):t(H_("result")),r.categories.user.latest_mtime?t(_D("user")):t(H_("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(zR(!1)),t(j4(zt.t("common:statusDisconnected"))),t(no({timestamp:ro(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{activeTab:o}=i.ui,{shouldLoopback:a}=i.postprocessing,{boundingBox:s,generationMode:l,...u}=r,d={uuid:fg(),...u};if(["txt2img","img2img"].includes(l)&&t(ug({category:"result",image:{...d,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:h}=r;t(lwe({image:{...d,category:"temp"},boundingBox:h})),i.canvas.shouldAutoSave&&t(ug({image:{...d,category:"result"},category:"result"}))}if(a)switch(CP[o]){case"img2img":{t(E0(d));break}}t(kC()),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(Owe({uuid:fg(),...r,category:"result"})),r.isBase64||t(no({timestamp:ro(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(ug({category:"result",image:{uuid:fg(),...r,category:"result"}})),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Hs(!0)),t(zCe(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(no({timestamp:ro(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(HR()),t(kC())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:fg(),...l}));t(Awe({images:s,areMoreImagesAvailable:o,category:a})),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(WCe());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(ug({category:"result",image:r})),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(kC())),t(no({timestamp:ro(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(CU(r));const{generation:{initialImage:o,maskPath:a}}=n();(o===i||(o==null?void 0:o.url)===i)&&t(TU()),a===i&&t(IU("")),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(HCe(r)),r.infill_methods.includes("patchmatch")||t(MU(r.infill_methods[0]))},onFoundModels:r=>{const{search_folder:i,found_models:o}=r;t(uG(i)),t(cG(o))},onNewModelAdded:r=>{const{new_model_name:i,model_list:o,update:a}=r;t(Ob(o)),t(Hs(!1)),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Model Added: ${i}`,level:"info"})),t(Th({title:a?`${zt.t("modelmanager:modelUpdated")}: ${i}`:`${zt.t("modelmanager:modelAdded")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelDeleted:r=>{const{deleted_model_name:i,model_list:o}=r;t(Ob(o)),t(Hs(!1)),t(no({timestamp:ro(new Date,"isoDateTime"),message:`${zt.t("modelmanager:modelAdded")}: ${i}`,level:"info"})),t(Th({title:`${zt.t("modelmanager:modelEntryDeleted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(Ob(o)),t(j4(zt.t("common:statusModelChanged"))),t(Hs(!1)),t(cg(!0)),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(Ob(o)),t(Hs(!1)),t(cg(!0)),t(HR()),t(no({timestamp:ro(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(Th({title:zt.t("toast:tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},j8e=()=>{const{origin:e}=new URL(window.location.href),t=F4(e,{timeout:6e4,path:`${window.location.pathname}socket.io`});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:d,onGenerationResult:h,onIntermediateResult:g,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:S,onImageDeleted:E,onSystemConfig:_,onModelChanged:k,onFoundModels:T,onNewModelAdded:A,onModelDeleted:M,onModelChangeFailed:R,onTempFolderEmptied:D}=N8e(i),{emitGenerateImage:j,emitRunESRGAN:F,emitRunFacetool:H,emitDeleteImage:K,emitRequestImages:te,emitRequestNewImages:G,emitCancelProcessing:$,emitRequestSystemConfig:U,emitSearchForModels:X,emitAddNewModel:Z,emitDeleteModel:W,emitRequestModelChange:Q,emitSaveStagingAreaImageToGallery:re,emitRequestEmptyTempFolder:de}=C8e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",ve=>u(ve)),t.on("generationResult",ve=>h(ve)),t.on("postprocessingResult",ve=>d(ve)),t.on("intermediateResult",ve=>g(ve)),t.on("progressUpdate",ve=>v(ve)),t.on("galleryImages",ve=>b(ve)),t.on("processingCanceled",()=>{S()}),t.on("imageDeleted",ve=>{E(ve)}),t.on("systemConfig",ve=>{_(ve)}),t.on("foundModels",ve=>{T(ve)}),t.on("newModelAdded",ve=>{A(ve)}),t.on("modelDeleted",ve=>{M(ve)}),t.on("modelChanged",ve=>{k(ve)}),t.on("modelChangeFailed",ve=>{R(ve)}),t.on("tempFolderEmptied",()=>{D()}),n=!0),a.type){case"socketio/generateImage":{j(a.payload);break}case"socketio/runESRGAN":{F(a.payload);break}case"socketio/runFacetool":{H(a.payload);break}case"socketio/deleteImage":{K(a.payload);break}case"socketio/requestImages":{te(a.payload);break}case"socketio/requestNewImages":{G(a.payload);break}case"socketio/cancelProcessing":{$();break}case"socketio/requestSystemConfig":{U();break}case"socketio/searchForModels":{X(a.payload);break}case"socketio/addNewModel":{Z(a.payload);break}case"socketio/deleteModel":{W(a.payload);break}case"socketio/requestModelChange":{Q(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{re(a.payload);break}case"socketio/requestEmptyTempFolder":{de();break}}o(a)}},B8e=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),$8e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel"].map(e=>`system.${e}`),F8e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),hq=UW({generation:Xwe,postprocessing:t6e,gallery:Bwe,system:ZCe,canvas:Twe,ui:s7e,lightbox:zwe}),z8e=nU.getPersistConfig({key:"root",storage:tU,rootReducer:hq,blacklist:[...B8e,...$8e,...F8e],debounce:300}),H8e=Dxe(z8e,hq),pq=dxe({reducer:H8e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(j8e()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),mq=zxe(pq),IP=w.createContext(null),Ie=kSe,he=pSe;let ED;const RP=()=>({setOpenUploader:e=>{e&&(ED=e)},openUploader:ED}),Or=at(e=>e.ui,e=>CP[e.activeTab],{memoizeOptions:{equalityCheck:ke.isEqual}}),V8e=at(e=>e.ui,e=>e.activeTab,{memoizeOptions:{equalityCheck:ke.isEqual}}),yp=at(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:ke.isEqual}}),PD=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Or(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:a})).json(),u={uuid:fg(),category:"user",...l};t(ug({image:u,category:"user"})),o==="unifiedCanvas"?t($x(u)):o==="img2img"&&t(E0(u))};function W8e(){const{t:e}=We();return y.jsxs("div",{className:"work-in-progress nodes-work-in-progress",children:[y.jsx("h1",{children:e("common:nodes")}),y.jsx("p",{children:e("common:nodesDesc")})]})}const U8e=()=>{const{t:e}=We();return y.jsxs("div",{className:"work-in-progress post-processing-work-in-progress",children:[y.jsx("h1",{children:e("common:postProcessing")}),y.jsx("p",{children:e("common:postProcessDesc1")}),y.jsx("p",{children:e("common:postProcessDesc2")}),y.jsx("p",{children:e("common:postProcessDesc3")})]})};function G8e(){const{t:e}=We();return y.jsxs("div",{className:"work-in-progress nodes-work-in-progress",children:[y.jsx("h1",{children:e("common:training")}),y.jsxs("p",{children:[e("common:trainingDesc1"),y.jsx("br",{}),y.jsx("br",{}),e("common:trainingDesc2")]})]})}function q8e(e){const{i18n:t}=We(),n=localStorage.getItem("i18nextLng");N.useEffect(()=>{e()},[e]),N.useEffect(()=>{t.on("languageChanged",()=>{e()})},[e,t,n])}const Y8e=yt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:y.jsx("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:y.jsx("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"})})}),K8e=yt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:y.jsx("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"})}),X8e=yt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:y.jsx("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"})}),Z8e=yt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:y.jsx("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:y.jsx("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"})})}),Q8e=yt({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:y.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),J8e=yt({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:y.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),Ze=Ee((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return y.jsx(uo,{label:n,hasArrow:!0,...i,...i!=null&&i.placement?{placement:i.placement}:{placement:"top"},children:y.jsx(ss,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})}),cr=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return y.jsx(uo,{label:r,...i,children:y.jsx(as,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),Zs=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return y.jsxs(UE,{...o,children:[y.jsx(YE,{children:t}),y.jsxs(qE,{className:`invokeai__popover-content ${r}`,children:[i&&y.jsx(GE,{className:"invokeai__popover-arrow"}),n]})]})},qx=at(e=>e.lightbox,e=>e,{memoizeOptions:{equalityCheck:ke.isEqual}}),TD=/^-?(0\.)?\.?$/,ra=e=>{const{label:t,labelFontSize:n="sm",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:d,min:h,max:g,isInteger:v=!0,formControlProps:b,formLabelProps:S,numberInputFieldProps:E,numberInputStepperProps:_,tooltipProps:k,...T}=e,[A,M]=w.useState(String(u));w.useEffect(()=>{!A.match(TD)&&u!==Number(A)&&M(String(u))},[u,A]);const R=j=>{M(j),j.match(TD)||d(v?Math.floor(Number(j)):Number(j))},D=j=>{const F=ke.clamp(v?Math.floor(Number(j.target.value)):Number(j.target.value),h,g);M(String(F)),d(F)};return y.jsx(uo,{...k,children:y.jsxs(dn,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&y.jsx(Pn,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",...S,children:t}),y.jsxs(zE,{className:"invokeai__number-input-root",value:A,min:h,max:g,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:D,width:a,...T,children:[y.jsx(HE,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&y.jsxs("div",{className:"invokeai__number-input-stepper",children:[y.jsx(WE,{..._,className:"invokeai__number-input-stepper-button"}),y.jsx(VE,{..._,className:"invokeai__number-input-stepper-button"})]})]})]})})},tl=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="sm",styleClass:l,...u}=e;return y.jsxs(dn,{isDisabled:n,className:`invokeai__select ${l}`,onClick:d=>{d.stopPropagation(),d.nativeEvent.stopImmediatePropagation(),d.nativeEvent.stopPropagation(),d.nativeEvent.cancelBubble=!0},children:[t&&y.jsx(Pn,{className:"invokeai__select-label",fontSize:s,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",children:t}),y.jsx(uo,{label:i,...o,children:y.jsx(uW,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(d=>typeof d=="string"||typeof d=="number"?y.jsx("option",{value:d,className:"invokeai__select-option",children:d},d):y.jsx("option",{value:d.value,className:"invokeai__select-option",children:d.key},d.value))})})]})},Vy=e=>e.postprocessing,ir=e=>e.system,eke=e=>e.system.toastQueue,gq=at(ir,e=>{const{model_list:t}=e,n=ke.reduce(t,(r,i,o)=>(i.status==="active"&&(r=o),r),"");return{...t[n],name:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),tke=at([Vy,ir],({facetoolStrength:e,facetoolType:t,codeformerFidelity:n},{isGFPGANAvailable:r})=>({facetoolStrength:e,facetoolType:t,codeformerFidelity:n,isGFPGANAvailable:r}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),DP=()=>{const e=Ie(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r,isGFPGANAvailable:i}=he(tke),o=u=>e(v_(u)),a=u=>e(WU(u)),s=u=>e(N4(u.target.value)),{t:l}=We();return y.jsxs(Ge,{direction:"column",gap:2,children:[y.jsx(tl,{label:l("parameters:type"),validValues:e9e.concat(),value:n,onChange:s}),y.jsx(ra,{isDisabled:!i,label:l("parameters:strength"),step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&y.jsx(ra,{isDisabled:!i,label:l("parameters:codeformerFidelity"),step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};var vq={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},LD=N.createContext&&N.createContext(vq),zd=globalThis&&globalThis.__assign||function(){return zd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},zd.apply(this,arguments)},nke=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function yq(e){return e&&e.map(function(t,n){return N.createElement(t.tag,zd({key:n},t.attr),yq(t.child))})}function dt(e){return function(t){return N.createElement(rke,zd({attr:zd({},e.attr)},t),yq(e.child))}}function rke(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=nke(e,["attr","size","title"]),s=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),N.createElement("svg",zd({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:zd(zd({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&N.createElement("title",null,o),e.children)};return LD!==void 0?N.createElement(LD.Consumer,null,function(n){return t(n)}):t(vq)}function bq(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 11H6.414l5.293-5.293-1.414-1.414L2.586 12l7.707 7.707 1.414-1.414L6.414 13H21z"}}]})(e)}function ike(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function Yx(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}function oke(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z"}}]})(e)}function ake(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z"}}]})(e)}function ske(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 6H9v3H6v2h3v3h2v-3h3V9h-3z"}},{tag:"path",attr:{d:"M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(e)}function lke(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 9h8v2H6z"}},{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}function so(e){const[t,n]=w.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,width:u="100%",tooltipSuffix:d="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:v=-7,withInput:b=!1,isInteger:S=!1,inputWidth:E="5.5rem",inputReadOnly:_=!1,withReset:k=!1,hideTooltip:T=!1,isCompact:A=!1,handleReset:M,isResetDisabled:R,isSliderDisabled:D,isInputDisabled:j,styleClass:F,sliderFormControlProps:H,sliderFormLabelProps:K,sliderMarkProps:te,sliderTrackProps:G,sliderThumbProps:$,sliderNumberInputProps:U,sliderNumberInputFieldProps:X,sliderNumberInputStepperProps:Z,sliderTooltipProps:W,sliderIAIIconButtonProps:Q,...re}=e,[de,ve]=w.useState(String(i));w.useEffect(()=>{ve(i)},[i]);const Pe=w.useMemo(()=>U!=null&&U.max?U.max:a,[a,U==null?void 0:U.max]),be=Ve=>{l(Ve)},He=Ve=>{Ve.target.value===""&&(Ve.target.value=String(o));const Be=ke.clamp(S?Math.floor(Number(Ve.target.value)):Number(de),o,Pe);l(Be)},Oe=Ve=>{ve(Ve)},ot=()=>{M&&M()};return y.jsxs(dn,{className:F?`invokeai__slider-component ${F}`:"invokeai__slider-component","data-markers":h,style:A?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"1rem",margin:0,padding:0}:{},...H,children:[y.jsx(Pn,{className:"invokeai__slider-component-label",...K,children:r}),y.jsxs(Cy,{w:"100%",gap:2,alignItems:"center",children:[y.jsxs(XE,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:be,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:D,width:u,...re,children:[h&&y.jsxs(y.Fragment,{children:[y.jsx(e_,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...te,children:o}),y.jsx(e_,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:v,...te,children:a})]}),y.jsx(SW,{className:"invokeai__slider_track",...G,children:y.jsx(xW,{className:"invokeai__slider_track-filled"})}),y.jsx(uo,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${d}`,hidden:T,...W,children:y.jsx(bW,{className:"invokeai__slider-thumb",...$})})]}),b&&y.jsxs(zE,{min:o,max:Pe,step:s,value:de,onChange:Oe,onBlur:He,className:"invokeai__slider-number-field",isDisabled:j,...U,children:[y.jsx(HE,{className:"invokeai__slider-number-input",width:E,readOnly:_,minWidth:E,...X}),y.jsxs(nW,{...Z,children:[y.jsx(WE,{onClick:()=>l(Number(de)),className:"invokeai__slider-number-stepper"}),y.jsx(VE,{onClick:()=>l(Number(de)),className:"invokeai__slider-number-stepper"})]})]}),k&&y.jsx(Ze,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:y.jsx(Yx,{}),onClick:ot,isDisabled:R,...Q})]})]})}const uke=at([Vy,ir],({upscalingLevel:e,upscalingStrength:t,upscalingDenoising:n},{isESRGANAvailable:r})=>({upscalingLevel:e,upscalingDenoising:n,upscalingStrength:t,isESRGANAvailable:r}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),NP=()=>{const e=Ie(),{upscalingLevel:t,upscalingStrength:n,upscalingDenoising:r,isESRGANAvailable:i}=he(uke),{t:o}=We(),a=l=>e(UU(Number(l.target.value))),s=l=>e(b_(l));return y.jsxs(Ge,{flexDir:"column",rowGap:"1rem",minWidth:"20rem",children:[y.jsx(tl,{isDisabled:!i,label:o("parameters:scale"),value:t,onChange:a,validValues:J7e}),y.jsx(so,{label:o("parameters:denoisingStrength"),value:r,min:0,max:1,step:.01,onChange:l=>{e(y_(l))},handleReset:()=>e(y_(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!i,isInputDisabled:!i,isResetDisabled:!i}),y.jsx(so,{label:`${o("parameters:upscale")} ${o("parameters:strength")}`,value:n,min:0,max:1,step:.05,onChange:s,handleReset:()=>e(b_(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!i,isInputDisabled:!i,isResetDisabled:!i})]})};var cke=Object.create,Sq=Object.defineProperty,dke=Object.getOwnPropertyDescriptor,fke=Object.getOwnPropertyNames,hke=Object.getPrototypeOf,pke=Object.prototype.hasOwnProperty,Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mke=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fke(t))!pke.call(e,i)&&i!==n&&Sq(e,i,{get:()=>t[i],enumerable:!(r=dke(t,i))||r.enumerable});return e},xq=(e,t,n)=>(n=e!=null?cke(hke(e)):{},mke(t||!e||!e.__esModule?Sq(n,"default",{value:e,enumerable:!0}):n,e)),gke=Ue((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),wq=Ue((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Kx=Ue((e,t)=>{var n=wq();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),vke=Ue((e,t)=>{var n=Kx(),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}),yke=Ue((e,t)=>{var n=Kx();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),bke=Ue((e,t)=>{var n=Kx();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Ske=Ue((e,t)=>{var n=Kx();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}),Xx=Ue((e,t)=>{var n=gke(),r=vke(),i=yke(),o=bke(),a=Ske();function s(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),xke=Ue((e,t)=>{var n=Xx();function r(){this.__data__=new n,this.size=0}t.exports=r}),wke=Ue((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),Cke=Ue((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),_ke=Ue((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Cq=Ue((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),mc=Ue((e,t)=>{var n=Cq(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),jP=Ue((e,t)=>{var n=mc(),r=n.Symbol;t.exports=r}),kke=Ue((e,t)=>{var n=jP(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),d=l[a];try{l[a]=void 0;var h=!0}catch{}var g=o.call(l);return h&&(u?l[a]=d:delete l[a]),g}t.exports=s}),Eke=Ue((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Zx=Ue((e,t)=>{var n=jP(),r=kke(),i=Eke(),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}),_q=Ue((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),kq=Ue((e,t)=>{var n=Zx(),r=_q(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var d=n(u);return d==o||d==a||d==i||d==s}t.exports=l}),Pke=Ue((e,t)=>{var n=mc(),r=n["__core-js_shared__"];t.exports=r}),Tke=Ue((e,t)=>{var n=Pke(),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}),Eq=Ue((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}),Lke=Ue((e,t)=>{var n=kq(),r=Tke(),i=_q(),o=Eq(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,h=u.hasOwnProperty,g=RegExp("^"+d.call(h).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var S=n(b)?g:s;return S.test(o(b))}t.exports=v}),Ake=Ue((e,t)=>{function n(r,i){return r==null?void 0:r[i]}t.exports=n}),A0=Ue((e,t)=>{var n=Lke(),r=Ake();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),BP=Ue((e,t)=>{var n=A0(),r=mc(),i=n(r,"Map");t.exports=i}),Qx=Ue((e,t)=>{var n=A0(),r=n(Object,"create");t.exports=r}),Oke=Ue((e,t)=>{var n=Qx();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),Mke=Ue((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Ike=Ue((e,t)=>{var n=Qx(),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}),Rke=Ue((e,t)=>{var n=Qx(),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}),Dke=Ue((e,t)=>{var n=Qx(),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}),Nke=Ue((e,t)=>{var n=Oke(),r=Mke(),i=Ike(),o=Rke(),a=Dke();function s(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),jke=Ue((e,t)=>{var n=Nke(),r=Xx(),i=BP();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Bke=Ue((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),Jx=Ue((e,t)=>{var n=Bke();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),$ke=Ue((e,t)=>{var n=Jx();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Fke=Ue((e,t)=>{var n=Jx();function r(i){return n(this,i).get(i)}t.exports=r}),zke=Ue((e,t)=>{var n=Jx();function r(i){return n(this,i).has(i)}t.exports=r}),Hke=Ue((e,t)=>{var n=Jx();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}),Pq=Ue((e,t)=>{var n=jke(),r=$ke(),i=Fke(),o=zke(),a=Hke();function s(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),Vke=Ue((e,t)=>{var n=Xx(),r=BP(),i=Pq(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var d=u.__data__;if(!r||d.length<o-1)return d.push([s,l]),this.size=++u.size,this;u=this.__data__=new i(d)}return u.set(s,l),this.size=u.size,this}t.exports=a}),Wke=Ue((e,t)=>{var n=Xx(),r=xke(),i=wke(),o=Cke(),a=_ke(),s=Vke();function l(u){var d=this.__data__=new n(u);this.size=d.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Uke=Ue((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Gke=Ue((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),qke=Ue((e,t)=>{var n=Pq(),r=Uke(),i=Gke();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s<l;)this.add(a[s])}o.prototype.add=o.prototype.push=r,o.prototype.has=i,t.exports=o}),Yke=Ue((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o<a;)if(i(r[o],o,r))return!0;return!1}t.exports=n}),Kke=Ue((e,t)=>{function n(r,i){return r.has(i)}t.exports=n}),Tq=Ue((e,t)=>{var n=qke(),r=Yke(),i=Kke(),o=1,a=2;function s(l,u,d,h,g,v){var b=d&o,S=l.length,E=u.length;if(S!=E&&!(b&&E>S))return!1;var _=v.get(l),k=v.get(u);if(_&&k)return _==u&&k==l;var T=-1,A=!0,M=d&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T<S;){var R=l[T],D=u[T];if(h)var j=b?h(D,R,T,u,l,v):h(R,D,T,l,u,v);if(j!==void 0){if(j)continue;A=!1;break}if(M){if(!r(u,function(F,H){if(!i(M,H)&&(R===F||g(R,F,d,h,v)))return M.push(H)})){A=!1;break}}else if(!(R===D||g(R,D,d,h,v))){A=!1;break}}return v.delete(l),v.delete(u),A}t.exports=s}),Xke=Ue((e,t)=>{var n=mc(),r=n.Uint8Array;t.exports=r}),Zke=Ue((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Qke=Ue((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Jke=Ue((e,t)=>{var n=jP(),r=Xke(),i=wq(),o=Tq(),a=Zke(),s=Qke(),l=1,u=2,d="[object Boolean]",h="[object Date]",g="[object Error]",v="[object Map]",b="[object Number]",S="[object RegExp]",E="[object Set]",_="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",A="[object DataView]",M=n?n.prototype:void 0,R=M?M.valueOf:void 0;function D(j,F,H,K,te,G,$){switch(H){case A:if(j.byteLength!=F.byteLength||j.byteOffset!=F.byteOffset)return!1;j=j.buffer,F=F.buffer;case T:return!(j.byteLength!=F.byteLength||!G(new r(j),new r(F)));case d:case h:case b:return i(+j,+F);case g:return j.name==F.name&&j.message==F.message;case S:case _:return j==F+"";case v:var U=a;case E:var X=K&l;if(U||(U=s),j.size!=F.size&&!X)return!1;var Z=$.get(j);if(Z)return Z==F;K|=u,$.set(j,F);var W=o(U(j),U(F),K,te,G,$);return $.delete(j),W;case k:if(R)return R.call(j)==R.call(F)}return!1}t.exports=D}),eEe=Ue((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o<a;)r[s+o]=i[o];return r}t.exports=n}),$P=Ue((e,t)=>{var n=Array.isArray;t.exports=n}),tEe=Ue((e,t)=>{var n=eEe(),r=$P();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),nEe=Ue((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o<a;){var u=r[o];i(u,o,r)&&(l[s++]=u)}return l}t.exports=n}),rEe=Ue((e,t)=>{function n(){return[]}t.exports=n}),iEe=Ue((e,t)=>{var n=nEe(),r=rEe(),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}),oEe=Ue((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o<r;)a[o]=i(o);return a}t.exports=n}),ew=Ue((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),aEe=Ue((e,t)=>{var n=Zx(),r=ew(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),sEe=Ue((e,t)=>{var n=aEe(),r=ew(),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}),lEe=Ue((e,t)=>{function n(){return!1}t.exports=n}),Lq=Ue((e,t)=>{var n=mc(),r=lEe(),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}),uEe=Ue((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<a}t.exports=i}),Aq=Ue((e,t)=>{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),cEe=Ue((e,t)=>{var n=Zx(),r=Aq(),i=ew(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",d="[object Function]",h="[object Map]",g="[object Number]",v="[object Object]",b="[object RegExp]",S="[object Set]",E="[object String]",_="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",A="[object Float32Array]",M="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",j="[object Int32Array]",F="[object Uint8Array]",H="[object Uint8ClampedArray]",K="[object Uint16Array]",te="[object Uint32Array]",G={};G[A]=G[M]=G[R]=G[D]=G[j]=G[F]=G[H]=G[K]=G[te]=!0,G[o]=G[a]=G[k]=G[s]=G[T]=G[l]=G[u]=G[d]=G[h]=G[g]=G[v]=G[b]=G[S]=G[E]=G[_]=!1;function $(U){return i(U)&&r(U.length)&&!!G[n(U)]}t.exports=$}),dEe=Ue((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),fEe=Ue((e,t)=>{var n=Cq(),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}),Oq=Ue((e,t)=>{var n=cEe(),r=dEe(),i=fEe(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),hEe=Ue((e,t)=>{var n=oEe(),r=sEe(),i=$P(),o=Lq(),a=uEe(),s=Oq(),l=Object.prototype,u=l.hasOwnProperty;function d(h,g){var v=i(h),b=!v&&r(h),S=!v&&!b&&o(h),E=!v&&!b&&!S&&s(h),_=v||b||S||E,k=_?n(h.length,String):[],T=k.length;for(var A in h)(g||u.call(h,A))&&!(_&&(A=="length"||S&&(A=="offset"||A=="parent")||E&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||a(A,T)))&&k.push(A);return k}t.exports=d}),pEe=Ue((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),mEe=Ue((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),gEe=Ue((e,t)=>{var n=mEe(),r=n(Object.keys,Object);t.exports=r}),vEe=Ue((e,t)=>{var n=pEe(),r=gEe(),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}),yEe=Ue((e,t)=>{var n=kq(),r=Aq();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),bEe=Ue((e,t)=>{var n=hEe(),r=vEe(),i=yEe();function o(a){return i(a)?n(a):r(a)}t.exports=o}),SEe=Ue((e,t)=>{var n=tEe(),r=iEe(),i=bEe();function o(a){return n(a,i,r)}t.exports=o}),xEe=Ue((e,t)=>{var n=SEe(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,d,h,g){var v=u&r,b=n(s),S=b.length,E=n(l),_=E.length;if(S!=_&&!v)return!1;for(var k=S;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var A=g.get(s),M=g.get(l);if(A&&M)return A==l&&M==s;var R=!0;g.set(s,l),g.set(l,s);for(var D=v;++k<S;){T=b[k];var j=s[T],F=l[T];if(d)var H=v?d(F,j,T,l,s,g):d(j,F,T,s,l,g);if(!(H===void 0?j===F||h(j,F,u,d,g):H)){R=!1;break}D||(D=T=="constructor")}if(R&&!D){var K=s.constructor,te=l.constructor;K!=te&&"constructor"in s&&"constructor"in l&&!(typeof K=="function"&&K instanceof K&&typeof te=="function"&&te instanceof te)&&(R=!1)}return g.delete(s),g.delete(l),R}t.exports=a}),wEe=Ue((e,t)=>{var n=A0(),r=mc(),i=n(r,"DataView");t.exports=i}),CEe=Ue((e,t)=>{var n=A0(),r=mc(),i=n(r,"Promise");t.exports=i}),_Ee=Ue((e,t)=>{var n=A0(),r=mc(),i=n(r,"Set");t.exports=i}),kEe=Ue((e,t)=>{var n=A0(),r=mc(),i=n(r,"WeakMap");t.exports=i}),EEe=Ue((e,t)=>{var n=wEe(),r=BP(),i=CEe(),o=_Ee(),a=kEe(),s=Zx(),l=Eq(),u="[object Map]",d="[object Object]",h="[object Promise]",g="[object Set]",v="[object WeakMap]",b="[object DataView]",S=l(n),E=l(r),_=l(i),k=l(o),T=l(a),A=s;(n&&A(new n(new ArrayBuffer(1)))!=b||r&&A(new r)!=u||i&&A(i.resolve())!=h||o&&A(new o)!=g||a&&A(new a)!=v)&&(A=function(M){var R=s(M),D=R==d?M.constructor:void 0,j=D?l(D):"";if(j)switch(j){case S:return b;case E:return u;case _:return h;case k:return g;case T:return v}return R}),t.exports=A}),PEe=Ue((e,t)=>{var n=Wke(),r=Tq(),i=Jke(),o=xEe(),a=EEe(),s=$P(),l=Lq(),u=Oq(),d=1,h="[object Arguments]",g="[object Array]",v="[object Object]",b=Object.prototype,S=b.hasOwnProperty;function E(_,k,T,A,M,R){var D=s(_),j=s(k),F=D?g:a(_),H=j?g:a(k);F=F==h?v:F,H=H==h?v:H;var K=F==v,te=H==v,G=F==H;if(G&&l(_)){if(!l(k))return!1;D=!0,K=!1}if(G&&!K)return R||(R=new n),D||u(_)?r(_,k,T,A,M,R):i(_,k,F,T,A,M,R);if(!(T&d)){var $=K&&S.call(_,"__wrapped__"),U=te&&S.call(k,"__wrapped__");if($||U){var X=$?_.value():_,Z=U?k.value():k;return R||(R=new n),M(X,Z,T,A,R)}}return G?(R||(R=new n),o(_,k,T,A,M,R)):!1}t.exports=E}),TEe=Ue((e,t)=>{var n=PEe(),r=ew();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}),Mq=Ue((e,t)=>{var n=TEe();function r(i,o){return n(i,o)}t.exports=r}),LEe=["ctrl","shift","alt","meta","mod"],AEe={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function $C(e,t=","){return typeof e=="string"?e.split(t):e}function c2(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>AEe[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=>!LEe.includes(o));return{...r,keys:i}}function OEe(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function MEe(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function IEe(e){return Iq(e,["input","textarea","select"])}function Iq({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 REe(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var DEe=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:d,metaKey:h,shiftKey:g,key:v,code:b}=e,S=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||g!==s&&E!=="shift")return!1;if(a){if(!h&&!d)return!1}else if(h!==o&&S!=="meta"||d!==i&&S!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(S))?!0:l?l.every(_=>n.has(_)):!l},NEe=w.createContext(void 0),jEe=()=>w.useContext(NEe),BEe=w.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),$Ee=()=>w.useContext(BEe),FEe=xq(Mq());function zEe(e){let t=w.useRef(void 0);return(0,FEe.default)(t.current,e)||(t.current=e),t.current}var AD=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function Je(e,t,n,r){let i=w.useRef(null),{current:o}=w.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=w.useCallback(t,[...s]),u=zEe(a),{enabledScopes:d}=$Ee(),h=jEe();return w.useLayoutEffect(()=>{if((u==null?void 0:u.enabled)===!1||!REe(d,u==null?void 0:u.scopes))return;let g=S=>{var E;if(!(IEe(S)&&!Iq(S,u==null?void 0:u.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){AD(S);return}(E=S.target)!=null&&E.isContentEditable&&!(u!=null&&u.enableOnContentEditable)||$C(e,u==null?void 0:u.splitKey).forEach(_=>{var T;let k=c2(_,u==null?void 0:u.combinationKey);if(DEe(S,k,o)||(T=k.keys)!=null&&T.includes("*")){if(OEe(S,k,u==null?void 0:u.preventDefault),!MEe(S,k,u==null?void 0:u.enabled)){AD(S);return}l(S,k)}})}},v=S=>{o.add(S.key.toLowerCase()),((u==null?void 0:u.keydown)===void 0&&(u==null?void 0:u.keyup)!==!0||u!=null&&u.keydown)&&g(S)},b=S=>{S.key.toLowerCase()!=="meta"?o.delete(S.key.toLowerCase()):o.clear(),u!=null&&u.keyup&&g(S)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),h&&$C(e,u==null?void 0:u.splitKey).forEach(S=>h.addHotkey(c2(S,u==null?void 0:u.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),h&&$C(e,u==null?void 0:u.splitKey).forEach(S=>h.removeHotkey(c2(S,u==null?void 0:u.combinationKey)))}},[e,l,u,d]),i}xq(Mq());var V_=new Set;function HEe(e){(Array.isArray(e)?e:[e]).forEach(t=>V_.add(c2(t)))}function VEe(e){(Array.isArray(e)?e:[e]).forEach(t=>{var r;let n=c2(t);for(let i of V_)(r=i.keys)!=null&&r.every(o=>{var a;return(a=n.keys)==null?void 0:a.includes(o)})&&V_.delete(i)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{HEe(e.key)}),document.addEventListener("keyup",e=>{VEe(e.key)})});function WEe(e){return dt({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 UEe(e){return dt({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 GEe(e){return dt({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 Rq(e){return dt({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 Dq(e){return dt({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 qEe(e){return dt({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 YEe(e){return dt({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 Nq(e){return dt({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 KEe(e){return dt({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 XEe(e){return dt({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 FP(e){return dt({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 jq(e){return dt({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 s0(e){return dt({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 Bq(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function ZEe(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function zP(e){return dt({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 $q(e){return dt({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 QEe(e){return dt({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 JEe(e){return dt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"}}]})(e)}function Fq(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function ePe(e){return dt({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 tPe(e){return dt({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 zq(e){return dt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"}}]})(e)}function nPe(e){return dt({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 rPe(e){return dt({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 iPe(e){return dt({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 oPe(e){return dt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"}}]})(e)}function Hq(e){return dt({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 aPe(e){return dt({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 sPe(e){return dt({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 Vq(e){return dt({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 lPe(e){return dt({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 uPe(e){return dt({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 Wy(e){return dt({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 cPe(e){return dt({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 dPe(e){return dt({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 fPe(e){return dt({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 HP(e){return dt({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 hPe(e){return dt({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 pPe(e){return dt({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 OD(e){return dt({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 VP(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function mPe(e){return dt({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 bp(e){return dt({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 gPe(e){return dt({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 tw(e){return dt({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 vPe(e){return dt({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 WP(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const sn=e=>e.canvas,Mr=at([sn,Or,ir],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),Wq=e=>e.canvas.layerState.objects.find(Y5),Sp=e=>e.gallery,yPe=at([Sp,qx,Mr,Or],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:d,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:v,galleryWidth:b,shouldUseSingleGalleryColumn:S}=e,{isLightboxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:d,galleryImageObjectFit:h,galleryGridTemplateColumns:S?"auto":`repeat(auto-fill, minmax(${d}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightboxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:S}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),bPe=at([Sp,ir,qx,Or],(e,t,n,r)=>({mayDeleteImage:t.isConnected&&!t.isProcessing,galleryImageObjectFit:e.galleryImageObjectFit,galleryImageMinimumWidth:e.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:e.shouldUseSingleGalleryColumn,activeTabName:r,isLightboxOpen:n.isLightboxOpen}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),SPe=at(ir,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),iS=w.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Wh(),a=Ie(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=he(SPe),d=w.useRef(null),h=b=>{b.stopPropagation(),s?i():g()},g=()=>{l&&!u&&e&&a(A8e(e)),o()};Je("delete",()=>{s?i():g()},[e,s,l,u]);const v=b=>a(sG(!b.target.checked));return y.jsxs(y.Fragment,{children:[w.cloneElement(t,{onClick:e?h:void 0,ref:n}),y.jsx(JV,{isOpen:r,leastDestructiveRef:d,onClose:o,children:y.jsx(Kd,{children:y.jsxs(eW,{className:"modal",children:[y.jsx(C0,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),y.jsx(i0,{children:y.jsxs(Ge,{direction:"column",gap:5,children:[y.jsx(fn,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),y.jsx(dn,{children:y.jsxs(Ge,{alignItems:"center",children:[y.jsx(Pn,{mb:0,children:"Don't ask me again"}),y.jsx(ZE,{checked:!s,onChange:v})]})})]})}),y.jsxs(wx,{children:[y.jsx(as,{ref:d,onClick:o,className:"modal-close-btn",children:"Cancel"}),y.jsx(as,{colorScheme:"red",onClick:g,ml:3,children:"Delete"})]})]})})})]})});iS.displayName="DeleteImageModal";const xPe=at([ir,Sp,Vy,yp,qx,Or],(e,t,n,r,i,o)=>{const{isProcessing:a,isConnected:s,isGFPGANAvailable:l,isESRGANAvailable:u}=e,{upscalingLevel:d,facetoolStrength:h}=n,{isLightboxOpen:g}=i,{shouldShowImageDetails:v}=r,{intermediateImage:b,currentImage:S}=t;return{isProcessing:a,isConnected:s,isGFPGANAvailable:l,isESRGANAvailable:u,upscalingLevel:d,facetoolStrength:h,shouldDisableToolbarButtons:Boolean(b)||!S,currentImage:S,shouldShowImageDetails:v,activeTabName:o,isLightboxOpen:g}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),Uq=()=>{var F,H,K,te,G,$;const e=Ie(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightboxOpen:d,activeTabName:h}=he(xPe),g=jy(),{t:v}=We(),b=()=>{u&&(d&&e(Fg(!1)),e(E0(u)),e(qo("img2img")))},S=async()=>{if(!u)return;const U=await fetch(u.url).then(Z=>Z.blob()),X=[new ClipboardItem({[U.type]:U})];await navigator.clipboard.write(X),g({title:v("toast:imageCopied"),status:"success",duration:2500,isClosable:!0})},E=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{g({title:v("toast:imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};Je("shift+i",()=>{u?(b(),g({title:v("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):g({title:v("toast:imageNotLoaded"),description:v("toast:imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{var U,X;u&&(u.metadata&&e(LU(u.metadata)),((U=u.metadata)==null?void 0:U.image.type)==="img2img"?e(qo("img2img")):((X=u.metadata)==null?void 0:X.image.type)==="txt2img"&&e(qo("txt2img")))};Je("a",()=>{var U,X;["txt2img","img2img"].includes((X=(U=u==null?void 0:u.metadata)==null?void 0:U.image)==null?void 0:X.type)?(_(),g({title:v("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})):g({title:v("toast:parametersNotSet"),description:v("toast:parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u!=null&&u.metadata&&e($y(u.metadata.image.seed))};Je("s",()=>{var U,X;(X=(U=u==null?void 0:u.metadata)==null?void 0:U.image)!=null&&X.seed?(k(),g({title:v("toast:seedSet"),status:"success",duration:2500,isClosable:!0})):g({title:v("toast:seedNotSet"),description:v("toast:seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const T=()=>{var U,X,Z,W;if((X=(U=u==null?void 0:u.metadata)==null?void 0:U.image)!=null&&X.prompt){const[Q,re]=bP((W=(Z=u==null?void 0:u.metadata)==null?void 0:Z.image)==null?void 0:W.prompt);Q&&e(Fx(Q)),e(J2(re||""))}};Je("p",()=>{var U,X;(X=(U=u==null?void 0:u.metadata)==null?void 0:U.image)!=null&&X.prompt?(T(),g({title:v("toast:promptSet"),status:"success",duration:2500,isClosable:!0})):g({title:v("toast:promptNotSet"),description:v("toast:promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const A=()=>{u&&e(T8e(u))};Je("Shift+U",()=>{i&&!s&&n&&!t&&o?A():g({title:v("toast:upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const M=()=>{u&&e(L8e(u))};Je("Shift+R",()=>{r&&!s&&n&&!t&&a?M():g({title:v("toast:faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const R=()=>e(fG(!l)),D=()=>{u&&(d&&e(Fg(!1)),e($x(u)),e(vi(!0)),h!=="unifiedCanvas"&&e(qo("unifiedCanvas")),g({title:v("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};Je("i",()=>{u?R():g({title:v("toast:metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[u,l]);const j=()=>{e(Fg(!d))};return y.jsxs("div",{className:"current-image-options",children:[y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{"aria-label":`${v("parameters:sendTo")}...`,icon:y.jsx(pPe,{})}),children:y.jsxs("div",{className:"current-image-send-to-popover",children:[y.jsx(cr,{size:"sm",onClick:b,leftIcon:y.jsx(OD,{}),children:v("parameters:sendToImg2Img")}),y.jsx(cr,{size:"sm",onClick:D,leftIcon:y.jsx(OD,{}),children:v("parameters:sendToUnifiedCanvas")}),y.jsx(cr,{size:"sm",onClick:S,leftIcon:y.jsx(s0,{}),children:v("parameters:copyImage")}),y.jsx(cr,{size:"sm",onClick:E,leftIcon:y.jsx(s0,{}),children:v("parameters:copyImageToLink")}),y.jsx(Nh,{download:!0,href:u==null?void 0:u.url,children:y.jsx(cr,{leftIcon:y.jsx(zP,{}),size:"sm",w:"100%",children:v("parameters:downloadImage")})})]})}),y.jsx(Ze,{icon:y.jsx(JEe,{}),tooltip:d?`${v("parameters:closeViewer")} (Z)`:`${v("parameters:openInViewer")} (Z)`,"aria-label":d?`${v("parameters:closeViewer")} (Z)`:`${v("parameters:openInViewer")} (Z)`,"data-selected":d,onClick:j})]}),y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Ze,{icon:y.jsx(cPe,{}),tooltip:`${v("parameters:usePrompt")} (P)`,"aria-label":`${v("parameters:usePrompt")} (P)`,isDisabled:!((H=(F=u==null?void 0:u.metadata)==null?void 0:F.image)!=null&&H.prompt),onClick:T}),y.jsx(Ze,{icon:y.jsx(hPe,{}),tooltip:`${v("parameters:useSeed")} (S)`,"aria-label":`${v("parameters:useSeed")} (S)`,isDisabled:!((te=(K=u==null?void 0:u.metadata)==null?void 0:K.image)!=null&&te.seed),onClick:k}),y.jsx(Ze,{icon:y.jsx(KEe,{}),tooltip:`${v("parameters:useAll")} (A)`,"aria-label":`${v("parameters:useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes(($=(G=u==null?void 0:u.metadata)==null?void 0:G.image)==null?void 0:$.type),onClick:_})]}),y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{icon:y.jsx(nPe,{}),"aria-label":v("parameters:restoreFaces")}),children:y.jsxs("div",{className:"current-image-postprocessing-popover",children:[y.jsx(DP,{}),y.jsx(cr,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:M,children:v("parameters:restoreFaces")})]})}),y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{icon:y.jsx(QEe,{}),"aria-label":v("parameters:upscale")}),children:y.jsxs("div",{className:"current-image-postprocessing-popover",children:[y.jsx(NP,{}),y.jsx(cr,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:A,children:v("parameters:upscaleImage")})]})})]}),y.jsx(Gi,{isAttached:!0,children:y.jsx(Ze,{icon:y.jsx(jq,{}),tooltip:`${v("parameters:info")} (I)`,"aria-label":`${v("parameters:info")} (I)`,"data-selected":l,onClick:R})}),y.jsx(iS,{image:u,children:y.jsx(Ze,{icon:y.jsx(bp,{}),tooltip:`${v("parameters:deleteImage")} (Del)`,"aria-label":`${v("parameters:deleteImage")} (Del)`,isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})};yt({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"});yt({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"});yt({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"});yt({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"});yt({displayName:"SunIcon",path:N.createElement("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor"},N.createElement("circle",{cx:"12",cy:"12",r:"5"}),N.createElement("path",{d:"M12 1v2"}),N.createElement("path",{d:"M12 21v2"}),N.createElement("path",{d:"M4.22 4.22l1.42 1.42"}),N.createElement("path",{d:"M18.36 18.36l1.42 1.42"}),N.createElement("path",{d:"M1 12h2"}),N.createElement("path",{d:"M21 12h2"}),N.createElement("path",{d:"M4.22 19.78l1.42-1.42"}),N.createElement("path",{d:"M18.36 5.64l1.42-1.42"}))});yt({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"});yt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:N.createElement("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"})});yt({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"});yt({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"});yt({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"});yt({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"});yt({displayName:"ViewIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("circle",{cx:"12",cy:"12",r:"2"}))});yt({displayName:"ViewOffIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});var wPe=yt({displayName:"DeleteIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}))});yt({displayName:"RepeatIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"RepeatClockIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"}))});var CPe=yt({displayName:"EditIcon",path:N.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},N.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),N.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))});yt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});yt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});yt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});yt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});yt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});yt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});yt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});yt({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"});yt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var Gq=yt({displayName:"ExternalLinkIcon",path:N.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},N.createElement("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),N.createElement("path",{d:"M15 3h6v6"}),N.createElement("path",{d:"M10 14L21 3"}))});yt({displayName:"LinkIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"PlusSquareIcon",path:N.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},N.createElement("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),N.createElement("path",{d:"M12 8v8"}),N.createElement("path",{d:"M8 12h8"}))});yt({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"});yt({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"});yt({displayName:"TimeIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"ArrowRightIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"ArrowLeftIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({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"});yt({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"});yt({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"});yt({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"});yt({displayName:"EmailIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({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"});yt({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"});yt({displayName:"SpinnerIcon",path:N.createElement(N.Fragment,null,N.createElement("defs",null,N.createElement("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a"},N.createElement("stop",{stopColor:"currentColor",offset:"0%"}),N.createElement("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"}))),N.createElement("g",{transform:"translate(2)",fill:"none"},N.createElement("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),N.createElement("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),N.createElement("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})))});yt({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"});yt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:N.createElement("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"})});yt({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"});yt({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"});yt({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"});yt({displayName:"InfoOutlineIcon",path:N.createElement("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2"},N.createElement("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),N.createElement("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),N.createElement("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"}))});yt({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"});yt({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"});yt({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"});yt({displayName:"QuestionOutlineIcon",path:N.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},N.createElement("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"}),N.createElement("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),N.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"}))});yt({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"});yt({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"});yt({viewBox:"0 0 14 14",path:N.createElement("g",{fill:"currentColor"},N.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))});yt({displayName:"MinusIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("rect",{height:"4",width:"20",x:"2",y:"10"}))});yt({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 _Pe(e){return dt({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 Qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>y.jsxs(Ge,{gap:2,children:[n&&y.jsx(uo,{label:`Recall ${e}`,children:y.jsx(ss,{"aria-label":"Use this parameter",icon:y.jsx(_Pe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&y.jsx(uo,{label:`Copy ${e}`,children:y.jsx(ss,{"aria-label":`Copy ${e}`,icon:y.jsx(s0,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),y.jsxs(Ge,{direction:i?"column":"row",children:[y.jsxs(fn,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?y.jsxs(Nh,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",y.jsx(Gq,{mx:"2px"})]}):y.jsx(fn,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),kPe=(e,t)=>e.image.uuid===t.image.uuid,UP=w.memo(({image:e,styleClass:t})=>{var H,K;const n=Ie();Je("esc",()=>{n(fG(!1))});const r=((H=e==null?void 0:e.metadata)==null?void 0:H.image)||{},i=e==null?void 0:e.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:d,orig_path:h,perlin:g,postprocessing:v,prompt:b,sampler:S,seamless:E,seed:_,steps:k,strength:T,denoise_str:A,threshold:M,type:R,variations:D,width:j}=r,F=JSON.stringify(e.metadata,null,2);return y.jsx("div",{className:`image-metadata-viewer ${t}`,children:y.jsxs(Ge,{gap:1,direction:"column",width:"100%",children:[y.jsxs(Ge,{gap:2,children:[y.jsx(fn,{fontWeight:"semibold",children:"File:"}),y.jsxs(Nh,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,y.jsx(Gq,{mx:"2px"})]})]}),Object.keys(r).length>0?y.jsxs(y.Fragment,{children:[R&&y.jsx(Qn,{label:"Generation type",value:R}),((K=e.metadata)==null?void 0:K.model_weights)&&y.jsx(Qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(R)&&y.jsx(Qn,{label:"Original image",value:h}),b&&y.jsx(Qn,{label:"Prompt",labelPosition:"top",value:o2(b),onClick:()=>n(Fx(b))}),_!==void 0&&y.jsx(Qn,{label:"Seed",value:_,onClick:()=>n($y(_))}),M!==void 0&&y.jsx(Qn,{label:"Noise Threshold",value:M,onClick:()=>n(FU(M))}),g!==void 0&&y.jsx(Qn,{label:"Perlin Noise",value:g,onClick:()=>n(RU(g))}),S&&y.jsx(Qn,{label:"Sampler",value:S,onClick:()=>n(DU(S))}),k&&y.jsx(Qn,{label:"Steps",value:k,onClick:()=>n($U(k))}),o!==void 0&&y.jsx(Qn,{label:"CFG scale",value:o,onClick:()=>n(AU(o))}),D&&D.length>0&&y.jsx(Qn,{label:"Seed-weight pairs",value:Q5(D),onClick:()=>n(jU(Q5(D)))}),E&&y.jsx(Qn,{label:"Seamless",value:E,onClick:()=>n(NU(E))}),l&&y.jsx(Qn,{label:"High Resolution Optimization",value:l,onClick:()=>n(xP(l))}),j&&y.jsx(Qn,{label:"Width",value:j,onClick:()=>n(zU(j))}),s&&y.jsx(Qn,{label:"Height",value:s,onClick:()=>n(OU(s))}),u&&y.jsx(Qn,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(E0(u))}),d&&y.jsx(Qn,{label:"Mask image",value:d,isLink:!0,onClick:()=>n(IU(d))}),R==="img2img"&&T&&y.jsx(Qn,{label:"Image to image strength",value:T,onClick:()=>n(g_(T))}),a&&y.jsx(Qn,{label:"Image to image fit",value:a,onClick:()=>n(BU(a))}),v&&v.length>0&&y.jsxs(y.Fragment,{children:[y.jsx(Dh,{size:"sm",children:"Postprocessing"}),v.map((te,G)=>{if(te.type==="esrgan"){const{scale:$,strength:U,denoise_str:X}=te;return y.jsxs(Ge,{pl:"2rem",gap:1,direction:"column",children:[y.jsx(fn,{size:"md",children:`${G+1}: Upscale (ESRGAN)`}),y.jsx(Qn,{label:"Scale",value:$,onClick:()=>n(UU($))}),y.jsx(Qn,{label:"Strength",value:U,onClick:()=>n(b_(U))}),X!==void 0&&y.jsx(Qn,{label:"Denoising strength",value:X,onClick:()=>n(y_(X))})]},G)}else if(te.type==="gfpgan"){const{strength:$}=te;return y.jsxs(Ge,{pl:"2rem",gap:1,direction:"column",children:[y.jsx(fn,{size:"md",children:`${G+1}: Face restoration (GFPGAN)`}),y.jsx(Qn,{label:"Strength",value:$,onClick:()=>{n(v_($)),n(N4("gfpgan"))}})]},G)}else if(te.type==="codeformer"){const{strength:$,fidelity:U}=te;return y.jsxs(Ge,{pl:"2rem",gap:1,direction:"column",children:[y.jsx(fn,{size:"md",children:`${G+1}: Face restoration (Codeformer)`}),y.jsx(Qn,{label:"Strength",value:$,onClick:()=>{n(v_($)),n(N4("codeformer"))}}),U&&y.jsx(Qn,{label:"Fidelity",value:U,onClick:()=>{n(WU(U)),n(N4("codeformer"))}})]},G)}})]}),i&&y.jsx(Qn,{withCopy:!0,label:"Dream Prompt",value:i}),y.jsxs(Ge,{gap:2,direction:"column",children:[y.jsxs(Ge,{gap:2,children:[y.jsx(uo,{label:"Copy metadata JSON",children:y.jsx(ss,{"aria-label":"Copy metadata JSON",icon:y.jsx(s0,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(F)})}),y.jsx(fn,{fontWeight:"semibold",children:"Metadata JSON:"})]}),y.jsx("div",{className:"image-json-viewer",children:y.jsx("pre",{children:F})})]})]}):y.jsx(CF,{width:"100%",pt:10,children:y.jsx(fn,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},kPe);UP.displayName="ImageMetadataViewer";const qq=at([Sp,yp],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>{var d;return u.uuid===((d=e==null?void 0:e.currentImage)==null?void 0:d.uuid)}),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function EPe(){const e=Ie(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=he(qq),[a,s]=w.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},d=()=>{e(yP())},h=()=>{e(vP())};return y.jsxs("div",{className:"current-image-preview",children:[i&&y.jsx(JS,{src:i.url,width:i.width,height:i.height,style:{imageRendering:o?"pixelated":"initial"}}),!r&&y.jsxs("div",{className:"current-image-next-prev-buttons",children:[y.jsx("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&y.jsx(ss,{"aria-label":"Previous image",icon:y.jsx(Rq,{className:"next-prev-button"}),variant:"unstyled",onClick:d})}),y.jsx("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&y.jsx(ss,{"aria-label":"Next image",icon:y.jsx(Dq,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&y.jsx(UP,{image:i,styleClass:"current-image-metadata"})]})}var PPe=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)}}(),ni=globalThis&&globalThis.__assign||function(){return ni=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ni.apply(this,arguments)},MD={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},ID={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Gb={width:"20px",height:"20px",position:"absolute"},TPe={top:ni(ni({},MD),{top:"-5px"}),right:ni(ni({},ID),{left:void 0,right:"-5px"}),bottom:ni(ni({},MD),{top:void 0,bottom:"-5px"}),left:ni(ni({},ID),{left:"-5px"}),topRight:ni(ni({},Gb),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ni(ni({},Gb),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ni(ni({},Gb),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ni(ni({},Gb),{left:"-10px",top:"-10px",cursor:"nw-resize"})},LPe=function(e){PPe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return w.createElement("div",{className:this.props.className||"",style:ni(ni({position:"absolute",userSelect:"none"},TPe[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(w.PureComponent),APe=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)}}(),jl=globalThis&&globalThis.__assign||function(){return jl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jl.apply(this,arguments)},OPe={width:"auto",height:"auto"},qb=function(e,t,n){return Math.max(Math.min(e,n),t)},RD=function(e,t){return Math.round(e/t)*t},Bm=function(e,t){return new RegExp(e,"i").test(t)},Yb=function(e){return Boolean(e.touches&&e.touches.length)},MPe=function(e){return Boolean((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},DD=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},FC=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Kb=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return n*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},IPe=function(e,t,n,r,i,o,a){return r=Kb(r,e.width,t,n),i=Kb(i,e.height,t,n),o=Kb(o,e.width,t,n),a=Kb(a,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},RPe=["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"],ND="__resizable_base__",Yq=function(e){APe(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(ND):o.className+=ND,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||OPe},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","")),d=u/l[s]*100;return d+"%"}return FC(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?FC(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?FC(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&&Bm("left",o),s=i&&Bm("top",o),l,u;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=a?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),u&&Number.isFinite(u)&&(r=r&&r<u?r:u),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var i=this.props.scale||1,o=this.props.resizeRatio||1,a=this.state,s=a.direction,l=a.original,u=this.props,d=u.lockAspectRatio,h=u.lockAspectRatioExtraHeight,g=u.lockAspectRatioExtraWidth,v=l.width,b=l.height,S=h||0,E=g||0;return Bm("right",s)&&(v=l.width+(n-l.x)*o/i,d&&(b=(v-E)/this.ratio+S)),Bm("left",s)&&(v=l.width-(n-l.x)*o/i,d&&(b=(v-E)/this.ratio+S)),Bm("bottom",s)&&(b=l.height+(r-l.y)*o/i,d&&(v=(b-S)*this.ratio+E)),Bm("top",s)&&(b=l.height-(r-l.y)*o/i,d&&(v=(b-S)*this.ratio+E)),{newWidth:v,newHeight:b}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,i,o){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,h=typeof i.width>"u"||i.width<0?n:i.width,g=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,S=u||0;if(s){var E=(g-b)*this.ratio+S,_=(v-b)*this.ratio+S,k=(d-S)/this.ratio+b,T=(h-S)/this.ratio+b,A=Math.max(d,E),M=Math.min(h,_),R=Math.max(g,k),D=Math.min(v,T);n=qb(n,A,M),r=qb(r,R,D)}else n=qb(n,d,h),r=qb(r,g,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&&MPe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Yb(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 d=this.window.getComputedStyle(u).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:jl(jl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(h)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Yb(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Yb(n)?n.touches[0].clientX:n.clientX,d=Yb(n)?n.touches[0].clientY:n.clientY,h=this.state,g=h.direction,v=h.original,b=h.width,S=h.height,E=this.getParentSize(),_=IPe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=_.maxWidth,a=_.maxHeight,s=_.minWidth,l=_.minHeight;var k=this.calculateNewSizeFromDirection(u,d),T=k.newHeight,A=k.newWidth,M=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(A=DD(A,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=DD(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(A,T,{width:M.maxWidth,height:M.maxHeight},{width:s,height:l});if(A=R.newWidth,T=R.newHeight,this.props.grid){var D=RD(A,this.props.grid[0]),j=RD(T,this.props.grid[1]),F=this.props.snapGap||0;A=F===0||Math.abs(D-A)<=F?D:A,T=F===0||Math.abs(j-T)<=F?j:T}var H={width:A-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var K=A/E.width*100;A=K+"%"}else if(b.endsWith("vw")){var te=A/this.window.innerWidth*100;A=te+"vw"}else if(b.endsWith("vh")){var G=A/this.window.innerHeight*100;A=G+"vh"}}if(S&&typeof S=="string"){if(S.endsWith("%")){var K=T/E.height*100;T=K+"%"}else if(S.endsWith("vw")){var te=T/this.window.innerWidth*100;T=te+"vw"}else if(S.endsWith("vh")){var G=T/this.window.innerHeight*100;T=G+"vh"}}var $={width:this.createSizeForCssProperty(A,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?$.flexBasis=$.width:this.flexDir==="column"&&($.flexBasis=$.height),Qs.flushSync(function(){r.setState($)}),this.props.onResize&&this.props.onResize(n,g,this.resizable,H)}},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:jl(jl({},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 d=Object.keys(i).map(function(h){return i[h]!==!1?w.createElement(LPe,{key:h,direction:h,onResizeStart:n.onResizeStart,replaceStyles:o&&o[h],className:a&&a[h]},u&&u[h]?u[h]:null):null});return w.createElement("div",{className:l,style:s},d)},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return RPe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=jl(jl(jl({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 w.createElement(o,jl({ref:this.ref,style:i,className:this.props.className},r),this.state.isResizing&&w.createElement("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}(w.PureComponent);const er=e=>{const{label:t,styleClass:n,...r}=e;return y.jsx(fF,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Kq(e){return dt({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 Xq(e){return dt({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 DPe(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.5 9c-.42 0-.83.04-1.24.11L1.01 3 1 10l9 2-9 2 .01 7 8.07-3.46C9.59 21.19 12.71 24 16.5 24c4.14 0 7.5-3.36 7.5-7.5S20.64 9 16.5 9zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z"}},{tag:"path",attr:{d:"M18.27 14.03l-1.77 1.76-1.77-1.76-.7.7 1.76 1.77-1.76 1.77.7.7 1.77-1.76 1.77 1.76.7-.7-1.76-1.77 1.76-1.77z"}}]})(e)}function NPe(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"}}]})(e)}function jPe(e){return dt({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 BPe(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function $Pe(e){return dt({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 Zq(e){return dt({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 FPe(e){return dt({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 zPe(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 10l5 5 5-5z"}}]})(e)}function HPe(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 14l5-5 5 5z"}}]})(e)}function VPe(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}function WPe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function UPe(e,t){e.classList?e.classList.add(t):WPe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function jD(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function GPe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=jD(e.className,t):e.setAttribute("class",jD(e.className&&e.className.baseVal||"",t))}const BD={disabled:!1},Qq=N.createContext(null);var Jq=function(t){return t.scrollTop},Iv="unmounted",ph="exited",mh="entering",Vm="entered",W_="exiting",gc=function(e){OE(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=ph,o.appearStatus=mh):l=Vm:r.unmountOnExit||r.mountOnEnter?l=Iv:l=ph,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Iv?{status:ph}: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!==mh&&a!==Vm&&(o=mh):(a===mh||a===Vm)&&(o=W_)}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===mh){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Sb.findDOMNode(this);a&&Jq(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ph&&this.setState({status:Iv})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Sb.findDOMNode(this),s],u=l[0],d=l[1],h=this.getTimeouts(),g=s?h.appear:h.enter;if(!i&&!a||BD.disabled){this.safeSetState({status:Vm},function(){o.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:mh},function(){o.props.onEntering(u,d),o.onTransitionEnd(g,function(){o.safeSetState({status:Vm},function(){o.props.onEntered(u,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Sb.findDOMNode(this);if(!o||BD.disabled){this.safeSetState({status:ph},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:W_},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:ph},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:Sb.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],d=l[1];this.props.addEndListener(u,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Iv)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=TE(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return N.createElement(Qq.Provider,{value:null},typeof a=="function"?a(i,s):N.cloneElement(N.Children.only(a),s))},t}(N.Component);gc.contextType=Qq;gc.propTypes={};function $m(){}gc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:$m,onEntering:$m,onEntered:$m,onExit:$m,onExiting:$m,onExited:$m};gc.UNMOUNTED=Iv;gc.EXITED=ph;gc.ENTERING=mh;gc.ENTERED=Vm;gc.EXITING=W_;const qPe=gc;var YPe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return UPe(t,r)})},zC=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return GPe(t,r)})},GP=function(e){OE(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),d=u[0],h=u[1];r.removeClasses(d,"exit"),r.addClass(d,h?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),d=u[0],h=u[1],g=h?"appear":"enter";r.addClass(d,g,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),d=u[0],h=u[1],g=h?"appear":"enter";r.removeClasses(d,g),r.addClass(d,g,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,u=typeof l=="string",d=u&&l?l+"-":"",h=u?""+d+s:l[s],g=u?h+"-active":l[s+"Active"],v=u?h+"-done":l[s+"Done"];return{baseClassName:h,activeClassName:g,doneClassName:v}},r}var n=t.prototype;return n.addClass=function(i,o,a){var s=this.getClassNames(o)[a+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;o==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&i&&Jq(i),s&&(this.appliedClasses[o][a]=s,YPe(i,s))},n.removeClasses=function(i,o){var a=this.appliedClasses[o],s=a.base,l=a.active,u=a.done;this.appliedClasses[o]={},s&&zC(i,s),l&&zC(i,l),u&&zC(i,u)},n.render=function(){var i=this.props;i.classNames;var o=TE(i,["classNames"]);return N.createElement(qPe,bn({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(N.Component);GP.defaultProps={classNames:""};GP.propTypes={};const eY=GP;function rr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Uy(e,t=[]){let n=[];function r(o,a){const s=w.createContext(a),l=n.length;n=[...n,a];function u(h){const{scope:g,children:v,...b}=h,S=(g==null?void 0:g[e][l])||s,E=w.useMemo(()=>b,Object.values(b));return w.createElement(S.Provider,{value:E},v)}function d(h,g){const v=(g==null?void 0:g[e][l])||s,b=w.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(a=>w.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,KPe(i,...t)]}function KPe(...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 h=l(o)[`__scope${u}`];return{...s,...h}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function XPe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function tY(...e){return t=>e.forEach(n=>XPe(n,t))}function fs(...e){return w.useCallback(tY(...e),e)}const ay=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),o=i.find(QPe);if(o){const a=o.props.children,s=i.map(l=>l===o?w.Children.count(a)>1?w.Children.only(null):w.isValidElement(a)?a.props.children:null:l);return w.createElement(U_,bn({},r,{ref:t}),w.isValidElement(a)?w.cloneElement(a,void 0,s):null)}return w.createElement(U_,bn({},r,{ref:t}),n)});ay.displayName="Slot";const U_=w.forwardRef((e,t)=>{const{children:n,...r}=e;return w.isValidElement(n)?w.cloneElement(n,{...JPe(r,n.props),ref:tY(t,n.ref)}):w.Children.count(n)>1?w.Children.only(null):null});U_.displayName="SlotClone";const ZPe=({children:e})=>w.createElement(w.Fragment,null,e);function QPe(e){return w.isValidElement(e)&&e.type===ZPe}function JPe(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 eTe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],sc=eTe.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?ay:t;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(s,bn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nY(e,t){e&&Qs.flushSync(()=>e.dispatchEvent(t))}function rY(e){const t=e+"CollectionProvider",[n,r]=Uy(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:S}=v,E=N.useRef(null),_=N.useRef(new Map).current;return N.createElement(i,{scope:b,itemMap:_,collectionRef:E},S)},s=e+"CollectionSlot",l=N.forwardRef((v,b)=>{const{scope:S,children:E}=v,_=o(s,S),k=fs(b,_.collectionRef);return N.createElement(ay,{ref:k},E)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",h=N.forwardRef((v,b)=>{const{scope:S,children:E,..._}=v,k=N.useRef(null),T=fs(b,k),A=o(u,S);return N.useEffect(()=>(A.itemMap.set(k,{ref:k,..._}),()=>void A.itemMap.delete(k))),N.createElement(ay,{[d]:"",ref:T},E)});function g(v){const b=o(e+"CollectionConsumer",v);return N.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((A,M)=>_.indexOf(A.ref.current)-_.indexOf(M.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:h},g,r]}const tTe=w.createContext(void 0);function iY(e){const t=w.useContext(tTe);return e||t||"ltr"}function du(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function nTe(e,t=globalThis==null?void 0:globalThis.document){const n=du(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const G_="dismissableLayer.update",rTe="dismissableLayer.pointerDownOutside",iTe="dismissableLayer.focusOutside";let $D;const oTe=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),aTe=w.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,d=w.useContext(oTe),[h,g]=w.useState(null),v=(n=h==null?void 0:h.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=w.useState({}),S=fs(t,j=>g(j)),E=Array.from(d.layers),[_]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(_),T=h?E.indexOf(h):-1,A=d.layersWithOutsidePointerEventsDisabled.size>0,M=T>=k,R=sTe(j=>{const F=j.target,H=[...d.branches].some(K=>K.contains(F));!M||H||(o==null||o(j),s==null||s(j),j.defaultPrevented||l==null||l())},v),D=lTe(j=>{const F=j.target;[...d.branches].some(K=>K.contains(F))||(a==null||a(j),s==null||s(j),j.defaultPrevented||l==null||l())},v);return nTe(j=>{T===d.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},v),w.useEffect(()=>{if(h)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&($D=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),FD(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=$D)}},[h,v,r,d]),w.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),FD())},[h,d]),w.useEffect(()=>{const j=()=>b({});return document.addEventListener(G_,j),()=>document.removeEventListener(G_,j)},[]),w.createElement(sc.div,bn({},u,{ref:S,style:{pointerEvents:A?M?"auto":"none":void 0,...e.style},onFocusCapture:rr(e.onFocusCapture,D.onFocusCapture),onBlurCapture:rr(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:rr(e.onPointerDownCapture,R.onPointerDownCapture)}))});function sTe(e,t=globalThis==null?void 0:globalThis.document){const n=du(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){oY(rTe,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 lTe(e,t=globalThis==null?void 0:globalThis.document){const n=du(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&oY(iTe,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 FD(){const e=new CustomEvent(G_);document.dispatchEvent(e)}function oY(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?nY(i,o):i.dispatchEvent(o)}let HC=0;function uTe(){w.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:zD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:zD()),HC++,()=>{HC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),HC--}},[])}function zD(){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 VC="focusScope.autoFocusOnMount",WC="focusScope.autoFocusOnUnmount",HD={bubbles:!1,cancelable:!0},cTe=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=w.useState(null),u=du(i),d=du(o),h=w.useRef(null),g=fs(t,S=>l(S)),v=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let S=function(_){if(v.paused||!s)return;const k=_.target;s.contains(k)?h.current=k:gh(h.current,{select:!0})},E=function(_){v.paused||!s||s.contains(_.relatedTarget)||gh(h.current,{select:!0})};return document.addEventListener("focusin",S),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),w.useEffect(()=>{if(s){WD.add(v);const S=document.activeElement;if(!s.contains(S)){const _=new CustomEvent(VC,HD);s.addEventListener(VC,u),s.dispatchEvent(_),_.defaultPrevented||(dTe(gTe(aY(s)),{select:!0}),document.activeElement===S&&gh(s))}return()=>{s.removeEventListener(VC,u),setTimeout(()=>{const _=new CustomEvent(WC,HD);s.addEventListener(WC,d),s.dispatchEvent(_),_.defaultPrevented||gh(S??document.body,{select:!0}),s.removeEventListener(WC,d),WD.remove(v)},0)}}},[s,u,d,v]);const b=w.useCallback(S=>{if(!n&&!r||v.paused)return;const E=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,_=document.activeElement;if(E&&_){const k=S.currentTarget,[T,A]=fTe(k);T&&A?!S.shiftKey&&_===A?(S.preventDefault(),n&&gh(T,{select:!0})):S.shiftKey&&_===T&&(S.preventDefault(),n&&gh(A,{select:!0})):_===k&&S.preventDefault()}},[n,r,v.paused]);return w.createElement(sc.div,bn({tabIndex:-1},a,{ref:g,onKeyDown:b}))});function dTe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gh(r,{select:t}),document.activeElement!==n)return}function fTe(e){const t=aY(e),n=VD(t,e),r=VD(t.reverse(),e);return[n,r]}function aY(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function VD(e,t){for(const n of e)if(!hTe(n,{upTo:t}))return n}function hTe(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 pTe(e){return e instanceof HTMLInputElement&&"select"in e}function gh(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&pTe(e)&&t&&e.select()}}const WD=mTe();function mTe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=UD(e,t),e.unshift(t)},remove(t){var n;e=UD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function UD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gTe(e){return e.filter(t=>t.tagName!=="A")}const l0=Boolean(globalThis==null?void 0:globalThis.document)?w.useLayoutEffect:()=>{},vTe=n7["useId".toString()]||(()=>{});let yTe=0;function bTe(e){const[t,n]=w.useState(vTe());return l0(()=>{e||n(r=>r??String(yTe++))},[e]),e||(t?`radix-${t}`:"")}function O0(e){return e.split("-")[0]}function nw(e){return e.split("-")[1]}function M0(e){return["top","bottom"].includes(O0(e))?"x":"y"}function qP(e){return e==="y"?"height":"width"}function GD(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=M0(t),l=qP(s),u=r[l]/2-i[l]/2,d=s==="x";let h;switch(O0(t)){case"top":h={x:o,y:r.y-i.height};break;case"bottom":h={x:o,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:a};break;case"left":h={x:r.x-i.width,y:a};break;default:h={x:r.x,y:r.y}}switch(nw(t)){case"start":h[s]-=u*(n&&d?-1:1);break;case"end":h[s]+=u*(n&&d?-1:1)}return h}const STe=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:d}=GD(l,r,s),h=r,g={},v=0;for(let b=0;b<o.length;b++){const{name:S,fn:E}=o[b],{x:_,y:k,data:T,reset:A}=await E({x:u,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:g,rects:l,platform:a,elements:{reference:e,floating:t}});u=_??u,d=k??d,g={...g,[S]:{...g[S],...T}},A&&v<=50&&(v++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(l=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:d}=GD(l,h,s)),b=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:g}};function sY(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function oS(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function aS(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:g=!1,padding:v=0}=t,b=sY(v),S=s[g?h==="floating"?"reference":"floating":h],E=oS(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(S)))==null||n?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),_=oS(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h==="floating"?{...a.floating,x:r,y:i}:a.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),strategy:l}):a[h]);return{top:E.top-_.top+b.top,bottom:_.bottom-E.bottom+b.bottom,left:E.left-_.left+b.left,right:_.right-E.right+b.right}}const xTe=Math.min,wTe=Math.max;function q_(e,t,n){return wTe(e,xTe(t,n))}const qD=e=>({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=sY(r),d={x:i,y:o},h=M0(a),g=nw(a),v=qP(h),b=await l.getDimensions(n),S=h==="y"?"top":"left",E=h==="y"?"bottom":"right",_=s.reference[v]+s.reference[h]-d[h]-s.floating[v],k=d[h]-s.reference[h],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let A=T?h==="y"?T.clientHeight||0:T.clientWidth||0:0;A===0&&(A=s.floating[v]);const M=_/2-k/2,R=u[S],D=A-b[v]-u[E],j=A/2-b[v]/2+M,F=q_(R,j,D),H=(g==="start"?u[S]:u[E])>0&&j!==F&&s.reference[v]<=s.floating[v];return{[h]:d[h]-(H?j<R?R-j:D-j:0),data:{[h]:F,centerOffset:j-F}}}}),CTe={left:"right",right:"left",bottom:"top",top:"bottom"};function sS(e){return e.replace(/left|right|bottom|top/g,t=>CTe[t])}function _Te(e,t,n){n===void 0&&(n=!1);const r=nw(e),i=M0(e),o=qP(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=sS(a)),{main:a,cross:sS(a)}}const kTe={start:"end",end:"start"};function YD(e){return e.replace(/start|end/g,t=>kTe[t])}const lY=["top","right","bottom","left"];lY.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const ETe=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:d=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",flipAlignment:v=!0,...b}=e,S=O0(r),E=h||(S===a||!v?[sS(a)]:function(j){const F=sS(j);return[YD(j),F,YD(F)]}(a)),_=[a,...E],k=await aS(t,b),T=[];let A=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&T.push(k[S]),d){const{main:j,cross:F}=_Te(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));T.push(k[j],k[F])}if(A=[...A,{placement:r,overflows:T}],!T.every(j=>j<=0)){var M,R;const j=((M=(R=i.flip)==null?void 0:R.index)!=null?M:0)+1,F=_[j];if(F)return{data:{index:j,overflows:A},reset:{placement:F}};let H="bottom";switch(g){case"bestFit":{var D;const K=(D=A.map(te=>[te,te.overflows.filter(G=>G>0).reduce((G,$)=>G+$,0)]).sort((te,G)=>te[1]-G[1])[0])==null?void 0:D[0].placement;K&&(H=K);break}case"initialPlacement":H=a}if(r!==H)return{reset:{placement:H}}}return{}}}};function KD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XD(e){return lY.some(t=>e[t]>=0)}const PTe=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=KD(await aS(r,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:XD(o)}}}case"escaped":{const o=KD(await aS(r,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:o,escaped:XD(o)}}}default:return{}}}}},TTe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(o,a){const{placement:s,platform:l,elements:u}=o,d=await(l.isRTL==null?void 0:l.isRTL(u.floating)),h=O0(s),g=nw(s),v=M0(s)==="x",b=["left","top"].includes(h)?-1:1,S=d&&v?-1:1,E=typeof a=="function"?a(o):a;let{mainAxis:_,crossAxis:k,alignmentAxis:T}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...E};return g&&typeof T=="number"&&(k=g==="end"?-1*T:T),v?{x:k*S,y:_*b}:{x:_*b,y:k*S}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function uY(e){return e==="x"?"y":"x"}const LTe=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:_,y:k}=E;return{x:_,y:k}}},...l}=e,u={x:n,y:r},d=await aS(t,l),h=M0(O0(i)),g=uY(h);let v=u[h],b=u[g];if(o){const E=h==="y"?"bottom":"right";v=q_(v+d[h==="y"?"top":"left"],v,v-d[E])}if(a){const E=g==="y"?"bottom":"right";b=q_(b+d[g==="y"?"top":"left"],b,b-d[E])}const S=s.fn({...t,[h]:v,[g]:b});return{...S,data:{x:S.x-n,y:S.y-r}}}}},ATe=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,d={x:n,y:r},h=M0(i),g=uY(h);let v=d[h],b=d[g];const S=typeof s=="function"?s({...o,placement:i}):s,E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(l){const M=h==="y"?"height":"width",R=o.reference[h]-o.floating[M]+E.mainAxis,D=o.reference[h]+o.reference[M]-E.mainAxis;v<R?v=R:v>D&&(v=D)}if(u){var _,k,T,A;const M=h==="y"?"width":"height",R=["top","left"].includes(O0(i)),D=o.reference[g]-o.floating[M]+(R&&(_=(k=a.offset)==null?void 0:k[g])!=null?_:0)+(R?0:E.crossAxis),j=o.reference[g]+o.reference[M]+(R?0:(T=(A=a.offset)==null?void 0:A[g])!=null?T:0)-(R?E.crossAxis:0);b<D?b=D:b>j&&(b=j)}return{[h]:v,[g]:b}}}};function cY(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function vc(e){if(e==null)return window;if(!cY(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Gy(e){return vc(e).getComputedStyle(e)}function Zu(e){return cY(e)?"":e?(e.nodeName||"").toLowerCase():""}function dY(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function fu(e){return e instanceof vc(e).HTMLElement}function Jd(e){return e instanceof vc(e).Element}function YP(e){return typeof ShadowRoot>"u"?!1:e instanceof vc(e).ShadowRoot||e instanceof ShadowRoot}function rw(e){const{overflow:t,overflowX:n,overflowY:r}=Gy(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function OTe(e){return["table","td","th"].includes(Zu(e))}function ZD(e){const t=/firefox/i.test(dY()),n=Gy(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"}function fY(){return!/^((?!chrome|android).)*safari/i.test(dY())}const QD=Math.min,d2=Math.max,lS=Math.round;function Qu(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&&fu(e)&&(l=e.offsetWidth>0&&lS(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&lS(s.height)/e.offsetHeight||1);const d=Jd(e)?vc(e):window,h=!fY()&&n,g=(s.left+(h&&(r=(i=d.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(h&&(o=(a=d.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,S=s.height/u;return{width:b,height:S,top:v,right:g+b,bottom:v+S,left:g,x:g,y:v}}function Hd(e){return(t=e,(t instanceof vc(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function iw(e){return Jd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function hY(e){return Qu(Hd(e)).left+iw(e).scrollLeft}function MTe(e,t,n){const r=fu(t),i=Hd(t),o=Qu(e,r&&function(l){const u=Qu(l);return lS(u.width)!==l.offsetWidth||lS(u.height)!==l.offsetHeight}(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Zu(t)!=="body"||rw(i))&&(a=iw(t)),fu(t)){const l=Qu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=hY(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function pY(e){return Zu(e)==="html"?e:e.assignedSlot||e.parentNode||(YP(e)?e.host:null)||Hd(e)}function JD(e){return fu(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Y_(e){const t=vc(e);let n=JD(e);for(;n&&OTe(n)&&getComputedStyle(n).position==="static";)n=JD(n);return n&&(Zu(n)==="html"||Zu(n)==="body"&&getComputedStyle(n).position==="static"&&!ZD(n))?t:n||function(r){let i=pY(r);for(YP(i)&&(i=i.host);fu(i)&&!["html","body"].includes(Zu(i));){if(ZD(i))return i;i=i.parentNode}return null}(e)||t}function eN(e){if(fu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Qu(e);return{width:t.width,height:t.height}}function mY(e){const t=pY(e);return["html","body","#document"].includes(Zu(t))?e.ownerDocument.body:fu(t)&&rw(t)?t:mY(t)}function uS(e,t){var n;t===void 0&&(t=[]);const r=mY(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=vc(r),a=i?[o].concat(o.visualViewport||[],rw(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(uS(a))}function tN(e,t,n){return t==="viewport"?oS(function(r,i){const o=vc(r),a=Hd(r),s=o.visualViewport;let l=a.clientWidth,u=a.clientHeight,d=0,h=0;if(s){l=s.width,u=s.height;const g=fY();(g||!g&&i==="fixed")&&(d=s.offsetLeft,h=s.offsetTop)}return{width:l,height:u,x:d,y:h}}(e,n)):Jd(t)?function(r,i){const o=Qu(r,!1,i==="fixed"),a=o.top+r.clientTop,s=o.left+r.clientLeft;return{top:a,left:s,x:s,y:a,right:s+r.clientWidth,bottom:a+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,n):oS(function(r){var i;const o=Hd(r),a=iw(r),s=(i=r.ownerDocument)==null?void 0:i.body,l=d2(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=d2(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-a.scrollLeft+hY(r);const h=-a.scrollTop;return Gy(s||o).direction==="rtl"&&(d+=d2(o.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:d,y:h}}(Hd(e)))}function ITe(e){const t=uS(e),n=["absolute","fixed"].includes(Gy(e).position)&&fu(e)?Y_(e):e;return Jd(n)?t.filter(r=>Jd(r)&&function(i,o){const a=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(a&&YP(a)){let s=o;do{if(s&&i===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(r,n)&&Zu(r)!=="body"):[]}const RTe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?ITe(t):[].concat(n),r],a=o[0],s=o.reduce((l,u)=>{const d=tN(t,u,i);return l.top=d2(d.top,l.top),l.right=QD(d.right,l.right),l.bottom=QD(d.bottom,l.bottom),l.left=d2(d.left,l.left),l},tN(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=fu(n),o=Hd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Zu(n)!=="body"||rw(o))&&(a=iw(n)),fu(n))){const l=Qu(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}},isElement:Jd,getDimensions:eN,getOffsetParent:Y_,getDocumentElement:Hd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:MTe(t,Y_(n),r),floating:{...eN(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Gy(e).direction==="rtl"};function DTe(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,d=l||u?[...Jd(e)?uS(e):[],...uS(t)]:[];d.forEach(b=>{l&&b.addEventListener("scroll",n,{passive:!0}),u&&b.addEventListener("resize",n)});let h,g=null;if(a){let b=!0;g=new ResizeObserver(()=>{b||n(),b=!1}),Jd(e)&&!s&&g.observe(e),g.observe(t)}let v=s?Qu(e):null;return s&&function b(){const S=Qu(e);!v||S.x===v.x&&S.y===v.y&&S.width===v.width&&S.height===v.height||n(),v=S,h=requestAnimationFrame(b)}(),n(),()=>{var b;d.forEach(S=>{l&&S.removeEventListener("scroll",n),u&&S.removeEventListener("resize",n)}),(b=g)==null||b.disconnect(),g=null,s&&cancelAnimationFrame(h)}}const NTe=(e,t,n)=>STe(e,t,{platform:RTe,...n});var K_=typeof document<"u"?w.useLayoutEffect:w.useEffect;function X_(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(!X_(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)&&!X_(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function jTe(e){const t=w.useRef(e);return K_(()=>{t.current=e}),t}function BTe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=w.useRef(null),a=w.useRef(null),s=jTe(i),l=w.useRef(null),[u,d]=w.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[h,g]=w.useState(t);X_(h==null?void 0:h.map(T=>{let{options:A}=T;return A}),t==null?void 0:t.map(T=>{let{options:A}=T;return A}))||g(t);const v=w.useCallback(()=>{!o.current||!a.current||NTe(o.current,a.current,{middleware:h,placement:n,strategy:r}).then(T=>{b.current&&Qs.flushSync(()=>{d(T)})})},[h,n,r]);K_(()=>{b.current&&v()},[v]);const b=w.useRef(!1);K_(()=>(b.current=!0,()=>{b.current=!1}),[]);const S=w.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=w.useCallback(T=>{o.current=T,S()},[S]),_=w.useCallback(T=>{a.current=T,S()},[S]),k=w.useMemo(()=>({reference:o,floating:a}),[]);return w.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:_}),[u,v,k,E,_])}const $Te=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?qD({element:t.current,padding:n}).fn(i):{}:t?qD({element:t,padding:n}).fn(i):{}}}};function FTe(e){const[t,n]=w.useState(void 0);return l0(()=>{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 gY="Popper",[KP,vY]=Uy(gY),[zTe,yY]=KP(gY),HTe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return w.createElement(zTe,{scope:t,anchor:r,onAnchorChange:i},n)},VTe="PopperAnchor",WTe=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=yY(VTe,n),a=w.useRef(null),s=fs(t,a);return w.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:w.createElement(sc.div,bn({},i,{ref:s}))}),cS="PopperContent",[UTe,SHe]=KP(cS),[GTe,qTe]=KP(cS,{hasParent:!1,positionUpdateFns:new Set}),YTe=w.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:d,side:h="bottom",sideOffset:g=0,align:v="center",alignOffset:b=0,arrowPadding:S=0,collisionBoundary:E=[],collisionPadding:_=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:A=!0,...M}=e,R=yY(cS,d),[D,j]=w.useState(null),F=fs(t,ae=>j(ae)),[H,K]=w.useState(null),te=FTe(H),G=(n=te==null?void 0:te.width)!==null&&n!==void 0?n:0,$=(r=te==null?void 0:te.height)!==null&&r!==void 0?r:0,U=h+(v!=="center"?"-"+v:""),X=typeof _=="number"?_:{top:0,right:0,bottom:0,left:0,..._},Z=Array.isArray(E)?E:[E],W=Z.length>0,Q={padding:X,boundary:Z.filter(XTe),altBoundary:W},{reference:re,floating:de,strategy:ve,x:Pe,y:be,placement:He,middlewareData:Oe,update:ot}=BTe({strategy:"fixed",placement:U,whileElementsMounted:DTe,middleware:[TTe({mainAxis:g+$,alignmentAxis:b}),A?LTe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?ATe():void 0,...Q}):void 0,H?$Te({element:H,padding:S}):void 0,A?ETe({...Q}):void 0,ZTe({arrowWidth:G,arrowHeight:$}),T?PTe({strategy:"referenceHidden"}):void 0].filter(KTe)});l0(()=>{re(R.anchor)},[re,R.anchor]);const Ve=Pe!==null&&be!==null,[Be,wt]=bY(He),st=(i=Oe.arrow)===null||i===void 0?void 0:i.x,gt=(o=Oe.arrow)===null||o===void 0?void 0:o.y,St=((a=Oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,lt]=w.useState();l0(()=>{D&<(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Mt,positionUpdateFns:ut}=qTe(cS,d),_t=!Mt;w.useLayoutEffect(()=>{if(!_t)return ut.add(ot),()=>{ut.delete(ot)}},[_t,ut,ot]),w.useLayoutEffect(()=>{_t&&Ve&&Array.from(ut).reverse().forEach(ae=>requestAnimationFrame(ae))},[_t,Ve,ut]);const ln={"data-side":Be,"data-align":wt,...M,ref:F,style:{...M.style,animation:Ve?void 0:"none",opacity:(s=Oe.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return w.createElement("div",{ref:de,"data-radix-popper-content-wrapper":"",style:{position:ve,left:0,top:0,transform:Ve?`translate3d(${Math.round(Pe)}px, ${Math.round(be)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=Oe.transformOrigin)===null||l===void 0?void 0:l.x,(u=Oe.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},w.createElement(UTe,{scope:d,placedSide:Be,onArrowChange:K,arrowX:st,arrowY:gt,shouldHideArrow:St},_t?w.createElement(GTe,{scope:d,hasParent:!0,positionUpdateFns:ut},w.createElement(sc.div,ln)):w.createElement(sc.div,ln)))});function KTe(e){return e!==void 0}function XTe(e){return e!==null}const ZTe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,h=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,g=h?0:e.arrowWidth,v=h?0:e.arrowHeight,[b,S]=bY(s),E={start:"0%",center:"50%",end:"100%"}[S],_=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+g/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",A="";return b==="bottom"?(T=h?E:`${_}px`,A=`${-v}px`):b==="top"?(T=h?E:`${_}px`,A=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,A=h?E:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,A=h?E:`${k}px`),{data:{x:T,y:A}}}});function bY(e){const[t,n="center"]=e.split("-");return[t,n]}const QTe=HTe,JTe=WTe,eLe=YTe;function tLe(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const SY=e=>{const{present:t,children:n}=e,r=nLe(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=fs(r.ref,i.ref);return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};SY.displayName="Presence";function nLe(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),o=w.useRef("none"),a=e?"mounted":"unmounted",[s,l]=tLe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=Xb(r.current);o.current=s==="mounted"?u:"none"},[s]),l0(()=>{const u=r.current,d=i.current;if(d!==e){const g=o.current,v=Xb(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&g!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),l0(()=>{if(t){const u=h=>{const v=Xb(r.current).includes(h.animationName);h.target===t&&v&&Qs.flushSync(()=>l("ANIMATION_END"))},d=h=>{h.target===t&&(o.current=Xb(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Xb(e){return(e==null?void 0:e.animationName)||"none"}function rLe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=iLe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=du(n),l=w.useCallback(u=>{if(o){const h=typeof u=="function"?u(e):u;h!==e&&s(h)}else i(u)},[o,e,i,s]);return[a,l]}function iLe({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),o=du(t);return w.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const UC="rovingFocusGroup.onEntryFocus",oLe={bubbles:!1,cancelable:!0},XP="RovingFocusGroup",[Z_,xY,aLe]=rY(XP),[sLe,wY]=Uy(XP,[aLe]),[lLe,uLe]=sLe(XP),cLe=w.forwardRef((e,t)=>w.createElement(Z_.Provider,{scope:e.__scopeRovingFocusGroup},w.createElement(Z_.Slot,{scope:e.__scopeRovingFocusGroup},w.createElement(dLe,bn({},e,{ref:t}))))),dLe=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,h=w.useRef(null),g=fs(t,h),v=iY(o),[b=null,S]=rLe({prop:a,defaultProp:s,onChange:l}),[E,_]=w.useState(!1),k=du(u),T=xY(n),A=w.useRef(!1),[M,R]=w.useState(0);return w.useEffect(()=>{const D=h.current;if(D)return D.addEventListener(UC,k),()=>D.removeEventListener(UC,k)},[k]),w.createElement(lLe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:w.useCallback(D=>S(D),[S]),onItemShiftTab:w.useCallback(()=>_(!0),[]),onFocusableItemAdd:w.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:w.useCallback(()=>R(D=>D-1),[])},w.createElement(sc.div,bn({tabIndex:E||M===0?-1:0,"data-orientation":r},d,{ref:g,style:{outline:"none",...e.style},onMouseDown:rr(e.onMouseDown,()=>{A.current=!0}),onFocus:rr(e.onFocus,D=>{const j=!A.current;if(D.target===D.currentTarget&&j&&!E){const F=new CustomEvent(UC,oLe);if(D.currentTarget.dispatchEvent(F),!F.defaultPrevented){const H=T().filter(U=>U.focusable),K=H.find(U=>U.active),te=H.find(U=>U.id===b),$=[K,te,...H].filter(Boolean).map(U=>U.ref.current);CY($)}}A.current=!1}),onBlur:rr(e.onBlur,()=>_(!1))})))}),fLe="RovingFocusGroupItem",hLe=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=bTe(),s=uLe(fLe,n),l=s.currentTabStopId===a,u=xY(n),{onFocusableItemAdd:d,onFocusableItemRemove:h}=s;return w.useEffect(()=>{if(r)return d(),()=>h()},[r,d,h]),w.createElement(Z_.ItemSlot,{scope:n,id:a,focusable:r,active:i},w.createElement(sc.span,bn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:rr(e.onMouseDown,g=>{r?s.onItemFocus(a):g.preventDefault()}),onFocus:rr(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:rr(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){s.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=gLe(g,s.orientation,s.dir);if(v!==void 0){g.preventDefault();let S=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")S.reverse();else if(v==="prev"||v==="next"){v==="prev"&&S.reverse();const E=S.indexOf(g.currentTarget);S=s.loop?vLe(S,E+1):S.slice(E+1)}setTimeout(()=>CY(S))}})})))}),pLe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mLe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gLe(e,t,n){const r=mLe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return pLe[r]}function CY(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function vLe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const yLe=cLe,bLe=hLe,SLe=["Enter"," "],xLe=["ArrowDown","PageUp","Home"],_Y=["ArrowUp","PageDown","End"],wLe=[...xLe,..._Y],ow="Menu",[Q_,CLe,_Le]=rY(ow),[xp,kY]=Uy(ow,[_Le,vY,wY]),ZP=vY(),EY=wY(),[kLe,aw]=xp(ow),[ELe,QP]=xp(ow),PLe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=ZP(t),[l,u]=w.useState(null),d=w.useRef(!1),h=du(o),g=iY(i);return w.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.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})}},[]),w.createElement(QTe,s,w.createElement(kLe,{scope:t,open:n,onOpenChange:h,content:l,onContentChange:u},w.createElement(ELe,{scope:t,onClose:w.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:g,modal:a},r)))},TLe=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ZP(n);return w.createElement(JTe,bn({},i,r,{ref:t}))}),LLe="MenuPortal",[xHe,ALe]=xp(LLe,{forceMount:void 0}),Vd="MenuContent",[OLe,PY]=xp(Vd),MLe=w.forwardRef((e,t)=>{const n=ALe(Vd,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=aw(Vd,e.__scopeMenu),a=QP(Vd,e.__scopeMenu);return w.createElement(Q_.Provider,{scope:e.__scopeMenu},w.createElement(SY,{present:r||o.open},w.createElement(Q_.Slot,{scope:e.__scopeMenu},a.modal?w.createElement(ILe,bn({},i,{ref:t})):w.createElement(RLe,bn({},i,{ref:t})))))}),ILe=w.forwardRef((e,t)=>{const n=aw(Vd,e.__scopeMenu),r=w.useRef(null),i=fs(t,r);return w.useEffect(()=>{const o=r.current;if(o)return cV(o)},[]),w.createElement(TY,bn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:rr(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),RLe=w.forwardRef((e,t)=>{const n=aw(Vd,e.__scopeMenu);return w.createElement(TY,bn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),TY=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:g,disableOutsideScroll:v,...b}=e,S=aw(Vd,n),E=QP(Vd,n),_=ZP(n),k=EY(n),T=CLe(n),[A,M]=w.useState(null),R=w.useRef(null),D=fs(t,R,S.onContentChange),j=w.useRef(0),F=w.useRef(""),H=w.useRef(0),K=w.useRef(null),te=w.useRef("right"),G=w.useRef(0),$=v?XV:w.Fragment,U=v?{as:ay,allowPinchZoom:!0}:void 0,X=W=>{var Q,re;const de=F.current+W,ve=T().filter(Ve=>!Ve.disabled),Pe=document.activeElement,be=(Q=ve.find(Ve=>Ve.ref.current===Pe))===null||Q===void 0?void 0:Q.textValue,He=ve.map(Ve=>Ve.textValue),Oe=VLe(He,de,be),ot=(re=ve.find(Ve=>Ve.textValue===Oe))===null||re===void 0?void 0:re.ref.current;(function Ve(Be){F.current=Be,window.clearTimeout(j.current),Be!==""&&(j.current=window.setTimeout(()=>Ve(""),1e3))})(de),ot&&setTimeout(()=>ot.focus())};w.useEffect(()=>()=>window.clearTimeout(j.current),[]),uTe();const Z=w.useCallback(W=>{var Q,re;return te.current===((Q=K.current)===null||Q===void 0?void 0:Q.side)&&ULe(W,(re=K.current)===null||re===void 0?void 0:re.area)},[]);return w.createElement(OLe,{scope:n,searchRef:F,onItemEnter:w.useCallback(W=>{Z(W)&&W.preventDefault()},[Z]),onItemLeave:w.useCallback(W=>{var Q;Z(W)||((Q=R.current)===null||Q===void 0||Q.focus(),M(null))},[Z]),onTriggerLeave:w.useCallback(W=>{Z(W)&&W.preventDefault()},[Z]),pointerGraceTimerRef:H,onPointerGraceIntentChange:w.useCallback(W=>{K.current=W},[])},w.createElement($,U,w.createElement(cTe,{asChild:!0,trapped:i,onMountAutoFocus:rr(o,W=>{var Q;W.preventDefault(),(Q=R.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},w.createElement(aTe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:g},w.createElement(yLe,bn({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:M,onEntryFocus:W=>{E.isUsingKeyboardRef.current||W.preventDefault()}}),w.createElement(eLe,bn({role:"menu","aria-orientation":"vertical","data-state":FLe(S.open),"data-radix-menu-content":"",dir:E.dir},_,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:rr(b.onKeyDown,W=>{const re=W.target.closest("[data-radix-menu-content]")===W.currentTarget,de=W.ctrlKey||W.altKey||W.metaKey,ve=W.key.length===1;re&&(W.key==="Tab"&&W.preventDefault(),!de&&ve&&X(W.key));const Pe=R.current;if(W.target!==Pe||!wLe.includes(W.key))return;W.preventDefault();const He=T().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);_Y.includes(W.key)&&He.reverse(),zLe(He)}),onBlur:rr(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(j.current),F.current="")}),onPointerMove:rr(e.onPointerMove,e8(W=>{const Q=W.target,re=G.current!==W.clientX;if(W.currentTarget.contains(Q)&&re){const de=W.clientX>G.current?"right":"left";te.current=de,G.current=W.clientX}}))})))))))}),J_="MenuItem",nN="menu.itemSelect",DLe=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=w.useRef(null),a=QP(J_,e.__scopeMenu),s=PY(J_,e.__scopeMenu),l=fs(t,o),u=w.useRef(!1),d=()=>{const h=o.current;if(!n&&h){const g=new CustomEvent(nN,{bubbles:!0,cancelable:!0});h.addEventListener(nN,v=>r==null?void 0:r(v),{once:!0}),nY(h,g),g.defaultPrevented?u.current=!1:a.onClose()}};return w.createElement(NLe,bn({},i,{ref:l,disabled:n,onClick:rr(e.onClick,d),onPointerDown:h=>{var g;(g=e.onPointerDown)===null||g===void 0||g.call(e,h),u.current=!0},onPointerUp:rr(e.onPointerUp,h=>{var g;u.current||(g=h.currentTarget)===null||g===void 0||g.click()}),onKeyDown:rr(e.onKeyDown,h=>{const g=s.searchRef.current!=="";n||g&&h.key===" "||SLe.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})}))}),NLe=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=PY(J_,n),s=EY(n),l=w.useRef(null),u=fs(t,l),[d,h]=w.useState(!1),[g,v]=w.useState("");return w.useEffect(()=>{const b=l.current;if(b){var S;v(((S=b.textContent)!==null&&S!==void 0?S:"").trim())}},[o.children]),w.createElement(Q_.ItemSlot,{scope:n,disabled:r,textValue:i??g},w.createElement(bLe,bn({asChild:!0},s,{focusable:!r}),w.createElement(sc.div,bn({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:rr(e.onPointerMove,e8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:rr(e.onPointerLeave,e8(b=>a.onItemLeave(b))),onFocus:rr(e.onFocus,()=>h(!0)),onBlur:rr(e.onBlur,()=>h(!1))}))))}),jLe="MenuRadioGroup";xp(jLe,{value:void 0,onValueChange:()=>{}});const BLe="MenuItemIndicator";xp(BLe,{checked:!1});const $Le="MenuSub";xp($Le);function FLe(e){return e?"open":"closed"}function zLe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function HLe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function VLe(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=HLe(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 WLe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,l=t[o].y,u=t[a].x,d=t[a].y;l>r!=d>r&&n<(u-s)*(r-l)/(d-l)+s&&(i=!i)}return i}function ULe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return WLe(n,t)}function e8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const GLe=PLe,qLe=TLe,YLe=MLe,KLe=DLe,LY="ContextMenu",[XLe,wHe]=Uy(LY,[kY]),sw=kY(),[ZLe,AY]=XLe(LY),QLe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=w.useState(!1),l=sw(t),u=du(r),d=w.useCallback(h=>{s(h),u(h)},[u]);return w.createElement(ZLe,{scope:t,open:a,onOpenChange:d,modal:o},w.createElement(GLe,bn({},l,{dir:i,open:a,onOpenChange:d,modal:o}),n))},JLe="ContextMenuTrigger",eAe=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=AY(JLe,n),o=sw(n),a=w.useRef({x:0,y:0}),s=w.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=w.useRef(0),u=w.useCallback(()=>window.clearTimeout(l.current),[]),d=h=>{a.current={x:h.clientX,y:h.clientY},i.onOpenChange(!0)};return w.useEffect(()=>u,[u]),w.createElement(w.Fragment,null,w.createElement(qLe,bn({},o,{virtualRef:s})),w.createElement(sc.span,bn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:rr(e.onContextMenu,h=>{u(),d(h),h.preventDefault()}),onPointerDown:rr(e.onPointerDown,Zb(h=>{u(),l.current=window.setTimeout(()=>d(h),700)})),onPointerMove:rr(e.onPointerMove,Zb(u)),onPointerCancel:rr(e.onPointerCancel,Zb(u)),onPointerUp:rr(e.onPointerUp,Zb(u))})))}),tAe="ContextMenuContent",nAe=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=AY(tAe,n),o=sw(n),a=w.useRef(!1);return w.createElement(YLe,bn({},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)"}}))}),rAe=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=sw(n);return w.createElement(KLe,bn({},i,r,{ref:t}))});function Zb(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const iAe=QLe,oAe=eAe,aAe=nAe,cd=rAe,sAe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,OY=w.memo(e=>{var te,G,$,U,X,Z,W,Q;const t=Ie(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,shouldUseSingleGalleryColumn:a}=he(bPe),{image:s,isSelected:l}=e,{url:u,thumbnail:d,uuid:h,metadata:g}=s,[v,b]=w.useState(!1),S=jy(),{t:E}=We(),_=()=>b(!0),k=()=>b(!1),T=()=>{var re,de;if(s.metadata){const[ve,Pe]=bP((de=(re=s.metadata)==null?void 0:re.image)==null?void 0:de.prompt);ve&&t(Fx(ve)),t(J2(Pe||""))}S({title:E("toast:promptSet"),status:"success",duration:2500,isClosable:!0})},A=()=>{s.metadata&&t($y(s.metadata.image.seed)),S({title:E("toast:seedSet"),status:"success",duration:2500,isClosable:!0})},M=()=>{t(E0(s)),n!=="img2img"&&t(qo("img2img")),S({title:E("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},R=()=>{t($x(s)),t(Bx()),n!=="unifiedCanvas"&&t(qo("unifiedCanvas")),S({title:E("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},D=()=>{g&&t(LU(g)),S({title:E("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})},j=async()=>{var re;if((re=g==null?void 0:g.image)!=null&&re.init_image_path&&(await fetch(g.image.init_image_path)).ok){t(qo("img2img")),t(Uwe(g)),S({title:E("toast:initialImageSet"),status:"success",duration:2500,isClosable:!0});return}S({title:E("toast:initialImageNotSet"),description:E("toast:initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},F=()=>t(ZI(s)),H=re=>{re.dataTransfer.setData("invokeai/imageUuid",h),re.dataTransfer.effectAllowed="move"},K=()=>{t(ZI(s))};return y.jsxs(iAe,{onOpenChange:re=>{t(_U(re))},children:[y.jsx(oAe,{children:y.jsxs(ko,{position:"relative",className:"hoverable-image",onMouseOver:_,onMouseOut:k,userSelect:"none",draggable:!0,onDragStart:H,children:[y.jsx(JS,{className:"hoverable-image-image",objectFit:a?"contain":r,rounded:"md",src:d||u,loading:"lazy"}),y.jsx("div",{className:"hoverable-image-content",onClick:F,children:l&&y.jsx(Da,{width:"50%",height:"50%",as:FP,className:"hoverable-image-check"})}),v&&i>=64&&y.jsx("div",{className:"hoverable-image-delete-button",children:y.jsx(iS,{image:s,children:y.jsx(ss,{"aria-label":E("parameters:deleteImage"),icon:y.jsx(mPe,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})]},h)}),y.jsxs(aAe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:re=>{re.detail.originalEvent.preventDefault()},children:[y.jsx(cd,{onClickCapture:K,children:E("parameters:openInViewer")}),y.jsx(cd,{onClickCapture:T,disabled:((G=(te=s==null?void 0:s.metadata)==null?void 0:te.image)==null?void 0:G.prompt)===void 0,children:E("parameters:usePrompt")}),y.jsx(cd,{onClickCapture:A,disabled:((U=($=s==null?void 0:s.metadata)==null?void 0:$.image)==null?void 0:U.seed)===void 0,children:E("parameters:useSeed")}),y.jsx(cd,{onClickCapture:D,disabled:!["txt2img","img2img"].includes((Z=(X=s==null?void 0:s.metadata)==null?void 0:X.image)==null?void 0:Z.type),children:E("parameters:useAll")}),y.jsx(cd,{onClickCapture:j,disabled:((Q=(W=s==null?void 0:s.metadata)==null?void 0:W.image)==null?void 0:Q.type)!=="img2img",children:E("parameters:useInitImg")}),y.jsx(cd,{onClickCapture:M,children:E("parameters:sendToImg2Img")}),y.jsx(cd,{onClickCapture:R,children:E("parameters:sendToUnifiedCanvas")}),y.jsx(cd,{"data-warning":!0,children:y.jsx(iS,{image:s,children:y.jsx("p",{children:E("parameters:deleteImage")})})})]})]})},sAe);OY.displayName="HoverableImage";const Qb=320,rN=40,lAe={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500},training:{galleryMinWidth:200,galleryMaxWidth:500}},iN=400;function MY(){const e=Ie(),{t}=We(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:d,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:S,isLightboxOpen:E,isStaging:_,shouldEnableResize:k,shouldUseSingleGalleryColumn:T}=he(yPe),{galleryMinWidth:A,galleryMaxWidth:M}=E?{galleryMinWidth:iN,galleryMaxWidth:iN}:lAe[d],[R,D]=w.useState(S>=Qb),[j,F]=w.useState(!1),[H,K]=w.useState(0),te=w.useRef(null),G=w.useRef(null),$=w.useRef(null);w.useEffect(()=>{S>=Qb&&D(!1)},[S]);const U=()=>{e(Mwe(!o)),e(vi(!0))},X=()=>{a?W():Z()},Z=()=>{e($d(!0)),o&&e(vi(!0))},W=w.useCallback(()=>{e($d(!1)),e(_U(!1)),e(Iwe(G.current?G.current.scrollTop:0)),setTimeout(()=>o&&e(vi(!0)),400)},[e,o]),Q=()=>{e(H_(r))},re=be=>{e(iv(be))},de=()=>{g||($.current=window.setTimeout(()=>W(),500))},ve=()=>{$.current&&window.clearTimeout($.current)};Je("g",()=>{X()},[a,o]),Je("left",()=>{e(yP())},{enabled:!_||d!=="unifiedCanvas"},[_]),Je("right",()=>{e(vP())},{enabled:!_||d!=="unifiedCanvas"},[_]),Je("shift+g",()=>{U()},[o]),Je("esc",()=>{e($d(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Pe=32;return Je("shift+up",()=>{if(l<256){const be=ke.clamp(l+Pe,32,256);e(iv(be))}},[l]),Je("shift+down",()=>{if(l>32){const be=ke.clamp(l-Pe,32,256);e(iv(be))}},[l]),w.useEffect(()=>{G.current&&(G.current.scrollTop=s)},[s,a]),w.useEffect(()=>{function be(He){!o&&te.current&&!te.current.contains(He.target)&&W()}return document.addEventListener("mousedown",be),()=>{document.removeEventListener("mousedown",be)}},[W,o]),y.jsx(eY,{nodeRef:te,in:a||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:y.jsxs("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:te,onMouseLeave:o?void 0:de,onMouseEnter:o?void 0:ve,onMouseOver:o?void 0:ve,children:[y.jsxs(Yq,{minWidth:A,maxWidth:o?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:k},size:{width:S,height:o?"100%":"100vh"},onResizeStart:(be,He,Oe)=>{K(Oe.clientHeight),Oe.style.height=`${Oe.clientHeight}px`,o&&(Oe.style.position="fixed",Oe.style.right="1rem",F(!0))},onResizeStop:(be,He,Oe,ot)=>{const Ve=o?ke.clamp(Number(S)+ot.width,A,Number(M)):Number(S)+ot.width;e(Nwe(Ve)),Oe.removeAttribute("data-resize-alert"),o&&(Oe.style.position="relative",Oe.style.removeProperty("right"),Oe.style.setProperty("height",o?"100%":"100vh"),F(!1),e(vi(!0)))},onResize:(be,He,Oe,ot)=>{const Ve=ke.clamp(Number(S)+ot.width,A,Number(o?M:.95*window.innerWidth));Ve>=Qb&&!R?D(!0):Ve<Qb&&R&&D(!1),l>Ve-rN&&e(iv(Ve-rN)),o&&(Ve>=M?Oe.setAttribute("data-resize-alert","true"):Oe.removeAttribute("data-resize-alert")),Oe.style.height=`${H}px`},children:[y.jsxs("div",{className:"image-gallery-header",children:[y.jsx(Gi,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?y.jsxs(y.Fragment,{children:[y.jsx(cr,{size:"sm","data-selected":r==="result",onClick:()=>e(Tb("result")),children:t("gallery:generations")}),y.jsx(cr,{size:"sm","data-selected":r==="user",onClick:()=>e(Tb("user")),children:t("gallery:uploads")})]}):y.jsxs(y.Fragment,{children:[y.jsx(Ze,{"aria-label":t("gallery:showGenerations"),tooltip:t("gallery:showGenerations"),"data-selected":r==="result",icon:y.jsx(rPe,{}),onClick:()=>e(Tb("result"))}),y.jsx(Ze,{"aria-label":t("gallery:showUploads"),tooltip:t("gallery:showUploads"),"data-selected":r==="user",icon:y.jsx(vPe,{}),onClick:()=>e(Tb("user"))})]})}),y.jsxs("div",{className:"image-gallery-header-right-icons",children:[y.jsx(Zs,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:y.jsx(Ze,{size:"sm","aria-label":t("gallery:gallerySettings"),icon:y.jsx(WP,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:y.jsxs("div",{className:"image-gallery-settings-popover",children:[y.jsxs("div",{children:[y.jsx(so,{value:l,onChange:re,min:32,max:256,hideTooltip:!0,label:t("gallery:galleryImageSize")}),y.jsx(Ze,{size:"sm","aria-label":t("gallery:galleryImageResetSize"),tooltip:t("gallery:galleryImageResetSize"),onClick:()=>e(iv(64)),icon:y.jsx(Yx,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),y.jsx("div",{children:y.jsx(er,{label:t("gallery:maintainAspectRatio"),isChecked:h==="contain",onChange:()=>e(Rwe(h==="contain"?"cover":"contain"))})}),y.jsx("div",{children:y.jsx(er,{label:t("gallery:autoSwitchNewImages"),isChecked:v,onChange:be=>e(Dwe(be.target.checked))})}),y.jsx("div",{children:y.jsx(er,{label:t("gallery:singleColumnLayout"),isChecked:T,onChange:be=>e(jwe(be.target.checked))})})]})}),y.jsx(Ze,{size:"sm",className:"image-gallery-icon-btn","aria-label":t("gallery:pinGallery"),tooltip:`${t("gallery:pinGallery")} (Shift+G)`,onClick:U,icon:o?y.jsx(Kq,{}):y.jsx(Xq,{})})]})]}),y.jsx("div",{className:"image-gallery-container",ref:G,children:n.length||b?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(be=>{const{uuid:He}=be,Oe=i===He;return y.jsx(OY,{image:be,isSelected:Oe},He)})}),y.jsx(as,{onClick:Q,isDisabled:!b,className:"image-gallery-load-more-btn",children:t(b?"gallery:loadMore":"gallery:allImagesLoaded")})]}):y.jsxs("div",{className:"image-gallery-container-placeholder",children:[y.jsx(Zq,{}),y.jsx("p",{children:t("gallery:noImagesInGallery")})]})})]}),j&&y.jsx("div",{style:{width:`${S}px`,height:"100%"}})]})})}/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var t8=function(e,t){return t8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},t8(e,t)};function uAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");t8(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var iu=function(){return iu=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},iu.apply(this,arguments)};function oN(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}var rs=function(e,t){return Number(e.toFixed(t))},cAe=function(e,t){return typeof e=="number"?e:t},Pi=function(e,t,n){n&&typeof n=="function"&&n(e,t)},dAe=function(e){return-Math.cos(e*Math.PI)/2+.5},fAe=function(e){return e},hAe=function(e){return e*e},pAe=function(e){return e*(2-e)},mAe=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},gAe=function(e){return e*e*e},vAe=function(e){return--e*e*e+1},yAe=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},bAe=function(e){return e*e*e*e},SAe=function(e){return 1- --e*e*e*e},xAe=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},wAe=function(e){return e*e*e*e*e},CAe=function(e){return 1+--e*e*e*e*e},_Ae=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},IY={easeOut:dAe,linear:fAe,easeInQuad:hAe,easeOutQuad:pAe,easeInOutQuad:mAe,easeInCubic:gAe,easeOutCubic:vAe,easeInOutCubic:yAe,easeInQuart:bAe,easeOutQuart:SAe,easeInOutQuart:xAe,easeInQuint:wAe,easeOutQuint:CAe,easeInOutQuint:_Ae},RY=function(e){typeof e=="number"&&cancelAnimationFrame(e)},Wl=function(e){e.mounted&&(RY(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function DY(e,t,n,r){if(e.mounted){var i=new Date().getTime(),o=1;Wl(e),e.animation=function(){if(!e.mounted)return RY(e.animation);var a=new Date().getTime()-i,s=a/n,l=IY[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function pf(e,t,n,r){var i=kAe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,d=t.scale-s,h=t.positionX-l,g=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):DY(e,r,n,function(v){var b=s+d*v,S=l+h*v,E=u+g*v;o(b,S,E)})}}function kAe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function EAe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,d=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:d}}var PAe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,d=s,h=r-i-l,g=l;return{minPositionX:u,maxPositionX:d,minPositionY:h,maxPositionY:g}},JP=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=EAe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,d=o.newContentHeight,h=o.newDiffHeight,g=PAe(a,l,u,s,d,h,Boolean(i));return g},u0=function(e,t){var n=JP(e,t);return e.bounds=n,n};function lw(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,d=n.maxPositionY,h=0,g=0;a&&(h=i,g=o);var v=n8(e,s-h,u+h,r),b=n8(t,l-g,d+g,r);return{x:v,y:b}}var n8=function(e,t,n,r){return r?e<t?rs(t,2):e>n?rs(n,2):rs(e,2):rs(e,2)};function uw(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,d=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var h=l-t*d,g=u-n*d,v=lw(h,g,i,o,0,0,null);return v}function qy(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var aN=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i==null?void 0:i.contains(o),s=r&&o&&a;if(!s)return!1;var l=cw(o,n);return!l},sN=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},TAe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},LAe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function AAe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var d=e.bounds,h=d.maxPositionX,g=d.minPositionX,v=d.maxPositionY,b=d.minPositionY,S=n>h||n<g,E=r>v||r<b,_=n>h?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=uw(e,_,k,i,e.bounds,s||l),A=T.x,M=T.y;return{scale:i,positionX:S?A:n,positionY:E?M:r}}}function OAe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,d=l.positionX,h=l.positionY,g=t!==d,v=n!==h,b=!g||!v;if(!(!a||b||!s)){var S=lw(t,n,s,o,r,i,a),E=S.x,_=S.y;e.setTransformState(u,E,_)}}var MAe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var d=t-r.x,h=n-r.y,g=a?l:d,v=s?u:h;return{x:g,y:v}},dS=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},IAe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},RAe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function DAe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function lN(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var d=a+(e-a)*u;return d>l?l:d<a?a:d}if(t<o&&n<o){var d=o+(e-o)*u;return d<s?s:d>o?o:d}}return r?t:n8(e,o,a,i)}function NAe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function jAe(e,t){var n=IAe(e);if(n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=NAe(a,s),d=t.x-r.x,h=t.y-r.y,g=d/u,v=h/u,b=l-i,S=d*d+h*h,E=Math.sqrt(S)/b;e.velocity={velocityX:g,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function BAe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=RAe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,d=n.minPositionX,h=n.maxPositionY,g=n.minPositionY,v=r.limitToBounds,b=r.alignmentAnimation,S=r.zoomAnimation,E=r.panning,_=E.lockAxisY,k=E.lockAxisX,T=S.animationType,A=b.sizeX,M=b.sizeY,R=b.velocityAlignmentTime,D=R,j=DAe(e,l),F=Math.max(j,D),H=dS(e,A),K=dS(e,M),te=H*i.offsetWidth/100,G=K*i.offsetHeight/100,$=u+te,U=d-te,X=h+G,Z=g-G,W=e.transformState,Q=new Date().getTime();DY(e,T,F,function(re){var de=e.transformState,ve=de.scale,Pe=de.positionX,be=de.positionY,He=new Date().getTime()-Q,Oe=He/D,ot=IY[b.animationType],Ve=1-ot(Math.min(1,Oe)),Be=1-re,wt=Pe+a*Be,st=be+s*Be,gt=lN(wt,W.positionX,Pe,k,v,d,u,U,$,Ve),St=lN(st,W.positionY,be,_,v,g,h,Z,X,Ve);(Pe!==wt||be!==st)&&e.setTransformState(ve,gt,St)})}}function uN(e,t){var n=e.transformState.scale;Wl(e),u0(e,n),t.touches?LAe(e,t):TAe(e,t)}function cN(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(r){var l=MAe(e,t,n),u=l.x,d=l.y,h=dS(e,a),g=dS(e,s);jAe(e,{x:u,y:d}),OAe(e,u,d,h,g)}}function $Ae(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r==null?void 0:r.getBoundingClientRect(),a=i==null?void 0:i.getBoundingClientRect(),s=(o==null?void 0:o.width)||0,l=(o==null?void 0:o.height)||0,u=(a==null?void 0:a.width)||0,d=(a==null?void 0:a.height)||0,h=s<u||l<d,g=!t&&n&&(n==null?void 0:n.total)>.1&&h;g?BAe(e):NY(e)}}function NY(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,d=o||t<r||!a&&!s;if(!d){var h=AAe(e);h&&pf(e,h,l,u)}}function jY(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,d=l.animationTime,h=l.animationType,g=u||r>=a;if((r>=1||s)&&NY(e),!(g||!i||!e.mounted)){var v=t||i.offsetWidth/2,b=n||i.offsetHeight/2,S=eT(e,a,v,b);S&&pf(e,S,d,h)}}function eT(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=qy(rs(t,2),o,a,0,!1),u=u0(e,l),d=uw(e,n,r,l,u,s),h=d.x,g=d.y;return{scale:l,positionX:h,positionY:g}}var hg={previousScale:1,scale:1,positionX:0,positionY:0},FAe=iu(iu({},hg),{setComponents:function(){},contextInstance:null}),hv={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},BY=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:hg.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:hg.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:hg.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:hg.positionY}},dN=function(e){var t=iu({},hv);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof hv[n]<"u";if(i&&r){var o=Object.prototype.toString.call(hv[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=iu(iu({},hv[n]),e[n]):s?t[n]=oN(oN([],hv[n]),e[n]):t[n]=e[n]}}),t},$Y=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var d=r*Math.exp(t*n),h=qy(rs(d,3),s,a,u,!1);return h};function FY(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var d=o.offsetWidth,h=o.offsetHeight,g=(d/2-l)/s,v=(h/2-u)/s,b=$Y(e,t,n),S=eT(e,b,g,v);if(!S)return console.error("Error during zoom event. New transformation state was not calculated.");pf(e,S,r,i)}function zY(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=BY(e.props),s=e.transformState,l=s.scale,u=s.positionX,d=s.positionY;if(i){var h=JP(e,a.scale),g=lw(a.positionX,a.positionY,h,o,0,0,i),v={scale:a.scale,positionX:g.x,positionY:g.y};l===a.scale&&u===a.positionX&&d===a.positionY||pf(e,v,t,n)}}function zAe(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return hg;var l=r.getBoundingClientRect(),u=HAe(t),d=u.x,h=u.y,g=t.offsetWidth,v=t.offsetHeight,b=r.offsetWidth/g,S=r.offsetHeight/v,E=qy(n||Math.min(b,S),a,s,0,!1),_=(l.width-g*E)/2,k=(l.height-v*E)/2,T=(l.left-d)*E+_,A=(l.top-h)*E+k,M=JP(e,E),R=lw(T,A,M,o,0,0,r),D=R.x,j=R.y;return{positionX:D,positionY:j,scale:E}}function HAe(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function VAe(e){if(e){if((e==null?void 0:e.offsetWidth)===void 0||(e==null?void 0:e.offsetHeight)===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var WAe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),FY(e,1,t,n,r)}},UAe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),FY(e,-1,t,n,r)}},GAe=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,d=e.wrapperComponent,h=e.contentComponent,g=e.setup.disabled;if(!(g||!d||!h)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};pf(e,v,i,o)}}},qAe=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),zY(e,t,n)}},YAe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=HY(t||i.scale,o,a);pf(e,s,n,r)}}},KAe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),Wl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&VAe(a)&&a&&o.contains(a)){var s=zAe(e,a,n);pf(e,s,r,i)}}},ri=function(e){return{instance:e,state:e.transformState,zoomIn:WAe(e),zoomOut:UAe(e),setTransform:GAe(e),resetTransform:qAe(e),centerView:YAe(e),zoomToElement:KAe(e)}},GC=!1;function qC(){try{var e={get passive(){return GC=!0,!1}};return e}catch{return GC=!1,GC}}var cw=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},fN=function(e){e&&clearTimeout(e)},XAe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},HY=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},ZAe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,d=s&&!l&&!r&&u;if(!d||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var h=cw(u,a);return!h};function QAe(e,t){var n=e?e.deltaY<0?1:-1:0,r=cAe(t,n);return r}function VY(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var JAe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,d=s.zoomAnimation,h=d.size,g=d.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var b=r?!1:!g,S=qy(rs(v,3),u,l,h,b);return S},eOe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?r<o||r>a||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaY<t.deltaY||n.deltaY<0&&n.deltaY>t.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},tOe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=cw(a,i);return!l},nOe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},rOe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=rs(i[0].clientX-r.left,5),a=rs(i[0].clientY-r.top,5),s=rs(i[1].clientX-r.left,5),l=rs(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},WY=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},iOe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var d=t/r,h=d*n;return qy(rs(h,2),a,o,l,!u)},oOe=160,aOe=100,sOe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Wl(e),Pi(ri(e),t,r),Pi(ri(e),t,i))},lOe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,d=a.centerZoomedOut,h=a.zoomAnimation,g=a.wheel,v=h.size,b=h.disabled,S=g.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=QAe(t,null),_=JAe(e,E,S,!t.ctrlKey);if(l!==_){var k=u0(e,_),T=VY(t,o,l),A=b||v===0||d,M=u&&A,R=uw(e,T.x,T.y,_,k,M),D=R.x,j=R.y;e.previousWheelEvent=t,e.setTransformState(_,D,j),Pi(ri(e),t,r),Pi(ri(e),t,i)}},uOe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;fN(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){e.mounted&&(jY(e,t.x,t.y),e.wheelAnimationTimer=null)},aOe);var o=eOe(e,t);o&&(fN(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){e.mounted&&(e.wheelStopEventTimer=null,Pi(ri(e),t,r),Pi(ri(e),t,i))},oOe))},cOe=function(e,t){var n=WY(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Wl(e)},dOe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,d=l.size;if(!(r===null||!n)){var h=rOe(t,i,n);if(!(!isFinite(h.x)||!isFinite(h.y))){var g=WY(t),v=iOe(e,g);if(v!==i){var b=u0(e,v),S=u||d===0||s,E=a&&S,_=uw(e,h.x,h.y,v,b,E),k=_.x,T=_.y;e.pinchMidpoint=h,e.lastDistance=g,e.setTransformState(v,k,T)}}}},fOe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,jY(e,t==null?void 0:t.x,t==null?void 0:t.y)};function hOe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return zY(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var d=i==="zoomOut"?-1:1,h=$Y(e,d,o),g=VY(t,u,l),v=eT(e,h,g.x,g.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");pf(e,v,a,s)}}var pOe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i==null?void 0:i.contains(l),d=n&&l&&u&&!a;if(!d)return!1;var h=cw(l,s);return!(h||!d)},UY=N.createContext(FAe),mOe=function(e){uAe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=BY(n.props),n.setup=dN(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=qC();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=ZAe(n,r);if(o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);a&&(sOe(n,r),lOe(n,r),uOe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=aN(n,r);if(a){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),Wl(n),uN(n,r),Pi(ri(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=sN(n);if(a){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),cN(n,r.clientX,r.clientY),Pi(ri(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&($Ae(n),Pi(ri(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=tOe(n,r);l&&(cOe(n,r),Wl(n),Pi(ri(n),r,a),Pi(ri(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=nOe(n);l&&(r.preventDefault(),r.stopPropagation(),dOe(n,r),Pi(ri(n),r,a),Pi(ri(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(fOe(n),Pi(ri(n),r,o),Pi(ri(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=aN(n,r);if(a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,Wl(n);var l=r.touches,u=l.length===1,d=l.length===2;u&&(Wl(n),uN(n,r),Pi(ri(n),r,o)),d&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=sN(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];cN(n,s.clientX,s.clientY),Pi(ri(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=pOe(n,r);o&&hOe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,u0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,Pi(ri(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=HY(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=XAe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(ri(n))},n}return t.prototype.componentDidMount=function(){var n=qC();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=qC();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),Wl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(u0(this,this.transformState.scale),this.setup=dN(this.props))},t.prototype.render=function(){var n=ri(this),r=this.props.children,i=typeof r=="function"?r(n):r;return N.createElement(UY.Provider,{value:iu(iu({},this.transformState),{setComponents:this.setComponents,contextInstance:this})},i)},t}(w.Component),gOe=N.forwardRef(function(e,t){var n=w.useState(null),r=n[0],i=n[1];return w.useImperativeHandle(t,function(){return r},[r]),N.createElement(mOe,iu({},e,{setRef:i}))});function vOe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var yOe=`.transform-component-module_wrapper__1_Fgj {
|
||
position: relative;
|
||
width: -moz-fit-content;
|
||
width: fit-content;
|
||
height: -moz-fit-content;
|
||
height: fit-content;
|
||
overflow: hidden;
|
||
-webkit-touch-callout: none; /* iOS Safari */
|
||
-webkit-user-select: none; /* Safari */
|
||
-khtml-user-select: none; /* Konqueror HTML */
|
||
-moz-user-select: none; /* Firefox */
|
||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||
user-select: none;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
.transform-component-module_content__2jYgh {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
width: -moz-fit-content;
|
||
width: fit-content;
|
||
height: -moz-fit-content;
|
||
height: fit-content;
|
||
margin: 0;
|
||
padding: 0;
|
||
transform-origin: 0% 0%;
|
||
}
|
||
.transform-component-module_content__2jYgh img {
|
||
pointer-events: none;
|
||
}
|
||
`,hN={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};vOe(yOe);var bOe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=w.useContext(UY).setComponents,u=w.useRef(null),d=w.useRef(null);return w.useEffect(function(){var h=u.current,g=d.current;h!==null&&g!==null&&l&&l(h,g)},[]),N.createElement("div",{ref:u,className:"react-transform-wrapper "+hN.wrapper+" "+r,style:a},N.createElement("div",{ref:d,className:"react-transform-component "+hN.content+" "+o,style:s},t))};function SOe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=w.useState(0),[a,s]=w.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},d=()=>{s(!a)};return y.jsx(gOe,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:({zoomIn:h,zoomOut:g,resetTransform:v,centerView:b})=>y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"lightbox-image-options",children:[y.jsx(Ze,{icon:y.jsx(ske,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>h(),fontSize:20}),y.jsx(Ze,{icon:y.jsx(lke,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>g(),fontSize:20}),y.jsx(Ze,{icon:y.jsx(oke,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),y.jsx(Ze,{icon:y.jsx(ake,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),y.jsx(Ze,{icon:y.jsx($Pe,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:d,fontSize:20}),y.jsx(Ze,{icon:y.jsx(Yx,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),y.jsx(bOe,{wrapperStyle:{width:"100%",height:"100%"},children:y.jsx("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b(1,0,"easeOut")})})]})})}function xOe(){const e=Ie(),t=he(g=>g.lightbox.isLightboxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=he(qq),[a,s]=w.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},d=()=>{e(yP())},h=()=>{e(vP())};return Je("Esc",()=>{t&&e(Fg(!1))},[t]),y.jsxs("div",{className:"lightbox-container",children:[y.jsx(Ze,{icon:y.jsx(ike,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(Fg(!1))},fontSize:20}),y.jsxs("div",{className:"lightbox-display-container",children:[y.jsxs("div",{className:"lightbox-preview-wrapper",children:[y.jsx(Uq,{}),!r&&y.jsxs("div",{className:"current-image-next-prev-buttons",children:[y.jsx("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&y.jsx(ss,{"aria-label":"Previous image",icon:y.jsx(Rq,{className:"next-prev-button"}),variant:"unstyled",onClick:d})}),y.jsx("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&y.jsx(ss,{"aria-label":"Next image",icon:y.jsx(Dq,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),n&&y.jsxs(y.Fragment,{children:[y.jsx(SOe,{image:n.url,styleClass:"lightbox-image"}),r&&y.jsx(UP,{image:n})]})]}),y.jsx(MY,{})]})]})}function wOe(e){return dt({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)}const COe=at(Sp,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),_Oe=()=>{const{resultImages:e,userImages:t}=he(COe);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},kOe=at([yp,qx,Or],(e,t,n)=>{const{shouldShowDualDisplay:r,shouldPinParametersPanel:i}=e,{isLightboxOpen:o}=t;return{shouldShowDualDisplay:r,shouldPinParametersPanel:i,isLightboxOpen:o,shouldShowDualDisplayButton:["inpainting"].includes(n),activeTabName:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),tT=e=>{const t=Ie(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,shouldShowDualDisplay:a,isLightboxOpen:s,shouldShowDualDisplayButton:l}=he(kOe),u=_Oe(),d=()=>{t(i7e(!a)),t(vi(!0))},h=g=>{const v=g.dataTransfer.getData("invokeai/imageUuid"),b=u(v);b&&(o==="img2img"?t(E0(b)):o==="unifiedCanvas"&&t($x(b)))};return y.jsx("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:y.jsxs("div",{className:"workarea-main",children:[n,y.jsxs("div",{className:"workarea-children-wrapper",onDrop:h,children:[r,l&&y.jsx(uo,{label:"Toggle Split View",children:y.jsx("div",{className:"workarea-split-button","data-selected":a,onClick:d,children:y.jsx(wOe,{})})})]}),!s&&y.jsx(MY,{})]})})},EOe=e=>{const{styleClass:t}=e,n=w.useContext(IP),r=()=>{n&&n()};return y.jsx("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:y.jsxs("div",{className:"image-upload-button",children:[y.jsx(tw,{}),y.jsx(Dh,{size:"lg",children:"Click or Drag and Drop"})]})})},POe=at([Sp,yp,Or],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),GY=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=he(POe);return y.jsx("div",{className:"current-image-area","data-tab-name":t,children:e?y.jsxs(y.Fragment,{children:[y.jsx(Uq,{}),y.jsx(EPe,{})]}):y.jsx("div",{className:"current-image-display-placeholder",children:y.jsx(FPe,{})})})},TOe=()=>{const e=w.useContext(IP);return y.jsx(Ze,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:y.jsx(tw,{}),onClick:e||void 0})};function LOe(){const e=he(o=>o.generation.initialImage),{t}=We(),n=Ie(),r=jy(),i=()=>{r({title:t("toast:parametersFailed"),description:t("toast:parametersFailedDesc"),status:"error",isClosable:!0}),n(TU())};return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"init-image-preview-header",children:[y.jsx("h2",{children:t("parameters:initialImage")}),y.jsx(TOe,{})]}),e&&y.jsx("div",{className:"init-image-preview",children:y.jsx(JS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:i})})]})}const AOe=()=>{const e=he(r=>r.generation.initialImage),{currentImage:t}=he(r=>r.gallery),n=e?y.jsx("div",{className:"image-to-image-area",children:y.jsx(LOe,{})}):y.jsx(EOe,{});return y.jsxs("div",{className:"workarea-split-view",children:[y.jsx("div",{className:"workarea-split-view-left",children:n}),t&&y.jsx("div",{className:"workarea-split-view-right",children:y.jsx(GY,{})})]})};var ao=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(ao||{});const OOe=()=>{const{t:e}=We();return w.useMemo(()=>({[0]:{text:e("tooltip:feature.prompt"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:e("tooltip:feature.gallery"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:e("tooltip:feature.other"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:e("tooltip:feature.seed"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:e("tooltip:feature.variations"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:e("tooltip:feature.upscale"),href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:e("tooltip:feature.faceCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:e("tooltip:feature.imageToImage"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:e("tooltip:feature.boundingBox"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:e("tooltip:feature.seamCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:e("tooltip:feature.infillAndScaling"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}}),[e])},MOe=e=>OOe()[e],Vs=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return y.jsxs(dn,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,display:"flex",columnGap:"1rem",alignItems:"center",justifyContent:"space-between",...i,children:[y.jsx(Pn,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",marginRight:0,marginTop:.5,marginBottom:.5,fontSize:"sm",fontWeight:"bold",width:"auto",...o,children:t}),y.jsx(ZE,{className:"invokeai__switch-root",...s})]})};function qY(){const e=he(i=>i.system.isGFPGANAvailable),t=he(i=>i.postprocessing.shouldRunFacetool),n=Ie(),r=i=>n(e6e(i.target.checked));return y.jsx(Vs,{isDisabled:!e,isChecked:t,onChange:r})}function IOe(){const e=Ie(),t=he(i=>i.generation.shouldFitToWidthHeight),n=i=>e(BU(i.target.checked)),{t:r}=We();return y.jsx(Vs,{label:r("parameters:imageFit"),isChecked:t,onChange:n})}function YY(e){const{t}=We(),{label:n=`${t("parameters:strength")}`,styleClass:r}=e,i=he(l=>l.generation.img2imgStrength),o=Ie(),a=l=>o(g_(l)),s=()=>{o(g_(.75))};return y.jsx(so,{label:n,step:.01,min:.01,max:1,onChange:a,value:i,isInteger:!1,styleClass:r,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:s})}const KY=()=>{const e=Ie(),t=he(i=>i.generation.seamless),n=i=>e(NU(i.target.checked)),{t:r}=We();return y.jsx(Ge,{gap:2,direction:"column",children:y.jsx(Vs,{label:r("parameters:seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})})},ROe=()=>y.jsx(Ge,{gap:2,direction:"column",children:y.jsx(KY,{})});function DOe(){const e=Ie(),t=he(i=>i.generation.perlin),{t:n}=We(),r=i=>e(RU(i));return y.jsx(ra,{label:n("parameters:perlinNoise"),min:0,max:1,step:.05,onChange:r,value:t,isInteger:!1})}function NOe(){const e=Ie(),{t}=We(),n=he(i=>i.generation.shouldRandomizeSeed),r=i=>e(Ywe(i.target.checked));return y.jsx(Vs,{label:t("parameters:randomizeSeed"),isChecked:n,onChange:r})}function jOe(){const e=he(a=>a.generation.seed),t=he(a=>a.generation.shouldRandomizeSeed),n=he(a=>a.generation.shouldGenerateVariations),{t:r}=We(),i=Ie(),o=a=>i($y(a));return y.jsx(ra,{label:r("parameters:seed"),step:1,precision:0,flexGrow:1,min:EP,max:PP,isDisabled:t,isInvalid:e<0&&n,onChange:o,value:e,width:"auto"})}function BOe(){const e=Ie(),t=he(i=>i.generation.shouldRandomizeSeed),{t:n}=We(),r=()=>e($y(dq(EP,PP)));return y.jsx(as,{size:"sm",isDisabled:t,onClick:r,padding:"0 1.5rem",children:y.jsx("p",{children:n("parameters:shuffle")})})}function $Oe(){const e=Ie(),t=he(i=>i.generation.threshold),{t:n}=We(),r=i=>e(FU(i));return y.jsx(ra,{label:n("parameters:noiseThreshold"),min:0,max:1e3,step:.1,onChange:r,value:t,isInteger:!1})}const nT=()=>y.jsxs(Ge,{gap:2,direction:"column",children:[y.jsx(NOe,{}),y.jsxs(Ge,{gap:2,children:[y.jsx(jOe,{}),y.jsx(BOe,{})]}),y.jsx(Ge,{gap:2,children:y.jsx($Oe,{})}),y.jsx(Ge,{gap:2,children:y.jsx(DOe,{})})]});function XY(){const e=he(i=>i.system.isESRGANAvailable),t=he(i=>i.postprocessing.shouldRunESRGAN),n=Ie(),r=i=>n(Jwe(i.target.checked));return y.jsx(Vs,{isDisabled:!e,isChecked:t,onChange:r})}function rT(){const e=he(r=>r.generation.shouldGenerateVariations),t=Ie(),n=r=>t(qwe(r.target.checked));return y.jsx(Vs,{isChecked:e,width:"auto",onChange:n})}function Er(e){const{label:t="",styleClass:n,isDisabled:r=!1,fontSize:i="sm",width:o,size:a="sm",isInvalid:s,...l}=e;return y.jsxs(dn,{className:`input ${n}`,isInvalid:s,isDisabled:r,children:[t!==""&&y.jsx(Pn,{fontSize:i,fontWeight:"bold",alignItems:"center",whiteSpace:"nowrap",marginBottom:0,marginRight:0,className:"input-label",children:t}),y.jsx(wk,{...l,className:"input-entry",size:a,width:o})]})}function FOe(){const e=he(o=>o.generation.seedWeights),t=he(o=>o.generation.shouldGenerateVariations),{t:n}=We(),r=Ie(),i=o=>r(jU(o.target.value));return y.jsx(Er,{label:n("parameters:seedWeights"),value:e,isInvalid:t&&!(SP(e)||e===""),isDisabled:!t,onChange:i})}function zOe(){const e=he(o=>o.generation.variationAmount),t=he(o=>o.generation.shouldGenerateVariations),{t:n}=We(),r=Ie(),i=o=>r(Kwe(o));return y.jsx(ra,{label:n("parameters:variationAmount"),value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i,isInteger:!1})}const iT=()=>y.jsxs(Ge,{gap:2,direction:"column",children:[y.jsx(zOe,{}),y.jsx(FOe,{})]});function HOe(){const e=Ie(),t=he(i=>i.generation.cfgScale),{t:n}=We(),r=i=>e(AU(i));return y.jsx(ra,{label:n("parameters:cfgScale"),step:.5,min:1.01,max:200,onChange:r,value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center",isInteger:!1})}function VOe(){const e=he(o=>o.generation.height),t=he(Or),n=Ie(),{t:r}=We(),i=o=>n(OU(Number(o.target.value)));return y.jsx(tl,{isDisabled:t==="unifiedCanvas",label:r("parameters:height"),value:e,flexGrow:1,onChange:i,validValues:Q7e,styleClass:"main-settings-block"})}const WOe=at([e=>e.generation],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function UOe(){const e=Ie(),{iterations:t}=he(WOe),{t:n}=We(),r=i=>e(Gwe(i));return y.jsx(ra,{label:n("parameters:images"),step:1,min:1,max:9999,onChange:r,value:t,width:"auto",labelFontSize:.5,styleClass:"main-settings-block",textAlign:"center"})}function GOe(){const e=he(o=>o.generation.sampler),t=he(gq),n=Ie(),{t:r}=We(),i=o=>n(DU(o.target.value));return y.jsx(tl,{label:r("parameters:sampler"),value:e,onChange:i,validValues:t.format==="diffusers"?X7e:K7e,styleClass:"main-settings-block"})}function qOe(){const e=Ie(),t=he(i=>i.generation.steps),{t:n}=We(),r=i=>e($U(i));return y.jsx(ra,{label:n("parameters:steps"),min:1,max:9999,step:1,onChange:r,value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center"})}function YOe(){const e=he(o=>o.generation.width),t=he(Or),{t:n}=We(),r=Ie(),i=o=>r(zU(Number(o.target.value)));return y.jsx(tl,{isDisabled:t==="unifiedCanvas",label:n("parameters:width"),value:e,flexGrow:1,onChange:i,validValues:Z7e,styleClass:"main-settings-block"})}function oT(){return y.jsx("div",{className:"main-settings",children:y.jsxs("div",{className:"main-settings-list",children:[y.jsxs("div",{className:"main-settings-row",children:[y.jsx(UOe,{}),y.jsx(qOe,{}),y.jsx(HOe,{})]}),y.jsxs("div",{className:"main-settings-row",children:[y.jsx(YOe,{}),y.jsx(VOe,{}),y.jsx(GOe,{})]})]})})}const KOe=at(ir,e=>e.shouldDisplayGuides),XOe=({children:e,feature:t})=>{const n=he(KOe),{text:r}=MOe(t);return n?y.jsxs(UE,{trigger:"hover",children:[y.jsx(YE,{children:y.jsx(ko,{children:e})}),y.jsxs(qE,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[y.jsx(GE,{className:"guide-popover-arrow"}),y.jsx("div",{className:"guide-popover-guide-content",children:r})]})]}):null},ZOe=Ee(({feature:e,icon:t=jPe},n)=>y.jsx(XOe,{feature:e,children:y.jsx(ko,{ref:n,children:y.jsx(Da,{marginBottom:"-.15rem",as:t})})}));function QOe(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return y.jsxs(Ym,{className:"advanced-parameters-item",children:[y.jsx(Gm,{className:"advanced-parameters-header",children:y.jsxs(Ge,{width:"100%",gap:"0.5rem",align:"center",children:[y.jsx(ko,{flexGrow:1,textAlign:"left",children:t}),i,n&&y.jsx(ZOe,{feature:n}),y.jsx(qm,{})]})}),y.jsx(Km,{className:"advanced-parameters-panel",children:r})]})}const aT=e=>{const{accordionInfo:t}=e,n=he(a=>a.system.openAccordions),r=Ie(),i=a=>r(FCe(a)),o=()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:d,additionalHeaderComponents:h}=t[s];a.push(y.jsx(QOe,{header:l,feature:u,content:d,additionalHeaderComponents:h},s))}),a};return y.jsx(pk,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:i,className:"advanced-parameters",children:o()})},JOe=at(ir,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable,currentIteration:e.currentIteration,totalIterations:e.totalIterations,cancelType:e.cancelOptions.cancelType,cancelAfter:e.cancelOptions.cancelAfter}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function sT(e){const t=Ie(),{...n}=e,{isProcessing:r,isConnected:i,isCancelable:o,currentIteration:a,totalIterations:s,cancelType:l,cancelAfter:u}=he(JOe),d=w.useCallback(()=>{t(O8e()),t(LC(null))},[t]),{t:h}=We(),g=u!==null;return Je("shift+x",()=>{(i||r)&&o&&d()},[i,r,o]),w.useEffect(()=>{u!==null&&u<a&&d()},[u,a,d]),y.jsxs(Gi,{isAttached:!0,variant:"link",children:[l==="immediate"?y.jsx(Ze,{icon:y.jsx(VPe,{}),tooltip:h("parameters:cancel.immediate"),"aria-label":h("parameters:cancel.immediate"),isDisabled:!i||!r||!o,onClick:d,className:"cancel-btn",...n}):y.jsx(Ze,{icon:g?y.jsx(d5,{}):y.jsx(DPe,{}),tooltip:h(g?"parameters:cancel.isScheduled":"parameters:cancel.schedule"),"aria-label":h(g?"parameters:cancel.isScheduled":"parameters:cancel.schedule"),isDisabled:!i||!r||!o||a===s,onClick:()=>{t(LC(g?null:a))},className:"cancel-btn",...n}),y.jsx(tz,{children:({isOpen:v})=>y.jsxs(y.Fragment,{children:[y.jsx(nz,{as:Ze,icon:v?y.jsx(HPe,{}):y.jsx(zPe,{}),className:"cancel-options-btn",tooltip:h("parameters:cancel.setType"),...n}),y.jsxs(az,{className:"cancel-options-btn-context-menu",children:[y.jsx(J7,{onClick:()=>t(WR("immediate")),children:h("parameters:cancel.immediate")}),y.jsx(J7,{onClick:()=>t(WR("scheduled")),children:h("parameters:cancel.schedule")})]})]})})]})}const lT=e=>e.generation;at(lT,({shouldRandomizeSeed:e,shouldGenerateVariations:t})=>e||t,{memoizeOptions:{resultEqualityCheck:ke.isEqual}});const ZY=at([lT,ir,Wq,Or],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:d}=t;let h=!0;const g=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(h=!1,g.push("Missing prompt")),r==="img2img"&&!s&&(h=!1,g.push("No initial image selected")),u&&(h=!1,g.push("System Busy")),d||(h=!1,g.push("System Disconnected")),o&&(!(SP(a)||a==="")||l===-1)&&(h=!1,g.push("Seed-Weights badly formatted.")),{isReady:h,reasonsWhyNotReady:g}},{memoizeOptions:{equalityCheck:ke.isEqual,resultEqualityCheck:ke.isEqual}});function uT(e){const{iconButton:t=!1,...n}=e,r=Ie(),{isReady:i}=he(ZY),o=he(Or),a=()=>{r(z_(o))},{t:s}=We();return Je(["ctrl+enter","meta+enter"],()=>{r(z_(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),y.jsx("div",{style:{flexGrow:4},children:t?y.jsx(Ze,{"aria-label":s("parameters:invoke"),type:"submit",icon:y.jsx(uPe,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:s("parameters:invoke"),tooltipProps:{placement:"bottom"},...n}):y.jsx(cr,{"aria-label":s("parameters:invoke"),type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const eMe=at(Vy,({shouldLoopback:e})=>e),tMe=()=>{const e=Ie(),t=he(eMe),{t:n}=We();return y.jsx(Ze,{"aria-label":n("parameters:toggleLoopback"),tooltip:n("parameters:toggleLoopback"),styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:y.jsx(dPe,{}),onClick:()=>{e(Qwe(!t))}})},cT=()=>{const e=he(Or);return y.jsxs("div",{className:"process-buttons",children:[y.jsx(uT,{}),e==="img2img"&&y.jsx(tMe,{}),y.jsx(sT,{})]})},dT=()=>{const e=he(r=>r.generation.negativePrompt),t=Ie(),{t:n}=We();return y.jsx(dn,{children:y.jsx(QE,{id:"negativePrompt",name:"negativePrompt",value:e,onChange:r=>t(J2(r.target.value)),background:"var(--prompt-bg-color)",placeholder:n("parameters:negativePrompts"),_placeholder:{fontSize:"0.8rem"},borderColor:"var(--border-color)",_hover:{borderColor:"var(--border-color-light)"},_focusVisible:{borderColor:"var(--border-color-invalid)",boxShadow:"0 0 10px var(--box-shadow-color-invalid)"},fontSize:"0.9rem",color:"var(--text-color-secondary)"})})},nMe=at([e=>e.generation,Or],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),fT=()=>{const e=Ie(),{prompt:t,activeTabName:n}=he(nMe),{isReady:r}=he(ZY),i=w.useRef(null),{t:o}=We(),a=l=>{e(Fx(l.target.value))};Je("alt+a",()=>{var l;(l=i.current)==null||l.focus()},[]);const s=l=>{l.key==="Enter"&&l.shiftKey===!1&&r&&(l.preventDefault(),e(z_(n)))};return y.jsx("div",{className:"prompt-bar",children:y.jsx(dn,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:y.jsx(QE,{id:"prompt",name:"prompt",placeholder:o("parameters:promptPlaceholder"),size:"lg",value:t,onChange:a,onKeyDown:s,resize:"vertical",height:30,ref:i,_placeholder:{color:"var(--text-color-secondary)"}})})})},QY=""+new URL("logo-13003d72.png",import.meta.url).href,rMe=at(yp,e=>{const{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}=e;return{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),hT=e=>{const t=Ie(),{shouldShowParametersPanel:n,shouldHoldParametersPanelOpen:r,shouldPinParametersPanel:i}=he(rMe),o=w.useRef(null),a=w.useRef(null),s=w.useRef(null),{children:l}=e;Je("o",()=>{t(Xu(!n)),i&&setTimeout(()=>t(vi(!0)),400)},[n,i]),Je("esc",()=>{t(Xu(!1))},{enabled:()=>!i,preventDefault:!0},[i]),Je("shift+o",()=>{g(),t(vi(!0))},[i]);const u=w.useCallback(()=>{i||(t(t7e(a.current?a.current.scrollTop:0)),t(Xu(!1)),t(n7e(!1)))},[t,i]),d=()=>{s.current=window.setTimeout(()=>u(),500)},h=()=>{s.current&&window.clearTimeout(s.current)},g=()=>{t(r7e(!i)),t(vi(!0))};return w.useEffect(()=>{function v(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),y.jsx(eY,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"parameters-panel-wrapper",children:y.jsx("div",{className:"parameters-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:h,onMouseOver:i?void 0:h,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:y.jsx("div",{className:"parameters-panel-margin",children:y.jsxs("div",{className:"parameters-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?h():!i&&d()},children:[y.jsx(uo,{label:"Pin Options Panel",children:y.jsx("div",{className:"parameters-panel-pin-button","data-selected":i,onClick:g,children:i?y.jsx(Kq,{}):y.jsx(Xq,{})})}),!i&&y.jsxs("div",{className:"invoke-ai-logo-wrapper",children:[y.jsx("img",{src:QY,alt:"invoke-ai-logo"}),y.jsxs("h1",{children:["invoke ",y.jsx("strong",{children:"ai"})]})]}),l]})})})})};function iMe(){const{t:e}=We(),t={seed:{header:`${e("parameters:seed")}`,feature:ao.SEED,content:y.jsx(nT,{})},variations:{header:`${e("parameters:variations")}`,feature:ao.VARIATIONS,content:y.jsx(iT,{}),additionalHeaderComponents:y.jsx(rT,{})},face_restore:{header:`${e("parameters:faceRestoration")}`,feature:ao.FACE_CORRECTION,content:y.jsx(DP,{}),additionalHeaderComponents:y.jsx(qY,{})},upscale:{header:`${e("parameters:upscaling")}`,feature:ao.UPSCALE,content:y.jsx(NP,{}),additionalHeaderComponents:y.jsx(XY,{})},other:{header:`${e("parameters:otherOptions")}`,feature:ao.OTHER,content:y.jsx(ROe,{})}},n=Ie(),r=he(Or);return w.useEffect(()=>{r==="img2img"&&n(xP(!1))},[r,n]),y.jsxs(hT,{children:[y.jsxs(Ge,{flexDir:"column",rowGap:"0.5rem",children:[y.jsx(fT,{}),y.jsx(dT,{})]}),y.jsx(cT,{}),y.jsx(oT,{}),y.jsx(YY,{label:e("parameters:img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"}),y.jsx(IOe,{}),y.jsx(aT,{accordionInfo:t})]})}function oMe(){return y.jsx(tT,{optionsPanel:y.jsx(iMe,{}),children:y.jsx(AOe,{})})}const aMe=()=>y.jsx("div",{className:"workarea-single-view",children:y.jsx("div",{className:"text-to-image-area",children:y.jsx(GY,{})})}),sMe=at([Vy],({hiresFix:e,hiresStrength:t})=>({hiresFix:e,hiresStrength:t}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),lMe=()=>{const{hiresFix:e,hiresStrength:t}=he(sMe),n=Ie(),{t:r}=We(),i=a=>{n(rR(a))},o=()=>{n(rR(.75))};return y.jsx(so,{label:r("parameters:hiresStrength"),step:.01,min:.01,max:.99,onChange:i,value:t,isInteger:!1,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:o,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})},uMe=()=>{const e=Ie(),t=he(i=>i.postprocessing.hiresFix),{t:n}=We(),r=i=>e(xP(i.target.checked));return y.jsxs(Ge,{gap:2,direction:"column",children:[y.jsx(Vs,{label:n("parameters:hiresOptim"),fontSize:"md",isChecked:t,onChange:r}),y.jsx(lMe,{})]})},cMe=()=>y.jsxs(Ge,{gap:2,direction:"column",children:[y.jsx(KY,{}),y.jsx(uMe,{})]});function dMe(){const{t:e}=We(),t={seed:{header:`${e("parameters:seed")}`,feature:ao.SEED,content:y.jsx(nT,{})},variations:{header:`${e("parameters:variations")}`,feature:ao.VARIATIONS,content:y.jsx(iT,{}),additionalHeaderComponents:y.jsx(rT,{})},face_restore:{header:`${e("parameters:faceRestoration")}`,feature:ao.FACE_CORRECTION,content:y.jsx(DP,{}),additionalHeaderComponents:y.jsx(qY,{})},upscale:{header:`${e("parameters:upscaling")}`,feature:ao.UPSCALE,content:y.jsx(NP,{}),additionalHeaderComponents:y.jsx(XY,{})},other:{header:`${e("parameters:otherOptions")}`,feature:ao.OTHER,content:y.jsx(cMe,{})}};return y.jsxs(hT,{children:[y.jsxs(Ge,{flexDir:"column",rowGap:"0.5rem",children:[y.jsx(fT,{}),y.jsx(dT,{})]}),y.jsx(cT,{}),y.jsx(oT,{}),y.jsx(aT,{accordionInfo:t})]})}function fMe(){return y.jsx(tT,{optionsPanel:y.jsx(dMe,{}),children:y.jsx(aMe,{})})}var r8={},hMe={get exports(){return r8},set exports(e){r8=e}};/**
|
||
* @license React
|
||
* react-reconciler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var pMe=function(t){var n={},r=w,i=Bh,o=Object.assign;function a(f){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+f,x=1;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x]);return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),b=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),M=Symbol.iterator;function R(f){return f===null||typeof f!="object"?null:(f=M&&f[M]||f["@@iterator"],typeof f=="function"?f:null)}function D(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case d:return"Fragment";case u:return"Portal";case g:return"Profiler";case h:return"StrictMode";case E:return"Suspense";case _:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case b:return(f.displayName||"Context")+".Consumer";case v:return(f._context.displayName||"Context")+".Provider";case S:var p=f.render;return f=f.displayName,f||(f=p.displayName||p.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case k:return p=f.displayName||null,p!==null?p:D(f.type)||"Memo";case T:p=f._payload,f=f._init;try{return D(f(p))}catch{}}return null}function j(f){var p=f.type;switch(f.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=p.render,f=f.displayName||f.name||"",p.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return D(p);case 8:return p===h?"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 p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function F(f){var p=f,x=f;if(f.alternate)for(;p.return;)p=p.return;else{f=p;do p=f,p.flags&4098&&(x=p.return),f=p.return;while(f)}return p.tag===3?x:null}function H(f){if(F(f)!==f)throw Error(a(188))}function K(f){var p=f.alternate;if(!p){if(p=F(f),p===null)throw Error(a(188));return p!==f?null:f}for(var x=f,P=p;;){var L=x.return;if(L===null)break;var I=L.alternate;if(I===null){if(P=L.return,P!==null){x=P;continue}break}if(L.child===I.child){for(I=L.child;I;){if(I===x)return H(L),f;if(I===P)return H(L),p;I=I.sibling}throw Error(a(188))}if(x.return!==P.return)x=L,P=I;else{for(var q=!1,le=L.child;le;){if(le===x){q=!0,x=L,P=I;break}if(le===P){q=!0,P=L,x=I;break}le=le.sibling}if(!q){for(le=I.child;le;){if(le===x){q=!0,x=I,P=L;break}if(le===P){q=!0,P=I,x=L;break}le=le.sibling}if(!q)throw Error(a(189))}}if(x.alternate!==P)throw Error(a(190))}if(x.tag!==3)throw Error(a(188));return x.stateNode.current===x?f:p}function te(f){return f=K(f),f!==null?G(f):null}function G(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){var p=G(f);if(p!==null)return p;f=f.sibling}return null}function $(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){if(f.tag!==4){var p=$(f);if(p!==null)return p}f=f.sibling}return null}var U=Array.isArray,X=t.getPublicInstance,Z=t.getRootHostContext,W=t.getChildHostContext,Q=t.prepareForCommit,re=t.resetAfterCommit,de=t.createInstance,ve=t.appendInitialChild,Pe=t.finalizeInitialChildren,be=t.prepareUpdate,He=t.shouldSetTextContent,Oe=t.createTextInstance,ot=t.scheduleTimeout,Ve=t.cancelTimeout,Be=t.noTimeout,wt=t.isPrimaryRenderer,st=t.supportsMutation,gt=t.supportsPersistence,St=t.supportsHydration,Ae=t.getInstanceFromNode,lt=t.preparePortalMount,Mt=t.getCurrentEventPriority,ut=t.detachDeletedInstance,_t=t.supportsMicrotasks,ln=t.scheduleMicrotask,ae=t.supportsTestSelectors,De=t.findFiberRoot,Ye=t.getBoundingRect,Ke=t.getTextContent,xe=t.isHiddenSubtree,Ne=t.matchAccessibilityRole,Ct=t.setFocusIfFocusable,Dt=t.setupIntersectionObserver,Le=t.appendChild,At=t.appendChildToContainer,$e=t.commitTextUpdate,vt=t.commitMount,tn=t.commitUpdate,Dn=t.insertBefore,Xe=t.insertInContainerBefore,xt=t.removeChild,ht=t.removeChildFromContainer,Ht=t.resetTextContent,nn=t.hideInstance,pr=t.hideTextInstance,Mo=t.unhideInstance,Mi=t.unhideTextInstance,il=t.clearContainer,R0=t.cloneInstance,Ba=t.createContainerChildSet,Pp=t.appendChildToContainerChildSet,D0=t.finalizeContainerChildren,bc=t.replaceContainerChildren,Tp=t.cloneHiddenInstance,Lp=t.cloneHiddenTextInstance,ia=t.canHydrateInstance,vf=t.canHydrateTextInstance,N0=t.canHydrateSuspenseInstance,Sc=t.isSuspenseInstancePending,yf=t.isSuspenseInstanceFallback,j0=t.getSuspenseInstanceFallbackErrorDetails,ol=t.registerSuspenseInstanceRetry,xc=t.getNextHydratableSibling,B0=t.getFirstHydratableChild,$0=t.getFirstHydratableChildWithinContainer,F0=t.getFirstHydratableChildWithinSuspenseInstance,z0=t.hydrateInstance,ms=t.hydrateTextInstance,H0=t.hydrateSuspenseInstance,V0=t.getNextHydratableInstanceAfterSuspenseInstance,W0=t.commitHydratedContainer,U0=t.commitHydratedSuspenseInstance,G0=t.clearSuspenseBoundary,q0=t.clearSuspenseBoundaryFromContainer,al=t.shouldDeleteUnhydratedTailInstances,Y0=t.didNotMatchHydratedContainerTextInstance,gs=t.didNotMatchHydratedTextInstance,yu;function bu(f){if(yu===void 0)try{throw Error()}catch(x){var p=x.stack.trim().match(/\n( *(at )?)/);yu=p&&p[1]||""}return`
|
||
`+yu+f}var sl=!1;function Su(f,p){if(!f||sl)return"";sl=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(ze){var P=ze}Reflect.construct(f,[],p)}else{try{p.call()}catch(ze){P=ze}f.call(p.prototype)}else{try{throw Error()}catch(ze){P=ze}f()}}catch(ze){if(ze&&P&&typeof ze.stack=="string"){for(var L=ze.stack.split(`
|
||
`),I=P.stack.split(`
|
||
`),q=L.length-1,le=I.length-1;1<=q&&0<=le&&L[q]!==I[le];)le--;for(;1<=q&&0<=le;q--,le--)if(L[q]!==I[le]){if(q!==1||le!==1)do if(q--,le--,0>le||L[q]!==I[le]){var pe=`
|
||
`+L[q].replace(" at new "," at ");return f.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",f.displayName)),pe}while(1<=q&&0<=le);break}}}finally{sl=!1,Error.prepareStackTrace=x}return(f=f?f.displayName||f.name:"")?bu(f):""}var Ap=Object.prototype.hasOwnProperty,wc=[],ll=-1;function oa(f){return{current:f}}function Nn(f){0>ll||(f.current=wc[ll],wc[ll]=null,ll--)}function Tn(f,p){ll++,wc[ll]=f.current,f.current=p}var aa={},Hr=oa(aa),li=oa(!1),sa=aa;function ul(f,p){var x=f.type.contextTypes;if(!x)return aa;var P=f.stateNode;if(P&&P.__reactInternalMemoizedUnmaskedChildContext===p)return P.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in x)L[I]=p[I];return P&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=p,f.__reactInternalMemoizedMaskedChildContext=L),L}function ui(f){return f=f.childContextTypes,f!=null}function vs(){Nn(li),Nn(Hr)}function bf(f,p,x){if(Hr.current!==aa)throw Error(a(168));Tn(Hr,p),Tn(li,x)}function xu(f,p,x){var P=f.stateNode;if(p=p.childContextTypes,typeof P.getChildContext!="function")return x;P=P.getChildContext();for(var L in P)if(!(L in p))throw Error(a(108,j(f)||"Unknown",L));return o({},x,P)}function ys(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||aa,sa=Hr.current,Tn(Hr,f),Tn(li,li.current),!0}function Sf(f,p,x){var P=f.stateNode;if(!P)throw Error(a(169));x?(f=xu(f,p,sa),P.__reactInternalMemoizedMergedChildContext=f,Nn(li),Nn(Hr),Tn(Hr,f)):Nn(li),Tn(li,x)}var Ii=Math.clz32?Math.clz32:xf,Op=Math.log,Mp=Math.LN2;function xf(f){return f>>>=0,f===0?32:31-(Op(f)/Mp|0)|0}var cl=64,Io=4194304;function dl(f){switch(f&-f){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 f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function wu(f,p){var x=f.pendingLanes;if(x===0)return 0;var P=0,L=f.suspendedLanes,I=f.pingedLanes,q=x&268435455;if(q!==0){var le=q&~L;le!==0?P=dl(le):(I&=q,I!==0&&(P=dl(I)))}else q=x&~L,q!==0?P=dl(q):I!==0&&(P=dl(I));if(P===0)return 0;if(p!==0&&p!==P&&!(p&L)&&(L=P&-P,I=p&-p,L>=I||L===16&&(I&4194240)!==0))return p;if(P&4&&(P|=x&16),p=f.entangledLanes,p!==0)for(f=f.entanglements,p&=P;0<p;)x=31-Ii(p),L=1<<x,P|=f[x],p&=~L;return P}function K0(f,p){switch(f){case 1:case 2:case 4:return p+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Cc(f,p){for(var x=f.suspendedLanes,P=f.pingedLanes,L=f.expirationTimes,I=f.pendingLanes;0<I;){var q=31-Ii(I),le=1<<q,pe=L[q];pe===-1?(!(le&x)||le&P)&&(L[q]=K0(le,p)):pe<=p&&(f.expiredLanes|=le),I&=~le}}function _c(f){return f=f.pendingLanes&-1073741825,f!==0?f:f&1073741824?1073741824:0}function wf(){var f=cl;return cl<<=1,!(cl&4194240)&&(cl=64),f}function kc(f){for(var p=[],x=0;31>x;x++)p.push(f);return p}function $a(f,p,x){f.pendingLanes|=p,p!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,p=31-Ii(p),f[p]=x}function Cf(f,p){var x=f.pendingLanes&~p;f.pendingLanes=p,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=p,f.mutableReadLanes&=p,f.entangledLanes&=p,p=f.entanglements;var P=f.eventTimes;for(f=f.expirationTimes;0<x;){var L=31-Ii(x),I=1<<L;p[L]=0,P[L]=-1,f[L]=-1,x&=~I}}function Cu(f,p){var x=f.entangledLanes|=p;for(f=f.entanglements;x;){var P=31-Ii(x),L=1<<P;L&p|f[P]&p&&(f[P]|=p),x&=~L}}var Yt=0;function Ip(f){return f&=-f,1<f?4<f?f&268435455?16:536870912:4:1}var Ec=i.unstable_scheduleCallback,Pc=i.unstable_cancelCallback,Rp=i.unstable_shouldYield,la=i.unstable_requestPaint,Kn=i.unstable_now,_f=i.unstable_ImmediatePriority,Dp=i.unstable_UserBlockingPriority,kf=i.unstable_NormalPriority,Np=i.unstable_IdlePriority,mn=null,Kt=null;function jp(f){if(Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(mn,f,void 0,(f.current.flags&128)===128)}catch{}}function X0(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var Y=typeof Object.is=="function"?Object.is:X0,ie=null,me=!1,it=!1;function Wt(f){ie===null?ie=[f]:ie.push(f)}function wn(f){me=!0,Wt(f)}function kt(){if(!it&&ie!==null){it=!0;var f=0,p=Yt;try{var x=ie;for(Yt=1;f<x.length;f++){var P=x[f];do P=P(!0);while(P!==null)}ie=null,me=!1}catch(L){throw ie!==null&&(ie=ie.slice(f+1)),Ec(_f,kt),L}finally{Yt=p,it=!1}}return null}var Nt=[],Xt=0,Jr=null,Ir=0,Cn=[],ci=0,Ro=null,co=1,Fa="";function fl(f,p){Nt[Xt++]=Ir,Nt[Xt++]=Jr,Jr=f,Ir=p}function Z0(f,p,x){Cn[ci++]=co,Cn[ci++]=Fa,Cn[ci++]=Ro,Ro=f;var P=co;f=Fa;var L=32-Ii(P)-1;P&=~(1<<L),x+=1;var I=32-Ii(p)+L;if(30<I){var q=L-L%5;I=(P&(1<<q)-1).toString(32),P>>=q,L-=q,co=1<<32-Ii(p)+L|x<<L|P,Fa=I+f}else co=1<<I|x<<L|P,Fa=f}function Ri(f){f.return!==null&&(fl(f,1),Z0(f,1,0))}function Q0(f){for(;f===Jr;)Jr=Nt[--Xt],Nt[Xt]=null,Ir=Nt[--Xt],Nt[Xt]=null;for(;f===Ro;)Ro=Cn[--ci],Cn[ci]=null,Fa=Cn[--ci],Cn[ci]=null,co=Cn[--ci],Cn[ci]=null}var Xn=null,Do=null,Wn=!1,No=!1,Xi=null;function Bp(f,p){var x=zo(5,null,null,0);x.elementType="DELETED",x.stateNode=p,x.return=f,p=f.deletions,p===null?(f.deletions=[x],f.flags|=16):p.push(x)}function Un(f,p){switch(f.tag){case 5:return p=ia(p,f.type,f.pendingProps),p!==null?(f.stateNode=p,Xn=f,Do=B0(p),!0):!1;case 6:return p=vf(p,f.pendingProps),p!==null?(f.stateNode=p,Xn=f,Do=null,!0):!1;case 13:if(p=N0(p),p!==null){var x=Ro!==null?{id:co,overflow:Fa}:null;return f.memoizedState={dehydrated:p,treeContext:x,retryLane:1073741824},x=zo(18,null,null,0),x.stateNode=p,x.return=f,f.child=x,Xn=f,Do=null,!0}return!1;default:return!1}}function za(f){return(f.mode&1)!==0&&(f.flags&128)===0}function Ef(f){if(Wn){var p=Do;if(p){var x=p;if(!Un(f,p)){if(za(f))throw Error(a(418));p=xc(x);var P=Xn;p&&Un(f,p)?Bp(P,x):(f.flags=f.flags&-4097|2,Wn=!1,Xn=f)}}else{if(za(f))throw Error(a(418));f.flags=f.flags&-4097|2,Wn=!1,Xn=f}}}function Qy(f){for(f=f.return;f!==null&&f.tag!==5&&f.tag!==3&&f.tag!==13;)f=f.return;Xn=f}function Tc(f){if(!St||f!==Xn)return!1;if(!Wn)return Qy(f),Wn=!0,!1;if(f.tag!==3&&(f.tag!==5||al(f.type)&&!He(f.type,f.memoizedProps))){var p=Do;if(p){if(za(f))throw Jy(),Error(a(418));for(;p;)Bp(f,p),p=xc(p)}}if(Qy(f),f.tag===13){if(!St)throw Error(a(316));if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));Do=V0(f)}else Do=Xn?xc(f.stateNode):null;return!0}function Jy(){for(var f=Do;f;)f=xc(f)}function Lc(){St&&(Do=Xn=null,No=Wn=!1)}function J0(f){Xi===null?Xi=[f]:Xi.push(f)}var e3=s.ReactCurrentBatchConfig;function _u(f,p){if(Y(f,p))return!0;if(typeof f!="object"||f===null||typeof p!="object"||p===null)return!1;var x=Object.keys(f),P=Object.keys(p);if(x.length!==P.length)return!1;for(P=0;P<x.length;P++){var L=x[P];if(!Ap.call(p,L)||!Y(f[L],p[L]))return!1}return!0}function Ac(f){switch(f.tag){case 5:return bu(f.type);case 16:return bu("Lazy");case 13:return bu("Suspense");case 19:return bu("SuspenseList");case 0:case 2:case 15:return f=Su(f.type,!1),f;case 11:return f=Su(f.type.render,!1),f;case 1:return f=Su(f.type,!0),f;default:return""}}function ua(f,p){if(f&&f.defaultProps){p=o({},p),f=f.defaultProps;for(var x in f)p[x]===void 0&&(p[x]=f[x]);return p}return p}var Pf=oa(null),Tf=null,hl=null,Lf=null;function $p(){Lf=hl=Tf=null}function t3(f,p,x){wt?(Tn(Pf,p._currentValue),p._currentValue=x):(Tn(Pf,p._currentValue2),p._currentValue2=x)}function Af(f){var p=Pf.current;Nn(Pf),wt?f._currentValue=p:f._currentValue2=p}function Of(f,p,x){for(;f!==null;){var P=f.alternate;if((f.childLanes&p)!==p?(f.childLanes|=p,P!==null&&(P.childLanes|=p)):P!==null&&(P.childLanes&p)!==p&&(P.childLanes|=p),f===x)break;f=f.return}}function Oc(f,p){Tf=f,Lf=hl=null,f=f.dependencies,f!==null&&f.firstContext!==null&&(f.lanes&p&&(Qi=!0),f.firstContext=null)}function fo(f){var p=wt?f._currentValue:f._currentValue2;if(Lf!==f)if(f={context:f,memoizedValue:p,next:null},hl===null){if(Tf===null)throw Error(a(308));hl=f,Tf.dependencies={lanes:0,firstContext:f}}else hl=hl.next=f;return p}var Vr=null;function Mf(f){Vr===null?Vr=[f]:Vr.push(f)}function Mc(f,p,x,P){var L=p.interleaved;return L===null?(x.next=x,Mf(p)):(x.next=L.next,L.next=x),p.interleaved=x,ca(f,P)}function ca(f,p){f.lanes|=p;var x=f.alternate;for(x!==null&&(x.lanes|=p),x=f,f=f.return;f!==null;)f.childLanes|=p,x=f.alternate,x!==null&&(x.childLanes|=p),x=f,f=f.return;return x.tag===3?x.stateNode:null}var bs=!1;function e1(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function n3(f,p){f=f.updateQueue,p.updateQueue===f&&(p.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function Ss(f,p){return{eventTime:f,lane:p,tag:0,payload:null,callback:null,next:null}}function pl(f,p,x){var P=f.updateQueue;if(P===null)return null;if(P=P.shared,Ut&2){var L=P.pending;return L===null?p.next=p:(p.next=L.next,L.next=p),P.pending=p,ca(f,x)}return L=P.interleaved,L===null?(p.next=p,Mf(P)):(p.next=L.next,L.next=p),P.interleaved=p,ca(f,x)}function Fp(f,p,x){if(p=p.updateQueue,p!==null&&(p=p.shared,(x&4194240)!==0)){var P=p.lanes;P&=f.pendingLanes,x|=P,p.lanes=x,Cu(f,x)}}function ku(f,p){var x=f.updateQueue,P=f.alternate;if(P!==null&&(P=P.updateQueue,x===P)){var L=null,I=null;if(x=x.firstBaseUpdate,x!==null){do{var q={eventTime:x.eventTime,lane:x.lane,tag:x.tag,payload:x.payload,callback:x.callback,next:null};I===null?L=I=q:I=I.next=q,x=x.next}while(x!==null);I===null?L=I=p:I=I.next=p}else L=I=p;x={baseState:P.baseState,firstBaseUpdate:L,lastBaseUpdate:I,shared:P.shared,effects:P.effects},f.updateQueue=x;return}f=x.lastBaseUpdate,f===null?x.firstBaseUpdate=p:f.next=p,x.lastBaseUpdate=p}function zp(f,p,x,P){var L=f.updateQueue;bs=!1;var I=L.firstBaseUpdate,q=L.lastBaseUpdate,le=L.shared.pending;if(le!==null){L.shared.pending=null;var pe=le,ze=pe.next;pe.next=null,q===null?I=ze:q.next=ze,q=pe;var ft=f.alternate;ft!==null&&(ft=ft.updateQueue,le=ft.lastBaseUpdate,le!==q&&(le===null?ft.firstBaseUpdate=ze:le.next=ze,ft.lastBaseUpdate=pe))}if(I!==null){var jt=L.baseState;q=0,ft=ze=pe=null,le=I;do{var rt=le.lane,Gn=le.eventTime;if((P&rt)===rt){ft!==null&&(ft=ft.next={eventTime:Gn,lane:0,tag:le.tag,payload:le.payload,callback:le.callback,next:null});e:{var jn=f,gr=le;switch(rt=p,Gn=x,gr.tag){case 1:if(jn=gr.payload,typeof jn=="function"){jt=jn.call(Gn,jt,rt);break e}jt=jn;break e;case 3:jn.flags=jn.flags&-65537|128;case 0:if(jn=gr.payload,rt=typeof jn=="function"?jn.call(Gn,jt,rt):jn,rt==null)break e;jt=o({},jt,rt);break e;case 2:bs=!0}}le.callback!==null&&le.lane!==0&&(f.flags|=64,rt=L.effects,rt===null?L.effects=[le]:rt.push(le))}else Gn={eventTime:Gn,lane:rt,tag:le.tag,payload:le.payload,callback:le.callback,next:null},ft===null?(ze=ft=Gn,pe=jt):ft=ft.next=Gn,q|=rt;if(le=le.next,le===null){if(le=L.shared.pending,le===null)break;rt=le,le=rt.next,rt.next=null,L.lastBaseUpdate=rt,L.shared.pending=null}}while(1);if(ft===null&&(pe=jt),L.baseState=pe,L.firstBaseUpdate=ze,L.lastBaseUpdate=ft,p=L.shared.interleaved,p!==null){L=p;do q|=L.lane,L=L.next;while(L!==p)}else I===null&&(L.shared.lanes=0);Sl|=q,f.lanes=q,f.memoizedState=jt}}function r3(f,p,x){if(f=p.effects,p.effects=null,f!==null)for(p=0;p<f.length;p++){var P=f[p],L=P.callback;if(L!==null){if(P.callback=null,P=x,typeof L!="function")throw Error(a(191,L));L.call(P)}}}var Hp=new r.Component().refs;function Vp(f,p,x,P){p=f.memoizedState,x=x(P,p),x=x==null?p:o({},p,x),f.memoizedState=x,f.lanes===0&&(f.updateQueue.baseState=x)}var da={isMounted:function(f){return(f=f._reactInternals)?F(f)===f:!1},enqueueSetState:function(f,p,x){f=f._reactInternals;var P=_i(),L=qr(f),I=Ss(P,L);I.payload=p,x!=null&&(I.callback=x),p=pl(f,I,L),p!==null&&(Fo(p,f,L,P),Fp(p,f,L))},enqueueReplaceState:function(f,p,x){f=f._reactInternals;var P=_i(),L=qr(f),I=Ss(P,L);I.tag=1,I.payload=p,x!=null&&(I.callback=x),p=pl(f,I,L),p!==null&&(Fo(p,f,L,P),Fp(p,f,L))},enqueueForceUpdate:function(f,p){f=f._reactInternals;var x=_i(),P=qr(f),L=Ss(x,P);L.tag=2,p!=null&&(L.callback=p),p=pl(f,L,P),p!==null&&(Fo(p,f,P,x),Fp(p,f,P))}};function If(f,p,x,P,L,I,q){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(P,I,q):p.prototype&&p.prototype.isPureReactComponent?!_u(x,P)||!_u(L,I):!0}function i3(f,p,x){var P=!1,L=aa,I=p.contextType;return typeof I=="object"&&I!==null?I=fo(I):(L=ui(p)?sa:Hr.current,P=p.contextTypes,I=(P=P!=null)?ul(f,L):aa),p=new p(x,I),f.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=da,f.stateNode=p,p._reactInternals=f,P&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=L,f.__reactInternalMemoizedMaskedChildContext=I),p}function o3(f,p,x,P){f=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(x,P),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(x,P),p.state!==f&&da.enqueueReplaceState(p,p.state,null)}function t1(f,p,x,P){var L=f.stateNode;L.props=x,L.state=f.memoizedState,L.refs=Hp,e1(f);var I=p.contextType;typeof I=="object"&&I!==null?L.context=fo(I):(I=ui(p)?sa:Hr.current,L.context=ul(f,I)),L.state=f.memoizedState,I=p.getDerivedStateFromProps,typeof I=="function"&&(Vp(f,p,I,x),L.state=f.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof L.getSnapshotBeforeUpdate=="function"||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(p=L.state,typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount(),p!==L.state&&da.enqueueReplaceState(L,L.state,null),zp(f,x,L,P),L.state=f.memoizedState),typeof L.componentDidMount=="function"&&(f.flags|=4194308)}function Ha(f,p,x){if(f=x.ref,f!==null&&typeof f!="function"&&typeof f!="object"){if(x._owner){if(x=x._owner,x){if(x.tag!==1)throw Error(a(309));var P=x.stateNode}if(!P)throw Error(a(147,f));var L=P,I=""+f;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===I?p.ref:(p=function(q){var le=L.refs;le===Hp&&(le=L.refs={}),q===null?delete le[I]:le[I]=q},p._stringRef=I,p)}if(typeof f!="string")throw Error(a(284));if(!x._owner)throw Error(a(290,f))}return f}function Zi(f,p){throw f=Object.prototype.toString.call(p),Error(a(31,f==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":f))}function n1(f){var p=f._init;return p(f._payload)}function a3(f){function p(ge,ue){if(f){var Se=ge.deletions;Se===null?(ge.deletions=[ue],ge.flags|=16):Se.push(ue)}}function x(ge,ue){if(!f)return null;for(;ue!==null;)p(ge,ue),ue=ue.sibling;return null}function P(ge,ue){for(ge=new Map;ue!==null;)ue.key!==null?ge.set(ue.key,ue):ge.set(ue.index,ue),ue=ue.sibling;return ge}function L(ge,ue){return ge=go(ge,ue),ge.index=0,ge.sibling=null,ge}function I(ge,ue,Se){return ge.index=Se,f?(Se=ge.alternate,Se!==null?(Se=Se.index,Se<ue?(ge.flags|=2,ue):Se):(ge.flags|=2,ue)):(ge.flags|=1048576,ue)}function q(ge){return f&&ge.alternate===null&&(ge.flags|=2),ge}function le(ge,ue,Se,et){return ue===null||ue.tag!==6?(ue=bm(Se,ge.mode,et),ue.return=ge,ue):(ue=L(ue,Se),ue.return=ge,ue)}function pe(ge,ue,Se,et){var Me=Se.type;return Me===d?ft(ge,ue,Se.props.children,et,Se.key):ue!==null&&(ue.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===T&&n1(Me)===ue.type)?(et=L(ue,Se.props),et.ref=Ha(ge,ue,Se),et.return=ge,et):(et=Zf(Se.type,Se.key,Se.props,null,ge.mode,et),et.ref=Ha(ge,ue,Se),et.return=ge,et)}function ze(ge,ue,Se,et){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==Se.containerInfo||ue.stateNode.implementation!==Se.implementation?(ue=Pl(Se,ge.mode,et),ue.return=ge,ue):(ue=L(ue,Se.children||[]),ue.return=ge,ue)}function ft(ge,ue,Se,et,Me){return ue===null||ue.tag!==7?(ue=El(Se,ge.mode,et,Me),ue.return=ge,ue):(ue=L(ue,Se),ue.return=ge,ue)}function jt(ge,ue,Se){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return ue=bm(""+ue,ge.mode,Se),ue.return=ge,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case l:return Se=Zf(ue.type,ue.key,ue.props,null,ge.mode,Se),Se.ref=Ha(ge,null,ue),Se.return=ge,Se;case u:return ue=Pl(ue,ge.mode,Se),ue.return=ge,ue;case T:var et=ue._init;return jt(ge,et(ue._payload),Se)}if(U(ue)||R(ue))return ue=El(ue,ge.mode,Se,null),ue.return=ge,ue;Zi(ge,ue)}return null}function rt(ge,ue,Se,et){var Me=ue!==null?ue.key:null;if(typeof Se=="string"&&Se!==""||typeof Se=="number")return Me!==null?null:le(ge,ue,""+Se,et);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case l:return Se.key===Me?pe(ge,ue,Se,et):null;case u:return Se.key===Me?ze(ge,ue,Se,et):null;case T:return Me=Se._init,rt(ge,ue,Me(Se._payload),et)}if(U(Se)||R(Se))return Me!==null?null:ft(ge,ue,Se,et,null);Zi(ge,Se)}return null}function Gn(ge,ue,Se,et,Me){if(typeof et=="string"&&et!==""||typeof et=="number")return ge=ge.get(Se)||null,le(ue,ge,""+et,Me);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case l:return ge=ge.get(et.key===null?Se:et.key)||null,pe(ue,ge,et,Me);case u:return ge=ge.get(et.key===null?Se:et.key)||null,ze(ue,ge,et,Me);case T:var Bt=et._init;return Gn(ge,ue,Se,Bt(et._payload),Me)}if(U(et)||R(et))return ge=ge.get(Se)||null,ft(ue,ge,et,Me,null);Zi(ue,et)}return null}function jn(ge,ue,Se,et){for(var Me=null,Bt=null,Rt=ue,Gt=ue=0,ti=null;Rt!==null&&Gt<Se.length;Gt++){Rt.index>Gt?(ti=Rt,Rt=null):ti=Rt.sibling;var Jt=rt(ge,Rt,Se[Gt],et);if(Jt===null){Rt===null&&(Rt=ti);break}f&&Rt&&Jt.alternate===null&&p(ge,Rt),ue=I(Jt,ue,Gt),Bt===null?Me=Jt:Bt.sibling=Jt,Bt=Jt,Rt=ti}if(Gt===Se.length)return x(ge,Rt),Wn&&fl(ge,Gt),Me;if(Rt===null){for(;Gt<Se.length;Gt++)Rt=jt(ge,Se[Gt],et),Rt!==null&&(ue=I(Rt,ue,Gt),Bt===null?Me=Rt:Bt.sibling=Rt,Bt=Rt);return Wn&&fl(ge,Gt),Me}for(Rt=P(ge,Rt);Gt<Se.length;Gt++)ti=Gn(Rt,ge,Gt,Se[Gt],et),ti!==null&&(f&&ti.alternate!==null&&Rt.delete(ti.key===null?Gt:ti.key),ue=I(ti,ue,Gt),Bt===null?Me=ti:Bt.sibling=ti,Bt=ti);return f&&Rt.forEach(function(Ps){return p(ge,Ps)}),Wn&&fl(ge,Gt),Me}function gr(ge,ue,Se,et){var Me=R(Se);if(typeof Me!="function")throw Error(a(150));if(Se=Me.call(Se),Se==null)throw Error(a(151));for(var Bt=Me=null,Rt=ue,Gt=ue=0,ti=null,Jt=Se.next();Rt!==null&&!Jt.done;Gt++,Jt=Se.next()){Rt.index>Gt?(ti=Rt,Rt=null):ti=Rt.sibling;var Ps=rt(ge,Rt,Jt.value,et);if(Ps===null){Rt===null&&(Rt=ti);break}f&&Rt&&Ps.alternate===null&&p(ge,Rt),ue=I(Ps,ue,Gt),Bt===null?Me=Ps:Bt.sibling=Ps,Bt=Ps,Rt=ti}if(Jt.done)return x(ge,Rt),Wn&&fl(ge,Gt),Me;if(Rt===null){for(;!Jt.done;Gt++,Jt=Se.next())Jt=jt(ge,Jt.value,et),Jt!==null&&(ue=I(Jt,ue,Gt),Bt===null?Me=Jt:Bt.sibling=Jt,Bt=Jt);return Wn&&fl(ge,Gt),Me}for(Rt=P(ge,Rt);!Jt.done;Gt++,Jt=Se.next())Jt=Gn(Rt,ge,Gt,Jt.value,et),Jt!==null&&(f&&Jt.alternate!==null&&Rt.delete(Jt.key===null?Gt:Jt.key),ue=I(Jt,ue,Gt),Bt===null?Me=Jt:Bt.sibling=Jt,Bt=Jt);return f&&Rt.forEach(function(ki){return p(ge,ki)}),Wn&&fl(ge,Gt),Me}function ya(ge,ue,Se,et){if(typeof Se=="object"&&Se!==null&&Se.type===d&&Se.key===null&&(Se=Se.props.children),typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case l:e:{for(var Me=Se.key,Bt=ue;Bt!==null;){if(Bt.key===Me){if(Me=Se.type,Me===d){if(Bt.tag===7){x(ge,Bt.sibling),ue=L(Bt,Se.props.children),ue.return=ge,ge=ue;break e}}else if(Bt.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===T&&n1(Me)===Bt.type){x(ge,Bt.sibling),ue=L(Bt,Se.props),ue.ref=Ha(ge,Bt,Se),ue.return=ge,ge=ue;break e}x(ge,Bt);break}else p(ge,Bt);Bt=Bt.sibling}Se.type===d?(ue=El(Se.props.children,ge.mode,et,Se.key),ue.return=ge,ge=ue):(et=Zf(Se.type,Se.key,Se.props,null,ge.mode,et),et.ref=Ha(ge,ue,Se),et.return=ge,ge=et)}return q(ge);case u:e:{for(Bt=Se.key;ue!==null;){if(ue.key===Bt)if(ue.tag===4&&ue.stateNode.containerInfo===Se.containerInfo&&ue.stateNode.implementation===Se.implementation){x(ge,ue.sibling),ue=L(ue,Se.children||[]),ue.return=ge,ge=ue;break e}else{x(ge,ue);break}else p(ge,ue);ue=ue.sibling}ue=Pl(Se,ge.mode,et),ue.return=ge,ge=ue}return q(ge);case T:return Bt=Se._init,ya(ge,ue,Bt(Se._payload),et)}if(U(Se))return jn(ge,ue,Se,et);if(R(Se))return gr(ge,ue,Se,et);Zi(ge,Se)}return typeof Se=="string"&&Se!==""||typeof Se=="number"?(Se=""+Se,ue!==null&&ue.tag===6?(x(ge,ue.sibling),ue=L(ue,Se),ue.return=ge,ge=ue):(x(ge,ue),ue=bm(Se,ge.mode,et),ue.return=ge,ge=ue),q(ge)):x(ge,ue)}return ya}var Ic=a3(!0),s3=a3(!1),Rf={},jo=oa(Rf),Va=oa(Rf),oe=oa(Rf);function we(f){if(f===Rf)throw Error(a(174));return f}function ye(f,p){Tn(oe,p),Tn(Va,f),Tn(jo,Rf),f=Z(p),Nn(jo),Tn(jo,f)}function nt(){Nn(jo),Nn(Va),Nn(oe)}function It(f){var p=we(oe.current),x=we(jo.current);p=W(x,f.type,p),x!==p&&(Tn(Va,f),Tn(jo,p))}function rn(f){Va.current===f&&(Nn(jo),Nn(Va))}var $t=oa(0);function gn(f){for(var p=f;p!==null;){if(p.tag===13){var x=p.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||Sc(x)||yf(x)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Df=[];function r1(){for(var f=0;f<Df.length;f++){var p=Df[f];wt?p._workInProgressVersionPrimary=null:p._workInProgressVersionSecondary=null}Df.length=0}var Di=s.ReactCurrentDispatcher,Rc=s.ReactCurrentBatchConfig,Eu=0,Ln=null,mr=null,Sr=null,un=!1,Nf=!1,Dc=0,Wp=0;function Si(){throw Error(a(321))}function i1(f,p){if(p===null)return!1;for(var x=0;x<p.length&&x<f.length;x++)if(!Y(f[x],p[x]))return!1;return!0}function o1(f,p,x,P,L,I){if(Eu=I,Ln=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,Di.current=f===null||f.memoizedState===null?bw:Sw,f=x(P,L),Nf){I=0;do{if(Nf=!1,Dc=0,25<=I)throw Error(a(301));I+=1,Sr=mr=null,p.updateQueue=null,Di.current=xw,f=x(P,L)}while(Nf)}if(Di.current=xs,p=mr!==null&&mr.next!==null,Eu=0,Sr=mr=Ln=null,un=!1,p)throw Error(a(300));return f}function Nc(){var f=Dc!==0;return Dc=0,f}function di(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sr===null?Ln.memoizedState=Sr=f:Sr=Sr.next=f,Sr}function Ni(){if(mr===null){var f=Ln.alternate;f=f!==null?f.memoizedState:null}else f=mr.next;var p=Sr===null?Ln.memoizedState:Sr.next;if(p!==null)Sr=p,mr=f;else{if(f===null)throw Error(a(310));mr=f,f={memoizedState:mr.memoizedState,baseState:mr.baseState,baseQueue:mr.baseQueue,queue:mr.queue,next:null},Sr===null?Ln.memoizedState=Sr=f:Sr=Sr.next=f}return Sr}function jc(f,p){return typeof p=="function"?p(f):p}function Bc(f){var p=Ni(),x=p.queue;if(x===null)throw Error(a(311));x.lastRenderedReducer=f;var P=mr,L=P.baseQueue,I=x.pending;if(I!==null){if(L!==null){var q=L.next;L.next=I.next,I.next=q}P.baseQueue=L=I,x.pending=null}if(L!==null){I=L.next,P=P.baseState;var le=q=null,pe=null,ze=I;do{var ft=ze.lane;if((Eu&ft)===ft)pe!==null&&(pe=pe.next={lane:0,action:ze.action,hasEagerState:ze.hasEagerState,eagerState:ze.eagerState,next:null}),P=ze.hasEagerState?ze.eagerState:f(P,ze.action);else{var jt={lane:ft,action:ze.action,hasEagerState:ze.hasEagerState,eagerState:ze.eagerState,next:null};pe===null?(le=pe=jt,q=P):pe=pe.next=jt,Ln.lanes|=ft,Sl|=ft}ze=ze.next}while(ze!==null&&ze!==I);pe===null?q=P:pe.next=le,Y(P,p.memoizedState)||(Qi=!0),p.memoizedState=P,p.baseState=q,p.baseQueue=pe,x.lastRenderedState=P}if(f=x.interleaved,f!==null){L=f;do I=L.lane,Ln.lanes|=I,Sl|=I,L=L.next;while(L!==f)}else L===null&&(x.lanes=0);return[p.memoizedState,x.dispatch]}function Up(f){var p=Ni(),x=p.queue;if(x===null)throw Error(a(311));x.lastRenderedReducer=f;var P=x.dispatch,L=x.pending,I=p.memoizedState;if(L!==null){x.pending=null;var q=L=L.next;do I=f(I,q.action),q=q.next;while(q!==L);Y(I,p.memoizedState)||(Qi=!0),p.memoizedState=I,p.baseQueue===null&&(p.baseState=I),x.lastRenderedState=I}return[I,P]}function a1(){}function jf(f,p){var x=Ln,P=Ni(),L=p(),I=!Y(P.memoizedState,L);if(I&&(P.memoizedState=L,Qi=!0),P=P.queue,Gp(ml.bind(null,x,P,f),[f]),P.getSnapshot!==p||I||Sr!==null&&Sr.memoizedState.tag&1){if(x.flags|=2048,$f(9,$c.bind(null,x,P,L,p),void 0,null),ei===null)throw Error(a(349));Eu&30||s1(x,p,L)}return L}function s1(f,p,x){f.flags|=16384,f={getSnapshot:p,value:x},p=Ln.updateQueue,p===null?(p={lastEffect:null,stores:null},Ln.updateQueue=p,p.stores=[f]):(x=p.stores,x===null?p.stores=[f]:x.push(f))}function $c(f,p,x,P){p.value=x,p.getSnapshot=P,Bf(p)&&l3(f)}function ml(f,p,x){return x(function(){Bf(p)&&l3(f)})}function Bf(f){var p=f.getSnapshot;f=f.value;try{var x=p();return!Y(f,x)}catch{return!0}}function l3(f){var p=ca(f,1);p!==null&&Fo(p,f,1,-1)}function u3(f){var p=di();return typeof f=="function"&&(f=f()),p.memoizedState=p.baseState=f,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:f},p.queue=f,f=f.dispatch=Hc.bind(null,Ln,f),[p.memoizedState,f]}function $f(f,p,x,P){return f={tag:f,create:p,destroy:x,deps:P,next:null},p=Ln.updateQueue,p===null?(p={lastEffect:null,stores:null},Ln.updateQueue=p,p.lastEffect=f.next=f):(x=p.lastEffect,x===null?p.lastEffect=f.next=f:(P=x.next,x.next=f,f.next=P,p.lastEffect=f)),f}function Ff(){return Ni().memoizedState}function Pu(f,p,x,P){var L=di();Ln.flags|=f,L.memoizedState=$f(1|p,x,void 0,P===void 0?null:P)}function Fc(f,p,x,P){var L=Ni();P=P===void 0?null:P;var I=void 0;if(mr!==null){var q=mr.memoizedState;if(I=q.destroy,P!==null&&i1(P,q.deps)){L.memoizedState=$f(p,x,I,P);return}}Ln.flags|=f,L.memoizedState=$f(1|p,x,I,P)}function c3(f,p){return Pu(8390656,8,f,p)}function Gp(f,p){return Fc(2048,8,f,p)}function d3(f,p){return Fc(4,2,f,p)}function f3(f,p){return Fc(4,4,f,p)}function Rr(f,p){if(typeof p=="function")return f=f(),p(f),function(){p(null)};if(p!=null)return f=f(),p.current=f,function(){p.current=null}}function fi(f,p,x){return x=x!=null?x.concat([f]):null,Fc(4,4,Rr.bind(null,p,f),x)}function l1(){}function h3(f,p){var x=Ni();p=p===void 0?null:p;var P=x.memoizedState;return P!==null&&p!==null&&i1(p,P[1])?P[0]:(x.memoizedState=[f,p],f)}function u1(f,p){var x=Ni();p=p===void 0?null:p;var P=x.memoizedState;return P!==null&&p!==null&&i1(p,P[1])?P[0]:(f=f(),x.memoizedState=[f,p],f)}function p3(f,p,x){return Eu&21?(Y(x,p)||(x=wf(),Ln.lanes|=x,Sl|=x,f.baseState=!0),p):(f.baseState&&(f.baseState=!1,Qi=!0),f.memoizedState=x)}function c1(f,p){var x=Yt;Yt=x!==0&&4>x?x:4,f(!0);var P=Rc.transition;Rc.transition={};try{f(!1),p()}finally{Yt=x,Rc.transition=P}}function zc(){return Ni().memoizedState}function d1(f,p,x){var P=qr(f);if(x={lane:P,action:x,hasEagerState:!1,eagerState:null,next:null},Vc(f))Wc(p,x);else if(x=Mc(f,p,x,P),x!==null){var L=_i();Fo(x,f,P,L),zf(x,p,P)}}function Hc(f,p,x){var P=qr(f),L={lane:P,action:x,hasEagerState:!1,eagerState:null,next:null};if(Vc(f))Wc(p,L);else{var I=f.alternate;if(f.lanes===0&&(I===null||I.lanes===0)&&(I=p.lastRenderedReducer,I!==null))try{var q=p.lastRenderedState,le=I(q,x);if(L.hasEagerState=!0,L.eagerState=le,Y(le,q)){var pe=p.interleaved;pe===null?(L.next=L,Mf(p)):(L.next=pe.next,pe.next=L),p.interleaved=L;return}}catch{}finally{}x=Mc(f,p,L,P),x!==null&&(L=_i(),Fo(x,f,P,L),zf(x,p,P))}}function Vc(f){var p=f.alternate;return f===Ln||p!==null&&p===Ln}function Wc(f,p){Nf=un=!0;var x=f.pending;x===null?p.next=p:(p.next=x.next,x.next=p),f.pending=p}function zf(f,p,x){if(x&4194240){var P=p.lanes;P&=f.pendingLanes,x|=P,p.lanes=x,Cu(f,x)}}var xs={readContext:fo,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},bw={readContext:fo,useCallback:function(f,p){return di().memoizedState=[f,p===void 0?null:p],f},useContext:fo,useEffect:c3,useImperativeHandle:function(f,p,x){return x=x!=null?x.concat([f]):null,Pu(4194308,4,Rr.bind(null,p,f),x)},useLayoutEffect:function(f,p){return Pu(4194308,4,f,p)},useInsertionEffect:function(f,p){return Pu(4,2,f,p)},useMemo:function(f,p){var x=di();return p=p===void 0?null:p,f=f(),x.memoizedState=[f,p],f},useReducer:function(f,p,x){var P=di();return p=x!==void 0?x(p):p,P.memoizedState=P.baseState=p,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:p},P.queue=f,f=f.dispatch=d1.bind(null,Ln,f),[P.memoizedState,f]},useRef:function(f){var p=di();return f={current:f},p.memoizedState=f},useState:u3,useDebugValue:l1,useDeferredValue:function(f){return di().memoizedState=f},useTransition:function(){var f=u3(!1),p=f[0];return f=c1.bind(null,f[1]),di().memoizedState=f,[p,f]},useMutableSource:function(){},useSyncExternalStore:function(f,p,x){var P=Ln,L=di();if(Wn){if(x===void 0)throw Error(a(407));x=x()}else{if(x=p(),ei===null)throw Error(a(349));Eu&30||s1(P,p,x)}L.memoizedState=x;var I={value:x,getSnapshot:p};return L.queue=I,c3(ml.bind(null,P,I,f),[f]),P.flags|=2048,$f(9,$c.bind(null,P,I,x,p),void 0,null),x},useId:function(){var f=di(),p=ei.identifierPrefix;if(Wn){var x=Fa,P=co;x=(P&~(1<<32-Ii(P)-1)).toString(32)+x,p=":"+p+"R"+x,x=Dc++,0<x&&(p+="H"+x.toString(32)),p+=":"}else x=Wp++,p=":"+p+"r"+x.toString(32)+":";return f.memoizedState=p},unstable_isNewReconciler:!1},Sw={readContext:fo,useCallback:h3,useContext:fo,useEffect:Gp,useImperativeHandle:fi,useInsertionEffect:d3,useLayoutEffect:f3,useMemo:u1,useReducer:Bc,useRef:Ff,useState:function(){return Bc(jc)},useDebugValue:l1,useDeferredValue:function(f){var p=Ni();return p3(p,mr.memoizedState,f)},useTransition:function(){var f=Bc(jc)[0],p=Ni().memoizedState;return[f,p]},useMutableSource:a1,useSyncExternalStore:jf,useId:zc,unstable_isNewReconciler:!1},xw={readContext:fo,useCallback:h3,useContext:fo,useEffect:Gp,useImperativeHandle:fi,useInsertionEffect:d3,useLayoutEffect:f3,useMemo:u1,useReducer:Up,useRef:Ff,useState:function(){return Up(jc)},useDebugValue:l1,useDeferredValue:function(f){var p=Ni();return mr===null?p.memoizedState=f:p3(p,mr.memoizedState,f)},useTransition:function(){var f=Up(jc)[0],p=Ni().memoizedState;return[f,p]},useMutableSource:a1,useSyncExternalStore:jf,useId:zc,unstable_isNewReconciler:!1};function Uc(f,p){try{var x="",P=p;do x+=Ac(P),P=P.return;while(P);var L=x}catch(I){L=`
|
||
Error generating stack: `+I.message+`
|
||
`+I.stack}return{value:f,source:p,stack:L,digest:null}}function f1(f,p,x){return{value:f,source:null,stack:x??null,digest:p??null}}function Gc(f,p){try{console.error(p.value)}catch(x){setTimeout(function(){throw x})}}var Hf=typeof WeakMap=="function"?WeakMap:Map;function h1(f,p,x){x=Ss(-1,x),x.tag=3,x.payload={element:null};var P=p.value;return x.callback=function(){Gf||(Gf=!0,qf=P),Gc(f,p)},x}function z(f,p,x){x=Ss(-1,x),x.tag=3;var P=f.type.getDerivedStateFromError;if(typeof P=="function"){var L=p.value;x.payload=function(){return P(L)},x.callback=function(){Gc(f,p)}}var I=f.stateNode;return I!==null&&typeof I.componentDidCatch=="function"&&(x.callback=function(){Gc(f,p),typeof P!="function"&&(wl===null?wl=new Set([this]):wl.add(this));var q=p.stack;this.componentDidCatch(p.value,{componentStack:q!==null?q:""})}),x}function Tu(f,p,x){var P=f.pingCache;if(P===null){P=f.pingCache=new Hf;var L=new Set;P.set(p,L)}else L=P.get(p),L===void 0&&(L=new Set,P.set(p,L));L.has(x)||(L.add(x),f=P3.bind(null,f,p,x),p.then(f,f))}function Vf(f){do{var p;if((p=f.tag===13)&&(p=f.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return f;f=f.return}while(f!==null);return null}function ho(f,p,x,P,L){return f.mode&1?(f.flags|=65536,f.lanes=L,f):(f===p?f.flags|=65536:(f.flags|=128,x.flags|=131072,x.flags&=-52805,x.tag===1&&(x.alternate===null?x.tag=17:(p=Ss(-1,1),p.tag=2,pl(x,p,1))),x.lanes|=1),f)}var Zt=s.ReactCurrentOwner,Qi=!1;function ji(f,p,x,P){p.child=f===null?s3(p,null,x,P):Ic(p,f.child,x,P)}function m3(f,p,x,P,L){x=x.render;var I=p.ref;return Oc(p,L),P=o1(f,p,x,P,I,L),x=Nc(),f!==null&&!Qi?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~L,ws(f,p,L)):(Wn&&x&&Ri(p),p.flags|=1,ji(f,p,P,L),p.child)}function gl(f,p,x,P,L){if(f===null){var I=x.type;return typeof I=="function"&&!R1(I)&&I.defaultProps===void 0&&x.compare===null&&x.defaultProps===void 0?(p.tag=15,p.type=I,g3(f,p,I,P,L)):(f=Zf(x.type,null,P,p,p.mode,L),f.ref=p.ref,f.return=p,p.child=f)}if(I=f.child,!(f.lanes&L)){var q=I.memoizedProps;if(x=x.compare,x=x!==null?x:_u,x(q,P)&&f.ref===p.ref)return ws(f,p,L)}return p.flags|=1,f=go(I,P),f.ref=p.ref,f.return=p,p.child=f}function g3(f,p,x,P,L){if(f!==null){var I=f.memoizedProps;if(_u(I,P)&&f.ref===p.ref)if(Qi=!1,p.pendingProps=P=I,(f.lanes&L)!==0)f.flags&131072&&(Qi=!0);else return p.lanes=f.lanes,ws(f,p,L)}return p1(f,p,x,P,L)}function v3(f,p,x){var P=p.pendingProps,L=P.children,I=f!==null?f.memoizedState:null;if(P.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tn(bl,po),po|=x;else{if(!(x&1073741824))return f=I!==null?I.baseLanes|x:x,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:f,cachePool:null,transitions:null},p.updateQueue=null,Tn(bl,po),po|=f,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},P=I!==null?I.baseLanes:x,Tn(bl,po),po|=P}else I!==null?(P=I.baseLanes|x,p.memoizedState=null):P=x,Tn(bl,po),po|=P;return ji(f,p,L,x),p.child}function y3(f,p){var x=p.ref;(f===null&&x!==null||f!==null&&f.ref!==x)&&(p.flags|=512,p.flags|=2097152)}function p1(f,p,x,P,L){var I=ui(x)?sa:Hr.current;return I=ul(p,I),Oc(p,L),x=o1(f,p,x,P,I,L),P=Nc(),f!==null&&!Qi?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~L,ws(f,p,L)):(Wn&&P&&Ri(p),p.flags|=1,ji(f,p,x,L),p.child)}function b3(f,p,x,P,L){if(ui(x)){var I=!0;ys(p)}else I=!1;if(Oc(p,L),p.stateNode===null)Wa(f,p),i3(p,x,P),t1(p,x,P,L),P=!0;else if(f===null){var q=p.stateNode,le=p.memoizedProps;q.props=le;var pe=q.context,ze=x.contextType;typeof ze=="object"&&ze!==null?ze=fo(ze):(ze=ui(x)?sa:Hr.current,ze=ul(p,ze));var ft=x.getDerivedStateFromProps,jt=typeof ft=="function"||typeof q.getSnapshotBeforeUpdate=="function";jt||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(le!==P||pe!==ze)&&o3(p,q,P,ze),bs=!1;var rt=p.memoizedState;q.state=rt,zp(p,P,q,L),pe=p.memoizedState,le!==P||rt!==pe||li.current||bs?(typeof ft=="function"&&(Vp(p,x,ft,P),pe=p.memoizedState),(le=bs||If(p,x,le,P,rt,pe,ze))?(jt||typeof q.UNSAFE_componentWillMount!="function"&&typeof q.componentWillMount!="function"||(typeof q.componentWillMount=="function"&&q.componentWillMount(),typeof q.UNSAFE_componentWillMount=="function"&&q.UNSAFE_componentWillMount()),typeof q.componentDidMount=="function"&&(p.flags|=4194308)):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=P,p.memoizedState=pe),q.props=P,q.state=pe,q.context=ze,P=le):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),P=!1)}else{q=p.stateNode,n3(f,p),le=p.memoizedProps,ze=p.type===p.elementType?le:ua(p.type,le),q.props=ze,jt=p.pendingProps,rt=q.context,pe=x.contextType,typeof pe=="object"&&pe!==null?pe=fo(pe):(pe=ui(x)?sa:Hr.current,pe=ul(p,pe));var Gn=x.getDerivedStateFromProps;(ft=typeof Gn=="function"||typeof q.getSnapshotBeforeUpdate=="function")||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(le!==jt||rt!==pe)&&o3(p,q,P,pe),bs=!1,rt=p.memoizedState,q.state=rt,zp(p,P,q,L);var jn=p.memoizedState;le!==jt||rt!==jn||li.current||bs?(typeof Gn=="function"&&(Vp(p,x,Gn,P),jn=p.memoizedState),(ze=bs||If(p,x,ze,P,rt,jn,pe)||!1)?(ft||typeof q.UNSAFE_componentWillUpdate!="function"&&typeof q.componentWillUpdate!="function"||(typeof q.componentWillUpdate=="function"&&q.componentWillUpdate(P,jn,pe),typeof q.UNSAFE_componentWillUpdate=="function"&&q.UNSAFE_componentWillUpdate(P,jn,pe)),typeof q.componentDidUpdate=="function"&&(p.flags|=4),typeof q.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof q.componentDidUpdate!="function"||le===f.memoizedProps&&rt===f.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||le===f.memoizedProps&&rt===f.memoizedState||(p.flags|=1024),p.memoizedProps=P,p.memoizedState=jn),q.props=P,q.state=jn,q.context=pe,P=ze):(typeof q.componentDidUpdate!="function"||le===f.memoizedProps&&rt===f.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||le===f.memoizedProps&&rt===f.memoizedState||(p.flags|=1024),P=!1)}return fa(f,p,x,P,I,L)}function fa(f,p,x,P,L,I){y3(f,p);var q=(p.flags&128)!==0;if(!P&&!q)return L&&Sf(p,x,!1),ws(f,p,I);P=p.stateNode,Zt.current=p;var le=q&&typeof x.getDerivedStateFromError!="function"?null:P.render();return p.flags|=1,f!==null&&q?(p.child=Ic(p,f.child,null,I),p.child=Ic(p,null,le,I)):ji(f,p,le,I),p.memoizedState=P.state,L&&Sf(p,x,!0),p.child}function S3(f){var p=f.stateNode;p.pendingContext?bf(f,p.pendingContext,p.pendingContext!==p.context):p.context&&bf(f,p.context,!1),ye(f,p.containerInfo)}function x3(f,p,x,P,L){return Lc(),J0(L),p.flags|=256,ji(f,p,x,P),p.child}var m1={dehydrated:null,treeContext:null,retryLane:0};function g1(f){return{baseLanes:f,cachePool:null,transitions:null}}function w3(f,p,x){var P=p.pendingProps,L=$t.current,I=!1,q=(p.flags&128)!==0,le;if((le=q)||(le=f!==null&&f.memoizedState===null?!1:(L&2)!==0),le?(I=!0,p.flags&=-129):(f===null||f.memoizedState!==null)&&(L|=1),Tn($t,L&1),f===null)return Ef(p),f=p.memoizedState,f!==null&&(f=f.dehydrated,f!==null)?(p.mode&1?yf(f)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(q=P.children,f=P.fallback,I?(P=p.mode,I=p.child,q={mode:"hidden",children:q},!(P&1)&&I!==null?(I.childLanes=0,I.pendingProps=q):I=ym(q,P,0,null),f=El(f,P,x,null),I.return=p,f.return=p,I.sibling=f,p.child=I,p.child.memoizedState=g1(x),p.memoizedState=m1,f):ha(p,q));if(L=f.memoizedState,L!==null&&(le=L.dehydrated,le!==null))return ww(f,p,q,P,le,L,x);if(I){I=P.fallback,q=p.mode,L=f.child,le=L.sibling;var pe={mode:"hidden",children:P.children};return!(q&1)&&p.child!==L?(P=p.child,P.childLanes=0,P.pendingProps=pe,p.deletions=null):(P=go(L,pe),P.subtreeFlags=L.subtreeFlags&14680064),le!==null?I=go(le,I):(I=El(I,q,x,null),I.flags|=2),I.return=p,P.return=p,P.sibling=I,p.child=P,P=I,I=p.child,q=f.child.memoizedState,q=q===null?g1(x):{baseLanes:q.baseLanes|x,cachePool:null,transitions:q.transitions},I.memoizedState=q,I.childLanes=f.childLanes&~x,p.memoizedState=m1,P}return I=f.child,f=I.sibling,P=go(I,{mode:"visible",children:P.children}),!(p.mode&1)&&(P.lanes=x),P.return=p,P.sibling=null,f!==null&&(x=p.deletions,x===null?(p.deletions=[f],p.flags|=16):x.push(f)),p.child=P,p.memoizedState=null,P}function ha(f,p){return p=ym({mode:"visible",children:p},f.mode,0,null),p.return=f,f.child=p}function qp(f,p,x,P){return P!==null&&J0(P),Ic(p,f.child,null,x),f=ha(p,p.pendingProps.children),f.flags|=2,p.memoizedState=null,f}function ww(f,p,x,P,L,I,q){if(x)return p.flags&256?(p.flags&=-257,P=f1(Error(a(422))),qp(f,p,q,P)):p.memoizedState!==null?(p.child=f.child,p.flags|=128,null):(I=P.fallback,L=p.mode,P=ym({mode:"visible",children:P.children},L,0,null),I=El(I,L,q,null),I.flags|=2,P.return=p,I.return=p,P.sibling=I,p.child=P,p.mode&1&&Ic(p,f.child,null,q),p.child.memoizedState=g1(q),p.memoizedState=m1,I);if(!(p.mode&1))return qp(f,p,q,null);if(yf(L))return P=j0(L).digest,I=Error(a(419)),P=f1(I,P,void 0),qp(f,p,q,P);if(x=(q&f.childLanes)!==0,Qi||x){if(P=ei,P!==null){switch(q&-q){case 4:L=2;break;case 16:L=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:L=32;break;case 536870912:L=268435456;break;default:L=0}L=L&(P.suspendedLanes|q)?0:L,L!==0&&L!==I.retryLane&&(I.retryLane=L,ca(f,L),Fo(P,f,L,-1))}return Xf(),P=f1(Error(a(421))),qp(f,p,q,P)}return Sc(L)?(p.flags|=128,p.child=f.child,p=Tw.bind(null,f),ol(L,p),null):(f=I.treeContext,St&&(Do=F0(L),Xn=p,Wn=!0,Xi=null,No=!1,f!==null&&(Cn[ci++]=co,Cn[ci++]=Fa,Cn[ci++]=Ro,co=f.id,Fa=f.overflow,Ro=p)),p=ha(p,P.children),p.flags|=4096,p)}function C3(f,p,x){f.lanes|=p;var P=f.alternate;P!==null&&(P.lanes|=p),Of(f.return,p,x)}function v1(f,p,x,P,L){var I=f.memoizedState;I===null?f.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:P,tail:x,tailMode:L}:(I.isBackwards=p,I.rendering=null,I.renderingStartTime=0,I.last=P,I.tail=x,I.tailMode=L)}function _3(f,p,x){var P=p.pendingProps,L=P.revealOrder,I=P.tail;if(ji(f,p,P.children,x),P=$t.current,P&2)P=P&1|2,p.flags|=128;else{if(f!==null&&f.flags&128)e:for(f=p.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&C3(f,x,p);else if(f.tag===19)C3(f,x,p);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===p)break e;for(;f.sibling===null;){if(f.return===null||f.return===p)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}P&=1}if(Tn($t,P),!(p.mode&1))p.memoizedState=null;else switch(L){case"forwards":for(x=p.child,L=null;x!==null;)f=x.alternate,f!==null&&gn(f)===null&&(L=x),x=x.sibling;x=L,x===null?(L=p.child,p.child=null):(L=x.sibling,x.sibling=null),v1(p,!1,L,x,I);break;case"backwards":for(x=null,L=p.child,p.child=null;L!==null;){if(f=L.alternate,f!==null&&gn(f)===null){p.child=L;break}f=L.sibling,L.sibling=x,x=L,L=f}v1(p,!0,x,null,I);break;case"together":v1(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function Wa(f,p){!(p.mode&1)&&f!==null&&(f.alternate=null,p.alternate=null,p.flags|=2)}function ws(f,p,x){if(f!==null&&(p.dependencies=f.dependencies),Sl|=p.lanes,!(x&p.childLanes))return null;if(f!==null&&p.child!==f.child)throw Error(a(153));if(p.child!==null){for(f=p.child,x=go(f,f.pendingProps),p.child=x,x.return=p;f.sibling!==null;)f=f.sibling,x=x.sibling=go(f,f.pendingProps),x.return=p;x.sibling=null}return p.child}function Cw(f,p,x){switch(p.tag){case 3:S3(p),Lc();break;case 5:It(p);break;case 1:ui(p.type)&&ys(p);break;case 4:ye(p,p.stateNode.containerInfo);break;case 10:t3(p,p.type._context,p.memoizedProps.value);break;case 13:var P=p.memoizedState;if(P!==null)return P.dehydrated!==null?(Tn($t,$t.current&1),p.flags|=128,null):x&p.child.childLanes?w3(f,p,x):(Tn($t,$t.current&1),f=ws(f,p,x),f!==null?f.sibling:null);Tn($t,$t.current&1);break;case 19:if(P=(x&p.childLanes)!==0,f.flags&128){if(P)return _3(f,p,x);p.flags|=128}var L=p.memoizedState;if(L!==null&&(L.rendering=null,L.tail=null,L.lastEffect=null),Tn($t,$t.current),P)break;return null;case 22:case 23:return p.lanes=0,v3(f,p,x)}return ws(f,p,x)}function Dr(f){f.flags|=4}function k3(f,p){if(f!==null&&f.child===p.child)return!0;if(p.flags&16)return!1;for(f=p.child;f!==null;){if(f.flags&12854||f.subtreeFlags&12854)return!1;f=f.sibling}return!0}var Wf,Uf,Yp,Kp;if(st)Wf=function(f,p){for(var x=p.child;x!==null;){if(x.tag===5||x.tag===6)ve(f,x.stateNode);else if(x.tag!==4&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===p)break;for(;x.sibling===null;){if(x.return===null||x.return===p)return;x=x.return}x.sibling.return=x.return,x=x.sibling}},Uf=function(){},Yp=function(f,p,x,P,L){if(f=f.memoizedProps,f!==P){var I=p.stateNode,q=we(jo.current);x=be(I,x,f,P,L,q),(p.updateQueue=x)&&Dr(p)}},Kp=function(f,p,x,P){x!==P&&Dr(p)};else if(gt){Wf=function(f,p,x,P){for(var L=p.child;L!==null;){if(L.tag===5){var I=L.stateNode;x&&P&&(I=Tp(I,L.type,L.memoizedProps,L)),ve(f,I)}else if(L.tag===6)I=L.stateNode,x&&P&&(I=Lp(I,L.memoizedProps,L)),ve(f,I);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)I=L.child,I!==null&&(I.return=L),Wf(f,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===p)break;for(;L.sibling===null;){if(L.return===null||L.return===p)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};var y1=function(f,p,x,P){for(var L=p.child;L!==null;){if(L.tag===5){var I=L.stateNode;x&&P&&(I=Tp(I,L.type,L.memoizedProps,L)),Pp(f,I)}else if(L.tag===6)I=L.stateNode,x&&P&&(I=Lp(I,L.memoizedProps,L)),Pp(f,I);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)I=L.child,I!==null&&(I.return=L),y1(f,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===p)break;for(;L.sibling===null;){if(L.return===null||L.return===p)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};Uf=function(f,p){var x=p.stateNode;if(!k3(f,p)){f=x.containerInfo;var P=Ba(f);y1(P,p,!1,!1),x.pendingChildren=P,Dr(p),D0(f,P)}},Yp=function(f,p,x,P,L){var I=f.stateNode,q=f.memoizedProps;if((f=k3(f,p))&&q===P)p.stateNode=I;else{var le=p.stateNode,pe=we(jo.current),ze=null;q!==P&&(ze=be(le,x,q,P,L,pe)),f&&ze===null?p.stateNode=I:(I=R0(I,ze,x,q,P,p,f,le),Pe(I,x,P,L,pe)&&Dr(p),p.stateNode=I,f?Dr(p):Wf(I,p,!1,!1))}},Kp=function(f,p,x,P){x!==P?(f=we(oe.current),x=we(jo.current),p.stateNode=Oe(P,f,x,p),Dr(p)):p.stateNode=f.stateNode}}else Uf=function(){},Yp=function(){},Kp=function(){};function qc(f,p){if(!Wn)switch(f.tailMode){case"hidden":p=f.tail;for(var x=null;p!==null;)p.alternate!==null&&(x=p),p=p.sibling;x===null?f.tail=null:x.sibling=null;break;case"collapsed":x=f.tail;for(var P=null;x!==null;)x.alternate!==null&&(P=x),x=x.sibling;P===null?p||f.tail===null?f.tail=null:f.tail.sibling=null:P.sibling=null}}function xi(f){var p=f.alternate!==null&&f.alternate.child===f.child,x=0,P=0;if(p)for(var L=f.child;L!==null;)x|=L.lanes|L.childLanes,P|=L.subtreeFlags&14680064,P|=L.flags&14680064,L.return=f,L=L.sibling;else for(L=f.child;L!==null;)x|=L.lanes|L.childLanes,P|=L.subtreeFlags,P|=L.flags,L.return=f,L=L.sibling;return f.subtreeFlags|=P,f.childLanes=x,p}function _w(f,p,x){var P=p.pendingProps;switch(Q0(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xi(p),null;case 1:return ui(p.type)&&vs(),xi(p),null;case 3:return x=p.stateNode,nt(),Nn(li),Nn(Hr),r1(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(f===null||f.child===null)&&(Tc(p)?Dr(p):f===null||f.memoizedState.isDehydrated&&!(p.flags&256)||(p.flags|=1024,Xi!==null&&(pm(Xi),Xi=null))),Uf(f,p),xi(p),null;case 5:rn(p),x=we(oe.current);var L=p.type;if(f!==null&&p.stateNode!=null)Yp(f,p,L,P,x),f.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!P){if(p.stateNode===null)throw Error(a(166));return xi(p),null}if(f=we(jo.current),Tc(p)){if(!St)throw Error(a(175));f=z0(p.stateNode,p.type,p.memoizedProps,x,f,p,!No),p.updateQueue=f,f!==null&&Dr(p)}else{var I=de(L,P,x,f,p);Wf(I,p,!1,!1),p.stateNode=I,Pe(I,L,P,x,f)&&Dr(p)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return xi(p),null;case 6:if(f&&p.stateNode!=null)Kp(f,p,f.memoizedProps,P);else{if(typeof P!="string"&&p.stateNode===null)throw Error(a(166));if(f=we(oe.current),x=we(jo.current),Tc(p)){if(!St)throw Error(a(176));if(f=p.stateNode,x=p.memoizedProps,(P=ms(f,x,p,!No))&&(L=Xn,L!==null))switch(L.tag){case 3:Y0(L.stateNode.containerInfo,f,x,(L.mode&1)!==0);break;case 5:gs(L.type,L.memoizedProps,L.stateNode,f,x,(L.mode&1)!==0)}P&&Dr(p)}else p.stateNode=Oe(P,f,x,p)}return xi(p),null;case 13:if(Nn($t),P=p.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(Wn&&Do!==null&&p.mode&1&&!(p.flags&128))Jy(),Lc(),p.flags|=98560,L=!1;else if(L=Tc(p),P!==null&&P.dehydrated!==null){if(f===null){if(!L)throw Error(a(318));if(!St)throw Error(a(344));if(L=p.memoizedState,L=L!==null?L.dehydrated:null,!L)throw Error(a(317));H0(L,p)}else Lc(),!(p.flags&128)&&(p.memoizedState=null),p.flags|=4;xi(p),L=!1}else Xi!==null&&(pm(Xi),Xi=null),L=!0;if(!L)return p.flags&65536?p:null}return p.flags&128?(p.lanes=x,p):(x=P!==null,x!==(f!==null&&f.memoizedState!==null)&&x&&(p.child.flags|=8192,p.mode&1&&(f===null||$t.current&1?jr===0&&(jr=3):Xf())),p.updateQueue!==null&&(p.flags|=4),xi(p),null);case 4:return nt(),Uf(f,p),f===null&<(p.stateNode.containerInfo),xi(p),null;case 10:return Af(p.type._context),xi(p),null;case 17:return ui(p.type)&&vs(),xi(p),null;case 19:if(Nn($t),L=p.memoizedState,L===null)return xi(p),null;if(P=(p.flags&128)!==0,I=L.rendering,I===null)if(P)qc(L,!1);else{if(jr!==0||f!==null&&f.flags&128)for(f=p.child;f!==null;){if(I=gn(f),I!==null){for(p.flags|=128,qc(L,!1),f=I.updateQueue,f!==null&&(p.updateQueue=f,p.flags|=4),p.subtreeFlags=0,f=x,x=p.child;x!==null;)P=x,L=f,P.flags&=14680066,I=P.alternate,I===null?(P.childLanes=0,P.lanes=L,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null):(P.childLanes=I.childLanes,P.lanes=I.lanes,P.child=I.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=I.memoizedProps,P.memoizedState=I.memoizedState,P.updateQueue=I.updateQueue,P.type=I.type,L=I.dependencies,P.dependencies=L===null?null:{lanes:L.lanes,firstContext:L.firstContext}),x=x.sibling;return Tn($t,$t.current&1|2),p.child}f=f.sibling}L.tail!==null&&Kn()>um&&(p.flags|=128,P=!0,qc(L,!1),p.lanes=4194304)}else{if(!P)if(f=gn(I),f!==null){if(p.flags|=128,P=!0,f=f.updateQueue,f!==null&&(p.updateQueue=f,p.flags|=4),qc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Wn)return xi(p),null}else 2*Kn()-L.renderingStartTime>um&&x!==1073741824&&(p.flags|=128,P=!0,qc(L,!1),p.lanes=4194304);L.isBackwards?(I.sibling=p.child,p.child=I):(f=L.last,f!==null?f.sibling=I:p.child=I,L.last=I)}return L.tail!==null?(p=L.tail,L.rendering=p,L.tail=p.sibling,L.renderingStartTime=Kn(),p.sibling=null,f=$t.current,Tn($t,P?f&1|2:f&1),p):(xi(p),null);case 22:case 23:return nd(),x=p.memoizedState!==null,f!==null&&f.memoizedState!==null!==x&&(p.flags|=8192),x&&p.mode&1?po&1073741824&&(xi(p),st&&p.subtreeFlags&6&&(p.flags|=8192)):xi(p),null;case 24:return null;case 25:return null}throw Error(a(156,p.tag))}function b1(f,p){switch(Q0(p),p.tag){case 1:return ui(p.type)&&vs(),f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 3:return nt(),Nn(li),Nn(Hr),r1(),f=p.flags,f&65536&&!(f&128)?(p.flags=f&-65537|128,p):null;case 5:return rn(p),null;case 13:if(Nn($t),f=p.memoizedState,f!==null&&f.dehydrated!==null){if(p.alternate===null)throw Error(a(340));Lc()}return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 19:return Nn($t),null;case 4:return nt(),null;case 10:return Af(p.type._context),null;case 22:case 23:return nd(),null;case 24:return null;default:return null}}var vl=!1,Wr=!1,kw=typeof WeakSet=="function"?WeakSet:Set,ct=null;function Yc(f,p){var x=f.ref;if(x!==null)if(typeof x=="function")try{x(null)}catch(P){Zn(f,p,P)}else x.current=null}function pa(f,p,x){try{x()}catch(P){Zn(f,p,P)}}var Xp=!1;function Lu(f,p){for(Q(f.containerInfo),ct=p;ct!==null;)if(f=ct,p=f.child,(f.subtreeFlags&1028)!==0&&p!==null)p.return=f,ct=p;else for(;ct!==null;){f=ct;try{var x=f.alternate;if(f.flags&1024)switch(f.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var P=x.memoizedProps,L=x.memoizedState,I=f.stateNode,q=I.getSnapshotBeforeUpdate(f.elementType===f.type?P:ua(f.type,P),L);I.__reactInternalSnapshotBeforeUpdate=q}break;case 3:st&&il(f.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(le){Zn(f,f.return,le)}if(p=f.sibling,p!==null){p.return=f.return,ct=p;break}ct=f.return}return x=Xp,Xp=!1,x}function wi(f,p,x){var P=p.updateQueue;if(P=P!==null?P.lastEffect:null,P!==null){var L=P=P.next;do{if((L.tag&f)===f){var I=L.destroy;L.destroy=void 0,I!==void 0&&pa(p,x,I)}L=L.next}while(L!==P)}}function Zp(f,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&f)===f){var P=x.create;x.destroy=P()}x=x.next}while(x!==p)}}function Qp(f){var p=f.ref;if(p!==null){var x=f.stateNode;switch(f.tag){case 5:f=X(x);break;default:f=x}typeof p=="function"?p(f):p.current=f}}function S1(f){var p=f.alternate;p!==null&&(f.alternate=null,S1(p)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(p=f.stateNode,p!==null&&ut(p)),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function Kc(f){return f.tag===5||f.tag===3||f.tag===4}function Cs(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||Kc(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function Jp(f,p,x){var P=f.tag;if(P===5||P===6)f=f.stateNode,p?Xe(x,f,p):At(x,f);else if(P!==4&&(f=f.child,f!==null))for(Jp(f,p,x),f=f.sibling;f!==null;)Jp(f,p,x),f=f.sibling}function x1(f,p,x){var P=f.tag;if(P===5||P===6)f=f.stateNode,p?Dn(x,f,p):Le(x,f);else if(P!==4&&(f=f.child,f!==null))for(x1(f,p,x),f=f.sibling;f!==null;)x1(f,p,x),f=f.sibling}var Nr=null,ma=!1;function ga(f,p,x){for(x=x.child;x!==null;)Ur(f,p,x),x=x.sibling}function Ur(f,p,x){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(mn,x)}catch{}switch(x.tag){case 5:Wr||Yc(x,p);case 6:if(st){var P=Nr,L=ma;Nr=null,ga(f,p,x),Nr=P,ma=L,Nr!==null&&(ma?ht(Nr,x.stateNode):xt(Nr,x.stateNode))}else ga(f,p,x);break;case 18:st&&Nr!==null&&(ma?q0(Nr,x.stateNode):G0(Nr,x.stateNode));break;case 4:st?(P=Nr,L=ma,Nr=x.stateNode.containerInfo,ma=!0,ga(f,p,x),Nr=P,ma=L):(gt&&(P=x.stateNode.containerInfo,L=Ba(P),bc(P,L)),ga(f,p,x));break;case 0:case 11:case 14:case 15:if(!Wr&&(P=x.updateQueue,P!==null&&(P=P.lastEffect,P!==null))){L=P=P.next;do{var I=L,q=I.destroy;I=I.tag,q!==void 0&&(I&2||I&4)&&pa(x,p,q),L=L.next}while(L!==P)}ga(f,p,x);break;case 1:if(!Wr&&(Yc(x,p),P=x.stateNode,typeof P.componentWillUnmount=="function"))try{P.props=x.memoizedProps,P.state=x.memoizedState,P.componentWillUnmount()}catch(le){Zn(x,p,le)}ga(f,p,x);break;case 21:ga(f,p,x);break;case 22:x.mode&1?(Wr=(P=Wr)||x.memoizedState!==null,ga(f,p,x),Wr=P):ga(f,p,x);break;default:ga(f,p,x)}}function em(f){var p=f.updateQueue;if(p!==null){f.updateQueue=null;var x=f.stateNode;x===null&&(x=f.stateNode=new kw),p.forEach(function(P){var L=T3.bind(null,f,P);x.has(P)||(x.add(P),P.then(L,L))})}}function Bo(f,p){var x=p.deletions;if(x!==null)for(var P=0;P<x.length;P++){var L=x[P];try{var I=f,q=p;if(st){var le=q;e:for(;le!==null;){switch(le.tag){case 5:Nr=le.stateNode,ma=!1;break e;case 3:Nr=le.stateNode.containerInfo,ma=!0;break e;case 4:Nr=le.stateNode.containerInfo,ma=!0;break e}le=le.return}if(Nr===null)throw Error(a(160));Ur(I,q,L),Nr=null,ma=!1}else Ur(I,q,L);var pe=L.alternate;pe!==null&&(pe.return=null),L.return=null}catch(ze){Zn(L,p,ze)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)va(p,f),p=p.sibling}function va(f,p){var x=f.alternate,P=f.flags;switch(f.tag){case 0:case 11:case 14:case 15:if(Bo(p,f),$o(f),P&4){try{wi(3,f,f.return),Zp(3,f)}catch(rt){Zn(f,f.return,rt)}try{wi(5,f,f.return)}catch(rt){Zn(f,f.return,rt)}}break;case 1:Bo(p,f),$o(f),P&512&&x!==null&&Yc(x,x.return);break;case 5:if(Bo(p,f),$o(f),P&512&&x!==null&&Yc(x,x.return),st){if(f.flags&32){var L=f.stateNode;try{Ht(L)}catch(rt){Zn(f,f.return,rt)}}if(P&4&&(L=f.stateNode,L!=null)){var I=f.memoizedProps;if(x=x!==null?x.memoizedProps:I,P=f.type,p=f.updateQueue,f.updateQueue=null,p!==null)try{tn(L,p,P,x,I,f)}catch(rt){Zn(f,f.return,rt)}}}break;case 6:if(Bo(p,f),$o(f),P&4&&st){if(f.stateNode===null)throw Error(a(162));L=f.stateNode,I=f.memoizedProps,x=x!==null?x.memoizedProps:I;try{$e(L,x,I)}catch(rt){Zn(f,f.return,rt)}}break;case 3:if(Bo(p,f),$o(f),P&4){if(st&&St&&x!==null&&x.memoizedState.isDehydrated)try{W0(p.containerInfo)}catch(rt){Zn(f,f.return,rt)}if(gt){L=p.containerInfo,I=p.pendingChildren;try{bc(L,I)}catch(rt){Zn(f,f.return,rt)}}}break;case 4:if(Bo(p,f),$o(f),P&4&>){I=f.stateNode,L=I.containerInfo,I=I.pendingChildren;try{bc(L,I)}catch(rt){Zn(f,f.return,rt)}}break;case 13:Bo(p,f),$o(f),L=f.child,L.flags&8192&&(I=L.memoizedState!==null,L.stateNode.isHidden=I,!I||L.alternate!==null&&L.alternate.memoizedState!==null||(P1=Kn())),P&4&&em(f);break;case 22:var q=x!==null&&x.memoizedState!==null;if(f.mode&1?(Wr=(x=Wr)||q,Bo(p,f),Wr=x):Bo(p,f),$o(f),P&8192){if(x=f.memoizedState!==null,(f.stateNode.isHidden=x)&&!q&&f.mode&1)for(ct=f,P=f.child;P!==null;){for(p=ct=P;ct!==null;){q=ct;var le=q.child;switch(q.tag){case 0:case 11:case 14:case 15:wi(4,q,q.return);break;case 1:Yc(q,q.return);var pe=q.stateNode;if(typeof pe.componentWillUnmount=="function"){var ze=q,ft=q.return;try{var jt=ze;pe.props=jt.memoizedProps,pe.state=jt.memoizedState,pe.componentWillUnmount()}catch(rt){Zn(ze,ft,rt)}}break;case 5:Yc(q,q.return);break;case 22:if(q.memoizedState!==null){Ci(p);continue}}le!==null?(le.return=q,ct=le):Ci(p)}P=P.sibling}if(st){e:if(P=null,st)for(p=f;;){if(p.tag===5){if(P===null){P=p;try{L=p.stateNode,x?nn(L):Mo(p.stateNode,p.memoizedProps)}catch(rt){Zn(f,f.return,rt)}}}else if(p.tag===6){if(P===null)try{I=p.stateNode,x?pr(I):Mi(I,p.memoizedProps)}catch(rt){Zn(f,f.return,rt)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===f)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break e;for(;p.sibling===null;){if(p.return===null||p.return===f)break e;P===p&&(P=null),p=p.return}P===p&&(P=null),p.sibling.return=p.return,p=p.sibling}}}break;case 19:Bo(p,f),$o(f),P&4&&em(f);break;case 21:break;default:Bo(p,f),$o(f)}}function $o(f){var p=f.flags;if(p&2){try{if(st){e:{for(var x=f.return;x!==null;){if(Kc(x)){var P=x;break e}x=x.return}throw Error(a(160))}switch(P.tag){case 5:var L=P.stateNode;P.flags&32&&(Ht(L),P.flags&=-33);var I=Cs(f);x1(f,I,L);break;case 3:case 4:var q=P.stateNode.containerInfo,le=Cs(f);Jp(f,le,q);break;default:throw Error(a(161))}}}catch(pe){Zn(f,f.return,pe)}f.flags&=-3}p&4096&&(f.flags&=-4097)}function tm(f,p,x){ct=f,yl(f)}function yl(f,p,x){for(var P=(f.mode&1)!==0;ct!==null;){var L=ct,I=L.child;if(L.tag===22&&P){var q=L.memoizedState!==null||vl;if(!q){var le=L.alternate,pe=le!==null&&le.memoizedState!==null||Wr;le=vl;var ze=Wr;if(vl=q,(Wr=pe)&&!ze)for(ct=L;ct!==null;)q=ct,pe=q.child,q.tag===22&&q.memoizedState!==null?nm(L):pe!==null?(pe.return=q,ct=pe):nm(L);for(;I!==null;)ct=I,yl(I),I=I.sibling;ct=L,vl=le,Wr=ze}w1(f)}else L.subtreeFlags&8772&&I!==null?(I.return=L,ct=I):w1(f)}}function w1(f){for(;ct!==null;){var p=ct;if(p.flags&8772){var x=p.alternate;try{if(p.flags&8772)switch(p.tag){case 0:case 11:case 15:Wr||Zp(5,p);break;case 1:var P=p.stateNode;if(p.flags&4&&!Wr)if(x===null)P.componentDidMount();else{var L=p.elementType===p.type?x.memoizedProps:ua(p.type,x.memoizedProps);P.componentDidUpdate(L,x.memoizedState,P.__reactInternalSnapshotBeforeUpdate)}var I=p.updateQueue;I!==null&&r3(p,I,P);break;case 3:var q=p.updateQueue;if(q!==null){if(x=null,p.child!==null)switch(p.child.tag){case 5:x=X(p.child.stateNode);break;case 1:x=p.child.stateNode}r3(p,q,x)}break;case 5:var le=p.stateNode;x===null&&p.flags&4&&vt(le,p.type,p.memoizedProps,p);break;case 6:break;case 4:break;case 12:break;case 13:if(St&&p.memoizedState===null){var pe=p.alternate;if(pe!==null){var ze=pe.memoizedState;if(ze!==null){var ft=ze.dehydrated;ft!==null&&U0(ft)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Wr||p.flags&512&&Qp(p)}catch(jt){Zn(p,p.return,jt)}}if(p===f){ct=null;break}if(x=p.sibling,x!==null){x.return=p.return,ct=x;break}ct=p.return}}function Ci(f){for(;ct!==null;){var p=ct;if(p===f){ct=null;break}var x=p.sibling;if(x!==null){x.return=p.return,ct=x;break}ct=p.return}}function nm(f){for(;ct!==null;){var p=ct;try{switch(p.tag){case 0:case 11:case 15:var x=p.return;try{Zp(4,p)}catch(pe){Zn(p,x,pe)}break;case 1:var P=p.stateNode;if(typeof P.componentDidMount=="function"){var L=p.return;try{P.componentDidMount()}catch(pe){Zn(p,L,pe)}}var I=p.return;try{Qp(p)}catch(pe){Zn(p,I,pe)}break;case 5:var q=p.return;try{Qp(p)}catch(pe){Zn(p,q,pe)}}}catch(pe){Zn(p,p.return,pe)}if(p===f){ct=null;break}var le=p.sibling;if(le!==null){le.return=p.return,ct=le;break}ct=p.return}}var rm=0,im=1,om=2,Xc=3,am=4;if(typeof Symbol=="function"&&Symbol.for){var _s=Symbol.for;rm=_s("selector.component"),im=_s("selector.has_pseudo_class"),om=_s("selector.role"),Xc=_s("selector.test_id"),am=_s("selector.text")}function sm(f){var p=Ae(f);if(p!=null){if(typeof p.memoizedProps["data-testname"]!="string")throw Error(a(364));return p}if(f=De(f),f===null)throw Error(a(362));return f.stateNode.current}function C1(f,p){switch(p.$$typeof){case rm:if(f.type===p.value)return!0;break;case im:e:{p=p.value,f=[f,0];for(var x=0;x<f.length;){var P=f[x++],L=f[x++],I=p[L];if(P.tag!==5||!xe(P)){for(;I!=null&&C1(P,I);)L++,I=p[L];if(L===p.length){p=!0;break e}else for(P=P.child;P!==null;)f.push(P,L),P=P.sibling}}p=!1}return p;case om:if(f.tag===5&&Ne(f.stateNode,p.value))return!0;break;case am:if((f.tag===5||f.tag===6)&&(f=Ke(f),f!==null&&0<=f.indexOf(p.value)))return!0;break;case Xc:if(f.tag===5&&(f=f.memoizedProps["data-testname"],typeof f=="string"&&f.toLowerCase()===p.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function _1(f){switch(f.$$typeof){case rm:return"<"+(D(f.value)||"Unknown")+">";case im:return":has("+(_1(f)||"")+")";case om:return'[role="'+f.value+'"]';case am:return'"'+f.value+'"';case Xc:return'[data-testname="'+f.value+'"]';default:throw Error(a(365))}}function Zc(f,p){var x=[];f=[f,0];for(var P=0;P<f.length;){var L=f[P++],I=f[P++],q=p[I];if(L.tag!==5||!xe(L)){for(;q!=null&&C1(L,q);)I++,q=p[I];if(I===p.length)x.push(L);else for(L=L.child;L!==null;)f.push(L,I),L=L.sibling}}return x}function k1(f,p){if(!ae)throw Error(a(363));f=sm(f),f=Zc(f,p),p=[],f=Array.from(f);for(var x=0;x<f.length;){var P=f[x++];if(P.tag===5)xe(P)||p.push(P.stateNode);else for(P=P.child;P!==null;)f.push(P),P=P.sibling}return p}var Ew=Math.ceil,Qc=s.ReactCurrentDispatcher,lm=s.ReactCurrentOwner,xr=s.ReactCurrentBatchConfig,Ut=0,ei=null,wr=null,Gr=0,po=0,bl=oa(0),jr=0,Jc=null,Sl=0,Au=0,E1=0,ed=null,Bi=null,P1=0,um=1/0,ks=null;function xl(){um=Kn()+500}var Gf=!1,qf=null,wl=null,td=!1,Ot=null,cm=0,Yf=0,Ou=null,Kf=-1,dm=0;function _i(){return Ut&6?Kn():Kf!==-1?Kf:Kf=Kn()}function qr(f){return f.mode&1?Ut&2&&Gr!==0?Gr&-Gr:e3.transition!==null?(dm===0&&(dm=wf()),dm):(f=Yt,f!==0?f:Mt()):1}function Fo(f,p,x,P){if(50<Yf)throw Yf=0,Ou=null,Error(a(185));$a(f,x,P),(!(Ut&2)||f!==ei)&&(f===ei&&(!(Ut&2)&&(Au|=x),jr===4&&$i(f,Gr)),hi(f,P),x===1&&Ut===0&&!(p.mode&1)&&(xl(),me&&kt()))}function hi(f,p){var x=f.callbackNode;Cc(f,p);var P=wu(f,f===ei?Gr:0);if(P===0)x!==null&&Pc(x),f.callbackNode=null,f.callbackPriority=0;else if(p=P&-P,f.callbackPriority!==p){if(x!=null&&Pc(x),p===1)f.tag===0?wn(mm.bind(null,f)):Wt(mm.bind(null,f)),_t?ln(function(){!(Ut&6)&&kt()}):Ec(_f,kt),x=null;else{switch(Ip(P)){case 1:x=_f;break;case 4:x=Dp;break;case 16:x=kf;break;case 536870912:x=Np;break;default:x=kf}x=Fi(x,fm.bind(null,f))}f.callbackPriority=p,f.callbackNode=x}}function fm(f,p){if(Kf=-1,dm=0,Ut&6)throw Error(a(327));var x=f.callbackNode;if(Mu()&&f.callbackNode!==x)return null;var P=wu(f,f===ei?Gr:0);if(P===0)return null;if(P&30||P&f.expiredLanes||p)p=rd(f,P);else{p=P;var L=Ut;Ut|=2;var I=L1();(ei!==f||Gr!==p)&&(ks=null,xl(),Cl(f,p));do try{Pw();break}catch(le){gm(f,le)}while(1);$p(),Qc.current=I,Ut=L,wr!==null?p=0:(ei=null,Gr=0,p=jr)}if(p!==0){if(p===2&&(L=_c(f),L!==0&&(P=L,p=hm(f,L))),p===1)throw x=Jc,Cl(f,0),$i(f,P),hi(f,Kn()),x;if(p===6)$i(f,P);else{if(L=f.current.alternate,!(P&30)&&!mo(L)&&(p=rd(f,P),p===2&&(I=_c(f),I!==0&&(P=I,p=hm(f,I))),p===1))throw x=Jc,Cl(f,0),$i(f,P),hi(f,Kn()),x;switch(f.finishedWork=L,f.finishedLanes=P,p){case 0:case 1:throw Error(a(345));case 2:kl(f,Bi,ks);break;case 3:if($i(f,P),(P&130023424)===P&&(p=P1+500-Kn(),10<p)){if(wu(f,0)!==0)break;if(L=f.suspendedLanes,(L&P)!==P){_i(),f.pingedLanes|=f.suspendedLanes&L;break}f.timeoutHandle=ot(kl.bind(null,f,Bi,ks),p);break}kl(f,Bi,ks);break;case 4:if($i(f,P),(P&4194240)===P)break;for(p=f.eventTimes,L=-1;0<P;){var q=31-Ii(P);I=1<<q,q=p[q],q>L&&(L=q),P&=~I}if(P=L,P=Kn()-P,P=(120>P?120:480>P?480:1080>P?1080:1920>P?1920:3e3>P?3e3:4320>P?4320:1960*Ew(P/1960))-P,10<P){f.timeoutHandle=ot(kl.bind(null,f,Bi,ks),P);break}kl(f,Bi,ks);break;case 5:kl(f,Bi,ks);break;default:throw Error(a(329))}}}return hi(f,Kn()),f.callbackNode===x?fm.bind(null,f):null}function hm(f,p){var x=ed;return f.current.memoizedState.isDehydrated&&(Cl(f,p).flags|=256),f=rd(f,p),f!==2&&(p=Bi,Bi=x,p!==null&&pm(p)),f}function pm(f){Bi===null?Bi=f:Bi.push.apply(Bi,f)}function mo(f){for(var p=f;;){if(p.flags&16384){var x=p.updateQueue;if(x!==null&&(x=x.stores,x!==null))for(var P=0;P<x.length;P++){var L=x[P],I=L.getSnapshot;L=L.value;try{if(!Y(I(),L))return!1}catch{return!1}}}if(x=p.child,p.subtreeFlags&16384&&x!==null)x.return=p,p=x;else{if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function $i(f,p){for(p&=~E1,p&=~Au,f.suspendedLanes|=p,f.pingedLanes&=~p,f=f.expirationTimes;0<p;){var x=31-Ii(p),P=1<<x;f[x]=-1,p&=~P}}function mm(f){if(Ut&6)throw Error(a(327));Mu();var p=wu(f,0);if(!(p&1))return hi(f,Kn()),null;var x=rd(f,p);if(f.tag!==0&&x===2){var P=_c(f);P!==0&&(p=P,x=hm(f,P))}if(x===1)throw x=Jc,Cl(f,0),$i(f,p),hi(f,Kn()),x;if(x===6)throw Error(a(345));return f.finishedWork=f.current.alternate,f.finishedLanes=p,kl(f,Bi,ks),hi(f,Kn()),null}function T1(f){Ot!==null&&Ot.tag===0&&!(Ut&6)&&Mu();var p=Ut;Ut|=1;var x=xr.transition,P=Yt;try{if(xr.transition=null,Yt=1,f)return f()}finally{Yt=P,xr.transition=x,Ut=p,!(Ut&6)&&kt()}}function nd(){po=bl.current,Nn(bl)}function Cl(f,p){f.finishedWork=null,f.finishedLanes=0;var x=f.timeoutHandle;if(x!==Be&&(f.timeoutHandle=Be,Ve(x)),wr!==null)for(x=wr.return;x!==null;){var P=x;switch(Q0(P),P.tag){case 1:P=P.type.childContextTypes,P!=null&&vs();break;case 3:nt(),Nn(li),Nn(Hr),r1();break;case 5:rn(P);break;case 4:nt();break;case 13:Nn($t);break;case 19:Nn($t);break;case 10:Af(P.type._context);break;case 22:case 23:nd()}x=x.return}if(ei=f,wr=f=go(f.current,null),Gr=po=p,jr=0,Jc=null,E1=Au=Sl=0,Bi=ed=null,Vr!==null){for(p=0;p<Vr.length;p++)if(x=Vr[p],P=x.interleaved,P!==null){x.interleaved=null;var L=P.next,I=x.pending;if(I!==null){var q=I.next;I.next=L,P.next=q}x.pending=P}Vr=null}return f}function gm(f,p){do{var x=wr;try{if($p(),Di.current=xs,un){for(var P=Ln.memoizedState;P!==null;){var L=P.queue;L!==null&&(L.pending=null),P=P.next}un=!1}if(Eu=0,Sr=mr=Ln=null,Nf=!1,Dc=0,lm.current=null,x===null||x.return===null){jr=1,Jc=p,wr=null;break}e:{var I=f,q=x.return,le=x,pe=p;if(p=Gr,le.flags|=32768,pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var ze=pe,ft=le,jt=ft.tag;if(!(ft.mode&1)&&(jt===0||jt===11||jt===15)){var rt=ft.alternate;rt?(ft.updateQueue=rt.updateQueue,ft.memoizedState=rt.memoizedState,ft.lanes=rt.lanes):(ft.updateQueue=null,ft.memoizedState=null)}var Gn=Vf(q);if(Gn!==null){Gn.flags&=-257,ho(Gn,q,le,I,p),Gn.mode&1&&Tu(I,ze,p),p=Gn,pe=ze;var jn=p.updateQueue;if(jn===null){var gr=new Set;gr.add(pe),p.updateQueue=gr}else jn.add(pe);break e}else{if(!(p&1)){Tu(I,ze,p),Xf();break e}pe=Error(a(426))}}else if(Wn&&le.mode&1){var ya=Vf(q);if(ya!==null){!(ya.flags&65536)&&(ya.flags|=256),ho(ya,q,le,I,p),J0(Uc(pe,le));break e}}I=pe=Uc(pe,le),jr!==4&&(jr=2),ed===null?ed=[I]:ed.push(I),I=q;do{switch(I.tag){case 3:I.flags|=65536,p&=-p,I.lanes|=p;var ge=h1(I,pe,p);ku(I,ge);break e;case 1:le=pe;var ue=I.type,Se=I.stateNode;if(!(I.flags&128)&&(typeof ue.getDerivedStateFromError=="function"||Se!==null&&typeof Se.componentDidCatch=="function"&&(wl===null||!wl.has(Se)))){I.flags|=65536,p&=-p,I.lanes|=p;var et=z(I,le,p);ku(I,et);break e}}I=I.return}while(I!==null)}A1(x)}catch(Me){p=Me,wr===x&&x!==null&&(wr=x=x.return);continue}break}while(1)}function L1(){var f=Qc.current;return Qc.current=xs,f===null?xs:f}function Xf(){(jr===0||jr===3||jr===2)&&(jr=4),ei===null||!(Sl&268435455)&&!(Au&268435455)||$i(ei,Gr)}function rd(f,p){var x=Ut;Ut|=2;var P=L1();(ei!==f||Gr!==p)&&(ks=null,Cl(f,p));do try{_l();break}catch(L){gm(f,L)}while(1);if($p(),Ut=x,Qc.current=P,wr!==null)throw Error(a(261));return ei=null,Gr=0,jr}function _l(){for(;wr!==null;)Es(wr)}function Pw(){for(;wr!==null&&!Rp();)Es(wr)}function Es(f){var p=I1(f.alternate,f,po);f.memoizedProps=f.pendingProps,p===null?A1(f):wr=p,lm.current=null}function A1(f){var p=f;do{var x=p.alternate;if(f=p.return,p.flags&32768){if(x=b1(x,p),x!==null){x.flags&=32767,wr=x;return}if(f!==null)f.flags|=32768,f.subtreeFlags=0,f.deletions=null;else{jr=6,wr=null;return}}else if(x=_w(x,p,po),x!==null){wr=x;return}if(p=p.sibling,p!==null){wr=p;return}wr=p=f}while(p!==null);jr===0&&(jr=5)}function kl(f,p,x){var P=Yt,L=xr.transition;try{xr.transition=null,Yt=1,O1(f,p,x,P)}finally{xr.transition=L,Yt=P}return null}function O1(f,p,x,P){do Mu();while(Ot!==null);if(Ut&6)throw Error(a(327));x=f.finishedWork;var L=f.finishedLanes;if(x===null)return null;if(f.finishedWork=null,f.finishedLanes=0,x===f.current)throw Error(a(177));f.callbackNode=null,f.callbackPriority=0;var I=x.lanes|x.childLanes;if(Cf(f,I),f===ei&&(wr=ei=null,Gr=0),!(x.subtreeFlags&2064)&&!(x.flags&2064)||td||(td=!0,Fi(kf,function(){return Mu(),null})),I=(x.flags&15990)!==0,x.subtreeFlags&15990||I){I=xr.transition,xr.transition=null;var q=Yt;Yt=1;var le=Ut;Ut|=4,lm.current=null,Lu(f,x),va(x,f),re(f.containerInfo),f.current=x,tm(x),la(),Ut=le,Yt=q,xr.transition=I}else f.current=x;if(td&&(td=!1,Ot=f,cm=L),I=f.pendingLanes,I===0&&(wl=null),jp(x.stateNode),hi(f,Kn()),p!==null)for(P=f.onRecoverableError,x=0;x<p.length;x++)L=p[x],P(L.value,{componentStack:L.stack,digest:L.digest});if(Gf)throw Gf=!1,f=qf,qf=null,f;return cm&1&&f.tag!==0&&Mu(),I=f.pendingLanes,I&1?f===Ou?Yf++:(Yf=0,Ou=f):Yf=0,kt(),null}function Mu(){if(Ot!==null){var f=Ip(cm),p=xr.transition,x=Yt;try{if(xr.transition=null,Yt=16>f?16:f,Ot===null)var P=!1;else{if(f=Ot,Ot=null,cm=0,Ut&6)throw Error(a(331));var L=Ut;for(Ut|=4,ct=f.current;ct!==null;){var I=ct,q=I.child;if(ct.flags&16){var le=I.deletions;if(le!==null){for(var pe=0;pe<le.length;pe++){var ze=le[pe];for(ct=ze;ct!==null;){var ft=ct;switch(ft.tag){case 0:case 11:case 15:wi(8,ft,I)}var jt=ft.child;if(jt!==null)jt.return=ft,ct=jt;else for(;ct!==null;){ft=ct;var rt=ft.sibling,Gn=ft.return;if(S1(ft),ft===ze){ct=null;break}if(rt!==null){rt.return=Gn,ct=rt;break}ct=Gn}}}var jn=I.alternate;if(jn!==null){var gr=jn.child;if(gr!==null){jn.child=null;do{var ya=gr.sibling;gr.sibling=null,gr=ya}while(gr!==null)}}ct=I}}if(I.subtreeFlags&2064&&q!==null)q.return=I,ct=q;else e:for(;ct!==null;){if(I=ct,I.flags&2048)switch(I.tag){case 0:case 11:case 15:wi(9,I,I.return)}var ge=I.sibling;if(ge!==null){ge.return=I.return,ct=ge;break e}ct=I.return}}var ue=f.current;for(ct=ue;ct!==null;){q=ct;var Se=q.child;if(q.subtreeFlags&2064&&Se!==null)Se.return=q,ct=Se;else e:for(q=ue;ct!==null;){if(le=ct,le.flags&2048)try{switch(le.tag){case 0:case 11:case 15:Zp(9,le)}}catch(Me){Zn(le,le.return,Me)}if(le===q){ct=null;break e}var et=le.sibling;if(et!==null){et.return=le.return,ct=et;break e}ct=le.return}}if(Ut=L,kt(),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(mn,f)}catch{}P=!0}return P}finally{Yt=x,xr.transition=p}}return!1}function E3(f,p,x){p=Uc(x,p),p=h1(f,p,1),f=pl(f,p,1),p=_i(),f!==null&&($a(f,1,p),hi(f,p))}function Zn(f,p,x){if(f.tag===3)E3(f,f,x);else for(;p!==null;){if(p.tag===3){E3(p,f,x);break}else if(p.tag===1){var P=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof P.componentDidCatch=="function"&&(wl===null||!wl.has(P))){f=Uc(x,f),f=z(p,f,1),p=pl(p,f,1),f=_i(),p!==null&&($a(p,1,f),hi(p,f));break}}p=p.return}}function P3(f,p,x){var P=f.pingCache;P!==null&&P.delete(p),p=_i(),f.pingedLanes|=f.suspendedLanes&x,ei===f&&(Gr&x)===x&&(jr===4||jr===3&&(Gr&130023424)===Gr&&500>Kn()-P1?Cl(f,0):E1|=x),hi(f,p)}function M1(f,p){p===0&&(f.mode&1?(p=Io,Io<<=1,!(Io&130023424)&&(Io=4194304)):p=1);var x=_i();f=ca(f,p),f!==null&&($a(f,p,x),hi(f,x))}function Tw(f){var p=f.memoizedState,x=0;p!==null&&(x=p.retryLane),M1(f,x)}function T3(f,p){var x=0;switch(f.tag){case 13:var P=f.stateNode,L=f.memoizedState;L!==null&&(x=L.retryLane);break;case 19:P=f.stateNode;break;default:throw Error(a(314))}P!==null&&P.delete(p),M1(f,x)}var I1;I1=function(f,p,x){if(f!==null)if(f.memoizedProps!==p.pendingProps||li.current)Qi=!0;else{if(!(f.lanes&x)&&!(p.flags&128))return Qi=!1,Cw(f,p,x);Qi=!!(f.flags&131072)}else Qi=!1,Wn&&p.flags&1048576&&Z0(p,Ir,p.index);switch(p.lanes=0,p.tag){case 2:var P=p.type;Wa(f,p),f=p.pendingProps;var L=ul(p,Hr.current);Oc(p,x),L=o1(null,p,P,f,L,x);var I=Nc();return p.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,ui(P)?(I=!0,ys(p)):I=!1,p.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,e1(p),L.updater=da,p.stateNode=L,L._reactInternals=p,t1(p,P,f,x),p=fa(null,p,P,!0,I,x)):(p.tag=0,Wn&&I&&Ri(p),ji(null,p,L,x),p=p.child),p;case 16:P=p.elementType;e:{switch(Wa(f,p),f=p.pendingProps,L=P._init,P=L(P._payload),p.type=P,L=p.tag=vm(P),f=ua(P,f),L){case 0:p=p1(null,p,P,f,x);break e;case 1:p=b3(null,p,P,f,x);break e;case 11:p=m3(null,p,P,f,x);break e;case 14:p=gl(null,p,P,ua(P.type,f),x);break e}throw Error(a(306,P,""))}return p;case 0:return P=p.type,L=p.pendingProps,L=p.elementType===P?L:ua(P,L),p1(f,p,P,L,x);case 1:return P=p.type,L=p.pendingProps,L=p.elementType===P?L:ua(P,L),b3(f,p,P,L,x);case 3:e:{if(S3(p),f===null)throw Error(a(387));P=p.pendingProps,I=p.memoizedState,L=I.element,n3(f,p),zp(p,P,null,x);var q=p.memoizedState;if(P=q.element,St&&I.isDehydrated)if(I={element:P,isDehydrated:!1,cache:q.cache,pendingSuspenseBoundaries:q.pendingSuspenseBoundaries,transitions:q.transitions},p.updateQueue.baseState=I,p.memoizedState=I,p.flags&256){L=Uc(Error(a(423)),p),p=x3(f,p,P,x,L);break e}else if(P!==L){L=Uc(Error(a(424)),p),p=x3(f,p,P,x,L);break e}else for(St&&(Do=$0(p.stateNode.containerInfo),Xn=p,Wn=!0,Xi=null,No=!1),x=s3(p,null,P,x),p.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling;else{if(Lc(),P===L){p=ws(f,p,x);break e}ji(f,p,P,x)}p=p.child}return p;case 5:return It(p),f===null&&Ef(p),P=p.type,L=p.pendingProps,I=f!==null?f.memoizedProps:null,q=L.children,He(P,L)?q=null:I!==null&&He(P,I)&&(p.flags|=32),y3(f,p),ji(f,p,q,x),p.child;case 6:return f===null&&Ef(p),null;case 13:return w3(f,p,x);case 4:return ye(p,p.stateNode.containerInfo),P=p.pendingProps,f===null?p.child=Ic(p,null,P,x):ji(f,p,P,x),p.child;case 11:return P=p.type,L=p.pendingProps,L=p.elementType===P?L:ua(P,L),m3(f,p,P,L,x);case 7:return ji(f,p,p.pendingProps,x),p.child;case 8:return ji(f,p,p.pendingProps.children,x),p.child;case 12:return ji(f,p,p.pendingProps.children,x),p.child;case 10:e:{if(P=p.type._context,L=p.pendingProps,I=p.memoizedProps,q=L.value,t3(p,P,q),I!==null)if(Y(I.value,q)){if(I.children===L.children&&!li.current){p=ws(f,p,x);break e}}else for(I=p.child,I!==null&&(I.return=p);I!==null;){var le=I.dependencies;if(le!==null){q=I.child;for(var pe=le.firstContext;pe!==null;){if(pe.context===P){if(I.tag===1){pe=Ss(-1,x&-x),pe.tag=2;var ze=I.updateQueue;if(ze!==null){ze=ze.shared;var ft=ze.pending;ft===null?pe.next=pe:(pe.next=ft.next,ft.next=pe),ze.pending=pe}}I.lanes|=x,pe=I.alternate,pe!==null&&(pe.lanes|=x),Of(I.return,x,p),le.lanes|=x;break}pe=pe.next}}else if(I.tag===10)q=I.type===p.type?null:I.child;else if(I.tag===18){if(q=I.return,q===null)throw Error(a(341));q.lanes|=x,le=q.alternate,le!==null&&(le.lanes|=x),Of(q,x,p),q=I.sibling}else q=I.child;if(q!==null)q.return=I;else for(q=I;q!==null;){if(q===p){q=null;break}if(I=q.sibling,I!==null){I.return=q.return,q=I;break}q=q.return}I=q}ji(f,p,L.children,x),p=p.child}return p;case 9:return L=p.type,P=p.pendingProps.children,Oc(p,x),L=fo(L),P=P(L),p.flags|=1,ji(f,p,P,x),p.child;case 14:return P=p.type,L=ua(P,p.pendingProps),L=ua(P.type,L),gl(f,p,P,L,x);case 15:return g3(f,p,p.type,p.pendingProps,x);case 17:return P=p.type,L=p.pendingProps,L=p.elementType===P?L:ua(P,L),Wa(f,p),p.tag=1,ui(P)?(f=!0,ys(p)):f=!1,Oc(p,x),i3(p,P,L),t1(p,P,L,x),fa(null,p,P,!0,f,x);case 19:return _3(f,p,x);case 22:return v3(f,p,x)}throw Error(a(156,p.tag))};function Fi(f,p){return Ec(f,p)}function Ua(f,p,x,P){this.tag=f,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=P,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zo(f,p,x,P){return new Ua(f,p,x,P)}function R1(f){return f=f.prototype,!(!f||!f.isReactComponent)}function vm(f){if(typeof f=="function")return R1(f)?1:0;if(f!=null){if(f=f.$$typeof,f===S)return 11;if(f===k)return 14}return 2}function go(f,p){var x=f.alternate;return x===null?(x=zo(f.tag,p,f.key,f.mode),x.elementType=f.elementType,x.type=f.type,x.stateNode=f.stateNode,x.alternate=f,f.alternate=x):(x.pendingProps=p,x.type=f.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=f.flags&14680064,x.childLanes=f.childLanes,x.lanes=f.lanes,x.child=f.child,x.memoizedProps=f.memoizedProps,x.memoizedState=f.memoizedState,x.updateQueue=f.updateQueue,p=f.dependencies,x.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},x.sibling=f.sibling,x.index=f.index,x.ref=f.ref,x}function Zf(f,p,x,P,L,I){var q=2;if(P=f,typeof f=="function")R1(f)&&(q=1);else if(typeof f=="string")q=5;else e:switch(f){case d:return El(x.children,L,I,p);case h:q=8,L|=8;break;case g:return f=zo(12,x,p,L|2),f.elementType=g,f.lanes=I,f;case E:return f=zo(13,x,p,L),f.elementType=E,f.lanes=I,f;case _:return f=zo(19,x,p,L),f.elementType=_,f.lanes=I,f;case A:return ym(x,L,I,p);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case v:q=10;break e;case b:q=9;break e;case S:q=11;break e;case k:q=14;break e;case T:q=16,P=null;break e}throw Error(a(130,f==null?f:typeof f,""))}return p=zo(q,x,p,L),p.elementType=f,p.type=P,p.lanes=I,p}function El(f,p,x,P){return f=zo(7,f,P,p),f.lanes=x,f}function ym(f,p,x,P){return f=zo(22,f,P,p),f.elementType=A,f.lanes=x,f.stateNode={isHidden:!1},f}function bm(f,p,x){return f=zo(6,f,null,p),f.lanes=x,f}function Pl(f,p,x){return p=zo(4,f.children!==null?f.children:[],f.key,p),p.lanes=x,p.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},p}function Qf(f,p,x,P,L){this.tag=p,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Be,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kc(0),this.expirationTimes=kc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kc(0),this.identifierPrefix=P,this.onRecoverableError=L,St&&(this.mutableSourceEagerHydrationData=null)}function L3(f,p,x,P,L,I,q,le,pe){return f=new Qf(f,p,x,le,pe),p===1?(p=1,I===!0&&(p|=8)):p=0,I=zo(3,null,null,p),f.current=I,I.stateNode=f,I.memoizedState={element:P,isDehydrated:x,cache:null,transitions:null,pendingSuspenseBoundaries:null},e1(I),f}function D1(f){if(!f)return aa;f=f._reactInternals;e:{if(F(f)!==f||f.tag!==1)throw Error(a(170));var p=f;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(ui(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(a(171))}if(f.tag===1){var x=f.type;if(ui(x))return xu(f,x,p)}return p}function N1(f){var p=f._reactInternals;if(p===void 0)throw typeof f.render=="function"?Error(a(188)):(f=Object.keys(f).join(","),Error(a(268,f)));return f=te(p),f===null?null:f.stateNode}function Jf(f,p){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var x=f.retryLane;f.retryLane=x!==0&&x<p?x:p}}function eh(f,p){Jf(f,p),(f=f.alternate)&&Jf(f,p)}function Sm(f){return f=te(f),f===null?null:f.stateNode}function j1(){return null}return n.attemptContinuousHydration=function(f){if(f.tag===13){var p=ca(f,134217728);if(p!==null){var x=_i();Fo(p,f,134217728,x)}eh(f,134217728)}},n.attemptDiscreteHydration=function(f){if(f.tag===13){var p=ca(f,1);if(p!==null){var x=_i();Fo(p,f,1,x)}eh(f,1)}},n.attemptHydrationAtCurrentPriority=function(f){if(f.tag===13){var p=qr(f),x=ca(f,p);if(x!==null){var P=_i();Fo(x,f,p,P)}eh(f,p)}},n.attemptSynchronousHydration=function(f){switch(f.tag){case 3:var p=f.stateNode;if(p.current.memoizedState.isDehydrated){var x=dl(p.pendingLanes);x!==0&&(Cu(p,x|1),hi(p,Kn()),!(Ut&6)&&(xl(),kt()))}break;case 13:T1(function(){var P=ca(f,1);if(P!==null){var L=_i();Fo(P,f,1,L)}}),eh(f,1)}},n.batchedUpdates=function(f,p){var x=Ut;Ut|=1;try{return f(p)}finally{Ut=x,Ut===0&&(xl(),me&&kt())}},n.createComponentSelector=function(f){return{$$typeof:rm,value:f}},n.createContainer=function(f,p,x,P,L,I,q){return L3(f,p,!1,null,x,P,L,I,q)},n.createHasPseudoClassSelector=function(f){return{$$typeof:im,value:f}},n.createHydrationContainer=function(f,p,x,P,L,I,q,le,pe){return f=L3(x,P,!0,f,L,I,q,le,pe),f.context=D1(null),x=f.current,P=_i(),L=qr(x),I=Ss(P,L),I.callback=p??null,pl(x,I,L),f.current.lanes=L,$a(f,L,P),hi(f,P),f},n.createPortal=function(f,p,x){var P=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:P==null?null:""+P,children:f,containerInfo:p,implementation:x}},n.createRoleSelector=function(f){return{$$typeof:om,value:f}},n.createTestNameSelector=function(f){return{$$typeof:Xc,value:f}},n.createTextSelector=function(f){return{$$typeof:am,value:f}},n.deferredUpdates=function(f){var p=Yt,x=xr.transition;try{return xr.transition=null,Yt=16,f()}finally{Yt=p,xr.transition=x}},n.discreteUpdates=function(f,p,x,P,L){var I=Yt,q=xr.transition;try{return xr.transition=null,Yt=1,f(p,x,P,L)}finally{Yt=I,xr.transition=q,Ut===0&&xl()}},n.findAllNodes=k1,n.findBoundingRects=function(f,p){if(!ae)throw Error(a(363));p=k1(f,p),f=[];for(var x=0;x<p.length;x++)f.push(Ye(p[x]));for(p=f.length-1;0<p;p--){x=f[p];for(var P=x.x,L=P+x.width,I=x.y,q=I+x.height,le=p-1;0<=le;le--)if(p!==le){var pe=f[le],ze=pe.x,ft=ze+pe.width,jt=pe.y,rt=jt+pe.height;if(P>=ze&&I>=jt&&L<=ft&&q<=rt){f.splice(p,1);break}else if(P!==ze||x.width!==pe.width||rt<I||jt>q){if(!(I!==jt||x.height!==pe.height||ft<P||ze>L)){ze>P&&(pe.width+=ze-P,pe.x=P),ft<L&&(pe.width=L-ze),f.splice(p,1);break}}else{jt>I&&(pe.height+=jt-I,pe.y=I),rt<q&&(pe.height=q-jt),f.splice(p,1);break}}}return f},n.findHostInstance=N1,n.findHostInstanceWithNoPortals=function(f){return f=K(f),f=f!==null?$(f):null,f===null?null:f.stateNode},n.findHostInstanceWithWarning=function(f){return N1(f)},n.flushControlled=function(f){var p=Ut;Ut|=1;var x=xr.transition,P=Yt;try{xr.transition=null,Yt=1,f()}finally{Yt=P,xr.transition=x,Ut=p,Ut===0&&(xl(),kt())}},n.flushPassiveEffects=Mu,n.flushSync=T1,n.focusWithin=function(f,p){if(!ae)throw Error(a(363));for(f=sm(f),p=Zc(f,p),p=Array.from(p),f=0;f<p.length;){var x=p[f++];if(!xe(x)){if(x.tag===5&&Ct(x.stateNode))return!0;for(x=x.child;x!==null;)p.push(x),x=x.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Yt},n.getFindAllNodesFailureDescription=function(f,p){if(!ae)throw Error(a(363));var x=0,P=[];f=[sm(f),0];for(var L=0;L<f.length;){var I=f[L++],q=f[L++],le=p[q];if((I.tag!==5||!xe(I))&&(C1(I,le)&&(P.push(_1(le)),q++,q>x&&(x=q)),q<p.length))for(I=I.child;I!==null;)f.push(I,q),I=I.sibling}if(x<p.length){for(f=[];x<p.length;x++)f.push(_1(p[x]));return`findAllNodes was able to match part of the selector:
|
||
`+(P.join(" > ")+`
|
||
|
||
No matching component was found for:
|
||
`)+f.join(" > ")}return null},n.getPublicRootInstance=function(f){if(f=f.current,!f.child)return null;switch(f.child.tag){case 5:return X(f.child.stateNode);default:return f.child.stateNode}},n.injectIntoDevTools=function(f){if(f={bundleType:f.bundleType,version:f.version,rendererPackageName:f.rendererPackageName,rendererConfig:f.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:Sm,findFiberByHostInstance:f.findFiberByHostInstance||j1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")f=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)f=!0;else{try{mn=p.inject(f),Kt=p}catch{}f=!!p.checkDCE}}return f},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(f,p,x,P){if(!ae)throw Error(a(363));f=k1(f,p);var L=Dt(f,x,P).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(f,p){var x=p._getVersion;x=x(p._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[p,x]:f.mutableSourceEagerHydrationData.push(p,x)},n.runWithPriority=function(f,p){var x=Yt;try{return Yt=f,p()}finally{Yt=x}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(f,p,x,P){var L=p.current,I=_i(),q=qr(L);return x=D1(x),p.context===null?p.context=x:p.pendingContext=x,p=Ss(I,q),p.payload={element:f},P=P===void 0?null:P,P!==null&&(p.callback=P),f=pl(L,p,q),f!==null&&(Fo(f,L,q,I),Fp(f,L,q)),q},n};(function(e){e.exports=pMe})(hMe);const mMe=b8(r8);var fS={},gMe={get exports(){return fS},set exports(e){fS=e}},wp={};/**
|
||
* @license React
|
||
* react-reconciler-constants.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/wp.ConcurrentRoot=1;wp.ContinuousEventPriority=4;wp.DefaultEventPriority=16;wp.DiscreteEventPriority=1;wp.IdleEventPriority=536870912;wp.LegacyRoot=0;(function(e){e.exports=wp})(gMe);const pN={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let mN=!1,gN=!1;const pT=".react-konva-event",vMe=`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
|
||
`,yMe=`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
|
||
`,bMe={};function dw(e,t,n=bMe){if(!mN&&"zIndex"in t&&(console.warn(yMe),mN=!0),!gN&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(vMe),gN=!0)}for(var o in n)if(!pN[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 d=t._useStrictMode,h={},g=!1;const v={};for(var o in t)if(!pN[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]||d&&t[o]!==e.getAttr(o))&&(g=!0,h[o]=t[o])}g&&(e.setAttrs(h),mf(e));for(var l in v)e.on(l+pT,v[l])}function mf(e){if(!mt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const JY={},SMe={};tp.Node.prototype._applyProps=dw;function xMe(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),mf(e)}function wMe(e,t,n){let r=tp[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=tp.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 dw(l,o),l}function CMe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function _Me(e,t,n){return!1}function kMe(e){return e}function EMe(){return null}function PMe(){return null}function TMe(e,t,n,r){return SMe}function LMe(){}function AMe(e){}function OMe(e,t){return!1}function MMe(){return JY}function IMe(){return JY}const RMe=setTimeout,DMe=clearTimeout,NMe=-1;function jMe(e,t){return!1}const BMe=!1,$Me=!0,FMe=!0;function zMe(e,t){t.parent===e?t.moveToTop():e.add(t),mf(e)}function HMe(e,t){t.parent===e?t.moveToTop():e.add(t),mf(e)}function eK(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),mf(e)}function VMe(e,t,n){eK(e,t,n)}function WMe(e,t){t.destroy(),t.off(pT),mf(e)}function UMe(e,t){t.destroy(),t.off(pT),mf(e)}function GMe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function qMe(e,t,n){}function YMe(e,t,n,r,i){dw(e,i,r)}function KMe(e){e.hide(),mf(e)}function XMe(e){}function ZMe(e,t){(t.visible==null||t.visible)&&e.show()}function QMe(e,t){}function JMe(e){}function eIe(){}const tIe=()=>fS.DefaultEventPriority,nIe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:zMe,appendChildToContainer:HMe,appendInitialChild:xMe,cancelTimeout:DMe,clearContainer:JMe,commitMount:qMe,commitTextUpdate:GMe,commitUpdate:YMe,createInstance:wMe,createTextInstance:CMe,detachDeletedInstance:eIe,finalizeInitialChildren:_Me,getChildHostContext:IMe,getCurrentEventPriority:tIe,getPublicInstance:kMe,getRootHostContext:MMe,hideInstance:KMe,hideTextInstance:XMe,idlePriority:Bh.unstable_IdlePriority,insertBefore:eK,insertInContainerBefore:VMe,isPrimaryRenderer:BMe,noTimeout:NMe,now:Bh.unstable_now,prepareForCommit:EMe,preparePortalMount:PMe,prepareUpdate:TMe,removeChild:WMe,removeChildFromContainer:UMe,resetAfterCommit:LMe,resetTextContent:AMe,run:Bh.unstable_runWithPriority,scheduleTimeout:RMe,shouldDeprioritizeSubtree:OMe,shouldSetTextContent:jMe,supportsMutation:FMe,unhideInstance:ZMe,unhideTextInstance:QMe,warnsIfNotActing:$Me},Symbol.toStringTag,{value:"Module"}));var rIe=Object.defineProperty,iIe=Object.defineProperties,oIe=Object.getOwnPropertyDescriptors,vN=Object.getOwnPropertySymbols,aIe=Object.prototype.hasOwnProperty,sIe=Object.prototype.propertyIsEnumerable,yN=(e,t,n)=>t in e?rIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bN=(e,t)=>{for(var n in t||(t={}))aIe.call(t,n)&&yN(e,n,t[n]);if(vN)for(var n of vN(t))sIe.call(t,n)&&yN(e,n,t[n]);return e},lIe=(e,t)=>iIe(e,oIe(t));function mT(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=mT(r,t,n);if(i)return i;r=t?null:r.sibling}}function tK(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const gT=tK(w.createContext(null));class nK extends w.Component{render(){return w.createElement(gT.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:uIe,ReactCurrentDispatcher:cIe}=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function dIe(){const e=w.useContext(gT);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=w.useId();return w.useMemo(()=>{var r;return(r=uIe.current)!=null?r:mT(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const pv=[],SN=new WeakMap;function fIe(){var e;const t=dIe();pv.splice(0,pv.length),mT(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==gT&&pv.push(tK(i))});for(const n of pv){const r=(e=cIe.current)==null?void 0:e.readContext(n);SN.set(n,r)}return w.useMemo(()=>pv.reduce((n,r)=>i=>w.createElement(n,null,w.createElement(r.Provider,lIe(bN({},i),{value:SN.get(r)}))),n=>w.createElement(nK,bN({},n))),[])}function hIe(e){const t=N.useRef();return N.useLayoutEffect(()=>{t.current=e}),t.current}const pIe=e=>{const t=N.useRef(),n=N.useRef(),r=N.useRef(),i=hIe(e),o=fIe(),a=s=>{const{forwardedRef:l}=e;l&&(typeof l=="function"?l(s):l.current=s)};return N.useLayoutEffect(()=>(n.current=new tp.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Rv.createContainer(n.current,fS.LegacyRoot,!1,null),Rv.updateContainer(N.createElement(o,{},e.children),r.current),()=>{tp.isBrowser&&(a(null),Rv.updateContainer(null,r.current,null),n.current.destroy())}),[]),N.useLayoutEffect(()=>{a(n.current),dw(n.current,e,i),Rv.updateContainer(N.createElement(o,{},e.children),r.current,null)}),N.createElement("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},mv="Layer",lc="Group",uc="Rect",sh="Circle",hS="Line",rK="Image",mIe="Transformer",Rv=mMe(nIe);Rv.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:N.version,rendererPackageName:"react-konva"});const gIe=N.forwardRef((e,t)=>N.createElement(nK,{},N.createElement(pIe,{...e,forwardedRef:t}))),vIe=at([sn,Mr],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),yIe=()=>{const e=Ie(),{tool:t,isStaging:n,isMovingBoundingBox:r}=he(vIe);return{handleDragStart:w.useCallback(()=>{(t==="move"||n)&&!r&&e(K5(!0))},[e,r,n,t]),handleDragMove:w.useCallback(i=>{if(!((t==="move"||n)&&!r))return;const o={x:i.target.x(),y:i.target.y()};e(SU(o))},[e,r,n,t]),handleDragEnd:w.useCallback(()=>{(t==="move"||n)&&!r&&e(K5(!1))},[e,r,n,t])}},bIe=at([sn,Or,Mr],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isMaskEnabled:s,shouldSnapToGrid:l}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:l}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),SIe=()=>{const e=Ie(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:i,isMaskEnabled:o,shouldSnapToGrid:a}=he(bIe),s=w.useRef(null),l=cq(),u=()=>e(mP());Je(["shift+c"],()=>{u()},{enabled:()=>!i,preventDefault:!0},[]);const d=()=>e(By(!o));Je(["h"],()=>{d()},{enabled:()=>!i,preventDefault:!0},[o]),Je(["n"],()=>{e(Z5(!a))},{enabled:!0,preventDefault:!0},[a]),Je("esc",()=>{e(vwe())},{enabled:()=>!0,preventDefault:!0}),Je("shift+h",()=>{e(_we(!n))},{enabled:()=>!i,preventDefault:!0},[t,n]),Je(["space"],h=>{h.repeat||(l==null||l.container().focus(),r!=="move"&&(s.current=r,e(nu("move"))),r==="move"&&s.current&&s.current!=="move"&&(e(nu(s.current)),s.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,s])},vT=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},iK=()=>{const e=Ie(),t=el(),n=cq();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Hm.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(xwe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(cwe())}}},xIe=at([Or,sn,Mr],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),wIe=e=>{const t=Ie(),{tool:n,isStaging:r}=he(xIe),{commitColorUnderCursor:i}=iK();return w.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(K5(!0));return}if(n==="colorPicker"){i();return}const a=vT(e.current);a&&(o.evt.preventDefault(),t(dU(!0)),t(uwe([a.x,a.y])))},[e,n,r,t,i])},CIe=at([Or,sn,Mr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),_Ie=(e,t,n)=>{const r=Ie(),{isDrawing:i,tool:o,isStaging:a}=he(CIe),{updateColorUnderCursor:s}=iK();return w.useCallback(()=>{if(!e.current)return;const l=vT(e.current);if(l){if(r(wwe(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(lU([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},kIe=()=>{const e=Ie();return w.useCallback(()=>{e(hwe())},[e])},EIe=at([Or,sn,Mr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),PIe=(e,t)=>{const n=Ie(),{tool:r,isDrawing:i,isStaging:o}=he(EIe);return w.useCallback(()=>{if(r==="move"||o){n(K5(!1));return}if(!t.current&&i&&e.current){const a=vT(e.current);if(!a)return;n(lU([a.x,a.y]))}else t.current=!1;n(dU(!1))},[t,n,i,o,e,r])},TIe=at([sn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),LIe=e=>{const t=Ie(),{isMoveStageKeyHeld:n,stageScale:r}=he(TIe);return w.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=ke.clamp(r*Qxe**s,Jxe,ewe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(Ewe(l)),t(SU(u))},[e,n,r,t])},AIe=at(sn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a,stageDimensions:r,stageScale:i}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),OIe=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=he(AIe);return y.jsxs(lc,{children:[y.jsx(uc,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),y.jsx(uc,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},MIe=at([sn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),IIe={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},RIe=()=>{const{colorMode:e}=fy(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=he(MIe),[i,o]=w.useState([]),a=w.useCallback(s=>s/t,[t]);return w.useLayoutEffect(()=>{const s=IIe[e],{width:l,height:u}=r,{x:d,y:h}=n,g={x1:0,y1:0,x2:l,y2:u,offset:{x:a(d),y:a(h)}},v={x:Math.ceil(a(d)/64)*64,y:Math.ceil(a(h)/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(g.x1,b.x1),y1:Math.min(g.y1,b.y1),x2:Math.max(g.x2,b.x2),y2:Math.max(g.y2,b.y2)},_=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(_/64)+1,A=Math.round(k/64)+1,M=ke.range(0,T).map(D=>y.jsx(hS,{x:E.x1+D*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${D}`)),R=ke.range(0,A).map(D=>y.jsx(hS,{x:E.x1,y:E.y1+D*64,points:[0,0,_,0],stroke:s,strokeWidth:1},`y_${D}`));o(M.concat(R))},[t,n,r,e,a]),y.jsx(lc,{children:i})},DIe=at([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),NIe=e=>{const{...t}=e,n=he(DIe),[r,i]=w.useState(null);if(w.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?y.jsx(rK,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Hh=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},jIe=at(sn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:Hh(t)}}),xN=e=>`data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||
<g transform="matrix(0.5,0,0,0.5,0,0)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,10)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,15)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,20)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,25)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,30)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-10)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-15)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-20)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-25)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-30)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
</svg>`.replaceAll("black",e),BIe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=he(jIe),[a,s]=w.useState(null),[l,u]=w.useState(0),d=w.useRef(null),h=w.useCallback(()=>{u(l+1),setTimeout(h,500)},[l]);return w.useEffect(()=>{if(a)return;const g=new Image;g.onload=()=>{s(g)},g.src=xN(n)},[a,n]),w.useEffect(()=>{a&&(a.src=xN(n))},[a,n]),w.useEffect(()=>{const g=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(g)},[]),!a||!ke.isNumber(r.x)||!ke.isNumber(r.y)||!ke.isNumber(o)||!ke.isNumber(i.width)||!ke.isNumber(i.height)?null:y.jsx(uc,{ref:d,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:ke.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},$Ie=at([sn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),FIe=e=>{const{...t}=e,{objects:n}=he($Ie);return y.jsx(lc,{listening:!1,...t,children:n.filter(pP).map((r,i)=>y.jsx(hS,{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))})};var lh=w,zIe=function(t,n,r){const i=lh.useRef("loading"),o=lh.useRef(),[a,s]=lh.useState(0),l=lh.useRef(),u=lh.useRef(),d=lh.useRef();return(l.current!==t||u.current!==n||d.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,d.current=r),lh.useLayoutEffect(function(){if(!t)return;var h=document.createElement("img");function g(){i.current="loaded",o.current=h,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return h.addEventListener("load",g),h.addEventListener("error",v),n&&(h.crossOrigin=n),r&&(h.referrerpolicy=r),h.src=t,function(){h.removeEventListener("load",g),h.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const oK=e=>{const{url:t,x:n,y:r}=e,[i]=zIe(t);return y.jsx(rK,{x:n,y:r,image:i,listening:!1})},HIe=at([sn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),VIe=()=>{const{objects:e}=he(HIe);return e?y.jsx(lc,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(Y5(t))return y.jsx(oK,{x:t.x,y:t.y,url:t.image.url},n);if(rwe(t)){const r=y.jsx(hS,{points:t.points,stroke:t.color?Hh(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?y.jsx(lc,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(iwe(t))return y.jsx(uc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Hh(t.color)},n);if(owe(t))return y.jsx(uc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},WIe=at([sn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i,boundingBoxCoordinates:{x:o,y:a},boundingBoxDimensions:{width:s,height:l}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),UIe=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}=he(WIe);return y.jsxs(lc,{...t,children:[r&&n&&y.jsx(oK,{url:n.image.url,x:o,y:a}),i&&y.jsxs(lc,{children:[y.jsx(uc,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),y.jsx(uc,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},GIe=at([sn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),qIe=()=>{const e=Ie(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=he(GIe),{t:o}=We(),a=w.useCallback(()=>{e(XI(!0))},[e]),s=w.useCallback(()=>{e(XI(!1))},[e]);Je(["left"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),Je(["right"],()=>{u()},{enabled:()=>!0,preventDefault:!0}),Je(["enter"],()=>{d()},{enabled:()=>!0,preventDefault:!0});const l=()=>e(mwe()),u=()=>e(pwe()),d=()=>e(dwe());return r?y.jsx(Ge,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:a,onMouseOut:s,children:y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Ze,{tooltip:`${o("unifiedcanvas:previous")} (Left)`,"aria-label":`${o("unifiedcanvas:previous")} (Left)`,icon:y.jsx(qEe,{}),onClick:l,"data-selected":!0,isDisabled:t}),y.jsx(Ze,{tooltip:`${o("unifiedcanvas:next")} (Right)`,"aria-label":`${o("unifiedcanvas:next")} (Right)`,icon:y.jsx(YEe,{}),onClick:u,"data-selected":!0,isDisabled:n}),y.jsx(Ze,{tooltip:`${o("unifiedcanvas:accept")} (Enter)`,"aria-label":`${o("unifiedcanvas:accept")} (Enter)`,icon:y.jsx(FP,{}),onClick:d,"data-selected":!0}),y.jsx(Ze,{tooltip:o("unifiedcanvas:showHide"),"aria-label":o("unifiedcanvas:showHide"),"data-alert":!i,icon:i?y.jsx(tPe,{}):y.jsx(ePe,{}),onClick:()=>e(kwe(!i)),"data-selected":!0}),y.jsx(Ze,{tooltip:o("unifiedcanvas:saveToGallery"),"aria-label":o("unifiedcanvas:saveToGallery"),icon:y.jsx(HP,{}),onClick:()=>e(R8e(r.image.url)),"data-selected":!0}),y.jsx(Ze,{tooltip:o("unifiedcanvas:discardAll"),"aria-label":o("unifiedcanvas:discardAll"),icon:y.jsx(Wy,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(fwe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},pg=e=>Math.round(e*100)/100,YIe=at([sn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${pg(n)}, ${pg(r)})`}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function KIe(){const{cursorCoordinatesString:e}=he(YIe),{t}=We();return y.jsx("div",{children:`${t("unifiedcanvas:cursorPosition")}: ${e}`})}const XIe=at([sn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:d},stageScale:h,shouldShowCanvasDebugInfo:g,layer:v,boundingBoxScaleMethod:b,shouldPreserveMaskedArea:S}=e;let E="inherit";return(b==="none"&&(o<512||a<512)||b==="manual"&&s*l<512*512)&&(E="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:E,boundingBoxCoordinatesString:`(${pg(u)}, ${pg(d)})`,boundingBoxDimensionsString:`${o}×${a}`,scaledBoundingBoxDimensionsString:`${s}×${l}`,canvasCoordinatesString:`${pg(r)}×${pg(i)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(h*100),shouldShowCanvasDebugInfo:g,shouldShowBoundingBox:b!=="auto",shouldShowScaledBoundingBox:b!=="none",shouldPreserveMaskedArea:S}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),ZIe=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:d,shouldShowBoundingBox:h,shouldPreserveMaskedArea:g}=he(XIe),{t:v}=We();return y.jsxs("div",{className:"canvas-status-text",children:[y.jsx("div",{style:{color:e},children:`${v("unifiedcanvas:activeLayer")}: ${t}`}),y.jsx("div",{children:`${v("unifiedcanvas:canvasScale")}: ${u}%`}),g&&y.jsx("div",{style:{color:"var(--status-working-color)"},children:"Preserve Masked Area: On"}),h&&y.jsx("div",{style:{color:n},children:`${v("unifiedcanvas:boundingBox")}: ${i}`}),a&&y.jsx("div",{style:{color:n},children:`${v("unifiedcanvas:scaledBoundingBox")}: ${o}`}),d&&y.jsxs(y.Fragment,{children:[y.jsx("div",{children:`${v("unifiedcanvas:boundingBoxPosition")}: ${r}`}),y.jsx("div",{children:`${v("unifiedcanvas:canvasDimensions")}: ${l}`}),y.jsx("div",{children:`${v("unifiedcanvas:canvasPosition")}: ${s}`}),y.jsx(KIe,{})]})]})},QIe=at(sn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:i,isTransformingBoundingBox:o,isMovingBoundingBox:a,tool:s,shouldSnapToGrid:l}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:i,isMovingBoundingBox:a,isTransformingBoundingBox:o,stageScale:r,shouldSnapToGrid:l,tool:s,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),JIe=e=>{const{...t}=e,n=Ie(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:s,stageScale:l,shouldSnapToGrid:u,tool:d,hitStrokeWidth:h}=he(QIe),g=w.useRef(null),v=w.useRef(null),[b,S]=w.useState(!1);w.useEffect(()=>{var te;!g.current||!v.current||(g.current.nodes([v.current]),(te=g.current.getLayer())==null||te.batchDraw())},[]);const E=64*l,_=w.useCallback(te=>{if(!u){n(wC({x:Math.floor(te.target.x()),y:Math.floor(te.target.y())}));return}const G=te.target.x(),$=te.target.y(),U=ql(G,64),X=ql($,64);te.target.x(U),te.target.y(X),n(wC({x:U,y:X}))},[n,u]),k=w.useCallback(()=>{if(!v.current)return;const te=v.current,G=te.scaleX(),$=te.scaleY(),U=Math.round(te.width()*G),X=Math.round(te.height()*$),Z=Math.round(te.x()),W=Math.round(te.y());n(Pv({width:U,height:X})),n(wC({x:u?Pd(Z,64):Z,y:u?Pd(W,64):W})),te.scaleX(1),te.scaleY(1)},[n,u]),T=w.useCallback((te,G,$)=>{const U=te.x%E,X=te.y%E;return{x:Pd(G.x,E)+U,y:Pd(G.y,E)+X}},[E]),A=()=>{n(_C(!0))},M=()=>{n(_C(!1)),n(CC(!1)),n(Eb(!1)),S(!1)},R=()=>{n(CC(!0))},D=()=>{n(_C(!1)),n(CC(!1)),n(Eb(!1)),S(!1)},j=()=>{S(!0)},F=()=>{!s&&!a&&S(!1)},H=()=>{n(Eb(!0))},K=()=>{n(Eb(!1))};return y.jsxs(lc,{...t,children:[y.jsx(uc,{height:i.height,width:i.width,x:r.x,y:r.y,onMouseEnter:H,onMouseOver:H,onMouseLeave:K,onMouseOut:K}),y.jsx(uc,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:h,listening:!o&&d==="move",onDragStart:R,onDragEnd:D,onDragMove:_,onMouseDown:R,onMouseOut:F,onMouseOver:j,onMouseEnter:j,onMouseUp:D,onTransform:k,onTransformEnd:M,ref:v,stroke:b?"rgba(255,255,255,0.7)":"white",strokeWidth:(b?8:1)/l,width:i.width,x:r.x,y:r.y}),y.jsx(mIe,{anchorCornerRadius:3,anchorDragBoundFunc:T,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:d==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&d==="move",onDragStart:R,onDragEnd:D,onMouseDown:A,onMouseUp:M,onTransformEnd:M,ref:g,rotateEnabled:!1})]})},eRe=at(sn,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:i,brushColor:o,tool:a,layer:s,shouldShowBrush:l,isMovingBoundingBox:u,isTransformingBoundingBox:d,stageScale:h,stageDimensions:g,boundingBoxCoordinates:v,boundingBoxDimensions:b,shouldRestrictStrokesToBox:S}=e,E=S?{clipX:v.x,clipY:v.y,clipWidth:b.width,clipHeight:b.height}:{};return{cursorPosition:t,brushX:t?t.x:g.width/2,brushY:t?t.y:g.height/2,radius:n/2,colorPickerOuterRadius:YI/h,colorPickerInnerRadius:(YI-m_+1)/h,maskColorString:Hh({...i,a:.5}),brushColorString:Hh(o),colorPickerColorString:Hh(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(u||d||!t)&&l,strokeWidth:1.5/h,dotRadius:1.5/h,clip:E}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),tRe=e=>{const{...t}=e,{brushX:n,brushY:r,radius:i,maskColorString:o,tool:a,layer:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:d,brushColorString:h,colorPickerColorString:g,colorPickerInnerRadius:v,colorPickerOuterRadius:b,clip:S}=he(eRe);return l?y.jsxs(lc,{listening:!1,...S,...t,children:[a==="colorPicker"?y.jsxs(y.Fragment,{children:[y.jsx(sh,{x:n,y:r,radius:b,stroke:h,strokeWidth:m_,strokeScaleEnabled:!1}),y.jsx(sh,{x:n,y:r,radius:v,stroke:g,strokeWidth:m_,strokeScaleEnabled:!1})]}):y.jsxs(y.Fragment,{children:[y.jsx(sh,{x:n,y:r,radius:i,fill:s==="mask"?o:h,globalCompositeOperation:a==="eraser"?"destination-out":"source-out"}),y.jsx(sh,{x:n,y:r,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:d*2,strokeEnabled:!0,listening:!1}),y.jsx(sh,{x:n,y:r,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:d,strokeEnabled:!0,listening:!1})]}),y.jsx(sh,{x:n,y:r,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),y.jsx(sh,{x:n,y:r,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},nRe=at([sn,Mr],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:d,isMovingStage:h,shouldShowIntermediates:g,shouldShowGrid:v,shouldRestrictStrokesToBox:b}=e;let S="none";return d==="move"||t?h?S="grabbing":S="grab":o?S=void 0:b&&!a&&(S="default"),{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:d,isStaging:t,shouldShowIntermediates:g}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),aK=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:d}=he(nRe);SIe();const h=w.useRef(null),g=w.useRef(null),v=w.useCallback(F=>{p8e(F),h.current=F},[]),b=w.useCallback(F=>{h8e(F),g.current=F},[]),S=w.useRef({x:0,y:0}),E=w.useRef(!1),_=LIe(h),k=wIe(h),T=PIe(h,E),A=_Ie(h,E,S),M=kIe(),{handleDragStart:R,handleDragMove:D,handleDragEnd:j}=yIe();return y.jsx("div",{className:"inpainting-canvas-container",children:y.jsxs("div",{className:"inpainting-canvas-wrapper",children:[y.jsxs(gIe,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:A,onTouchEnd:T,onMouseDown:k,onMouseLeave:M,onMouseMove:A,onMouseUp:T,onDragStart:R,onDragMove:D,onDragEnd:j,onContextMenu:F=>F.evt.preventDefault(),onWheel:_,draggable:(l==="move"||u)&&!t,children:[y.jsx(mv,{id:"grid",visible:r,children:y.jsx(RIe,{})}),y.jsx(mv,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:y.jsx(VIe,{})}),y.jsxs(mv,{id:"mask",visible:e,listening:!1,children:[y.jsx(FIe,{visible:!0,listening:!1}),y.jsx(BIe,{listening:!1})]}),y.jsx(mv,{children:y.jsx(OIe,{})}),y.jsxs(mv,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&y.jsx(tRe,{visible:l!=="move",listening:!1}),y.jsx(UIe,{visible:u}),d&&y.jsx(NIe,{}),y.jsx(JIe,{visible:n&&!u})]})]}),y.jsx(ZIe,{}),y.jsx(qIe,{})]})})},rRe=at(sn,Wq,Or,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),sK=()=>{const e=Ie(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=he(rRe),o=w.useRef(null);return w.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Swe({width:a,height:s})),e(i?ywe():Bx()),e(vi(!1))},0)},[e,r,t,n,i]),y.jsx("div",{ref:o,className:"inpainting-canvas-area",children:y.jsx(wy,{thickness:"2px",speed:"1s",size:"xl"})})},iRe=at([sn,Or,ir],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function lK(){const e=Ie(),{canRedo:t,activeTabName:n}=he(iRe),{t:r}=We(),i=()=>{e(gwe())};return Je(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{i()},{enabled:()=>t,preventDefault:!0},[n,t]),y.jsx(Ze,{"aria-label":`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,icon:y.jsx(fPe,{}),onClick:i,isDisabled:!t})}const oRe=at([sn,Or,ir],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function uK(){const e=Ie(),{t}=We(),{canUndo:n,activeTabName:r}=he(oRe),i=()=>{e(Pwe())};return Je(["meta+z","ctrl+z"],()=>{i()},{enabled:()=>n,preventDefault:!0},[r,n]),y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:undo")} (Ctrl+Z)`,tooltip:`${t("unifiedcanvas:undo")} (Ctrl+Z)`,icon:y.jsx(gPe,{}),onClick:i,isDisabled:!n})}const aRe=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");o&&(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},sRe=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},lRe=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),d=r?{x:r.x+n.x,y:r.y+n.y,width:r.width,height:r.height}:{x:a,y:s,width:l,height:u},h=e.toDataURL(d);return e.scale(i),{dataURL:h,boundingBox:{x:o.x,y:o.y,width:l,height:u}}},uRe={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},Ld=(e=uRe)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(XCe("Exporting Image")),t(cg(!1));const u=n(),{stageScale:d,boundingBoxCoordinates:h,boundingBoxDimensions:g,stageCoordinates:v}=u.canvas,b=el();if(!b){t(Hs(!1)),t(cg(!0));return}const{dataURL:S,boundingBox:E}=lRe(b,d,v,i?{...h,...g}:void 0);if(!S){t(Hs(!1)),t(cg(!0));return}const _=new FormData;_.append("data",JSON.stringify({dataURL:S,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:_})).json(),{url:A,width:M,height:R}=T,D={uuid:fg(),category:o?"result":"user",...T};a&&(sRe(A),t(Th({title:zt.t("toast:downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),s&&(aRe(A,M,R),t(Th({title:zt.t("toast:imageCopied"),status:"success",duration:2500,isClosable:!0}))),o&&(t(ug({image:D,category:"result"})),t(Th({title:zt.t("toast:imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),l&&(t(Cwe({kind:"image",layer:"base",...E,image:D})),t(Th({title:zt.t("toast:canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(Hs(!1)),t(j4(zt.t("common:statusConnected"))),t(cg(!0))};function cRe(){const e=he(Mr),t=el(),n=he(s=>s.system.isProcessing),r=he(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Ie(),{t:o}=We();Je(["meta+c","ctrl+c"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Ld({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return y.jsx(Ze,{"aria-label":`${o("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${o("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:y.jsx(s0,{}),onClick:a,isDisabled:e})}function dRe(){const e=Ie(),{t}=We(),n=el(),r=he(Mr),i=he(s=>s.system.isProcessing),o=he(s=>s.canvas.shouldCropToBoundingBoxOnSave);Je(["shift+d"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n,i]);const a=()=>{e(Ld({cropVisible:!o,cropToBoundingBox:o,shouldDownload:!0}))};return y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:y.jsx(zP,{}),onClick:a,isDisabled:r})}function fRe(){const e=he(Mr),{openUploader:t}=RP(),{t:n}=We();return y.jsx(Ze,{"aria-label":n("common:upload"),tooltip:n("common:upload"),icon:y.jsx(tw,{}),onClick:t,isDisabled:e})}const hRe=at([sn,Mr],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function pRe(){const e=Ie(),{t}=We(),{layer:n,isMaskEnabled:r,isStaging:i}=he(hRe),o=()=>{e(X5(n==="mask"?"base":"mask"))};Je(["q"],()=>{o()},{enabled:()=>!i,preventDefault:!0},[n]);const a=s=>{const l=s.target.value;e(X5(l)),l==="mask"&&!r&&e(By(!0))};return y.jsx(tl,{tooltip:`${t("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:iU,onChange:a,isDisabled:i})}function mRe(){const e=Ie(),{t}=We(),n=el(),r=he(Mr),i=he(a=>a.system.isProcessing);Je(["shift+m"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n,i]);const o=()=>{e(Ld({cropVisible:!1,shouldSetAsInitialImage:!0}))};return y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:y.jsx(Hq,{}),onClick:o,isDisabled:r})}function gRe(){const e=he(o=>o.canvas.tool),t=he(Mr),n=Ie(),{t:r}=We();Je(["v"],()=>{i()},{enabled:()=>!t,preventDefault:!0},[]);const i=()=>n(nu("move"));return y.jsx(Ze,{"aria-label":`${r("unifiedcanvas:move")} (V)`,tooltip:`${r("unifiedcanvas:move")} (V)`,icon:y.jsx(Nq,{}),"data-selected":e==="move"||t,onClick:i})}function vRe(){const e=he(i=>i.ui.shouldPinParametersPanel),t=Ie(),{t:n}=We(),r=()=>{t(Xu(!0)),e&&setTimeout(()=>t(vi(!0)),400)};return y.jsxs(Ge,{flexDirection:"column",gap:"0.5rem",children:[y.jsx(Ze,{tooltip:`${n("parameters:showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("parameters:showOptionsPanel"),onClick:r,children:y.jsx(VP,{})}),y.jsx(Ge,{children:y.jsx(uT,{iconButton:!0})}),y.jsx(Ge,{children:y.jsx(sT,{width:"100%",height:"40px"})})]})}function yRe(){const e=Ie(),{t}=We(),n=he(Mr),r=()=>{e(gP()),e(Bx())};return y.jsx(Ze,{"aria-label":t("unifiedcanvas:clearCanvas"),tooltip:t("unifiedcanvas:clearCanvas"),icon:y.jsx(bp,{}),onClick:r,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})}function cK(e,t,n=250){const[r,i]=w.useState(0);return w.useEffect(()=>{const o=setTimeout(()=>{r===1&&e(),i(0)},n);return r===2&&t(),()=>clearTimeout(o)},[r,e,t,n]),()=>i(o=>o+1)}function bRe(){const e=el(),t=Ie(),{t:n}=We();Je(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[e]);const r=cK(()=>i(!1),()=>i(!0)),i=(o=!1)=>{const a=el();if(!a)return;const s=a.getClientRect({skipTransform:!0});t(cU({contentRect:s,shouldScaleTo1:o}))};return y.jsx(Ze,{"aria-label":`${n("unifiedcanvas:resetView")} (R)`,tooltip:`${n("unifiedcanvas:resetView")} (R)`,icon:y.jsx(Bq,{}),onClick:r})}function SRe(){const e=he(Mr),t=el(),n=he(s=>s.system.isProcessing),r=he(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Ie(),{t:o}=We();Je(["shift+s"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Ld({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return y.jsx(Ze,{"aria-label":`${o("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${o("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:y.jsx(HP,{}),onClick:a,isDisabled:e})}const xRe=at([sn,Mr,ir],(e,t,n)=>{const{isProcessing:r}=n,{tool:i}=e;return{tool:i,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),wRe=()=>{const e=Ie(),{t}=We(),{tool:n,isStaging:r}=he(xRe);Je(["b"],()=>{i()},{enabled:()=>!r,preventDefault:!0},[]),Je(["e"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n]),Je(["c"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n]),Je(["shift+f"],()=>{s()},{enabled:()=>!r,preventDefault:!0}),Je(["delete","backspace"],()=>{l()},{enabled:()=>!r,preventDefault:!0});const i=()=>e(nu("brush")),o=()=>e(nu("eraser")),a=()=>e(nu("colorPicker")),s=()=>e(sU()),l=()=>e(aU());return y.jsxs(Ge,{flexDirection:"column",gap:"0.5rem",children:[y.jsxs(Gi,{children:[y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:brush")} (B)`,tooltip:`${t("unifiedcanvas:brush")} (B)`,icon:y.jsx(Vq,{}),"data-selected":n==="brush"&&!r,onClick:i,isDisabled:r}),y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:eraser")} (E)`,tooltip:`${t("unifiedcanvas:eraser")} (B)`,icon:y.jsx($q,{}),"data-selected":n==="eraser"&&!r,isDisabled:r,onClick:o})]}),y.jsxs(Gi,{children:[y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:y.jsx(zq,{}),isDisabled:r,onClick:s}),y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:y.jsx(Wy,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:l})]}),y.jsx(Ze,{"aria-label":`${t("unifiedcanvas:colorPicker")} (C)`,tooltip:`${t("unifiedcanvas:colorPicker")} (C)`,icon:y.jsx(Fq,{}),"data-selected":n==="colorPicker"&&!r,isDisabled:r,onClick:a,width:"max-content"})]})},yT=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:d,onClose:h}=Wh(),g=w.useRef(null),v=()=>{r(),h()},b=()=>{o&&o(),h()};return y.jsxs(y.Fragment,{children:[w.cloneElement(l,{onClick:d,ref:t}),y.jsx(JV,{isOpen:u,leastDestructiveRef:g,onClose:h,children:y.jsx(Kd,{children:y.jsxs(eW,{className:"modal",children:[y.jsx(C0,{fontSize:"lg",fontWeight:"bold",children:s}),y.jsx(i0,{children:a}),y.jsxs(wx,{children:[y.jsx(as,{ref:g,onClick:b,className:"modal-close-btn",children:i}),y.jsx(as,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),dK=()=>{const e=he(Mr),t=Ie(),{t:n}=We(),r=()=>{t(D8e()),t(gP()),t(uU())};return y.jsxs(yT,{title:n("unifiedcanvas:emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedcanvas:emptyFolder"),triggerComponent:y.jsx(cr,{leftIcon:y.jsx(bp,{}),size:"sm",isDisabled:e,children:n("unifiedcanvas:emptyTempImageFolder")}),children:[y.jsx("p",{children:n("unifiedcanvas:emptyTempImagesFolderMessage")}),y.jsx("br",{}),y.jsx("p",{children:n("unifiedcanvas:emptyTempImagesFolderConfirm")})]})},fK=()=>{const e=he(Mr),t=Ie(),{t:n}=We();return y.jsxs(yT,{title:n("unifiedcanvas:clearCanvasHistory"),acceptCallback:()=>t(uU()),acceptButtonText:n("unifiedcanvas:clearHistory"),triggerComponent:y.jsx(cr,{size:"sm",leftIcon:y.jsx(bp,{}),isDisabled:e,children:n("unifiedcanvas:clearCanvasHistory")}),children:[y.jsx("p",{children:n("unifiedcanvas:clearCanvasHistoryMessage")}),y.jsx("br",{}),y.jsx("p",{children:n("unifiedcanvas:clearCanvasHistoryConfirm")})]})},CRe=at([sn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),_Re=()=>{const e=Ie(),{t}=We(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:i,shouldShowIntermediates:o}=he(CRe);return y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{tooltip:t("unifiedcanvas:canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedcanvas:canvasSettings"),icon:y.jsx(WP,{})}),children:y.jsxs(Ge,{direction:"column",gap:"0.5rem",children:[y.jsx(er,{label:t("unifiedcanvas:showIntermediates"),isChecked:o,onChange:a=>e(bU(a.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:a=>e(hU(a.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:a=>e(pU(a.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:i,onChange:a=>e(vU(a.target.checked))}),y.jsx(fK,{}),y.jsx(dK,{})]})})},kRe=()=>{const e=he(t=>t.ui.shouldShowParametersPanel);return y.jsxs(Ge,{flexDirection:"column",rowGap:"0.5rem",width:"6rem",children:[y.jsx(pRe,{}),y.jsx(wRe,{}),y.jsxs(Ge,{gap:"0.5rem",children:[y.jsx(gRe,{}),y.jsx(bRe,{})]}),y.jsxs(Ge,{columnGap:"0.5rem",children:[y.jsx(mRe,{}),y.jsx(SRe,{})]}),y.jsxs(Ge,{columnGap:"0.5rem",children:[y.jsx(cRe,{}),y.jsx(dRe,{})]}),y.jsxs(Ge,{gap:"0.5rem",children:[y.jsx(uK,{}),y.jsx(lK,{})]}),y.jsxs(Ge,{gap:"0.5rem",children:[y.jsx(fRe,{}),y.jsx(yRe,{})]}),y.jsx(_Re,{}),!e&&y.jsx(vRe,{})]})};function ERe(){const e=Ie(),t=he(i=>i.canvas.brushSize),{t:n}=We(),r=he(Mr);return Je(["BracketLeft"],()=>{e($g(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),Je(["BracketRight"],()=>{e($g(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),y.jsx(so,{label:n("unifiedcanvas:brushSize"),value:t,withInput:!0,onChange:i=>e($g(i)),sliderNumberInputProps:{max:500},inputReadOnly:!1,width:"100px",isCompact:!0})}function fw(){return(fw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function hK(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function i8(e){var t=w.useRef(e),n=w.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var c0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},f2=function(e){return"touches"in e},o8=function(e){return e&&e.ownerDocument.defaultView||self},wN=function(e,t,n){var r=e.getBoundingClientRect(),i=f2(t)?function(o,a){for(var s=0;s<o.length;s++)if(o[s].identifier===a)return o[s];return o[0]}(t.touches,n):t;return{left:c0((i.pageX-(r.left+o8(e).pageXOffset))/r.width),top:c0((i.pageY-(r.top+o8(e).pageYOffset))/r.height)}},CN=function(e){!f2(e)&&e.preventDefault()},bT=N.memo(function(e){var t=e.onMove,n=e.onKey,r=hK(e,["onMove","onKey"]),i=w.useRef(null),o=i8(t),a=i8(n),s=w.useRef(null),l=w.useRef(!1),u=w.useMemo(function(){var v=function(E){CN(E),(f2(E)?E.touches.length>0:E.buttons>0)&&i.current?o(wN(i.current,E,s.current)):S(!1)},b=function(){return S(!1)};function S(E){var _=l.current,k=o8(i.current),T=E?k.addEventListener:k.removeEventListener;T(_?"touchmove":"mousemove",v),T(_?"touchend":"mouseup",b)}return[function(E){var _=E.nativeEvent,k=i.current;if(k&&(CN(_),!function(A,M){return M&&!f2(A)}(_,l.current)&&k)){if(f2(_)){l.current=!0;var T=_.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(wN(k,_,s.current)),S(!0)}},function(E){var _=E.which||E.keyCode;_<37||_>40||(E.preventDefault(),a({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},S]},[a,o]),d=u[0],h=u[1],g=u[2];return w.useEffect(function(){return g},[g]),N.createElement("div",fw({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),hw=function(e){return e.filter(Boolean).join(" ")},ST=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hw(["react-colorful__pointer",e.className]);return N.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},N.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Eo=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},pK=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Eo(e.h),s:Eo(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Eo(i/2),a:Eo(r,2)}},a8=function(e){var t=pK(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},YC=function(e){var t=pK(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},PRe=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:Eo(255*[r,s,a,a,l,r][u]),g:Eo(255*[l,r,r,s,a,a][u]),b:Eo(255*[a,a,l,r,r,s][u]),a:Eo(i,2)}},TRe=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:Eo(60*(s<0?s+6:s)),s:Eo(o?a/o*100:0),v:Eo(o/255*100),a:i}},LRe=N.memo(function(e){var t=e.hue,n=e.onChange,r=hw(["react-colorful__hue",e.className]);return N.createElement("div",{className:r},N.createElement(bT,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:c0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Eo(t),"aria-valuemax":"360","aria-valuemin":"0"},N.createElement(ST,{className:"react-colorful__hue-pointer",left:t/360,color:a8({h:t,s:100,v:100,a:1})})))}),ARe=N.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:a8({h:t.h,s:100,v:100,a:1})};return N.createElement("div",{className:"react-colorful__saturation",style:r},N.createElement(bT,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:c0(t.s+100*i.left,0,100),v:c0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Eo(t.s)+"%, Brightness "+Eo(t.v)+"%"},N.createElement(ST,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:a8(t)})))}),mK=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function ORe(e,t,n){var r=i8(n),i=w.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=w.useRef({color:t,hsva:o});w.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),w.useEffect(function(){var u;mK(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=w.useCallback(function(u){a(function(d){return Object.assign({},d,u)})},[]);return[o,l]}var MRe=typeof window<"u"?w.useLayoutEffect:w.useEffect,IRe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_N=new Map,RRe=function(e){MRe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_N.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_N.set(t,n);var r=IRe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},DRe=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+YC(Object.assign({},n,{a:0}))+", "+YC(Object.assign({},n,{a:1}))+")"},o=hw(["react-colorful__alpha",t]),a=Eo(100*n.a);return N.createElement("div",{className:o},N.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),N.createElement(bT,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:c0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},N.createElement(ST,{className:"react-colorful__alpha-pointer",left:n.a,color:YC(n)})))},NRe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=hK(e,["className","colorModel","color","onChange"]),s=w.useRef(null);RRe(s);var l=ORe(n,i,o),u=l[0],d=l[1],h=hw(["react-colorful",t]);return N.createElement("div",fw({},a,{ref:s,className:h}),N.createElement(ARe,{hsva:u,onChange:d}),N.createElement(LRe,{hue:u.h,onChange:d}),N.createElement(DRe,{hsva:u,onChange:d,className:"react-colorful__last-control"}))},jRe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:TRe,fromHsva:PRe,equal:mK},BRe=function(e){return N.createElement(NRe,fw({},e,{colorModel:jRe}))};const pS=e=>{const{styleClass:t,...n}=e;return y.jsx(BRe,{className:`invokeai__color-picker ${t}`,...n})},$Re=at([sn,Mr],(e,t)=>{const{brushColor:n,maskColor:r,layer:i}=e;return{brushColor:n,maskColor:r,layer:i,isStaging:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function FRe(){const e=Ie(),{brushColor:t,maskColor:n,layer:r,isStaging:i}=he($Re),o=()=>{if(r==="base")return`rgba(${t.r},${t.g},${t.b},${t.a})`;if(r==="mask")return`rgba(${n.r},${n.g},${n.b},${n.a})`};return Je(["shift+BracketLeft"],()=>{e(Bg({...t,a:ke.clamp(t.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),Je(["shift+BracketRight"],()=>{e(Bg({...t,a:ke.clamp(t.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(ko,{style:{width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",borderRadius:"99999999px",backgroundColor:o(),cursor:"pointer"}}),children:y.jsxs(Ge,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[r==="base"&&y.jsx(pS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:t,onChange:a=>e(Bg(a))}),r==="mask"&&y.jsx(pS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:a=>e(fU(a))})]})})}function gK(){return y.jsxs(Ge,{columnGap:"1rem",alignItems:"center",children:[y.jsx(ERe,{}),y.jsx(FRe,{})]})}function zRe(){const e=Ie(),t=he(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=We();return y.jsx(er,{label:n("unifiedcanvas:betaLimitToBox"),isChecked:t,onChange:r=>e(xU(r.target.checked))})}function HRe(){return y.jsxs(Ge,{gap:"1rem",alignItems:"center",children:[y.jsx(gK,{}),y.jsx(zRe,{})]})}function VRe(){const e=Ie(),{t}=We(),n=()=>e(mP());return y.jsx(cr,{size:"sm",leftIcon:y.jsx(bp,{}),onClick:n,tooltip:`${t("unifiedcanvas:clearMask")} (Shift+C)`,children:t("unifiedcanvas:betaClear")})}function WRe(){const e=he(i=>i.canvas.isMaskEnabled),t=Ie(),{t:n}=We(),r=()=>t(By(!e));return y.jsx(er,{label:`${n("unifiedcanvas:enableMask")} (H)`,isChecked:e,onChange:r})}function URe(){const e=Ie(),{t}=We(),n=he(r=>r.canvas.shouldPreserveMaskedArea);return y.jsx(er,{label:t("unifiedcanvas:betaPreserveMasked"),isChecked:n,onChange:r=>e(gU(r.target.checked))})}function GRe(){return y.jsxs(Ge,{gap:"1rem",alignItems:"center",children:[y.jsx(gK,{}),y.jsx(WRe,{}),y.jsx(URe,{}),y.jsx(VRe,{})]})}function qRe(){const e=he(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=Ie(),{t:n}=We();return y.jsx(er,{label:n("unifiedcanvas:betaDarkenOutside"),isChecked:e,onChange:r=>t(mU(r.target.checked))})}function YRe(){const e=he(r=>r.canvas.shouldShowGrid),t=Ie(),{t:n}=We();return y.jsx(er,{label:n("unifiedcanvas:showGrid"),isChecked:e,onChange:r=>t(yU(r.target.checked))})}function KRe(){const e=he(i=>i.canvas.shouldSnapToGrid),t=Ie(),{t:n}=We(),r=i=>t(Z5(i.target.checked));return y.jsx(er,{label:`${n("unifiedcanvas:snapToGrid")} (N)`,isChecked:e,onChange:r})}function XRe(){return y.jsxs(Ge,{alignItems:"center",gap:"1rem",children:[y.jsx(YRe,{}),y.jsx(KRe,{}),y.jsx(qRe,{})]})}const ZRe=at([sn],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function QRe(){const{tool:e,layer:t}=he(ZRe);return y.jsxs(Ge,{height:"2rem",minHeight:"2rem",maxHeight:"2rem",alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&y.jsx(HRe,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&y.jsx(GRe,{}),e=="move"&&y.jsx(XRe,{})]})}const JRe=at([sn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),eDe=()=>{const e=Ie(),{doesCanvasNeedScaling:t}=he(JRe);return w.useLayoutEffect(()=>{e(vi(!0));const n=ke.debounce(()=>{e(vi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),y.jsx("div",{className:"workarea-single-view",children:y.jsxs(Ge,{flexDirection:"row",width:"100%",height:"100%",columnGap:"1rem",padding:"1rem",children:[y.jsx(kRe,{}),y.jsxs(Ge,{width:"100%",height:"100%",flexDirection:"column",rowGap:"1rem",children:[y.jsx(QRe,{}),t?y.jsx(sK,{}):y.jsx(aK,{})]})]})})},tDe=at([sn,Mr],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:i,shouldPreserveMaskedArea:o}=e;return{layer:r,maskColor:n,maskColorString:Hh(n),isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),nDe=()=>{const e=Ie(),{t}=We(),{layer:n,maskColor:r,isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:a}=he(tDe);Je(["q"],()=>{s()},{enabled:()=>!a,preventDefault:!0},[n]),Je(["shift+c"],()=>{l()},{enabled:()=>!a,preventDefault:!0},[]),Je(["h"],()=>{u()},{enabled:()=>!a,preventDefault:!0},[i]);const s=()=>{e(X5(n==="mask"?"base":"mask"))},l=()=>e(mP()),u=()=>e(By(!i));return y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Gi,{children:y.jsx(Ze,{"aria-label":t("unifiedcanvas:maskingOptions"),tooltip:t("unifiedcanvas:maskingOptions"),icon:y.jsx(aPe,{}),style:n==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:a})}),children:y.jsxs(Ge,{direction:"column",gap:"0.5rem",children:[y.jsx(er,{label:`${t("unifiedcanvas:enableMask")} (H)`,isChecked:i,onChange:u}),y.jsx(er,{label:t("unifiedcanvas:preserveMaskedArea"),isChecked:o,onChange:d=>e(gU(d.target.checked))}),y.jsx(pS,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:d=>e(fU(d))}),y.jsxs(cr,{size:"sm",leftIcon:y.jsx(bp,{}),onClick:l,children:[t("unifiedcanvas:clearMask")," (Shift+C)"]})]})})},rDe=at([sn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),iDe=()=>{const e=Ie(),{t}=We(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:i,shouldShowCanvasDebugInfo:o,shouldShowGrid:a,shouldShowIntermediates:s,shouldSnapToGrid:l,shouldRestrictStrokesToBox:u}=he(rDe);Je(["n"],()=>{e(Z5(!l))},{enabled:!0,preventDefault:!0},[l]);const d=h=>e(Z5(h.target.checked));return y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{tooltip:t("unifiedcanvas:canvasSettings"),"aria-label":t("unifiedcanvas:canvasSettings"),icon:y.jsx(WP,{})}),children:y.jsxs(Ge,{direction:"column",gap:"0.5rem",children:[y.jsx(er,{label:t("unifiedcanvas:showIntermediates"),isChecked:s,onChange:h=>e(bU(h.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:showGrid"),isChecked:a,onChange:h=>e(yU(h.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:snapToGrid"),isChecked:l,onChange:d}),y.jsx(er,{label:t("unifiedcanvas:darkenOutsideSelection"),isChecked:i,onChange:h=>e(mU(h.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:h=>e(hU(h.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:h=>e(pU(h.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:limitStrokesToBox"),isChecked:u,onChange:h=>e(xU(h.target.checked))}),y.jsx(er,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:o,onChange:h=>e(vU(h.target.checked))}),y.jsx(fK,{}),y.jsx(dK,{})]})})},oDe=at([sn,Mr,ir],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),aDe=()=>{const e=Ie(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=he(oDe),{t:o}=We();Je(["b"],()=>{a()},{enabled:()=>!i,preventDefault:!0},[]),Je(["e"],()=>{s()},{enabled:()=>!i,preventDefault:!0},[t]),Je(["c"],()=>{l()},{enabled:()=>!i,preventDefault:!0},[t]),Je(["shift+f"],()=>{u()},{enabled:()=>!i,preventDefault:!0}),Je(["delete","backspace"],()=>{d()},{enabled:()=>!i,preventDefault:!0}),Je(["BracketLeft"],()=>{e($g(Math.max(r-5,5)))},{enabled:()=>!i,preventDefault:!0},[r]),Je(["BracketRight"],()=>{e($g(Math.min(r+5,500)))},{enabled:()=>!i,preventDefault:!0},[r]),Je(["shift+BracketLeft"],()=>{e(Bg({...n,a:ke.clamp(n.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]),Je(["shift+BracketRight"],()=>{e(Bg({...n,a:ke.clamp(n.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]);const a=()=>e(nu("brush")),s=()=>e(nu("eraser")),l=()=>e(nu("colorPicker")),u=()=>e(sU()),d=()=>e(aU());return y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Ze,{"aria-label":`${o("unifiedcanvas:brush")} (B)`,tooltip:`${o("unifiedcanvas:brush")} (B)`,icon:y.jsx(Vq,{}),"data-selected":t==="brush"&&!i,onClick:a,isDisabled:i}),y.jsx(Ze,{"aria-label":`${o("unifiedcanvas:eraser")} (E)`,tooltip:`${o("unifiedcanvas:eraser")} (E)`,icon:y.jsx($q,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:s}),y.jsx(Ze,{"aria-label":`${o("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${o("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:y.jsx(zq,{}),isDisabled:i,onClick:u}),y.jsx(Ze,{"aria-label":`${o("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${o("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:y.jsx(Wy,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:d}),y.jsx(Ze,{"aria-label":`${o("unifiedcanvas:colorPicker")} (C)`,tooltip:`${o("unifiedcanvas:colorPicker")} (C)`,icon:y.jsx(Fq,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:l}),y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{"aria-label":o("unifiedcanvas:brushOptions"),tooltip:o("unifiedcanvas:brushOptions"),icon:y.jsx(VP,{})}),children:y.jsxs(Ge,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[y.jsx(Ge,{gap:"1rem",justifyContent:"space-between",children:y.jsx(so,{label:o("unifiedcanvas:brushSize"),value:r,withInput:!0,onChange:h=>e($g(h)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),y.jsx(pS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:h=>e(Bg(h))})]})})]})},sDe=at([ir,sn,Mr],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),lDe=()=>{const e=Ie(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=he(sDe),s=el(),{t:l}=We(),{openUploader:u}=RP();Je(["v"],()=>{d()},{enabled:()=>!n,preventDefault:!0},[]),Je(["r"],()=>{g()},{enabled:()=>!0,preventDefault:!0},[s]),Je(["shift+m"],()=>{b()},{enabled:()=>!n,preventDefault:!0},[s,t]),Je(["shift+s"],()=>{S()},{enabled:()=>!n,preventDefault:!0},[s,t]),Je(["meta+c","ctrl+c"],()=>{E()},{enabled:()=>!n,preventDefault:!0},[s,t]),Je(["shift+d"],()=>{_()},{enabled:()=>!n,preventDefault:!0},[s,t]);const d=()=>e(nu("move")),h=cK(()=>g(!1),()=>g(!0)),g=(T=!1)=>{const A=el();if(!A)return;const M=A.getClientRect({skipTransform:!0});e(cU({contentRect:M,shouldScaleTo1:T}))},v=()=>{e(gP()),e(Bx())},b=()=>{e(Ld({cropVisible:!1,shouldSetAsInitialImage:!0}))},S=()=>{e(Ld({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},E=()=>{e(Ld({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},_=()=>{e(Ld({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))},k=T=>{const A=T.target.value;e(X5(A)),A==="mask"&&!r&&e(By(!0))};return y.jsxs("div",{className:"inpainting-settings",children:[y.jsx(tl,{tooltip:`${l("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:iU,onChange:k,isDisabled:n}),y.jsx(nDe,{}),y.jsx(aDe,{}),y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Ze,{"aria-label":`${l("unifiedcanvas:move")} (V)`,tooltip:`${l("unifiedcanvas:move")} (V)`,icon:y.jsx(Nq,{}),"data-selected":o==="move"||n,onClick:d}),y.jsx(Ze,{"aria-label":`${l("unifiedcanvas:resetView")} (R)`,tooltip:`${l("unifiedcanvas:resetView")} (R)`,icon:y.jsx(Bq,{}),onClick:h})]}),y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Ze,{"aria-label":`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:y.jsx(Hq,{}),onClick:b,isDisabled:n}),y.jsx(Ze,{"aria-label":`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:y.jsx(HP,{}),onClick:S,isDisabled:n}),y.jsx(Ze,{"aria-label":`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:y.jsx(s0,{}),onClick:E,isDisabled:n}),y.jsx(Ze,{"aria-label":`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:y.jsx(zP,{}),onClick:_,isDisabled:n})]}),y.jsxs(Gi,{isAttached:!0,children:[y.jsx(uK,{}),y.jsx(lK,{})]}),y.jsxs(Gi,{isAttached:!0,children:[y.jsx(Ze,{"aria-label":`${l("common:upload")}`,tooltip:`${l("common:upload")}`,icon:y.jsx(tw,{}),onClick:u,isDisabled:n}),y.jsx(Ze,{"aria-label":`${l("unifiedcanvas:clearCanvas")}`,tooltip:`${l("unifiedcanvas:clearCanvas")}`,icon:y.jsx(bp,{}),onClick:v,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})]}),y.jsx(Gi,{isAttached:!0,children:y.jsx(iDe,{})})]})},uDe=at([sn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),cDe=()=>{const e=Ie(),{doesCanvasNeedScaling:t}=he(uDe);return w.useLayoutEffect(()=>{e(vi(!0));const n=ke.debounce(()=>{e(vi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),y.jsx("div",{className:"workarea-single-view",children:y.jsx("div",{className:"workarea-split-view-left",children:y.jsxs("div",{className:"inpainting-main-area",children:[y.jsx(lDe,{}),y.jsx("div",{className:"inpainting-canvas-area",children:t?y.jsx(sK,{}):y.jsx(aK,{})})]})})})},dDe=at(sn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),fDe=()=>{const e=Ie(),{boundingBoxDimensions:t}=he(dDe),{t:n}=We(),r=s=>{e(Pv({...t,width:Math.floor(s)}))},i=s=>{e(Pv({...t,height:Math.floor(s)}))},o=()=>{e(Pv({...t,width:Math.floor(512)}))},a=()=>{e(Pv({...t,height:Math.floor(512)}))};return y.jsxs(Ge,{direction:"column",gap:"1rem",children:[y.jsx(so,{label:n("parameters:width"),min:64,max:1024,step:64,value:t.width,onChange:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:o}),y.jsx(so,{label:n("parameters:height"),min:64,max:1024,step:64,value:t.height,onChange:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:a})]})},hDe=at([lT,ir,sn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxScaleMethod:a,scaledBoundingBoxDimensions:s}=n;return{boundingBoxScale:a,scaledBoundingBoxDimensions:s,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:a==="manual"}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),pDe=()=>{const e=Ie(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:i,isManual:o,scaledBoundingBoxDimensions:a}=he(hDe),{t:s}=We(),l=v=>{e(Pb({...a,width:Math.floor(v)}))},u=v=>{e(Pb({...a,height:Math.floor(v)}))},d=()=>{e(Pb({...a,width:Math.floor(512)}))},h=()=>{e(Pb({...a,height:Math.floor(512)}))},g=v=>{e(bwe(v.target.value))};return y.jsxs(Ge,{direction:"column",gap:"1rem",children:[y.jsx(tl,{label:s("parameters:scaleBeforeProcessing"),validValues:nwe,value:i,onChange:g}),y.jsx(so,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("parameters:scaledWidth"),min:64,max:1024,step:64,value:a.width,onChange:l,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:d}),y.jsx(so,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("parameters:scaledHeight"),min:64,max:1024,step:64,value:a.height,onChange:u,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:h}),y.jsx(tl,{label:s("parameters:infillMethod"),value:n,validValues:r,onChange:v=>e(MU(v.target.value))}),y.jsx(so,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:s("parameters:tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(nR(v))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(nR(32))}})]})};function mDe(){const e=Ie(),t=he(r=>r.generation.seamBlur),{t:n}=We();return y.jsx(so,{sliderMarkRightOffset:-4,label:n("parameters:seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r=>{e(QI(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(QI(16))}})}function gDe(){const e=Ie(),{t}=We(),n=he(r=>r.generation.seamSize);return y.jsx(so,{sliderMarkRightOffset:-6,label:t("parameters:seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:n,onChange:r=>{e(JI(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>e(JI(96))})}function vDe(){const{t:e}=We(),t=he(r=>r.generation.seamSteps),n=Ie();return y.jsx(so,{sliderMarkRightOffset:-4,label:e("parameters:seamSteps"),min:1,max:100,sliderNumberInputProps:{max:999},value:t,onChange:r=>{n(eR(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{n(eR(30))}})}function yDe(){const e=Ie(),{t}=We(),n=he(r=>r.generation.seamStrength);return y.jsx(so,{sliderMarkRightOffset:-7,label:t("parameters:seamStrength"),min:.01,max:.99,step:.01,value:n,onChange:r=>{e(tR(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(tR(.7))}})}const bDe=()=>y.jsxs(Ge,{direction:"column",gap:"1rem",children:[y.jsx(gDe,{}),y.jsx(mDe,{}),y.jsx(yDe,{}),y.jsx(vDe,{})]});function SDe(){const{t:e}=We(),t={boundingBox:{header:`${e("parameters:boundingBoxHeader")}`,feature:ao.BOUNDING_BOX,content:y.jsx(fDe,{})},seamCorrection:{header:`${e("parameters:seamCorrectionHeader")}`,feature:ao.SEAM_CORRECTION,content:y.jsx(bDe,{})},infillAndScaling:{header:`${e("parameters:infillScalingHeader")}`,feature:ao.INFILL_AND_SCALING,content:y.jsx(pDe,{})},seed:{header:`${e("parameters:seed")}`,feature:ao.SEED,content:y.jsx(nT,{})},variations:{header:`${e("parameters:variations")}`,feature:ao.VARIATIONS,content:y.jsx(iT,{}),additionalHeaderComponents:y.jsx(rT,{})}};return y.jsxs(hT,{children:[y.jsxs(Ge,{flexDir:"column",rowGap:"0.5rem",children:[y.jsx(fT,{}),y.jsx(dT,{})]}),y.jsx(cT,{}),y.jsx(oT,{}),y.jsx(YY,{label:e("parameters:img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"}),y.jsx(aT,{accordionInfo:t})]})}function xDe(){const e=he(t=>t.ui.shouldUseCanvasBetaLayout);return y.jsx(tT,{optionsPanel:y.jsx(SDe,{}),styleClass:"inpainting-workarea-overrides",children:e?y.jsx(eDe,{}):y.jsx(cDe,{})})}const es={txt2img:{title:y.jsx(Z8e,{fill:"black",boxSize:"2.5rem"}),workarea:y.jsx(fMe,{}),tooltip:"Text To Image"},img2img:{title:y.jsx(Y8e,{fill:"black",boxSize:"2.5rem"}),workarea:y.jsx(oMe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:y.jsx(J8e,{fill:"black",boxSize:"2.5rem"}),workarea:y.jsx(xDe,{}),tooltip:"Unified Canvas"},nodes:{title:y.jsx(K8e,{fill:"black",boxSize:"2.5rem"}),workarea:y.jsx(W8e,{}),tooltip:"Nodes"},postprocess:{title:y.jsx(X8e,{fill:"black",boxSize:"2.5rem"}),workarea:y.jsx(U8e,{}),tooltip:"Post Processing"},training:{title:y.jsx(Q8e,{fill:"black",boxSize:"2.5rem"}),workarea:y.jsx(G8e,{}),tooltip:"Training"}};function wDe(){es.txt2img.tooltip=zt.t("common:text2img"),es.img2img.tooltip=zt.t("common:img2img"),es.unifiedCanvas.tooltip=zt.t("common:unifiedCanvas"),es.nodes.tooltip=zt.t("common:nodes"),es.postprocess.tooltip=zt.t("common:postProcessing"),es.training.tooltip=zt.t("common:training")}function CDe(){const e=he(V8e),t=he(o=>o.lightbox.isLightboxOpen);q8e(wDe);const n=Ie();Je("1",()=>{n(qo(0))}),Je("2",()=>{n(qo(1))}),Je("3",()=>{n(qo(2))}),Je("4",()=>{n(qo(3))}),Je("5",()=>{n(qo(4))}),Je("6",()=>{n(qo(5))}),Je("z",()=>{n(Fg(!t))},[t]);const r=()=>{const o=[];return Object.keys(es).forEach(a=>{o.push(y.jsx(uo,{hasArrow:!0,label:es[a].tooltip,placement:"right",children:y.jsx(TW,{children:es[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(es).forEach(a=>{o.push(y.jsx(EW,{className:"app-tabs-panel",children:es[a].workarea},a))}),o};return y.jsxs(kW,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(qo(o))},children:[y.jsx("div",{className:"app-tabs-list",children:r()}),y.jsx(PW,{className:"app-tabs-panels",children:t?y.jsx(xOe,{}):i()})]})}var _De=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 Yy(e,t){var n=kDe(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 kDe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=_De.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var EDe=[".DS_Store","Thumbs.db"];function PDe(e){return v0(this,void 0,void 0,function(){return y0(this,function(t){return mS(e)&&TDe(e.dataTransfer)?[2,MDe(e.dataTransfer,e.type)]:LDe(e)?[2,ADe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ODe(e)]:[2,[]]})})}function TDe(e){return mS(e)}function LDe(e){return mS(e)&&mS(e.target)}function mS(e){return typeof e=="object"&&e!==null}function ADe(e){return s8(e.target.files).map(function(t){return Yy(t)})}function ODe(e){return v0(this,void 0,void 0,function(){var t;return y0(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 Yy(r)})]}})})}function MDe(e,t){return v0(this,void 0,void 0,function(){var n,r;return y0(this,function(i){switch(i.label){case 0:return e.items?(n=s8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(IDe))]):[3,2];case 1:return r=i.sent(),[2,kN(vK(r))];case 2:return[2,kN(s8(e.files).map(function(o){return Yy(o)}))]}})})}function kN(e){return e.filter(function(t){return EDe.indexOf(t.name)===-1})}function s8(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function IDe(e){if(typeof e.webkitGetAsEntry!="function")return EN(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?yK(t):EN(e)}function vK(e){return e.reduce(function(t,n){return z7(z7([],OO(t),!1),OO(Array.isArray(n)?vK(n):[n]),!1)},[])}function EN(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Yy(t);return Promise.resolve(n)}function RDe(e){return v0(this,void 0,void 0,function(){return y0(this,function(t){return[2,e.isDirectory?yK(e):DDe(e)]})})}function yK(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return v0(a,void 0,void 0,function(){var l,u,d;return y0(this,function(h){switch(h.label){case 0:if(s.length)return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=h.sent(),n(l),[3,4];case 3:return u=h.sent(),r(u),[3,4];case 4:return[3,6];case 5:d=Promise.all(s.map(RDe)),i.push(d),o(),h.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function DDe(e){return v0(this,void 0,void 0,function(){return y0(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=Yy(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var NDe=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function PN(e){return $De(e)||BDe(e)||SK(e)||jDe()}function jDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $De(e){if(Array.isArray(e))return l8(e)}function TN(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 LN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TN(Object(n),!0).forEach(function(r){bK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sy(e,t){return HDe(e)||zDe(e,t)||SK(e,t)||FDe()}function FDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SK(e,t){if(e){if(typeof e=="string")return l8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l8(e,t)}}function l8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function HDe(e){if(Array.isArray(e))return e}var VDe="file-invalid-type",WDe="file-too-large",UDe="file-too-small",GDe="too-many-files",qDe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:VDe,message:"File type must be ".concat(n)}},AN=function(t){return{code:WDe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ON=function(t){return{code:UDe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},YDe={code:GDe,message:"Too many files"};function xK(e,t){var n=e.type==="application/x-moz-file"||NDe(e,t);return[n,n?null:qDe(t)]}function wK(e,t,n){if(Sh(e.size))if(Sh(t)&&Sh(n)){if(e.size>n)return[!1,AN(n)];if(e.size<t)return[!1,ON(t)]}else{if(Sh(t)&&e.size<t)return[!1,ON(t)];if(Sh(n)&&e.size>n)return[!1,AN(n)]}return[!0,null]}function Sh(e){return e!=null}function KDe(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=xK(l,n),d=sy(u,1),h=d[0],g=wK(l,r,i),v=sy(g,1),b=v[0],S=s?s(l):null;return h&&b&&!S})}function gS(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jb(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 MN(e){e.preventDefault()}function XDe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function ZDe(e){return e.indexOf("Edge/")!==-1}function QDe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return XDe(e)||ZDe(e)}function Rl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!gS(r)&&s&&s.apply(void 0,[r].concat(o)),gS(r)})}}function JDe(){return"showOpenFilePicker"in window}function eNe(e){if(Sh(e)){var t=Object.entries(e).filter(function(n){var r=sy(n,2),i=r[0],o=r[1],a=!0;return CK(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(_K))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=sy(r,2),o=i[0],a=i[1];return LN(LN({},n),{},bK({},o,a))},{});return[{description:"Files",accept:t}]}return e}function tNe(e){if(Sh(e))return Object.entries(e).reduce(function(t,n){var r=sy(n,2),i=r[0],o=r[1];return[].concat(PN(t),[i],PN(o))},[]).filter(function(t){return CK(t)||_K(t)}).join(",")}function nNe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function rNe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function CK(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function _K(e){return/^.*\.[\w]+$/.test(e)}var iNe=["children"],oNe=["open"],aNe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],sNe=["refKey","onChange","onClick"];function lNe(e){return dNe(e)||cNe(e)||kK(e)||uNe()}function uNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dNe(e){if(Array.isArray(e))return u8(e)}function KC(e,t){return pNe(e)||hNe(e,t)||kK(e,t)||fNe()}function fNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kK(e,t){if(e){if(typeof e=="string")return u8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u8(e,t)}}function u8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hNe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function pNe(e){if(Array.isArray(e))return e}function IN(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 _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IN(Object(n),!0).forEach(function(r){c8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vS(e,t){if(e==null)return{};var n=mNe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mNe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var xT=w.forwardRef(function(e,t){var n=e.children,r=vS(e,iNe),i=PK(r),o=i.open,a=vS(i,oNe);return w.useImperativeHandle(t,function(){return{open:o}},[o]),N.createElement(w.Fragment,null,n(_r(_r({},a),{},{open:o})))});xT.displayName="Dropzone";var EK={disabled:!1,getFilesFromEvent:PDe,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};xT.defaultProps=EK;xT.propTypes={children:Bn.func,accept:Bn.objectOf(Bn.arrayOf(Bn.string)),multiple:Bn.bool,preventDropOnDocument:Bn.bool,noClick:Bn.bool,noKeyboard:Bn.bool,noDrag:Bn.bool,noDragEventsBubbling:Bn.bool,minSize:Bn.number,maxSize:Bn.number,maxFiles:Bn.number,disabled:Bn.bool,getFilesFromEvent:Bn.func,onFileDialogCancel:Bn.func,onFileDialogOpen:Bn.func,useFsAccessApi:Bn.bool,autoFocus:Bn.bool,onDragEnter:Bn.func,onDragLeave:Bn.func,onDragOver:Bn.func,onDrop:Bn.func,onDropAccepted:Bn.func,onDropRejected:Bn.func,onError:Bn.func,validator:Bn.func};var d8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function PK(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_r(_r({},EK),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,d=t.onDragLeave,h=t.onDragOver,g=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,S=t.onFileDialogCancel,E=t.onFileDialogOpen,_=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,A=t.noClick,M=t.noKeyboard,R=t.noDrag,D=t.noDragEventsBubbling,j=t.onError,F=t.validator,H=w.useMemo(function(){return tNe(n)},[n]),K=w.useMemo(function(){return eNe(n)},[n]),te=w.useMemo(function(){return typeof E=="function"?E:RN},[E]),G=w.useMemo(function(){return typeof S=="function"?S:RN},[S]),$=w.useRef(null),U=w.useRef(null),X=w.useReducer(gNe,d8),Z=KC(X,2),W=Z[0],Q=Z[1],re=W.isFocused,de=W.isFileDialogActive,ve=w.useRef(typeof window<"u"&&window.isSecureContext&&_&&JDe()),Pe=function(){!ve.current&&de&&setTimeout(function(){if(U.current){var Ne=U.current.files;Ne.length||(Q({type:"closeDialog"}),G())}},300)};w.useEffect(function(){return window.addEventListener("focus",Pe,!1),function(){window.removeEventListener("focus",Pe,!1)}},[U,de,G,ve]);var be=w.useRef([]),He=function(Ne){$.current&&$.current.contains(Ne.target)||(Ne.preventDefault(),be.current=[])};w.useEffect(function(){return T&&(document.addEventListener("dragover",MN,!1),document.addEventListener("drop",He,!1)),function(){T&&(document.removeEventListener("dragover",MN),document.removeEventListener("drop",He))}},[$,T]),w.useEffect(function(){return!r&&k&&$.current&&$.current.focus(),function(){}},[$,k,r]);var Oe=w.useCallback(function(xe){j?j(xe):console.error(xe)},[j]),ot=w.useCallback(function(xe){xe.preventDefault(),xe.persist(),ae(xe),be.current=[].concat(lNe(be.current),[xe.target]),Jb(xe)&&Promise.resolve(i(xe)).then(function(Ne){if(!(gS(xe)&&!D)){var Ct=Ne.length,Dt=Ct>0&&KDe({files:Ne,accept:H,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:F}),Le=Ct>0&&!Dt;Q({isDragAccept:Dt,isDragReject:Le,isDragActive:!0,type:"setDraggedFiles"}),u&&u(xe)}}).catch(function(Ne){return Oe(Ne)})},[i,u,Oe,D,H,a,o,s,l,F]),Ve=w.useCallback(function(xe){xe.preventDefault(),xe.persist(),ae(xe);var Ne=Jb(xe);if(Ne&&xe.dataTransfer)try{xe.dataTransfer.dropEffect="copy"}catch{}return Ne&&h&&h(xe),!1},[h,D]),Be=w.useCallback(function(xe){xe.preventDefault(),xe.persist(),ae(xe);var Ne=be.current.filter(function(Dt){return $.current&&$.current.contains(Dt)}),Ct=Ne.indexOf(xe.target);Ct!==-1&&Ne.splice(Ct,1),be.current=Ne,!(Ne.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Jb(xe)&&d&&d(xe))},[$,d,D]),wt=w.useCallback(function(xe,Ne){var Ct=[],Dt=[];xe.forEach(function(Le){var At=xK(Le,H),$e=KC(At,2),vt=$e[0],tn=$e[1],Dn=wK(Le,a,o),Xe=KC(Dn,2),xt=Xe[0],ht=Xe[1],Ht=F?F(Le):null;if(vt&&xt&&!Ht)Ct.push(Le);else{var nn=[tn,ht];Ht&&(nn=nn.concat(Ht)),Dt.push({file:Le,errors:nn.filter(function(pr){return pr})})}}),(!s&&Ct.length>1||s&&l>=1&&Ct.length>l)&&(Ct.forEach(function(Le){Dt.push({file:Le,errors:[YDe]})}),Ct.splice(0)),Q({acceptedFiles:Ct,fileRejections:Dt,type:"setFiles"}),g&&g(Ct,Dt,Ne),Dt.length>0&&b&&b(Dt,Ne),Ct.length>0&&v&&v(Ct,Ne)},[Q,s,H,a,o,l,g,v,b,F]),st=w.useCallback(function(xe){xe.preventDefault(),xe.persist(),ae(xe),be.current=[],Jb(xe)&&Promise.resolve(i(xe)).then(function(Ne){gS(xe)&&!D||wt(Ne,xe)}).catch(function(Ne){return Oe(Ne)}),Q({type:"reset"})},[i,wt,Oe,D]),gt=w.useCallback(function(){if(ve.current){Q({type:"openDialog"}),te();var xe={multiple:s,types:K};window.showOpenFilePicker(xe).then(function(Ne){return i(Ne)}).then(function(Ne){wt(Ne,null),Q({type:"closeDialog"})}).catch(function(Ne){nNe(Ne)?(G(Ne),Q({type:"closeDialog"})):rNe(Ne)?(ve.current=!1,U.current?(U.current.value=null,U.current.click()):Oe(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Oe(Ne)});return}U.current&&(Q({type:"openDialog"}),te(),U.current.value=null,U.current.click())},[Q,te,G,_,wt,Oe,K,s]),St=w.useCallback(function(xe){!$.current||!$.current.isEqualNode(xe.target)||(xe.key===" "||xe.key==="Enter"||xe.keyCode===32||xe.keyCode===13)&&(xe.preventDefault(),gt())},[$,gt]),Ae=w.useCallback(function(){Q({type:"focus"})},[]),lt=w.useCallback(function(){Q({type:"blur"})},[]),Mt=w.useCallback(function(){A||(QDe()?setTimeout(gt,0):gt())},[A,gt]),ut=function(Ne){return r?null:Ne},_t=function(Ne){return M?null:ut(Ne)},ln=function(Ne){return R?null:ut(Ne)},ae=function(Ne){D&&Ne.stopPropagation()},De=w.useMemo(function(){return function(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ne=xe.refKey,Ct=Ne===void 0?"ref":Ne,Dt=xe.role,Le=xe.onKeyDown,At=xe.onFocus,$e=xe.onBlur,vt=xe.onClick,tn=xe.onDragEnter,Dn=xe.onDragOver,Xe=xe.onDragLeave,xt=xe.onDrop,ht=vS(xe,aNe);return _r(_r(c8({onKeyDown:_t(Rl(Le,St)),onFocus:_t(Rl(At,Ae)),onBlur:_t(Rl($e,lt)),onClick:ut(Rl(vt,Mt)),onDragEnter:ln(Rl(tn,ot)),onDragOver:ln(Rl(Dn,Ve)),onDragLeave:ln(Rl(Xe,Be)),onDrop:ln(Rl(xt,st)),role:typeof Dt=="string"&&Dt!==""?Dt:"presentation"},Ct,$),!r&&!M?{tabIndex:0}:{}),ht)}},[$,St,Ae,lt,Mt,ot,Ve,Be,st,M,R,r]),Ye=w.useCallback(function(xe){xe.stopPropagation()},[]),Ke=w.useMemo(function(){return function(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ne=xe.refKey,Ct=Ne===void 0?"ref":Ne,Dt=xe.onChange,Le=xe.onClick,At=vS(xe,sNe),$e=c8({accept:H,multiple:s,type:"file",style:{display:"none"},onChange:ut(Rl(Dt,st)),onClick:ut(Rl(Le,Ye)),tabIndex:-1},Ct,U);return _r(_r({},$e),At)}},[U,n,s,st,r]);return _r(_r({},W),{},{isFocused:re&&!r,getRootProps:De,getInputProps:Ke,rootRef:$,inputRef:U,open:ut(gt)})}function gNe(e,t){switch(t.type){case"focus":return _r(_r({},e),{},{isFocused:!0});case"blur":return _r(_r({},e),{},{isFocused:!1});case"openDialog":return _r(_r({},d8),{},{isFileDialogActive:!0});case"closeDialog":return _r(_r({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _r(_r({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _r(_r({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return _r({},d8);default:return e}}function RN(){}const vNe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return Je("esc",()=>{i(!1)}),y.jsxs("div",{className:"dropzone-container",children:[t&&y.jsx("div",{className:"dropzone-overlay is-drag-accept",children:y.jsxs(Dh,{size:"lg",children:["Upload Image",r]})}),n&&y.jsxs("div",{className:"dropzone-overlay is-drag-reject",children:[y.jsx(Dh,{size:"lg",children:"Invalid Upload"}),y.jsx(Dh,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},yNe=e=>{const{children:t}=e,n=Ie(),r=he(Or),i=jy({}),{t:o}=We(),[a,s]=w.useState(!1),{setOpenUploader:l}=RP(),u=w.useCallback(T=>{s(!0);const A=T.errors.reduce((M,R)=>`${M}
|
||
${R.message}`,"");i({title:o("toast:uploadFailed"),description:A,status:"error",isClosable:!0})},[o,i]),d=w.useCallback(async T=>{n(PD({imageFile:T}))},[n]),h=w.useCallback((T,A)=>{A.forEach(M=>{u(M)}),T.forEach(M=>{d(M)})},[d,u]),{getRootProps:g,getInputProps:v,isDragAccept:b,isDragReject:S,isDragActive:E,open:_}=PK({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>s(!0),maxFiles:1});l(_),w.useEffect(()=>{const T=A=>{var j;const M=(j=A.clipboardData)==null?void 0:j.items;if(!M)return;const R=[];for(const F of M)F.kind==="file"&&["image/png","image/jpg"].includes(F.type)&&R.push(F);if(!R.length)return;if(A.stopImmediatePropagation(),R.length>1){i({description:o("toast:uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const D=R[0].getAsFile();if(!D){i({description:o("toast:uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(PD({imageFile:D}))};return document.addEventListener("paste",T),()=>{document.removeEventListener("paste",T)}},[o,n,i,r]);const k=["img2img","unifiedCanvas"].includes(r)?` to ${es[r].tooltip}`:"";return y.jsx(IP.Provider,{value:_,children:y.jsxs("div",{...g({style:{}}),onKeyDown:T=>{T.key},children:[y.jsx("input",{...v()}),t,E&&a&&y.jsx(vNe,{isDragAccept:b,isDragReject:S,overlaySecondaryText:k,setIsHandlingUpload:s})]})})},bNe=at(ir,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),SNe=at(ir,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),xNe=()=>{const e=Ie(),t=he(bNe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=he(SNe),[o,a]=w.useState(!0),s=w.useRef(null);w.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(lG()),e(TC(!n))};Je("`",()=>{e(TC(!n))},[n]),Je("esc",()=>{e(TC(!1))});const u=()=>{s.current&&o&&s.current.scrollTop<s.current.scrollHeight-s.current.clientHeight&&a(!1)};return y.jsxs(y.Fragment,{children:[n&&y.jsx(Yq,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:y.jsx("div",{className:"console",ref:s,onScroll:u,children:t.map((d,h)=>{const{timestamp:g,message:v,level:b}=d;return y.jsxs("div",{className:`console-entry console-${b}-color`,children:[y.jsxs("p",{className:"console-timestamp",children:[g,":"]}),y.jsx("p",{className:"console-message",children:v})]},h)})})}),n&&y.jsx(uo,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:y.jsx(ss,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:y.jsx(GEe,{}),onClick:()=>a(!o)})}),y.jsx(uo,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:y.jsx(ss,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?y.jsx(sPe,{}):y.jsx(jq,{}),onClick:l})})]})},wNe=at(ir,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),CNe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=he(wNe),i=t?Math.round(t*100/n):0;return y.jsx(sW,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function _Ne(e){const{title:t,hotkey:n,description:r}=e;return y.jsxs("div",{className:"hotkey-modal-item",children:[y.jsxs("div",{className:"hotkey-info",children:[y.jsx("p",{className:"hotkey-title",children:t}),r&&y.jsx("p",{className:"hotkey-description",children:r})]}),y.jsx("div",{className:"hotkey-key",children:n})]})}function kNe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Wh(),{t:i}=We(),o=[{title:i("hotkeys:invoke.title"),desc:i("hotkeys:invoke.desc"),hotkey:"Ctrl+Enter"},{title:i("hotkeys:cancel.title"),desc:i("hotkeys:cancel.desc"),hotkey:"Shift+X"},{title:i("hotkeys:focusPrompt.title"),desc:i("hotkeys:focusPrompt.desc"),hotkey:"Alt+A"},{title:i("hotkeys:toggleOptions.title"),desc:i("hotkeys:toggleOptions.desc"),hotkey:"O"},{title:i("hotkeys:pinOptions.title"),desc:i("hotkeys:pinOptions.desc"),hotkey:"Shift+O"},{title:i("hotkeys:toggleViewer.title"),desc:i("hotkeys:toggleViewer.desc"),hotkey:"Z"},{title:i("hotkeys:toggleGallery.title"),desc:i("hotkeys:toggleGallery.desc"),hotkey:"G"},{title:i("hotkeys:maximizeWorkSpace.title"),desc:i("hotkeys:maximizeWorkSpace.desc"),hotkey:"F"},{title:i("hotkeys:changeTabs.title"),desc:i("hotkeys:changeTabs.desc"),hotkey:"1-5"},{title:i("hotkeys:consoleToggle.title"),desc:i("hotkeys:consoleToggle.desc"),hotkey:"`"}],a=[{title:i("hotkeys:setPrompt.title"),desc:i("hotkeys:setPrompt.desc"),hotkey:"P"},{title:i("hotkeys:setSeed.title"),desc:i("hotkeys:setSeed.desc"),hotkey:"S"},{title:i("hotkeys:setParameters.title"),desc:i("hotkeys:setParameters.desc"),hotkey:"A"},{title:i("hotkeys:restoreFaces.title"),desc:i("hotkeys:restoreFaces.desc"),hotkey:"Shift+R"},{title:i("hotkeys:upscale.title"),desc:i("hotkeys:upscale.desc"),hotkey:"Shift+U"},{title:i("hotkeys:showInfo.title"),desc:i("hotkeys:showInfo.desc"),hotkey:"I"},{title:i("hotkeys:sendToImageToImage.title"),desc:i("hotkeys:sendToImageToImage.desc"),hotkey:"Shift+I"},{title:i("hotkeys:deleteImage.title"),desc:i("hotkeys:deleteImage.desc"),hotkey:"Del"},{title:i("hotkeys:closePanels.title"),desc:i("hotkeys:closePanels.desc"),hotkey:"Esc"}],s=[{title:i("hotkeys:previousImage.title"),desc:i("hotkeys:previousImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys:nextImage.title"),desc:i("hotkeys:nextImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys:toggleGalleryPin.title"),desc:i("hotkeys:toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:i("hotkeys:increaseGalleryThumbSize.title"),desc:i("hotkeys:increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:i("hotkeys:decreaseGalleryThumbSize.title"),desc:i("hotkeys:decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],l=[{title:i("hotkeys:selectBrush.title"),desc:i("hotkeys:selectBrush.desc"),hotkey:"B"},{title:i("hotkeys:selectEraser.title"),desc:i("hotkeys:selectEraser.desc"),hotkey:"E"},{title:i("hotkeys:decreaseBrushSize.title"),desc:i("hotkeys:decreaseBrushSize.desc"),hotkey:"["},{title:i("hotkeys:increaseBrushSize.title"),desc:i("hotkeys:increaseBrushSize.desc"),hotkey:"]"},{title:i("hotkeys:decreaseBrushOpacity.title"),desc:i("hotkeys:decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:i("hotkeys:increaseBrushOpacity.title"),desc:i("hotkeys:increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:i("hotkeys:moveTool.title"),desc:i("hotkeys:moveTool.desc"),hotkey:"V"},{title:i("hotkeys:fillBoundingBox.title"),desc:i("hotkeys:fillBoundingBox.desc"),hotkey:"Shift + F"},{title:i("hotkeys:eraseBoundingBox.title"),desc:i("hotkeys:eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:i("hotkeys:colorPicker.title"),desc:i("hotkeys:colorPicker.desc"),hotkey:"C"},{title:i("hotkeys:toggleSnap.title"),desc:i("hotkeys:toggleSnap.desc"),hotkey:"N"},{title:i("hotkeys:quickToggleMove.title"),desc:i("hotkeys:quickToggleMove.desc"),hotkey:"Hold Space"},{title:i("hotkeys:toggleLayer.title"),desc:i("hotkeys:toggleLayer.desc"),hotkey:"Q"},{title:i("hotkeys:clearMask.title"),desc:i("hotkeys:clearMask.desc"),hotkey:"Shift+C"},{title:i("hotkeys:hideMask.title"),desc:i("hotkeys:hideMask.desc"),hotkey:"H"},{title:i("hotkeys:showHideBoundingBox.title"),desc:i("hotkeys:showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:i("hotkeys:mergeVisible.title"),desc:i("hotkeys:mergeVisible.desc"),hotkey:"Shift+M"},{title:i("hotkeys:saveToGallery.title"),desc:i("hotkeys:saveToGallery.desc"),hotkey:"Shift+S"},{title:i("hotkeys:copyToClipboard.title"),desc:i("hotkeys:copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:i("hotkeys:downloadImage.title"),desc:i("hotkeys:downloadImage.desc"),hotkey:"Shift+D"},{title:i("hotkeys:undoStroke.title"),desc:i("hotkeys:undoStroke.desc"),hotkey:"Ctrl+Z"},{title:i("hotkeys:redoStroke.title"),desc:i("hotkeys:redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:i("hotkeys:resetView.title"),desc:i("hotkeys:resetView.desc"),hotkey:"R"},{title:i("hotkeys:previousStagingImage.title"),desc:i("hotkeys:previousStagingImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys:nextStagingImage.title"),desc:i("hotkeys:nextStagingImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys:acceptStagingImage.title"),desc:i("hotkeys:acceptStagingImage.desc"),hotkey:"Enter"}],u=d=>{const h=[];return d.forEach((g,v)=>{h.push(y.jsx(_Ne,{title:g.title,description:g.desc,hotkey:g.hotkey},v))}),y.jsx("div",{className:"hotkey-modal-category",children:h})};return y.jsxs(y.Fragment,{children:[w.cloneElement(e,{onClick:n}),y.jsxs(Yd,{isOpen:t,onClose:r,children:[y.jsx(Kd,{}),y.jsxs(Qh,{className:" modal hotkeys-modal",children:[y.jsx(My,{className:"modal-close-btn"}),y.jsx("h1",{children:"Keyboard Shorcuts"}),y.jsx("div",{className:"hotkeys-modal-items",children:y.jsxs(pk,{allowMultiple:!0,children:[y.jsxs(Ym,{children:[y.jsxs(Gm,{className:"hotkeys-modal-button",children:[y.jsx("h2",{children:i("hotkeys:appHotkeys")}),y.jsx(qm,{})]}),y.jsx(Km,{children:u(o)})]}),y.jsxs(Ym,{children:[y.jsxs(Gm,{className:"hotkeys-modal-button",children:[y.jsx("h2",{children:i("hotkeys:generalHotkeys")}),y.jsx(qm,{})]}),y.jsx(Km,{children:u(a)})]}),y.jsxs(Ym,{children:[y.jsxs(Gm,{className:"hotkeys-modal-button",children:[y.jsx("h2",{children:i("hotkeys:galleryHotkeys")}),y.jsx(qm,{})]}),y.jsx(Km,{children:u(s)})]}),y.jsxs(Ym,{children:[y.jsxs(Gm,{className:"hotkeys-modal-button",children:[y.jsx("h2",{children:i("hotkeys:unifiedCanvasHotkeys")}),y.jsx(qm,{})]}),y.jsx(Km,{children:u(l)})]})]})})]})]})]})}var DN=Array.isArray,NN=Object.keys,ENe=Object.prototype.hasOwnProperty,PNe=typeof Element<"u";function f8(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=DN(e),r=DN(t),i,o,a;if(n&&r){if(o=e.length,o!=t.length)return!1;for(i=o;i--!==0;)if(!f8(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var h=NN(e);if(o=h.length,o!==NN(t).length)return!1;for(i=o;i--!==0;)if(!ENe.call(t,h[i]))return!1;if(PNe&&e instanceof Element&&t instanceof Element)return e===t;for(i=o;i--!==0;)if(a=h[i],!(a==="_owner"&&e.$$typeof)&&!f8(e[a],t[a]))return!1;return!0}return e!==e&&t!==t}var vd=function(t,n){try{return f8(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}},TNe=function(t){return LNe(t)&&!ANe(t)};function LNe(e){return!!e&&typeof e=="object"}function ANe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||INe(e)}var ONe=typeof Symbol=="function"&&Symbol.for,MNe=ONe?Symbol.for("react.element"):60103;function INe(e){return e.$$typeof===MNe}function RNe(e){return Array.isArray(e)?[]:{}}function yS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ly(RNe(e),e,t):e}function DNe(e,t,n){return e.concat(t).map(function(r){return yS(r,n)})}function NNe(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=yS(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=yS(t[i],n):r[i]=ly(e[i],t[i],n)}),r}function ly(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||DNe,n.isMergeableObject=n.isMergeableObject||TNe;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):NNe(e,t,n):yS(t,n)}ly.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return ly(r,i,n)},{})};var h8=ly,jNe=typeof global=="object"&&global&&global.Object===Object&&global;const TK=jNe;var BNe=typeof self=="object"&&self&&self.Object===Object&&self,$Ne=TK||BNe||Function("return this")();const vu=$Ne;var FNe=vu.Symbol;const ef=FNe;var LK=Object.prototype,zNe=LK.hasOwnProperty,HNe=LK.toString,gv=ef?ef.toStringTag:void 0;function VNe(e){var t=zNe.call(e,gv),n=e[gv];try{e[gv]=void 0;var r=!0}catch{}var i=HNe.call(e);return r&&(t?e[gv]=n:delete e[gv]),i}var WNe=Object.prototype,UNe=WNe.toString;function GNe(e){return UNe.call(e)}var qNe="[object Null]",YNe="[object Undefined]",jN=ef?ef.toStringTag:void 0;function Cp(e){return e==null?e===void 0?YNe:qNe:jN&&jN in Object(e)?VNe(e):GNe(e)}function AK(e,t){return function(n){return e(t(n))}}var KNe=AK(Object.getPrototypeOf,Object);const wT=KNe;function _p(e){return e!=null&&typeof e=="object"}var XNe="[object Object]",ZNe=Function.prototype,QNe=Object.prototype,OK=ZNe.toString,JNe=QNe.hasOwnProperty,eje=OK.call(Object);function BN(e){if(!_p(e)||Cp(e)!=XNe)return!1;var t=wT(e);if(t===null)return!0;var n=JNe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&OK.call(n)==eje}function tje(){this.__data__=[],this.size=0}function MK(e,t){return e===t||e!==e&&t!==t}function pw(e,t){for(var n=e.length;n--;)if(MK(e[n][0],t))return n;return-1}var nje=Array.prototype,rje=nje.splice;function ije(e){var t=this.__data__,n=pw(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():rje.call(t,n,1),--this.size,!0}function oje(e){var t=this.__data__,n=pw(t,e);return n<0?void 0:t[n][1]}function aje(e){return pw(this.__data__,e)>-1}function sje(e,t){var n=this.__data__,r=pw(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yc.prototype.clear=tje;yc.prototype.delete=ije;yc.prototype.get=oje;yc.prototype.has=aje;yc.prototype.set=sje;function lje(){this.__data__=new yc,this.size=0}function uje(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cje(e){return this.__data__.get(e)}function dje(e){return this.__data__.has(e)}function Ky(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fje="[object AsyncFunction]",hje="[object Function]",pje="[object GeneratorFunction]",mje="[object Proxy]";function IK(e){if(!Ky(e))return!1;var t=Cp(e);return t==hje||t==pje||t==fje||t==mje}var gje=vu["__core-js_shared__"];const XC=gje;var $N=function(){var e=/[^.]+$/.exec(XC&&XC.keys&&XC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function vje(e){return!!$N&&$N in e}var yje=Function.prototype,bje=yje.toString;function kp(e){if(e!=null){try{return bje.call(e)}catch{}try{return e+""}catch{}}return""}var Sje=/[\\^$.*+?()[\]{}|]/g,xje=/^\[object .+?Constructor\]$/,wje=Function.prototype,Cje=Object.prototype,_je=wje.toString,kje=Cje.hasOwnProperty,Eje=RegExp("^"+_je.call(kje).replace(Sje,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pje(e){if(!Ky(e)||vje(e))return!1;var t=IK(e)?Eje:xje;return t.test(kp(e))}function Tje(e,t){return e==null?void 0:e[t]}function Ep(e,t){var n=Tje(e,t);return Pje(n)?n:void 0}var Lje=Ep(vu,"Map");const uy=Lje;var Aje=Ep(Object,"create");const cy=Aje;function Oje(){this.__data__=cy?cy(null):{},this.size=0}function Mje(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ije="__lodash_hash_undefined__",Rje=Object.prototype,Dje=Rje.hasOwnProperty;function Nje(e){var t=this.__data__;if(cy){var n=t[e];return n===Ije?void 0:n}return Dje.call(t,e)?t[e]:void 0}var jje=Object.prototype,Bje=jje.hasOwnProperty;function $je(e){var t=this.__data__;return cy?t[e]!==void 0:Bje.call(t,e)}var Fje="__lodash_hash_undefined__";function zje(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=cy&&t===void 0?Fje:t,this}function np(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}np.prototype.clear=Oje;np.prototype.delete=Mje;np.prototype.get=Nje;np.prototype.has=$je;np.prototype.set=zje;function Hje(){this.size=0,this.__data__={hash:new np,map:new(uy||yc),string:new np}}function Vje(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function mw(e,t){var n=e.__data__;return Vje(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Wje(e){var t=mw(this,e).delete(e);return this.size-=t?1:0,t}function Uje(e){return mw(this,e).get(e)}function Gje(e){return mw(this,e).has(e)}function qje(e,t){var n=mw(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function gf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}gf.prototype.clear=Hje;gf.prototype.delete=Wje;gf.prototype.get=Uje;gf.prototype.has=Gje;gf.prototype.set=qje;var Yje=200;function Kje(e,t){var n=this.__data__;if(n instanceof yc){var r=n.__data__;if(!uy||r.length<Yje-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new gf(r)}return n.set(e,t),this.size=n.size,this}function I0(e){var t=this.__data__=new yc(e);this.size=t.size}I0.prototype.clear=lje;I0.prototype.delete=uje;I0.prototype.get=cje;I0.prototype.has=dje;I0.prototype.set=Kje;function Xje(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Zje=function(){try{var e=Ep(Object,"defineProperty");return e({},"",{}),e}catch{}}();const FN=Zje;function RK(e,t,n){t=="__proto__"&&FN?FN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Qje=Object.prototype,Jje=Qje.hasOwnProperty;function DK(e,t,n){var r=e[t];(!(Jje.call(e,t)&&MK(r,n))||n===void 0&&!(t in e))&&RK(e,t,n)}function gw(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?RK(n,s,l):DK(n,s,l)}return n}function eBe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var tBe="[object Arguments]";function zN(e){return _p(e)&&Cp(e)==tBe}var NK=Object.prototype,nBe=NK.hasOwnProperty,rBe=NK.propertyIsEnumerable,iBe=zN(function(){return arguments}())?zN:function(e){return _p(e)&&nBe.call(e,"callee")&&!rBe.call(e,"callee")};const oBe=iBe;var aBe=Array.isArray;const Xy=aBe;function sBe(){return!1}var jK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,HN=jK&&typeof module=="object"&&module&&!module.nodeType&&module,lBe=HN&&HN.exports===jK,VN=lBe?vu.Buffer:void 0,uBe=VN?VN.isBuffer:void 0,cBe=uBe||sBe;const BK=cBe;var dBe=9007199254740991,fBe=/^(?:0|[1-9]\d*)$/;function hBe(e,t){var n=typeof e;return t=t??dBe,!!t&&(n=="number"||n!="symbol"&&fBe.test(e))&&e>-1&&e%1==0&&e<t}var pBe=9007199254740991;function $K(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pBe}var mBe="[object Arguments]",gBe="[object Array]",vBe="[object Boolean]",yBe="[object Date]",bBe="[object Error]",SBe="[object Function]",xBe="[object Map]",wBe="[object Number]",CBe="[object Object]",_Be="[object RegExp]",kBe="[object Set]",EBe="[object String]",PBe="[object WeakMap]",TBe="[object ArrayBuffer]",LBe="[object DataView]",ABe="[object Float32Array]",OBe="[object Float64Array]",MBe="[object Int8Array]",IBe="[object Int16Array]",RBe="[object Int32Array]",DBe="[object Uint8Array]",NBe="[object Uint8ClampedArray]",jBe="[object Uint16Array]",BBe="[object Uint32Array]",sr={};sr[ABe]=sr[OBe]=sr[MBe]=sr[IBe]=sr[RBe]=sr[DBe]=sr[NBe]=sr[jBe]=sr[BBe]=!0;sr[mBe]=sr[gBe]=sr[TBe]=sr[vBe]=sr[LBe]=sr[yBe]=sr[bBe]=sr[SBe]=sr[xBe]=sr[wBe]=sr[CBe]=sr[_Be]=sr[kBe]=sr[EBe]=sr[PBe]=!1;function $Be(e){return _p(e)&&$K(e.length)&&!!sr[Cp(e)]}function CT(e){return function(t){return e(t)}}var FK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,h2=FK&&typeof module=="object"&&module&&!module.nodeType&&module,FBe=h2&&h2.exports===FK,ZC=FBe&&TK.process,zBe=function(){try{var e=h2&&h2.require&&h2.require("util").types;return e||ZC&&ZC.binding&&ZC.binding("util")}catch{}}();const d0=zBe;var WN=d0&&d0.isTypedArray,HBe=WN?CT(WN):$Be;const VBe=HBe;var WBe=Object.prototype,UBe=WBe.hasOwnProperty;function zK(e,t){var n=Xy(e),r=!n&&oBe(e),i=!n&&!r&&BK(e),o=!n&&!r&&!i&&VBe(e),a=n||r||i||o,s=a?eBe(e.length,String):[],l=s.length;for(var u in e)(t||UBe.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||hBe(u,l)))&&s.push(u);return s}var GBe=Object.prototype;function _T(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||GBe;return e===n}var qBe=AK(Object.keys,Object);const YBe=qBe;var KBe=Object.prototype,XBe=KBe.hasOwnProperty;function ZBe(e){if(!_T(e))return YBe(e);var t=[];for(var n in Object(e))XBe.call(e,n)&&n!="constructor"&&t.push(n);return t}function HK(e){return e!=null&&$K(e.length)&&!IK(e)}function kT(e){return HK(e)?zK(e):ZBe(e)}function QBe(e,t){return e&&gw(t,kT(t),e)}function JBe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var e$e=Object.prototype,t$e=e$e.hasOwnProperty;function n$e(e){if(!Ky(e))return JBe(e);var t=_T(e),n=[];for(var r in e)r=="constructor"&&(t||!t$e.call(e,r))||n.push(r);return n}function ET(e){return HK(e)?zK(e,!0):n$e(e)}function r$e(e,t){return e&&gw(t,ET(t),e)}var VK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,UN=VK&&typeof module=="object"&&module&&!module.nodeType&&module,i$e=UN&&UN.exports===VK,GN=i$e?vu.Buffer:void 0,qN=GN?GN.allocUnsafe:void 0;function o$e(e,t){if(t)return e.slice();var n=e.length,r=qN?qN(n):new e.constructor(n);return e.copy(r),r}function WK(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function a$e(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function UK(){return[]}var s$e=Object.prototype,l$e=s$e.propertyIsEnumerable,YN=Object.getOwnPropertySymbols,u$e=YN?function(e){return e==null?[]:(e=Object(e),a$e(YN(e),function(t){return l$e.call(e,t)}))}:UK;const PT=u$e;function c$e(e,t){return gw(e,PT(e),t)}function GK(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var d$e=Object.getOwnPropertySymbols,f$e=d$e?function(e){for(var t=[];e;)GK(t,PT(e)),e=wT(e);return t}:UK;const qK=f$e;function h$e(e,t){return gw(e,qK(e),t)}function YK(e,t,n){var r=t(e);return Xy(e)?r:GK(r,n(e))}function p$e(e){return YK(e,kT,PT)}function m$e(e){return YK(e,ET,qK)}var g$e=Ep(vu,"DataView");const p8=g$e;var v$e=Ep(vu,"Promise");const m8=v$e;var y$e=Ep(vu,"Set");const g8=y$e;var b$e=Ep(vu,"WeakMap");const v8=b$e;var KN="[object Map]",S$e="[object Object]",XN="[object Promise]",ZN="[object Set]",QN="[object WeakMap]",JN="[object DataView]",x$e=kp(p8),w$e=kp(uy),C$e=kp(m8),_$e=kp(g8),k$e=kp(v8),vh=Cp;(p8&&vh(new p8(new ArrayBuffer(1)))!=JN||uy&&vh(new uy)!=KN||m8&&vh(m8.resolve())!=XN||g8&&vh(new g8)!=ZN||v8&&vh(new v8)!=QN)&&(vh=function(e){var t=Cp(e),n=t==S$e?e.constructor:void 0,r=n?kp(n):"";if(r)switch(r){case x$e:return JN;case w$e:return KN;case C$e:return XN;case _$e:return ZN;case k$e:return QN}return t});const TT=vh;var E$e=Object.prototype,P$e=E$e.hasOwnProperty;function T$e(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&P$e.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var L$e=vu.Uint8Array;const ej=L$e;function LT(e){var t=new e.constructor(e.byteLength);return new ej(t).set(new ej(e)),t}function A$e(e,t){var n=t?LT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var O$e=/\w*$/;function M$e(e){var t=new e.constructor(e.source,O$e.exec(e));return t.lastIndex=e.lastIndex,t}var tj=ef?ef.prototype:void 0,nj=tj?tj.valueOf:void 0;function I$e(e){return nj?Object(nj.call(e)):{}}function R$e(e,t){var n=t?LT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var D$e="[object Boolean]",N$e="[object Date]",j$e="[object Map]",B$e="[object Number]",$$e="[object RegExp]",F$e="[object Set]",z$e="[object String]",H$e="[object Symbol]",V$e="[object ArrayBuffer]",W$e="[object DataView]",U$e="[object Float32Array]",G$e="[object Float64Array]",q$e="[object Int8Array]",Y$e="[object Int16Array]",K$e="[object Int32Array]",X$e="[object Uint8Array]",Z$e="[object Uint8ClampedArray]",Q$e="[object Uint16Array]",J$e="[object Uint32Array]";function eFe(e,t,n){var r=e.constructor;switch(t){case V$e:return LT(e);case D$e:case N$e:return new r(+e);case W$e:return A$e(e,n);case U$e:case G$e:case q$e:case Y$e:case K$e:case X$e:case Z$e:case Q$e:case J$e:return R$e(e,n);case j$e:return new r;case B$e:case z$e:return new r(e);case $$e:return M$e(e);case F$e:return new r;case H$e:return I$e(e)}}var rj=Object.create,tFe=function(){function e(){}return function(t){if(!Ky(t))return{};if(rj)return rj(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const nFe=tFe;function rFe(e){return typeof e.constructor=="function"&&!_T(e)?nFe(wT(e)):{}}var iFe="[object Map]";function oFe(e){return _p(e)&&TT(e)==iFe}var ij=d0&&d0.isMap,aFe=ij?CT(ij):oFe;const sFe=aFe;var lFe="[object Set]";function uFe(e){return _p(e)&&TT(e)==lFe}var oj=d0&&d0.isSet,cFe=oj?CT(oj):uFe;const dFe=cFe;var fFe=1,hFe=2,pFe=4,KK="[object Arguments]",mFe="[object Array]",gFe="[object Boolean]",vFe="[object Date]",yFe="[object Error]",XK="[object Function]",bFe="[object GeneratorFunction]",SFe="[object Map]",xFe="[object Number]",ZK="[object Object]",wFe="[object RegExp]",CFe="[object Set]",_Fe="[object String]",kFe="[object Symbol]",EFe="[object WeakMap]",PFe="[object ArrayBuffer]",TFe="[object DataView]",LFe="[object Float32Array]",AFe="[object Float64Array]",OFe="[object Int8Array]",MFe="[object Int16Array]",IFe="[object Int32Array]",RFe="[object Uint8Array]",DFe="[object Uint8ClampedArray]",NFe="[object Uint16Array]",jFe="[object Uint32Array]",Jn={};Jn[KK]=Jn[mFe]=Jn[PFe]=Jn[TFe]=Jn[gFe]=Jn[vFe]=Jn[LFe]=Jn[AFe]=Jn[OFe]=Jn[MFe]=Jn[IFe]=Jn[SFe]=Jn[xFe]=Jn[ZK]=Jn[wFe]=Jn[CFe]=Jn[_Fe]=Jn[kFe]=Jn[RFe]=Jn[DFe]=Jn[NFe]=Jn[jFe]=!0;Jn[yFe]=Jn[XK]=Jn[EFe]=!1;function p2(e,t,n,r,i,o){var a,s=t&fFe,l=t&hFe,u=t&pFe;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!Ky(e))return e;var d=Xy(e);if(d){if(a=T$e(e),!s)return WK(e,a)}else{var h=TT(e),g=h==XK||h==bFe;if(BK(e))return o$e(e,s);if(h==ZK||h==KK||g&&!i){if(a=l||g?{}:rFe(e),!s)return l?h$e(e,r$e(a,e)):c$e(e,QBe(a,e))}else{if(!Jn[h])return i?e:{};a=eFe(e,h,s)}}o||(o=new I0);var v=o.get(e);if(v)return v;o.set(e,a),dFe(e)?e.forEach(function(E){a.add(p2(E,t,n,E,e,o))}):sFe(e)&&e.forEach(function(E,_){a.set(_,p2(E,t,n,_,e,o))});var b=u?l?m$e:p$e:l?ET:kT,S=d?void 0:b(e);return Xje(S||e,function(E,_){S&&(_=E,E=e[_]),DK(a,_,p2(E,t,n,_,e,o))}),a}var BFe=4;function aj(e){return p2(e,BFe)}function QK(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var $Fe="[object Symbol]";function AT(e){return typeof e=="symbol"||_p(e)&&Cp(e)==$Fe}var FFe="Expected a function";function OT(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(FFe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(OT.Cache||gf),n}OT.Cache=gf;var zFe=500;function HFe(e){var t=OT(e,function(r){return n.size===zFe&&n.clear(),r}),n=t.cache;return t}var VFe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WFe=/\\(\\)?/g,UFe=HFe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(VFe,function(n,r,i,o){t.push(i?o.replace(WFe,"$1"):r||n)}),t});const GFe=UFe;var qFe=1/0;function YFe(e){if(typeof e=="string"||AT(e))return e;var t=e+"";return t=="0"&&1/e==-qFe?"-0":t}var KFe=1/0,sj=ef?ef.prototype:void 0,lj=sj?sj.toString:void 0;function JK(e){if(typeof e=="string")return e;if(Xy(e))return QK(e,JK)+"";if(AT(e))return lj?lj.call(e):"";var t=e+"";return t=="0"&&1/e==-KFe?"-0":t}function XFe(e){return e==null?"":JK(e)}function eX(e){return Xy(e)?QK(e,YFe):AT(e)?[e]:WK(GFe(XFe(e)))}var ZFe=!0;function QFe(e,t){if(!ZFe){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var JFe=1,eze=4;function tze(e){return p2(e,JFe|eze)}function qn(){return qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}function nze(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Lh(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function uj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var cj=function(t){return Array.isArray(t)&&t.length===0},Go=function(t){return typeof t=="function"},vw=function(t){return t!==null&&typeof t=="object"},rze=function(t){return String(Math.floor(Number(t)))===t},QC=function(t){return Object.prototype.toString.call(t)==="[object String]"},tX=function(t){return w.Children.count(t)===0},JC=function(t){return vw(t)&&Go(t.then)};function Wi(e,t,n,r){r===void 0&&(r=0);for(var i=eX(t);e&&r<i.length;)e=e[i[r++]];return e===void 0?n:e}function ou(e,t,n){for(var r=aj(e),i=r,o=0,a=eX(t);o<a.length-1;o++){var s=a[o],l=Wi(e,a.slice(0,o+1));if(l&&(vw(l)||Array.isArray(l)))i=i[s]=aj(l);else{var u=a[o+1];i=i[s]=rze(u)&&Number(u)>=0?[]:{}}}return(o===0?e:i)[a[o]]===n?e:(n===void 0?delete i[a[o]]:i[a[o]]=n,o===0&&n===void 0&&delete r[a[o]],r)}function nX(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,o=Object.keys(e);i<o.length;i++){var a=o[i],s=e[a];vw(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},nX(s,t,n,r[a])):r[a]=t}return r}var yw=w.createContext(void 0);yw.displayName="FormikContext";var ize=yw.Provider;yw.Consumer;function rX(){var e=w.useContext(yw);return e||QFe(!1),e}function oze(e,t){switch(t.type){case"SET_VALUES":return qn({},e,{values:t.payload});case"SET_TOUCHED":return qn({},e,{touched:t.payload});case"SET_ERRORS":return vd(e.errors,t.payload)?e:qn({},e,{errors:t.payload});case"SET_STATUS":return qn({},e,{status:t.payload});case"SET_ISSUBMITTING":return qn({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return qn({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return qn({},e,{values:ou(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return qn({},e,{touched:ou(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return qn({},e,{errors:ou(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return qn({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return qn({},e,{touched:nX(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return qn({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return qn({},e,{isSubmitting:!1});default:return e}}var uh={},e4={};function aze(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,o=e.validateOnMount,a=o===void 0?!1:o,s=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,d=e.onSubmit,h=Lh(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),g=qn({validateOnChange:n,validateOnBlur:i,validateOnMount:a,onSubmit:d},h),v=w.useRef(g.initialValues),b=w.useRef(g.initialErrors||uh),S=w.useRef(g.initialTouched||e4),E=w.useRef(g.initialStatus),_=w.useRef(!1),k=w.useRef({});w.useEffect(function(){return _.current=!0,function(){_.current=!1}},[]);var T=w.useReducer(oze,{values:g.initialValues,errors:g.initialErrors||uh,touched:g.initialTouched||e4,status:g.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),A=T[0],M=T[1],R=w.useCallback(function(ae,De){return new Promise(function(Ye,Ke){var xe=g.validate(ae,De);xe==null?Ye(uh):JC(xe)?xe.then(function(Ne){Ye(Ne||uh)},function(Ne){Ke(Ne)}):Ye(xe)})},[g.validate]),D=w.useCallback(function(ae,De){var Ye=g.validationSchema,Ke=Go(Ye)?Ye(De):Ye,xe=De&&Ke.validateAt?Ke.validateAt(De,ae):lze(ae,Ke);return new Promise(function(Ne,Ct){xe.then(function(){Ne(uh)},function(Dt){Dt.name==="ValidationError"?Ne(sze(Dt)):Ct(Dt)})})},[g.validationSchema]),j=w.useCallback(function(ae,De){return new Promise(function(Ye){return Ye(k.current[ae].validate(De))})},[]),F=w.useCallback(function(ae){var De=Object.keys(k.current).filter(function(Ke){return Go(k.current[Ke].validate)}),Ye=De.length>0?De.map(function(Ke){return j(Ke,Wi(ae,Ke))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Ye).then(function(Ke){return Ke.reduce(function(xe,Ne,Ct){return Ne==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Ne&&(xe=ou(xe,De[Ct],Ne)),xe},{})})},[j]),H=w.useCallback(function(ae){return Promise.all([F(ae),g.validationSchema?D(ae):{},g.validate?R(ae):{}]).then(function(De){var Ye=De[0],Ke=De[1],xe=De[2],Ne=h8.all([Ye,Ke,xe],{arrayMerge:uze});return Ne})},[g.validate,g.validationSchema,F,R,D]),K=Ka(function(ae){return ae===void 0&&(ae=A.values),M({type:"SET_ISVALIDATING",payload:!0}),H(ae).then(function(De){return _.current&&(M({type:"SET_ISVALIDATING",payload:!1}),M({type:"SET_ERRORS",payload:De})),De})});w.useEffect(function(){a&&_.current===!0&&vd(v.current,g.initialValues)&&K(v.current)},[a,K]);var te=w.useCallback(function(ae){var De=ae&&ae.values?ae.values:v.current,Ye=ae&&ae.errors?ae.errors:b.current?b.current:g.initialErrors||{},Ke=ae&&ae.touched?ae.touched:S.current?S.current:g.initialTouched||{},xe=ae&&ae.status?ae.status:E.current?E.current:g.initialStatus;v.current=De,b.current=Ye,S.current=Ke,E.current=xe;var Ne=function(){M({type:"RESET_FORM",payload:{isSubmitting:!!ae&&!!ae.isSubmitting,errors:Ye,touched:Ke,status:xe,values:De,isValidating:!!ae&&!!ae.isValidating,submitCount:ae&&ae.submitCount&&typeof ae.submitCount=="number"?ae.submitCount:0}})};if(g.onReset){var Ct=g.onReset(A.values,st);JC(Ct)?Ct.then(Ne):Ne()}else Ne()},[g.initialErrors,g.initialStatus,g.initialTouched]);w.useEffect(function(){_.current===!0&&!vd(v.current,g.initialValues)&&(u&&(v.current=g.initialValues,te()),a&&K(v.current))},[u,g.initialValues,te,a,K]),w.useEffect(function(){u&&_.current===!0&&!vd(b.current,g.initialErrors)&&(b.current=g.initialErrors||uh,M({type:"SET_ERRORS",payload:g.initialErrors||uh}))},[u,g.initialErrors]),w.useEffect(function(){u&&_.current===!0&&!vd(S.current,g.initialTouched)&&(S.current=g.initialTouched||e4,M({type:"SET_TOUCHED",payload:g.initialTouched||e4}))},[u,g.initialTouched]),w.useEffect(function(){u&&_.current===!0&&!vd(E.current,g.initialStatus)&&(E.current=g.initialStatus,M({type:"SET_STATUS",payload:g.initialStatus}))},[u,g.initialStatus,g.initialTouched]);var G=Ka(function(ae){if(k.current[ae]&&Go(k.current[ae].validate)){var De=Wi(A.values,ae),Ye=k.current[ae].validate(De);return JC(Ye)?(M({type:"SET_ISVALIDATING",payload:!0}),Ye.then(function(Ke){return Ke}).then(function(Ke){M({type:"SET_FIELD_ERROR",payload:{field:ae,value:Ke}}),M({type:"SET_ISVALIDATING",payload:!1})})):(M({type:"SET_FIELD_ERROR",payload:{field:ae,value:Ye}}),Promise.resolve(Ye))}else if(g.validationSchema)return M({type:"SET_ISVALIDATING",payload:!0}),D(A.values,ae).then(function(Ke){return Ke}).then(function(Ke){M({type:"SET_FIELD_ERROR",payload:{field:ae,value:Ke[ae]}}),M({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),$=w.useCallback(function(ae,De){var Ye=De.validate;k.current[ae]={validate:Ye}},[]),U=w.useCallback(function(ae){delete k.current[ae]},[]),X=Ka(function(ae,De){M({type:"SET_TOUCHED",payload:ae});var Ye=De===void 0?i:De;return Ye?K(A.values):Promise.resolve()}),Z=w.useCallback(function(ae){M({type:"SET_ERRORS",payload:ae})},[]),W=Ka(function(ae,De){var Ye=Go(ae)?ae(A.values):ae;M({type:"SET_VALUES",payload:Ye});var Ke=De===void 0?n:De;return Ke?K(Ye):Promise.resolve()}),Q=w.useCallback(function(ae,De){M({type:"SET_FIELD_ERROR",payload:{field:ae,value:De}})},[]),re=Ka(function(ae,De,Ye){M({type:"SET_FIELD_VALUE",payload:{field:ae,value:De}});var Ke=Ye===void 0?n:Ye;return Ke?K(ou(A.values,ae,De)):Promise.resolve()}),de=w.useCallback(function(ae,De){var Ye=De,Ke=ae,xe;if(!QC(ae)){ae.persist&&ae.persist();var Ne=ae.target?ae.target:ae.currentTarget,Ct=Ne.type,Dt=Ne.name,Le=Ne.id,At=Ne.value,$e=Ne.checked,vt=Ne.outerHTML,tn=Ne.options,Dn=Ne.multiple;Ye=De||Dt||Le,Ke=/number|range/.test(Ct)?(xe=parseFloat(At),isNaN(xe)?"":xe):/checkbox/.test(Ct)?dze(Wi(A.values,Ye),$e,At):tn&&Dn?cze(tn):At}Ye&&re(Ye,Ke)},[re,A.values]),ve=Ka(function(ae){if(QC(ae))return function(De){return de(De,ae)};de(ae)}),Pe=Ka(function(ae,De,Ye){De===void 0&&(De=!0),M({type:"SET_FIELD_TOUCHED",payload:{field:ae,value:De}});var Ke=Ye===void 0?i:Ye;return Ke?K(A.values):Promise.resolve()}),be=w.useCallback(function(ae,De){ae.persist&&ae.persist();var Ye=ae.target,Ke=Ye.name,xe=Ye.id,Ne=Ye.outerHTML,Ct=De||Ke||xe;Pe(Ct,!0)},[Pe]),He=Ka(function(ae){if(QC(ae))return function(De){return be(De,ae)};be(ae)}),Oe=w.useCallback(function(ae){Go(ae)?M({type:"SET_FORMIK_STATE",payload:ae}):M({type:"SET_FORMIK_STATE",payload:function(){return ae}})},[]),ot=w.useCallback(function(ae){M({type:"SET_STATUS",payload:ae})},[]),Ve=w.useCallback(function(ae){M({type:"SET_ISSUBMITTING",payload:ae})},[]),Be=Ka(function(){return M({type:"SUBMIT_ATTEMPT"}),K().then(function(ae){var De=ae instanceof Error,Ye=!De&&Object.keys(ae).length===0;if(Ye){var Ke;try{if(Ke=gt(),Ke===void 0)return}catch(xe){throw xe}return Promise.resolve(Ke).then(function(xe){return _.current&&M({type:"SUBMIT_SUCCESS"}),xe}).catch(function(xe){if(_.current)throw M({type:"SUBMIT_FAILURE"}),xe})}else if(_.current&&(M({type:"SUBMIT_FAILURE"}),De))throw ae})}),wt=Ka(function(ae){ae&&ae.preventDefault&&Go(ae.preventDefault)&&ae.preventDefault(),ae&&ae.stopPropagation&&Go(ae.stopPropagation)&&ae.stopPropagation(),Be().catch(function(De){console.warn("Warning: An unhandled error was caught from submitForm()",De)})}),st={resetForm:te,validateForm:K,validateField:G,setErrors:Z,setFieldError:Q,setFieldTouched:Pe,setFieldValue:re,setStatus:ot,setSubmitting:Ve,setTouched:X,setValues:W,setFormikState:Oe,submitForm:Be},gt=Ka(function(){return d(A.values,st)}),St=Ka(function(ae){ae&&ae.preventDefault&&Go(ae.preventDefault)&&ae.preventDefault(),ae&&ae.stopPropagation&&Go(ae.stopPropagation)&&ae.stopPropagation(),te()}),Ae=w.useCallback(function(ae){return{value:Wi(A.values,ae),error:Wi(A.errors,ae),touched:!!Wi(A.touched,ae),initialValue:Wi(v.current,ae),initialTouched:!!Wi(S.current,ae),initialError:Wi(b.current,ae)}},[A.errors,A.touched,A.values]),lt=w.useCallback(function(ae){return{setValue:function(Ye,Ke){return re(ae,Ye,Ke)},setTouched:function(Ye,Ke){return Pe(ae,Ye,Ke)},setError:function(Ye){return Q(ae,Ye)}}},[re,Pe,Q]),Mt=w.useCallback(function(ae){var De=vw(ae),Ye=De?ae.name:ae,Ke=Wi(A.values,Ye),xe={name:Ye,value:Ke,onChange:ve,onBlur:He};if(De){var Ne=ae.type,Ct=ae.value,Dt=ae.as,Le=ae.multiple;Ne==="checkbox"?Ct===void 0?xe.checked=!!Ke:(xe.checked=!!(Array.isArray(Ke)&&~Ke.indexOf(Ct)),xe.value=Ct):Ne==="radio"?(xe.checked=Ke===Ct,xe.value=Ct):Dt==="select"&&Le&&(xe.value=xe.value||[],xe.multiple=!0)}return xe},[He,ve,A.values]),ut=w.useMemo(function(){return!vd(v.current,A.values)},[v.current,A.values]),_t=w.useMemo(function(){return typeof s<"u"?ut?A.errors&&Object.keys(A.errors).length===0:s!==!1&&Go(s)?s(g):s:A.errors&&Object.keys(A.errors).length===0},[s,ut,A.errors,g]),ln=qn({},A,{initialValues:v.current,initialErrors:b.current,initialTouched:S.current,initialStatus:E.current,handleBlur:He,handleChange:ve,handleReset:St,handleSubmit:wt,resetForm:te,setErrors:Z,setFormikState:Oe,setFieldTouched:Pe,setFieldValue:re,setFieldError:Q,setStatus:ot,setSubmitting:Ve,setTouched:X,setValues:W,submitForm:Be,validateForm:K,validateField:G,isValid:_t,dirty:ut,unregisterField:U,registerField:$,getFieldProps:Mt,getFieldMeta:Ae,getFieldHelpers:lt,validateOnBlur:i,validateOnChange:n,validateOnMount:a});return ln}function Zy(e){var t=aze(e),n=e.component,r=e.children,i=e.render,o=e.innerRef;return w.useImperativeHandle(o,function(){return t}),w.createElement(ize,{value:t},n?w.createElement(n,t):i?i(t):r?Go(r)?r(t):tX(r)?null:w.Children.only(r):null)}function sze(e){var t={};if(e.inner){if(e.inner.length===0)return ou(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var o;if(n){if(r>=i.length)break;o=i[r++]}else{if(r=i.next(),r.done)break;o=r.value}var a=o;Wi(t,a.path)||(t=ou(t,a.path,a.message))}}return t}function lze(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r={});var i=y8(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function y8(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||BN(i)?y8(i):i!==""?i:void 0}):BN(e[r])?t[r]=y8(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function uze(e,t,n){var r=e.slice();return t.forEach(function(o,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(o);r[a]=l?h8(Array.isArray(o)?[]:{},o,n):o}else n.isMergeableObject(o)?r[a]=h8(e[a],o,n):e.indexOf(o)===-1&&r.push(o)}),r}function cze(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function dze(e,t,n){if(typeof e=="boolean")return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,o=e.indexOf(n),i=o>=0;else if(!n||n=="true"||n=="false")return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,o).concat(r.slice(o+1)):r}var fze=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect;function Ka(e){var t=w.useRef(e);return fze(function(){t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}function dr(e){var t=e.validate,n=e.name,r=e.render,i=e.children,o=e.as,a=e.component,s=Lh(e,["validate","name","render","children","as","component"]),l=rX(),u=Lh(l,["validate","validationSchema"]),d=u.registerField,h=u.unregisterField;w.useEffect(function(){return d(n,{validate:t}),function(){h(n)}},[d,h,n,t]);var g=u.getFieldProps(qn({name:n},s)),v=u.getFieldMeta(n),b={field:g,form:u};if(r)return r(qn({},b,{meta:v}));if(Go(i))return i(qn({},b,{meta:v}));if(a){if(typeof a=="string"){var S=s.innerRef,E=Lh(s,["innerRef"]);return w.createElement(a,qn({ref:S},g,E),i)}return w.createElement(a,qn({field:g,form:u},s),i)}var _=o||"input";if(typeof _=="string"){var k=s.innerRef,T=Lh(s,["innerRef"]);return w.createElement(_,qn({ref:k},g,T),i)}return w.createElement(_,qn({},g,s),i)}var hze=w.forwardRef(function(e,t){var n=e.action,r=Lh(e,["action"]),i=n??"#",o=rX(),a=o.handleReset,s=o.handleSubmit;return w.createElement("form",Object.assign({onSubmit:s,ref:t,onReset:a,action:i},r))});hze.displayName="Form";var pze=function(t,n,r){var i=f0(t),o=i[n];return i.splice(n,1),i.splice(r,0,o),i},mze=function(t,n,r){var i=f0(t),o=i[n];return i[n]=i[r],i[r]=o,i},e7=function(t,n,r){var i=f0(t);return i.splice(n,0,r),i},gze=function(t,n,r){var i=f0(t);return i[n]=r,i},f0=function(t){if(t){if(Array.isArray(t))return[].concat(t);var n=Object.keys(t).map(function(r){return parseInt(r)}).reduce(function(r,i){return i>r?i:r},0);return Array.from(qn({},t,{length:n+1}))}else return[]},vze=function(e){nze(t,e);function t(r){var i;return i=e.call(this,r)||this,i.updateArrayField=function(o,a,s){var l=i.props,u=l.name,d=l.formik.setFormikState;d(function(h){var g=typeof s=="function"?s:o,v=typeof a=="function"?a:o,b=ou(h.values,u,o(Wi(h.values,u))),S=s?g(Wi(h.errors,u)):void 0,E=a?v(Wi(h.touched,u)):void 0;return cj(S)&&(S=void 0),cj(E)&&(E=void 0),qn({},h,{values:b,errors:s?ou(h.errors,u,S):h.errors,touched:a?ou(h.touched,u,E):h.touched})})},i.push=function(o){return i.updateArrayField(function(a){return[].concat(f0(a),[tze(o)])},!1,!1)},i.handlePush=function(o){return function(){return i.push(o)}},i.swap=function(o,a){return i.updateArrayField(function(s){return mze(s,o,a)},!0,!0)},i.handleSwap=function(o,a){return function(){return i.swap(o,a)}},i.move=function(o,a){return i.updateArrayField(function(s){return pze(s,o,a)},!0,!0)},i.handleMove=function(o,a){return function(){return i.move(o,a)}},i.insert=function(o,a){return i.updateArrayField(function(s){return e7(s,o,a)},function(s){return e7(s,o,null)},function(s){return e7(s,o,null)})},i.handleInsert=function(o,a){return function(){return i.insert(o,a)}},i.replace=function(o,a){return i.updateArrayField(function(s){return gze(s,o,a)},!1,!1)},i.handleReplace=function(o,a){return function(){return i.replace(o,a)}},i.unshift=function(o){var a=-1;return i.updateArrayField(function(s){var l=s?[o].concat(s):[o];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l}),a},i.handleUnshift=function(o){return function(){return i.unshift(o)}},i.handleRemove=function(o){return function(){return i.remove(o)}},i.handlePop=function(){return function(){return i.pop()}},i.remove=i.remove.bind(uj(i)),i.pop=i.pop.bind(uj(i)),i}var n=t.prototype;return n.componentDidUpdate=function(i){this.props.validateOnChange&&this.props.formik.validateOnChange&&!vd(Wi(i.formik.values,i.name),Wi(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(i){var o;return this.updateArrayField(function(a){var s=a?f0(a):[];return o||(o=s[i]),Go(s.splice)&&s.splice(i,1),s},!0,!0),o},n.pop=function(){var i;return this.updateArrayField(function(o){var a=o;return i||(i=a&&a.pop&&a.pop()),a},!0,!0),i},n.render=function(){var i={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},o=this.props,a=o.component,s=o.render,l=o.children,u=o.name,d=o.formik,h=Lh(d,["validate","validationSchema"]),g=qn({},i,{form:h,name:u});return a?w.createElement(a,g):s?s(g):l?typeof l=="function"?l(g):tX(l)?null:w.Children.only(l):null},t}(w.Component);vze.defaultProps={validateOnChange:!0};const yze=at([ir],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),dj=64,fj=2048;function bze(){const{openModel:e,model_list:t}=he(yze),n=he(l=>l.system.isProcessing),r=Ie(),{t:i}=We(),[o,a]=w.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1,format:"ckpt"});w.useEffect(()=>{var l,u,d,h,g,v,b;if(e){const S=ke.pickBy(t,(E,_)=>ke.isEqual(_,e));a({name:e,description:(l=S[e])==null?void 0:l.description,config:(u=S[e])==null?void 0:u.config,weights:(d=S[e])==null?void 0:d.weights,vae:(h=S[e])==null?void 0:h.vae,width:(g=S[e])==null?void 0:g.width,height:(v=S[e])==null?void 0:v.height,default:(b=S[e])==null?void 0:b.default,format:"ckpt"})}},[t,e]);const s=l=>{r(Hy({...l,width:Number(l.width),height:Number(l.height)}))};return e?y.jsxs(Ge,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[y.jsx(Ge,{alignItems:"center",children:y.jsx(fn,{fontSize:"lg",fontWeight:"bold",children:e})}),y.jsx(Ge,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:y.jsx(Zy,{enableReinitialize:!0,initialValues:o,onSubmit:s,children:({handleSubmit:l,errors:u,touched:d})=>y.jsx("form",{onSubmit:l,children:y.jsxs(yn,{rowGap:"0.5rem",alignItems:"start",children:[y.jsxs(dn,{isInvalid:!!u.description&&d.description,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"description",fontSize:"sm",children:i("modelmanager:description")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"description",name:"description",type:"text",width:"lg"}),u.description&&d.description?y.jsx(ur,{children:u.description}):y.jsx(lr,{margin:0,children:i("modelmanager:descriptionValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!u.config&&d.config,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:config")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"config",name:"config",type:"text",width:"lg"}),u.config&&d.config?y.jsx(ur,{children:u.config}):y.jsx(lr,{margin:0,children:i("modelmanager:configValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!u.weights&&d.weights,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:modelLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"weights",name:"weights",type:"text",width:"lg"}),u.weights&&d.weights?y.jsx(ur,{children:u.weights}):y.jsx(lr,{margin:0,children:i("modelmanager:modelLocationValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!u.vae&&d.vae,children:[y.jsx(Pn,{htmlFor:"vae",fontSize:"sm",children:i("modelmanager:vaeLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"vae",name:"vae",type:"text",width:"lg"}),u.vae&&d.vae?y.jsx(ur,{children:u.vae}):y.jsx(lr,{margin:0,children:i("modelmanager:vaeLocationValidationMsg")})]})]}),y.jsxs(Cy,{width:"100%",children:[y.jsxs(dn,{isInvalid:!!u.width&&d.width,children:[y.jsx(Pn,{htmlFor:"width",fontSize:"sm",children:i("modelmanager:width")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{id:"width",name:"width",children:({field:h,form:g})=>y.jsx(ra,{id:"width",name:"width",min:dj,max:fj,step:64,value:g.values.width,onChange:v=>g.setFieldValue(h.name,Number(v))})}),u.width&&d.width?y.jsx(ur,{children:u.width}):y.jsx(lr,{margin:0,children:i("modelmanager:widthValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!u.height&&d.height,children:[y.jsx(Pn,{htmlFor:"height",fontSize:"sm",children:i("modelmanager:height")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{id:"height",name:"height",children:({field:h,form:g})=>y.jsx(ra,{id:"height",name:"height",min:dj,max:fj,step:64,value:g.values.height,onChange:v=>g.setFieldValue(h.name,Number(v))})}),u.height&&d.height?y.jsx(ur,{children:u.height}):y.jsx(lr,{margin:0,children:i("modelmanager:heightValidationMsg")})]})]})]}),y.jsx(cr,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelmanager:updateModel")})]})})})})]}):y.jsx(Ge,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:y.jsx(fn,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}const Sze=at([ir],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function xze(){const{openModel:e,model_list:t}=he(Sze),n=he(l=>l.system.isProcessing),r=Ie(),{t:i}=We(),[o,a]=w.useState({name:"",description:"",repo_id:"",path:"",vae:{repo_id:"",path:""},default:!1,format:"diffusers"});w.useEffect(()=>{var l,u,d,h,g,v,b,S,E,_,k,T,A,M,R,D;if(e){const j=ke.pickBy(t,(F,H)=>ke.isEqual(H,e));a({name:e,description:(l=j[e])==null?void 0:l.description,path:(u=j[e])!=null&&u.path&&((d=j[e])==null?void 0:d.path)!=="None"?(h=j[e])==null?void 0:h.path:"",repo_id:(g=j[e])!=null&&g.repo_id&&((v=j[e])==null?void 0:v.repo_id)!=="None"?(b=j[e])==null?void 0:b.repo_id:"",vae:{repo_id:(E=(S=j[e])==null?void 0:S.vae)!=null&&E.repo_id?(k=(_=j[e])==null?void 0:_.vae)==null?void 0:k.repo_id:"",path:(A=(T=j[e])==null?void 0:T.vae)!=null&&A.path?(R=(M=j[e])==null?void 0:M.vae)==null?void 0:R.path:""},default:(D=j[e])==null?void 0:D.default,format:"diffusers"})}},[t,e]);const s=l=>{const u=l;l.path===""&&delete u.path,l.repo_id===""&&delete u.repo_id,l.vae.path===""&&delete u.vae.path,l.vae.repo_id===""&&delete u.vae.repo_id,r(Hy(l))};return e?y.jsxs(Ge,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[y.jsx(Ge,{alignItems:"center",children:y.jsx(fn,{fontSize:"lg",fontWeight:"bold",children:e})}),y.jsx(Ge,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:y.jsx(Zy,{enableReinitialize:!0,initialValues:o,onSubmit:s,children:({handleSubmit:l,errors:u,touched:d})=>{var h,g,v,b,S,E,_,k,T,A;return y.jsx("form",{onSubmit:l,children:y.jsxs(yn,{rowGap:"0.5rem",alignItems:"start",children:[y.jsxs(dn,{isInvalid:!!u.description&&d.description,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"description",fontSize:"sm",children:i("modelmanager:description")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"description",name:"description",type:"text",width:"lg"}),u.description&&d.description?y.jsx(ur,{children:u.description}):y.jsx(lr,{margin:0,children:i("modelmanager:descriptionValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!u.path&&d.path,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"path",fontSize:"sm",children:i("modelmanager:modelLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"path",name:"path",type:"text",width:"lg"}),u.path&&d.path?y.jsx(ur,{children:u.path}):y.jsx(lr,{margin:0,children:i("modelmanager:modelLocationValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!u.repo_id&&d.repo_id,children:[y.jsx(Pn,{htmlFor:"repo_id",fontSize:"sm",children:i("modelmanager:repo_id")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"repo_id",name:"repo_id",type:"text",width:"lg"}),u.repo_id&&d.repo_id?y.jsx(ur,{children:u.repo_id}):y.jsx(lr,{margin:0,children:i("modelmanager:repoIDValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!((h=u.vae)!=null&&h.path)&&((g=d.vae)==null?void 0:g.path),children:[y.jsx(Pn,{htmlFor:"vae.path",fontSize:"sm",children:i("modelmanager:vaeLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"vae.path",name:"vae.path",type:"text",width:"lg"}),(v=u.vae)!=null&&v.path&&((b=d.vae)!=null&&b.path)?y.jsx(ur,{children:(S=u.vae)==null?void 0:S.path}):y.jsx(lr,{margin:0,children:i("modelmanager:vaeLocationValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!((E=u.vae)!=null&&E.repo_id)&&((_=d.vae)==null?void 0:_.repo_id),children:[y.jsx(Pn,{htmlFor:"vae.repo_id",fontSize:"sm",children:i("modelmanager:vaeRepoID")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"lg"}),(k=u.vae)!=null&&k.repo_id&&((T=d.vae)!=null&&T.repo_id)?y.jsx(ur,{children:(A=u.vae)==null?void 0:A.repo_id}):y.jsx(lr,{margin:0,children:i("modelmanager:vaeRepoIDValidationMsg")})]})]}),y.jsx(cr,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelmanager:updateModel")})]})})}})})]}):y.jsx(Ge,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:y.jsx(fn,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}const iX=at([ir],e=>{const{model_list:t}=e,n=[];return ke.forEach(t,r=>{n.push(r.weights)}),n});function wze(){const{t:e}=We();return y.jsx(ko,{position:"absolute",zIndex:2,right:4,top:4,fontSize:"0.7rem",fontWeight:"bold",backgroundColor:"var(--accent-color)",padding:"0.2rem 0.5rem",borderRadius:"0.2rem",alignItems:"center",children:e("modelmanager:modelExists")})}function hj({model:e,modelsToAdd:t,setModelsToAdd:n}){const r=he(iX),i=o=>{t.includes(o.target.value)?n(ke.remove(t,a=>a!==o.target.value)):n([...t,o.target.value])};return y.jsxs(ko,{position:"relative",children:[r.includes(e.location)?y.jsx(wze,{}):null,y.jsx(er,{value:e.name,label:y.jsx(y.Fragment,{children:y.jsxs(yn,{alignItems:"start",children:[y.jsx("p",{style:{fontWeight:"bold"},children:e.name}),y.jsx("p",{style:{fontStyle:"italic"},children:e.location})]})}),isChecked:t.includes(e.name),isDisabled:r.includes(e.location),onChange:i,padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",_checked:{backgroundColor:"var(--accent-color)",color:"var(--text-color)"},_disabled:{backgroundColor:"var(--background-color-secondary)"}})]})}function Cze(){const e=Ie(),{t}=We(),n=he(S=>S.system.searchFolder),r=he(S=>S.system.foundModels),i=he(iX),o=he(S=>S.ui.shouldShowExistingModelsInSearch),a=he(S=>S.system.isProcessing),[s,l]=N.useState([]),u=()=>{e(uG(null)),e(cG(null)),l([])},d=S=>{e(kD(S.checkpointFolder))},h=()=>{l([]),r&&r.forEach(S=>{i.includes(S.location)||l(E=>[...E,S.name])})},g=()=>{l([])},v=()=>{const S=r==null?void 0:r.filter(E=>s.includes(E.name));S==null||S.forEach(E=>{const _={name:E.name,description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:E.location,vae:"",width:512,height:512,default:!1,format:"ckpt"};e(Hy(_))}),l([])},b=()=>{const S=[],E=[];return r&&r.forEach((_,k)=>{i.includes(_.location)?E.push(y.jsx(hj,{model:_,modelsToAdd:s,setModelsToAdd:l},k)):S.push(y.jsx(hj,{model:_,modelsToAdd:s,setModelsToAdd:l},k))}),y.jsxs(y.Fragment,{children:[S,o&&E]})};return y.jsxs(y.Fragment,{children:[n?y.jsxs(Ge,{flexDirection:"column",padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",rowGap:"0.5rem",position:"relative",children:[y.jsx("p",{style:{fontWeight:"bold",fontSize:"0.8rem",backgroundColor:"var(--background-color-secondary)",padding:"0.2rem 1rem",width:"max-content",borderRadius:"0.2rem"},children:t("modelmanager:checkpointFolder")}),y.jsx("p",{style:{fontWeight:"bold",fontSize:"0.8rem",maxWidth:"80%"},children:n}),y.jsx(Ze,{"aria-label":t("modelmanager:scanAgain"),tooltip:t("modelmanager:scanAgain"),icon:y.jsx(Yx,{}),position:"absolute",right:16,fontSize:18,disabled:a,onClick:()=>e(kD(n))}),y.jsx(Ze,{"aria-label":t("modelmanager:clearCheckpointFolder"),icon:y.jsx(Wy,{style:{transform:"rotate(45deg)"}}),position:"absolute",right:5,onClick:u})]}):y.jsx(Zy,{initialValues:{checkpointFolder:""},onSubmit:S=>{d(S)},children:({handleSubmit:S})=>y.jsx("form",{onSubmit:S,children:y.jsxs(Cy,{columnGap:"0.5rem",children:[y.jsx(dn,{isRequired:!0,width:"max-content",children:y.jsx(dr,{as:Er,id:"checkpointFolder",name:"checkpointFolder",type:"text",width:"lg",size:"md",label:t("modelmanager:checkpointFolder")})}),y.jsx(Ze,{icon:y.jsx(NPe,{}),"aria-label":t("modelmanager:findModels"),tooltip:t("modelmanager:findModels"),type:"submit",disabled:a})]})})}),r&&y.jsxs(Ge,{flexDirection:"column",rowGap:"1rem",children:[y.jsxs(Ge,{justifyContent:"space-between",alignItems:"center",children:[y.jsxs("p",{children:[t("modelmanager:modelsFound"),": ",r.length]}),y.jsxs("p",{children:[t("modelmanager:selected"),": ",s.length]})]}),y.jsxs(Ge,{columnGap:"0.5rem",justifyContent:"space-between",children:[y.jsxs(Ge,{columnGap:"0.5rem",children:[y.jsx(cr,{isDisabled:s.length===r.length,onClick:h,children:t("modelmanager:selectAll")}),y.jsx(cr,{isDisabled:s.length===0,onClick:g,children:t("modelmanager:deselectAll")}),y.jsx(er,{label:t("modelmanager:showExisting"),isChecked:o,onChange:()=>e(a7e(!o))})]}),y.jsx(cr,{isDisabled:s.length===0,onClick:v,backgroundColor:s.length>0?"var(--accent-color) !important":"",children:t("modelmanager:addSelected")})]}),y.jsxs(Ge,{rowGap:"1rem",flexDirection:"column",maxHeight:"18rem",overflowY:"scroll",paddingRight:"1rem",paddingLeft:"0.2rem",borderRadius:"0.2rem",children:[r.length>0?s.length===0&&y.jsx(fn,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",margin:"0 0.5rem 0 1rem",textAlign:"center",backgroundColor:"var(--notice-color)",boxShadow:"0 0 200px 6px var(--notice-color)",marginTop:"1rem",width:"max-content",children:t("modelmanager:selectAndAdd")}):y.jsx(fn,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",textAlign:"center",backgroundColor:"var(--status-bad-color)",children:t("modelmanager:noModelsFound")}),b()]})]})]})}const pj=64,mj=2048;function _ze(){const e=Ie(),{t}=We(),n=he(u=>u.system.isProcessing);function r(u){return/\s/.test(u)}function i(u){let d;return r(u)&&(d=t("modelmanager:cannotUseSpaces")),d}const o={name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,format:"ckpt",default:!1},a=u=>{e(Hy(u)),e(zh(null))},[s,l]=N.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsx(Ze,{"aria-label":t("common:back"),tooltip:t("common:back"),onClick:()=>e(zh(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:y.jsx(bq,{})}),y.jsx(Cze,{}),y.jsx(er,{label:t("modelmanager:addManually"),isChecked:s,onChange:()=>l(!s)}),s&&y.jsx(Zy,{initialValues:o,onSubmit:a,children:({handleSubmit:u,errors:d,touched:h})=>y.jsx("form",{onSubmit:u,children:y.jsxs(yn,{rowGap:"0.5rem",children:[y.jsx(fn,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:t("modelmanager:manual")}),y.jsxs(dn,{isInvalid:!!d.name&&h.name,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"name",fontSize:"sm",children:t("modelmanager:name")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"name",name:"name",type:"text",validate:i,width:"2xl"}),d.name&&h.name?y.jsx(ur,{children:d.name}):y.jsx(lr,{margin:0,children:t("modelmanager:nameValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!d.description&&h.description,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"description",fontSize:"sm",children:t("modelmanager:description")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"description",name:"description",type:"text",width:"2xl"}),d.description&&h.description?y.jsx(ur,{children:d.description}):y.jsx(lr,{margin:0,children:t("modelmanager:descriptionValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!d.config&&h.config,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"config",fontSize:"sm",children:t("modelmanager:config")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"config",name:"config",type:"text",width:"2xl"}),d.config&&h.config?y.jsx(ur,{children:d.config}):y.jsx(lr,{margin:0,children:t("modelmanager:configValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!d.weights&&h.weights,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"config",fontSize:"sm",children:t("modelmanager:modelLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"weights",name:"weights",type:"text",width:"2xl"}),d.weights&&h.weights?y.jsx(ur,{children:d.weights}):y.jsx(lr,{margin:0,children:t("modelmanager:modelLocationValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!d.vae&&h.vae,children:[y.jsx(Pn,{htmlFor:"vae",fontSize:"sm",children:t("modelmanager:vaeLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"vae",name:"vae",type:"text",width:"2xl"}),d.vae&&h.vae?y.jsx(ur,{children:d.vae}):y.jsx(lr,{margin:0,children:t("modelmanager:vaeLocationValidationMsg")})]})]}),y.jsxs(Cy,{width:"100%",children:[y.jsxs(dn,{isInvalid:!!d.width&&h.width,children:[y.jsx(Pn,{htmlFor:"width",fontSize:"sm",children:t("modelmanager:width")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{id:"width",name:"width",children:({field:g,form:v})=>y.jsx(ra,{id:"width",name:"width",min:pj,max:mj,step:64,width:"90%",value:v.values.width,onChange:b=>v.setFieldValue(g.name,Number(b))})}),d.width&&h.width?y.jsx(ur,{children:d.width}):y.jsx(lr,{margin:0,children:t("modelmanager:widthValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!d.height&&h.height,children:[y.jsx(Pn,{htmlFor:"height",fontSize:"sm",children:t("modelmanager:height")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{id:"height",name:"height",children:({field:g,form:v})=>y.jsx(ra,{id:"height",name:"height",min:pj,max:mj,width:"90%",step:64,value:v.values.height,onChange:b=>v.setFieldValue(g.name,Number(b))})}),d.height&&h.height?y.jsx(ur,{children:d.height}):y.jsx(lr,{margin:0,children:t("modelmanager:heightValidationMsg")})]})]})]}),y.jsx(cr,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelmanager:addModel")})]})})})]})}function t4({children:e}){return y.jsx(Ge,{flexDirection:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.5rem",rowGap:"1rem",width:"100%",children:e})}function kze(){const e=Ie(),{t}=We(),n=he(s=>s.system.isProcessing);function r(s){return/\s/.test(s)}function i(s){let l;return r(s)&&(l=t("modelmanager:cannotUseSpaces")),l}const o={name:"",description:"",repo_id:"",path:"",format:"diffusers",default:!1,vae:{repo_id:"",path:""}},a=s=>{const l=s;s.path===""&&delete l.path,s.repo_id===""&&delete l.repo_id,s.vae.path===""&&delete l.vae.path,s.vae.repo_id===""&&delete l.vae.repo_id,e(Hy(l)),e(zh(null))};return y.jsxs(Ge,{children:[y.jsx(Ze,{"aria-label":t("common:back"),tooltip:t("common:back"),onClick:()=>e(zh(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:y.jsx(bq,{})}),y.jsx(Zy,{initialValues:o,onSubmit:a,children:({handleSubmit:s,errors:l,touched:u})=>{var d,h,g,v,b,S,E,_,k,T;return y.jsx("form",{onSubmit:s,children:y.jsxs(yn,{rowGap:"0.5rem",children:[y.jsx(t4,{children:y.jsxs(dn,{isInvalid:!!l.name&&u.name,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"name",fontSize:"sm",children:t("modelmanager:name")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"name",name:"name",type:"text",validate:i,width:"2xl",isRequired:!0}),l.name&&u.name?y.jsx(ur,{children:l.name}):y.jsx(lr,{margin:0,children:t("modelmanager:nameValidationMsg")})]})]})}),y.jsx(t4,{children:y.jsxs(dn,{isInvalid:!!l.description&&u.description,isRequired:!0,children:[y.jsx(Pn,{htmlFor:"description",fontSize:"sm",children:t("modelmanager:description")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"description",name:"description",type:"text",width:"2xl",isRequired:!0}),l.description&&u.description?y.jsx(ur,{children:l.description}):y.jsx(lr,{margin:0,children:t("modelmanager:descriptionValidationMsg")})]})]})}),y.jsxs(t4,{children:[y.jsx(fn,{fontWeight:"bold",fontSize:"sm",children:t("modelmanager:formMessageDiffusersModelLocation")}),y.jsx(fn,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelmanager:formMessageDiffusersModelLocationDesc")}),y.jsxs(dn,{isInvalid:!!l.path&&u.path,children:[y.jsx(Pn,{htmlFor:"path",fontSize:"sm",children:t("modelmanager:modelLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"path",name:"path",type:"text",width:"2xl"}),l.path&&u.path?y.jsx(ur,{children:l.path}):y.jsx(lr,{margin:0,children:t("modelmanager:modelLocationValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!l.repo_id&&u.repo_id,children:[y.jsx(Pn,{htmlFor:"repo_id",fontSize:"sm",children:t("modelmanager:repo_id")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"repo_id",name:"repo_id",type:"text",width:"2xl"}),l.repo_id&&u.repo_id?y.jsx(ur,{children:l.repo_id}):y.jsx(lr,{margin:0,children:t("modelmanager:repoIDValidationMsg")})]})]})]}),y.jsxs(t4,{children:[y.jsx(fn,{fontWeight:"bold",children:t("modelmanager:formMessageDiffusersVAELocation")}),y.jsx(fn,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelmanager:formMessageDiffusersVAELocationDesc")}),y.jsxs(dn,{isInvalid:!!((d=l.vae)!=null&&d.path)&&((h=u.vae)==null?void 0:h.path),children:[y.jsx(Pn,{htmlFor:"vae.path",fontSize:"sm",children:t("modelmanager:vaeLocation")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"vae.path",name:"vae.path",type:"text",width:"2xl"}),(g=l.vae)!=null&&g.path&&((v=u.vae)!=null&&v.path)?y.jsx(ur,{children:(b=l.vae)==null?void 0:b.path}):y.jsx(lr,{margin:0,children:t("modelmanager:vaeLocationValidationMsg")})]})]}),y.jsxs(dn,{isInvalid:!!((S=l.vae)!=null&&S.repo_id)&&((E=u.vae)==null?void 0:E.repo_id),children:[y.jsx(Pn,{htmlFor:"vae.repo_id",fontSize:"sm",children:t("modelmanager:vaeRepoID")}),y.jsxs(yn,{alignItems:"start",children:[y.jsx(dr,{as:Er,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"2xl"}),(_=l.vae)!=null&&_.repo_id&&((k=u.vae)!=null&&k.repo_id)?y.jsx(ur,{children:(T=l.vae)==null?void 0:T.repo_id}):y.jsx(lr,{margin:0,children:t("modelmanager:vaeRepoIDValidationMsg")})]})]})]}),y.jsx(cr,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelmanager:addModel")})]})})}})]})}function gj({text:e,onClick:t}){return y.jsx(Ge,{position:"relative",width:"50%",height:"200px",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",justifyContent:"center",alignItems:"center",_hover:{cursor:"pointer",backgroundColor:"var(--accent-color)"},onClick:t,children:y.jsx(fn,{fontWeight:"bold",children:e})})}function Eze(){const{isOpen:e,onOpen:t,onClose:n}=Wh(),r=he(s=>s.ui.addNewModelUIOption),i=Ie(),{t:o}=We(),a=()=>{n(),i(zh(null))};return y.jsxs(y.Fragment,{children:[y.jsx(cr,{"aria-label":o("modelmanager:addNewModel"),tooltip:o("modelmanager:addNewModel"),onClick:t,className:"modal-close-btn",size:"sm",children:y.jsxs(Ge,{columnGap:"0.5rem",alignItems:"center",children:[y.jsx(Wy,{}),o("modelmanager:addNew")]})}),y.jsxs(Yd,{isOpen:e,onClose:a,size:"3xl",closeOnOverlayClick:!1,children:[y.jsx(Kd,{}),y.jsxs(Qh,{className:"modal add-model-modal",fontFamily:"Inter",children:[y.jsx(C0,{children:o("modelmanager:addNewModel")}),y.jsx(My,{marginTop:"0.3rem"}),y.jsxs(i0,{className:"add-model-modal-body",children:[r==null&&y.jsxs(Ge,{columnGap:"1rem",children:[y.jsx(gj,{text:o("modelmanager:addCheckpointModel"),onClick:()=>i(zh("ckpt"))}),y.jsx(gj,{text:o("modelmanager:addDiffuserModel"),onClick:()=>i(zh("diffusers"))})]}),r=="ckpt"&&y.jsx(_ze,{}),r=="diffusers"&&y.jsx(kze,{})]})]})]})]})}function n4(e){const{isProcessing:t,isConnected:n}=he(v=>v.system),r=he(v=>v.system.openModel),{t:i}=We(),o=Ie(),{name:a,status:s,description:l}=e,u=()=>{o(fq(a))},d=()=>{o(VR(a))},h=()=>{o(I8e(a)),o(VR(null))},g=()=>{switch(s){case"active":return"var(--status-good-color)";case"cached":return"var(--status-working-color)";case"not loaded":return"var(--text-color-secondary)"}};return y.jsxs(Ge,{alignItems:"center",padding:"0.5rem 0.5rem",borderRadius:"0.2rem",backgroundColor:a===r?"var(--accent-color)":"",_hover:{backgroundColor:a===r?"var(--accent-color)":"var(--background-color)"},children:[y.jsx(ko,{onClick:d,cursor:"pointer",children:y.jsx(uo,{label:l,hasArrow:!0,placement:"bottom",children:y.jsx(fn,{fontWeight:"bold",children:a})})}),y.jsx(EF,{onClick:d,cursor:"pointer"}),y.jsxs(Ge,{gap:2,alignItems:"center",children:[y.jsx(fn,{color:g(),children:s}),y.jsx(as,{size:"sm",onClick:u,isDisabled:s==="active"||t||!n,className:"modal-close-btn",children:i("modelmanager:load")}),y.jsx(Ze,{icon:y.jsx(CPe,{}),size:"sm",onClick:d,"aria-label":"Modify Config",isDisabled:s==="active"||t||!n,className:" modal-close-btn"}),y.jsx(yT,{title:i("modelmanager:deleteModel"),acceptCallback:h,acceptButtonText:i("modelmanager:delete"),triggerComponent:y.jsx(Ze,{icon:y.jsx(wPe,{}),size:"sm","aria-label":i("modelmanager:deleteConfig"),isDisabled:s==="active"||t||!n,className:" modal-close-btn",style:{backgroundColor:"var(--btn-delete-image)"}}),children:y.jsxs(Ge,{rowGap:"1rem",flexDirection:"column",children:[y.jsx("p",{style:{fontWeight:"bold"},children:i("modelmanager:deleteMsg1")}),y.jsx("p",{style:{color:"var(--text-color-secondary"},children:i("modelmanager:deleteMsg2")})]})})]})]})}const Pze=at(ir,e=>ke.map(e.model_list,(n,r)=>({name:r,...n})),{memoizeOptions:{resultEqualityCheck:ke.isEqual}});function t7({label:e,isActive:t,onClick:n}){return y.jsx(cr,{onClick:n,isActive:t,_active:{backgroundColor:"var(--accent-color)",_hover:{backgroundColor:"var(--accent-color)"}},size:"sm",children:e})}const Tze=()=>{const e=he(Pze),[t,n]=w.useState(""),[r,i]=w.useState("all"),[o,a]=w.useTransition(),{t:s}=We(),l=d=>{a(()=>{n(d.target.value)})},u=w.useMemo(()=>{const d=[],h=[],g=[],v=[];return e.forEach((b,S)=>{b.name.toLowerCase().includes(t.toLowerCase())&&(g.push(y.jsx(n4,{name:b.name,status:b.status,description:b.description},S)),b.format===r&&v.push(y.jsx(n4,{name:b.name,status:b.status,description:b.description},S))),b.format!=="diffusers"?d.push(y.jsx(n4,{name:b.name,status:b.status,description:b.description},S)):h.push(y.jsx(n4,{name:b.name,status:b.status,description:b.description},S))}),t!==""?r==="all"?y.jsx(ko,{marginTop:"1rem",children:g}):y.jsx(ko,{marginTop:"1rem",children:v}):y.jsxs(Ge,{flexDirection:"column",rowGap:"1.5rem",children:[r==="all"&&y.jsxs(y.Fragment,{children:[y.jsxs(ko,{children:[y.jsx(fn,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",margin:"1rem 0",width:"max-content",fontSize:"14",children:s("modelmanager:checkpointModels")}),d]}),y.jsxs(ko,{children:[y.jsx(fn,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",marginBottom:"0.5rem",width:"max-content",fontSize:"14",children:s("modelmanager:diffusersModels")}),h]})]}),r==="ckpt"&&y.jsx(Ge,{flexDirection:"column",marginTop:"1rem",children:d}),r==="diffusers"&&y.jsx(Ge,{flexDirection:"column",marginTop:"1rem",children:h})]})},[e,t,s,r]);return y.jsxs(Ge,{flexDirection:"column",rowGap:"2rem",width:"50%",minWidth:"50%",children:[y.jsxs(Ge,{justifyContent:"space-between",children:[y.jsx(fn,{fontSize:"1.4rem",fontWeight:"bold",children:s("modelmanager:availableModels")}),y.jsx(Eze,{})]}),y.jsx(Er,{onChange:l,label:s("modelmanager:search")}),y.jsxs(Ge,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-360,overflow:"scroll",paddingRight:"1rem",children:[y.jsxs(Ge,{columnGap:"0.5rem",children:[y.jsx(t7,{label:s("modelmanager:allModels"),onClick:()=>i("all"),isActive:r==="all"}),y.jsx(t7,{label:s("modelmanager:checkpointModels"),onClick:()=>i("ckpt"),isActive:r==="ckpt"}),y.jsx(t7,{label:s("modelmanager:diffusersModels"),onClick:()=>i("diffusers"),isActive:r==="diffusers"})]}),u]})]})};function Lze({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Wh(),i=he(s=>s.system.model_list),o=he(s=>s.system.openModel),{t:a}=We();return y.jsxs(y.Fragment,{children:[w.cloneElement(e,{onClick:n}),y.jsxs(Yd,{isOpen:t,onClose:r,size:"6xl",children:[y.jsx(Kd,{}),y.jsxs(Qh,{className:"modal",fontFamily:"Inter",children:[y.jsx(My,{className:"modal-close-btn"}),y.jsx(C0,{fontWeight:"bold",children:a("modelmanager:modelManager")}),y.jsxs(Ge,{padding:"0 1.5rem 1.5rem 1.5rem",width:"100%",columnGap:"2rem",children:[y.jsx(Tze,{}),o&&i[o].format==="diffusers"?y.jsx(xze,{}):y.jsx(bze,{})]})]})]})]})}const Aze=at([ir],e=>{const{isProcessing:t,model_list:n}=e;return{models:ke.map(n,(i,o)=>o),isProcessing:t}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),Oze=()=>{const e=Ie(),{models:t,isProcessing:n}=he(Aze),r=he(gq),i=o=>{e(fq(o.target.value))};return y.jsx(Ge,{style:{paddingLeft:"0.3rem"},children:y.jsx(tl,{style:{fontSize:"0.8rem"},tooltip:r.description,isDisabled:n,value:r.name,validValues:t,onChange:i})})},Mze=at([ir,yp],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldUseCanvasBetaLayout:l}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:ke.map(o,(u,d)=>d),saveIntermediatesInterval:a,enableImageDebugging:s,shouldUseCanvasBetaLayout:l}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),Ize=({children:e})=>{const t=Ie(),{t:n}=We(),r=he(k=>k.generation.steps),{isOpen:i,onOpen:o,onClose:a}=Wh(),{isOpen:s,onOpen:l,onClose:u}=Wh(),{shouldDisplayInProgressType:d,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:v,enableImageDebugging:b,shouldUseCanvasBetaLayout:S}=he(Mze),E=()=>{mq.purge().then(()=>{a(),l()})},_=k=>{k>r&&(k=r),k<1&&(k=1),t(GCe(k))};return y.jsxs(y.Fragment,{children:[w.cloneElement(e,{onClick:o}),y.jsxs(Yd,{isOpen:i,onClose:a,size:"lg",children:[y.jsx(Kd,{}),y.jsxs(Qh,{className:"modal settings-modal",children:[y.jsx(C0,{className:"settings-modal-header",children:n("common:settingsLabel")}),y.jsx(My,{className:"modal-close-btn"}),y.jsxs(i0,{className:"settings-modal-content",children:[y.jsxs("div",{className:"settings-modal-items",children:[y.jsxs("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[y.jsx(tl,{label:n("settings:displayInProgress"),validValues:t9e,value:d,onChange:k=>t($Ce(k.target.value))}),d==="full-res"&&y.jsx(ra,{label:n("settings:saveSteps"),min:1,max:r,step:1,onChange:_,value:v,width:"auto",textAlign:"center"})]}),y.jsx(Vs,{styleClass:"settings-modal-item",label:n("settings:confirmOnDelete"),isChecked:h,onChange:k=>t(sG(k.target.checked))}),y.jsx(Vs,{styleClass:"settings-modal-item",label:n("settings:displayHelpIcons"),isChecked:g,onChange:k=>t(VCe(k.target.checked))}),y.jsx(Vs,{styleClass:"settings-modal-item",label:n("settings:useCanvasBeta"),isChecked:S,onChange:k=>t(o7e(k.target.checked))})]}),y.jsxs("div",{className:"settings-modal-items",children:[y.jsx("h2",{style:{fontWeight:"bold"},children:"Developer"}),y.jsx(Vs,{styleClass:"settings-modal-item",label:n("settings:enableImageDebugging"),isChecked:b,onChange:k=>t(qCe(k.target.checked))})]}),y.jsxs("div",{className:"settings-modal-reset",children:[y.jsx(Dh,{size:"md",children:n("settings:resetWebUI")}),y.jsx(as,{colorScheme:"red",onClick:E,children:n("settings:resetWebUI")}),y.jsx(fn,{children:n("settings:resetWebUIDesc1")}),y.jsx(fn,{children:n("settings:resetWebUIDesc2")})]})]}),y.jsx(wx,{children:y.jsx(as,{onClick:a,className:"modal-close-btn",children:n("common:close")})})]})]}),y.jsxs(Yd,{closeOnOverlayClick:!1,isOpen:s,onClose:u,isCentered:!0,children:[y.jsx(Kd,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),y.jsx(Qh,{children:y.jsx(i0,{pb:6,pt:6,children:y.jsx(Ge,{justifyContent:"center",children:y.jsx(fn,{fontSize:"lg",children:y.jsx(fn,{children:n("settings:resetComplete")})})})})})]})]})},Rze=at(ir,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),Dze=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=he(Rze),s=Ie(),{t:l}=We();let u;e&&!o?u="status-good":u="status-bad";let d=i;[l("common:statusGenerating"),l("common:statusPreparing"),l("common:statusSavingImage"),l("common:statusRestoringFaces"),l("common:statusUpscaling")].includes(d)&&(u="status-working"),d&&t&&r>1&&(d=`${l(d)} (${n}/${r})`);const g=o&&!a?"Click to clear, check logs for details":void 0,v=o&&!a?"pointer":"initial",b=()=>{(o||!a)&&s(lG())};return y.jsx(uo,{label:g,children:y.jsx(fn,{cursor:v,onClick:b,className:`status ${u}`,children:l(d)})})};function Nze(){const{t:e}=We(),{setColorMode:t,colorMode:n}=fy(),r=Ie(),i=he(l=>l.ui.currentTheme),o={dark:e("common:darkTheme"),light:e("common:lightTheme"),green:e("common:greenTheme")};w.useEffect(()=>{n!==i&&t(i)},[t,n,i]);const a=l=>{r(e7e(l))},s=()=>{const l=[];return Object.keys(o).forEach(u=>{l.push(y.jsx(cr,{style:{width:"6rem"},leftIcon:i===u?y.jsx(FP,{}):void 0,size:"sm",onClick:()=>a(u),children:o[u]},u))}),l};return y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{"aria-label":e("common:themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:y.jsx(lPe,{})}),children:y.jsx(yn,{align:"stretch",children:s()})})}function jze(){const{t:e,i18n:t}=We(),n={en:e("common:langEnglish"),nl:e("common:langDutch"),fr:e("common:langFrench"),de:e("common:langGerman"),it:e("common:langItalian"),ja:e("common:langJapanese"),pl:e("common:langPolish"),pt_br:e("common:langBrPortuguese"),ru:e("common:langRussian"),zh_cn:e("common:langSimplifiedChinese"),es:e("common:langSpanish"),ua:e("common:langUkranian")},r=()=>{const i=[];return Object.keys(n).forEach(o=>{i.push(y.jsx(cr,{"data-selected":localStorage.getItem("i18nextLng")===o,onClick:()=>t.changeLanguage(o),className:"modal-close-btn lang-select-btn","aria-label":n[o],tooltip:n[o],size:"sm",minWidth:"200px",children:n[o]},o))}),i};return y.jsx(Zs,{trigger:"hover",triggerComponent:y.jsx(Ze,{"aria-label":e("common:languagePickerLabel"),tooltip:e("common:languagePickerLabel"),icon:y.jsx(oPe,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:y.jsx(yn,{children:r()})})}const Bze=()=>{const{t:e}=We(),t=he(n=>n.system.app_version);return y.jsxs("div",{className:"site-header",children:[y.jsxs("div",{className:"site-header-left-side",children:[y.jsx("img",{src:QY,alt:"invoke-ai-logo"}),y.jsxs(Ge,{alignItems:"center",columnGap:"0.6rem",children:[y.jsxs(fn,{fontSize:"1.4rem",children:["invoke ",y.jsx("strong",{children:"ai"})]}),y.jsx(fn,{fontWeight:"bold",color:"var(--text-color-secondary)",marginTop:"0.2rem",children:t})]})]}),y.jsxs("div",{className:"site-header-right-side",children:[y.jsx(Dze,{}),y.jsx(Oze,{}),y.jsx(Lze,{children:y.jsx(Ze,{"aria-label":e("modelmanager:modelManager"),tooltip:e("modelmanager:modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:y.jsx(ZEe,{})})}),y.jsx(kNe,{children:y.jsx(Ze,{"aria-label":e("common:hotkeysLabel"),tooltip:e("common:hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:y.jsx(iPe,{})})}),y.jsx(Nze,{}),y.jsx(jze,{}),y.jsx(Ze,{"aria-label":e("common:reportBugLabel"),tooltip:e("common:reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:y.jsx(Nh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:y.jsx(XEe,{})})}),y.jsx(Ze,{"aria-label":e("common:githubLabel"),tooltip:e("common:githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:y.jsx(Nh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:y.jsx(UEe,{})})}),y.jsx(Ze,{"aria-label":e("common:discordLabel"),tooltip:e("common:discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:y.jsx(Nh,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:y.jsx(WEe,{})})}),y.jsx(Ize,{children:y.jsx(Ze,{"aria-label":e("common:settingsLabel"),tooltip:e("common:settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:y.jsx(BPe,{})})})]})]})};function $ze(){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)};(!{}.NODE_ENV||{}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}const Fze=()=>{const e=Ie(),t=he(eke),n=jy();w.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(KCe())},[e,n,t])},oX=at([Sp,yp,Or],(e,t,n)=>{const{shouldPinParametersPanel:r,shouldShowParametersPanel:i,shouldHoldParametersPanelOpen:o,shouldUseCanvasBetaLayout:a}=t,{shouldShowGallery:s,shouldPinGallery:l,shouldHoldGalleryOpen:u}=e,d=a&&n==="unifiedCanvas",h=!d&&!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),g=!(s||u&&!l)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinParametersPanel:r,shouldShowProcessButtons:!d&&(!r||!i),shouldShowParametersPanelButton:h,shouldShowParametersPanel:i,shouldShowGallery:s,shouldPinGallery:l,shouldShowGalleryButton:g}},{memoizeOptions:{resultEqualityCheck:ke.isEqual}}),zze=()=>{const e=Ie(),{shouldShowParametersPanel:t,shouldShowParametersPanelButton:n,shouldShowProcessButtons:r,shouldPinParametersPanel:i,shouldShowGallery:o,shouldPinGallery:a}=he(oX),s=()=>{e(Xu(!0)),i&&setTimeout(()=>e(vi(!0)),400)};return Je("f",()=>{o||t?(e(Xu(!1)),e($d(!1))):(e(Xu(!0)),e($d(!0))),(a||i)&&setTimeout(()=>e(vi(!0)),400)},[o,t]),n?y.jsxs("div",{className:"show-hide-button-options",children:[y.jsx(Ze,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:y.jsx(VP,{})}),r&&y.jsxs(y.Fragment,{children:[y.jsx(uT,{iconButton:!0}),y.jsx(sT,{})]})]}):null},Hze=()=>{const e=Ie(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowParametersPanel:i,shouldPinParametersPanel:o}=he(oX),a=()=>{e($d(!0)),r&&e(vi(!0))};return Je("f",()=>{t||i?(e(Xu(!1)),e($d(!1))):(e(Xu(!0)),e($d(!0))),(r||o)&&setTimeout(()=>e(vi(!0)),400)},[t,i]),n?y.jsx(Ze,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:y.jsx(Zq,{})}):null};$ze();const Vze=()=>(Fze(),y.jsxs("div",{className:"App",children:[y.jsxs(yNe,{children:[y.jsx(CNe,{}),y.jsxs("div",{className:"app-content",children:[y.jsx(Bze,{}),y.jsx(CDe,{})]}),y.jsx("div",{className:"app-console",children:y.jsx(xNe,{})})]}),y.jsx(zze,{}),y.jsx(Hze,{})]})),vj=()=>y.jsx(Ge,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:y.jsx(wy,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})});const Wze=Uj({key:"invokeai-style-cache",prepend:!0});i_.createRoot(document.getElementById("root")).render(y.jsx(N.StrictMode,{children:y.jsx(wSe,{store:pq,children:y.jsx($W,{loading:y.jsx(vj,{}),persistor:mq,children:y.jsx(gre,{value:Wze,children:y.jsx(z5e,{children:y.jsx(N.Suspense,{fallback:y.jsx(vj,{}),children:y.jsx(Vze,{})})})})})})}));
|