bbannotate 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,89 @@
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var Ng=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function C0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xm={exports:{}},ic={},Qm={exports:{}},Ne={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ma=Symbol.for("react.element"),$v=Symbol.for("react.portal"),Jv=Symbol.for("react.fragment"),Zv=Symbol.for("react.strict_mode"),e6=Symbol.for("react.profiler"),t6=Symbol.for("react.provider"),n6=Symbol.for("react.context"),r6=Symbol.for("react.forward_ref"),i6=Symbol.for("react.suspense"),s6=Symbol.for("react.memo"),o6=Symbol.for("react.lazy"),Tg=Symbol.iterator;function a6(t){return t===null||typeof t!="object"?null:(t=Tg&&t[Tg]||t["@@iterator"],typeof t=="function"?t:null)}var qm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$m=Object.assign,Jm={};function uo(t,e,n){this.props=t,this.context=e,this.refs=Jm,this.updater=n||qm}uo.prototype.isReactComponent={};uo.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};uo.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Zm(){}Zm.prototype=uo.prototype;function E0(t,e,n){this.props=t,this.context=e,this.refs=Jm,this.updater=n||qm}var P0=E0.prototype=new Zm;P0.constructor=E0;$m(P0,uo.prototype);P0.isPureReactComponent=!0;var Rg=Array.isArray,ey=Object.prototype.hasOwnProperty,N0={current:null},ty={key:!0,ref:!0,__self:!0,__source:!0};function ny(t,e,n){var r,s={},a=null,l=null;if(e!=null)for(r in e.ref!==void 0&&(l=e.ref),e.key!==void 0&&(a=""+e.key),e)ey.call(e,r)&&!ty.hasOwnProperty(r)&&(s[r]=e[r]);var c=arguments.length-2;if(c===1)s.children=n;else if(1<c){for(var d=Array(c),p=0;p<c;p++)d[p]=arguments[p+2];s.children=d}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)s[r]===void 0&&(s[r]=c[r]);return{$$typeof:Ma,type:t,key:a,ref:l,props:s,_owner:N0.current}}function l6(t,e){return{$$typeof:Ma,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function T0(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ma}function u6(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Lg=/\/+/g;function Ff(t,e){return typeof t=="object"&&t!==null&&t.key!=null?u6(""+t.key):e.toString(36)}function du(t,e,n,r,s){var a=typeof t;(a==="undefined"||a==="boolean")&&(t=null);var l=!1;if(t===null)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case Ma:case $v:l=!0}}if(l)return l=t,s=s(l),t=r===""?"."+Ff(l,0):r,Rg(s)?(n="",t!=null&&(n=t.replace(Lg,"$&/")+"/"),du(s,e,n,"",function(p){return p})):s!=null&&(T0(s)&&(s=l6(s,n+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(Lg,"$&/")+"/")+t)),e.push(s)),1;if(l=0,r=r===""?".":r+":",Rg(t))for(var c=0;c<t.length;c++){a=t[c];var d=r+Ff(a,c);l+=du(a,e,n,d,s)}else if(d=a6(t),typeof d=="function")for(t=d.call(t),c=0;!(a=t.next()).done;)a=a.value,d=r+Ff(a,c++),l+=du(a,e,n,d,s);else if(a==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return l}function Ul(t,e,n){if(t==null)return t;var r=[],s=0;return du(t,r,"","",function(a){return e.call(n,a,s++)}),r}function c6(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var $t={current:null},fu={transition:null},d6={ReactCurrentDispatcher:$t,ReactCurrentBatchConfig:fu,ReactCurrentOwner:N0};function ry(){throw Error("act(...) is not supported in production builds of React.")}Ne.Children={map:Ul,forEach:function(t,e,n){Ul(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Ul(t,function(){e++}),e},toArray:function(t){return Ul(t,function(e){return e})||[]},only:function(t){if(!T0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ne.Component=uo;Ne.Fragment=Jv;Ne.Profiler=e6;Ne.PureComponent=E0;Ne.StrictMode=Zv;Ne.Suspense=i6;Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d6;Ne.act=ry;Ne.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=$m({},t.props),s=t.key,a=t.ref,l=t._owner;if(e!=null){if(e.ref!==void 0&&(a=e.ref,l=N0.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(d in e)ey.call(e,d)&&!ty.hasOwnProperty(d)&&(r[d]=e[d]===void 0&&c!==void 0?c[d]:e[d])}var d=arguments.length-2;if(d===1)r.children=n;else if(1<d){c=Array(d);for(var p=0;p<d;p++)c[p]=arguments[p+2];r.children=c}return{$$typeof:Ma,type:t.type,key:s,ref:a,props:r,_owner:l}};Ne.createContext=function(t){return t={$$typeof:n6,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:t6,_context:t},t.Consumer=t};Ne.createElement=ny;Ne.createFactory=function(t){var e=ny.bind(null,t);return e.type=t,e};Ne.createRef=function(){return{current:null}};Ne.forwardRef=function(t){return{$$typeof:r6,render:t}};Ne.isValidElement=T0;Ne.lazy=function(t){return{$$typeof:o6,_payload:{_status:-1,_result:t},_init:c6}};Ne.memo=function(t,e){return{$$typeof:s6,type:t,compare:e===void 0?null:e}};Ne.startTransition=function(t){var e=fu.transition;fu.transition={};try{t()}finally{fu.transition=e}};Ne.unstable_act=ry;Ne.useCallback=function(t,e){return $t.current.useCallback(t,e)};Ne.useContext=function(t){return $t.current.useContext(t)};Ne.useDebugValue=function(){};Ne.useDeferredValue=function(t){return $t.current.useDeferredValue(t)};Ne.useEffect=function(t,e){return $t.current.useEffect(t,e)};Ne.useId=function(){return $t.current.useId()};Ne.useImperativeHandle=function(t,e,n){return $t.current.useImperativeHandle(t,e,n)};Ne.useInsertionEffect=function(t,e){return $t.current.useInsertionEffect(t,e)};Ne.useLayoutEffect=function(t,e){return $t.current.useLayoutEffect(t,e)};Ne.useMemo=function(t,e){return $t.current.useMemo(t,e)};Ne.useReducer=function(t,e,n){return $t.current.useReducer(t,e,n)};Ne.useRef=function(t){return $t.current.useRef(t)};Ne.useState=function(t){return $t.current.useState(t)};Ne.useSyncExternalStore=function(t,e,n){return $t.current.useSyncExternalStore(t,e,n)};Ne.useTransition=function(){return $t.current.useTransition()};Ne.version="18.3.1";Qm.exports=Ne;var V=Qm.exports;const Qt=C0(V);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var f6=V,h6=Symbol.for("react.element"),p6=Symbol.for("react.fragment"),g6=Object.prototype.hasOwnProperty,m6=f6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y6={key:!0,ref:!0,__self:!0,__source:!0};function iy(t,e,n){var r,s={},a=null,l=null;n!==void 0&&(a=""+n),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(l=e.ref);for(r in e)g6.call(e,r)&&!y6.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:h6,type:t,key:a,ref:l,props:s,_owner:m6.current}}ic.Fragment=p6;ic.jsx=iy;ic.jsxs=iy;Xm.exports=ic;var A=Xm.exports,sy={exports:{}},Sn={},oy={exports:{}},ay={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(t){function e(G,Z){var Q=G.length;G.push(Z);e:for(;0<Q;){var q=Q-1>>>1,te=G[q];if(0<s(te,Z))G[q]=Z,G[Q]=te,Q=q;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var Z=G[0],Q=G.pop();if(Q!==Z){G[0]=Q;e:for(var q=0,te=G.length,we=te>>>1;q<we;){var Be=2*(q+1)-1,Ke=G[Be],je=Be+1,O=G[je];if(0>s(Ke,Q))je<te&&0>s(O,Ke)?(G[q]=O,G[je]=Q,q=je):(G[q]=Ke,G[Be]=Q,q=Be);else if(je<te&&0>s(O,Q))G[q]=O,G[je]=Q,q=je;else break e}}return Z}function s(G,Z){var Q=G.sortIndex-Z.sortIndex;return Q!==0?Q:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var d=[],p=[],m=1,w=null,_=3,P=!1,y=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(G){for(var Z=n(p);Z!==null;){if(Z.callback===null)r(p);else if(Z.startTime<=G)r(p),Z.sortIndex=Z.expirationTime,e(d,Z);else break;Z=n(p)}}function x(G){if(E=!1,g(G),!y)if(n(d)!==null)y=!0,ce(T);else{var Z=n(p);Z!==null&&ve(x,Z.startTime-G)}}function T(G,Z){y=!1,E&&(E=!1,S(L),L=-1),P=!0;var Q=_;try{for(g(Z),w=n(d);w!==null&&(!(w.expirationTime>Z)||G&&!B());){var q=w.callback;if(typeof q=="function"){w.callback=null,_=w.priorityLevel;var te=q(w.expirationTime<=Z);Z=t.unstable_now(),typeof te=="function"?w.callback=te:w===n(d)&&r(d),g(Z)}else r(d);w=n(d)}if(w!==null)var we=!0;else{var Be=n(p);Be!==null&&ve(x,Be.startTime-Z),we=!1}return we}finally{w=null,_=Q,P=!1}}var R=!1,M=null,L=-1,b=5,F=-1;function B(){return!(t.unstable_now()-F<b)}function W(){if(M!==null){var G=t.unstable_now();F=G;var Z=!0;try{Z=M(!0,G)}finally{Z?X():(R=!1,M=null)}}else R=!1}var X;if(typeof C=="function")X=function(){C(W)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ee=ie.port2;ie.port1.onmessage=W,X=function(){ee.postMessage(null)}}else X=function(){k(W,0)};function ce(G){M=G,R||(R=!0,X())}function ve(G,Z){L=k(function(){G(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_continueExecution=function(){y||P||(y=!0,ce(T))},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return _},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(G){switch(_){case 1:case 2:case 3:var Z=3;break;default:Z=_}var Q=_;_=Z;try{return G()}finally{_=Q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Q=_;_=G;try{return Z()}finally{_=Q}},t.unstable_scheduleCallback=function(G,Z,Q){var q=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?q+Q:q):Q=q,G){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=Q+te,G={id:m++,callback:Z,priorityLevel:G,startTime:Q,expirationTime:te,sortIndex:-1},Q>q?(G.sortIndex=Q,e(p,G),n(d)===null&&G===n(p)&&(E?(S(L),L=-1):E=!0,ve(x,Q-q))):(G.sortIndex=te,e(d,G),y||P||(y=!0,ce(T))),G},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(G){var Z=_;return function(){var Q=_;_=Z;try{return G.apply(this,arguments)}finally{_=Q}}}})(ay);oy.exports=ay;var ra=oy.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var v6=V,_n=ra;function Y(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ly=new Set,ha={};function is(t,e){Js(t,e),Js(t+"Capture",e)}function Js(t,e){for(ha[t]=e,t=0;t<e.length;t++)ly.add(e[t])}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vh=Object.prototype.hasOwnProperty,_6=/^[: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]*$/,Ag={},Fg={};function S6(t){return vh.call(Fg,t)?!0:vh.call(Ag,t)?!1:_6.test(t)?Fg[t]=!0:(Ag[t]=!0,!1)}function x6(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function w6(t,e,n,r){if(e===null||typeof e>"u"||x6(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Jt(t,e,n,r,s,a,l){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=l}var Dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Dt[t]=new Jt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Dt[e]=new Jt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Dt[t]=new Jt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Dt[t]=new Jt(t,2,!1,t,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(t){Dt[t]=new Jt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Dt[t]=new Jt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Dt[t]=new Jt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Dt[t]=new Jt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Dt[t]=new Jt(t,5,!1,t.toLowerCase(),null,!1,!1)});var R0=/[\-:]([a-z])/g;function L0(t){return t[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(t){var e=t.replace(R0,L0);Dt[e]=new Jt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(R0,L0);Dt[e]=new Jt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(R0,L0);Dt[e]=new Jt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Dt[t]=new Jt(t,1,!1,t.toLowerCase(),null,!1,!1)});Dt.xlinkHref=new Jt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Dt[t]=new Jt(t,1,!1,t.toLowerCase(),null,!0,!0)});function A0(t,e,n,r){var s=Dt.hasOwnProperty(e)?Dt[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(w6(e,n,s,r)&&(n=null),r||s===null?S6(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var zr=v6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bl=Symbol.for("react.element"),Os=Symbol.for("react.portal"),Ds=Symbol.for("react.fragment"),F0=Symbol.for("react.strict_mode"),_h=Symbol.for("react.profiler"),uy=Symbol.for("react.provider"),cy=Symbol.for("react.context"),M0=Symbol.for("react.forward_ref"),Sh=Symbol.for("react.suspense"),xh=Symbol.for("react.suspense_list"),O0=Symbol.for("react.memo"),ri=Symbol.for("react.lazy"),dy=Symbol.for("react.offscreen"),Mg=Symbol.iterator;function Uo(t){return t===null||typeof t!="object"?null:(t=Mg&&t[Mg]||t["@@iterator"],typeof t=="function"?t:null)}var ot=Object.assign,Mf;function Jo(t){if(Mf===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Mf=e&&e[1]||""}return`
34
+ `+Mf+t}var Of=!1;function Df(t,e){if(!t||Of)return"";Of=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(p){var r=p}Reflect.construct(t,[],e)}else{try{e.call()}catch(p){r=p}t.call(e.prototype)}else{try{throw Error()}catch(p){r=p}t()}}catch(p){if(p&&r&&typeof p.stack=="string"){for(var s=p.stack.split(`
35
+ `),a=r.stack.split(`
36
+ `),l=s.length-1,c=a.length-1;1<=l&&0<=c&&s[l]!==a[c];)c--;for(;1<=l&&0<=c;l--,c--)if(s[l]!==a[c]){if(l!==1||c!==1)do if(l--,c--,0>c||s[l]!==a[c]){var d=`
37
+ `+s[l].replace(" at new "," at ");return t.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",t.displayName)),d}while(1<=l&&0<=c);break}}}finally{Of=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Jo(t):""}function k6(t){switch(t.tag){case 5:return Jo(t.type);case 16:return Jo("Lazy");case 13:return Jo("Suspense");case 19:return Jo("SuspenseList");case 0:case 2:case 15:return t=Df(t.type,!1),t;case 11:return t=Df(t.type.render,!1),t;case 1:return t=Df(t.type,!0),t;default:return""}}function wh(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ds:return"Fragment";case Os:return"Portal";case _h:return"Profiler";case F0:return"StrictMode";case Sh:return"Suspense";case xh:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case cy:return(t.displayName||"Context")+".Consumer";case uy:return(t._context.displayName||"Context")+".Provider";case M0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case O0:return e=t.displayName||null,e!==null?e:wh(t.type)||"Memo";case ri:e=t._payload,t=t._init;try{return wh(t(e))}catch{}}return null}function C6(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wh(e);case 8:return e===F0?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function yi(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function fy(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function E6(t){var e=fy(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(l){r=""+l,a.call(this,l)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Gl(t){t._valueTracker||(t._valueTracker=E6(t))}function hy(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=fy(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Tu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function kh(t,e){var n=e.checked;return ot({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Og(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=yi(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function py(t,e){e=e.checked,e!=null&&A0(t,"checked",e,!1)}function Ch(t,e){py(t,e);var n=yi(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Eh(t,e.type,n):e.hasOwnProperty("defaultValue")&&Eh(t,e.type,yi(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Dg(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Eh(t,e,n){(e!=="number"||Tu(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Zo=Array.isArray;function Ks(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+yi(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Ph(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Y(91));return ot({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Ig(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(Y(92));if(Zo(n)){if(1<n.length)throw Error(Y(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:yi(n)}}function gy(t,e){var n=yi(e.value),r=yi(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function bg(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function my(t){switch(t){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 Nh(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?my(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Hl,yy=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Hl=Hl||document.createElement("div"),Hl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Hl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function pa(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ia={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},P6=["Webkit","ms","Moz","O"];Object.keys(ia).forEach(function(t){P6.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ia[e]=ia[t]})});function vy(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ia.hasOwnProperty(t)&&ia[t]?(""+e).trim():e+"px"}function _y(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=vy(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var N6=ot({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 Th(t,e){if(e){if(N6[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Y(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Y(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Y(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Y(62))}}function Rh(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Lh=null;function D0(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ah=null,Ys=null,Xs=null;function jg(t){if(t=Ia(t)){if(typeof Ah!="function")throw Error(Y(280));var e=t.stateNode;e&&(e=uc(e),Ah(t.stateNode,t.type,e))}}function Sy(t){Ys?Xs?Xs.push(t):Xs=[t]:Ys=t}function xy(){if(Ys){var t=Ys,e=Xs;if(Xs=Ys=null,jg(t),e)for(t=0;t<e.length;t++)jg(e[t])}}function wy(t,e){return t(e)}function ky(){}var If=!1;function Cy(t,e,n){if(If)return t(e,n);If=!0;try{return wy(t,e,n)}finally{If=!1,(Ys!==null||Xs!==null)&&(ky(),xy())}}function ga(t,e){var n=t.stateNode;if(n===null)return null;var r=uc(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(Y(231,e,typeof n));return n}var Fh=!1;if(Dr)try{var Bo={};Object.defineProperty(Bo,"passive",{get:function(){Fh=!0}}),window.addEventListener("test",Bo,Bo),window.removeEventListener("test",Bo,Bo)}catch{Fh=!1}function T6(t,e,n,r,s,a,l,c,d){var p=Array.prototype.slice.call(arguments,3);try{e.apply(n,p)}catch(m){this.onError(m)}}var sa=!1,Ru=null,Lu=!1,Mh=null,R6={onError:function(t){sa=!0,Ru=t}};function L6(t,e,n,r,s,a,l,c,d){sa=!1,Ru=null,T6.apply(R6,arguments)}function A6(t,e,n,r,s,a,l,c,d){if(L6.apply(this,arguments),sa){if(sa){var p=Ru;sa=!1,Ru=null}else throw Error(Y(198));Lu||(Lu=!0,Mh=p)}}function ss(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Ey(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function zg(t){if(ss(t)!==t)throw Error(Y(188))}function F6(t){var e=t.alternate;if(!e){if(e=ss(t),e===null)throw Error(Y(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var a=s.alternate;if(a===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===n)return zg(s),t;if(a===r)return zg(s),e;a=a.sibling}throw Error(Y(188))}if(n.return!==r.return)n=s,r=a;else{for(var l=!1,c=s.child;c;){if(c===n){l=!0,n=s,r=a;break}if(c===r){l=!0,r=s,n=a;break}c=c.sibling}if(!l){for(c=a.child;c;){if(c===n){l=!0,n=a,r=s;break}if(c===r){l=!0,r=a,n=s;break}c=c.sibling}if(!l)throw Error(Y(189))}}if(n.alternate!==r)throw Error(Y(190))}if(n.tag!==3)throw Error(Y(188));return n.stateNode.current===n?t:e}function Py(t){return t=F6(t),t!==null?Ny(t):null}function Ny(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Ny(t);if(e!==null)return e;t=t.sibling}return null}var Ty=_n.unstable_scheduleCallback,Ug=_n.unstable_cancelCallback,M6=_n.unstable_shouldYield,O6=_n.unstable_requestPaint,ft=_n.unstable_now,D6=_n.unstable_getCurrentPriorityLevel,I0=_n.unstable_ImmediatePriority,Ry=_n.unstable_UserBlockingPriority,Au=_n.unstable_NormalPriority,I6=_n.unstable_LowPriority,Ly=_n.unstable_IdlePriority,sc=null,gr=null;function b6(t){if(gr&&typeof gr.onCommitFiberRoot=="function")try{gr.onCommitFiberRoot(sc,t,void 0,(t.current.flags&128)===128)}catch{}}var Qn=Math.clz32?Math.clz32:U6,j6=Math.log,z6=Math.LN2;function U6(t){return t>>>=0,t===0?32:31-(j6(t)/z6|0)|0}var Vl=64,Wl=4194304;function ea(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Fu(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,a=t.pingedLanes,l=n&268435455;if(l!==0){var c=l&~s;c!==0?r=ea(c):(a&=l,a!==0&&(r=ea(a)))}else l=n&~s,l!==0?r=ea(l):a!==0&&(r=ea(a));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,a=e&-e,s>=a||s===16&&(a&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Qn(e),s=1<<n,r|=t[n],e&=~s;return r}function B6(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 G6(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,a=t.pendingLanes;0<a;){var l=31-Qn(a),c=1<<l,d=s[l];d===-1?(!(c&n)||c&r)&&(s[l]=B6(c,e)):d<=e&&(t.expiredLanes|=c),a&=~c}}function Oh(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Ay(){var t=Vl;return Vl<<=1,!(Vl&4194240)&&(Vl=64),t}function bf(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Oa(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Qn(e),t[e]=n}function H6(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Qn(n),a=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~a}}function b0(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Qn(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var ze=0;function Fy(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var My,j0,Oy,Dy,Iy,Dh=!1,Kl=[],ui=null,ci=null,di=null,ma=new Map,ya=new Map,si=[],V6="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 Bg(t,e){switch(t){case"focusin":case"focusout":ui=null;break;case"dragenter":case"dragleave":ci=null;break;case"mouseover":case"mouseout":di=null;break;case"pointerover":case"pointerout":ma.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ya.delete(e.pointerId)}}function Go(t,e,n,r,s,a){return t===null||t.nativeEvent!==a?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[s]},e!==null&&(e=Ia(e),e!==null&&j0(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function W6(t,e,n,r,s){switch(e){case"focusin":return ui=Go(ui,t,e,n,r,s),!0;case"dragenter":return ci=Go(ci,t,e,n,r,s),!0;case"mouseover":return di=Go(di,t,e,n,r,s),!0;case"pointerover":var a=s.pointerId;return ma.set(a,Go(ma.get(a)||null,t,e,n,r,s)),!0;case"gotpointercapture":return a=s.pointerId,ya.set(a,Go(ya.get(a)||null,t,e,n,r,s)),!0}return!1}function by(t){var e=Wi(t.target);if(e!==null){var n=ss(e);if(n!==null){if(e=n.tag,e===13){if(e=Ey(n),e!==null){t.blockedOn=e,Iy(t.priority,function(){Oy(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function hu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Ih(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Lh=r,n.target.dispatchEvent(r),Lh=null}else return e=Ia(n),e!==null&&j0(e),t.blockedOn=n,!1;e.shift()}return!0}function Gg(t,e,n){hu(t)&&n.delete(e)}function K6(){Dh=!1,ui!==null&&hu(ui)&&(ui=null),ci!==null&&hu(ci)&&(ci=null),di!==null&&hu(di)&&(di=null),ma.forEach(Gg),ya.forEach(Gg)}function Ho(t,e){t.blockedOn===e&&(t.blockedOn=null,Dh||(Dh=!0,_n.unstable_scheduleCallback(_n.unstable_NormalPriority,K6)))}function va(t){function e(s){return Ho(s,t)}if(0<Kl.length){Ho(Kl[0],t);for(var n=1;n<Kl.length;n++){var r=Kl[n];r.blockedOn===t&&(r.blockedOn=null)}}for(ui!==null&&Ho(ui,t),ci!==null&&Ho(ci,t),di!==null&&Ho(di,t),ma.forEach(e),ya.forEach(e),n=0;n<si.length;n++)r=si[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<si.length&&(n=si[0],n.blockedOn===null);)by(n),n.blockedOn===null&&si.shift()}var Qs=zr.ReactCurrentBatchConfig,Mu=!0;function Y6(t,e,n,r){var s=ze,a=Qs.transition;Qs.transition=null;try{ze=1,z0(t,e,n,r)}finally{ze=s,Qs.transition=a}}function X6(t,e,n,r){var s=ze,a=Qs.transition;Qs.transition=null;try{ze=4,z0(t,e,n,r)}finally{ze=s,Qs.transition=a}}function z0(t,e,n,r){if(Mu){var s=Ih(t,e,n,r);if(s===null)Yf(t,e,r,Ou,n),Bg(t,r);else if(W6(s,t,e,n,r))r.stopPropagation();else if(Bg(t,r),e&4&&-1<V6.indexOf(t)){for(;s!==null;){var a=Ia(s);if(a!==null&&My(a),a=Ih(t,e,n,r),a===null&&Yf(t,e,r,Ou,n),a===s)break;s=a}s!==null&&r.stopPropagation()}else Yf(t,e,r,null,n)}}var Ou=null;function Ih(t,e,n,r){if(Ou=null,t=D0(r),t=Wi(t),t!==null)if(e=ss(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Ey(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ou=t,null}function jy(t){switch(t){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(D6()){case I0:return 1;case Ry:return 4;case Au:case I6:return 16;case Ly:return 536870912;default:return 16}default:return 16}}var ai=null,U0=null,pu=null;function zy(){if(pu)return pu;var t,e=U0,n=e.length,r,s="value"in ai?ai.value:ai.textContent,a=s.length;for(t=0;t<n&&e[t]===s[t];t++);var l=n-t;for(r=1;r<=l&&e[n-r]===s[a-r];r++);return pu=s.slice(t,1<r?1-r:void 0)}function gu(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Yl(){return!0}function Hg(){return!1}function xn(t){function e(n,r,s,a,l){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var c in t)t.hasOwnProperty(c)&&(n=t[c],this[c]=n?n(a):a[c]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Yl:Hg,this.isPropagationStopped=Hg,this}return ot(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Yl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Yl)},persist:function(){},isPersistent:Yl}),e}var co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},B0=xn(co),Da=ot({},co,{view:0,detail:0}),Q6=xn(Da),jf,zf,Vo,oc=ot({},Da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:G0,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vo&&(Vo&&t.type==="mousemove"?(jf=t.screenX-Vo.screenX,zf=t.screenY-Vo.screenY):zf=jf=0,Vo=t),jf)},movementY:function(t){return"movementY"in t?t.movementY:zf}}),Vg=xn(oc),q6=ot({},oc,{dataTransfer:0}),$6=xn(q6),J6=ot({},Da,{relatedTarget:0}),Uf=xn(J6),Z6=ot({},co,{animationName:0,elapsedTime:0,pseudoElement:0}),e8=xn(Z6),t8=ot({},co,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),n8=xn(t8),r8=ot({},co,{data:0}),Wg=xn(r8),i8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s8={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"},o8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function a8(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=o8[t])?!!e[t]:!1}function G0(){return a8}var l8=ot({},Da,{key:function(t){if(t.key){var e=i8[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=gu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?s8[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:G0,charCode:function(t){return t.type==="keypress"?gu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?gu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),u8=xn(l8),c8=ot({},oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kg=xn(c8),d8=ot({},Da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:G0}),f8=xn(d8),h8=ot({},co,{propertyName:0,elapsedTime:0,pseudoElement:0}),p8=xn(h8),g8=ot({},oc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),m8=xn(g8),y8=[9,13,27,32],H0=Dr&&"CompositionEvent"in window,oa=null;Dr&&"documentMode"in document&&(oa=document.documentMode);var v8=Dr&&"TextEvent"in window&&!oa,Uy=Dr&&(!H0||oa&&8<oa&&11>=oa),Yg=" ",Xg=!1;function By(t,e){switch(t){case"keyup":return y8.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Is=!1;function _8(t,e){switch(t){case"compositionend":return Gy(e);case"keypress":return e.which!==32?null:(Xg=!0,Yg);case"textInput":return t=e.data,t===Yg&&Xg?null:t;default:return null}}function S8(t,e){if(Is)return t==="compositionend"||!H0&&By(t,e)?(t=zy(),pu=U0=ai=null,Is=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Uy&&e.locale!=="ko"?null:e.data;default:return null}}var x8={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 Qg(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!x8[t.type]:e==="textarea"}function Hy(t,e,n,r){Sy(r),e=Du(e,"onChange"),0<e.length&&(n=new B0("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var aa=null,_a=null;function w8(t){e4(t,0)}function ac(t){var e=zs(t);if(hy(e))return t}function k8(t,e){if(t==="change")return e}var Vy=!1;if(Dr){var Bf;if(Dr){var Gf="oninput"in document;if(!Gf){var qg=document.createElement("div");qg.setAttribute("oninput","return;"),Gf=typeof qg.oninput=="function"}Bf=Gf}else Bf=!1;Vy=Bf&&(!document.documentMode||9<document.documentMode)}function $g(){aa&&(aa.detachEvent("onpropertychange",Wy),_a=aa=null)}function Wy(t){if(t.propertyName==="value"&&ac(_a)){var e=[];Hy(e,_a,t,D0(t)),Cy(w8,e)}}function C8(t,e,n){t==="focusin"?($g(),aa=e,_a=n,aa.attachEvent("onpropertychange",Wy)):t==="focusout"&&$g()}function E8(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ac(_a)}function P8(t,e){if(t==="click")return ac(e)}function N8(t,e){if(t==="input"||t==="change")return ac(e)}function T8(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Jn=typeof Object.is=="function"?Object.is:T8;function Sa(t,e){if(Jn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!vh.call(e,s)||!Jn(t[s],e[s]))return!1}return!0}function Jg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Zg(t,e){var n=Jg(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jg(n)}}function Ky(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ky(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Yy(){for(var t=window,e=Tu();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Tu(t.document)}return e}function V0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function R8(t){var e=Yy(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Ky(n.ownerDocument.documentElement,n)){if(r!==null&&V0(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!t.extend&&a>r&&(s=r,r=a,a=s),s=Zg(n,a);var l=Zg(n,r);s&&l&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==l.node||t.focusOffset!==l.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),a>r?(t.addRange(e),t.extend(l.node,l.offset)):(e.setEnd(l.node,l.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var L8=Dr&&"documentMode"in document&&11>=document.documentMode,bs=null,bh=null,la=null,jh=!1;function e2(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jh||bs==null||bs!==Tu(r)||(r=bs,"selectionStart"in r&&V0(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}),la&&Sa(la,r)||(la=r,r=Du(bh,"onSelect"),0<r.length&&(e=new B0("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=bs)))}function Xl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var js={animationend:Xl("Animation","AnimationEnd"),animationiteration:Xl("Animation","AnimationIteration"),animationstart:Xl("Animation","AnimationStart"),transitionend:Xl("Transition","TransitionEnd")},Hf={},Xy={};Dr&&(Xy=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function lc(t){if(Hf[t])return Hf[t];if(!js[t])return t;var e=js[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Xy)return Hf[t]=e[n];return t}var Qy=lc("animationend"),qy=lc("animationiteration"),$y=lc("animationstart"),Jy=lc("transitionend"),Zy=new Map,t2="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 Si(t,e){Zy.set(t,e),is(e,[t])}for(var Vf=0;Vf<t2.length;Vf++){var Wf=t2[Vf],A8=Wf.toLowerCase(),F8=Wf[0].toUpperCase()+Wf.slice(1);Si(A8,"on"+F8)}Si(Qy,"onAnimationEnd");Si(qy,"onAnimationIteration");Si($y,"onAnimationStart");Si("dblclick","onDoubleClick");Si("focusin","onFocus");Si("focusout","onBlur");Si(Jy,"onTransitionEnd");Js("onMouseEnter",["mouseout","mouseover"]);Js("onMouseLeave",["mouseout","mouseover"]);Js("onPointerEnter",["pointerout","pointerover"]);Js("onPointerLeave",["pointerout","pointerover"]);is("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));is("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));is("onBeforeInput",["compositionend","keypress","textInput","paste"]);is("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));is("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));is("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ta="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(" "),M8=new Set("cancel close invalid load scroll toggle".split(" ").concat(ta));function n2(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,A6(r,e,void 0,t),t.currentTarget=null}function e4(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var a=void 0;if(e)for(var l=r.length-1;0<=l;l--){var c=r[l],d=c.instance,p=c.currentTarget;if(c=c.listener,d!==a&&s.isPropagationStopped())break e;n2(s,c,p),a=d}else for(l=0;l<r.length;l++){if(c=r[l],d=c.instance,p=c.currentTarget,c=c.listener,d!==a&&s.isPropagationStopped())break e;n2(s,c,p),a=d}}}if(Lu)throw t=Mh,Lu=!1,Mh=null,t}function Qe(t,e){var n=e[Hh];n===void 0&&(n=e[Hh]=new Set);var r=t+"__bubble";n.has(r)||(t4(e,t,2,!1),n.add(r))}function Kf(t,e,n){var r=0;e&&(r|=4),t4(n,t,r,e)}var Ql="_reactListening"+Math.random().toString(36).slice(2);function xa(t){if(!t[Ql]){t[Ql]=!0,ly.forEach(function(n){n!=="selectionchange"&&(M8.has(n)||Kf(n,!1,t),Kf(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ql]||(e[Ql]=!0,Kf("selectionchange",!1,e))}}function t4(t,e,n,r){switch(jy(e)){case 1:var s=Y6;break;case 4:s=X6;break;default:s=z0}n=s.bind(null,e,n,t),s=void 0,!Fh||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function Yf(t,e,n,r,s){var a=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var c=r.stateNode.containerInfo;if(c===s||c.nodeType===8&&c.parentNode===s)break;if(l===4)for(l=r.return;l!==null;){var d=l.tag;if((d===3||d===4)&&(d=l.stateNode.containerInfo,d===s||d.nodeType===8&&d.parentNode===s))return;l=l.return}for(;c!==null;){if(l=Wi(c),l===null)return;if(d=l.tag,d===5||d===6){r=a=l;continue e}c=c.parentNode}}r=r.return}Cy(function(){var p=a,m=D0(n),w=[];e:{var _=Zy.get(t);if(_!==void 0){var P=B0,y=t;switch(t){case"keypress":if(gu(n)===0)break e;case"keydown":case"keyup":P=u8;break;case"focusin":y="focus",P=Uf;break;case"focusout":y="blur",P=Uf;break;case"beforeblur":case"afterblur":P=Uf;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":P=Vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=$6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=f8;break;case Qy:case qy:case $y:P=e8;break;case Jy:P=p8;break;case"scroll":P=Q6;break;case"wheel":P=m8;break;case"copy":case"cut":case"paste":P=n8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Kg}var E=(e&4)!==0,k=!E&&t==="scroll",S=E?_!==null?_+"Capture":null:_;E=[];for(var C=p,g;C!==null;){g=C;var x=g.stateNode;if(g.tag===5&&x!==null&&(g=x,S!==null&&(x=ga(C,S),x!=null&&E.push(wa(C,x,g)))),k)break;C=C.return}0<E.length&&(_=new P(_,y,null,n,m),w.push({event:_,listeners:E}))}}if(!(e&7)){e:{if(_=t==="mouseover"||t==="pointerover",P=t==="mouseout"||t==="pointerout",_&&n!==Lh&&(y=n.relatedTarget||n.fromElement)&&(Wi(y)||y[Ir]))break e;if((P||_)&&(_=m.window===m?m:(_=m.ownerDocument)?_.defaultView||_.parentWindow:window,P?(y=n.relatedTarget||n.toElement,P=p,y=y?Wi(y):null,y!==null&&(k=ss(y),y!==k||y.tag!==5&&y.tag!==6)&&(y=null)):(P=null,y=p),P!==y)){if(E=Vg,x="onMouseLeave",S="onMouseEnter",C="mouse",(t==="pointerout"||t==="pointerover")&&(E=Kg,x="onPointerLeave",S="onPointerEnter",C="pointer"),k=P==null?_:zs(P),g=y==null?_:zs(y),_=new E(x,C+"leave",P,n,m),_.target=k,_.relatedTarget=g,x=null,Wi(m)===p&&(E=new E(S,C+"enter",y,n,m),E.target=g,E.relatedTarget=k,x=E),k=x,P&&y)t:{for(E=P,S=y,C=0,g=E;g;g=Rs(g))C++;for(g=0,x=S;x;x=Rs(x))g++;for(;0<C-g;)E=Rs(E),C--;for(;0<g-C;)S=Rs(S),g--;for(;C--;){if(E===S||S!==null&&E===S.alternate)break t;E=Rs(E),S=Rs(S)}E=null}else E=null;P!==null&&r2(w,_,P,E,!1),y!==null&&k!==null&&r2(w,k,y,E,!0)}}e:{if(_=p?zs(p):window,P=_.nodeName&&_.nodeName.toLowerCase(),P==="select"||P==="input"&&_.type==="file")var T=k8;else if(Qg(_))if(Vy)T=N8;else{T=E8;var R=C8}else(P=_.nodeName)&&P.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(T=P8);if(T&&(T=T(t,p))){Hy(w,T,n,m);break e}R&&R(t,_,p),t==="focusout"&&(R=_._wrapperState)&&R.controlled&&_.type==="number"&&Eh(_,"number",_.value)}switch(R=p?zs(p):window,t){case"focusin":(Qg(R)||R.contentEditable==="true")&&(bs=R,bh=p,la=null);break;case"focusout":la=bh=bs=null;break;case"mousedown":jh=!0;break;case"contextmenu":case"mouseup":case"dragend":jh=!1,e2(w,n,m);break;case"selectionchange":if(L8)break;case"keydown":case"keyup":e2(w,n,m)}var M;if(H0)e:{switch(t){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else Is?By(t,n)&&(L="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(Uy&&n.locale!=="ko"&&(Is||L!=="onCompositionStart"?L==="onCompositionEnd"&&Is&&(M=zy()):(ai=m,U0="value"in ai?ai.value:ai.textContent,Is=!0)),R=Du(p,L),0<R.length&&(L=new Wg(L,t,null,n,m),w.push({event:L,listeners:R}),M?L.data=M:(M=Gy(n),M!==null&&(L.data=M)))),(M=v8?_8(t,n):S8(t,n))&&(p=Du(p,"onBeforeInput"),0<p.length&&(m=new Wg("onBeforeInput","beforeinput",null,n,m),w.push({event:m,listeners:p}),m.data=M))}e4(w,e)})}function wa(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Du(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,a=s.stateNode;s.tag===5&&a!==null&&(s=a,a=ga(t,n),a!=null&&r.unshift(wa(t,a,s)),a=ga(t,e),a!=null&&r.push(wa(t,a,s))),t=t.return}return r}function Rs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function r2(t,e,n,r,s){for(var a=e._reactName,l=[];n!==null&&n!==r;){var c=n,d=c.alternate,p=c.stateNode;if(d!==null&&d===r)break;c.tag===5&&p!==null&&(c=p,s?(d=ga(n,a),d!=null&&l.unshift(wa(n,d,c))):s||(d=ga(n,a),d!=null&&l.push(wa(n,d,c)))),n=n.return}l.length!==0&&t.push({event:e,listeners:l})}var O8=/\r\n?/g,D8=/\u0000|\uFFFD/g;function i2(t){return(typeof t=="string"?t:""+t).replace(O8,`
38
+ `).replace(D8,"")}function ql(t,e,n){if(e=i2(e),i2(t)!==e&&n)throw Error(Y(425))}function Iu(){}var zh=null,Uh=null;function Bh(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Gh=typeof setTimeout=="function"?setTimeout:void 0,I8=typeof clearTimeout=="function"?clearTimeout:void 0,s2=typeof Promise=="function"?Promise:void 0,b8=typeof queueMicrotask=="function"?queueMicrotask:typeof s2<"u"?function(t){return s2.resolve(null).then(t).catch(j8)}:Gh;function j8(t){setTimeout(function(){throw t})}function Xf(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),va(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);va(e)}function fi(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function o2(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var fo=Math.random().toString(36).slice(2),hr="__reactFiber$"+fo,ka="__reactProps$"+fo,Ir="__reactContainer$"+fo,Hh="__reactEvents$"+fo,z8="__reactListeners$"+fo,U8="__reactHandles$"+fo;function Wi(t){var e=t[hr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ir]||n[hr]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=o2(t);t!==null;){if(n=t[hr])return n;t=o2(t)}return e}t=n,n=t.parentNode}return null}function Ia(t){return t=t[hr]||t[Ir],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function zs(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Y(33))}function uc(t){return t[ka]||null}var Vh=[],Us=-1;function xi(t){return{current:t}}function qe(t){0>Us||(t.current=Vh[Us],Vh[Us]=null,Us--)}function We(t,e){Us++,Vh[Us]=t.current,t.current=e}var vi={},Wt=xi(vi),ln=xi(!1),Ji=vi;function Zs(t,e){var n=t.type.contextTypes;if(!n)return vi;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=e[a];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function un(t){return t=t.childContextTypes,t!=null}function bu(){qe(ln),qe(Wt)}function a2(t,e,n){if(Wt.current!==vi)throw Error(Y(168));We(Wt,e),We(ln,n)}function n4(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(Y(108,C6(t)||"Unknown",s));return ot({},n,r)}function ju(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||vi,Ji=Wt.current,We(Wt,t),We(ln,ln.current),!0}function l2(t,e,n){var r=t.stateNode;if(!r)throw Error(Y(169));n?(t=n4(t,e,Ji),r.__reactInternalMemoizedMergedChildContext=t,qe(ln),qe(Wt),We(Wt,t)):qe(ln),We(ln,n)}var Lr=null,cc=!1,Qf=!1;function r4(t){Lr===null?Lr=[t]:Lr.push(t)}function B8(t){cc=!0,r4(t)}function wi(){if(!Qf&&Lr!==null){Qf=!0;var t=0,e=ze;try{var n=Lr;for(ze=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Lr=null,cc=!1}catch(s){throw Lr!==null&&(Lr=Lr.slice(t+1)),Ty(I0,wi),s}finally{ze=e,Qf=!1}}return null}var Bs=[],Gs=0,zu=null,Uu=0,Fn=[],Mn=0,Zi=null,Ar=1,Fr="";function Gi(t,e){Bs[Gs++]=Uu,Bs[Gs++]=zu,zu=t,Uu=e}function i4(t,e,n){Fn[Mn++]=Ar,Fn[Mn++]=Fr,Fn[Mn++]=Zi,Zi=t;var r=Ar;t=Fr;var s=32-Qn(r)-1;r&=~(1<<s),n+=1;var a=32-Qn(e)+s;if(30<a){var l=s-s%5;a=(r&(1<<l)-1).toString(32),r>>=l,s-=l,Ar=1<<32-Qn(e)+s|n<<s|r,Fr=a+t}else Ar=1<<a|n<<s|r,Fr=t}function W0(t){t.return!==null&&(Gi(t,1),i4(t,1,0))}function K0(t){for(;t===zu;)zu=Bs[--Gs],Bs[Gs]=null,Uu=Bs[--Gs],Bs[Gs]=null;for(;t===Zi;)Zi=Fn[--Mn],Fn[Mn]=null,Fr=Fn[--Mn],Fn[Mn]=null,Ar=Fn[--Mn],Fn[Mn]=null}var vn=null,yn=null,Ze=!1,Xn=null;function s4(t,e){var n=On(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function u2(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,vn=t,yn=fi(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,vn=t,yn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Zi!==null?{id:Ar,overflow:Fr}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=On(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,vn=t,yn=null,!0):!1;default:return!1}}function Wh(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Kh(t){if(Ze){var e=yn;if(e){var n=e;if(!u2(t,e)){if(Wh(t))throw Error(Y(418));e=fi(n.nextSibling);var r=vn;e&&u2(t,e)?s4(r,n):(t.flags=t.flags&-4097|2,Ze=!1,vn=t)}}else{if(Wh(t))throw Error(Y(418));t.flags=t.flags&-4097|2,Ze=!1,vn=t}}}function c2(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;vn=t}function $l(t){if(t!==vn)return!1;if(!Ze)return c2(t),Ze=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Bh(t.type,t.memoizedProps)),e&&(e=yn)){if(Wh(t))throw o4(),Error(Y(418));for(;e;)s4(t,e),e=fi(e.nextSibling)}if(c2(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Y(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){yn=fi(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}yn=null}}else yn=vn?fi(t.stateNode.nextSibling):null;return!0}function o4(){for(var t=yn;t;)t=fi(t.nextSibling)}function eo(){yn=vn=null,Ze=!1}function Y0(t){Xn===null?Xn=[t]:Xn.push(t)}var G8=zr.ReactCurrentBatchConfig;function Wo(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Y(309));var r=n.stateNode}if(!r)throw Error(Y(147,t));var s=r,a=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===a?e.ref:(e=function(l){var c=s.refs;l===null?delete c[a]:c[a]=l},e._stringRef=a,e)}if(typeof t!="string")throw Error(Y(284));if(!n._owner)throw Error(Y(290,t))}return t}function Jl(t,e){throw t=Object.prototype.toString.call(e),Error(Y(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function d2(t){var e=t._init;return e(t._payload)}function a4(t){function e(S,C){if(t){var g=S.deletions;g===null?(S.deletions=[C],S.flags|=16):g.push(C)}}function n(S,C){if(!t)return null;for(;C!==null;)e(S,C),C=C.sibling;return null}function r(S,C){for(S=new Map;C!==null;)C.key!==null?S.set(C.key,C):S.set(C.index,C),C=C.sibling;return S}function s(S,C){return S=mi(S,C),S.index=0,S.sibling=null,S}function a(S,C,g){return S.index=g,t?(g=S.alternate,g!==null?(g=g.index,g<C?(S.flags|=2,C):g):(S.flags|=2,C)):(S.flags|=1048576,C)}function l(S){return t&&S.alternate===null&&(S.flags|=2),S}function c(S,C,g,x){return C===null||C.tag!==6?(C=nh(g,S.mode,x),C.return=S,C):(C=s(C,g),C.return=S,C)}function d(S,C,g,x){var T=g.type;return T===Ds?m(S,C,g.props.children,x,g.key):C!==null&&(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===ri&&d2(T)===C.type)?(x=s(C,g.props),x.ref=Wo(S,C,g),x.return=S,x):(x=wu(g.type,g.key,g.props,null,S.mode,x),x.ref=Wo(S,C,g),x.return=S,x)}function p(S,C,g,x){return C===null||C.tag!==4||C.stateNode.containerInfo!==g.containerInfo||C.stateNode.implementation!==g.implementation?(C=rh(g,S.mode,x),C.return=S,C):(C=s(C,g.children||[]),C.return=S,C)}function m(S,C,g,x,T){return C===null||C.tag!==7?(C=qi(g,S.mode,x,T),C.return=S,C):(C=s(C,g),C.return=S,C)}function w(S,C,g){if(typeof C=="string"&&C!==""||typeof C=="number")return C=nh(""+C,S.mode,g),C.return=S,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Bl:return g=wu(C.type,C.key,C.props,null,S.mode,g),g.ref=Wo(S,null,C),g.return=S,g;case Os:return C=rh(C,S.mode,g),C.return=S,C;case ri:var x=C._init;return w(S,x(C._payload),g)}if(Zo(C)||Uo(C))return C=qi(C,S.mode,g,null),C.return=S,C;Jl(S,C)}return null}function _(S,C,g,x){var T=C!==null?C.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return T!==null?null:c(S,C,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Bl:return g.key===T?d(S,C,g,x):null;case Os:return g.key===T?p(S,C,g,x):null;case ri:return T=g._init,_(S,C,T(g._payload),x)}if(Zo(g)||Uo(g))return T!==null?null:m(S,C,g,x,null);Jl(S,g)}return null}function P(S,C,g,x,T){if(typeof x=="string"&&x!==""||typeof x=="number")return S=S.get(g)||null,c(C,S,""+x,T);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Bl:return S=S.get(x.key===null?g:x.key)||null,d(C,S,x,T);case Os:return S=S.get(x.key===null?g:x.key)||null,p(C,S,x,T);case ri:var R=x._init;return P(S,C,g,R(x._payload),T)}if(Zo(x)||Uo(x))return S=S.get(g)||null,m(C,S,x,T,null);Jl(C,x)}return null}function y(S,C,g,x){for(var T=null,R=null,M=C,L=C=0,b=null;M!==null&&L<g.length;L++){M.index>L?(b=M,M=null):b=M.sibling;var F=_(S,M,g[L],x);if(F===null){M===null&&(M=b);break}t&&M&&F.alternate===null&&e(S,M),C=a(F,C,L),R===null?T=F:R.sibling=F,R=F,M=b}if(L===g.length)return n(S,M),Ze&&Gi(S,L),T;if(M===null){for(;L<g.length;L++)M=w(S,g[L],x),M!==null&&(C=a(M,C,L),R===null?T=M:R.sibling=M,R=M);return Ze&&Gi(S,L),T}for(M=r(S,M);L<g.length;L++)b=P(M,S,L,g[L],x),b!==null&&(t&&b.alternate!==null&&M.delete(b.key===null?L:b.key),C=a(b,C,L),R===null?T=b:R.sibling=b,R=b);return t&&M.forEach(function(B){return e(S,B)}),Ze&&Gi(S,L),T}function E(S,C,g,x){var T=Uo(g);if(typeof T!="function")throw Error(Y(150));if(g=T.call(g),g==null)throw Error(Y(151));for(var R=T=null,M=C,L=C=0,b=null,F=g.next();M!==null&&!F.done;L++,F=g.next()){M.index>L?(b=M,M=null):b=M.sibling;var B=_(S,M,F.value,x);if(B===null){M===null&&(M=b);break}t&&M&&B.alternate===null&&e(S,M),C=a(B,C,L),R===null?T=B:R.sibling=B,R=B,M=b}if(F.done)return n(S,M),Ze&&Gi(S,L),T;if(M===null){for(;!F.done;L++,F=g.next())F=w(S,F.value,x),F!==null&&(C=a(F,C,L),R===null?T=F:R.sibling=F,R=F);return Ze&&Gi(S,L),T}for(M=r(S,M);!F.done;L++,F=g.next())F=P(M,S,L,F.value,x),F!==null&&(t&&F.alternate!==null&&M.delete(F.key===null?L:F.key),C=a(F,C,L),R===null?T=F:R.sibling=F,R=F);return t&&M.forEach(function(W){return e(S,W)}),Ze&&Gi(S,L),T}function k(S,C,g,x){if(typeof g=="object"&&g!==null&&g.type===Ds&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Bl:e:{for(var T=g.key,R=C;R!==null;){if(R.key===T){if(T=g.type,T===Ds){if(R.tag===7){n(S,R.sibling),C=s(R,g.props.children),C.return=S,S=C;break e}}else if(R.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===ri&&d2(T)===R.type){n(S,R.sibling),C=s(R,g.props),C.ref=Wo(S,R,g),C.return=S,S=C;break e}n(S,R);break}else e(S,R);R=R.sibling}g.type===Ds?(C=qi(g.props.children,S.mode,x,g.key),C.return=S,S=C):(x=wu(g.type,g.key,g.props,null,S.mode,x),x.ref=Wo(S,C,g),x.return=S,S=x)}return l(S);case Os:e:{for(R=g.key;C!==null;){if(C.key===R)if(C.tag===4&&C.stateNode.containerInfo===g.containerInfo&&C.stateNode.implementation===g.implementation){n(S,C.sibling),C=s(C,g.children||[]),C.return=S,S=C;break e}else{n(S,C);break}else e(S,C);C=C.sibling}C=rh(g,S.mode,x),C.return=S,S=C}return l(S);case ri:return R=g._init,k(S,C,R(g._payload),x)}if(Zo(g))return y(S,C,g,x);if(Uo(g))return E(S,C,g,x);Jl(S,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,C!==null&&C.tag===6?(n(S,C.sibling),C=s(C,g),C.return=S,S=C):(n(S,C),C=nh(g,S.mode,x),C.return=S,S=C),l(S)):n(S,C)}return k}var to=a4(!0),l4=a4(!1),Bu=xi(null),Gu=null,Hs=null,X0=null;function Q0(){X0=Hs=Gu=null}function q0(t){var e=Bu.current;qe(Bu),t._currentValue=e}function Yh(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function qs(t,e){Gu=t,X0=Hs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(an=!0),t.firstContext=null)}function In(t){var e=t._currentValue;if(X0!==t)if(t={context:t,memoizedValue:e,next:null},Hs===null){if(Gu===null)throw Error(Y(308));Hs=t,Gu.dependencies={lanes:0,firstContext:t}}else Hs=Hs.next=t;return e}var Ki=null;function $0(t){Ki===null?Ki=[t]:Ki.push(t)}function u4(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,$0(e)):(n.next=s.next,s.next=n),e.interleaved=n,br(t,r)}function br(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ii=!1;function J0(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function c4(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Mr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function hi(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Fe&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,br(t,n)}return s=r.interleaved,s===null?(e.next=e,$0(r)):(e.next=s.next,s.next=e),r.interleaved=e,br(t,n)}function mu(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,b0(t,n)}}function f2(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?s=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?s=a=e:a=a.next=e}else s=a=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Hu(t,e,n,r){var s=t.updateQueue;ii=!1;var a=s.firstBaseUpdate,l=s.lastBaseUpdate,c=s.shared.pending;if(c!==null){s.shared.pending=null;var d=c,p=d.next;d.next=null,l===null?a=p:l.next=p,l=d;var m=t.alternate;m!==null&&(m=m.updateQueue,c=m.lastBaseUpdate,c!==l&&(c===null?m.firstBaseUpdate=p:c.next=p,m.lastBaseUpdate=d))}if(a!==null){var w=s.baseState;l=0,m=p=d=null,c=a;do{var _=c.lane,P=c.eventTime;if((r&_)===_){m!==null&&(m=m.next={eventTime:P,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var y=t,E=c;switch(_=e,P=n,E.tag){case 1:if(y=E.payload,typeof y=="function"){w=y.call(P,w,_);break e}w=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=E.payload,_=typeof y=="function"?y.call(P,w,_):y,_==null)break e;w=ot({},w,_);break e;case 2:ii=!0}}c.callback!==null&&c.lane!==0&&(t.flags|=64,_=s.effects,_===null?s.effects=[c]:_.push(c))}else P={eventTime:P,lane:_,tag:c.tag,payload:c.payload,callback:c.callback,next:null},m===null?(p=m=P,d=w):m=m.next=P,l|=_;if(c=c.next,c===null){if(c=s.shared.pending,c===null)break;_=c,c=_.next,_.next=null,s.lastBaseUpdate=_,s.shared.pending=null}}while(!0);if(m===null&&(d=w),s.baseState=d,s.firstBaseUpdate=p,s.lastBaseUpdate=m,e=s.shared.interleaved,e!==null){s=e;do l|=s.lane,s=s.next;while(s!==e)}else a===null&&(s.shared.lanes=0);ts|=l,t.lanes=l,t.memoizedState=w}}function h2(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(Y(191,s));s.call(r)}}}var ba={},mr=xi(ba),Ca=xi(ba),Ea=xi(ba);function Yi(t){if(t===ba)throw Error(Y(174));return t}function Z0(t,e){switch(We(Ea,e),We(Ca,t),We(mr,ba),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Nh(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Nh(e,t)}qe(mr),We(mr,e)}function no(){qe(mr),qe(Ca),qe(Ea)}function d4(t){Yi(Ea.current);var e=Yi(mr.current),n=Nh(e,t.type);e!==n&&(We(Ca,t),We(mr,n))}function e1(t){Ca.current===t&&(qe(mr),qe(Ca))}var it=xi(0);function Vu(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var qf=[];function t1(){for(var t=0;t<qf.length;t++)qf[t]._workInProgressVersionPrimary=null;qf.length=0}var yu=zr.ReactCurrentDispatcher,$f=zr.ReactCurrentBatchConfig,es=0,st=null,St=null,Tt=null,Wu=!1,ua=!1,Pa=0,H8=0;function Bt(){throw Error(Y(321))}function n1(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Jn(t[n],e[n]))return!1;return!0}function r1(t,e,n,r,s,a){if(es=a,st=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,yu.current=t===null||t.memoizedState===null?Y8:X8,t=n(r,s),ua){a=0;do{if(ua=!1,Pa=0,25<=a)throw Error(Y(301));a+=1,Tt=St=null,e.updateQueue=null,yu.current=Q8,t=n(r,s)}while(ua)}if(yu.current=Ku,e=St!==null&&St.next!==null,es=0,Tt=St=st=null,Wu=!1,e)throw Error(Y(300));return t}function i1(){var t=Pa!==0;return Pa=0,t}function fr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?st.memoizedState=Tt=t:Tt=Tt.next=t,Tt}function bn(){if(St===null){var t=st.alternate;t=t!==null?t.memoizedState:null}else t=St.next;var e=Tt===null?st.memoizedState:Tt.next;if(e!==null)Tt=e,St=t;else{if(t===null)throw Error(Y(310));St=t,t={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Tt===null?st.memoizedState=Tt=t:Tt=Tt.next=t}return Tt}function Na(t,e){return typeof e=="function"?e(t):e}function Jf(t){var e=bn(),n=e.queue;if(n===null)throw Error(Y(311));n.lastRenderedReducer=t;var r=St,s=r.baseQueue,a=n.pending;if(a!==null){if(s!==null){var l=s.next;s.next=a.next,a.next=l}r.baseQueue=s=a,n.pending=null}if(s!==null){a=s.next,r=r.baseState;var c=l=null,d=null,p=a;do{var m=p.lane;if((es&m)===m)d!==null&&(d=d.next={lane:0,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null}),r=p.hasEagerState?p.eagerState:t(r,p.action);else{var w={lane:m,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null};d===null?(c=d=w,l=r):d=d.next=w,st.lanes|=m,ts|=m}p=p.next}while(p!==null&&p!==a);d===null?l=r:d.next=c,Jn(r,e.memoizedState)||(an=!0),e.memoizedState=r,e.baseState=l,e.baseQueue=d,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do a=s.lane,st.lanes|=a,ts|=a,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Zf(t){var e=bn(),n=e.queue;if(n===null)throw Error(Y(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,a=e.memoizedState;if(s!==null){n.pending=null;var l=s=s.next;do a=t(a,l.action),l=l.next;while(l!==s);Jn(a,e.memoizedState)||(an=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),n.lastRenderedState=a}return[a,r]}function f4(){}function h4(t,e){var n=st,r=bn(),s=e(),a=!Jn(r.memoizedState,s);if(a&&(r.memoizedState=s,an=!0),r=r.queue,s1(m4.bind(null,n,r,t),[t]),r.getSnapshot!==e||a||Tt!==null&&Tt.memoizedState.tag&1){if(n.flags|=2048,Ta(9,g4.bind(null,n,r,s,e),void 0,null),Rt===null)throw Error(Y(349));es&30||p4(n,e,s)}return s}function p4(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=st.updateQueue,e===null?(e={lastEffect:null,stores:null},st.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function g4(t,e,n,r){e.value=n,e.getSnapshot=r,y4(e)&&v4(t)}function m4(t,e,n){return n(function(){y4(e)&&v4(t)})}function y4(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Jn(t,n)}catch{return!0}}function v4(t){var e=br(t,1);e!==null&&qn(e,t,1,-1)}function p2(t){var e=fr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:t},e.queue=t,t=t.dispatch=K8.bind(null,st,t),[e.memoizedState,t]}function Ta(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=st.updateQueue,e===null?(e={lastEffect:null,stores:null},st.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function _4(){return bn().memoizedState}function vu(t,e,n,r){var s=fr();st.flags|=t,s.memoizedState=Ta(1|e,n,void 0,r===void 0?null:r)}function dc(t,e,n,r){var s=bn();r=r===void 0?null:r;var a=void 0;if(St!==null){var l=St.memoizedState;if(a=l.destroy,r!==null&&n1(r,l.deps)){s.memoizedState=Ta(e,n,a,r);return}}st.flags|=t,s.memoizedState=Ta(1|e,n,a,r)}function g2(t,e){return vu(8390656,8,t,e)}function s1(t,e){return dc(2048,8,t,e)}function S4(t,e){return dc(4,2,t,e)}function x4(t,e){return dc(4,4,t,e)}function w4(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function k4(t,e,n){return n=n!=null?n.concat([t]):null,dc(4,4,w4.bind(null,e,t),n)}function o1(){}function C4(t,e){var n=bn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&n1(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function E4(t,e){var n=bn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&n1(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function P4(t,e,n){return es&21?(Jn(n,e)||(n=Ay(),st.lanes|=n,ts|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,an=!0),t.memoizedState=n)}function V8(t,e){var n=ze;ze=n!==0&&4>n?n:4,t(!0);var r=$f.transition;$f.transition={};try{t(!1),e()}finally{ze=n,$f.transition=r}}function N4(){return bn().memoizedState}function W8(t,e,n){var r=gi(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},T4(t))R4(e,n);else if(n=u4(t,e,n,r),n!==null){var s=qt();qn(n,t,r,s),L4(n,e,r)}}function K8(t,e,n){var r=gi(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(T4(t))R4(e,s);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var l=e.lastRenderedState,c=a(l,n);if(s.hasEagerState=!0,s.eagerState=c,Jn(c,l)){var d=e.interleaved;d===null?(s.next=s,$0(e)):(s.next=d.next,d.next=s),e.interleaved=s;return}}catch{}finally{}n=u4(t,e,s,r),n!==null&&(s=qt(),qn(n,t,r,s),L4(n,e,r))}}function T4(t){var e=t.alternate;return t===st||e!==null&&e===st}function R4(t,e){ua=Wu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function L4(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,b0(t,n)}}var Ku={readContext:In,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},Y8={readContext:In,useCallback:function(t,e){return fr().memoizedState=[t,e===void 0?null:e],t},useContext:In,useEffect:g2,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,vu(4194308,4,w4.bind(null,e,t),n)},useLayoutEffect:function(t,e){return vu(4194308,4,t,e)},useInsertionEffect:function(t,e){return vu(4,2,t,e)},useMemo:function(t,e){var n=fr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=fr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=W8.bind(null,st,t),[r.memoizedState,t]},useRef:function(t){var e=fr();return t={current:t},e.memoizedState=t},useState:p2,useDebugValue:o1,useDeferredValue:function(t){return fr().memoizedState=t},useTransition:function(){var t=p2(!1),e=t[0];return t=V8.bind(null,t[1]),fr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=st,s=fr();if(Ze){if(n===void 0)throw Error(Y(407));n=n()}else{if(n=e(),Rt===null)throw Error(Y(349));es&30||p4(r,e,n)}s.memoizedState=n;var a={value:n,getSnapshot:e};return s.queue=a,g2(m4.bind(null,r,a,t),[t]),r.flags|=2048,Ta(9,g4.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=fr(),e=Rt.identifierPrefix;if(Ze){var n=Fr,r=Ar;n=(r&~(1<<32-Qn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Pa++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=H8++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},X8={readContext:In,useCallback:C4,useContext:In,useEffect:s1,useImperativeHandle:k4,useInsertionEffect:S4,useLayoutEffect:x4,useMemo:E4,useReducer:Jf,useRef:_4,useState:function(){return Jf(Na)},useDebugValue:o1,useDeferredValue:function(t){var e=bn();return P4(e,St.memoizedState,t)},useTransition:function(){var t=Jf(Na)[0],e=bn().memoizedState;return[t,e]},useMutableSource:f4,useSyncExternalStore:h4,useId:N4,unstable_isNewReconciler:!1},Q8={readContext:In,useCallback:C4,useContext:In,useEffect:s1,useImperativeHandle:k4,useInsertionEffect:S4,useLayoutEffect:x4,useMemo:E4,useReducer:Zf,useRef:_4,useState:function(){return Zf(Na)},useDebugValue:o1,useDeferredValue:function(t){var e=bn();return St===null?e.memoizedState=t:P4(e,St.memoizedState,t)},useTransition:function(){var t=Zf(Na)[0],e=bn().memoizedState;return[t,e]},useMutableSource:f4,useSyncExternalStore:h4,useId:N4,unstable_isNewReconciler:!1};function Kn(t,e){if(t&&t.defaultProps){e=ot({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Xh(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:ot({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var fc={isMounted:function(t){return(t=t._reactInternals)?ss(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=qt(),s=gi(t),a=Mr(r,s);a.payload=e,n!=null&&(a.callback=n),e=hi(t,a,s),e!==null&&(qn(e,t,s,r),mu(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=qt(),s=gi(t),a=Mr(r,s);a.tag=1,a.payload=e,n!=null&&(a.callback=n),e=hi(t,a,s),e!==null&&(qn(e,t,s,r),mu(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=qt(),r=gi(t),s=Mr(n,r);s.tag=2,e!=null&&(s.callback=e),e=hi(t,s,r),e!==null&&(qn(e,t,r,n),mu(e,t,r))}};function m2(t,e,n,r,s,a,l){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,a,l):e.prototype&&e.prototype.isPureReactComponent?!Sa(n,r)||!Sa(s,a):!0}function A4(t,e,n){var r=!1,s=vi,a=e.contextType;return typeof a=="object"&&a!==null?a=In(a):(s=un(e)?Ji:Wt.current,r=e.contextTypes,a=(r=r!=null)?Zs(t,s):vi),e=new e(n,a),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=fc,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=a),e}function y2(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&fc.enqueueReplaceState(e,e.state,null)}function Qh(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},J0(t);var a=e.contextType;typeof a=="object"&&a!==null?s.context=In(a):(a=un(e)?Ji:Wt.current,s.context=Zs(t,a)),s.state=t.memoizedState,a=e.getDerivedStateFromProps,typeof a=="function"&&(Xh(t,e,a,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&fc.enqueueReplaceState(s,s.state,null),Hu(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function ro(t,e){try{var n="",r=e;do n+=k6(r),r=r.return;while(r);var s=n}catch(a){s=`
39
+ Error generating stack: `+a.message+`
40
+ `+a.stack}return{value:t,source:e,stack:s,digest:null}}function eh(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function qh(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var q8=typeof WeakMap=="function"?WeakMap:Map;function F4(t,e,n){n=Mr(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Xu||(Xu=!0,o0=r),qh(t,e)},n}function M4(t,e,n){n=Mr(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){qh(t,e)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){qh(t,e),typeof r!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var l=e.stack;this.componentDidCatch(e.value,{componentStack:l!==null?l:""})}),n}function v2(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new q8;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=c7.bind(null,t,e,n),e.then(t,t))}function _2(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function S2(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Mr(-1,1),e.tag=2,hi(n,e,1))),n.lanes|=1),t)}var $8=zr.ReactCurrentOwner,an=!1;function Xt(t,e,n,r){e.child=t===null?l4(e,null,n,r):to(e,t.child,n,r)}function x2(t,e,n,r,s){n=n.render;var a=e.ref;return qs(e,s),r=r1(t,e,n,r,a,s),n=i1(),t!==null&&!an?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,jr(t,e,s)):(Ze&&n&&W0(e),e.flags|=1,Xt(t,e,r,s),e.child)}function w2(t,e,n,r,s){if(t===null){var a=n.type;return typeof a=="function"&&!p1(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=a,O4(t,e,a,r,s)):(t=wu(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(a=t.child,!(t.lanes&s)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:Sa,n(l,r)&&t.ref===e.ref)return jr(t,e,s)}return e.flags|=1,t=mi(a,r),t.ref=e.ref,t.return=e,e.child=t}function O4(t,e,n,r,s){if(t!==null){var a=t.memoizedProps;if(Sa(a,r)&&t.ref===e.ref)if(an=!1,e.pendingProps=r=a,(t.lanes&s)!==0)t.flags&131072&&(an=!0);else return e.lanes=t.lanes,jr(t,e,s)}return $h(t,e,n,r,s)}function D4(t,e,n){var r=e.pendingProps,s=r.children,a=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(Ws,mn),mn|=n;else{if(!(n&1073741824))return t=a!==null?a.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,We(Ws,mn),mn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,We(Ws,mn),mn|=r}else a!==null?(r=a.baseLanes|n,e.memoizedState=null):r=n,We(Ws,mn),mn|=r;return Xt(t,e,s,n),e.child}function I4(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function $h(t,e,n,r,s){var a=un(n)?Ji:Wt.current;return a=Zs(e,a),qs(e,s),n=r1(t,e,n,r,a,s),r=i1(),t!==null&&!an?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,jr(t,e,s)):(Ze&&r&&W0(e),e.flags|=1,Xt(t,e,n,s),e.child)}function k2(t,e,n,r,s){if(un(n)){var a=!0;ju(e)}else a=!1;if(qs(e,s),e.stateNode===null)_u(t,e),A4(e,n,r),Qh(e,n,r,s),r=!0;else if(t===null){var l=e.stateNode,c=e.memoizedProps;l.props=c;var d=l.context,p=n.contextType;typeof p=="object"&&p!==null?p=In(p):(p=un(n)?Ji:Wt.current,p=Zs(e,p));var m=n.getDerivedStateFromProps,w=typeof m=="function"||typeof l.getSnapshotBeforeUpdate=="function";w||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(c!==r||d!==p)&&y2(e,l,r,p),ii=!1;var _=e.memoizedState;l.state=_,Hu(e,r,l,s),d=e.memoizedState,c!==r||_!==d||ln.current||ii?(typeof m=="function"&&(Xh(e,n,m,r),d=e.memoizedState),(c=ii||m2(e,n,c,r,_,d,p))?(w||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(e.flags|=4194308)):(typeof l.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=d),l.props=r,l.state=d,l.context=p,r=c):(typeof l.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{l=e.stateNode,c4(t,e),c=e.memoizedProps,p=e.type===e.elementType?c:Kn(e.type,c),l.props=p,w=e.pendingProps,_=l.context,d=n.contextType,typeof d=="object"&&d!==null?d=In(d):(d=un(n)?Ji:Wt.current,d=Zs(e,d));var P=n.getDerivedStateFromProps;(m=typeof P=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(c!==w||_!==d)&&y2(e,l,r,d),ii=!1,_=e.memoizedState,l.state=_,Hu(e,r,l,s);var y=e.memoizedState;c!==w||_!==y||ln.current||ii?(typeof P=="function"&&(Xh(e,n,P,r),y=e.memoizedState),(p=ii||m2(e,n,p,r,_,y,d)||!1)?(m||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,y,d),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,y,d)),typeof l.componentDidUpdate=="function"&&(e.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof l.componentDidUpdate!="function"||c===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=y),l.props=r,l.state=y,l.context=d,r=p):(typeof l.componentDidUpdate!="function"||c===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),r=!1)}return Jh(t,e,n,r,a,s)}function Jh(t,e,n,r,s,a){I4(t,e);var l=(e.flags&128)!==0;if(!r&&!l)return s&&l2(e,n,!1),jr(t,e,a);r=e.stateNode,$8.current=e;var c=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&l?(e.child=to(e,t.child,null,a),e.child=to(e,null,c,a)):Xt(t,e,c,a),e.memoizedState=r.state,s&&l2(e,n,!0),e.child}function b4(t){var e=t.stateNode;e.pendingContext?a2(t,e.pendingContext,e.pendingContext!==e.context):e.context&&a2(t,e.context,!1),Z0(t,e.containerInfo)}function C2(t,e,n,r,s){return eo(),Y0(s),e.flags|=256,Xt(t,e,n,r),e.child}var Zh={dehydrated:null,treeContext:null,retryLane:0};function e0(t){return{baseLanes:t,cachePool:null,transitions:null}}function j4(t,e,n){var r=e.pendingProps,s=it.current,a=!1,l=(e.flags&128)!==0,c;if((c=l)||(c=t!==null&&t.memoizedState===null?!1:(s&2)!==0),c?(a=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),We(it,s&1),t===null)return Kh(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(l=r.children,t=r.fallback,a?(r=e.mode,a=e.child,l={mode:"hidden",children:l},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=l):a=gc(l,r,0,null),t=qi(t,r,n,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=e0(n),e.memoizedState=Zh,t):a1(e,l));if(s=t.memoizedState,s!==null&&(c=s.dehydrated,c!==null))return J8(t,e,l,r,c,s,n);if(a){a=r.fallback,l=e.mode,s=t.child,c=s.sibling;var d={mode:"hidden",children:r.children};return!(l&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=d,e.deletions=null):(r=mi(s,d),r.subtreeFlags=s.subtreeFlags&14680064),c!==null?a=mi(c,a):(a=qi(a,l,n,null),a.flags|=2),a.return=e,r.return=e,r.sibling=a,e.child=r,r=a,a=e.child,l=t.child.memoizedState,l=l===null?e0(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=t.childLanes&~n,e.memoizedState=Zh,r}return a=t.child,t=a.sibling,r=mi(a,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function a1(t,e){return e=gc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Zl(t,e,n,r){return r!==null&&Y0(r),to(e,t.child,null,n),t=a1(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function J8(t,e,n,r,s,a,l){if(n)return e.flags&256?(e.flags&=-257,r=eh(Error(Y(422))),Zl(t,e,l,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(a=r.fallback,s=e.mode,r=gc({mode:"visible",children:r.children},s,0,null),a=qi(a,s,l,null),a.flags|=2,r.return=e,a.return=e,r.sibling=a,e.child=r,e.mode&1&&to(e,t.child,null,l),e.child.memoizedState=e0(l),e.memoizedState=Zh,a);if(!(e.mode&1))return Zl(t,e,l,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var c=r.dgst;return r=c,a=Error(Y(419)),r=eh(a,r,void 0),Zl(t,e,l,r)}if(c=(l&t.childLanes)!==0,an||c){if(r=Rt,r!==null){switch(l&-l){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|l)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,br(t,s),qn(r,t,s,-1))}return h1(),r=eh(Error(Y(421))),Zl(t,e,l,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=d7.bind(null,t),s._reactRetry=e,null):(t=a.treeContext,yn=fi(s.nextSibling),vn=e,Ze=!0,Xn=null,t!==null&&(Fn[Mn++]=Ar,Fn[Mn++]=Fr,Fn[Mn++]=Zi,Ar=t.id,Fr=t.overflow,Zi=e),e=a1(e,r.children),e.flags|=4096,e)}function E2(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Yh(t.return,e,n)}function th(t,e,n,r,s){var a=t.memoizedState;a===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=s)}function z4(t,e,n){var r=e.pendingProps,s=r.revealOrder,a=r.tail;if(Xt(t,e,r.children,n),r=it.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&E2(t,n,e);else if(t.tag===19)E2(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(We(it,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Vu(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),th(e,!1,s,n,a);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Vu(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}th(e,!0,n,null,a);break;case"together":th(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function _u(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function jr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ts|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Y(153));if(e.child!==null){for(t=e.child,n=mi(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=mi(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Z8(t,e,n){switch(e.tag){case 3:b4(e),eo();break;case 5:d4(e);break;case 1:un(e.type)&&ju(e);break;case 4:Z0(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;We(Bu,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(We(it,it.current&1),e.flags|=128,null):n&e.child.childLanes?j4(t,e,n):(We(it,it.current&1),t=jr(t,e,n),t!==null?t.sibling:null);We(it,it.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return z4(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),We(it,it.current),r)break;return null;case 22:case 23:return e.lanes=0,D4(t,e,n)}return jr(t,e,n)}var U4,t0,B4,G4;U4=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};t0=function(){};B4=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Yi(mr.current);var a=null;switch(n){case"input":s=kh(t,s),r=kh(t,r),a=[];break;case"select":s=ot({},s,{value:void 0}),r=ot({},r,{value:void 0}),a=[];break;case"textarea":s=Ph(t,s),r=Ph(t,r),a=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Iu)}Th(n,r);var l;n=null;for(p in s)if(!r.hasOwnProperty(p)&&s.hasOwnProperty(p)&&s[p]!=null)if(p==="style"){var c=s[p];for(l in c)c.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(ha.hasOwnProperty(p)?a||(a=[]):(a=a||[]).push(p,null));for(p in r){var d=r[p];if(c=s!=null?s[p]:void 0,r.hasOwnProperty(p)&&d!==c&&(d!=null||c!=null))if(p==="style")if(c){for(l in c)!c.hasOwnProperty(l)||d&&d.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in d)d.hasOwnProperty(l)&&c[l]!==d[l]&&(n||(n={}),n[l]=d[l])}else n||(a||(a=[]),a.push(p,n)),n=d;else p==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,c=c?c.__html:void 0,d!=null&&c!==d&&(a=a||[]).push(p,d)):p==="children"?typeof d!="string"&&typeof d!="number"||(a=a||[]).push(p,""+d):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(ha.hasOwnProperty(p)?(d!=null&&p==="onScroll"&&Qe("scroll",t),a||c===d||(a=[])):(a=a||[]).push(p,d))}n&&(a=a||[]).push("style",n);var p=a;(e.updateQueue=p)&&(e.flags|=4)}};G4=function(t,e,n,r){n!==r&&(e.flags|=4)};function Ko(t,e){if(!Ze)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Gt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function e7(t,e,n){var r=e.pendingProps;switch(K0(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(e),null;case 1:return un(e.type)&&bu(),Gt(e),null;case 3:return r=e.stateNode,no(),qe(ln),qe(Wt),t1(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&($l(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Xn!==null&&(u0(Xn),Xn=null))),t0(t,e),Gt(e),null;case 5:e1(e);var s=Yi(Ea.current);if(n=e.type,t!==null&&e.stateNode!=null)B4(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Y(166));return Gt(e),null}if(t=Yi(mr.current),$l(e)){r=e.stateNode,n=e.type;var a=e.memoizedProps;switch(r[hr]=e,r[ka]=a,t=(e.mode&1)!==0,n){case"dialog":Qe("cancel",r),Qe("close",r);break;case"iframe":case"object":case"embed":Qe("load",r);break;case"video":case"audio":for(s=0;s<ta.length;s++)Qe(ta[s],r);break;case"source":Qe("error",r);break;case"img":case"image":case"link":Qe("error",r),Qe("load",r);break;case"details":Qe("toggle",r);break;case"input":Og(r,a),Qe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Qe("invalid",r);break;case"textarea":Ig(r,a),Qe("invalid",r)}Th(n,a),s=null;for(var l in a)if(a.hasOwnProperty(l)){var c=a[l];l==="children"?typeof c=="string"?r.textContent!==c&&(a.suppressHydrationWarning!==!0&&ql(r.textContent,c,t),s=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(a.suppressHydrationWarning!==!0&&ql(r.textContent,c,t),s=["children",""+c]):ha.hasOwnProperty(l)&&c!=null&&l==="onScroll"&&Qe("scroll",r)}switch(n){case"input":Gl(r),Dg(r,a,!0);break;case"textarea":Gl(r),bg(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Iu)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{l=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=my(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=l.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=l.createElement(n,{is:r.is}):(t=l.createElement(n),n==="select"&&(l=t,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):t=l.createElementNS(t,n),t[hr]=e,t[ka]=r,U4(t,e,!1,!1),e.stateNode=t;e:{switch(l=Rh(n,r),n){case"dialog":Qe("cancel",t),Qe("close",t),s=r;break;case"iframe":case"object":case"embed":Qe("load",t),s=r;break;case"video":case"audio":for(s=0;s<ta.length;s++)Qe(ta[s],t);s=r;break;case"source":Qe("error",t),s=r;break;case"img":case"image":case"link":Qe("error",t),Qe("load",t),s=r;break;case"details":Qe("toggle",t),s=r;break;case"input":Og(t,r),s=kh(t,r),Qe("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=ot({},r,{value:void 0}),Qe("invalid",t);break;case"textarea":Ig(t,r),s=Ph(t,r),Qe("invalid",t);break;default:s=r}Th(n,s),c=s;for(a in c)if(c.hasOwnProperty(a)){var d=c[a];a==="style"?_y(t,d):a==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,d!=null&&yy(t,d)):a==="children"?typeof d=="string"?(n!=="textarea"||d!=="")&&pa(t,d):typeof d=="number"&&pa(t,""+d):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(ha.hasOwnProperty(a)?d!=null&&a==="onScroll"&&Qe("scroll",t):d!=null&&A0(t,a,d,l))}switch(n){case"input":Gl(t),Dg(t,r,!1);break;case"textarea":Gl(t),bg(t);break;case"option":r.value!=null&&t.setAttribute("value",""+yi(r.value));break;case"select":t.multiple=!!r.multiple,a=r.value,a!=null?Ks(t,!!r.multiple,a,!1):r.defaultValue!=null&&Ks(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Iu)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Gt(e),null;case 6:if(t&&e.stateNode!=null)G4(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(Y(166));if(n=Yi(Ea.current),Yi(mr.current),$l(e)){if(r=e.stateNode,n=e.memoizedProps,r[hr]=e,(a=r.nodeValue!==n)&&(t=vn,t!==null))switch(t.tag){case 3:ql(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ql(r.nodeValue,n,(t.mode&1)!==0)}a&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[hr]=e,e.stateNode=r}return Gt(e),null;case 13:if(qe(it),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Ze&&yn!==null&&e.mode&1&&!(e.flags&128))o4(),eo(),e.flags|=98560,a=!1;else if(a=$l(e),r!==null&&r.dehydrated!==null){if(t===null){if(!a)throw Error(Y(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Y(317));a[hr]=e}else eo(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Gt(e),a=!1}else Xn!==null&&(u0(Xn),Xn=null),a=!0;if(!a)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||it.current&1?xt===0&&(xt=3):h1())),e.updateQueue!==null&&(e.flags|=4),Gt(e),null);case 4:return no(),t0(t,e),t===null&&xa(e.stateNode.containerInfo),Gt(e),null;case 10:return q0(e.type._context),Gt(e),null;case 17:return un(e.type)&&bu(),Gt(e),null;case 19:if(qe(it),a=e.memoizedState,a===null)return Gt(e),null;if(r=(e.flags&128)!==0,l=a.rendering,l===null)if(r)Ko(a,!1);else{if(xt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(l=Vu(t),l!==null){for(e.flags|=128,Ko(a,!1),r=l.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)a=n,t=r,a.flags&=14680066,l=a.alternate,l===null?(a.childLanes=0,a.lanes=t,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,t=l.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return We(it,it.current&1|2),e.child}t=t.sibling}a.tail!==null&&ft()>io&&(e.flags|=128,r=!0,Ko(a,!1),e.lanes=4194304)}else{if(!r)if(t=Vu(l),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ko(a,!0),a.tail===null&&a.tailMode==="hidden"&&!l.alternate&&!Ze)return Gt(e),null}else 2*ft()-a.renderingStartTime>io&&n!==1073741824&&(e.flags|=128,r=!0,Ko(a,!1),e.lanes=4194304);a.isBackwards?(l.sibling=e.child,e.child=l):(n=a.last,n!==null?n.sibling=l:e.child=l,a.last=l)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ft(),e.sibling=null,n=it.current,We(it,r?n&1|2:n&1),e):(Gt(e),null);case 22:case 23:return f1(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?mn&1073741824&&(Gt(e),e.subtreeFlags&6&&(e.flags|=8192)):Gt(e),null;case 24:return null;case 25:return null}throw Error(Y(156,e.tag))}function t7(t,e){switch(K0(e),e.tag){case 1:return un(e.type)&&bu(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return no(),qe(ln),qe(Wt),t1(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return e1(e),null;case 13:if(qe(it),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Y(340));eo()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return qe(it),null;case 4:return no(),null;case 10:return q0(e.type._context),null;case 22:case 23:return f1(),null;case 24:return null;default:return null}}var eu=!1,Ht=!1,n7=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Vs(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){lt(t,e,r)}else n.current=null}function n0(t,e,n){try{n()}catch(r){lt(t,e,r)}}var P2=!1;function r7(t,e){if(zh=Mu,t=Yy(),V0(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,c=-1,d=-1,p=0,m=0,w=t,_=null;t:for(;;){for(var P;w!==n||s!==0&&w.nodeType!==3||(c=l+s),w!==a||r!==0&&w.nodeType!==3||(d=l+r),w.nodeType===3&&(l+=w.nodeValue.length),(P=w.firstChild)!==null;)_=w,w=P;for(;;){if(w===t)break t;if(_===n&&++p===s&&(c=l),_===a&&++m===r&&(d=l),(P=w.nextSibling)!==null)break;w=_,_=w.parentNode}w=P}n=c===-1||d===-1?null:{start:c,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Uh={focusedElem:t,selectionRange:n},Mu=!1,oe=e;oe!==null;)if(e=oe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,oe=t;else for(;oe!==null;){e=oe;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var E=y.memoizedProps,k=y.memoizedState,S=e.stateNode,C=S.getSnapshotBeforeUpdate(e.elementType===e.type?E:Kn(e.type,E),k);S.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var g=e.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Y(163))}}catch(x){lt(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,oe=t;break}oe=e.return}return y=P2,P2=!1,y}function ca(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var a=s.destroy;s.destroy=void 0,a!==void 0&&n0(e,n,a)}s=s.next}while(s!==r)}}function hc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function r0(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function H4(t){var e=t.alternate;e!==null&&(t.alternate=null,H4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[hr],delete e[ka],delete e[Hh],delete e[z8],delete e[U8])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function V4(t){return t.tag===5||t.tag===3||t.tag===4}function N2(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||V4(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function i0(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Iu));else if(r!==4&&(t=t.child,t!==null))for(i0(t,e,n),t=t.sibling;t!==null;)i0(t,e,n),t=t.sibling}function s0(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(s0(t,e,n),t=t.sibling;t!==null;)s0(t,e,n),t=t.sibling}var Mt=null,Yn=!1;function ei(t,e,n){for(n=n.child;n!==null;)W4(t,e,n),n=n.sibling}function W4(t,e,n){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(sc,n)}catch{}switch(n.tag){case 5:Ht||Vs(n,e);case 6:var r=Mt,s=Yn;Mt=null,ei(t,e,n),Mt=r,Yn=s,Mt!==null&&(Yn?(t=Mt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Mt.removeChild(n.stateNode));break;case 18:Mt!==null&&(Yn?(t=Mt,n=n.stateNode,t.nodeType===8?Xf(t.parentNode,n):t.nodeType===1&&Xf(t,n),va(t)):Xf(Mt,n.stateNode));break;case 4:r=Mt,s=Yn,Mt=n.stateNode.containerInfo,Yn=!0,ei(t,e,n),Mt=r,Yn=s;break;case 0:case 11:case 14:case 15:if(!Ht&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,l=a.destroy;a=a.tag,l!==void 0&&(a&2||a&4)&&n0(n,e,l),s=s.next}while(s!==r)}ei(t,e,n);break;case 1:if(!Ht&&(Vs(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){lt(n,e,c)}ei(t,e,n);break;case 21:ei(t,e,n);break;case 22:n.mode&1?(Ht=(r=Ht)||n.memoizedState!==null,ei(t,e,n),Ht=r):ei(t,e,n);break;default:ei(t,e,n)}}function T2(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new n7),e.forEach(function(r){var s=f7.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Vn(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var a=t,l=e,c=l;e:for(;c!==null;){switch(c.tag){case 5:Mt=c.stateNode,Yn=!1;break e;case 3:Mt=c.stateNode.containerInfo,Yn=!0;break e;case 4:Mt=c.stateNode.containerInfo,Yn=!0;break e}c=c.return}if(Mt===null)throw Error(Y(160));W4(a,l,s),Mt=null,Yn=!1;var d=s.alternate;d!==null&&(d.return=null),s.return=null}catch(p){lt(s,e,p)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)K4(e,t),e=e.sibling}function K4(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Vn(e,t),cr(t),r&4){try{ca(3,t,t.return),hc(3,t)}catch(E){lt(t,t.return,E)}try{ca(5,t,t.return)}catch(E){lt(t,t.return,E)}}break;case 1:Vn(e,t),cr(t),r&512&&n!==null&&Vs(n,n.return);break;case 5:if(Vn(e,t),cr(t),r&512&&n!==null&&Vs(n,n.return),t.flags&32){var s=t.stateNode;try{pa(s,"")}catch(E){lt(t,t.return,E)}}if(r&4&&(s=t.stateNode,s!=null)){var a=t.memoizedProps,l=n!==null?n.memoizedProps:a,c=t.type,d=t.updateQueue;if(t.updateQueue=null,d!==null)try{c==="input"&&a.type==="radio"&&a.name!=null&&py(s,a),Rh(c,l);var p=Rh(c,a);for(l=0;l<d.length;l+=2){var m=d[l],w=d[l+1];m==="style"?_y(s,w):m==="dangerouslySetInnerHTML"?yy(s,w):m==="children"?pa(s,w):A0(s,m,w,p)}switch(c){case"input":Ch(s,a);break;case"textarea":gy(s,a);break;case"select":var _=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!a.multiple;var P=a.value;P!=null?Ks(s,!!a.multiple,P,!1):_!==!!a.multiple&&(a.defaultValue!=null?Ks(s,!!a.multiple,a.defaultValue,!0):Ks(s,!!a.multiple,a.multiple?[]:"",!1))}s[ka]=a}catch(E){lt(t,t.return,E)}}break;case 6:if(Vn(e,t),cr(t),r&4){if(t.stateNode===null)throw Error(Y(162));s=t.stateNode,a=t.memoizedProps;try{s.nodeValue=a}catch(E){lt(t,t.return,E)}}break;case 3:if(Vn(e,t),cr(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{va(e.containerInfo)}catch(E){lt(t,t.return,E)}break;case 4:Vn(e,t),cr(t);break;case 13:Vn(e,t),cr(t),s=t.child,s.flags&8192&&(a=s.memoizedState!==null,s.stateNode.isHidden=a,!a||s.alternate!==null&&s.alternate.memoizedState!==null||(c1=ft())),r&4&&T2(t);break;case 22:if(m=n!==null&&n.memoizedState!==null,t.mode&1?(Ht=(p=Ht)||m,Vn(e,t),Ht=p):Vn(e,t),cr(t),r&8192){if(p=t.memoizedState!==null,(t.stateNode.isHidden=p)&&!m&&t.mode&1)for(oe=t,m=t.child;m!==null;){for(w=oe=m;oe!==null;){switch(_=oe,P=_.child,_.tag){case 0:case 11:case 14:case 15:ca(4,_,_.return);break;case 1:Vs(_,_.return);var y=_.stateNode;if(typeof y.componentWillUnmount=="function"){r=_,n=_.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(E){lt(r,n,E)}}break;case 5:Vs(_,_.return);break;case 22:if(_.memoizedState!==null){L2(w);continue}}P!==null?(P.return=_,oe=P):L2(w)}m=m.sibling}e:for(m=null,w=t;;){if(w.tag===5){if(m===null){m=w;try{s=w.stateNode,p?(a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(c=w.stateNode,d=w.memoizedProps.style,l=d!=null&&d.hasOwnProperty("display")?d.display:null,c.style.display=vy("display",l))}catch(E){lt(t,t.return,E)}}}else if(w.tag===6){if(m===null)try{w.stateNode.nodeValue=p?"":w.memoizedProps}catch(E){lt(t,t.return,E)}}else if((w.tag!==22&&w.tag!==23||w.memoizedState===null||w===t)&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===t)break e;for(;w.sibling===null;){if(w.return===null||w.return===t)break e;m===w&&(m=null),w=w.return}m===w&&(m=null),w.sibling.return=w.return,w=w.sibling}}break;case 19:Vn(e,t),cr(t),r&4&&T2(t);break;case 21:break;default:Vn(e,t),cr(t)}}function cr(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(V4(n)){var r=n;break e}n=n.return}throw Error(Y(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(pa(s,""),r.flags&=-33);var a=N2(t);s0(t,a,s);break;case 3:case 4:var l=r.stateNode.containerInfo,c=N2(t);i0(t,c,l);break;default:throw Error(Y(161))}}catch(d){lt(t,t.return,d)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function i7(t,e,n){oe=t,Y4(t)}function Y4(t,e,n){for(var r=(t.mode&1)!==0;oe!==null;){var s=oe,a=s.child;if(s.tag===22&&r){var l=s.memoizedState!==null||eu;if(!l){var c=s.alternate,d=c!==null&&c.memoizedState!==null||Ht;c=eu;var p=Ht;if(eu=l,(Ht=d)&&!p)for(oe=s;oe!==null;)l=oe,d=l.child,l.tag===22&&l.memoizedState!==null?A2(s):d!==null?(d.return=l,oe=d):A2(s);for(;a!==null;)oe=a,Y4(a),a=a.sibling;oe=s,eu=c,Ht=p}R2(t)}else s.subtreeFlags&8772&&a!==null?(a.return=s,oe=a):R2(t)}}function R2(t){for(;oe!==null;){var e=oe;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ht||hc(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Ht)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:Kn(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=e.updateQueue;a!==null&&h2(e,a,r);break;case 3:var l=e.updateQueue;if(l!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}h2(e,l,n)}break;case 5:var c=e.stateNode;if(n===null&&e.flags&4){n=c;var d=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":d.autoFocus&&n.focus();break;case"img":d.src&&(n.src=d.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var p=e.alternate;if(p!==null){var m=p.memoizedState;if(m!==null){var w=m.dehydrated;w!==null&&va(w)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Y(163))}Ht||e.flags&512&&r0(e)}catch(_){lt(e,e.return,_)}}if(e===t){oe=null;break}if(n=e.sibling,n!==null){n.return=e.return,oe=n;break}oe=e.return}}function L2(t){for(;oe!==null;){var e=oe;if(e===t){oe=null;break}var n=e.sibling;if(n!==null){n.return=e.return,oe=n;break}oe=e.return}}function A2(t){for(;oe!==null;){var e=oe;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{hc(4,e)}catch(d){lt(e,n,d)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(d){lt(e,s,d)}}var a=e.return;try{r0(e)}catch(d){lt(e,a,d)}break;case 5:var l=e.return;try{r0(e)}catch(d){lt(e,l,d)}}}catch(d){lt(e,e.return,d)}if(e===t){oe=null;break}var c=e.sibling;if(c!==null){c.return=e.return,oe=c;break}oe=e.return}}var s7=Math.ceil,Yu=zr.ReactCurrentDispatcher,l1=zr.ReactCurrentOwner,Dn=zr.ReactCurrentBatchConfig,Fe=0,Rt=null,mt=null,Ot=0,mn=0,Ws=xi(0),xt=0,Ra=null,ts=0,pc=0,u1=0,da=null,on=null,c1=0,io=1/0,Rr=null,Xu=!1,o0=null,pi=null,tu=!1,li=null,Qu=0,fa=0,a0=null,Su=-1,xu=0;function qt(){return Fe&6?ft():Su!==-1?Su:Su=ft()}function gi(t){return t.mode&1?Fe&2&&Ot!==0?Ot&-Ot:G8.transition!==null?(xu===0&&(xu=Ay()),xu):(t=ze,t!==0||(t=window.event,t=t===void 0?16:jy(t.type)),t):1}function qn(t,e,n,r){if(50<fa)throw fa=0,a0=null,Error(Y(185));Oa(t,n,r),(!(Fe&2)||t!==Rt)&&(t===Rt&&(!(Fe&2)&&(pc|=n),xt===4&&oi(t,Ot)),cn(t,r),n===1&&Fe===0&&!(e.mode&1)&&(io=ft()+500,cc&&wi()))}function cn(t,e){var n=t.callbackNode;G6(t,e);var r=Fu(t,t===Rt?Ot:0);if(r===0)n!==null&&Ug(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Ug(n),e===1)t.tag===0?B8(F2.bind(null,t)):r4(F2.bind(null,t)),b8(function(){!(Fe&6)&&wi()}),n=null;else{switch(Fy(r)){case 1:n=I0;break;case 4:n=Ry;break;case 16:n=Au;break;case 536870912:n=Ly;break;default:n=Au}n=t5(n,X4.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function X4(t,e){if(Su=-1,xu=0,Fe&6)throw Error(Y(327));var n=t.callbackNode;if($s()&&t.callbackNode!==n)return null;var r=Fu(t,t===Rt?Ot:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=qu(t,r);else{e=r;var s=Fe;Fe|=2;var a=q4();(Rt!==t||Ot!==e)&&(Rr=null,io=ft()+500,Qi(t,e));do try{l7();break}catch(c){Q4(t,c)}while(!0);Q0(),Yu.current=a,Fe=s,mt!==null?e=0:(Rt=null,Ot=0,e=xt)}if(e!==0){if(e===2&&(s=Oh(t),s!==0&&(r=s,e=l0(t,s))),e===1)throw n=Ra,Qi(t,0),oi(t,r),cn(t,ft()),n;if(e===6)oi(t,r);else{if(s=t.current.alternate,!(r&30)&&!o7(s)&&(e=qu(t,r),e===2&&(a=Oh(t),a!==0&&(r=a,e=l0(t,a))),e===1))throw n=Ra,Qi(t,0),oi(t,r),cn(t,ft()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(Y(345));case 2:Hi(t,on,Rr);break;case 3:if(oi(t,r),(r&130023424)===r&&(e=c1+500-ft(),10<e)){if(Fu(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){qt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Gh(Hi.bind(null,t,on,Rr),e);break}Hi(t,on,Rr);break;case 4:if(oi(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var l=31-Qn(r);a=1<<l,l=e[l],l>s&&(s=l),r&=~a}if(r=s,r=ft()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s7(r/1960))-r,10<r){t.timeoutHandle=Gh(Hi.bind(null,t,on,Rr),r);break}Hi(t,on,Rr);break;case 5:Hi(t,on,Rr);break;default:throw Error(Y(329))}}}return cn(t,ft()),t.callbackNode===n?X4.bind(null,t):null}function l0(t,e){var n=da;return t.current.memoizedState.isDehydrated&&(Qi(t,e).flags|=256),t=qu(t,e),t!==2&&(e=on,on=n,e!==null&&u0(e)),t}function u0(t){on===null?on=t:on.push.apply(on,t)}function o7(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],a=s.getSnapshot;s=s.value;try{if(!Jn(a(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function oi(t,e){for(e&=~u1,e&=~pc,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Qn(e),r=1<<n;t[n]=-1,e&=~r}}function F2(t){if(Fe&6)throw Error(Y(327));$s();var e=Fu(t,0);if(!(e&1))return cn(t,ft()),null;var n=qu(t,e);if(t.tag!==0&&n===2){var r=Oh(t);r!==0&&(e=r,n=l0(t,r))}if(n===1)throw n=Ra,Qi(t,0),oi(t,e),cn(t,ft()),n;if(n===6)throw Error(Y(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Hi(t,on,Rr),cn(t,ft()),null}function d1(t,e){var n=Fe;Fe|=1;try{return t(e)}finally{Fe=n,Fe===0&&(io=ft()+500,cc&&wi())}}function ns(t){li!==null&&li.tag===0&&!(Fe&6)&&$s();var e=Fe;Fe|=1;var n=Dn.transition,r=ze;try{if(Dn.transition=null,ze=1,t)return t()}finally{ze=r,Dn.transition=n,Fe=e,!(Fe&6)&&wi()}}function f1(){mn=Ws.current,qe(Ws)}function Qi(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,I8(n)),mt!==null)for(n=mt.return;n!==null;){var r=n;switch(K0(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bu();break;case 3:no(),qe(ln),qe(Wt),t1();break;case 5:e1(r);break;case 4:no();break;case 13:qe(it);break;case 19:qe(it);break;case 10:q0(r.type._context);break;case 22:case 23:f1()}n=n.return}if(Rt=t,mt=t=mi(t.current,null),Ot=mn=e,xt=0,Ra=null,u1=pc=ts=0,on=da=null,Ki!==null){for(e=0;e<Ki.length;e++)if(n=Ki[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,a=n.pending;if(a!==null){var l=a.next;a.next=s,r.next=l}n.pending=r}Ki=null}return t}function Q4(t,e){do{var n=mt;try{if(Q0(),yu.current=Ku,Wu){for(var r=st.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Wu=!1}if(es=0,Tt=St=st=null,ua=!1,Pa=0,l1.current=null,n===null||n.return===null){xt=1,Ra=e,mt=null;break}e:{var a=t,l=n.return,c=n,d=e;if(e=Ot,c.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){var p=d,m=c,w=m.tag;if(!(m.mode&1)&&(w===0||w===11||w===15)){var _=m.alternate;_?(m.updateQueue=_.updateQueue,m.memoizedState=_.memoizedState,m.lanes=_.lanes):(m.updateQueue=null,m.memoizedState=null)}var P=_2(l);if(P!==null){P.flags&=-257,S2(P,l,c,a,e),P.mode&1&&v2(a,p,e),e=P,d=p;var y=e.updateQueue;if(y===null){var E=new Set;E.add(d),e.updateQueue=E}else y.add(d);break e}else{if(!(e&1)){v2(a,p,e),h1();break e}d=Error(Y(426))}}else if(Ze&&c.mode&1){var k=_2(l);if(k!==null){!(k.flags&65536)&&(k.flags|=256),S2(k,l,c,a,e),Y0(ro(d,c));break e}}a=d=ro(d,c),xt!==4&&(xt=2),da===null?da=[a]:da.push(a),a=l;do{switch(a.tag){case 3:a.flags|=65536,e&=-e,a.lanes|=e;var S=F4(a,d,e);f2(a,S);break e;case 1:c=d;var C=a.type,g=a.stateNode;if(!(a.flags&128)&&(typeof C.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(pi===null||!pi.has(g)))){a.flags|=65536,e&=-e,a.lanes|=e;var x=M4(a,c,e);f2(a,x);break e}}a=a.return}while(a!==null)}J4(n)}catch(T){e=T,mt===n&&n!==null&&(mt=n=n.return);continue}break}while(!0)}function q4(){var t=Yu.current;return Yu.current=Ku,t===null?Ku:t}function h1(){(xt===0||xt===3||xt===2)&&(xt=4),Rt===null||!(ts&268435455)&&!(pc&268435455)||oi(Rt,Ot)}function qu(t,e){var n=Fe;Fe|=2;var r=q4();(Rt!==t||Ot!==e)&&(Rr=null,Qi(t,e));do try{a7();break}catch(s){Q4(t,s)}while(!0);if(Q0(),Fe=n,Yu.current=r,mt!==null)throw Error(Y(261));return Rt=null,Ot=0,xt}function a7(){for(;mt!==null;)$4(mt)}function l7(){for(;mt!==null&&!M6();)$4(mt)}function $4(t){var e=e5(t.alternate,t,mn);t.memoizedProps=t.pendingProps,e===null?J4(t):mt=e,l1.current=null}function J4(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=t7(n,e),n!==null){n.flags&=32767,mt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{xt=6,mt=null;return}}else if(n=e7(n,e,mn),n!==null){mt=n;return}if(e=e.sibling,e!==null){mt=e;return}mt=e=t}while(e!==null);xt===0&&(xt=5)}function Hi(t,e,n){var r=ze,s=Dn.transition;try{Dn.transition=null,ze=1,u7(t,e,n,r)}finally{Dn.transition=s,ze=r}return null}function u7(t,e,n,r){do $s();while(li!==null);if(Fe&6)throw Error(Y(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(Y(177));t.callbackNode=null,t.callbackPriority=0;var a=n.lanes|n.childLanes;if(H6(t,a),t===Rt&&(mt=Rt=null,Ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||tu||(tu=!0,t5(Au,function(){return $s(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=Dn.transition,Dn.transition=null;var l=ze;ze=1;var c=Fe;Fe|=4,l1.current=null,r7(t,n),K4(n,t),R8(Uh),Mu=!!zh,Uh=zh=null,t.current=n,i7(n),O6(),Fe=c,ze=l,Dn.transition=a}else t.current=n;if(tu&&(tu=!1,li=t,Qu=s),a=t.pendingLanes,a===0&&(pi=null),b6(n.stateNode),cn(t,ft()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Xu)throw Xu=!1,t=o0,o0=null,t;return Qu&1&&t.tag!==0&&$s(),a=t.pendingLanes,a&1?t===a0?fa++:(fa=0,a0=t):fa=0,wi(),null}function $s(){if(li!==null){var t=Fy(Qu),e=Dn.transition,n=ze;try{if(Dn.transition=null,ze=16>t?16:t,li===null)var r=!1;else{if(t=li,li=null,Qu=0,Fe&6)throw Error(Y(331));var s=Fe;for(Fe|=4,oe=t.current;oe!==null;){var a=oe,l=a.child;if(oe.flags&16){var c=a.deletions;if(c!==null){for(var d=0;d<c.length;d++){var p=c[d];for(oe=p;oe!==null;){var m=oe;switch(m.tag){case 0:case 11:case 15:ca(8,m,a)}var w=m.child;if(w!==null)w.return=m,oe=w;else for(;oe!==null;){m=oe;var _=m.sibling,P=m.return;if(H4(m),m===p){oe=null;break}if(_!==null){_.return=P,oe=_;break}oe=P}}}var y=a.alternate;if(y!==null){var E=y.child;if(E!==null){y.child=null;do{var k=E.sibling;E.sibling=null,E=k}while(E!==null)}}oe=a}}if(a.subtreeFlags&2064&&l!==null)l.return=a,oe=l;else e:for(;oe!==null;){if(a=oe,a.flags&2048)switch(a.tag){case 0:case 11:case 15:ca(9,a,a.return)}var S=a.sibling;if(S!==null){S.return=a.return,oe=S;break e}oe=a.return}}var C=t.current;for(oe=C;oe!==null;){l=oe;var g=l.child;if(l.subtreeFlags&2064&&g!==null)g.return=l,oe=g;else e:for(l=C;oe!==null;){if(c=oe,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:hc(9,c)}}catch(T){lt(c,c.return,T)}if(c===l){oe=null;break e}var x=c.sibling;if(x!==null){x.return=c.return,oe=x;break e}oe=c.return}}if(Fe=s,wi(),gr&&typeof gr.onPostCommitFiberRoot=="function")try{gr.onPostCommitFiberRoot(sc,t)}catch{}r=!0}return r}finally{ze=n,Dn.transition=e}}return!1}function M2(t,e,n){e=ro(n,e),e=F4(t,e,1),t=hi(t,e,1),e=qt(),t!==null&&(Oa(t,1,e),cn(t,e))}function lt(t,e,n){if(t.tag===3)M2(t,t,n);else for(;e!==null;){if(e.tag===3){M2(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(pi===null||!pi.has(r))){t=ro(n,t),t=M4(e,t,1),e=hi(e,t,1),t=qt(),e!==null&&(Oa(e,1,t),cn(e,t));break}}e=e.return}}function c7(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=qt(),t.pingedLanes|=t.suspendedLanes&n,Rt===t&&(Ot&n)===n&&(xt===4||xt===3&&(Ot&130023424)===Ot&&500>ft()-c1?Qi(t,0):u1|=n),cn(t,e)}function Z4(t,e){e===0&&(t.mode&1?(e=Wl,Wl<<=1,!(Wl&130023424)&&(Wl=4194304)):e=1);var n=qt();t=br(t,e),t!==null&&(Oa(t,e,n),cn(t,n))}function d7(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Z4(t,n)}function f7(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Y(314))}r!==null&&r.delete(e),Z4(t,n)}var e5;e5=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ln.current)an=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return an=!1,Z8(t,e,n);an=!!(t.flags&131072)}else an=!1,Ze&&e.flags&1048576&&i4(e,Uu,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;_u(t,e),t=e.pendingProps;var s=Zs(e,Wt.current);qs(e,n),s=r1(null,e,r,t,s,n);var a=i1();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,un(r)?(a=!0,ju(e)):a=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,J0(e),s.updater=fc,e.stateNode=s,s._reactInternals=e,Qh(e,r,t,n),e=Jh(null,e,r,!0,a,n)):(e.tag=0,Ze&&a&&W0(e),Xt(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(_u(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=p7(r),t=Kn(r,t),s){case 0:e=$h(null,e,r,t,n);break e;case 1:e=k2(null,e,r,t,n);break e;case 11:e=x2(null,e,r,t,n);break e;case 14:e=w2(null,e,r,Kn(r.type,t),n);break e}throw Error(Y(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Kn(r,s),$h(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Kn(r,s),k2(t,e,r,s,n);case 3:e:{if(b4(e),t===null)throw Error(Y(387));r=e.pendingProps,a=e.memoizedState,s=a.element,c4(t,e),Hu(e,r,null,n);var l=e.memoizedState;if(r=l.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){s=ro(Error(Y(423)),e),e=C2(t,e,r,n,s);break e}else if(r!==s){s=ro(Error(Y(424)),e),e=C2(t,e,r,n,s);break e}else for(yn=fi(e.stateNode.containerInfo.firstChild),vn=e,Ze=!0,Xn=null,n=l4(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(eo(),r===s){e=jr(t,e,n);break e}Xt(t,e,r,n)}e=e.child}return e;case 5:return d4(e),t===null&&Kh(e),r=e.type,s=e.pendingProps,a=t!==null?t.memoizedProps:null,l=s.children,Bh(r,s)?l=null:a!==null&&Bh(r,a)&&(e.flags|=32),I4(t,e),Xt(t,e,l,n),e.child;case 6:return t===null&&Kh(e),null;case 13:return j4(t,e,n);case 4:return Z0(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=to(e,null,r,n):Xt(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Kn(r,s),x2(t,e,r,s,n);case 7:return Xt(t,e,e.pendingProps,n),e.child;case 8:return Xt(t,e,e.pendingProps.children,n),e.child;case 12:return Xt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,a=e.memoizedProps,l=s.value,We(Bu,r._currentValue),r._currentValue=l,a!==null)if(Jn(a.value,l)){if(a.children===s.children&&!ln.current){e=jr(t,e,n);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var c=a.dependencies;if(c!==null){l=a.child;for(var d=c.firstContext;d!==null;){if(d.context===r){if(a.tag===1){d=Mr(-1,n&-n),d.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var m=p.pending;m===null?d.next=d:(d.next=m.next,m.next=d),p.pending=d}}a.lanes|=n,d=a.alternate,d!==null&&(d.lanes|=n),Yh(a.return,n,e),c.lanes|=n;break}d=d.next}}else if(a.tag===10)l=a.type===e.type?null:a.child;else if(a.tag===18){if(l=a.return,l===null)throw Error(Y(341));l.lanes|=n,c=l.alternate,c!==null&&(c.lanes|=n),Yh(l,n,e),l=a.sibling}else l=a.child;if(l!==null)l.return=a;else for(l=a;l!==null;){if(l===e){l=null;break}if(a=l.sibling,a!==null){a.return=l.return,l=a;break}l=l.return}a=l}Xt(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,qs(e,n),s=In(s),r=r(s),e.flags|=1,Xt(t,e,r,n),e.child;case 14:return r=e.type,s=Kn(r,e.pendingProps),s=Kn(r.type,s),w2(t,e,r,s,n);case 15:return O4(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Kn(r,s),_u(t,e),e.tag=1,un(r)?(t=!0,ju(e)):t=!1,qs(e,n),A4(e,r,s),Qh(e,r,s,n),Jh(null,e,r,!0,t,n);case 19:return z4(t,e,n);case 22:return D4(t,e,n)}throw Error(Y(156,e.tag))};function t5(t,e){return Ty(t,e)}function h7(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 On(t,e,n,r){return new h7(t,e,n,r)}function p1(t){return t=t.prototype,!(!t||!t.isReactComponent)}function p7(t){if(typeof t=="function")return p1(t)?1:0;if(t!=null){if(t=t.$$typeof,t===M0)return 11;if(t===O0)return 14}return 2}function mi(t,e){var n=t.alternate;return n===null?(n=On(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function wu(t,e,n,r,s,a){var l=2;if(r=t,typeof t=="function")p1(t)&&(l=1);else if(typeof t=="string")l=5;else e:switch(t){case Ds:return qi(n.children,s,a,e);case F0:l=8,s|=8;break;case _h:return t=On(12,n,e,s|2),t.elementType=_h,t.lanes=a,t;case Sh:return t=On(13,n,e,s),t.elementType=Sh,t.lanes=a,t;case xh:return t=On(19,n,e,s),t.elementType=xh,t.lanes=a,t;case dy:return gc(n,s,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case uy:l=10;break e;case cy:l=9;break e;case M0:l=11;break e;case O0:l=14;break e;case ri:l=16,r=null;break e}throw Error(Y(130,t==null?t:typeof t,""))}return e=On(l,n,e,s),e.elementType=t,e.type=r,e.lanes=a,e}function qi(t,e,n,r){return t=On(7,t,r,e),t.lanes=n,t}function gc(t,e,n,r){return t=On(22,t,r,e),t.elementType=dy,t.lanes=n,t.stateNode={isHidden:!1},t}function nh(t,e,n){return t=On(6,t,null,e),t.lanes=n,t}function rh(t,e,n){return e=On(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function g7(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bf(0),this.expirationTimes=bf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bf(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function g1(t,e,n,r,s,a,l,c,d){return t=new g7(t,e,n,c,d),e===1?(e=1,a===!0&&(e|=8)):e=0,a=On(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},J0(a),t}function m7(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Os,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function n5(t){if(!t)return vi;t=t._reactInternals;e:{if(ss(t)!==t||t.tag!==1)throw Error(Y(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(un(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Y(171))}if(t.tag===1){var n=t.type;if(un(n))return n4(t,n,e)}return e}function r5(t,e,n,r,s,a,l,c,d){return t=g1(n,r,!0,t,s,a,l,c,d),t.context=n5(null),n=t.current,r=qt(),s=gi(n),a=Mr(r,s),a.callback=e??null,hi(n,a,s),t.current.lanes=s,Oa(t,s,r),cn(t,r),t}function mc(t,e,n,r){var s=e.current,a=qt(),l=gi(s);return n=n5(n),e.context===null?e.context=n:e.pendingContext=n,e=Mr(a,l),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=hi(s,e,l),t!==null&&(qn(t,s,l,a),mu(t,s,l)),l}function $u(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function O2(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function m1(t,e){O2(t,e),(t=t.alternate)&&O2(t,e)}function y7(){return null}var i5=typeof reportError=="function"?reportError:function(t){console.error(t)};function y1(t){this._internalRoot=t}yc.prototype.render=y1.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Y(409));mc(t,e,null,null)};yc.prototype.unmount=y1.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ns(function(){mc(null,t,null,null)}),e[Ir]=null}};function yc(t){this._internalRoot=t}yc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Dy();t={blockedOn:null,target:t,priority:e};for(var n=0;n<si.length&&e!==0&&e<si[n].priority;n++);si.splice(n,0,t),n===0&&by(t)}};function v1(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function vc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function D2(){}function v7(t,e,n,r,s){if(s){if(typeof r=="function"){var a=r;r=function(){var p=$u(l);a.call(p)}}var l=r5(e,r,t,0,null,!1,!1,"",D2);return t._reactRootContainer=l,t[Ir]=l.current,xa(t.nodeType===8?t.parentNode:t),ns(),l}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var c=r;r=function(){var p=$u(d);c.call(p)}}var d=g1(t,0,!1,null,null,!1,!1,"",D2);return t._reactRootContainer=d,t[Ir]=d.current,xa(t.nodeType===8?t.parentNode:t),ns(function(){mc(e,d,n,r)}),d}function _c(t,e,n,r,s){var a=n._reactRootContainer;if(a){var l=a;if(typeof s=="function"){var c=s;s=function(){var d=$u(l);c.call(d)}}mc(e,l,t,s)}else l=v7(n,e,t,s,r);return $u(l)}My=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ea(e.pendingLanes);n!==0&&(b0(e,n|1),cn(e,ft()),!(Fe&6)&&(io=ft()+500,wi()))}break;case 13:ns(function(){var r=br(t,1);if(r!==null){var s=qt();qn(r,t,1,s)}}),m1(t,1)}};j0=function(t){if(t.tag===13){var e=br(t,134217728);if(e!==null){var n=qt();qn(e,t,134217728,n)}m1(t,134217728)}};Oy=function(t){if(t.tag===13){var e=gi(t),n=br(t,e);if(n!==null){var r=qt();qn(n,t,e,r)}m1(t,e)}};Dy=function(){return ze};Iy=function(t,e){var n=ze;try{return ze=t,e()}finally{ze=n}};Ah=function(t,e,n){switch(e){case"input":if(Ch(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=uc(r);if(!s)throw Error(Y(90));hy(r),Ch(r,s)}}}break;case"textarea":gy(t,n);break;case"select":e=n.value,e!=null&&Ks(t,!!n.multiple,e,!1)}};wy=d1;ky=ns;var _7={usingClientEntryPoint:!1,Events:[Ia,zs,uc,Sy,xy,d1]},Yo={findFiberByHostInstance:Wi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},S7={bundleType:Yo.bundleType,version:Yo.version,rendererPackageName:Yo.rendererPackageName,rendererConfig:Yo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Py(t),t===null?null:t.stateNode},findFiberByHostInstance:Yo.findFiberByHostInstance||y7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nu.isDisabled&&nu.supportsFiber)try{sc=nu.inject(S7),gr=nu}catch{}}Sn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_7;Sn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v1(e))throw Error(Y(200));return m7(t,e,null,n)};Sn.createRoot=function(t,e){if(!v1(t))throw Error(Y(299));var n=!1,r="",s=i5;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=g1(t,1,!1,null,null,n,!1,r,s),t[Ir]=e.current,xa(t.nodeType===8?t.parentNode:t),new y1(e)};Sn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Y(188)):(t=Object.keys(t).join(","),Error(Y(268,t)));return t=Py(e),t=t===null?null:t.stateNode,t};Sn.flushSync=function(t){return ns(t)};Sn.hydrate=function(t,e,n){if(!vc(e))throw Error(Y(200));return _c(null,t,e,!0,n)};Sn.hydrateRoot=function(t,e,n){if(!v1(t))throw Error(Y(405));var r=n!=null&&n.hydratedSources||null,s=!1,a="",l=i5;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),e=r5(e,null,t,1,n??null,s,!1,a,l),t[Ir]=e.current,xa(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new yc(e)};Sn.render=function(t,e,n){if(!vc(e))throw Error(Y(200));return _c(null,t,e,!1,n)};Sn.unmountComponentAtNode=function(t){if(!vc(t))throw Error(Y(40));return t._reactRootContainer?(ns(function(){_c(null,null,t,!1,function(){t._reactRootContainer=null,t[Ir]=null})}),!0):!1};Sn.unstable_batchedUpdates=d1;Sn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!vc(n))throw Error(Y(200));if(t==null||t._reactInternals===void 0)throw Error(Y(38));return _c(t,e,n,!1,r)};Sn.version="18.3.1-next-f1338f8080-20240426";function s5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s5)}catch(t){console.error(t)}}s5(),sy.exports=Sn;var x7=sy.exports,o5,I2=x7;o5=I2.createRoot,I2.hydrateRoot;function w7({onUpload:t,disabled:e=!1}){const n=V.useRef(null),r=c=>{if(c.preventDefault(),e)return;const d=Array.from(c.dataTransfer.files).filter(p=>p.type.startsWith("image/"));d.length>0&&t(d)},s=c=>{c.preventDefault()},a=()=>{var c;(c=n.current)==null||c.click()},l=c=>{const d=c.target.files;d&&d.length>0&&t(Array.from(d)),c.target.value=""};return A.jsxs("div",{onDrop:r,onDragOver:s,onClick:a,className:`
41
+ flex cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-4
42
+ transition-colors
43
+ ${e?"border-gray-200 bg-gray-50 opacity-50 dark:border-gray-700 dark:bg-gray-800":"border-gray-300 bg-white hover:border-primary-500 hover:bg-primary-50 dark:border-gray-600 dark:bg-gray-700 dark:hover:border-primary-500 dark:hover:bg-primary-900/20"}
44
+ `,children:[A.jsx("svg",{className:"h-8 w-8 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),A.jsx("p",{className:"mt-2 text-sm text-gray-600 dark:text-gray-300",children:"Drop images or click to upload"}),A.jsx("input",{ref:n,type:"file",accept:"image/*",multiple:!0,onChange:l,className:"hidden",disabled:e})]})}function a5(t,e){return function(){return t.apply(e,arguments)}}const{toString:k7}=Object.prototype,{getPrototypeOf:_1}=Object,{iterator:Sc,toStringTag:l5}=Symbol,xc=(t=>e=>{const n=k7.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=t=>(t=t.toLowerCase(),e=>xc(e)===t),wc=t=>e=>typeof e===t,{isArray:ho}=Array,so=wc("undefined");function ja(t){return t!==null&&!so(t)&&t.constructor!==null&&!so(t.constructor)&&dn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const u5=Zn("ArrayBuffer");function C7(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&u5(t.buffer),e}const E7=wc("string"),dn=wc("function"),c5=wc("number"),za=t=>t!==null&&typeof t=="object",P7=t=>t===!0||t===!1,ku=t=>{if(xc(t)!=="object")return!1;const e=_1(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(l5 in t)&&!(Sc in t)},N7=t=>{if(!za(t)||ja(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},T7=Zn("Date"),R7=Zn("File"),L7=Zn("Blob"),A7=Zn("FileList"),F7=t=>za(t)&&dn(t.pipe),M7=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||dn(t.append)&&((e=xc(t))==="formdata"||e==="object"&&dn(t.toString)&&t.toString()==="[object FormData]"))},O7=Zn("URLSearchParams"),[D7,I7,b7,j7]=["ReadableStream","Request","Response","Headers"].map(Zn),z7=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ua(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),ho(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(ja(t))return;const a=n?Object.getOwnPropertyNames(t):Object.keys(t),l=a.length;let c;for(r=0;r<l;r++)c=a[r],e.call(null,t[c],c,t)}}function d5(t,e){if(ja(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const Xi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,f5=t=>!so(t)&&t!==Xi;function c0(){const{caseless:t,skipUndefined:e}=f5(this)&&this||{},n={},r=(s,a)=>{const l=t&&d5(n,a)||a;ku(n[l])&&ku(s)?n[l]=c0(n[l],s):ku(s)?n[l]=c0({},s):ho(s)?n[l]=s.slice():(!e||!so(s))&&(n[l]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&Ua(arguments[s],r);return n}const U7=(t,e,n,{allOwnKeys:r}={})=>(Ua(e,(s,a)=>{n&&dn(s)?Object.defineProperty(t,a,{value:a5(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),B7=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),G7=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},H7=(t,e,n,r)=>{let s,a,l;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),a=s.length;a-- >0;)l=s[a],(!r||r(l,t,e))&&!c[l]&&(e[l]=t[l],c[l]=!0);t=n!==!1&&_1(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},V7=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},W7=t=>{if(!t)return null;if(ho(t))return t;let e=t.length;if(!c5(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},K7=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&_1(Uint8Array)),Y7=(t,e)=>{const r=(t&&t[Sc]).call(t);let s;for(;(s=r.next())&&!s.done;){const a=s.value;e.call(t,a[0],a[1])}},X7=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Q7=Zn("HTMLFormElement"),q7=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),b2=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),$7=Zn("RegExp"),h5=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ua(n,(s,a)=>{let l;(l=e(s,a,t))!==!1&&(r[a]=l||s)}),Object.defineProperties(t,r)},J7=t=>{h5(t,(e,n)=>{if(dn(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(dn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Z7=(t,e)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return ho(t)?r(t):r(String(t).split(e)),n},e9=()=>{},t9=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function n9(t){return!!(t&&dn(t.append)&&t[l5]==="FormData"&&t[Sc])}const r9=t=>{const e=new Array(10),n=(r,s)=>{if(za(r)){if(e.indexOf(r)>=0)return;if(ja(r))return r;if(!("toJSON"in r)){e[s]=r;const a=ho(r)?[]:{};return Ua(r,(l,c)=>{const d=n(l,s+1);!so(d)&&(a[c]=d)}),e[s]=void 0,a}}return r};return n(t,0)},i9=Zn("AsyncFunction"),s9=t=>t&&(za(t)||dn(t))&&dn(t.then)&&dn(t.catch),p5=((t,e)=>t?setImmediate:e?((n,r)=>(Xi.addEventListener("message",({source:s,data:a})=>{s===Xi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Xi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",dn(Xi.postMessage)),o9=typeof queueMicrotask<"u"?queueMicrotask.bind(Xi):typeof process<"u"&&process.nextTick||p5,a9=t=>t!=null&&dn(t[Sc]),U={isArray:ho,isArrayBuffer:u5,isBuffer:ja,isFormData:M7,isArrayBufferView:C7,isString:E7,isNumber:c5,isBoolean:P7,isObject:za,isPlainObject:ku,isEmptyObject:N7,isReadableStream:D7,isRequest:I7,isResponse:b7,isHeaders:j7,isUndefined:so,isDate:T7,isFile:R7,isBlob:L7,isRegExp:$7,isFunction:dn,isStream:F7,isURLSearchParams:O7,isTypedArray:K7,isFileList:A7,forEach:Ua,merge:c0,extend:U7,trim:z7,stripBOM:B7,inherits:G7,toFlatObject:H7,kindOf:xc,kindOfTest:Zn,endsWith:V7,toArray:W7,forEachEntry:Y7,matchAll:X7,isHTMLForm:Q7,hasOwnProperty:b2,hasOwnProp:b2,reduceDescriptors:h5,freezeMethods:J7,toObjectSet:Z7,toCamelCase:q7,noop:e9,toFiniteNumber:t9,findKey:d5,global:Xi,isContextDefined:f5,isSpecCompliantForm:n9,toJSONObject:r9,isAsyncFn:i9,isThenable:s9,setImmediate:p5,asap:o9,isIterable:a9};let he=class g5 extends Error{static from(e,n,r,s,a,l){const c=new g5(e.message,n||e.code,r,s,a);return c.cause=e,c.name=e.name,l&&Object.assign(c,l),c}constructor(e,n,r,s,a){super(e),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.status}}};he.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";he.ERR_BAD_OPTION="ERR_BAD_OPTION";he.ECONNABORTED="ECONNABORTED";he.ETIMEDOUT="ETIMEDOUT";he.ERR_NETWORK="ERR_NETWORK";he.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";he.ERR_DEPRECATED="ERR_DEPRECATED";he.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";he.ERR_BAD_REQUEST="ERR_BAD_REQUEST";he.ERR_CANCELED="ERR_CANCELED";he.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";he.ERR_INVALID_URL="ERR_INVALID_URL";const l9=null;function d0(t){return U.isPlainObject(t)||U.isArray(t)}function m5(t){return U.endsWith(t,"[]")?t.slice(0,-2):t}function j2(t,e,n){return t?t.concat(e).map(function(s,a){return s=m5(s),!n&&a?"["+s+"]":s}).join(n?".":""):e}function u9(t){return U.isArray(t)&&!t.some(d0)}const c9=U.toFlatObject(U,{},null,function(e){return/^is[A-Z]/.test(e)});function kc(t,e,n){if(!U.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=U.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,k){return!U.isUndefined(k[E])});const r=n.metaTokens,s=n.visitor||m,a=n.dots,l=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(e);if(!U.isFunction(s))throw new TypeError("visitor must be a function");function p(y){if(y===null)return"";if(U.isDate(y))return y.toISOString();if(U.isBoolean(y))return y.toString();if(!d&&U.isBlob(y))throw new he("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(y)||U.isTypedArray(y)?d&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function m(y,E,k){let S=y;if(y&&!k&&typeof y=="object"){if(U.endsWith(E,"{}"))E=r?E:E.slice(0,-2),y=JSON.stringify(y);else if(U.isArray(y)&&u9(y)||(U.isFileList(y)||U.endsWith(E,"[]"))&&(S=U.toArray(y)))return E=m5(E),S.forEach(function(g,x){!(U.isUndefined(g)||g===null)&&e.append(l===!0?j2([E],x,a):l===null?E:E+"[]",p(g))}),!1}return d0(y)?!0:(e.append(j2(k,E,a),p(y)),!1)}const w=[],_=Object.assign(c9,{defaultVisitor:m,convertValue:p,isVisitable:d0});function P(y,E){if(!U.isUndefined(y)){if(w.indexOf(y)!==-1)throw Error("Circular reference detected in "+E.join("."));w.push(y),U.forEach(y,function(S,C){(!(U.isUndefined(S)||S===null)&&s.call(e,S,U.isString(C)?C.trim():C,E,_))===!0&&P(S,E?E.concat(C):[C])}),w.pop()}}if(!U.isObject(t))throw new TypeError("data must be an object");return P(t),e}function z2(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function S1(t,e){this._pairs=[],t&&kc(t,this,e)}const y5=S1.prototype;y5.append=function(e,n){this._pairs.push([e,n])};y5.toString=function(e){const n=e?function(r){return e.call(this,r,z2)}:z2;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function d9(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function v5(t,e,n){if(!e)return t;const r=n&&n.encode||d9,s=U.isFunction(n)?{serialize:n}:n,a=s&&s.serialize;let l;if(a?l=a(e,s):l=U.isURLSearchParams(e)?e.toString():new S1(e,s).toString(r),l){const c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}class U2{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){U.forEach(this.handlers,function(r){r!==null&&e(r)})}}const _5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},f9=typeof URLSearchParams<"u"?URLSearchParams:S1,h9=typeof FormData<"u"?FormData:null,p9=typeof Blob<"u"?Blob:null,g9={isBrowser:!0,classes:{URLSearchParams:f9,FormData:h9,Blob:p9},protocols:["http","https","file","blob","url","data"]},x1=typeof window<"u"&&typeof document<"u",f0=typeof navigator=="object"&&navigator||void 0,m9=x1&&(!f0||["ReactNative","NativeScript","NS"].indexOf(f0.product)<0),y9=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v9=x1&&window.location.href||"http://localhost",_9=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:x1,hasStandardBrowserEnv:m9,hasStandardBrowserWebWorkerEnv:y9,navigator:f0,origin:v9},Symbol.toStringTag,{value:"Module"})),Vt={..._9,...g9};function S9(t,e){return kc(t,new Vt.classes.URLSearchParams,{visitor:function(n,r,s,a){return Vt.isNode&&U.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function x9(t){return U.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function w9(t){const e={},n=Object.keys(t);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],e[a]=t[a];return e}function S5(t){function e(n,r,s,a){let l=n[a++];if(l==="__proto__")return!0;const c=Number.isFinite(+l),d=a>=n.length;return l=!l&&U.isArray(s)?s.length:l,d?(U.hasOwnProp(s,l)?s[l]=[s[l],r]:s[l]=r,!c):((!s[l]||!U.isObject(s[l]))&&(s[l]=[]),e(n,r,s[l],a)&&U.isArray(s[l])&&(s[l]=w9(s[l])),!c)}if(U.isFormData(t)&&U.isFunction(t.entries)){const n={};return U.forEachEntry(t,(r,s)=>{e(x9(r),s,n,0)}),n}return null}function k9(t,e,n){if(U.isString(t))try{return(e||JSON.parse)(t),U.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ba={transitional:_5,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=U.isObject(e);if(a&&U.isHTMLForm(e)&&(e=new FormData(e)),U.isFormData(e))return s?JSON.stringify(S5(e)):e;if(U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e)||U.isReadableStream(e))return e;if(U.isArrayBufferView(e))return e.buffer;if(U.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return S9(e,this.formSerializer).toString();if((c=U.isFileList(e))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return kc(c?{"files[]":e}:e,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),k9(e)):e}],transformResponse:[function(e){const n=this.transitional||Ba.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(U.isResponse(e)||U.isReadableStream(e))return e;if(e&&U.isString(e)&&(r&&!this.responseType||s)){const l=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(c){if(l)throw c.name==="SyntaxError"?he.from(c,he.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],t=>{Ba.headers[t]={}});const C9=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),E9=t=>{const e={};let n,r,s;return t&&t.split(`
45
+ `).forEach(function(l){s=l.indexOf(":"),n=l.substring(0,s).trim().toLowerCase(),r=l.substring(s+1).trim(),!(!n||e[n]&&C9[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},B2=Symbol("internals");function Xo(t){return t&&String(t).trim().toLowerCase()}function Cu(t){return t===!1||t==null?t:U.isArray(t)?t.map(Cu):String(t)}function P9(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const N9=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ih(t,e,n,r,s){if(U.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!U.isString(e)){if(U.isString(r))return e.indexOf(r)!==-1;if(U.isRegExp(r))return r.test(e)}}function T9(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function R9(t,e){const n=U.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,a,l){return this[r].call(this,e,s,a,l)},configurable:!0})})}let fn=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function a(c,d,p){const m=Xo(d);if(!m)throw new Error("header name must be a non-empty string");const w=U.findKey(s,m);(!w||s[w]===void 0||p===!0||p===void 0&&s[w]!==!1)&&(s[w||d]=Cu(c))}const l=(c,d)=>U.forEach(c,(p,m)=>a(p,m,d));if(U.isPlainObject(e)||e instanceof this.constructor)l(e,n);else if(U.isString(e)&&(e=e.trim())&&!N9(e))l(E9(e),n);else if(U.isObject(e)&&U.isIterable(e)){let c={},d,p;for(const m of e){if(!U.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[p=m[0]]=(d=c[p])?U.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}l(c,n)}else e!=null&&a(n,e,r);return this}get(e,n){if(e=Xo(e),e){const r=U.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return P9(s);if(U.isFunction(n))return n.call(this,s,r);if(U.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Xo(e),e){const r=U.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ih(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function a(l){if(l=Xo(l),l){const c=U.findKey(r,l);c&&(!n||ih(r,r[c],c,n))&&(delete r[c],s=!0)}}return U.isArray(e)?e.forEach(a):a(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!e||ih(this,this[a],a,e,!0))&&(delete this[a],s=!0)}return s}normalize(e){const n=this,r={};return U.forEach(this,(s,a)=>{const l=U.findKey(r,a);if(l){n[l]=Cu(s),delete n[a];return}const c=e?T9(a):String(a).trim();c!==a&&delete n[a],n[c]=Cu(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return U.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&U.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
46
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[B2]=this[B2]={accessors:{}}).accessors,s=this.prototype;function a(l){const c=Xo(l);r[c]||(R9(s,l),r[c]=!0)}return U.isArray(e)?e.forEach(a):a(e),this}};fn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(fn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});U.freezeMethods(fn);function sh(t,e){const n=this||Ba,r=e||n,s=fn.from(r.headers);let a=r.data;return U.forEach(t,function(c){a=c.call(n,a,s.normalize(),e?e.status:void 0)}),s.normalize(),a}function x5(t){return!!(t&&t.__CANCEL__)}let Ga=class extends he{constructor(e,n,r){super(e??"canceled",he.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function w5(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new he("Request failed with status code "+n.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function L9(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function A9(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,a=0,l;return e=e!==void 0?e:1e3,function(d){const p=Date.now(),m=r[a];l||(l=p),n[s]=d,r[s]=p;let w=a,_=0;for(;w!==s;)_+=n[w++],w=w%t;if(s=(s+1)%t,s===a&&(a=(a+1)%t),p-l<e)return;const P=m&&p-m;return P?Math.round(_*1e3/P):void 0}}function F9(t,e){let n=0,r=1e3/e,s,a;const l=(p,m=Date.now())=>{n=m,s=null,a&&(clearTimeout(a),a=null),t(...p)};return[(...p)=>{const m=Date.now(),w=m-n;w>=r?l(p,m):(s=p,a||(a=setTimeout(()=>{a=null,l(s)},r-w)))},()=>s&&l(s)]}const Ju=(t,e,n=3)=>{let r=0;const s=A9(50,250);return F9(a=>{const l=a.loaded,c=a.lengthComputable?a.total:void 0,d=l-r,p=s(d),m=l<=c;r=l;const w={loaded:l,total:c,progress:c?l/c:void 0,bytes:d,rate:p||void 0,estimated:p&&c&&m?(c-l)/p:void 0,event:a,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(w)},n)},G2=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},H2=t=>(...e)=>U.asap(()=>t(...e)),M9=Vt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Vt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Vt.origin),Vt.navigator&&/(msie|trident)/i.test(Vt.navigator.userAgent)):()=>!0,O9=Vt.hasStandardBrowserEnv?{write(t,e,n,r,s,a,l){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];U.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),U.isString(r)&&c.push(`path=${r}`),U.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),U.isString(l)&&c.push(`SameSite=${l}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function D9(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function I9(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function k5(t,e,n){let r=!D9(e);return t&&(r||n==!1)?I9(t,e):e}const V2=t=>t instanceof fn?{...t}:t;function rs(t,e){e=e||{};const n={};function r(p,m,w,_){return U.isPlainObject(p)&&U.isPlainObject(m)?U.merge.call({caseless:_},p,m):U.isPlainObject(m)?U.merge({},m):U.isArray(m)?m.slice():m}function s(p,m,w,_){if(U.isUndefined(m)){if(!U.isUndefined(p))return r(void 0,p,w,_)}else return r(p,m,w,_)}function a(p,m){if(!U.isUndefined(m))return r(void 0,m)}function l(p,m){if(U.isUndefined(m)){if(!U.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p,m,w){if(w in e)return r(p,m);if(w in t)return r(void 0,p)}const d={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(p,m,w)=>s(V2(p),V2(m),w,!0)};return U.forEach(Object.keys({...t,...e}),function(m){const w=d[m]||s,_=w(t[m],e[m],m);U.isUndefined(_)&&w!==c||(n[m]=_)}),n}const C5=t=>{const e=rs({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:a,headers:l,auth:c}=e;if(e.headers=l=fn.from(l),e.url=v5(k5(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),U.isFormData(n)){if(Vt.hasStandardBrowserEnv||Vt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(U.isFunction(n.getHeaders)){const d=n.getHeaders(),p=["content-type","content-length"];Object.entries(d).forEach(([m,w])=>{p.includes(m.toLowerCase())&&l.set(m,w)})}}if(Vt.hasStandardBrowserEnv&&(r&&U.isFunction(r)&&(r=r(e)),r||r!==!1&&M9(e.url))){const d=s&&a&&O9.read(a);d&&l.set(s,d)}return e},b9=typeof XMLHttpRequest<"u",j9=b9&&function(t){return new Promise(function(n,r){const s=C5(t);let a=s.data;const l=fn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:p}=s,m,w,_,P,y;function E(){P&&P(),y&&y(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let k=new XMLHttpRequest;k.open(s.method.toUpperCase(),s.url,!0),k.timeout=s.timeout;function S(){if(!k)return;const g=fn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),T={data:!c||c==="text"||c==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:g,config:t,request:k};w5(function(M){n(M),E()},function(M){r(M),E()},T),k=null}"onloadend"in k?k.onloadend=S:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(S)},k.onabort=function(){k&&(r(new he("Request aborted",he.ECONNABORTED,t,k)),k=null)},k.onerror=function(x){const T=x&&x.message?x.message:"Network Error",R=new he(T,he.ERR_NETWORK,t,k);R.event=x||null,r(R),k=null},k.ontimeout=function(){let x=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||_5;s.timeoutErrorMessage&&(x=s.timeoutErrorMessage),r(new he(x,T.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,t,k)),k=null},a===void 0&&l.setContentType(null),"setRequestHeader"in k&&U.forEach(l.toJSON(),function(x,T){k.setRequestHeader(T,x)}),U.isUndefined(s.withCredentials)||(k.withCredentials=!!s.withCredentials),c&&c!=="json"&&(k.responseType=s.responseType),p&&([_,y]=Ju(p,!0),k.addEventListener("progress",_)),d&&k.upload&&([w,P]=Ju(d),k.upload.addEventListener("progress",w),k.upload.addEventListener("loadend",P)),(s.cancelToken||s.signal)&&(m=g=>{k&&(r(!g||g.type?new Ga(null,t,k):g),k.abort(),k=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const C=L9(s.url);if(C&&Vt.protocols.indexOf(C)===-1){r(new he("Unsupported protocol "+C+":",he.ERR_BAD_REQUEST,t));return}k.send(a||null)})},z9=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const a=function(p){if(!s){s=!0,c();const m=p instanceof Error?p:this.reason;r.abort(m instanceof he?m:new Ga(m instanceof Error?m.message:m))}};let l=e&&setTimeout(()=>{l=null,a(new he(`timeout of ${e}ms exceeded`,he.ETIMEDOUT))},e);const c=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),t=null)};t.forEach(p=>p.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>U.asap(c),d}},U9=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},B9=async function*(t,e){for await(const n of G9(t))yield*U9(n,e)},G9=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},W2=(t,e,n,r)=>{const s=B9(t,e);let a=0,l,c=d=>{l||(l=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:p,value:m}=await s.next();if(p){c(),d.close();return}let w=m.byteLength;if(n){let _=a+=w;n(_)}d.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},K2=64*1024,{isFunction:ru}=U,H9=(({Request:t,Response:e})=>({Request:t,Response:e}))(U.global),{ReadableStream:Y2,TextEncoder:X2}=U.global,Q2=(t,...e)=>{try{return!!t(...e)}catch{return!1}},V9=t=>{t=U.merge.call({skipUndefined:!0},H9,t);const{fetch:e,Request:n,Response:r}=t,s=e?ru(e):typeof fetch=="function",a=ru(n),l=ru(r);if(!s)return!1;const c=s&&ru(Y2),d=s&&(typeof X2=="function"?(y=>E=>y.encode(E))(new X2):async y=>new Uint8Array(await new n(y).arrayBuffer())),p=a&&c&&Q2(()=>{let y=!1;const E=new n(Vt.origin,{body:new Y2,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!E}),m=l&&c&&Q2(()=>U.isReadableStream(new r("").body)),w={stream:m&&(y=>y.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!w[y]&&(w[y]=(E,k)=>{let S=E&&E[y];if(S)return S.call(E);throw new he(`Response type '${y}' is not supported`,he.ERR_NOT_SUPPORT,k)})});const _=async y=>{if(y==null)return 0;if(U.isBlob(y))return y.size;if(U.isSpecCompliantForm(y))return(await new n(Vt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(U.isArrayBufferView(y)||U.isArrayBuffer(y))return y.byteLength;if(U.isURLSearchParams(y)&&(y=y+""),U.isString(y))return(await d(y)).byteLength},P=async(y,E)=>{const k=U.toFiniteNumber(y.getContentLength());return k??_(E)};return async y=>{let{url:E,method:k,data:S,signal:C,cancelToken:g,timeout:x,onDownloadProgress:T,onUploadProgress:R,responseType:M,headers:L,withCredentials:b="same-origin",fetchOptions:F}=C5(y),B=e||fetch;M=M?(M+"").toLowerCase():"text";let W=z9([C,g&&g.toAbortSignal()],x),X=null;const ie=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let ee;try{if(R&&p&&k!=="get"&&k!=="head"&&(ee=await P(L,S))!==0){let q=new n(E,{method:"POST",body:S,duplex:"half"}),te;if(U.isFormData(S)&&(te=q.headers.get("content-type"))&&L.setContentType(te),q.body){const[we,Be]=G2(ee,Ju(H2(R)));S=W2(q.body,K2,we,Be)}}U.isString(b)||(b=b?"include":"omit");const ce=a&&"credentials"in n.prototype,ve={...F,signal:W,method:k.toUpperCase(),headers:L.normalize().toJSON(),body:S,duplex:"half",credentials:ce?b:void 0};X=a&&new n(E,ve);let G=await(a?B(X,F):B(E,ve));const Z=m&&(M==="stream"||M==="response");if(m&&(T||Z&&ie)){const q={};["status","statusText","headers"].forEach(Ke=>{q[Ke]=G[Ke]});const te=U.toFiniteNumber(G.headers.get("content-length")),[we,Be]=T&&G2(te,Ju(H2(T),!0))||[];G=new r(W2(G.body,K2,we,()=>{Be&&Be(),ie&&ie()}),q)}M=M||"text";let Q=await w[U.findKey(w,M)||"text"](G,y);return!Z&&ie&&ie(),await new Promise((q,te)=>{w5(q,te,{data:Q,headers:fn.from(G.headers),status:G.status,statusText:G.statusText,config:y,request:X})})}catch(ce){throw ie&&ie(),ce&&ce.name==="TypeError"&&/Load failed|fetch/i.test(ce.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,y,X),{cause:ce.cause||ce}):he.from(ce,ce&&ce.code,y,X)}}},W9=new Map,E5=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,a=[r,s,n];let l=a.length,c=l,d,p,m=W9;for(;c--;)d=a[c],p=m.get(d),p===void 0&&m.set(d,p=c?new Map:V9(e)),m=p;return p};E5();const w1={http:l9,xhr:j9,fetch:{get:E5}};U.forEach(w1,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const q2=t=>`- ${t}`,K9=t=>U.isFunction(t)||t===null||t===!1;function Y9(t,e){t=U.isArray(t)?t:[t];const{length:n}=t;let r,s;const a={};for(let l=0;l<n;l++){r=t[l];let c;if(s=r,!K9(r)&&(s=w1[(c=String(r)).toLowerCase()],s===void 0))throw new he(`Unknown adapter '${c}'`);if(s&&(U.isFunction(s)||(s=s.get(e))))break;a[c||"#"+l]=s}if(!s){const l=Object.entries(a).map(([d,p])=>`adapter ${d} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=n?l.length>1?`since :
47
+ `+l.map(q2).join(`
48
+ `):" "+q2(l[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const P5={getAdapter:Y9,adapters:w1};function oh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ga(null,t)}function $2(t){return oh(t),t.headers=fn.from(t.headers),t.data=sh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),P5.getAdapter(t.adapter||Ba.adapter,t)(t).then(function(r){return oh(t),r.data=sh.call(t,t.transformResponse,r),r.headers=fn.from(r.headers),r},function(r){return x5(r)||(oh(t),r&&r.response&&(r.response.data=sh.call(t,t.transformResponse,r.response),r.response.headers=fn.from(r.response.headers))),Promise.reject(r)})}const N5="1.13.4",Cc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Cc[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const J2={};Cc.transitional=function(e,n,r){function s(a,l){return"[Axios v"+N5+"] Transitional option '"+a+"'"+l+(r?". "+r:"")}return(a,l,c)=>{if(e===!1)throw new he(s(l," has been removed"+(n?" in "+n:"")),he.ERR_DEPRECATED);return n&&!J2[l]&&(J2[l]=!0,console.warn(s(l," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(a,l,c):!0}};Cc.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function X9(t,e,n){if(typeof t!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const a=r[s],l=e[a];if(l){const c=t[a],d=c===void 0||l(c,a,t);if(d!==!0)throw new he("option "+a+" must be "+d,he.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new he("Unknown option "+a,he.ERR_BAD_OPTION)}}const Eu={assertOptions:X9,validators:Cc},dr=Eu.validators;let $i=class{constructor(e){this.defaults=e||{},this.interceptors={request:new U2,response:new U2}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
49
+ `+a):r.stack=a}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=rs(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Eu.assertOptions(r,{silentJSONParsing:dr.transitional(dr.boolean),forcedJSONParsing:dr.transitional(dr.boolean),clarifyTimeoutError:dr.transitional(dr.boolean)},!1),s!=null&&(U.isFunction(s)?n.paramsSerializer={serialize:s}:Eu.assertOptions(s,{encode:dr.function,serialize:dr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Eu.assertOptions(n,{baseUrl:dr.spelling("baseURL"),withXsrfToken:dr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&U.merge(a.common,a[n.method]);a&&U.forEach(["delete","get","head","post","put","patch","common"],y=>{delete a[y]}),n.headers=fn.concat(l,a);const c=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(d=d&&E.synchronous,c.unshift(E.fulfilled,E.rejected))});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let m,w=0,_;if(!d){const y=[$2.bind(this),void 0];for(y.unshift(...c),y.push(...p),_=y.length,m=Promise.resolve(n);w<_;)m=m.then(y[w++],y[w++]);return m}_=c.length;let P=n;for(;w<_;){const y=c[w++],E=c[w++];try{P=y(P)}catch(k){E.call(this,k);break}}try{m=$2.call(this,P)}catch(y){return Promise.reject(y)}for(w=0,_=p.length;w<_;)m=m.then(p[w++],p[w++]);return m}getUri(e){e=rs(this.defaults,e);const n=k5(e.baseURL,e.url,e.allowAbsoluteUrls);return v5(n,e.params,e.paramsSerializer)}};U.forEach(["delete","get","head","options"],function(e){$i.prototype[e]=function(n,r){return this.request(rs(r||{},{method:e,url:n,data:(r||{}).data}))}});U.forEach(["post","put","patch"],function(e){function n(r){return function(a,l,c){return this.request(rs(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:l}))}}$i.prototype[e]=n(),$i.prototype[e+"Form"]=n(!0)});let Q9=class T5{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const l=new Promise(c=>{r.subscribe(c),a=c}).then(s);return l.cancel=function(){r.unsubscribe(a)},l},e(function(a,l,c){r.reason||(r.reason=new Ga(a,l,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new T5(function(s){e=s}),cancel:e}}};function q9(t){return function(n){return t.apply(null,n)}}function $9(t){return U.isObject(t)&&t.isAxiosError===!0}const h0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(h0).forEach(([t,e])=>{h0[e]=t});function R5(t){const e=new $i(t),n=a5($i.prototype.request,e);return U.extend(n,$i.prototype,e,{allOwnKeys:!0}),U.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return R5(rs(t,s))},n}const ht=R5(Ba);ht.Axios=$i;ht.CanceledError=Ga;ht.CancelToken=Q9;ht.isCancel=x5;ht.VERSION=N5;ht.toFormData=kc;ht.AxiosError=he;ht.Cancel=ht.CanceledError;ht.all=function(e){return Promise.all(e)};ht.spread=q9;ht.isAxiosError=$9;ht.mergeConfig=rs;ht.AxiosHeaders=fn;ht.formToJSON=t=>S5(U.isHTMLForm(t)?new FormData(t):t);ht.getAdapter=P5.getAdapter;ht.HttpStatusCode=h0;ht.default=ht;const{Axios:IC,AxiosError:bC,CanceledError:jC,isCancel:zC,CancelToken:UC,VERSION:BC,all:GC,Cancel:HC,isAxiosError:VC,spread:WC,toFormData:KC,AxiosHeaders:YC,HttpStatusCode:XC,formToJSON:QC,getAdapter:qC,mergeConfig:$C}=ht,hn=ht.create({baseURL:"/api"});async function J9(){return(await hn.get("/projects")).data}async function Z9(t){return(await hn.post("/projects",t)).data}async function Z2(t){return(await hn.post(`/projects/${encodeURIComponent(t)}/open`)).data}async function e_(){await hn.post("/projects/close")}async function t_(t){await hn.delete(`/projects/${encodeURIComponent(t)}`)}async function n_(){return(await hn.get("/project")).data}async function em(){return(await hn.get("/images")).data}async function r_(t){const e=new FormData;return e.append("file",t),(await hn.post("/images",e,{headers:{"Content-Type":"multipart/form-data"}})).data}async function i_(t){const e=[];for(const n of t){const r=await r_(n);e.push(r)}return e}function L5(t){return`/api/images/${encodeURIComponent(t)}`}async function s_(t){await hn.delete(`/images/${encodeURIComponent(t)}`)}async function o_(t){return(await hn.get(`/images/${encodeURIComponent(t)}/annotations`)).data}async function a_(t,e){return(await hn.post(`/images/${encodeURIComponent(t)}/annotations`,e)).data}async function l_(t,e,n){return(await hn.put(`/images/${encodeURIComponent(t)}/annotations/${e}`,n)).data}async function u_(t,e){await hn.delete(`/images/${encodeURIComponent(t)}/annotations/${e}`)}async function c_(t){return(await hn.delete(`/images/${encodeURIComponent(t)}/annotations`)).data.deleted}const tm=[{id:"yolo",name:"YOLO",description:"Ultralytics YOLO format with train/val/test split",fileType:"ZIP"},{id:"coco",name:"COCO JSON",description:"Common Objects in Context format (single JSON)",fileType:"JSON"},{id:"pascal-voc",name:"Pascal VOC",description:"XML annotations per image (ImageNet style)",fileType:"ZIP"},{id:"createml",name:"CreateML",description:"Apple CreateML format for Core ML training",fileType:"JSON"},{id:"csv",name:"CSV",description:"Simple CSV with bounding box coordinates",fileType:"CSV"}];function d_(t,e={train:.7,val:.2,test:.1}){switch(t){case"yolo":return`/api/export/yolo?train_split=${e.train}&val_split=${e.val}&test_split=${e.test}`;case"coco":return"/api/export/coco";case"pascal-voc":return"/api/export/pascal-voc";case"createml":return"/api/export/createml";case"csv":return"/api/export/csv"}}function f_({images:t,currentImage:e,onSelectImage:n,onDeleteImage:r}){return t.length===0?A.jsx("div",{className:"p-4 text-center text-sm text-gray-500 dark:text-gray-400",children:"No images uploaded yet"}):A.jsx("div",{className:"flex flex-col gap-2 p-2",children:t.map((s,a)=>A.jsxs("div",{className:`
50
+ group relative flex cursor-pointer items-center gap-2 rounded-lg p-2 transition-colors
51
+ ${e===s?"bg-primary-100 ring-2 ring-primary-500 dark:bg-primary-900/30":"hover:bg-gray-100 dark:hover:bg-gray-700"}
52
+ `,onClick:()=>n(s),children:[A.jsx("div",{className:"h-12 w-12 flex-shrink-0 overflow-hidden rounded bg-gray-200 dark:bg-gray-700",children:A.jsx("img",{src:L5(s),alt:s,className:"h-full w-full object-cover",loading:"lazy"})}),A.jsx("div",{className:"min-w-0 flex-1",children:A.jsxs("p",{className:"truncate text-sm font-medium text-gray-900 dark:text-gray-100",children:[a+1,". ",s]})}),A.jsx("button",{onClick:l=>{l.stopPropagation(),r(s)},className:"absolute right-2 top-2 hidden rounded p-1 text-gray-400 hover:bg-red-100 hover:text-red-500 group-hover:block dark:hover:bg-red-900/30",title:"Delete image",children:A.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},s))})}const nm={product:"#22c55e",price:"#3b82f6",brand:"#f59e0b",promo:"#ef4444",default:"#8b5cf6"};function h_(t){return nm[t.toLowerCase()]??nm.default??"#8b5cf6"}function p_({annotations:t,selectedId:e,onSelectAnnotation:n,onDeleteAnnotation:r}){return t.length===0?A.jsx("div",{className:"p-4 text-center text-sm text-gray-500 dark:text-gray-400",children:"No annotations yet. Draw bounding boxes on the image."}):A.jsx("div",{className:"flex flex-col gap-1 p-2",children:t.map((s,a)=>{const l=h_(s.label);return A.jsxs("div",{className:`
53
+ group flex cursor-pointer items-center gap-2 rounded-lg p-2 transition-colors
54
+ ${e===s.id?"bg-gray-100 ring-2 dark:bg-gray-700":"hover:bg-gray-50 dark:hover:bg-gray-700"}
55
+ `,style:{"--tw-ring-color":l},onClick:()=>n(s.id),children:[A.jsx("div",{className:"h-4 w-4 flex-shrink-0 rounded",style:{backgroundColor:l}}),A.jsxs("div",{className:"min-w-0 flex-1",children:[A.jsxs("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:[a+1,". ",s.label]}),A.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Class ID: ",s.class_id]})]}),A.jsx("button",{onClick:c=>{c.stopPropagation(),r(s.id)},className:"hidden rounded p-1 text-gray-400 hover:bg-red-100 hover:text-red-500 group-hover:block dark:hover:bg-red-900/30",title:"Delete annotation",children:A.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},s.id)})})}function g_({currentLabel:t,labels:e,onLabelChange:n,onPrevImage:r,onNextImage:s,onClearAnnotations:a,onExport:l,onManageLabels:c,imageIndex:d,imageCount:p}){return A.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 bg-white px-4 py-2 dark:border-gray-700 dark:bg-gray-800",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("label",{className:"text-sm text-gray-600 dark:text-gray-300",children:"Label:"}),A.jsx("select",{value:t,onChange:m=>n(m.target.value),className:"rounded-lg border border-gray-300 bg-white px-3 py-1.5 text-sm focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white",children:e.map((m,w)=>A.jsxs("option",{value:m,children:[w+1,". ",m]},m))}),A.jsx("button",{onClick:c,className:"rounded-lg border border-gray-300 bg-white p-1.5 text-gray-600 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600",title:"Manage labels",children:A.jsxs("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("button",{onClick:r,disabled:p===0,className:"rounded-lg border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600",title:"Previous image (←)",children:"← Prev"}),A.jsx("span",{className:"min-w-[80px] text-center text-sm text-gray-600 dark:text-gray-300",children:p>0?`${d+1} / ${p}`:"0 / 0"}),A.jsx("button",{onClick:s,disabled:p===0,className:"rounded-lg border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600",title:"Next image (→)",children:"Next →"}),A.jsx("div",{className:"mx-2 h-6 w-px bg-gray-200 dark:bg-gray-600"}),A.jsx("button",{onClick:a,className:"rounded-lg border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600",title:"Clear all annotations",children:"Clear"}),A.jsx("button",{onClick:l,className:"rounded-lg bg-primary-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-primary-700",title:"Export annotations",children:"Export"})]})]})}function m_({onOpenProject:t}){const[e,n]=V.useState([]),[r,s]=V.useState(!0),[a,l]=V.useState(!1),[c,d]=V.useState(""),[p,m]=V.useState(null),w=V.useCallback(async()=>{try{s(!0);const k=await J9();n(k),m(null)}catch{m("Failed to load projects")}finally{s(!1)}},[]);V.useEffect(()=>{w()},[w]);const _=async()=>{if(c.trim())try{l(!0);const k=await Z9({name:c.trim()});d("");const S=await Z2(k.id);t(S)}catch{m("Failed to create project")}finally{l(!1)}},P=async k=>{try{const S=await Z2(k.id);t(S)}catch{m("Failed to open project")}},y=async k=>{if(confirm(`Delete "${k.name}" and all its data? This cannot be undone.`))try{await t_(k.id),await w()}catch{m("Failed to delete project")}},E=k=>new Date(k).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return A.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-100 p-8 dark:bg-gray-900",children:A.jsxs("div",{className:"w-full max-w-2xl",children:[A.jsx("div",{className:"-mt-4 mb-4 flex justify-center",children:A.jsx("div",{className:"relative h-48 w-96",style:{maskImage:"radial-gradient(ellipse 80% 80% at center, black 40%, transparent 100%)",WebkitMaskImage:"radial-gradient(ellipse 80% 80% at center, black 40%, transparent 100%)"},children:A.jsx("img",{src:"/logo.png",alt:"Bbannotate Logo",className:"h-full w-full object-contain"})})}),A.jsx("div",{className:"mb-8 text-center",children:A.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Bounding box annotation tool for image datasets"})}),p&&A.jsxs("div",{className:"mb-4 rounded-lg bg-red-50 p-4 text-red-700 dark:bg-red-900/20 dark:text-red-400",children:[p,A.jsx("button",{onClick:()=>m(null),className:"float-right font-bold",children:"×"})]}),A.jsxs("div",{className:"mb-6 rounded-lg bg-white p-6 shadow-sm dark:bg-gray-800",children:[A.jsx("h2",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-white",children:"Create New Project"}),A.jsxs("div",{className:"flex gap-3",children:[A.jsx("input",{type:"text",value:c,onChange:k=>d(k.target.value),onKeyDown:k=>k.key==="Enter"&&_(),placeholder:"Enter project name...",className:"flex-1 rounded-lg border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400",disabled:a}),A.jsx("button",{onClick:_,disabled:a||!c.trim(),className:"rounded-lg bg-blue-600 px-6 py-2 font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:a?"Creating...":"Create"})]})]}),A.jsxs("div",{className:"rounded-lg bg-white p-6 shadow-sm dark:bg-gray-800",children:[A.jsx("h2",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-white",children:"Recent Projects"}),r?A.jsx("div",{className:"py-8 text-center text-gray-500 dark:text-gray-400",children:"Loading projects..."}):e.length===0?A.jsxs("div",{className:"py-8 text-center text-gray-500 dark:text-gray-400",children:[A.jsx("svg",{className:"mx-auto mb-3 h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),A.jsx("p",{children:"No projects yet"}),A.jsx("p",{className:"text-sm",children:"Create a new project to get started"})]}):A.jsx("ul",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:e.map(k=>A.jsx("li",{className:"py-3",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("button",{onClick:()=>P(k),className:"flex-1 text-left hover:bg-gray-50 dark:hover:bg-gray-700/50 -mx-3 px-3 py-2 rounded-lg transition-colors",children:[A.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:k.name}),A.jsxs("div",{className:"mt-1 flex gap-4 text-sm text-gray-500 dark:text-gray-400",children:[A.jsxs("span",{children:[k.image_count," images"]}),A.jsxs("span",{children:[k.annotation_count," annotations"]}),A.jsxs("span",{children:["Last opened: ",E(k.last_opened)]})]})]}),A.jsx("button",{onClick:()=>y(k),className:"ml-2 rounded p-2 text-gray-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20 dark:hover:text-red-400",title:"Delete project",children:A.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})},k.id))})]})]})})}function y_({labels:t,onLabelsChange:e,onClose:n}){const[r,s]=V.useState([...t]),[a,l]=V.useState(""),[c,d]=V.useState(null),p=V.useCallback(()=>{const E=a.trim().toLowerCase();if(!E){d("Label cannot be empty");return}if(r.includes(E)){d("Label already exists");return}s([...r,E]),l(""),d(null)},[a,r]),m=V.useCallback(E=>{if(r.length<=1){d("Must have at least one label");return}const k=r.filter((S,C)=>C!==E);s(k),d(null)},[r]),w=V.useCallback(E=>{if(E<=0)return;const k=[...r];[k[E-1],k[E]]=[k[E]??"",k[E-1]??""],s(k)},[r]),_=V.useCallback(E=>{if(E>=r.length-1)return;const k=[...r];[k[E],k[E+1]]=[k[E+1]??"",k[E]??""],s(k)},[r]),P=V.useCallback(()=>{if(r.length===0){d("Must have at least one label");return}e(r),n()},[r,e,n]),y=E=>{E.key==="Enter"&&(E.preventDefault(),p())};return A.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:A.jsxs("div",{className:"w-full max-w-md rounded-xl bg-white shadow-2xl dark:bg-gray-800",children:[A.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Manage Labels"}),A.jsx("button",{onClick:n,className:"rounded-lg p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",children:A.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),A.jsxs("div",{className:"max-h-96 overflow-y-auto px-6 py-4",children:[A.jsx("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:"Add, remove, or reorder labels. Press 1-9 to quickly select a label while annotating."}),c&&A.jsx("div",{className:"mb-4 rounded-lg bg-red-50 px-4 py-2 text-sm text-red-600 dark:bg-red-900/30 dark:text-red-400",children:c}),A.jsxs("div",{className:"mb-4 flex gap-2",children:[A.jsx("input",{type:"text",value:a,onChange:E=>l(E.target.value),onKeyDown:y,placeholder:"New label name...",className:"flex-1 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"}),A.jsx("button",{onClick:p,className:"rounded-lg bg-primary-600 px-4 py-2 text-sm font-medium text-white hover:bg-primary-700",children:"Add"})]}),A.jsx("ul",{className:"space-y-2",children:r.map((E,k)=>A.jsxs("li",{className:"flex items-center gap-2 rounded-lg bg-gray-50 px-3 py-2 dark:bg-gray-700",children:[A.jsx("span",{className:"flex h-6 w-6 items-center justify-center rounded bg-gray-200 text-xs font-medium text-gray-600 dark:bg-gray-600 dark:text-gray-300",children:k+1}),A.jsx("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:E}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("button",{onClick:()=>w(k),disabled:k===0,className:"rounded p-1 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:opacity-30 dark:hover:bg-gray-600 dark:hover:text-gray-300",title:"Move up",children:A.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})})}),A.jsx("button",{onClick:()=>_(k),disabled:k===r.length-1,className:"rounded p-1 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:opacity-30 dark:hover:bg-gray-600 dark:hover:text-gray-300",title:"Move down",children:A.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),A.jsx("button",{onClick:()=>m(k),className:"rounded p-1 text-gray-400 hover:bg-red-100 hover:text-red-600 dark:hover:bg-red-900/30 dark:hover:text-red-400",title:"Remove label",children:A.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]},`${E}-${k}`))})]}),A.jsxs("div",{className:"flex justify-end gap-3 border-t border-gray-200 px-6 py-4 dark:border-gray-700",children:[A.jsx("button",{onClick:n,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",children:"Cancel"}),A.jsx("button",{onClick:P,className:"rounded-lg bg-primary-600 px-4 py-2 text-sm font-medium text-white hover:bg-primary-700",children:"Save Changes"})]})]})})}function v_({onClose:t}){const[e,n]=V.useState("yolo"),[r,s]=V.useState({train:70,val:20,test:10}),[a,l]=V.useState(!1),c=V.useCallback((m,w)=>{const _=Math.max(0,Math.min(100,w)),P=r[m],y=_-P,E=["train","val","test"].filter(g=>g!==m),k=E.reduce((g,x)=>g+r[x],0);if(k===0){s({train:0,val:0,test:0,[m]:100});return}const S={...r,[m]:_};E.forEach(g=>{const x=r[g]/k;S[g]=Math.max(0,Math.round(r[g]-y*x))});const C=S.train+S.val+S.test;if(C!==100){const g=E.reduce((x,T)=>S[x]>=S[T]?x:T);S[g]+=100-C}s(S)},[r]),d=V.useCallback(()=>{l(!0);const m={train:r.train/100,val:r.val/100,test:r.test/100},w=d_(e,m),_=document.createElement("form");_.method="POST",_.action=w,document.body.appendChild(_),_.submit(),document.body.removeChild(_),setTimeout(()=>{l(!1),t()},1e3)},[e,r,t]),p=tm.find(m=>m.id===e);return A.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:A.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-lg flex-col rounded-xl bg-white shadow-2xl dark:bg-gray-800",children:[A.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-gray-200 px-6 py-4 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Export Annotations"}),A.jsx("button",{onClick:t,className:"rounded-lg p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",children:A.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),A.jsxs("div",{className:"overflow-y-auto px-6 py-4",children:[A.jsx("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:"Choose an export format for your annotations. Different formats are compatible with different machine learning frameworks."}),A.jsx("div",{className:"space-y-2",children:tm.map(m=>A.jsxs("label",{className:`flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors ${e===m.id?"border-primary-500 bg-primary-50 dark:border-primary-400 dark:bg-primary-900/20":"border-gray-200 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-700/50"}`,children:[A.jsx("input",{type:"radio",name:"format",value:m.id,checked:e===m.id,onChange:()=>n(m.id),className:"mt-1 h-4 w-4 text-primary-600 focus:ring-primary-500"}),A.jsxs("div",{className:"flex-1",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:m.name}),A.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600 dark:bg-gray-700 dark:text-gray-300",children:m.fileType})]}),A.jsx("p",{className:"mt-0.5 text-sm text-gray-500 dark:text-gray-400",children:m.description})]})]},m.id))}),e==="yolo"&&A.jsxs("div",{className:"mt-4 rounded-lg bg-gray-50 p-4 dark:bg-gray-700/50",children:[A.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Train / Validation / Test Split"}),A.jsxs("div",{className:"mt-3 flex h-6 overflow-hidden rounded-full",children:[A.jsx("div",{className:"bg-green-500 transition-all",style:{width:`${r.train}%`},title:`Train: ${r.train}%`}),A.jsx("div",{className:"bg-yellow-500 transition-all",style:{width:`${r.val}%`},title:`Val: ${r.val}%`}),A.jsx("div",{className:"bg-red-500 transition-all",style:{width:`${r.test}%`},title:`Test: ${r.test}%`})]}),A.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-4",children:[A.jsxs("div",{children:[A.jsxs("label",{className:"mb-1 flex items-center gap-1.5 text-xs font-medium text-gray-600 dark:text-gray-400",children:[A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-green-500"}),"Train"]}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("input",{type:"number",min:"0",max:"100",value:r.train,onChange:m=>c("train",parseInt(m.target.value)||0),className:"w-full rounded-md border border-gray-300 bg-white px-2 py-1.5 text-center text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-white"}),A.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"%"})]})]}),A.jsxs("div",{children:[A.jsxs("label",{className:"mb-1 flex items-center gap-1.5 text-xs font-medium text-gray-600 dark:text-gray-400",children:[A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-yellow-500"}),"Validation"]}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("input",{type:"number",min:"0",max:"100",value:r.val,onChange:m=>c("val",parseInt(m.target.value)||0),className:"w-full rounded-md border border-gray-300 bg-white px-2 py-1.5 text-center text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-white"}),A.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"%"})]})]}),A.jsxs("div",{children:[A.jsxs("label",{className:"mb-1 flex items-center gap-1.5 text-xs font-medium text-gray-600 dark:text-gray-400",children:[A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-500"}),"Test"]}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("input",{type:"number",min:"0",max:"100",value:r.test,onChange:m=>c("test",parseInt(m.target.value)||0),className:"w-full rounded-md border border-gray-300 bg-white px-2 py-1.5 text-center text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-white"}),A.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"%"})]})]})]}),A.jsx("p",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400",children:"Images will be randomly distributed across train, validation, and test sets."})]})]}),A.jsxs("div",{className:"flex shrink-0 items-center justify-between border-t border-gray-200 px-6 py-4 dark:border-gray-700",children:[A.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:p&&A.jsxs("span",{children:["Will download as ",A.jsx("strong",{children:p.fileType})]})}),A.jsxs("div",{className:"flex gap-3",children:[A.jsx("button",{onClick:t,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",children:"Cancel"}),A.jsx("button",{onClick:d,disabled:a,className:"flex items-center gap-2 rounded-lg bg-primary-600 px-4 py-2 text-sm font-medium text-white hover:bg-primary-700 disabled:opacity-50",children:a?A.jsxs(A.Fragment,{children:[A.jsxs("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[A.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),A.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Exporting..."]}):A.jsxs(A.Fragment,{children:[A.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Export"]})})]})]})]})})}var A5={exports:{}},Ec={},Zu={},Ce={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;const e=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}t.glob=typeof Ng<"u"?Ng:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},t.Konva={_global:t.glob,version:"9.3.22",isBrowser:n(),isUnminified:/param/.test((function(s){}).toString()),dblClickWindow:400,getAngle(s){return t.Konva.angleDeg?s*e:s},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,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return t.Konva.DD.isDragging},isTransforming(){var s;return(s=t.Konva.Transformer)===null||s===void 0?void 0:s.isTransforming()},isDragReady(){return!!t.Konva.DD.node},releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(s){t.glob.Konva=s}};const r=s=>{t.Konva[s.prototype.getClassName()]=s};t._registerNode=r,t.Konva._injectGlobal(t.Konva)})(Ce);var at={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;const e=Ce;class n{constructor(x=[1,0,0,1,0,0]){this.dirty=!1,this.m=x&&x.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 n(this.m)}copyInto(x){x.m[0]=this.m[0],x.m[1]=this.m[1],x.m[2]=this.m[2],x.m[3]=this.m[3],x.m[4]=this.m[4],x.m[5]=this.m[5]}point(x){const T=this.m;return{x:T[0]*x.x+T[2]*x.y+T[4],y:T[1]*x.x+T[3]*x.y+T[5]}}translate(x,T){return this.m[4]+=this.m[0]*x+this.m[2]*T,this.m[5]+=this.m[1]*x+this.m[3]*T,this}scale(x,T){return this.m[0]*=x,this.m[1]*=x,this.m[2]*=T,this.m[3]*=T,this}rotate(x){const T=Math.cos(x),R=Math.sin(x),M=this.m[0]*T+this.m[2]*R,L=this.m[1]*T+this.m[3]*R,b=this.m[0]*-R+this.m[2]*T,F=this.m[1]*-R+this.m[3]*T;return this.m[0]=M,this.m[1]=L,this.m[2]=b,this.m[3]=F,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(x,T){const R=this.m[0]+this.m[2]*T,M=this.m[1]+this.m[3]*T,L=this.m[2]+this.m[0]*x,b=this.m[3]+this.m[1]*x;return this.m[0]=R,this.m[1]=M,this.m[2]=L,this.m[3]=b,this}multiply(x){const T=this.m[0]*x.m[0]+this.m[2]*x.m[1],R=this.m[1]*x.m[0]+this.m[3]*x.m[1],M=this.m[0]*x.m[2]+this.m[2]*x.m[3],L=this.m[1]*x.m[2]+this.m[3]*x.m[3],b=this.m[0]*x.m[4]+this.m[2]*x.m[5]+this.m[4],F=this.m[1]*x.m[4]+this.m[3]*x.m[5]+this.m[5];return this.m[0]=T,this.m[1]=R,this.m[2]=M,this.m[3]=L,this.m[4]=b,this.m[5]=F,this}invert(){const x=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),T=this.m[3]*x,R=-this.m[1]*x,M=-this.m[2]*x,L=this.m[0]*x,b=x*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),F=x*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=T,this.m[1]=R,this.m[2]=M,this.m[3]=L,this.m[4]=b,this.m[5]=F,this}getMatrix(){return this.m}decompose(){const x=this.m[0],T=this.m[1],R=this.m[2],M=this.m[3],L=this.m[4],b=this.m[5],F=x*M-T*R,B={x:L,y:b,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(x!=0||T!=0){const W=Math.sqrt(x*x+T*T);B.rotation=T>0?Math.acos(x/W):-Math.acos(x/W),B.scaleX=W,B.scaleY=F/W,B.skewX=(x*R+T*M)/F,B.skewY=0}else if(R!=0||M!=0){const W=Math.sqrt(R*R+M*M);B.rotation=Math.PI/2-(M>0?Math.acos(-R/W):-Math.acos(R/W)),B.scaleX=F/W,B.scaleY=W,B.skewX=0,B.skewY=(x*R+T*M)/F}return B.rotation=t.Util._getRotation(B.rotation),B}}t.Transform=n;const r="[object Array]",s="[object Number]",a="[object String]",l="[object Boolean]",c=Math.PI/180,d=180/Math.PI,p="#",m="",w="0",_="Konva warning: ",P="Konva error: ",y="rgb(",E={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]},k=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let S=[];const C=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(g){setTimeout(g,60)};t.Util={_isElement(g){return!!(g&&g.nodeType==1)},_isFunction(g){return!!(g&&g.constructor&&g.call&&g.apply)},_isPlainObject(g){return!!g&&g.constructor===Object},_isArray(g){return Object.prototype.toString.call(g)===r},_isNumber(g){return Object.prototype.toString.call(g)===s&&!isNaN(g)&&isFinite(g)},_isString(g){return Object.prototype.toString.call(g)===a},_isBoolean(g){return Object.prototype.toString.call(g)===l},isObject(g){return g instanceof Object},isValidSelector(g){if(typeof g!="string")return!1;const x=g[0];return x==="#"||x==="."||x===x.toUpperCase()},_sign(g){return g===0||g>0?1:-1},requestAnimFrame(g){S.push(g),S.length===1&&C(function(){const x=S;S=[],x.forEach(function(T){T()})})},createCanvasElement(){const g=document.createElement("canvas");try{g.style=g.style||{}}catch{}return g},createImageElement(){return document.createElement("img")},_isInDocument(g){for(;g=g.parentNode;)if(g==document)return!0;return!1},_urlToImage(g,x){const T=t.Util.createImageElement();T.onload=function(){x(T)},T.src=g},_rgbToHex(g,x,T){return((1<<24)+(g<<16)+(x<<8)+T).toString(16).slice(1)},_hexToRgb(g){g=g.replace(p,m);const x=parseInt(g,16);return{r:x>>16&255,g:x>>8&255,b:x&255}},getRandomColor(){let g=(Math.random()*16777215<<0).toString(16);for(;g.length<6;)g=w+g;return p+g},getRGB(g){let x;return g in E?(x=E[g],{r:x[0],g:x[1],b:x[2]}):g[0]===p?this._hexToRgb(g.substring(1)):g.substr(0,4)===y?(x=k.exec(g.replace(/ /g,"")),{r:parseInt(x[1],10),g:parseInt(x[2],10),b:parseInt(x[3],10)}):{r:0,g:0,b:0}},colorToRGBA(g){return g=g||"black",t.Util._namedColorToRBA(g)||t.Util._hex3ColorToRGBA(g)||t.Util._hex4ColorToRGBA(g)||t.Util._hex6ColorToRGBA(g)||t.Util._hex8ColorToRGBA(g)||t.Util._rgbColorToRGBA(g)||t.Util._rgbaColorToRGBA(g)||t.Util._hslColorToRGBA(g)},_namedColorToRBA(g){const x=E[g.toLowerCase()];return x?{r:x[0],g:x[1],b:x[2],a:1}:null},_rgbColorToRGBA(g){if(g.indexOf("rgb(")===0){g=g.match(/rgb\(([^)]+)\)/)[1];const x=g.split(/ *, */).map(Number);return{r:x[0],g:x[1],b:x[2],a:1}}},_rgbaColorToRGBA(g){if(g.indexOf("rgba(")===0){g=g.match(/rgba\(([^)]+)\)/)[1];const x=g.split(/ *, */).map((T,R)=>T.slice(-1)==="%"?R===3?parseInt(T)/100:parseInt(T)/100*255:Number(T));return{r:x[0],g:x[1],b:x[2],a:x[3]}}},_hex8ColorToRGBA(g){if(g[0]==="#"&&g.length===9)return{r:parseInt(g.slice(1,3),16),g:parseInt(g.slice(3,5),16),b:parseInt(g.slice(5,7),16),a:parseInt(g.slice(7,9),16)/255}},_hex6ColorToRGBA(g){if(g[0]==="#"&&g.length===7)return{r:parseInt(g.slice(1,3),16),g:parseInt(g.slice(3,5),16),b:parseInt(g.slice(5,7),16),a:1}},_hex4ColorToRGBA(g){if(g[0]==="#"&&g.length===5)return{r:parseInt(g[1]+g[1],16),g:parseInt(g[2]+g[2],16),b:parseInt(g[3]+g[3],16),a:parseInt(g[4]+g[4],16)/255}},_hex3ColorToRGBA(g){if(g[0]==="#"&&g.length===4)return{r:parseInt(g[1]+g[1],16),g:parseInt(g[2]+g[2],16),b:parseInt(g[3]+g[3],16),a:1}},_hslColorToRGBA(g){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(g)){const[x,...T]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(g),R=Number(T[0])/360,M=Number(T[1])/100,L=Number(T[2])/100;let b,F,B;if(M===0)return B=L*255,{r:Math.round(B),g:Math.round(B),b:Math.round(B),a:1};L<.5?b=L*(1+M):b=L+M-L*M;const W=2*L-b,X=[0,0,0];for(let ie=0;ie<3;ie++)F=R+1/3*-(ie-1),F<0&&F++,F>1&&F--,6*F<1?B=W+(b-W)*6*F:2*F<1?B=b:3*F<2?B=W+(b-W)*(2/3-F)*6:B=W,X[ie]=B*255;return{r:Math.round(X[0]),g:Math.round(X[1]),b:Math.round(X[2]),a:1}}},haveIntersection(g,x){return!(x.x>g.x+g.width||x.x+x.width<g.x||x.y>g.y+g.height||x.y+x.height<g.y)},cloneObject(g){const x={};for(const T in g)this._isPlainObject(g[T])?x[T]=this.cloneObject(g[T]):this._isArray(g[T])?x[T]=this.cloneArray(g[T]):x[T]=g[T];return x},cloneArray(g){return g.slice(0)},degToRad(g){return g*c},radToDeg(g){return g*d},_degToRad(g){return t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(g)},_radToDeg(g){return t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(g)},_getRotation(g){return e.Konva.angleDeg?t.Util.radToDeg(g):g},_capitalize(g){return g.charAt(0).toUpperCase()+g.slice(1)},throw(g){throw new Error(P+g)},error(g){console.error(P+g)},warn(g){e.Konva.showWarnings&&console.warn(_+g)},each(g,x){for(const T in g)x(T,g[T])},_inRange(g,x,T){return x<=g&&g<T},_getProjectionToSegment(g,x,T,R,M,L){let b,F,B;const W=(g-T)*(g-T)+(x-R)*(x-R);if(W==0)b=g,F=x,B=(M-T)*(M-T)+(L-R)*(L-R);else{const X=((M-g)*(T-g)+(L-x)*(R-x))/W;X<0?(b=g,F=x,B=(g-M)*(g-M)+(x-L)*(x-L)):X>1?(b=T,F=R,B=(T-M)*(T-M)+(R-L)*(R-L)):(b=g+X*(T-g),F=x+X*(R-x),B=(b-M)*(b-M)+(F-L)*(F-L))}return[b,F,B]},_getProjectionToLine(g,x,T){const R=t.Util.cloneObject(g);let M=Number.MAX_VALUE;return x.forEach(function(L,b){if(!T&&b===x.length-1)return;const F=x[(b+1)%x.length],B=t.Util._getProjectionToSegment(L.x,L.y,F.x,F.y,g.x,g.y),W=B[0],X=B[1],ie=B[2];ie<M&&(R.x=W,R.y=X,M=ie)}),R},_prepareArrayForTween(g,x,T){const R=[],M=[];if(g.length>x.length){const b=x;x=g,g=b}for(let b=0;b<g.length;b+=2)R.push({x:g[b],y:g[b+1]});for(let b=0;b<x.length;b+=2)M.push({x:x[b],y:x[b+1]});const L=[];return M.forEach(function(b){const F=t.Util._getProjectionToLine(b,R,T);L.push(F.x),L.push(F.y)}),L},_prepareToStringify(g){let x;g.visitedByCircularReferenceRemoval=!0;for(const T in g)if(g.hasOwnProperty(T)&&g[T]&&typeof g[T]=="object"){if(x=Object.getOwnPropertyDescriptor(g,T),g[T].visitedByCircularReferenceRemoval||t.Util._isElement(g[T]))if(x.configurable)delete g[T];else return null;else if(t.Util._prepareToStringify(g[T])===null)if(x.configurable)delete g[T];else return null}return delete g.visitedByCircularReferenceRemoval,g},_assign(g,x){for(const T in x)g[T]=x[T];return g},_getFirstPointerId(g){return g.touches?g.changedTouches[0].identifier:g.pointerId||999},releaseCanvas(...g){e.Konva.releaseCanvasOnDestroy&&g.forEach(x=>{x.width=0,x.height=0})},drawRoundedRectPath(g,x,T,R){let M=0,L=0,b=0,F=0;typeof R=="number"?M=L=b=F=Math.min(R,x/2,T/2):(M=Math.min(R[0]||0,x/2,T/2),L=Math.min(R[1]||0,x/2,T/2),F=Math.min(R[2]||0,x/2,T/2),b=Math.min(R[3]||0,x/2,T/2)),g.moveTo(M,0),g.lineTo(x-L,0),g.arc(x-L,L,L,Math.PI*3/2,0,!1),g.lineTo(x,T-F),g.arc(x-F,T-F,F,0,Math.PI/2,!1),g.lineTo(b,T),g.arc(b,T-b,b,Math.PI/2,Math.PI,!1),g.lineTo(0,M),g.arc(M,M,M,Math.PI,Math.PI*3/2,!1)}}})(at);var et={},$n={},Or={};Object.defineProperty(Or,"__esModule",{value:!0});Or.HitContext=Or.SceneContext=Or.Context=void 0;const F5=at,__=Ce;function S_(t){const e=[],n=t.length,r=F5.Util;for(let s=0;s<n;s++){let a=t[s];r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a=a+""),e.push(a)}return e}const rm=",",x_="(",w_=")",k_="([",C_="])",E_=";",P_="()",N_="=",im=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],T_=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],R_=100;class Pc{constructor(e){this.canvas=e,__.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,n){let r=this.traceArr,s=r.length,a="",l,c,d,p;for(l=0;l<s;l++)c=r[l],d=c.method,d?(p=c.args,a+=d,e?a+=P_:F5.Util._isArray(p[0])?a+=k_+p.join(rm)+C_:(n&&(p=p.map(m=>typeof m=="number"?Math.floor(m):m)),a+=x_+p.join(rm)+w_)):(a+=c.property,e||(a+=N_+c.val)),a+=E_;return a}clearTrace(){this.traceArr=[]}_trace(e){let n=this.traceArr,r;n.push(e),r=n.length,r>=R_&&n.shift()}reset(){const e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){const n=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(e){const n=e.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(e){const n=e.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(e){const n=e.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(e,n){this._context[e]=n}arc(e,n,r,s,a,l){this._context.arc(e,n,r,s,a,l)}arcTo(e,n,r,s,a){this._context.arcTo(e,n,r,s,a)}beginPath(){this._context.beginPath()}bezierCurveTo(e,n,r,s,a,l){this._context.bezierCurveTo(e,n,r,s,a,l)}clearRect(e,n,r,s){this._context.clearRect(e,n,r,s)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,n){const r=arguments;if(r.length===2)return this._context.createImageData(e,n);if(r.length===1)return this._context.createImageData(e)}createLinearGradient(e,n,r,s){return this._context.createLinearGradient(e,n,r,s)}createPattern(e,n){return this._context.createPattern(e,n)}createRadialGradient(e,n,r,s,a,l){return this._context.createRadialGradient(e,n,r,s,a,l)}drawImage(e,n,r,s,a,l,c,d,p){const m=arguments,w=this._context;m.length===3?w.drawImage(e,n,r):m.length===5?w.drawImage(e,n,r,s,a):m.length===9&&w.drawImage(e,n,r,s,a,l,c,d,p)}ellipse(e,n,r,s,a,l,c,d){this._context.ellipse(e,n,r,s,a,l,c,d)}isPointInPath(e,n,r,s){return r?this._context.isPointInPath(r,e,n,s):this._context.isPointInPath(e,n,s)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,n,r,s){this._context.fillRect(e,n,r,s)}strokeRect(e,n,r,s){this._context.strokeRect(e,n,r,s)}fillText(e,n,r,s){s?this._context.fillText(e,n,r,s):this._context.fillText(e,n,r)}measureText(e){return this._context.measureText(e)}getImageData(e,n,r,s){return this._context.getImageData(e,n,r,s)}lineTo(e,n){this._context.lineTo(e,n)}moveTo(e,n){this._context.moveTo(e,n)}rect(e,n,r,s){this._context.rect(e,n,r,s)}roundRect(e,n,r,s,a){this._context.roundRect(e,n,r,s,a)}putImageData(e,n,r){this._context.putImageData(e,n,r)}quadraticCurveTo(e,n,r,s){this._context.quadraticCurveTo(e,n,r,s)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,n){this._context.scale(e,n)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,n,r,s,a,l){this._context.setTransform(e,n,r,s,a,l)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,n,r,s){this._context.strokeText(e,n,r,s)}transform(e,n,r,s,a,l){this._context.transform(e,n,r,s,a,l)}translate(e,n){this._context.translate(e,n)}_enableTrace(){let e=this,n=im.length,r=this.setAttr,s,a;const l=function(c){let d=e[c],p;e[c]=function(){return a=S_(Array.prototype.slice.call(arguments,0)),p=d.apply(e,arguments),e._trace({method:c,args:a}),p}};for(s=0;s<n;s++)l(im[s]);e.setAttr=function(){r.apply(e,arguments);const c=arguments[0];let d=arguments[1];(c==="shadowOffsetX"||c==="shadowOffsetY"||c==="shadowBlur")&&(d=d/this.canvas.getPixelRatio()),e._trace({property:c,val:d})}}_applyGlobalCompositeOperation(e){const n=e.attrs.globalCompositeOperation;!n||n==="source-over"||this.setAttr("globalCompositeOperation",n)}}Or.Context=Pc;T_.forEach(function(t){Object.defineProperty(Pc.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class L_ extends Pc{constructor(e,{willReadFrequently:n=!1}={}){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(e){const n=e.fill();this.setAttr("fillStyle",n),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){const n=e._getLinearGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fillRadialGradient(e){const n=e._getRadialGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fill(e){const n=e.fill(),r=e.getFillPriority();if(n&&r==="color"){this._fillColor(e);return}const s=e.getFillPatternImage();if(s&&r==="pattern"){this._fillPattern(e);return}const a=e.getFillLinearGradientColorStops();if(a&&r==="linear-gradient"){this._fillLinearGradient(e);return}const l=e.getFillRadialGradientColorStops();if(l&&r==="radial-gradient"){this._fillRadialGradient(e);return}n?this._fillColor(e):s?this._fillPattern(e):a?this._fillLinearGradient(e):l&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const n=e.getStrokeLinearGradientStartPoint(),r=e.getStrokeLinearGradientEndPoint(),s=e.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(n.x,n.y,r.x,r.y);if(s){for(let l=0;l<s.length;l+=2)a.addColorStop(s[l],s[l+1]);this.setAttr("strokeStyle",a)}}_stroke(e){const n=e.dash(),r=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!r){this.save();const a=this.getCanvas().getPixelRatio();this.setTransform(a,0,0,a,0,0)}this._applyLineCap(e),n&&e.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),r||this.restore()}}_applyShadow(e){var n,r,s;const a=(n=e.getShadowRGBA())!==null&&n!==void 0?n:"black",l=(r=e.getShadowBlur())!==null&&r!==void 0?r:5,c=(s=e.getShadowOffset())!==null&&s!==void 0?s:{x:0,y:0},d=e.getAbsoluteScale(),p=this.canvas.getPixelRatio(),m=d.x*p,w=d.y*p;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",l*Math.min(Math.abs(m),Math.abs(w))),this.setAttr("shadowOffsetX",c.x*m),this.setAttr("shadowOffsetY",c.y*w)}}Or.SceneContext=L_;class A_ extends Pc{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const n=e.getStrokeScaleEnabled();if(!n){this.save();const a=this.getCanvas().getPixelRatio();this.setTransform(a,0,0,a,0,0)}this._applyLineCap(e);const r=e.hitStrokeWidth(),s=r==="auto"?e.strokeWidth():r;this.setAttr("lineWidth",s),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),n||this.restore()}}}Or.HitContext=A_;Object.defineProperty($n,"__esModule",{value:!0});$n.HitCanvas=$n.SceneCanvas=$n.Canvas=void 0;const ec=at,M5=Or,O5=Ce;let iu;function F_(){if(iu)return iu;const t=ec.Util.createCanvasElement(),e=t.getContext("2d");return iu=function(){const n=O5.Konva._global.devicePixelRatio||1,r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return n/r}(),ec.Util.releaseCanvas(t),iu}class k1{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const r=(e||{}).pixelRatio||O5.Konva.pixelRatio||F_();this.pixelRatio=r,this._canvas=ec.Util.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(e){const n=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";const n=this.pixelRatio;this.getContext()._context.scale(n,n)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";const n=this.pixelRatio;this.getContext()._context.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,n){this.setWidth(e||0),this.setHeight(n||0)}toDataURL(e,n){try{return this._canvas.toDataURL(e,n)}catch{try{return this._canvas.toDataURL()}catch(s){return ec.Util.error("Unable to get data URL. "+s.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}$n.Canvas=k1;class M_ extends k1{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new M5.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}}$n.SceneCanvas=M_;class O_ extends k1{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new M5.HitContext(this),this.setSize(e.width,e.height)}}$n.HitCanvas=O_;var Nc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;const e=Ce,n=at;t.DD={get isDragging(){let r=!1;return t.DD._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){let r;return t.DD._dragElements.forEach(s=>{r=s.node}),r},_dragElements:new Map,_drag(r){const s=[];t.DD._dragElements.forEach((a,l)=>{const{node:c}=a,d=c.getStage();d.setPointersPositions(r),a.pointerId===void 0&&(a.pointerId=n.Util._getFirstPointerId(r));const p=d._changedPointerPositions.find(m=>m.id===a.pointerId);if(p){if(a.dragStatus!=="dragging"){const m=c.dragDistance();if(Math.max(Math.abs(p.x-a.startPointerPos.x),Math.abs(p.y-a.startPointerPos.y))<m||(c.startDrag({evt:r}),!c.isDragging()))return}c._setDragPosition(r,a),s.push(c)}}),s.forEach(a=>{a.fire("dragmove",{type:"dragmove",target:a,evt:r},!0)})},_endDragBefore(r){const s=[];t.DD._dragElements.forEach(a=>{const{node:l}=a,c=l.getStage();if(r&&c.setPointersPositions(r),!c._changedPointerPositions.find(m=>m.id===a.pointerId))return;(a.dragStatus==="dragging"||a.dragStatus==="stopped")&&(t.DD.justDragged=!0,e.Konva._mouseListenClick=!1,e.Konva._touchListenClick=!1,e.Konva._pointerListenClick=!1,a.dragStatus="stopped");const p=a.node.getLayer()||a.node instanceof e.Konva.Stage&&a.node;p&&s.indexOf(p)===-1&&s.push(p)}),s.forEach(a=>{a.draw()})},_endDragAfter(r){t.DD._dragElements.forEach((s,a)=>{s.dragStatus==="stopped"&&s.node.fire("dragend",{type:"dragend",target:s.node,evt:r},!0),s.dragStatus!=="dragging"&&t.DD._dragElements.delete(a)})}},e.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("touchcancel",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1),window.addEventListener("touchcancel",t.DD._endDragAfter,!1))})(Nc);var Pe={},pe={};Object.defineProperty(pe,"__esModule",{value:!0});pe.RGBComponent=D_;pe.alphaComponent=I_;pe.getNumberValidator=b_;pe.getNumberOrArrayOfNumbersValidator=j_;pe.getNumberOrAutoValidator=z_;pe.getStringValidator=U_;pe.getStringOrGradientValidator=B_;pe.getFunctionValidator=G_;pe.getNumberArrayValidator=H_;pe.getBooleanValidator=V_;pe.getComponentValidator=W_;const Ur=Ce,ut=at;function Br(t){return ut.Util._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||ut.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}function D_(t){return t>255?255:t<0?0:Math.round(t)}function I_(t){return t>1?1:t<1e-4?1e-4:t}function b_(){if(Ur.Konva.isUnminified)return function(t,e){return ut.Util._isNumber(t)||ut.Util.warn(Br(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function j_(t){if(Ur.Konva.isUnminified)return function(e,n){let r=ut.Util._isNumber(e),s=ut.Util._isArray(e)&&e.length==t;return!r&&!s&&ut.Util.warn(Br(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function z_(){if(Ur.Konva.isUnminified)return function(t,e){return ut.Util._isNumber(t)||t==="auto"||ut.Util.warn(Br(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function U_(){if(Ur.Konva.isUnminified)return function(t,e){return ut.Util._isString(t)||ut.Util.warn(Br(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function B_(){if(Ur.Konva.isUnminified)return function(t,e){const n=ut.Util._isString(t),r=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return n||r||ut.Util.warn(Br(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function G_(){if(Ur.Konva.isUnminified)return function(t,e){return ut.Util._isFunction(t)||ut.Util.warn(Br(t)+' is a not valid value for "'+e+'" attribute. The value should be a function.'),t}}function H_(){if(Ur.Konva.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(ut.Util._isArray(t)?t.forEach(function(r){ut.Util._isNumber(r)||ut.Util.warn('"'+e+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):ut.Util.warn(Br(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function V_(){if(Ur.Konva.isUnminified)return function(t,e){return t===!0||t===!1||ut.Util.warn(Br(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function W_(t){if(Ur.Konva.isUnminified)return function(e,n){return e==null||ut.Util.isObject(e)||ut.Util.warn(Br(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;const e=at,n=pe,r="get",s="set";t.Factory={addGetterSetter(a,l,c,d,p){t.Factory.addGetter(a,l,c),t.Factory.addSetter(a,l,d,p),t.Factory.addOverloadedGetterSetter(a,l)},addGetter(a,l,c){const d=r+e.Util._capitalize(l);a.prototype[d]=a.prototype[d]||function(){const p=this.attrs[l];return p===void 0?c:p}},addSetter(a,l,c,d){const p=s+e.Util._capitalize(l);a.prototype[p]||t.Factory.overWriteSetter(a,l,c,d)},overWriteSetter(a,l,c,d){const p=s+e.Util._capitalize(l);a.prototype[p]=function(m){return c&&m!==void 0&&m!==null&&(m=c.call(this,m,l)),this._setAttr(l,m),d&&d.call(this),this}},addComponentsGetterSetter(a,l,c,d,p){const m=c.length,w=e.Util._capitalize,_=r+w(l),P=s+w(l);a.prototype[_]=function(){const E={};for(let k=0;k<m;k++){const S=c[k];E[S]=this.getAttr(l+w(S))}return E};const y=(0,n.getComponentValidator)(c);a.prototype[P]=function(E){const k=this.attrs[l];d&&(E=d.call(this,E,l)),y&&y.call(this,E,l);for(const S in E)E.hasOwnProperty(S)&&this._setAttr(l+w(S),E[S]);return E||c.forEach(S=>{this._setAttr(l+w(S),void 0)}),this._fireChangeEvent(l,k,E),p&&p.call(this),this},t.Factory.addOverloadedGetterSetter(a,l)},addOverloadedGetterSetter(a,l){const c=e.Util._capitalize(l),d=s+c,p=r+c;a.prototype[l]=function(){return arguments.length?(this[d](arguments[0]),this):this[p]()}},addDeprecatedGetterSetter(a,l,c,d){e.Util.error("Adding deprecated "+l);const p=r+e.Util._capitalize(l),m=l+" property is deprecated and will be removed soon. Look at Konva change log for more information.";a.prototype[p]=function(){e.Util.error(m);const w=this.attrs[l];return w===void 0?c:w},t.Factory.addSetter(a,l,d,function(){e.Util.error(m)}),t.Factory.addOverloadedGetterSetter(a,l)},backCompat(a,l){e.Util.each(l,function(c,d){const p=a.prototype[d],m=r+e.Util._capitalize(c),w=s+e.Util._capitalize(c);function _(){p.apply(this,arguments),e.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+d+'" instead.')}a.prototype[c]=_,a.prototype[m]=_,a.prototype[w]=_})},afterSetFilter(){this._filterUpToDate=!1}}})(Pe);Object.defineProperty(et,"__esModule",{value:!0});et.Node=void 0;const Ls=$n,An=Nc,Ha=Pe,ti=Ce,Te=at,pt=pe,Pu="absoluteOpacity",su="allEventListeners",Tr="absoluteTransform",sm="absoluteScale",Bi="canvas",K_="Change",Y_="children",X_="konva",p0="listening",Q_="mouseenter",q_="mouseleave",$_="pointerenter",J_="pointerleave",Z_="touchenter",eS="touchleave",om="set",am="Shape",Nu=" ",lm="stage",ni="transform",tS="Stage",g0="visible",nS=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Nu);let rS=1;class ye{constructor(e){this._id=rS++,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(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===ni||e===Tr)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,n){let r=this._cache.get(e);return(r===void 0||(e===ni||e===Tr)&&r.dirty===!0)&&(r=n.call(this),this._cache.set(e,r)),r}_calculate(e,n,r){if(!this._attachedDepsListeners.get(e)){const s=n.map(a=>a+"Change.konva").join(Nu);this.on(s,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,r)}_getCanvasCache(){return this._cache.get(Bi)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Tr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Bi)){const{scene:e,filter:n,hit:r,buffer:s}=this._cache.get(Bi);Te.Util.releaseCanvas(e,n,r,s),this._cache.delete(Bi)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){const n=e||{};let 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()||void 0}));let s=Math.ceil(n.width||r.width),a=Math.ceil(n.height||r.height),l=n.pixelRatio,c=n.x===void 0?Math.floor(r.x):n.x,d=n.y===void 0?Math.floor(r.y):n.y,p=n.offset||0,m=n.drawBorder||!1,w=n.hitCanvasPixelRatio||1;if(!s||!a){Te.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const _=Math.abs(Math.round(r.x)-c)>.5?1:0,P=Math.abs(Math.round(r.y)-d)>.5?1:0;s+=p*2+_,a+=p*2+P,c-=p,d-=p;const y=new Ls.SceneCanvas({pixelRatio:l,width:s,height:a}),E=new Ls.SceneCanvas({pixelRatio:l,width:0,height:0,willReadFrequently:!0}),k=new Ls.HitCanvas({pixelRatio:w,width:s,height:a}),S=y.getContext(),C=k.getContext(),g=new Ls.SceneCanvas({width:y.width/y.pixelRatio+Math.abs(c),height:y.height/y.pixelRatio+Math.abs(d),pixelRatio:y.pixelRatio}),x=g.getContext();return k.isCache=!0,y.isCache=!0,this._cache.delete(Bi),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(y.getContext()._context.imageSmoothingEnabled=!1,E.getContext()._context.imageSmoothingEnabled=!1),S.save(),C.save(),x.save(),S.translate(-c,-d),C.translate(-c,-d),x.translate(-c,-d),g.x=c,g.y=d,this._isUnderCache=!0,this._clearSelfAndDescendantCache(Pu),this._clearSelfAndDescendantCache(sm),this.drawScene(y,this,g),this.drawHit(k,this),this._isUnderCache=!1,S.restore(),C.restore(),m&&(S.save(),S.beginPath(),S.rect(0,0,s,a),S.closePath(),S.setAttr("strokeStyle","red"),S.setAttr("lineWidth",5),S.stroke(),S.restore()),this._cache.set(Bi,{scene:y,filter:E,hit:k,buffer:g,x:c,y:d}),this._requestDraw(),this}isCached(){return this._cache.has(Bi)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,n){const r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}];let s=1/0,a=1/0,l=-1/0,c=-1/0;const d=this.getAbsoluteTransform(n);return r.forEach(function(p){const m=d.point(p);s===void 0&&(s=l=m.x,a=c=m.y),s=Math.min(s,m.x),a=Math.min(a,m.y),l=Math.max(l,m.x),c=Math.max(c,m.y)}),{x:s,y:a,width:l-s,height:c-a}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();e.translate(n.x,n.y);const r=this._getCachedSceneCanvas(),s=r.pixelRatio;e.drawImage(r._canvas,0,0,r.width/s,r.height/s),e.restore()}_drawCachedHitCanvas(e){const n=this._getCanvasCache(),r=n.hit;e.save(),e.translate(n.x,n.y),e.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),e.restore()}_getCachedSceneCanvas(){let e=this.filters(),n=this._getCanvasCache(),r=n.scene,s=n.filter,a=s.getContext(),l,c,d,p;if(e){if(!this._filterUpToDate){const m=r.pixelRatio;s.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(l=e.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/m,r.getHeight()/m),c=a.getImageData(0,0,s.getWidth(),s.getHeight()),d=0;d<l;d++){if(p=e[d],typeof p!="function"){Te.Util.error("Filter should be type of function, but got "+typeof p+" instead. Please check correct filters");continue}p.call(this,c),a.putImageData(c,0,0)}}catch(w){Te.Util.error("Unable to apply filter. "+w.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return s}return r}on(e,n){if(this._cache&&this._cache.delete(su),arguments.length===3)return this._delegate.apply(this,arguments);const r=e.split(Nu);for(let s=0;s<r.length;s++){const l=r[s].split("."),c=l[0],d=l[1]||"";this.eventListeners[c]||(this.eventListeners[c]=[]),this.eventListeners[c].push({name:d,handler:n})}return this}off(e,n){let r=(e||"").split(Nu),s=r.length,a,l,c,d,p,m;if(this._cache&&this._cache.delete(su),!e)for(l in this.eventListeners)this._off(l);for(a=0;a<s;a++)if(c=r[a],d=c.split("."),p=d[0],m=d[1],p)this.eventListeners[p]&&this._off(p,m,n);else for(l in this.eventListeners)this._off(l,m,n);return this}dispatchEvent(e){const n={target:this,type:e.type,evt:e};return this.fire(e.type,n),this}addEventListener(e,n){return this.on(e,function(r){n.call(this,r.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,n,r){const s=this;this.on(e,function(a){const l=a.target.findAncestors(n,!0,s);for(let c=0;c<l.length;c++)a=Te.Util.cloneObject(a),a.currentTarget=l[c],r.call(l[c],a)})}remove(){return this.isDragging()&&this.stopDrag(),An.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Tr),this._clearSelfAndDescendantCache(Pu),this._clearSelfAndDescendantCache(sm),this._clearSelfAndDescendantCache(lm),this._clearSelfAndDescendantCache(g0),this._clearSelfAndDescendantCache(p0)}_remove(){this._clearCaches();const e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){const n="get"+Te.Util._capitalize(e);return Te.Util._isFunction(this[n])?this[n]():this.attrs[e]}getAncestors(){let e=this.getParent(),n=[];for(;e;)n.push(e),e=e.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{let n,r;if(!e)return this;for(n in e)n!==Y_&&(r=om+Te.Util._capitalize(n),Te.Util._isFunction(this[r])?this[r](e[n]):this._setAttr(n,e[n]))}),this}isListening(){return this._getCache(p0,this._isListening)}_isListening(e){if(!this.listening())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isListening(e):!0}isVisible(){return this._getCache(g0,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isVisible(e):!0}shouldDrawHit(e,n=!1){if(e)return this._isVisible(e)&&this._isListening(e);const r=this.getLayer();let s=!1;An.DD._dragElements.forEach(l=>{l.dragStatus==="dragging"&&(l.node.nodeType==="Stage"||l.node.getLayer()===r)&&(s=!0)});const a=!n&&!ti.Konva.hitOnDragEnabled&&(s||ti.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let e=this.getDepth(),n=this,r=0,s,a,l,c;function d(m){for(s=[],a=m.length,l=0;l<a;l++)c=m[l],r++,c.nodeType!==am&&(s=s.concat(c.getChildren().slice())),c._id===n._id&&(l=a);s.length>0&&s[0].getDepth()<=e&&d(s)}const p=this.getStage();return n.nodeType!==tS&&p&&d(p.getChildren()),r}getDepth(){let e=0,n=this.parent;for(;n;)e++,n=n.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ni),this._clearSelfAndDescendantCache(Tr)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;const n=e.getPointerPosition();if(!n)return null;const r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(e){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!e&&(e=!0);const s=this.getAbsoluteTransform(e).getMatrix(),a=new Te.Transform,l=this.offset();return a.m=s.slice(),a.translate(l.x,l.y),a.getTranslation()}setAbsolutePosition(e){const{x:n,y:r,...s}=this._clearTransform();this.attrs.x=n,this.attrs.y=r,this._clearCache(ni);const a=this._getAbsoluteTransform().copy();return a.invert(),a.translate(e.x,e.y),e={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this._setTransform(s),this.setPosition({x:e.x,y:e.y}),this._clearCache(ni),this._clearSelfAndDescendantCache(Tr),this}_setTransform(e){let n;for(n in e)this.attrs[n]=e[n]}_clearTransform(){const e={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,e}move(e){let n=e.x,r=e.y,s=this.x(),a=this.y();return n!==void 0&&(s+=n),r!==void 0&&(a+=r),this.setPosition({x:s,y:a}),this}_eachAncestorReverse(e,n){let r=[],s=this.getParent(),a,l;if(!(n&&n._id===this._id)){for(r.unshift(this);s&&(!n||s._id!==n._id);)r.unshift(s),s=s.parent;for(a=r.length,l=0;l<a;l++)e(r[l])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Te.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return Te.Util.warn("Node has no parent. moveUp function is ignored."),!1;const e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return Te.Util.warn("Node has no parent. moveDown function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Te.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return Te.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&Te.Util.warn("Unexpected value "+e+" 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)+".");const n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Pu,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let e=this.opacity();const n=this.getParent();return n&&!n._isUnderCache&&(e*=n.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){let e=this.getAttrs(),n,r,s,a,l;const c={attrs:{},className:this.getClassName()};for(n in e)r=e[n],l=Te.Util.isObject(r)&&!Te.Util._isPlainObject(r)&&!Te.Util._isArray(r),!l&&(s=typeof this[n]=="function"&&this[n],delete e[n],a=s?s.call(this):null,e[n]=r,a!==r&&(c.attrs[n]=r));return Te.Util._prepareToStringify(c)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,n,r){const s=[];n&&this._isMatch(e)&&s.push(this);let a=this.parent;for(;a;){if(a===r)return s;a._isMatch(e)&&s.push(a),a=a.parent}return s}isAncestorOf(e){return!1}findAncestor(e,n,r){return this.findAncestors(e,n,r)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);let n=e.replace(/ /g,"").split(","),r=n.length,s,a;for(s=0;s<r;s++)if(a=n[s],Te.Util.isValidSelector(a)||(Te.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),Te.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),Te.Util.warn("Konva is awesome, right?")),a.charAt(0)==="#"){if(this.id()===a.slice(1))return!0}else if(a.charAt(0)==="."){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){const e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(lm,this._getStage)}_getStage(){const e=this.getParent();return e?e.getStage():null}fire(e,n={},r){return n.target=n.target||this,r?this._fireAndBubble(e,n):this._fire(e,n),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(Tr,this._getAbsoluteTransform)}_getAbsoluteTransform(e){let n;if(e)return n=new Te.Transform,this._eachAncestorReverse(function(r){const s=r.transformsEnabled();s==="all"?n.multiply(r.getTransform()):s==="position"&&n.translate(r.x()-r.offsetX(),r.y()-r.offsetY())},e),n;{n=this._cache.get(Tr)||new Te.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();const r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const s=this.attrs.x||0,a=this.attrs.y||0,l=this.attrs.offsetX||0,c=this.attrs.offsetY||0;n.translate(s-l,a-c)}return n.dirty=!1,n}}getAbsoluteScale(e){let n=this;for(;n;)n._isUnderCache&&(e=n),n=n.getParent();const s=this.getAbsoluteTransform(e).decompose();return{x:s.scaleX,y:s.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ni,this._getTransform)}_getTransform(){var e,n;const r=this._cache.get(ni)||new Te.Transform;r.reset();const s=this.x(),a=this.y(),l=ti.Konva.getAngle(this.rotation()),c=(e=this.attrs.scaleX)!==null&&e!==void 0?e:1,d=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,p=this.attrs.skewX||0,m=this.attrs.skewY||0,w=this.attrs.offsetX||0,_=this.attrs.offsetY||0;return(s!==0||a!==0)&&r.translate(s,a),l!==0&&r.rotate(l),(p!==0||m!==0)&&r.skew(p,m),(c!==1||d!==1)&&r.scale(c,d),(w!==0||_!==0)&&r.translate(-1*w,-1*_),r.dirty=!1,r}clone(e){let n=Te.Util.cloneObject(this.attrs),r,s,a,l,c;for(r in e)n[r]=e[r];const d=new this.constructor(n);for(r in this.eventListeners)for(s=this.eventListeners[r],a=s.length,l=0;l<a;l++)c=s[l],c.name.indexOf(X_)<0&&(d.eventListeners[r]||(d.eventListeners[r]=[]),d.eventListeners[r].push(c));return d}_toKonvaCanvas(e){e=e||{};const n=this.getClientRect(),r=this.getStage(),s=e.x!==void 0?e.x:Math.floor(n.x),a=e.y!==void 0?e.y:Math.floor(n.y),l=e.pixelRatio||1,c=new Ls.SceneCanvas({width:e.width||Math.ceil(n.width)||(r?r.width():0),height:e.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:l}),d=c.getContext(),p=new Ls.SceneCanvas({width:c.width/c.pixelRatio+Math.abs(s),height:c.height/c.pixelRatio+Math.abs(a),pixelRatio:c.pixelRatio});return e.imageSmoothingEnabled===!1&&(d._context.imageSmoothingEnabled=!1),d.save(),(s||a)&&d.translate(-1*s,-1*a),this.drawScene(c,void 0,p),d.restore(),c}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e=e||{};const n=e.mimeType||null,r=e.quality||null,s=this._toKonvaCanvas(e).toDataURL(n,r);return e.callback&&e.callback(s),s}toImage(e){return new Promise((n,r)=>{try{const s=e==null?void 0:e.callback;s&&delete e.callback,Te.Util._urlToImage(this.toDataURL(e),function(a){n(a),s==null||s(a)})}catch(s){r(s)}})}toBlob(e){return new Promise((n,r)=>{try{const s=e==null?void 0:e.callback;s&&delete e.callback,this.toCanvas(e).toBlob(a=>{n(a),s==null||s(a)},e==null?void 0:e.mimeType,e==null?void 0:e.quality)}catch(s){r(s)}})}setSize(e){return this.width(e.width),this.height(e.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():ti.Konva.dragDistance}_off(e,n,r){let s=this.eventListeners[e],a,l,c;for(a=0;a<s.length;a++)if(l=s[a].name,c=s[a].handler,(l!=="konva"||n==="konva")&&(!n||l===n)&&(!r||r===c)){if(s.splice(a,1),s.length===0){delete this.eventListeners[e];break}a--}}_fireChangeEvent(e,n,r){this._fire(e+K_,{oldVal:n,newVal:r})}addName(e){if(!this.hasName(e)){const n=this.name(),r=n?n+" "+e:e;this.name(r)}return this}hasName(e){if(!e)return!1;const n=this.name();return n?(n||"").split(/\s/g).indexOf(e)!==-1:!1}removeName(e){const n=(this.name()||"").split(/\s/g),r=n.indexOf(e);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(e,n){const r=this[om+Te.Util._capitalize(e)];return Te.Util._isFunction(r)?r.call(this,n):this._setAttr(e,n),this}_requestDraw(){if(ti.Konva.autoDrawEnabled){const e=this.getLayer()||this.getStage();e==null||e.batchDraw()}}_setAttr(e,n){const r=this.attrs[e];r===n&&!Te.Util.isObject(n)||(n==null?delete this.attrs[e]:this.attrs[e]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(e,r,n),this._requestDraw())}_setComponentAttr(e,n,r){let s;r!==void 0&&(s=this.attrs[e],s||(this.attrs[e]=this.getAttr(e)),this.attrs[e][n]=r,this._fireChangeEvent(e,s,r))}_fireAndBubble(e,n,r){n&&this.nodeType===am&&(n.target=this);const s=[Q_,q_,$_,J_,Z_,eS];if(!(s.indexOf(e)!==-1&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r))){this._fire(e,n);const l=s.indexOf(e)!==-1&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!l&&(r&&r.parent?this._fireAndBubble.call(this.parent,e,n,r):this._fireAndBubble.call(this.parent,e,n))}}_getProtoListeners(e){var n,r,s;const a=(n=this._cache.get(su))!==null&&n!==void 0?n:{};let l=a==null?void 0:a[e];if(l===void 0){l=[];let c=Object.getPrototypeOf(this);for(;c;){const d=(s=(r=c.eventListeners)===null||r===void 0?void 0:r[e])!==null&&s!==void 0?s:[];l.push(...d),c=Object.getPrototypeOf(c)}a[e]=l,this._cache.set(su,a)}return l}_fire(e,n){n=n||{},n.currentTarget=this,n.type=e;const r=this._getProtoListeners(e);if(r)for(let a=0;a<r.length;a++)r[a].handler.call(this,n);const s=this.eventListeners[e];if(s)for(let a=0;a<s.length;a++)s[a].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){const n=e?e.pointerId:void 0,r=this.getStage(),s=this.getAbsolutePosition();if(!r)return;const a=r._getPointerById(n)||r._changedPointerPositions[0]||s;An.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-s.x,y:a.y-s.y},dragStatus:"ready",pointerId:n})}startDrag(e,n=!0){An.DD._dragElements.has(this._id)||this._createDragElement(e);const r=An.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},n)}_setDragPosition(e,n){const r=this.getStage()._getPointerById(n.pointerId);if(!r)return;let s={x:r.x-n.offset.x,y:r.y-n.offset.y};const a=this.dragBoundFunc();if(a!==void 0){const l=a.call(this,s,e);l?s=l:Te.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==s.x||this._lastPos.y!==s.y)&&(this.setAbsolutePosition(s),this._requestDraw()),this._lastPos=s}stopDrag(e){const n=An.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),An.DD._endDragBefore(e),An.DD._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=An.DD._dragElements.get(this._id);return e?e.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(e){if(!(!(e.evt.button!==void 0)||ti.Konva.dragButtons.indexOf(e.evt.button)>=0)||this.isDragging())return;let s=!1;An.DD._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(s=!0)}),s||this._createDragElement(e)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const n=An.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",s=n&&n.dragStatus==="ready";r?this.stopDrag():s&&An.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-e.x,y:-e.y,width:n.width()+2*e.x,height:n.height()+2*e.y};return Te.Util.haveIntersection(r,this.getClientRect())}static create(e,n){return Te.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)}static _createNode(e,n){let r=ye.prototype.getClassName.call(e),s=e.children,a,l,c;n&&(e.attrs.container=n),ti.Konva[r]||(Te.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const d=ti.Konva[r];if(a=new d(e.attrs),s)for(l=s.length,c=0;c<l;c++)a.add(ye._createNode(s[c]));return a}}et.Node=ye;ye.prototype.nodeType="Node";ye.prototype._attrsAffectingSize=[];ye.prototype.eventListeners={};ye.prototype.on.call(ye.prototype,nS,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ni),this._clearSelfAndDescendantCache(Tr)});ye.prototype.on.call(ye.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(g0)});ye.prototype.on.call(ye.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(p0)});ye.prototype.on.call(ye.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Pu)});const He=Ha.Factory.addGetterSetter;He(ye,"zIndex");He(ye,"absolutePosition");He(ye,"position");He(ye,"x",0,(0,pt.getNumberValidator)());He(ye,"y",0,(0,pt.getNumberValidator)());He(ye,"globalCompositeOperation","source-over",(0,pt.getStringValidator)());He(ye,"opacity",1,(0,pt.getNumberValidator)());He(ye,"name","",(0,pt.getStringValidator)());He(ye,"id","",(0,pt.getStringValidator)());He(ye,"rotation",0,(0,pt.getNumberValidator)());Ha.Factory.addComponentsGetterSetter(ye,"scale",["x","y"]);He(ye,"scaleX",1,(0,pt.getNumberValidator)());He(ye,"scaleY",1,(0,pt.getNumberValidator)());Ha.Factory.addComponentsGetterSetter(ye,"skew",["x","y"]);He(ye,"skewX",0,(0,pt.getNumberValidator)());He(ye,"skewY",0,(0,pt.getNumberValidator)());Ha.Factory.addComponentsGetterSetter(ye,"offset",["x","y"]);He(ye,"offsetX",0,(0,pt.getNumberValidator)());He(ye,"offsetY",0,(0,pt.getNumberValidator)());He(ye,"dragDistance",void 0,(0,pt.getNumberValidator)());He(ye,"width",0,(0,pt.getNumberValidator)());He(ye,"height",0,(0,pt.getNumberValidator)());He(ye,"listening",!0,(0,pt.getBooleanValidator)());He(ye,"preventDefault",!0,(0,pt.getBooleanValidator)());He(ye,"filters",void 0,function(t){return this._filterUpToDate=!1,t});He(ye,"visible",!0,(0,pt.getBooleanValidator)());He(ye,"transformsEnabled","all",(0,pt.getStringValidator)());He(ye,"size");He(ye,"dragBoundFunc");He(ye,"draggable",!1,(0,pt.getBooleanValidator)());Ha.Factory.backCompat(ye,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var os={};Object.defineProperty(os,"__esModule",{value:!0});os.Container=void 0;const po=Pe,ah=et,Tc=pe;class as extends ah.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){const n=this.children||[];return e?n.filter(e):n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(let r=0;r<e.length;r++)this.add(e[r]);return this}const n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){const n=this._generalFind(e,!0);return n.length>0?n[0]:void 0}_generalFind(e,n){const r=[];return this._descendants(s=>{const a=s._isMatch(e);return a&&r.push(s),!!(a&&n)}),r}_descendants(e){let n=!1;const r=this.getChildren();for(const s of r){if(n=e(s),n)return!0;if(s.hasChildren()&&(n=s._descendants(e),n))return!0}return!1}toObject(){const e=ah.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(n=>{e.children.push(n.toObject())}),e}isAncestorOf(e){let n=e.getParent();for(;n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(e){const n=ah.Node.prototype.clone.call(this,e);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(e){const n=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(e)&&n.push(r)}),n}_clearSelfAndDescendantCache(e){var n;super._clearSelfAndDescendantCache(e),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(e,n,r){const s=this.getLayer(),a=e||s&&s.getCanvas(),l=a&&a.getContext(),c=this._getCanvasCache(),d=c&&c.scene,p=a&&a.isCache;if(!this.isVisible()&&!p)return this;if(d){l.save();const m=this.getAbsoluteTransform(n).getMatrix();l.transform(m[0],m[1],m[2],m[3],m[4],m[5]),this._drawCachedSceneCanvas(l),l.restore()}else this._drawChildren("drawScene",a,n,r);return this}drawHit(e,n){if(!this.shouldDrawHit(n))return this;const r=this.getLayer(),s=e||r&&r.hitCanvas,a=s&&s.getContext(),l=this._getCanvasCache();if(l&&l.hit){a.save();const d=this.getAbsoluteTransform(n).getMatrix();a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",s,n);return this}_drawChildren(e,n,r,s){var a;const l=n&&n.getContext(),c=this.clipWidth(),d=this.clipHeight(),p=this.clipFunc(),m=typeof c=="number"&&typeof d=="number"||p,w=r===this;if(m){l.save();const P=this.getAbsoluteTransform(r);let y=P.getMatrix();l.transform(y[0],y[1],y[2],y[3],y[4],y[5]),l.beginPath();let E;if(p)E=p.call(this,l,this);else{const k=this.clipX(),S=this.clipY();l.rect(k||0,S||0,c,d)}l.clip.apply(l,E),y=P.copy().invert().getMatrix(),l.transform(y[0],y[1],y[2],y[3],y[4],y[5])}const _=!w&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";_&&(l.save(),l._applyGlobalCompositeOperation(this)),(a=this.children)===null||a===void 0||a.forEach(function(P){P[e](n,r,s)}),_&&l.restore(),m&&l.restore()}getClientRect(e={}){var n;const r=e.skipTransform,s=e.relativeTo;let a,l,c,d,p={x:1/0,y:1/0,width:0,height:0};const m=this;(n=this.children)===null||n===void 0||n.forEach(function(P){if(!P.visible())return;const y=P.getClientRect({relativeTo:m,skipShadow:e.skipShadow,skipStroke:e.skipStroke});y.width===0&&y.height===0||(a===void 0?(a=y.x,l=y.y,c=y.x+y.width,d=y.y+y.height):(a=Math.min(a,y.x),l=Math.min(l,y.y),c=Math.max(c,y.x+y.width),d=Math.max(d,y.y+y.height)))});const w=this.find("Shape");let _=!1;for(let P=0;P<w.length;P++)if(w[P]._isVisible(this)){_=!0;break}return _&&a!==void 0?p={x:a,y:l,width:c-a,height:d-l}:p={x:0,y:0,width:0,height:0},r?p:this._transformedRect(p,s)}}os.Container=as;po.Factory.addComponentsGetterSetter(as,"clip",["x","y","width","height"]);po.Factory.addGetterSetter(as,"clipX",void 0,(0,Tc.getNumberValidator)());po.Factory.addGetterSetter(as,"clipY",void 0,(0,Tc.getNumberValidator)());po.Factory.addGetterSetter(as,"clipWidth",void 0,(0,Tc.getNumberValidator)());po.Factory.addGetterSetter(as,"clipHeight",void 0,(0,Tc.getNumberValidator)());po.Factory.addGetterSetter(as,"clipFunc");var D5={},ki={};Object.defineProperty(ki,"__esModule",{value:!0});ki.getCapturedShape=sS;ki.createEvent=C1;ki.hasPointerCapture=oS;ki.setPointerCapture=aS;ki.releaseCapture=b5;const iS=Ce,La=new Map,I5=iS.Konva._global.PointerEvent!==void 0;function sS(t){return La.get(t)}function C1(t){return{evt:t,pointerId:t.pointerId}}function oS(t,e){return La.get(t)===e}function aS(t,e){b5(t),e.getStage()&&(La.set(t,e),I5&&e._fire("gotpointercapture",C1(new PointerEvent("gotpointercapture"))))}function b5(t,e){const n=La.get(t);if(!n)return;const r=n.getStage();r&&r.content,La.delete(t),I5&&n._fire("lostpointercapture",C1(new PointerEvent("lostpointercapture")))}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;const e=at,n=Pe,r=os,s=Ce,a=$n,l=Nc,c=Ce,d=ki,p="Stage",m="string",w="px",_="mouseout",P="mouseleave",y="mouseover",E="mouseenter",k="mousemove",S="mousedown",C="mouseup",g="pointermove",x="pointerdown",T="pointerup",R="pointercancel",M="lostpointercapture",L="pointerout",b="pointerleave",F="pointerover",B="pointerenter",W="contextmenu",X="touchstart",ie="touchend",ee="touchmove",ce="touchcancel",ve="wheel",G=5,Z=[[E,"_pointerenter"],[S,"_pointerdown"],[k,"_pointermove"],[C,"_pointerup"],[P,"_pointerleave"],[X,"_pointerdown"],[ee,"_pointermove"],[ie,"_pointerup"],[ce,"_pointercancel"],[y,"_pointerover"],[ve,"_wheel"],[W,"_contextmenu"],[x,"_pointerdown"],[g,"_pointermove"],[T,"_pointerup"],[R,"_pointercancel"],[b,"_pointerleave"],[M,"_lostpointercapture"]],Q={mouse:{[L]:_,[b]:P,[F]:y,[B]:E,[g]:k,[x]:S,[T]:C,[R]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[L]:"touchout",[b]:"touchleave",[F]:"touchover",[B]:"touchenter",[g]:ee,[x]:X,[T]:ie,[R]:ce,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[L]:L,[b]:b,[F]:F,[B]:B,[g]:g,[x]:x,[T]:T,[R]:R,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},q=je=>je.indexOf("pointer")>=0?"pointer":je.indexOf("touch")>=0?"touch":"mouse",te=je=>{const O=q(je);if(O==="pointer")return s.Konva.pointerEventsEnabled&&Q.pointer;if(O==="touch")return Q.touch;if(O==="mouse")return Q.mouse};function we(je={}){return(je.clipFunc||je.clipWidth||je.clipHeight)&&e.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),je}const Be="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);";t.stages=[];class Ke extends r.Container{constructor(O){super(we(O)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{we(this.attrs)}),this._checkVisibility()}_validateAdd(O){const K=O.getType()==="Layer",ue=O.getType()==="FastLayer";K||ue||e.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const O=this.visible()?"":"none";this.content.style.display=O}setContainer(O){if(typeof O===m){let K;if(O.charAt(0)==="."){const ue=O.slice(1);O=document.getElementsByClassName(ue)[0]}else O.charAt(0)!=="#"?K=O:K=O.slice(1),O=document.getElementById(K);if(!O)throw"Can not find container in document with id "+K}return this._setAttr("container",O),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),O.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const O=this.children,K=O.length;for(let ue=0;ue<K;ue++)O[ue].clear();return this}clone(O){return O||(O={}),O.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,O)}destroy(){super.destroy();const O=this.content;O&&e.Util._isInDocument(O)&&this.container().removeChild(O);const K=t.stages.indexOf(this);return K>-1&&t.stages.splice(K,1),e.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const O=this._pointerPositions[0]||this._changedPointerPositions[0];return O?{x:O.x,y:O.y}:(e.Util.warn(Be),null)}_getPointerById(O){return this._pointerPositions.find(K=>K.id===O)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(O){O=O||{},O.x=O.x||0,O.y=O.y||0,O.width=O.width||this.width(),O.height=O.height||this.height();const K=new a.SceneCanvas({width:O.width,height:O.height,pixelRatio:O.pixelRatio||1}),ue=K.getContext()._context,Ae=this.children;return(O.x||O.y)&&ue.translate(-1*O.x,-1*O.y),Ae.forEach(function(ge){if(!ge.isVisible())return;const fe=ge._toKonvaCanvas(O);ue.drawImage(fe._canvas,O.x,O.y,fe.getWidth()/fe.getPixelRatio(),fe.getHeight()/fe.getPixelRatio())}),K}getIntersection(O){if(!O)return null;const K=this.children,ue=K.length,Ae=ue-1;for(let ge=Ae;ge>=0;ge--){const fe=K[ge].getIntersection(O);if(fe)return fe}return null}_resizeDOM(){const O=this.width(),K=this.height();this.content&&(this.content.style.width=O+w,this.content.style.height=K+w),this.bufferCanvas.setSize(O,K),this.bufferHitCanvas.setSize(O,K),this.children.forEach(ue=>{ue.setSize({width:O,height:K}),ue.draw()})}add(O,...K){if(arguments.length>1){for(let Ae=0;Ae<arguments.length;Ae++)this.add(arguments[Ae]);return this}super.add(O);const ue=this.children.length;return ue>G&&e.Util.warn("The stage has "+ue+" 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."),O.setSize({width:this.width(),height:this.height()}),O.draw(),s.Konva.isBrowser&&this.content.appendChild(O.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(O){return d.hasPointerCapture(O,this)}setPointerCapture(O){d.setPointerCapture(O,this)}releaseCapture(O){d.releaseCapture(O,this)}getLayers(){return this.children}_bindContentEvents(){s.Konva.isBrowser&&Z.forEach(([O,K])=>{this.content.addEventListener(O,ue=>{this[K](ue)},{passive:!1})})}_pointerenter(O){this.setPointersPositions(O);const K=te(O.type);K&&this._fire(K.pointerenter,{evt:O,target:this,currentTarget:this})}_pointerover(O){this.setPointersPositions(O);const K=te(O.type);K&&this._fire(K.pointerover,{evt:O,target:this,currentTarget:this})}_getTargetShape(O){let K=this[O+"targetShape"];return K&&!K.getStage()&&(K=null),K}_pointerleave(O){const K=te(O.type),ue=q(O.type);if(!K)return;this.setPointersPositions(O);const Ae=this._getTargetShape(ue),ge=!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled;Ae&&ge?(Ae._fireAndBubble(K.pointerout,{evt:O}),Ae._fireAndBubble(K.pointerleave,{evt:O}),this._fire(K.pointerleave,{evt:O,target:this,currentTarget:this}),this[ue+"targetShape"]=null):ge&&(this._fire(K.pointerleave,{evt:O,target:this,currentTarget:this}),this._fire(K.pointerout,{evt:O,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(O){const K=te(O.type),ue=q(O.type);if(!K)return;this.setPointersPositions(O);let Ae=!1;this._changedPointerPositions.forEach(ge=>{const fe=this.getIntersection(ge);if(l.DD.justDragged=!1,s.Konva["_"+ue+"ListenClick"]=!0,!fe||!fe.isListening()){this[ue+"ClickStartShape"]=void 0;return}s.Konva.capturePointerEventsEnabled&&fe.setPointerCapture(ge.id),this[ue+"ClickStartShape"]=fe,fe._fireAndBubble(K.pointerdown,{evt:O,pointerId:ge.id}),Ae=!0;const xe=O.type.indexOf("touch")>=0;fe.preventDefault()&&O.cancelable&&xe&&O.preventDefault()}),Ae||this._fire(K.pointerdown,{evt:O,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(O){const K=te(O.type),ue=q(O.type);if(!K||(s.Konva.isDragging()&&l.DD.node.preventDefault()&&O.cancelable&&O.preventDefault(),this.setPointersPositions(O),!(!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled)))return;const ge={};let fe=!1;const xe=this._getTargetShape(ue);this._changedPointerPositions.forEach(Lt=>{const Me=d.getCapturedShape(Lt.id)||this.getIntersection(Lt),tr=Lt.id,$={evt:O,pointerId:tr},le=xe!==Me;if(le&&xe&&(xe._fireAndBubble(K.pointerout,{...$},Me),xe._fireAndBubble(K.pointerleave,{...$},Me)),Me){if(ge[Me._id])return;ge[Me._id]=!0}Me&&Me.isListening()?(fe=!0,le&&(Me._fireAndBubble(K.pointerover,{...$},xe),Me._fireAndBubble(K.pointerenter,{...$},xe),this[ue+"targetShape"]=Me),Me._fireAndBubble(K.pointermove,{...$})):xe&&(this._fire(K.pointerover,{evt:O,target:this,currentTarget:this,pointerId:tr}),this[ue+"targetShape"]=null)}),fe||this._fire(K.pointermove,{evt:O,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(O){const K=te(O.type),ue=q(O.type);if(!K)return;this.setPointersPositions(O);const Ae=this[ue+"ClickStartShape"],ge=this[ue+"ClickEndShape"],fe={};let xe=!1;this._changedPointerPositions.forEach(Lt=>{const Me=d.getCapturedShape(Lt.id)||this.getIntersection(Lt);if(Me){if(Me.releaseCapture(Lt.id),fe[Me._id])return;fe[Me._id]=!0}const tr=Lt.id,$={evt:O,pointerId:tr};let le=!1;s.Konva["_"+ue+"InDblClickWindow"]?(le=!0,clearTimeout(this[ue+"DblTimeout"])):l.DD.justDragged||(s.Konva["_"+ue+"InDblClickWindow"]=!0,clearTimeout(this[ue+"DblTimeout"])),this[ue+"DblTimeout"]=setTimeout(function(){s.Konva["_"+ue+"InDblClickWindow"]=!1},s.Konva.dblClickWindow),Me&&Me.isListening()?(xe=!0,this[ue+"ClickEndShape"]=Me,Me._fireAndBubble(K.pointerup,{...$}),s.Konva["_"+ue+"ListenClick"]&&Ae&&Ae===Me&&(Me._fireAndBubble(K.pointerclick,{...$}),le&&ge&&ge===Me&&Me._fireAndBubble(K.pointerdblclick,{...$}))):(this[ue+"ClickEndShape"]=null,s.Konva["_"+ue+"ListenClick"]&&this._fire(K.pointerclick,{evt:O,target:this,currentTarget:this,pointerId:tr}),le&&this._fire(K.pointerdblclick,{evt:O,target:this,currentTarget:this,pointerId:tr}))}),xe||this._fire(K.pointerup,{evt:O,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),s.Konva["_"+ue+"ListenClick"]=!1,O.cancelable&&ue!=="touch"&&ue!=="pointer"&&O.preventDefault()}_contextmenu(O){this.setPointersPositions(O);const K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(W,{evt:O}):this._fire(W,{evt:O,target:this,currentTarget:this})}_wheel(O){this.setPointersPositions(O);const K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(ve,{evt:O}):this._fire(ve,{evt:O,target:this,currentTarget:this})}_pointercancel(O){this.setPointersPositions(O);const K=d.getCapturedShape(O.pointerId)||this.getIntersection(this.getPointerPosition());K&&K._fireAndBubble(T,d.createEvent(O)),d.releaseCapture(O.pointerId)}_lostpointercapture(O){d.releaseCapture(O.pointerId)}setPointersPositions(O){const K=this._getContentPosition();let ue=null,Ae=null;O=O||window.event,O.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(O.touches,ge=>{this._pointerPositions.push({id:ge.identifier,x:(ge.clientX-K.left)/K.scaleX,y:(ge.clientY-K.top)/K.scaleY})}),Array.prototype.forEach.call(O.changedTouches||O.touches,ge=>{this._changedPointerPositions.push({id:ge.identifier,x:(ge.clientX-K.left)/K.scaleX,y:(ge.clientY-K.top)/K.scaleY})})):(ue=(O.clientX-K.left)/K.scaleX,Ae=(O.clientY-K.top)/K.scaleY,this.pointerPos={x:ue,y:Ae},this._pointerPositions=[{x:ue,y:Ae,id:e.Util._getFirstPointerId(O)}],this._changedPointerPositions=[{x:ue,y:Ae,id:e.Util._getFirstPointerId(O)}])}_setPointerPosition(O){e.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(O)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const O=this.content.getBoundingClientRect();return{top:O.top,left:O.left,scaleX:O.width/this.content.clientWidth||1,scaleY:O.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new a.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new a.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!s.Konva.isBrowser)return;const O=this.container();if(!O)throw"Stage has no container. A container is required.";O.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"),O.appendChild(this.content),this._resizeDOM()}cache(){return e.Util.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(O){O.batchDraw()}),this}}t.Stage=Ke,Ke.prototype.nodeType=p,(0,c._registerNode)(Ke),n.Factory.addGetterSetter(Ke,"container"),s.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{t.stages.forEach(je=>{je.batchDraw()})})})(D5);var Va={},wt={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;const e=Ce,n=at,r=Pe,s=et,a=pe,l=Ce,c=ki,d="hasShadow",p="shadowRGBA",m="patternImage",w="linearGradient",_="radialGradient";let P;function y(){return P||(P=n.Util.createCanvasElement().getContext("2d"),P)}t.shapes={};function E(b){const F=this.attrs.fillRule;F?b.fill(F):b.fill()}function k(b){b.stroke()}function S(b){const F=this.attrs.fillRule;F?b.fill(F):b.fill()}function C(b){b.stroke()}function g(){this._clearCache(d)}function x(){this._clearCache(p)}function T(){this._clearCache(m)}function R(){this._clearCache(w)}function M(){this._clearCache(_)}class L extends s.Node{constructor(F){super(F);let B;for(;B=n.Util.getRandomColor(),!(B&&!(B in t.shapes)););this.colorKey=B,t.shapes[B]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.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(d,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(m,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const B=y().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(B&&B.setTransform){const W=new n.Transform;W.translate(this.fillPatternX(),this.fillPatternY()),W.rotate(e.Konva.getAngle(this.fillPatternRotation())),W.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),W.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const X=W.getMatrix(),ie=typeof DOMMatrix>"u"?{a:X[0],b:X[1],c:X[2],d:X[3],e:X[4],f:X[5]}:new DOMMatrix(X);B.setTransform(ie)}return B}}_getLinearGradient(){return this._getCache(w,this.__getLinearGradient)}__getLinearGradient(){const F=this.fillLinearGradientColorStops();if(F){const B=y(),W=this.fillLinearGradientStartPoint(),X=this.fillLinearGradientEndPoint(),ie=B.createLinearGradient(W.x,W.y,X.x,X.y);for(let ee=0;ee<F.length;ee+=2)ie.addColorStop(F[ee],F[ee+1]);return ie}}_getRadialGradient(){return this._getCache(_,this.__getRadialGradient)}__getRadialGradient(){const F=this.fillRadialGradientColorStops();if(F){const B=y(),W=this.fillRadialGradientStartPoint(),X=this.fillRadialGradientEndPoint(),ie=B.createRadialGradient(W.x,W.y,this.fillRadialGradientStartRadius(),X.x,X.y,this.fillRadialGradientEndRadius());for(let ee=0;ee<F.length;ee+=2)ie.addColorStop(F[ee],F[ee+1]);return ie}}getShadowRGBA(){return this._getCache(p,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const F=n.Util.colorToRGBA(this.shadowColor());if(F)return"rgba("+F.r+","+F.g+","+F.b+","+F.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 F=this.hitStrokeWidth();return F==="auto"?this.hasStroke():this.strokeEnabled()&&!!F}intersects(F){const B=this.getStage();if(!B)return!1;const W=B.bufferHitCanvas;return W.getContext().clear(),this.drawHit(W,void 0,!0),W.context.getImageData(Math.round(F.x),Math.round(F.y),1,1).data[3]>0}destroy(){return s.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(F){var B;if(!((B=this.attrs.perfectDrawEnabled)!==null&&B!==void 0?B:!0))return!1;const X=F||this.hasFill(),ie=this.hasStroke(),ee=this.getAbsoluteOpacity()!==1;if(X&&ie&&ee)return!0;const ce=this.hasShadow(),ve=this.shadowForStrokeEnabled();return!!(X&&ie&&ce&&ve)}setStrokeHitEnabled(F){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),F?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const F=this.size();return{x:this._centroid?-F.width/2:0,y:this._centroid?-F.height/2:0,width:F.width,height:F.height}}getClientRect(F={}){let B=!1,W=this.getParent();for(;W;){if(W.isCached()){B=!0;break}W=W.getParent()}const X=F.skipTransform,ie=F.relativeTo||B&&this.getStage()||void 0,ee=this.getSelfRect(),ve=!F.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,G=ee.width+ve,Z=ee.height+ve,Q=!F.skipShadow&&this.hasShadow(),q=Q?this.shadowOffsetX():0,te=Q?this.shadowOffsetY():0,we=G+Math.abs(q),Be=Z+Math.abs(te),Ke=Q&&this.shadowBlur()||0,je=we+Ke*2,O=Be+Ke*2,K={width:je,height:O,x:-(ve/2+Ke)+Math.min(q,0)+ee.x,y:-(ve/2+Ke)+Math.min(te,0)+ee.y};return X?K:this._transformedRect(K,ie)}drawScene(F,B,W){const X=this.getLayer(),ie=F||X.getCanvas(),ee=ie.getContext(),ce=this._getCanvasCache(),ve=this.getSceneFunc(),G=this.hasShadow();let Z;const Q=B===this;if(!this.isVisible()&&!Q)return this;if(ce){ee.save();const q=this.getAbsoluteTransform(B).getMatrix();return ee.transform(q[0],q[1],q[2],q[3],q[4],q[5]),this._drawCachedSceneCanvas(ee),ee.restore(),this}if(!ve)return this;if(ee.save(),this._useBufferCanvas()){Z=this.getStage();const q=W||Z.bufferCanvas,te=q.getContext();te.clear(),te.save(),te._applyLineJoin(this);const we=this.getAbsoluteTransform(B).getMatrix();te.transform(we[0],we[1],we[2],we[3],we[4],we[5]),ve.call(this,te,this),te.restore();const Be=q.pixelRatio;G&&ee._applyShadow(this),ee._applyOpacity(this),ee._applyGlobalCompositeOperation(this),ee.drawImage(q._canvas,q.x||0,q.y||0,q.width/Be,q.height/Be)}else{if(ee._applyLineJoin(this),!Q){const q=this.getAbsoluteTransform(B).getMatrix();ee.transform(q[0],q[1],q[2],q[3],q[4],q[5]),ee._applyOpacity(this),ee._applyGlobalCompositeOperation(this)}G&&ee._applyShadow(this),ve.call(this,ee,this)}return ee.restore(),this}drawHit(F,B,W=!1){if(!this.shouldDrawHit(B,W))return this;const X=this.getLayer(),ie=F||X.hitCanvas,ee=ie&&ie.getContext(),ce=this.hitFunc()||this.sceneFunc(),ve=this._getCanvasCache(),G=ve&&ve.hit;if(this.colorKey||n.Util.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()"),G){ee.save();const Q=this.getAbsoluteTransform(B).getMatrix();return ee.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),this._drawCachedHitCanvas(ee),ee.restore(),this}if(!ce)return this;if(ee.save(),ee._applyLineJoin(this),!(this===B)){const Q=this.getAbsoluteTransform(B).getMatrix();ee.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5])}return ce.call(this,ee,this),ee.restore(),this}drawHitFromCache(F=0){const B=this._getCanvasCache(),W=this._getCachedSceneCanvas(),X=B.hit,ie=X.getContext(),ee=X.getWidth(),ce=X.getHeight();ie.clear(),ie.drawImage(W._canvas,0,0,ee,ce);try{const ve=ie.getImageData(0,0,ee,ce),G=ve.data,Z=G.length,Q=n.Util._hexToRgb(this.colorKey);for(let q=0;q<Z;q+=4)G[q+3]>F?(G[q]=Q.r,G[q+1]=Q.g,G[q+2]=Q.b,G[q+3]=255):G[q+3]=0;ie.putImageData(ve,0,0)}catch(ve){n.Util.error("Unable to draw hit graph from cached scene canvas. "+ve.message)}return this}hasPointerCapture(F){return c.hasPointerCapture(F,this)}setPointerCapture(F){c.setPointerCapture(F,this)}releaseCapture(F){c.releaseCapture(F,this)}}t.Shape=L,L.prototype._fillFunc=E,L.prototype._strokeFunc=k,L.prototype._fillFuncHit=S,L.prototype._strokeFuncHit=C,L.prototype._centroid=!1,L.prototype.nodeType="Shape",(0,l._registerNode)(L),L.prototype.eventListeners={},L.prototype.on.call(L.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",g),L.prototype.on.call(L.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",x),L.prototype.on.call(L.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",T),L.prototype.on.call(L.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",R),L.prototype.on.call(L.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",M),r.Factory.addGetterSetter(L,"stroke",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(L,"strokeWidth",2,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(L,"hitStrokeWidth","auto",(0,a.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(L,"strokeHitEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(L,"perfectDrawEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(L,"shadowForStrokeEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(L,"lineJoin"),r.Factory.addGetterSetter(L,"lineCap"),r.Factory.addGetterSetter(L,"sceneFunc"),r.Factory.addGetterSetter(L,"hitFunc"),r.Factory.addGetterSetter(L,"dash"),r.Factory.addGetterSetter(L,"dashOffset",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"shadowColor",void 0,(0,a.getStringValidator)()),r.Factory.addGetterSetter(L,"shadowBlur",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"shadowOpacity",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(L,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(L,"shadowOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"shadowOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"fillPatternImage"),r.Factory.addGetterSetter(L,"fill",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(L,"fillPatternX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"fillPatternY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(L,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(L,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(L,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(L,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(L,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(L,"fillEnabled",!0),r.Factory.addGetterSetter(L,"strokeEnabled",!0),r.Factory.addGetterSetter(L,"shadowEnabled",!0),r.Factory.addGetterSetter(L,"dashEnabled",!0),r.Factory.addGetterSetter(L,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(L,"fillPriority","color"),r.Factory.addComponentsGetterSetter(L,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(L,"fillPatternOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"fillPatternOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(L,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(L,"fillPatternScaleX",1,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(L,"fillPatternScaleY",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(L,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(L,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(L,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(L,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(L,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(L,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(L,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(L,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(L,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(L,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(L,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(L,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(L,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(L,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(L,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(L,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(L,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(L,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(L,"fillPatternRotation",0),r.Factory.addGetterSetter(L,"fillRule",void 0,(0,a.getStringValidator)()),r.Factory.backCompat(L,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(wt);Object.defineProperty(Va,"__esModule",{value:!0});Va.Layer=void 0;const Nr=at,lh=os,As=et,E1=Pe,um=$n,lS=pe,uS=wt,cS=Ce,dS="#",fS="beforeDraw",hS="draw",j5=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],pS=j5.length;let go=class extends lh.Container{constructor(e){super(e),this.canvas=new um.SceneCanvas,this.hitCanvas=new um.HitCanvas({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(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);const n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),e<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[e+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){As.Node.prototype.moveToTop.call(this);const e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!As.Node.prototype.moveUp.call(this))return!1;const 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(As.Node.prototype.moveDown.call(this)){const e=this.getStage();if(e){const n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(As.Node.prototype.moveToBottom.call(this)){const e=this.getStage();if(e){const n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const e=this.getNativeCanvasElement();return As.Node.prototype.remove.call(this),e&&e.parentNode&&Nr.Util._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:n}){return this.canvas.setSize(e,n),this.hitCanvas.setSize(e,n),this._setSmoothEnabled(),this}_validateAdd(e){const n=e.getType();n!=="Group"&&n!=="Shape"&&Nr.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e=e||{},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),As.Node.prototype._toKonvaCanvas.call(this,e)}_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(){Nr.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Nr.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Nr.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;let n=1,r=!1;for(;;){for(let s=0;s<pS;s++){const a=j5[s],l=this._getIntersection({x:e.x+a.x*n,y:e.y+a.y*n}),c=l.shape;if(c)return c;if(r=!!l.antialiased,!l.antialiased)break}if(r)n+=1;else return null}}_getIntersection(e){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(e.x*n),Math.round(e.y*n),1,1).data,s=r[3];if(s===255){const a=Nr.Util._rgbToHex(r[0],r[1],r[2]),l=uS.shapes[dS+a];return l?{shape:l}:{antialiased:!0}}else if(s>0)return{antialiased:!0};return{}}drawScene(e,n,r){const s=this.getLayer(),a=e||s&&s.getCanvas();return this._fire(fS,{node:this}),this.clearBeforeDraw()&&a.getContext().clear(),lh.Container.prototype.drawScene.call(this,a,n,r),this._fire(hS,{node:this}),this}drawHit(e,n){const r=this.getLayer(),s=e||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),lh.Container.prototype.drawHit.call(this,s,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Nr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return Nr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}destroy(){return Nr.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};Va.Layer=go;go.prototype.nodeType="Layer";(0,cS._registerNode)(go);E1.Factory.addGetterSetter(go,"imageSmoothingEnabled",!0);E1.Factory.addGetterSetter(go,"clearBeforeDraw",!0);E1.Factory.addGetterSetter(go,"hitGraphEnabled",!0,(0,lS.getBooleanValidator)());var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0});Rc.FastLayer=void 0;const gS=at,mS=Va,yS=Ce;class P1 extends mS.Layer{constructor(e){super(e),this.listening(!1),gS.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Rc.FastLayer=P1;P1.prototype.nodeType="FastLayer";(0,yS._registerNode)(P1);var mo={};Object.defineProperty(mo,"__esModule",{value:!0});mo.Group=void 0;const vS=at,_S=os,SS=Ce;let N1=class extends _S.Container{_validateAdd(e){const n=e.getType();n!=="Group"&&n!=="Shape"&&vS.Util.throw("You may only add groups and shapes to groups.")}};mo.Group=N1;N1.prototype.nodeType="Group";(0,SS._registerNode)(N1);var yo={};Object.defineProperty(yo,"__esModule",{value:!0});yo.Animation=void 0;const uh=Ce,cm=at,ch=function(){return uh.glob.performance&&uh.glob.performance.now?function(){return uh.glob.performance.now()}:function(){return new Date().getTime()}}();class pr{constructor(e,n){this.id=pr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:ch(),frameRate:0},this.func=e,this.setLayers(n)}setLayers(e){let n=[];return e&&(n=Array.isArray(e)?e:[e]),this.layers=n,this}getLayers(){return this.layers}addLayer(e){const n=this.layers,r=n.length;for(let s=0;s<r;s++)if(n[s]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){const n=pr.animations,r=n.length;for(let s=0;s<r;s++)if(n[s].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=ch(),pr._addAnimation(this),this}stop(){return pr._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){const n=e.id,r=this.animations,s=r.length;for(let a=0;a<s;a++)if(r[a].id===n){this.animations.splice(a,1);break}}static _runFrames(){const e={},n=this.animations;for(let r=0;r<n.length;r++){const s=n[r],a=s.layers,l=s.func;s._updateFrameObject(ch());const c=a.length;let d;if(l?d=l.call(s,s.frame)!==!1:d=!0,!!d)for(let p=0;p<c;p++){const m=a[p];m._id!==void 0&&(e[m._id]=m)}}for(const r in e)e.hasOwnProperty(r)&&e[r].batchDraw()}static _animationLoop(){const e=pr;e.animations.length?(e._runFrames(),cm.Util.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,cm.Util.requestAnimFrame(this._animationLoop))}}yo.Animation=pr;pr.animations=[];pr.animIdCounter=0;pr.animRunning=!1;var z5={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;const e=at,n=yo,r=et,s=Ce,a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=1,c=2,d=3,p=["fill","stroke","shadowColor"];let m=0;class w{constructor(y,E,k,S,C,g,x){this.prop=y,this.propFunc=E,this.begin=S,this._pos=S,this.duration=g,this._change=0,this.prevPos=0,this.yoyo=x,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=k,this._change=C-this.begin,this.pause()}fire(y){const E=this[y];E&&E()}setTime(y){y>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():y<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=y,this.update())}getTime(){return this._time}setPosition(y){this.prevPos=this._pos,this.propFunc(y),this._pos=y}getPosition(y){return y===void 0&&(y=this._time),this.func(y,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=d,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(y){this.pause(),this._time=y,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(){const y=this.getTimer()-this._startTime;this.state===c?this.setTime(y):this.state===d&&this.setTime(this.duration-y)}pause(){this.state=l,this.fire("onPause")}getTimer(){return new Date().getTime()}}class _{constructor(y){const E=this,k=y.node,S=k._id,C=y.easing||t.Easings.Linear,g=!!y.yoyo;let x,T;typeof y.duration>"u"?x=.3:y.duration===0?x=.001:x=y.duration,this.node=k,this._id=m++;const R=k.getLayer()||(k instanceof s.Konva.Stage?k.getLayers():null);R||e.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){E.tween.onEnterFrame()},R),this.tween=new w(T,function(M){E._tweenFunc(M)},C,0,1,x*1e3,g),this._addListeners(),_.attrs[S]||(_.attrs[S]={}),_.attrs[S][this._id]||(_.attrs[S][this._id]={}),_.tweens[S]||(_.tweens[S]={});for(T in y)a[T]===void 0&&this._addAttr(T,y[T]);this.reset(),this.onFinish=y.onFinish,this.onReset=y.onReset,this.onUpdate=y.onUpdate}_addAttr(y,E){const k=this.node,S=k._id;let C,g,x,T,R;const M=_.tweens[S][y];M&&delete _.attrs[S][M][y];let L=k.getAttr(y);if(e.Util._isArray(E))if(C=[],g=Math.max(E.length,L.length),y==="points"&&E.length!==L.length&&(E.length>L.length?(T=L,L=e.Util._prepareArrayForTween(L,E,k.closed())):(x=E,E=e.Util._prepareArrayForTween(E,L,k.closed()))),y.indexOf("fill")===0)for(let b=0;b<g;b++)if(b%2===0)C.push(E[b]-L[b]);else{const F=e.Util.colorToRGBA(L[b]);R=e.Util.colorToRGBA(E[b]),L[b]=F,C.push({r:R.r-F.r,g:R.g-F.g,b:R.b-F.b,a:R.a-F.a})}else for(let b=0;b<g;b++)C.push(E[b]-L[b]);else p.indexOf(y)!==-1?(L=e.Util.colorToRGBA(L),R=e.Util.colorToRGBA(E),C={r:R.r-L.r,g:R.g-L.g,b:R.b-L.b,a:R.a-L.a}):C=E-L;_.attrs[S][this._id][y]={start:L,diff:C,end:E,trueEnd:x,trueStart:T},_.tweens[S][y]=this._id}_tweenFunc(y){const E=this.node,k=_.attrs[E._id][this._id];let S,C,g,x,T,R,M,L;for(S in k){if(C=k[S],g=C.start,x=C.diff,L=C.end,e.Util._isArray(g))if(T=[],M=Math.max(g.length,L.length),S.indexOf("fill")===0)for(R=0;R<M;R++)R%2===0?T.push((g[R]||0)+x[R]*y):T.push("rgba("+Math.round(g[R].r+x[R].r*y)+","+Math.round(g[R].g+x[R].g*y)+","+Math.round(g[R].b+x[R].b*y)+","+(g[R].a+x[R].a*y)+")");else for(R=0;R<M;R++)T.push((g[R]||0)+x[R]*y);else p.indexOf(S)!==-1?T="rgba("+Math.round(g.r+x.r*y)+","+Math.round(g.g+x.g*y)+","+Math.round(g.b+x.b*y)+","+(g.a+x.a*y)+")":T=g+x*y;E.setAttr(S,T)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const y=this.node,E=_.attrs[y._id][this._id];E.points&&E.points.trueEnd&&y.setAttr("points",E.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const y=this.node,E=_.attrs[y._id][this._id];E.points&&E.points.trueStart&&y.points(E.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(y){return this.tween.seek(y*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const y=this.node._id,E=this._id,k=_.tweens[y];this.pause(),this.anim&&this.anim.stop();for(const S in k)delete _.tweens[y][S];delete _.attrs[y][E],_.tweens[y]&&(Object.keys(_.tweens[y]).length===0&&delete _.tweens[y],Object.keys(_.attrs[y]).length===0&&delete _.attrs[y])}}t.Tween=_,_.attrs={},_.tweens={},r.Node.prototype.to=function(P){const y=P.onFinish;P.node=this,P.onFinish=function(){this.destroy(),y&&y()},new _(P).play()},t.Easings={BackEaseIn(P,y,E,k){return E*(P/=k)*P*((1.70158+1)*P-1.70158)+y},BackEaseOut(P,y,E,k){return E*((P=P/k-1)*P*((1.70158+1)*P+1.70158)+1)+y},BackEaseInOut(P,y,E,k){let S=1.70158;return(P/=k/2)<1?E/2*(P*P*(((S*=1.525)+1)*P-S))+y:E/2*((P-=2)*P*(((S*=1.525)+1)*P+S)+2)+y},ElasticEaseIn(P,y,E,k,S,C){let g=0;return P===0?y:(P/=k)===1?y+E:(C||(C=k*.3),!S||S<Math.abs(E)?(S=E,g=C/4):g=C/(2*Math.PI)*Math.asin(E/S),-(S*Math.pow(2,10*(P-=1))*Math.sin((P*k-g)*(2*Math.PI)/C))+y)},ElasticEaseOut(P,y,E,k,S,C){let g=0;return P===0?y:(P/=k)===1?y+E:(C||(C=k*.3),!S||S<Math.abs(E)?(S=E,g=C/4):g=C/(2*Math.PI)*Math.asin(E/S),S*Math.pow(2,-10*P)*Math.sin((P*k-g)*(2*Math.PI)/C)+E+y)},ElasticEaseInOut(P,y,E,k,S,C){let g=0;return P===0?y:(P/=k/2)===2?y+E:(C||(C=k*(.3*1.5)),!S||S<Math.abs(E)?(S=E,g=C/4):g=C/(2*Math.PI)*Math.asin(E/S),P<1?-.5*(S*Math.pow(2,10*(P-=1))*Math.sin((P*k-g)*(2*Math.PI)/C))+y:S*Math.pow(2,-10*(P-=1))*Math.sin((P*k-g)*(2*Math.PI)/C)*.5+E+y)},BounceEaseOut(P,y,E,k){return(P/=k)<1/2.75?E*(7.5625*P*P)+y:P<2/2.75?E*(7.5625*(P-=1.5/2.75)*P+.75)+y:P<2.5/2.75?E*(7.5625*(P-=2.25/2.75)*P+.9375)+y:E*(7.5625*(P-=2.625/2.75)*P+.984375)+y},BounceEaseIn(P,y,E,k){return E-t.Easings.BounceEaseOut(k-P,0,E,k)+y},BounceEaseInOut(P,y,E,k){return P<k/2?t.Easings.BounceEaseIn(P*2,0,E,k)*.5+y:t.Easings.BounceEaseOut(P*2-k,0,E,k)*.5+E*.5+y},EaseIn(P,y,E,k){return E*(P/=k)*P+y},EaseOut(P,y,E,k){return-E*(P/=k)*(P-2)+y},EaseInOut(P,y,E,k){return(P/=k/2)<1?E/2*P*P+y:-E/2*(--P*(P-2)-1)+y},StrongEaseIn(P,y,E,k){return E*(P/=k)*P*P*P*P+y},StrongEaseOut(P,y,E,k){return E*((P=P/k-1)*P*P*P*P+1)+y},StrongEaseInOut(P,y,E,k){return(P/=k/2)<1?E/2*P*P*P*P*P+y:E/2*((P-=2)*P*P*P*P+2)+y},Linear(P,y,E,k){return E*P/k+y}}})(z5);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const e=Ce,n=at,r=et,s=os,a=D5,l=Va,c=Rc,d=mo,p=Nc,m=wt,w=yo,_=z5,P=Or,y=$n;t.Konva=n.Util._assign(e.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:s.Container,Stage:a.Stage,stages:a.stages,Layer:l.Layer,FastLayer:c.FastLayer,Group:d.Group,DD:p.DD,Shape:m.Shape,shapes:m.shapes,Animation:w.Animation,Tween:_.Tween,Easings:_.Easings,Context:P.Context,Canvas:y.Canvas}),t.default=t.Konva})(Zu);var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});Lc.Arc=void 0;const Ac=Pe,xS=wt,dm=Ce,Fc=pe,wS=Ce;class Gr extends xS.Shape{_sceneFunc(e){const n=dm.Konva.getAngle(this.angle()),r=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,n,r),e.arc(0,0,this.innerRadius(),n,0,!r),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),s=dm.Konva.getAngle(r?360-this.angle():this.angle()),a=Math.cos(Math.min(s,Math.PI)),l=1,c=Math.sin(Math.min(Math.max(Math.PI,s),3*Math.PI/2)),d=Math.sin(Math.min(s,Math.PI/2)),p=a*(a>0?e:n),m=l*n,w=c*(c>0?e:n),_=d*(d>0?n:e);return{x:p,y:r?-1*_:w,width:m-p,height:_-w}}}Lc.Arc=Gr;Gr.prototype._centroid=!0;Gr.prototype.className="Arc";Gr.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"];(0,wS._registerNode)(Gr);Ac.Factory.addGetterSetter(Gr,"innerRadius",0,(0,Fc.getNumberValidator)());Ac.Factory.addGetterSetter(Gr,"outerRadius",0,(0,Fc.getNumberValidator)());Ac.Factory.addGetterSetter(Gr,"angle",0,(0,Fc.getNumberValidator)());Ac.Factory.addGetterSetter(Gr,"clockwise",!1,(0,Fc.getBooleanValidator)());var Mc={},Wa={};Object.defineProperty(Wa,"__esModule",{value:!0});Wa.Line=void 0;const Oc=Pe,kS=Ce,CS=wt,U5=pe;function m0(t,e,n,r,s,a,l){const c=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),d=Math.sqrt(Math.pow(s-n,2)+Math.pow(a-r,2)),p=l*c/(c+d),m=l*d/(c+d),w=n-p*(s-t),_=r-p*(a-e),P=n+m*(s-t),y=r+m*(a-e);return[w,_,P,y]}function fm(t,e){const n=t.length,r=[];for(let s=2;s<n-2;s+=2){const a=m0(t[s-2],t[s-1],t[s],t[s+1],t[s+2],t[s+3],e);isNaN(a[0])||(r.push(a[0]),r.push(a[1]),r.push(t[s]),r.push(t[s+1]),r.push(a[2]),r.push(a[3]))}return r}class Ci extends CS.Shape{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){const n=this.points(),r=n.length,s=this.tension(),a=this.closed(),l=this.bezier();if(!r)return;let c=0;if(e.beginPath(),e.moveTo(n[0],n[1]),s!==0&&r>4){const d=this.getTensionPoints(),p=d.length;for(c=a?0:4,a||e.quadraticCurveTo(d[0],d[1],d[2],d[3]);c<p-2;)e.bezierCurveTo(d[c++],d[c++],d[c++],d[c++],d[c++],d[c++]);a||e.quadraticCurveTo(d[p-2],d[p-1],n[r-2],n[r-1])}else if(l)for(c=2;c<r;)e.bezierCurveTo(n[c++],n[c++],n[c++],n[c++],n[c++],n[c++]);else for(c=2;c<r;c+=2)e.lineTo(n[c],n[c+1]);a?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():fm(this.points(),this.tension())}_getTensionPointsClosed(){const e=this.points(),n=e.length,r=this.tension(),s=m0(e[n-2],e[n-1],e[0],e[1],e[2],e[3],r),a=m0(e[n-4],e[n-3],e[n-2],e[n-1],e[0],e[1],r),l=fm(e,r);return[s[2],s[3]].concat(l).concat([a[0],a[1],e[n-2],e[n-1],a[2],a[3],s[0],s[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:e=this.points();let n=e[0],r=e[0],s=e[1],a=e[1],l,c;for(let d=0;d<e.length/2;d++)l=e[d*2],c=e[d*2+1],n=Math.min(n,l),r=Math.max(r,l),s=Math.min(s,c),a=Math.max(a,c);return{x:n,y:s,width:r-n,height:a-s}}}Wa.Line=Ci;Ci.prototype.className="Line";Ci.prototype._attrsAffectingSize=["points","bezier","tension"];(0,kS._registerNode)(Ci);Oc.Factory.addGetterSetter(Ci,"closed",!1);Oc.Factory.addGetterSetter(Ci,"bezier",!1);Oc.Factory.addGetterSetter(Ci,"tension",0,(0,U5.getNumberValidator)());Oc.Factory.addGetterSetter(Ci,"points",[],(0,U5.getNumberArrayValidator)());var vo={},B5={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],t.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const e=(l,c,d)=>{let p,m;const _=d/2;p=0;for(let P=0;P<20;P++)m=_*t.tValues[20][P]+_,p+=t.cValues[20][P]*r(l,c,m);return _*p};t.getCubicArcLength=e;const n=(l,c,d)=>{d===void 0&&(d=1);const p=l[0]-2*l[1]+l[2],m=c[0]-2*c[1]+c[2],w=2*l[1]-2*l[0],_=2*c[1]-2*c[0],P=4*(p*p+m*m),y=4*(p*w+m*_),E=w*w+_*_;if(P===0)return d*Math.sqrt(Math.pow(l[2]-l[0],2)+Math.pow(c[2]-c[0],2));const k=y/(2*P),S=E/P,C=d+k,g=S-k*k,x=C*C+g>0?Math.sqrt(C*C+g):0,T=k*k+g>0?Math.sqrt(k*k+g):0,R=k+Math.sqrt(k*k+g)!==0?g*Math.log(Math.abs((C+x)/(k+T))):0;return Math.sqrt(P)/2*(C*x-k*T+R)};t.getQuadraticArcLength=n;function r(l,c,d){const p=s(1,d,l),m=s(1,d,c),w=p*p+m*m;return Math.sqrt(w)}const s=(l,c,d)=>{const p=d.length-1;let m,w;if(p===0)return 0;if(l===0){w=0;for(let _=0;_<=p;_++)w+=t.binomialCoefficients[p][_]*Math.pow(1-c,p-_)*Math.pow(c,_)*d[_];return w}else{m=new Array(p);for(let _=0;_<p;_++)m[_]=p*(d[_+1]-d[_]);return s(l-1,c,m)}},a=(l,c,d)=>{let p=1,m=l/c,w=(l-d(m))/c,_=0;for(;p>.001;){const P=d(m+w),y=Math.abs(l-P)/c;if(y<p)p=y,m+=w;else{const E=d(m-w),k=Math.abs(l-E)/c;k<p?(p=k,m-=w):w/=2}if(_++,_>500)break}return m};t.t2length=a})(B5);Object.defineProperty(vo,"__esModule",{value:!0});vo.Path=void 0;const ES=Pe,PS=Ce,NS=wt,Fs=B5;class _t extends NS.Shape{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=_t.parsePathData(this.data()),this.pathLength=_t.getPathLength(this.dataArray)}_sceneFunc(e){const n=this.dataArray;e.beginPath();let r=!1;for(let s=0;s<n.length;s++){const a=n[s].command,l=n[s].points;switch(a){case"L":e.lineTo(l[0],l[1]);break;case"M":e.moveTo(l[0],l[1]);break;case"C":e.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case"Q":e.quadraticCurveTo(l[0],l[1],l[2],l[3]);break;case"A":const c=l[0],d=l[1],p=l[2],m=l[3],w=l[4],_=l[5],P=l[6],y=l[7],E=p>m?p:m,k=p>m?1:p/m,S=p>m?m/p:1;e.translate(c,d),e.rotate(P),e.scale(k,S),e.arc(0,0,E,w,w+_,1-y),e.scale(1/k,1/S),e.rotate(-P),e.translate(-c,-d);break;case"z":r=!0,e.closePath();break}}!r&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){let e=[];this.dataArray.forEach(function(d){if(d.command==="A"){const p=d.points[4],m=d.points[5],w=d.points[4]+m;let _=Math.PI/180;if(Math.abs(p-w)<_&&(_=Math.abs(p-w)),m<0)for(let P=p-_;P>w;P-=_){const y=_t.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],P,0);e.push(y.x,y.y)}else for(let P=p+_;P<w;P+=_){const y=_t.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],P,0);e.push(y.x,y.y)}}else if(d.command==="C")for(let p=0;p<=1;p+=.01){const m=_t.getPointOnCubicBezier(p,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);e.push(m.x,m.y)}else e=e.concat(d.points)});let n=e[0],r=e[0],s=e[1],a=e[1],l,c;for(let d=0;d<e.length/2;d++)l=e[d*2],c=e[d*2+1],isNaN(l)||(n=Math.min(n,l),r=Math.max(r,l)),isNaN(c)||(s=Math.min(s,c),a=Math.max(a,c));return{x:n,y:s,width:r-n,height:a-s}}getLength(){return this.pathLength}getPointAtLength(e){return _t.getPointAtLengthOfDataArray(e,this.dataArray)}static getLineLength(e,n,r,s){return Math.sqrt((r-e)*(r-e)+(s-n)*(s-n))}static getPathLength(e){let n=0;for(let r=0;r<e.length;++r)n+=e[r].pathLength;return n}static getPointAtLengthOfDataArray(e,n){let r,s=0,a=n.length;if(!a)return null;for(;s<a&&e>n[s].pathLength;)e-=n[s].pathLength,++s;if(s===a)return r=n[s-1].points.slice(-2),{x:r[0],y:r[1]};if(e<.01)return n[s].command==="M"?(r=n[s].points.slice(0,2),{x:r[0],y:r[1]}):{x:n[s].start.x,y:n[s].start.y};const l=n[s],c=l.points;switch(l.command){case"L":return _t.getPointOnLine(e,l.start.x,l.start.y,c[0],c[1]);case"C":return _t.getPointOnCubicBezier((0,Fs.t2length)(e,_t.getPathLength(n),E=>(0,Fs.getCubicArcLength)([l.start.x,c[0],c[2],c[4]],[l.start.y,c[1],c[3],c[5]],E)),l.start.x,l.start.y,c[0],c[1],c[2],c[3],c[4],c[5]);case"Q":return _t.getPointOnQuadraticBezier((0,Fs.t2length)(e,_t.getPathLength(n),E=>(0,Fs.getQuadraticArcLength)([l.start.x,c[0],c[2]],[l.start.y,c[1],c[3]],E)),l.start.x,l.start.y,c[0],c[1],c[2],c[3]);case"A":const d=c[0],p=c[1],m=c[2],w=c[3],_=c[5],P=c[6];let y=c[4];return y+=_*e/l.pathLength,_t.getPointOnEllipticalArc(d,p,m,w,y,P)}return null}static getPointOnLine(e,n,r,s,a,l,c){l=l??n,c=c??r;const d=this.getLineLength(n,r,s,a);if(d<1e-10)return{x:n,y:r};if(s===n)return{x:l,y:c+(a>r?e:-e)};const p=(a-r)/(s-n),m=Math.sqrt(e*e/(1+p*p))*(s<n?-1:1),w=p*m;if(Math.abs(c-r-p*(l-n))<1e-10)return{x:l+m,y:c+w};const _=((l-n)*(s-n)+(c-r)*(a-r))/(d*d),P=n+_*(s-n),y=r+_*(a-r),E=this.getLineLength(l,c,P,y),k=Math.sqrt(e*e-E*E),S=Math.sqrt(k*k/(1+p*p))*(s<n?-1:1),C=p*S;return{x:P+S,y:y+C}}static getPointOnCubicBezier(e,n,r,s,a,l,c,d,p){function m(k){return k*k*k}function w(k){return 3*k*k*(1-k)}function _(k){return 3*k*(1-k)*(1-k)}function P(k){return(1-k)*(1-k)*(1-k)}const y=d*m(e)+l*w(e)+s*_(e)+n*P(e),E=p*m(e)+c*w(e)+a*_(e)+r*P(e);return{x:y,y:E}}static getPointOnQuadraticBezier(e,n,r,s,a,l,c){function d(P){return P*P}function p(P){return 2*P*(1-P)}function m(P){return(1-P)*(1-P)}const w=l*d(e)+s*p(e)+n*m(e),_=c*d(e)+a*p(e)+r*m(e);return{x:w,y:_}}static getPointOnEllipticalArc(e,n,r,s,a,l){const c=Math.cos(l),d=Math.sin(l),p={x:r*Math.cos(a),y:s*Math.sin(a)};return{x:e+(p.x*c-p.y*d),y:n+(p.x*d+p.y*c)}}static parsePathData(e){if(!e)return[];let n=e;const 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(let w=0;w<r.length;w++)n=n.replace(new RegExp(r[w],"g"),"|"+r[w]);const s=n.split("|"),a=[],l=[];let c=0,d=0;const p=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let m;for(let w=1;w<s.length;w++){let _=s[w],P=_.charAt(0);for(_=_.slice(1),l.length=0;m=p.exec(_);)l.push(m[0]);const y=[];for(let E=0,k=l.length;E<k;E++){if(l[E]==="00"){y.push(0,0);continue}const S=parseFloat(l[E]);isNaN(S)?y.push(0):y.push(S)}for(;y.length>0&&!isNaN(y[0]);){let E="",k=[];const S=c,C=d;let g,x,T,R,M,L,b,F,B,W;switch(P){case"l":c+=y.shift(),d+=y.shift(),E="L",k.push(c,d);break;case"L":c=y.shift(),d=y.shift(),k.push(c,d);break;case"m":const X=y.shift(),ie=y.shift();if(c+=X,d+=ie,E="M",a.length>2&&a[a.length-1].command==="z"){for(let ee=a.length-2;ee>=0;ee--)if(a[ee].command==="M"){c=a[ee].points[0]+X,d=a[ee].points[1]+ie;break}}k.push(c,d),P="l";break;case"M":c=y.shift(),d=y.shift(),E="M",k.push(c,d),P="L";break;case"h":c+=y.shift(),E="L",k.push(c,d);break;case"H":c=y.shift(),E="L",k.push(c,d);break;case"v":d+=y.shift(),E="L",k.push(c,d);break;case"V":d=y.shift(),E="L",k.push(c,d);break;case"C":k.push(y.shift(),y.shift(),y.shift(),y.shift()),c=y.shift(),d=y.shift(),k.push(c,d);break;case"c":k.push(c+y.shift(),d+y.shift(),c+y.shift(),d+y.shift()),c+=y.shift(),d+=y.shift(),E="C",k.push(c,d);break;case"S":x=c,T=d,g=a[a.length-1],g.command==="C"&&(x=c+(c-g.points[2]),T=d+(d-g.points[3])),k.push(x,T,y.shift(),y.shift()),c=y.shift(),d=y.shift(),E="C",k.push(c,d);break;case"s":x=c,T=d,g=a[a.length-1],g.command==="C"&&(x=c+(c-g.points[2]),T=d+(d-g.points[3])),k.push(x,T,c+y.shift(),d+y.shift()),c+=y.shift(),d+=y.shift(),E="C",k.push(c,d);break;case"Q":k.push(y.shift(),y.shift()),c=y.shift(),d=y.shift(),k.push(c,d);break;case"q":k.push(c+y.shift(),d+y.shift()),c+=y.shift(),d+=y.shift(),E="Q",k.push(c,d);break;case"T":x=c,T=d,g=a[a.length-1],g.command==="Q"&&(x=c+(c-g.points[0]),T=d+(d-g.points[1])),c=y.shift(),d=y.shift(),E="Q",k.push(x,T,c,d);break;case"t":x=c,T=d,g=a[a.length-1],g.command==="Q"&&(x=c+(c-g.points[0]),T=d+(d-g.points[1])),c+=y.shift(),d+=y.shift(),E="Q",k.push(x,T,c,d);break;case"A":R=y.shift(),M=y.shift(),L=y.shift(),b=y.shift(),F=y.shift(),B=c,W=d,c=y.shift(),d=y.shift(),E="A",k=this.convertEndpointToCenterParameterization(B,W,c,d,b,F,R,M,L);break;case"a":R=y.shift(),M=y.shift(),L=y.shift(),b=y.shift(),F=y.shift(),B=c,W=d,c+=y.shift(),d+=y.shift(),E="A",k=this.convertEndpointToCenterParameterization(B,W,c,d,b,F,R,M,L);break}a.push({command:E||P,points:k,start:{x:S,y:C},pathLength:this.calcLength(S,C,E||P,k)})}(P==="z"||P==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(e,n,r,s){let a,l,c,d;const p=_t;switch(r){case"L":return p.getLineLength(e,n,s[0],s[1]);case"C":return(0,Fs.getCubicArcLength)([e,s[0],s[2],s[4]],[n,s[1],s[3],s[5]],1);case"Q":return(0,Fs.getQuadraticArcLength)([e,s[0],s[2]],[n,s[1],s[3]],1);case"A":a=0;const m=s[4],w=s[5],_=s[4]+w;let P=Math.PI/180;if(Math.abs(m-_)<P&&(P=Math.abs(m-_)),l=p.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],m,0),w<0)for(d=m-P;d>_;d-=P)c=p.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],d,0),a+=p.getLineLength(l.x,l.y,c.x,c.y),l=c;else for(d=m+P;d<_;d+=P)c=p.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],d,0),a+=p.getLineLength(l.x,l.y,c.x,c.y),l=c;return c=p.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],_,0),a+=p.getLineLength(l.x,l.y,c.x,c.y),a}return 0}static convertEndpointToCenterParameterization(e,n,r,s,a,l,c,d,p){const m=p*(Math.PI/180),w=Math.cos(m)*(e-r)/2+Math.sin(m)*(n-s)/2,_=-1*Math.sin(m)*(e-r)/2+Math.cos(m)*(n-s)/2,P=w*w/(c*c)+_*_/(d*d);P>1&&(c*=Math.sqrt(P),d*=Math.sqrt(P));let y=Math.sqrt((c*c*(d*d)-c*c*(_*_)-d*d*(w*w))/(c*c*(_*_)+d*d*(w*w)));a===l&&(y*=-1),isNaN(y)&&(y=0);const E=y*c*_/d,k=y*-d*w/c,S=(e+r)/2+Math.cos(m)*E-Math.sin(m)*k,C=(n+s)/2+Math.sin(m)*E+Math.cos(m)*k,g=function(F){return Math.sqrt(F[0]*F[0]+F[1]*F[1])},x=function(F,B){return(F[0]*B[0]+F[1]*B[1])/(g(F)*g(B))},T=function(F,B){return(F[0]*B[1]<F[1]*B[0]?-1:1)*Math.acos(x(F,B))},R=T([1,0],[(w-E)/c,(_-k)/d]),M=[(w-E)/c,(_-k)/d],L=[(-1*w-E)/c,(-1*_-k)/d];let b=T(M,L);return x(M,L)<=-1&&(b=Math.PI),x(M,L)>=1&&(b=0),l===0&&b>0&&(b=b-2*Math.PI),l===1&&b<0&&(b=b+2*Math.PI),[S,C,c,d,R,b,m,l]}}vo.Path=_t;_t.prototype.className="Path";_t.prototype._attrsAffectingSize=["data"];(0,PS._registerNode)(_t);ES.Factory.addGetterSetter(_t,"data");Object.defineProperty(Mc,"__esModule",{value:!0});Mc.Arrow=void 0;const Dc=Pe,TS=Wa,G5=pe,RS=Ce,hm=vo;class ls extends TS.Line{_sceneFunc(e){super._sceneFunc(e);const n=Math.PI*2,r=this.points();let s=r;const a=this.tension()!==0&&r.length>4;a&&(s=this.getTensionPoints());const l=this.pointerLength(),c=r.length;let d,p;if(a){const _=[s[s.length-4],s[s.length-3],s[s.length-2],s[s.length-1],r[c-2],r[c-1]],P=hm.Path.calcLength(s[s.length-4],s[s.length-3],"C",_),y=hm.Path.getPointOnQuadraticBezier(Math.min(1,1-l/P),_[0],_[1],_[2],_[3],_[4],_[5]);d=r[c-2]-y.x,p=r[c-1]-y.y}else d=r[c-2]-r[c-4],p=r[c-1]-r[c-3];const m=(Math.atan2(p,d)+n)%n,w=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(r[c-2],r[c-1]),e.rotate(m),e.moveTo(0,0),e.lineTo(-l,w/2),e.lineTo(-l,-w/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(r[0],r[1]),a?(d=(s[0]+s[2])/2-r[0],p=(s[1]+s[3])/2-r[1]):(d=r[2]-r[0],p=r[3]-r[1]),e.rotate((Math.atan2(-p,-d)+n)%n),e.moveTo(0,0),e.lineTo(-l,w/2),e.lineTo(-l,-w/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){const n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),n=this.pointerWidth()/2;return{x:e.x,y:e.y-n,width:e.width,height:e.height+n*2}}}Mc.Arrow=ls;ls.prototype.className="Arrow";(0,RS._registerNode)(ls);Dc.Factory.addGetterSetter(ls,"pointerLength",10,(0,G5.getNumberValidator)());Dc.Factory.addGetterSetter(ls,"pointerWidth",10,(0,G5.getNumberValidator)());Dc.Factory.addGetterSetter(ls,"pointerAtBeginning",!1);Dc.Factory.addGetterSetter(ls,"pointerAtEnding",!0);var Ic={};Object.defineProperty(Ic,"__esModule",{value:!0});Ic.Circle=void 0;const LS=Pe,AS=wt,FS=pe,MS=Ce;class _o extends AS.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}Ic.Circle=_o;_o.prototype._centroid=!0;_o.prototype.className="Circle";_o.prototype._attrsAffectingSize=["radius"];(0,MS._registerNode)(_o);LS.Factory.addGetterSetter(_o,"radius",0,(0,FS.getNumberValidator)());var bc={};Object.defineProperty(bc,"__esModule",{value:!0});bc.Ellipse=void 0;const T1=Pe,OS=wt,H5=pe,DS=Ce;class Ei extends OS.Shape{_sceneFunc(e){const n=this.radiusX(),r=this.radiusY();e.beginPath(),e.save(),n!==r&&e.scale(1,r/n),e.arc(0,0,n,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}bc.Ellipse=Ei;Ei.prototype.className="Ellipse";Ei.prototype._centroid=!0;Ei.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,DS._registerNode)(Ei);T1.Factory.addComponentsGetterSetter(Ei,"radius",["x","y"]);T1.Factory.addGetterSetter(Ei,"radiusX",0,(0,H5.getNumberValidator)());T1.Factory.addGetterSetter(Ei,"radiusY",0,(0,H5.getNumberValidator)());var jc={};Object.defineProperty(jc,"__esModule",{value:!0});jc.Image=void 0;const dh=at,us=Pe,IS=wt,bS=Ce,Ka=pe;let yr=class V5 extends IS.Shape{constructor(e){super(e),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",n=>{this._removeImageLoad(n.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",this._loadListener)}_removeImageLoad(e){e&&e.removeEventListener&&e.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const e=!!this.cornerRadius(),n=this.hasShadow();return e&&n?!0:super._useBufferCanvas(!0)}_sceneFunc(e){const n=this.getWidth(),r=this.getHeight(),s=this.cornerRadius(),a=this.attrs.image;let l;if(a){const c=this.attrs.cropWidth,d=this.attrs.cropHeight;c&&d?l=[a,this.cropX(),this.cropY(),c,d,0,0,n,r]:l=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||s)&&(e.beginPath(),s?dh.Util.drawRoundedRectPath(e,n,r,s):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)),a&&(s&&e.clip(),e.drawImage.apply(e,l))}_hitFunc(e){const n=this.width(),r=this.height(),s=this.cornerRadius();e.beginPath(),s?dh.Util.drawRoundedRectPath(e,n,r,s):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,n;return(e=this.attrs.width)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var e,n;return(e=this.attrs.height)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(e,n,r=null){const s=dh.Util.createImageElement();s.onload=function(){const a=new V5({image:s});n(a)},s.onerror=r,s.crossOrigin="Anonymous",s.src=e}};jc.Image=yr;yr.prototype.className="Image";(0,bS._registerNode)(yr);us.Factory.addGetterSetter(yr,"cornerRadius",0,(0,Ka.getNumberOrArrayOfNumbersValidator)(4));us.Factory.addGetterSetter(yr,"image");us.Factory.addComponentsGetterSetter(yr,"crop",["x","y","width","height"]);us.Factory.addGetterSetter(yr,"cropX",0,(0,Ka.getNumberValidator)());us.Factory.addGetterSetter(yr,"cropY",0,(0,Ka.getNumberValidator)());us.Factory.addGetterSetter(yr,"cropWidth",0,(0,Ka.getNumberValidator)());us.Factory.addGetterSetter(yr,"cropHeight",0,(0,Ka.getNumberValidator)());var oo={};Object.defineProperty(oo,"__esModule",{value:!0});oo.Tag=oo.Label=void 0;const zc=Pe,jS=wt,zS=mo,R1=pe,W5=Ce,K5=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],US="Change.konva",BS="none",y0="up",v0="right",_0="down",S0="left",GS=K5.length;class L1 extends zS.Group{constructor(e){super(e),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(e){let n=this,r;const s=function(){n._sync()};for(r=0;r<GS;r++)e.on(K5[r]+US,s)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let e=this.getText(),n=this.getTag(),r,s,a,l,c,d,p;if(e&&n){switch(r=e.width(),s=e.height(),a=n.pointerDirection(),l=n.pointerWidth(),p=n.pointerHeight(),c=0,d=0,a){case y0:c=r/2,d=-1*p;break;case v0:c=r+l,d=s/2;break;case _0:c=r/2,d=s+p;break;case S0:c=-1*l,d=s/2;break}n.setAttrs({x:-1*c,y:-1*d,width:r,height:s}),e.setAttrs({x:-1*c,y:-1*d})}}}oo.Label=L1;L1.prototype.className="Label";(0,W5._registerNode)(L1);class cs extends jS.Shape{_sceneFunc(e){const n=this.width(),r=this.height(),s=this.pointerDirection(),a=this.pointerWidth(),l=this.pointerHeight(),c=this.cornerRadius();let d=0,p=0,m=0,w=0;typeof c=="number"?d=p=m=w=Math.min(c,n/2,r/2):(d=Math.min(c[0]||0,n/2,r/2),p=Math.min(c[1]||0,n/2,r/2),w=Math.min(c[2]||0,n/2,r/2),m=Math.min(c[3]||0,n/2,r/2)),e.beginPath(),e.moveTo(d,0),s===y0&&(e.lineTo((n-a)/2,0),e.lineTo(n/2,-1*l),e.lineTo((n+a)/2,0)),e.lineTo(n-p,0),e.arc(n-p,p,p,Math.PI*3/2,0,!1),s===v0&&(e.lineTo(n,(r-l)/2),e.lineTo(n+a,r/2),e.lineTo(n,(r+l)/2)),e.lineTo(n,r-w),e.arc(n-w,r-w,w,0,Math.PI/2,!1),s===_0&&(e.lineTo((n+a)/2,r),e.lineTo(n/2,r+l),e.lineTo((n-a)/2,r)),e.lineTo(m,r),e.arc(m,r-m,m,Math.PI/2,Math.PI,!1),s===S0&&(e.lineTo(0,(r+l)/2),e.lineTo(-1*a,r/2),e.lineTo(0,(r-l)/2)),e.lineTo(0,d),e.arc(d,d,d,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){let e=0,n=0,r=this.pointerWidth(),s=this.pointerHeight(),a=this.pointerDirection(),l=this.width(),c=this.height();return a===y0?(n-=s,c+=s):a===_0?c+=s:a===S0?(e-=r*1.5,l+=r):a===v0&&(l+=r*1.5),{x:e,y:n,width:l,height:c}}}oo.Tag=cs;cs.prototype.className="Tag";(0,W5._registerNode)(cs);zc.Factory.addGetterSetter(cs,"pointerDirection",BS);zc.Factory.addGetterSetter(cs,"pointerWidth",0,(0,R1.getNumberValidator)());zc.Factory.addGetterSetter(cs,"pointerHeight",0,(0,R1.getNumberValidator)());zc.Factory.addGetterSetter(cs,"cornerRadius",0,(0,R1.getNumberOrArrayOfNumbersValidator)(4));var Ya={};Object.defineProperty(Ya,"__esModule",{value:!0});Ya.Rect=void 0;const HS=Pe,VS=wt,WS=Ce,KS=at,YS=pe;let Uc=class extends VS.Shape{_sceneFunc(e){const n=this.cornerRadius(),r=this.width(),s=this.height();e.beginPath(),n?KS.Util.drawRoundedRectPath(e,r,s,n):e.rect(0,0,r,s),e.closePath(),e.fillStrokeShape(this)}};Ya.Rect=Uc;Uc.prototype.className="Rect";(0,WS._registerNode)(Uc);HS.Factory.addGetterSetter(Uc,"cornerRadius",0,(0,YS.getNumberOrArrayOfNumbersValidator)(4));var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});Bc.RegularPolygon=void 0;const Y5=Pe,XS=wt,X5=pe,QS=Ce;class ds extends XS.Shape{_sceneFunc(e){const n=this._getPoints();e.beginPath(),e.moveTo(n[0].x,n[0].y);for(let r=1;r<n.length;r++)e.lineTo(n[r].x,n[r].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,n=this.attrs.radius||0,r=[];for(let s=0;s<e;s++)r.push({x:n*Math.sin(s*2*Math.PI/e),y:-1*n*Math.cos(s*2*Math.PI/e)});return r}getSelfRect(){const e=this._getPoints();let n=e[0].x,r=e[0].y,s=e[0].x,a=e[0].y;return e.forEach(l=>{n=Math.min(n,l.x),r=Math.max(r,l.x),s=Math.min(s,l.y),a=Math.max(a,l.y)}),{x:n,y:s,width:r-n,height:a-s}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}Bc.RegularPolygon=ds;ds.prototype.className="RegularPolygon";ds.prototype._centroid=!0;ds.prototype._attrsAffectingSize=["radius"];(0,QS._registerNode)(ds);Y5.Factory.addGetterSetter(ds,"radius",0,(0,X5.getNumberValidator)());Y5.Factory.addGetterSetter(ds,"sides",0,(0,X5.getNumberValidator)());var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});Gc.Ring=void 0;const Q5=Pe,qS=wt,q5=pe,$S=Ce,pm=Math.PI*2;class fs extends qS.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,pm,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),pm,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Gc.Ring=fs;fs.prototype.className="Ring";fs.prototype._centroid=!0;fs.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,$S._registerNode)(fs);Q5.Factory.addGetterSetter(fs,"innerRadius",0,(0,q5.getNumberValidator)());Q5.Factory.addGetterSetter(fs,"outerRadius",0,(0,q5.getNumberValidator)());var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});Hc.Sprite=void 0;const hs=Pe,JS=wt,ZS=yo,$5=pe,ex=Ce;class vr extends JS.Shape{constructor(e){super(e),this._updated=!0,this.anim=new ZS.Animation(()=>{const 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(e){const n=this.animation(),r=this.frameIndex(),s=r*4,a=this.animations()[n],l=this.frameOffsets(),c=a[s+0],d=a[s+1],p=a[s+2],m=a[s+3],w=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,p,m),e.closePath(),e.fillStrokeShape(this)),w)if(l){const _=l[n],P=r*2;e.drawImage(w,c,d,p,m,_[P+0],_[P+1],p,m)}else e.drawImage(w,c,d,p,m,0,0,p,m)}_hitFunc(e){const n=this.animation(),r=this.frameIndex(),s=r*4,a=this.animations()[n],l=this.frameOffsets(),c=a[s+2],d=a[s+3];if(e.beginPath(),l){const p=l[n],m=r*2;e.rect(p[m+0],p[m+1],c,d)}else e.rect(0,0,c,d);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const e=this.frameIndex(),n=this.animation(),r=this.animations(),s=r[n],a=s.length/4;e<a-1?this.frameIndex(e+1):this.frameIndex(0)}}Hc.Sprite=vr;vr.prototype.className="Sprite";(0,ex._registerNode)(vr);hs.Factory.addGetterSetter(vr,"animation");hs.Factory.addGetterSetter(vr,"animations");hs.Factory.addGetterSetter(vr,"frameOffsets");hs.Factory.addGetterSetter(vr,"image");hs.Factory.addGetterSetter(vr,"frameIndex",0,(0,$5.getNumberValidator)());hs.Factory.addGetterSetter(vr,"frameRate",17,(0,$5.getNumberValidator)());hs.Factory.backCompat(vr,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});Vc.Star=void 0;const A1=Pe,tx=wt,F1=pe,nx=Ce;class Pi extends tx.Shape{_sceneFunc(e){const n=this.innerRadius(),r=this.outerRadius(),s=this.numPoints();e.beginPath(),e.moveTo(0,0-r);for(let a=1;a<s*2;a++){const l=a%2===0?r:n,c=l*Math.sin(a*Math.PI/s),d=-1*l*Math.cos(a*Math.PI/s);e.lineTo(c,d)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Vc.Star=Pi;Pi.prototype.className="Star";Pi.prototype._centroid=!0;Pi.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,nx._registerNode)(Pi);A1.Factory.addGetterSetter(Pi,"numPoints",5,(0,F1.getNumberValidator)());A1.Factory.addGetterSetter(Pi,"innerRadius",0,(0,F1.getNumberValidator)());A1.Factory.addGetterSetter(Pi,"outerRadius",0,(0,F1.getNumberValidator)());var So={};Object.defineProperty(So,"__esModule",{value:!0});So.Text=void 0;So.stringToArray=Vi;const x0=at,Kt=Pe,rx=wt,fh=Ce,Ni=pe,ix=Ce;function Vi(t){return[...t].reduce((e,n,r,s)=>{if(new RegExp("\\p{Emoji}","u").test(n)){const a=s[r+1];a&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(a)?(e.push(n+a),s[r+1]=""):e.push(n)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(n+(s[r+1]||""))?e.push(n+s[r+1]):r>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(n)?e[e.length-1]+=n:n&&e.push(n);return e},[])}const Ms="auto",sx="center",J5="inherit",Qo="justify",ox="Change.konva",ax="2d",gm="-",Z5="left",lx="text",ux="Text",cx="top",dx="bottom",mm="middle",e3="normal",fx="px ",ou=" ",hx="right",ym="rtl",px="word",gx="char",vm="none",hh="…",t3=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],mx=t3.length;function yx(t){return t.split(",").map(e=>{e=e.trim();const n=e.indexOf(" ")>=0,r=e.indexOf('"')>=0||e.indexOf("'")>=0;return n&&!r&&(e=`"${e}"`),e}).join(", ")}let au;function ph(){return au||(au=x0.Util.createCanvasElement().getContext(ax),au)}function vx(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function _x(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Sx(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let ct=class extends rx.Shape{constructor(e){super(Sx(e)),this._partialTextX=0,this._partialTextY=0;for(let n=0;n<mx;n++)this.on(t3[n]+ox,this._setTextData);this._setTextData()}_sceneFunc(e){const n=this.textArr,r=n.length;if(!this.text())return;let s=this.padding(),a=this.fontSize(),l=this.lineHeight()*a,c=this.verticalAlign(),d=this.direction(),p=0,m=this.align(),w=this.getWidth(),_=this.letterSpacing(),P=this.fill(),y=this.textDecoration(),E=y.indexOf("underline")!==-1,k=y.indexOf("line-through")!==-1,S;d=d===J5?e.direction:d;let C=l/2,g=mm;if(fh.Konva._fixTextRendering){const x=this.measureSize("M");g="alphabetic",C=(x.fontBoundingBoxAscent-x.fontBoundingBoxDescent)/2+l/2}for(d===ym&&e.setAttr("direction",d),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",g),e.setAttr("textAlign",Z5),c===mm?p=(this.getHeight()-r*l-s*2)/2:c===dx&&(p=this.getHeight()-r*l-s*2),e.translate(s,p+s),S=0;S<r;S++){let x=0,T=0;const R=n[S],M=R.text,L=R.width,b=R.lastInParagraph;if(e.save(),m===hx?x+=w-L-s*2:m===sx&&(x+=(w-L-s*2)/2),E){e.save(),e.beginPath();const F=fh.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2),B=x,W=C+T+F;e.moveTo(B,W);const X=m===Qo&&!b?w-s*2:L;e.lineTo(B+Math.round(X),W),e.lineWidth=a/15;const ie=this._getLinearGradient();e.strokeStyle=ie||P,e.stroke(),e.restore()}if(k){e.save(),e.beginPath();const F=fh.Konva._fixTextRendering?-Math.round(a/4):0;e.moveTo(x,C+T+F);const B=m===Qo&&!b?w-s*2:L;e.lineTo(x+Math.round(B),C+T+F),e.lineWidth=a/15;const W=this._getLinearGradient();e.strokeStyle=W||P,e.stroke(),e.restore()}if(d!==ym&&(_!==0||m===Qo)){const F=M.split(" ").length-1,B=Vi(M);for(let W=0;W<B.length;W++){const X=B[W];X===" "&&!b&&m===Qo&&(x+=(w-s*2-L)/F),this._partialTextX=x,this._partialTextY=C+T,this._partialText=X,e.fillStrokeShape(this),x+=this.measureSize(X).width+_}}else _!==0&&e.setAttr("letterSpacing",`${_}px`),this._partialTextX=x,this._partialTextY=C+T,this._partialText=M,e.fillStrokeShape(this);e.restore(),r>1&&(C+=l)}}_hitFunc(e){const n=this.getWidth(),r=this.getHeight();e.beginPath(),e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}setText(e){const n=x0.Util._isString(e)?e:e==null?"":e+"";return this._setAttr(lx,n),this}getWidth(){return this.attrs.width===Ms||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Ms||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return x0.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var n,r,s,a,l,c,d,p,m,w,_;let P=ph(),y=this.fontSize(),E;P.save(),P.font=this._getContextFont(),E=P.measureText(e),P.restore();const k=y/100;return{actualBoundingBoxAscent:(n=E.actualBoundingBoxAscent)!==null&&n!==void 0?n:71.58203125*k,actualBoundingBoxDescent:(r=E.actualBoundingBoxDescent)!==null&&r!==void 0?r:0,actualBoundingBoxLeft:(s=E.actualBoundingBoxLeft)!==null&&s!==void 0?s:-7.421875*k,actualBoundingBoxRight:(a=E.actualBoundingBoxRight)!==null&&a!==void 0?a:75.732421875*k,alphabeticBaseline:(l=E.alphabeticBaseline)!==null&&l!==void 0?l:0,emHeightAscent:(c=E.emHeightAscent)!==null&&c!==void 0?c:100*k,emHeightDescent:(d=E.emHeightDescent)!==null&&d!==void 0?d:-20*k,fontBoundingBoxAscent:(p=E.fontBoundingBoxAscent)!==null&&p!==void 0?p:91*k,fontBoundingBoxDescent:(m=E.fontBoundingBoxDescent)!==null&&m!==void 0?m:21*k,hangingBaseline:(w=E.hangingBaseline)!==null&&w!==void 0?w:72.80000305175781*k,ideographicBaseline:(_=E.ideographicBaseline)!==null&&_!==void 0?_:-21*k,width:E.width,height:y}}_getContextFont(){return this.fontStyle()+ou+this.fontVariant()+ou+(this.fontSize()+fx)+yx(this.fontFamily())}_addTextLine(e){this.align()===Qo&&(e=e.trim());const r=this._getTextWidth(e);return this.textArr.push({text:e,width:r,lastInParagraph:!1})}_getTextWidth(e){const n=this.letterSpacing(),r=e.length;return ph().measureText(e).width+n*r}_setTextData(){let e=this.text().split(`
56
+ `),n=+this.fontSize(),r=0,s=this.lineHeight()*n,a=this.attrs.width,l=this.attrs.height,c=a!==Ms&&a!==void 0,d=l!==Ms&&l!==void 0,p=this.padding(),m=a-p*2,w=l-p*2,_=0,P=this.wrap(),y=P!==vm,E=P!==gx&&y,k=this.ellipsis();this.textArr=[],ph().font=this._getContextFont();const S=k?this._getTextWidth(hh):0;for(let C=0,g=e.length;C<g;++C){let x=e[C],T=this._getTextWidth(x);if(c&&T>m)for(;x.length>0;){let R=0,M=Vi(x).length,L="",b=0;for(;R<M;){const F=R+M>>>1,B=Vi(x),W=B.slice(0,F+1).join(""),X=this._getTextWidth(W);(k&&d&&_+s>w?X+S:X)<=m?(R=F+1,L=W,b=X):M=F}if(L){if(E){const W=Vi(x),X=Vi(L),ie=W[X.length],ee=ie===ou||ie===gm;let ce;if(ee&&b<=m)ce=X.length;else{const ve=X.lastIndexOf(ou),G=X.lastIndexOf(gm);ce=Math.max(ve,G)+1}ce>0&&(R=ce,L=W.slice(0,R).join(""),b=this._getTextWidth(L))}if(L=L.trimRight(),this._addTextLine(L),r=Math.max(r,b),_+=s,this._shouldHandleEllipsis(_)){this._tryToAddEllipsisToLastLine();break}if(x=Vi(x).slice(R).join("").trimLeft(),x.length>0&&(T=this._getTextWidth(x),T<=m)){this._addTextLine(x),_+=s,r=Math.max(r,T);break}}else break}else this._addTextLine(x),_+=s,r=Math.max(r,T),this._shouldHandleEllipsis(_)&&C<g-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),d&&_+s>w)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(e){const n=+this.fontSize(),r=this.lineHeight()*n,s=this.attrs.height,a=s!==Ms&&s!==void 0,l=this.padding(),c=s-l*2;return!(this.wrap()!==vm)||a&&e+r>c}_tryToAddEllipsisToLastLine(){const e=this.attrs.width,n=e!==Ms&&e!==void 0,r=this.padding(),s=e-r*2,a=this.ellipsis(),l=this.textArr[this.textArr.length-1];!l||!a||(n&&(this._getTextWidth(l.text+hh)<s||(l.text=l.text.slice(0,l.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(l.text+hh))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,n=this.hasShadow();return e&&n?!0:super._useBufferCanvas()}};So.Text=ct;ct.prototype._fillFunc=vx;ct.prototype._strokeFunc=_x;ct.prototype.className=ux;ct.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];(0,ix._registerNode)(ct);Kt.Factory.overWriteSetter(ct,"width",(0,Ni.getNumberOrAutoValidator)());Kt.Factory.overWriteSetter(ct,"height",(0,Ni.getNumberOrAutoValidator)());Kt.Factory.addGetterSetter(ct,"direction",J5);Kt.Factory.addGetterSetter(ct,"fontFamily","Arial");Kt.Factory.addGetterSetter(ct,"fontSize",12,(0,Ni.getNumberValidator)());Kt.Factory.addGetterSetter(ct,"fontStyle",e3);Kt.Factory.addGetterSetter(ct,"fontVariant",e3);Kt.Factory.addGetterSetter(ct,"padding",0,(0,Ni.getNumberValidator)());Kt.Factory.addGetterSetter(ct,"align",Z5);Kt.Factory.addGetterSetter(ct,"verticalAlign",cx);Kt.Factory.addGetterSetter(ct,"lineHeight",1,(0,Ni.getNumberValidator)());Kt.Factory.addGetterSetter(ct,"wrap",px);Kt.Factory.addGetterSetter(ct,"ellipsis",!1,(0,Ni.getBooleanValidator)());Kt.Factory.addGetterSetter(ct,"letterSpacing",0,(0,Ni.getNumberValidator)());Kt.Factory.addGetterSetter(ct,"text","",(0,Ni.getStringValidator)());Kt.Factory.addGetterSetter(ct,"textDecoration","");var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0});Wc.TextPath=void 0;const gh=at,er=Pe,xx=wt,qo=vo,mh=So,n3=pe,wx=Ce,kx="",r3="normal";function i3(t){t.fillText(this.partialText,0,0)}function s3(t){t.strokeText(this.partialText,0,0)}class kt extends xx.Shape{constructor(e){super(e),this.dummyCanvas=gh.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return qo.Path.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;const n=this.pathLength;return e-1>n?null:qo.Path.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=qo.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();const n=this.textDecoration(),r=this.fill(),s=this.fontSize(),a=this.glyphInfo;n==="underline"&&e.beginPath();for(let l=0;l<a.length;l++){e.save();const c=a[l].p0;e.translate(c.x,c.y),e.rotate(a[l].rotation),this.partialText=a[l].text,e.fillStrokeShape(this),n==="underline"&&(l===0&&e.moveTo(0,s/2+1),e.lineTo(s,s/2+1)),e.restore()}n==="underline"&&(e.strokeStyle=r,e.lineWidth=s/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();const n=this.glyphInfo;if(n.length>=1){const r=n[0].p0;e.moveTo(r.x,r.y)}for(let r=0;r<n.length;r++){const s=n[r].p1;e.lineTo(s.x,s.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return gh.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return mh.Text.prototype.setText.call(this,e)}_getContextFont(){return mh.Text.prototype._getContextFont.call(this)}_getTextSize(e){const r=this.dummyCanvas.getContext("2d");r.save(),r.font=this._getContextFont();const s=r.measureText(e);return r.restore(),{width:s.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:e,height:n}=this._getTextSize(this.attrs.text);if(this.textWidth=e,this.textHeight=n,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),s=this.align(),a=this.kerningFunc(),l=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let c=0;s==="center"&&(c=Math.max(0,this.pathLength/2-l/2)),s==="right"&&(c=Math.max(0,this.pathLength-l));const d=(0,mh.stringToArray)(this.text());let p=c;for(let m=0;m<d.length;m++){const w=this._getPointAtLength(p);if(!w)return;let _=this._getTextSize(d[m]).width+r;if(d[m]===" "&&s==="justify"){const C=this.text().split(" ").length-1;_+=(this.pathLength-l)/C}const P=this._getPointAtLength(p+_);if(!P)return;const y=qo.Path.getLineLength(w.x,w.y,P.x,P.y);let E=0;if(a)try{E=a(d[m-1],d[m])*this.fontSize()}catch{E=0}w.x+=E,P.x+=E,this.textWidth+=E;const k=qo.Path.getPointOnLine(E+y/2,w.x,w.y,P.x,P.y),S=Math.atan2(P.y-w.y,P.x-w.x);this.glyphInfo.push({transposeX:k.x,transposeY:k.y,text:d[m],rotation:S,p0:w,p1:P}),p+=_}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const e=[];this.glyphInfo.forEach(function(p){e.push(p.p0.x),e.push(p.p0.y),e.push(p.p1.x),e.push(p.p1.y)});let n=e[0]||0,r=e[0]||0,s=e[1]||0,a=e[1]||0,l,c;for(let p=0;p<e.length/2;p++)l=e[p*2],c=e[p*2+1],n=Math.min(n,l),r=Math.max(r,l),s=Math.min(s,c),a=Math.max(a,c);const d=this.fontSize();return{x:n-d/2,y:s-d/2,width:r-n+d,height:a-s+d}}destroy(){return gh.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}Wc.TextPath=kt;kt.prototype._fillFunc=i3;kt.prototype._strokeFunc=s3;kt.prototype._fillFuncHit=i3;kt.prototype._strokeFuncHit=s3;kt.prototype.className="TextPath";kt.prototype._attrsAffectingSize=["text","fontSize","data"];(0,wx._registerNode)(kt);er.Factory.addGetterSetter(kt,"data");er.Factory.addGetterSetter(kt,"fontFamily","Arial");er.Factory.addGetterSetter(kt,"fontSize",12,(0,n3.getNumberValidator)());er.Factory.addGetterSetter(kt,"fontStyle",r3);er.Factory.addGetterSetter(kt,"align","left");er.Factory.addGetterSetter(kt,"letterSpacing",0,(0,n3.getNumberValidator)());er.Factory.addGetterSetter(kt,"textBaseline","middle");er.Factory.addGetterSetter(kt,"fontVariant",r3);er.Factory.addGetterSetter(kt,"text",kx);er.Factory.addGetterSetter(kt,"textDecoration","");er.Factory.addGetterSetter(kt,"kerningFunc",void 0);var Kc={};Object.defineProperty(Kc,"__esModule",{value:!0});Kc.Transformer=void 0;const Ue=at,be=Pe,_m=et,Cx=wt,Ex=Ya,Sm=mo,Wn=Ce,Ti=pe,Px=Ce,o3="tr-konva",Nx=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${o3}`).join(" "),xm="nodesRect",Tx=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],Rx={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},Lx="ontouchstart"in Wn.Konva._global;function Ax(t,e,n){if(t==="rotater")return n;e+=Ue.Util.degToRad(Rx[t]||0);const r=(Ue.Util.radToDeg(e)%360+360)%360;return Ue.Util._inRange(r,315+22.5,360)||Ue.Util._inRange(r,0,22.5)?"ns-resize":Ue.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":Ue.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":Ue.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":Ue.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":Ue.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":Ue.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":Ue.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(Ue.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}const tc=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function Fx(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function a3(t,e,n){const r=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),s=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:r,y:s}}function Mx(t,e){const n=Fx(t);return a3(t,e,n)}function Ox(t,e,n){let r=e;for(let s=0;s<t.length;s++){const a=Wn.Konva.getAngle(t[s]),l=Math.abs(a-e)%(Math.PI*2);Math.min(l,Math.PI*2-l)<n&&(r=a)}return r}let w0=0,Le=class extends Sm.Group{constructor(e){super(e),this._movingAnchorName=null,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(Nx,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Ue.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return o3+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const n=e.filter(s=>s.isAncestorOf(this)?(Ue.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=e=n,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(s=>{const a=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(s._attrsAffectingSize.length){const l=s._attrsAffectingSize.map(c=>c+"Change."+this._getEventNamespace()).join(" ");s.on(l,a)}s.on(Tx.map(l=>l+`.${this._getEventNamespace()}`).join(" "),a),s.on(`absoluteTransformChange.${this._getEventNamespace()}`,a),this._proxyDrag(s)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let n;e.on(`dragstart.${this._getEventNamespace()}`,r=>{n=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(r,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const s=e.getAbsolutePosition(),a=s.x-n.x,l=s.y-n.y;this.nodes().forEach(c=>{if(c===e||c.isDragging())return;const d=c.getAbsolutePosition();c.setAbsolutePosition({x:d.x+a,y:d.y+l}),c.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(xm),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(xm,this.__getNodeRect)}__getNodeShape(e,n=this.rotation(),r){const s=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=e.getAbsoluteScale(r),l=e.getAbsolutePosition(r),c=s.x*a.x-e.offsetX()*a.x,d=s.y*a.y-e.offsetY()*a.y,p=(Wn.Konva.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),m={x:l.x+c*Math.cos(p)+d*Math.sin(-p),y:l.y+d*Math.cos(p)+c*Math.sin(p),width:s.width*a.x,height:s.height*a.y,rotation:p};return a3(m,-Wn.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const n=[];this.nodes().map(p=>{const m=p.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),w=[{x:m.x,y:m.y},{x:m.x+m.width,y:m.y},{x:m.x+m.width,y:m.y+m.height},{x:m.x,y:m.y+m.height}],_=p.getAbsoluteTransform();w.forEach(function(P){const y=_.point(P);n.push(y)})});const r=new Ue.Transform;r.rotate(-Wn.Konva.getAngle(this.rotation()));let s=1/0,a=1/0,l=-1/0,c=-1/0;n.forEach(function(p){const m=r.point(p);s===void 0&&(s=l=m.x,a=c=m.y),s=Math.min(s,m.x),a=Math.min(a,m.y),l=Math.max(l,m.x),c=Math.max(c,m.y)}),r.invert();const d=r.point({x:s,y:a});return{x:d.x,y:d.y,width:l-s,height:c-a,rotation:Wn.Konva.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(),tc.forEach(e=>{this._createAnchor(e)}),this._createAnchor("rotater")}_createAnchor(e){const n=new Ex.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:Lx?10:"auto"}),r=this;n.on("mousedown touchstart",function(s){r._handleMouseDown(s)}),n.on("dragstart",s=>{n.stopDrag(),s.cancelBubble=!0}),n.on("dragend",s=>{s.cancelBubble=!0}),n.on("mouseenter",()=>{const s=Wn.Konva.getAngle(this.rotation()),a=this.rotateAnchorCursor(),l=Ax(e,s,a);n.getStage().content&&(n.getStage().content.style.cursor=l),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){const e=new Cx.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(n,r){const s=r.getParent(),a=s.padding();n.beginPath(),n.rect(-a,-a,r.width()+a*2,r.height()+a*2),n.moveTo(r.width()/2,-a),s.rotateEnabled()&&s.rotateLineVisible()&&n.lineTo(r.width()/2,-s.rotateAnchorOffset()*Ue.Util._sign(r.height())-a),n.fillStrokeShape(r)},hitFunc:(n,r)=>{if(!this.shouldOverdrawWholeArea())return;const s=this.padding();n.beginPath(),n.rect(-s,-s,r.width()+s*2,r.height()+s*2),n.fillStrokeShape(r)}});this.add(e),this._proxyDrag(e),e.on("dragstart",n=>{n.cancelBubble=!0}),e.on("dragmove",n=>{n.cancelBubble=!0}),e.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(e){if(this._transforming)return;this._movingAnchorName=e.target.name().split(" ")[0];const n=this._getNodeRect(),r=n.width,s=n.height,a=Math.sqrt(Math.pow(r,2)+Math.pow(s,2));this.sin=Math.abs(s/a),this.cos=Math.abs(r/a),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;const l=e.target.getAbsolutePosition(),c=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:c.x-l.x,y:c.y-l.y},w0++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(d=>{d._fire("transformstart",{evt:e.evt,target:d})})}_handleMouseMove(e){let n,r,s;const a=this.findOne("."+this._movingAnchorName),l=a.getStage();l.setPointersPositions(e);const c=l.getPointerPosition();let d={x:c.x-this._anchorDragOffset.x,y:c.y-this._anchorDragOffset.y};const p=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(d=this.anchorDragBoundFunc()(p,d,e)),a.setAbsolutePosition(d);const m=a.getAbsolutePosition();if(p.x===m.x&&p.y===m.y)return;if(this._movingAnchorName==="rotater"){const C=this._getNodeRect();n=a.x()-C.width/2,r=-a.y()+C.height/2;let g=Math.atan2(-r,n)+Math.PI/2;C.height<0&&(g-=Math.PI);const T=Wn.Konva.getAngle(this.rotation())+g,R=Wn.Konva.getAngle(this.rotationSnapTolerance()),L=Ox(this.rotationSnaps(),T,R)-C.rotation,b=Mx(C,L);this._fitNodesInto(b,e);return}const w=this.shiftBehavior();let _;w==="inverted"?_=this.keepRatio()&&!e.shiftKey:w==="none"?_=this.keepRatio():_=this.keepRatio()||e.shiftKey;let P=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(_){const C=P?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};s=Math.sqrt(Math.pow(C.x-a.x(),2)+Math.pow(C.y-a.y(),2));const g=this.findOne(".top-left").x()>C.x?-1:1,x=this.findOne(".top-left").y()>C.y?-1:1;n=s*this.cos*g,r=s*this.sin*x,this.findOne(".top-left").x(C.x-n),this.findOne(".top-left").y(C.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(a.y());else if(this._movingAnchorName==="top-right"){if(_){const C=P?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};s=Math.sqrt(Math.pow(a.x()-C.x,2)+Math.pow(C.y-a.y(),2));const g=this.findOne(".top-right").x()<C.x?-1:1,x=this.findOne(".top-right").y()>C.y?-1:1;n=s*this.cos*g,r=s*this.sin*x,this.findOne(".top-right").x(C.x+n),this.findOne(".top-right").y(C.y-r)}var y=a.position();this.findOne(".top-left").y(y.y),this.findOne(".bottom-right").x(y.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(a.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(a.x());else if(this._movingAnchorName==="bottom-left"){if(_){const C=P?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};s=Math.sqrt(Math.pow(C.x-a.x(),2)+Math.pow(a.y()-C.y,2));const g=C.x<a.x()?-1:1,x=a.y()<C.y?-1:1;n=s*this.cos*g,r=s*this.sin*x,a.x(C.x-n),a.y(C.y+r)}y=a.position(),this.findOne(".top-left").x(y.x),this.findOne(".bottom-right").y(y.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(a.y());else if(this._movingAnchorName==="bottom-right"){if(_){const C=P?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};s=Math.sqrt(Math.pow(a.x()-C.x,2)+Math.pow(a.y()-C.y,2));const g=this.findOne(".bottom-right").x()<C.x?-1:1,x=this.findOne(".bottom-right").y()<C.y?-1:1;n=s*this.cos*g,r=s*this.sin*x,this.findOne(".bottom-right").x(C.x+n),this.findOne(".bottom-right").y(C.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(P=this.centeredScaling()||e.altKey,P){const C=this.findOne(".top-left"),g=this.findOne(".bottom-right"),x=C.x(),T=C.y(),R=this.getWidth()-g.x(),M=this.getHeight()-g.y();g.move({x:-x,y:-T}),C.move({x:R,y:M})}const E=this.findOne(".top-left").getAbsolutePosition();n=E.x,r=E.y;const k=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),S=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:k,height:S,rotation:Wn.Konva.getAngle(this.rotation())},e)}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){var n;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));const r=this.getNode();w0--,this._fire("transformend",{evt:e,target:r}),(n=this.getLayer())===null||n===void 0||n.batchDraw(),r&&this._nodes.forEach(s=>{var a;s._fire("transformend",{evt:e,target:s}),(a=s.getLayer())===null||a===void 0||a.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,n){const r=this._getNodeRect(),s=1;if(Ue.Util._inRange(e.width,-this.padding()*2-s,s)){this.update();return}if(Ue.Util._inRange(e.height,-this.padding()*2-s,s)){this.update();return}const a=new Ue.Transform;if(a.rotate(Wn.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const _=a.point({x:-this.padding()*2,y:0});e.x+=_.x,e.y+=_.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const _=a.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,e.width+=this.padding()*2}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const _=a.point({x:0,y:-this.padding()*2});e.x+=_.x,e.y+=_.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,e.height+=this.padding()*2}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const _=a.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,e.height+=this.padding()*2}if(this.boundBoxFunc()){const _=this.boundBoxFunc()(r,e);_?e=_:Ue.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const l=1e7,c=new Ue.Transform;c.translate(r.x,r.y),c.rotate(r.rotation),c.scale(r.width/l,r.height/l);const d=new Ue.Transform,p=e.width/l,m=e.height/l;this.flipEnabled()===!1?(d.translate(e.x,e.y),d.rotate(e.rotation),d.translate(e.width<0?e.width:0,e.height<0?e.height:0),d.scale(Math.abs(p),Math.abs(m))):(d.translate(e.x,e.y),d.rotate(e.rotation),d.scale(p,m));const w=d.multiply(c.invert());this._nodes.forEach(_=>{var P;const y=_.getParent().getAbsoluteTransform(),E=_.getTransform().copy();E.translate(_.offsetX(),_.offsetY());const k=new Ue.Transform;k.multiply(y.copy().invert()).multiply(w).multiply(y).multiply(E);const S=k.decompose();_.setAttrs(S),(P=_.getLayer())===null||P===void 0||P.batchDraw()}),this.rotation(Ue.Util._getRotation(e.rotation)),this._nodes.forEach(_=>{this._fire("transform",{evt:n,target:_}),_._fire("transform",{evt:n,target:_})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,n){this.findOne(e).setAttrs(n)}update(){var e;const n=this._getNodeRect();this.rotation(Ue.Util._getRotation(n.rotation));const r=n.width,s=n.height,a=this.enabledAnchors(),l=this.resizeEnabled(),c=this.padding(),d=this.anchorSize(),p=this.find("._anchor");p.forEach(w=>{w.setAttrs({width:d,height:d,offsetX:d/2,offsetY:d/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:d/2+c,offsetY:d/2+c,visible:l&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:d/2+c,visible:l&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:d/2-c,offsetY:d/2+c,visible:l&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:s/2,offsetX:d/2+c,visible:l&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:s/2,offsetX:d/2-c,visible:l&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:s,offsetX:d/2+c,offsetY:d/2-c,visible:l&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:s,offsetY:d/2-c,visible:l&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:s,offsetX:d/2-c,offsetY:d/2-c,visible:l&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*Ue.Util._sign(s)-c,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:s,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const m=this.anchorStyleFunc();m&&p.forEach(w=>{m(w)}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Sm.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return _m.Node.prototype.toObject.call(this)}clone(e){return _m.Node.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};Kc.Transformer=Le;Le.isTransforming=()=>w0>0;function Dx(t){return t instanceof Array||Ue.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){tc.indexOf(e)===-1&&Ue.Util.warn("Unknown anchor name: "+e+". Available names are: "+tc.join(", "))}),t||[]}Le.prototype.className="Transformer";(0,Px._registerNode)(Le);be.Factory.addGetterSetter(Le,"enabledAnchors",tc,Dx);be.Factory.addGetterSetter(Le,"flipEnabled",!0,(0,Ti.getBooleanValidator)());be.Factory.addGetterSetter(Le,"resizeEnabled",!0);be.Factory.addGetterSetter(Le,"anchorSize",10,(0,Ti.getNumberValidator)());be.Factory.addGetterSetter(Le,"rotateEnabled",!0);be.Factory.addGetterSetter(Le,"rotateLineVisible",!0);be.Factory.addGetterSetter(Le,"rotationSnaps",[]);be.Factory.addGetterSetter(Le,"rotateAnchorOffset",50,(0,Ti.getNumberValidator)());be.Factory.addGetterSetter(Le,"rotateAnchorCursor","crosshair");be.Factory.addGetterSetter(Le,"rotationSnapTolerance",5,(0,Ti.getNumberValidator)());be.Factory.addGetterSetter(Le,"borderEnabled",!0);be.Factory.addGetterSetter(Le,"anchorStroke","rgb(0, 161, 255)");be.Factory.addGetterSetter(Le,"anchorStrokeWidth",1,(0,Ti.getNumberValidator)());be.Factory.addGetterSetter(Le,"anchorFill","white");be.Factory.addGetterSetter(Le,"anchorCornerRadius",0,(0,Ti.getNumberValidator)());be.Factory.addGetterSetter(Le,"borderStroke","rgb(0, 161, 255)");be.Factory.addGetterSetter(Le,"borderStrokeWidth",1,(0,Ti.getNumberValidator)());be.Factory.addGetterSetter(Le,"borderDash");be.Factory.addGetterSetter(Le,"keepRatio",!0);be.Factory.addGetterSetter(Le,"shiftBehavior","default");be.Factory.addGetterSetter(Le,"centeredScaling",!1);be.Factory.addGetterSetter(Le,"ignoreStroke",!1);be.Factory.addGetterSetter(Le,"padding",0,(0,Ti.getNumberValidator)());be.Factory.addGetterSetter(Le,"nodes");be.Factory.addGetterSetter(Le,"node");be.Factory.addGetterSetter(Le,"boundBoxFunc");be.Factory.addGetterSetter(Le,"anchorDragBoundFunc");be.Factory.addGetterSetter(Le,"anchorStyleFunc");be.Factory.addGetterSetter(Le,"shouldOverdrawWholeArea",!1);be.Factory.addGetterSetter(Le,"useSingleNodeRotation",!0);be.Factory.backCompat(Le,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var Yc={};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.Wedge=void 0;const Xc=Pe,Ix=wt,bx=Ce,l3=pe,jx=Ce;class Hr extends Ix.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,bx.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}Yc.Wedge=Hr;Hr.prototype.className="Wedge";Hr.prototype._centroid=!0;Hr.prototype._attrsAffectingSize=["radius"];(0,jx._registerNode)(Hr);Xc.Factory.addGetterSetter(Hr,"radius",0,(0,l3.getNumberValidator)());Xc.Factory.addGetterSetter(Hr,"angle",0,(0,l3.getNumberValidator)());Xc.Factory.addGetterSetter(Hr,"clockwise",!1);Xc.Factory.backCompat(Hr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var Qc={};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.Blur=void 0;const wm=Pe,zx=et,Ux=pe;function km(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const Bx=[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],Gx=[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 Hx(t,e){const n=t.data,r=t.width,s=t.height;let a,l,c,d,p,m,w,_,P,y,E,k,S,C,g,x,T,R,M,L;const b=e+e+1,F=r-1,B=s-1,W=e+1,X=W*(W+1)/2,ie=new km,ee=Bx[e],ce=Gx[e];let ve=null,G=ie,Z=null,Q=null;for(let q=1;q<b;q++)G=G.next=new km,q===W&&(ve=G);G.next=ie,c=l=0;for(let q=0;q<s;q++){k=S=C=g=d=p=m=w=0,_=W*(x=n[l]),P=W*(T=n[l+1]),y=W*(R=n[l+2]),E=W*(M=n[l+3]),d+=X*x,p+=X*T,m+=X*R,w+=X*M,G=ie;for(let te=0;te<W;te++)G.r=x,G.g=T,G.b=R,G.a=M,G=G.next;for(let te=1;te<W;te++)a=l+((F<te?F:te)<<2),d+=(G.r=x=n[a])*(L=W-te),p+=(G.g=T=n[a+1])*L,m+=(G.b=R=n[a+2])*L,w+=(G.a=M=n[a+3])*L,k+=x,S+=T,C+=R,g+=M,G=G.next;Z=ie,Q=ve;for(let te=0;te<r;te++)n[l+3]=M=w*ee>>ce,M!==0?(M=255/M,n[l]=(d*ee>>ce)*M,n[l+1]=(p*ee>>ce)*M,n[l+2]=(m*ee>>ce)*M):n[l]=n[l+1]=n[l+2]=0,d-=_,p-=P,m-=y,w-=E,_-=Z.r,P-=Z.g,y-=Z.b,E-=Z.a,a=c+((a=te+e+1)<F?a:F)<<2,k+=Z.r=n[a],S+=Z.g=n[a+1],C+=Z.b=n[a+2],g+=Z.a=n[a+3],d+=k,p+=S,m+=C,w+=g,Z=Z.next,_+=x=Q.r,P+=T=Q.g,y+=R=Q.b,E+=M=Q.a,k-=x,S-=T,C-=R,g-=M,Q=Q.next,l+=4;c+=r}for(let q=0;q<r;q++){S=C=g=k=p=m=w=d=0,l=q<<2,_=W*(x=n[l]),P=W*(T=n[l+1]),y=W*(R=n[l+2]),E=W*(M=n[l+3]),d+=X*x,p+=X*T,m+=X*R,w+=X*M,G=ie;for(let we=0;we<W;we++)G.r=x,G.g=T,G.b=R,G.a=M,G=G.next;let te=r;for(let we=1;we<=e;we++)l=te+q<<2,d+=(G.r=x=n[l])*(L=W-we),p+=(G.g=T=n[l+1])*L,m+=(G.b=R=n[l+2])*L,w+=(G.a=M=n[l+3])*L,k+=x,S+=T,C+=R,g+=M,G=G.next,we<B&&(te+=r);l=q,Z=ie,Q=ve;for(let we=0;we<s;we++)a=l<<2,n[a+3]=M=w*ee>>ce,M>0?(M=255/M,n[a]=(d*ee>>ce)*M,n[a+1]=(p*ee>>ce)*M,n[a+2]=(m*ee>>ce)*M):n[a]=n[a+1]=n[a+2]=0,d-=_,p-=P,m-=y,w-=E,_-=Z.r,P-=Z.g,y-=Z.b,E-=Z.a,a=q+((a=we+W)<B?a:B)*r<<2,d+=k+=Z.r=n[a],p+=S+=Z.g=n[a+1],m+=C+=Z.b=n[a+2],w+=g+=Z.a=n[a+3],Z=Z.next,_+=x=Q.r,P+=T=Q.g,y+=R=Q.b,E+=M=Q.a,k-=x,S-=T,C-=R,g-=M,Q=Q.next,l+=r}}const Vx=function(e){const n=Math.round(this.blurRadius());n>0&&Hx(e,n)};Qc.Blur=Vx;wm.Factory.addGetterSetter(zx.Node,"blurRadius",0,(0,Ux.getNumberValidator)(),wm.Factory.afterSetFilter);var qc={};Object.defineProperty(qc,"__esModule",{value:!0});qc.Brighten=void 0;const Cm=Pe,Wx=et,Kx=pe,Yx=function(t){const e=this.brightness()*255,n=t.data,r=n.length;for(let s=0;s<r;s+=4)n[s]+=e,n[s+1]+=e,n[s+2]+=e};qc.Brighten=Yx;Cm.Factory.addGetterSetter(Wx.Node,"brightness",0,(0,Kx.getNumberValidator)(),Cm.Factory.afterSetFilter);var $c={};Object.defineProperty($c,"__esModule",{value:!0});$c.Contrast=void 0;const Em=Pe,Xx=et,Qx=pe,qx=function(t){const e=Math.pow((this.contrast()+100)/100,2),n=t.data,r=n.length;let s=150,a=150,l=150;for(let c=0;c<r;c+=4)s=n[c],a=n[c+1],l=n[c+2],s/=255,s-=.5,s*=e,s+=.5,s*=255,a/=255,a-=.5,a*=e,a+=.5,a*=255,l/=255,l-=.5,l*=e,l+=.5,l*=255,s=s<0?0:s>255?255:s,a=a<0?0:a>255?255:a,l=l<0?0:l>255?255:l,n[c]=s,n[c+1]=a,n[c+2]=l};$c.Contrast=qx;Em.Factory.addGetterSetter(Xx.Node,"contrast",0,(0,Qx.getNumberValidator)(),Em.Factory.afterSetFilter);var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.Emboss=void 0;const _i=Pe,Zc=et,$x=at,u3=pe,Jx=function(t){const e=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),s=this.embossBlend(),a=t.data,l=t.width,c=t.height,d=l*4;let p=0,m=0,w=c;switch(r){case"top-left":p=-1,m=-1;break;case"top":p=-1,m=0;break;case"top-right":p=-1,m=1;break;case"right":p=0,m=1;break;case"bottom-right":p=1,m=1;break;case"bottom":p=1,m=0;break;case"bottom-left":p=1,m=-1;break;case"left":p=0,m=-1;break;default:$x.Util.error("Unknown emboss direction: "+r)}do{const _=(w-1)*d;let P=p;w+P<1&&(P=0),w+P>c&&(P=0);const y=(w-1+P)*l*4;let E=l;do{const k=_+(E-1)*4;let S=m;E+S<1&&(S=0),E+S>l&&(S=0);const C=y+(E-1+S)*4,g=a[k]-a[C],x=a[k+1]-a[C+1],T=a[k+2]-a[C+2];let R=g;const M=R>0?R:-R,L=x>0?x:-x,b=T>0?T:-T;if(L>M&&(R=x),b>M&&(R=T),R*=e,s){const F=a[k]+R,B=a[k+1]+R,W=a[k+2]+R;a[k]=F>255?255:F<0?0:F,a[k+1]=B>255?255:B<0?0:B,a[k+2]=W>255?255:W<0?0:W}else{let F=n-R;F<0?F=0:F>255&&(F=255),a[k]=a[k+1]=a[k+2]=F}}while(--E)}while(--w)};Jc.Emboss=Jx;_i.Factory.addGetterSetter(Zc.Node,"embossStrength",.5,(0,u3.getNumberValidator)(),_i.Factory.afterSetFilter);_i.Factory.addGetterSetter(Zc.Node,"embossWhiteLevel",.5,(0,u3.getNumberValidator)(),_i.Factory.afterSetFilter);_i.Factory.addGetterSetter(Zc.Node,"embossDirection","top-left",void 0,_i.Factory.afterSetFilter);_i.Factory.addGetterSetter(Zc.Node,"embossBlend",!1,void 0,_i.Factory.afterSetFilter);var ed={};Object.defineProperty(ed,"__esModule",{value:!0});ed.Enhance=void 0;const Pm=Pe,Zx=et,ew=pe;function yh(t,e,n,r,s){const a=n-e,l=s-r;if(a===0)return r+l/2;if(l===0)return r;let c=(t-e)/a;return c=l*c+r,c}const tw=function(t){const e=t.data,n=e.length;let r=e[0],s=r,a,l=e[1],c=l,d,p=e[2],m=p,w;const _=this.enhance();if(_===0)return;for(let g=0;g<n;g+=4)a=e[g+0],a<r?r=a:a>s&&(s=a),d=e[g+1],d<l?l=d:d>c&&(c=d),w=e[g+2],w<p?p=w:w>m&&(m=w);s===r&&(s=255,r=0),c===l&&(c=255,l=0),m===p&&(m=255,p=0);let P,y,E,k,S,C;if(_>0)P=s+_*(255-s),y=r-_*(r-0),E=c+_*(255-c),k=l-_*(l-0),S=m+_*(255-m),C=p-_*(p-0);else{const g=(s+r)*.5;P=s+_*(s-g),y=r+_*(r-g);const x=(c+l)*.5;E=c+_*(c-x),k=l+_*(l-x);const T=(m+p)*.5;S=m+_*(m-T),C=p+_*(p-T)}for(let g=0;g<n;g+=4)e[g+0]=yh(e[g+0],r,s,y,P),e[g+1]=yh(e[g+1],l,c,k,E),e[g+2]=yh(e[g+2],p,m,C,S)};ed.Enhance=tw;Pm.Factory.addGetterSetter(Zx.Node,"enhance",0,(0,ew.getNumberValidator)(),Pm.Factory.afterSetFilter);var td={};Object.defineProperty(td,"__esModule",{value:!0});td.Grayscale=void 0;const nw=function(t){const e=t.data,n=e.length;for(let r=0;r<n;r+=4){const s=.34*e[r]+.5*e[r+1]+.16*e[r+2];e[r]=s,e[r+1]=s,e[r+2]=s}};td.Grayscale=nw;var nd={};Object.defineProperty(nd,"__esModule",{value:!0});nd.HSL=void 0;const ao=Pe,M1=et,O1=pe;ao.Factory.addGetterSetter(M1.Node,"hue",0,(0,O1.getNumberValidator)(),ao.Factory.afterSetFilter);ao.Factory.addGetterSetter(M1.Node,"saturation",0,(0,O1.getNumberValidator)(),ao.Factory.afterSetFilter);ao.Factory.addGetterSetter(M1.Node,"luminance",0,(0,O1.getNumberValidator)(),ao.Factory.afterSetFilter);const rw=function(t){const e=t.data,n=e.length,r=1,s=Math.pow(2,this.saturation()),a=Math.abs(this.hue()+360)%360,l=this.luminance()*127,c=r*s*Math.cos(a*Math.PI/180),d=r*s*Math.sin(a*Math.PI/180),p=.299*r+.701*c+.167*d,m=.587*r-.587*c+.33*d,w=.114*r-.114*c-.497*d,_=.299*r-.299*c-.328*d,P=.587*r+.413*c+.035*d,y=.114*r-.114*c+.293*d,E=.299*r-.3*c+1.25*d,k=.587*r-.586*c-1.05*d,S=.114*r+.886*c-.2*d;let C,g,x,T;for(let R=0;R<n;R+=4)C=e[R+0],g=e[R+1],x=e[R+2],T=e[R+3],e[R+0]=p*C+m*g+w*x+l,e[R+1]=_*C+P*g+y*x+l,e[R+2]=E*C+k*g+S*x+l,e[R+3]=T};nd.HSL=rw;var rd={};Object.defineProperty(rd,"__esModule",{value:!0});rd.HSV=void 0;const lo=Pe,D1=et,I1=pe,iw=function(t){const e=t.data,n=e.length,r=Math.pow(2,this.value()),s=Math.pow(2,this.saturation()),a=Math.abs(this.hue()+360)%360,l=r*s*Math.cos(a*Math.PI/180),c=r*s*Math.sin(a*Math.PI/180),d=.299*r+.701*l+.167*c,p=.587*r-.587*l+.33*c,m=.114*r-.114*l-.497*c,w=.299*r-.299*l-.328*c,_=.587*r+.413*l+.035*c,P=.114*r-.114*l+.293*c,y=.299*r-.3*l+1.25*c,E=.587*r-.586*l-1.05*c,k=.114*r+.886*l-.2*c;for(let S=0;S<n;S+=4){const C=e[S+0],g=e[S+1],x=e[S+2],T=e[S+3];e[S+0]=d*C+p*g+m*x,e[S+1]=w*C+_*g+P*x,e[S+2]=y*C+E*g+k*x,e[S+3]=T}};rd.HSV=iw;lo.Factory.addGetterSetter(D1.Node,"hue",0,(0,I1.getNumberValidator)(),lo.Factory.afterSetFilter);lo.Factory.addGetterSetter(D1.Node,"saturation",0,(0,I1.getNumberValidator)(),lo.Factory.afterSetFilter);lo.Factory.addGetterSetter(D1.Node,"value",0,(0,I1.getNumberValidator)(),lo.Factory.afterSetFilter);var id={};Object.defineProperty(id,"__esModule",{value:!0});id.Invert=void 0;const sw=function(t){const e=t.data,n=e.length;for(let r=0;r<n;r+=4)e[r]=255-e[r],e[r+1]=255-e[r+1],e[r+2]=255-e[r+2]};id.Invert=sw;var sd={};Object.defineProperty(sd,"__esModule",{value:!0});sd.Kaleidoscope=void 0;const nc=Pe,c3=et,Nm=at,d3=pe,ow=function(t,e,n){const r=t.data,s=e.data,a=t.width,l=t.height,c=n.polarCenterX||a/2,d=n.polarCenterY||l/2;let p=Math.sqrt(c*c+d*d),m=a-c,w=l-d;const _=Math.sqrt(m*m+w*w);p=_>p?_:p;const P=l,y=a,E=360/y*Math.PI/180;for(let k=0;k<y;k+=1){const S=Math.sin(k*E),C=Math.cos(k*E);for(let g=0;g<P;g+=1){m=Math.floor(c+p*g/P*C),w=Math.floor(d+p*g/P*S);let x=(w*a+m)*4;const T=r[x+0],R=r[x+1],M=r[x+2],L=r[x+3];x=(k+g*a)*4,s[x+0]=T,s[x+1]=R,s[x+2]=M,s[x+3]=L}}},aw=function(t,e,n){const r=t.data,s=e.data,a=t.width,l=t.height,c=n.polarCenterX||a/2,d=n.polarCenterY||l/2;let p=Math.sqrt(c*c+d*d),m=a-c,w=l-d;const _=Math.sqrt(m*m+w*w);p=_>p?_:p;const P=l,y=a,E=0;let k,S;for(m=0;m<a;m+=1)for(w=0;w<l;w+=1){const C=m-c,g=w-d,x=Math.sqrt(C*C+g*g)*P/p;let T=(Math.atan2(g,C)*180/Math.PI+360+E)%360;T=T*y/360,k=Math.floor(T),S=Math.floor(x);let R=(S*a+k)*4;const M=r[R+0],L=r[R+1],b=r[R+2],F=r[R+3];R=(w*a+m)*4,s[R+0]=M,s[R+1]=L,s[R+2]=b,s[R+3]=F}},lw=function(t){const e=t.width,n=t.height;let r,s,a,l,c,d,p,m,w,_,P=Math.round(this.kaleidoscopePower());const y=Math.round(this.kaleidoscopeAngle()),E=Math.floor(e*(y%360)/360);if(P<1)return;const k=Nm.Util.createCanvasElement();k.width=e,k.height=n;const S=k.getContext("2d").getImageData(0,0,e,n);Nm.Util.releaseCanvas(k),ow(t,S,{polarCenterX:e/2,polarCenterY:n/2});let C=e/Math.pow(2,P);for(;C<=8;)C=C*2,P-=1;C=Math.ceil(C);let g=C,x=0,T=g,R=1;for(E+C>e&&(x=g,T=0,R=-1),s=0;s<n;s+=1)for(r=x;r!==T;r+=R)a=Math.round(r+E)%e,w=(e*s+a)*4,c=S.data[w+0],d=S.data[w+1],p=S.data[w+2],m=S.data[w+3],_=(e*s+r)*4,S.data[_+0]=c,S.data[_+1]=d,S.data[_+2]=p,S.data[_+3]=m;for(s=0;s<n;s+=1)for(g=Math.floor(C),l=0;l<P;l+=1){for(r=0;r<g+1;r+=1)w=(e*s+r)*4,c=S.data[w+0],d=S.data[w+1],p=S.data[w+2],m=S.data[w+3],_=(e*s+g*2-r-1)*4,S.data[_+0]=c,S.data[_+1]=d,S.data[_+2]=p,S.data[_+3]=m;g*=2}aw(S,t,{})};sd.Kaleidoscope=lw;nc.Factory.addGetterSetter(c3.Node,"kaleidoscopePower",2,(0,d3.getNumberValidator)(),nc.Factory.afterSetFilter);nc.Factory.addGetterSetter(c3.Node,"kaleidoscopeAngle",0,(0,d3.getNumberValidator)(),nc.Factory.afterSetFilter);var od={};Object.defineProperty(od,"__esModule",{value:!0});od.Mask=void 0;const Tm=Pe,uw=et,cw=pe;function lu(t,e,n){let r=(n*t.width+e)*4;const s=[];return s.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),s}function $o(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function dw(t){const e=[0,0,0];for(let n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function fw(t,e){const n=lu(t,0,0),r=lu(t,t.width-1,0),s=lu(t,0,t.height-1),a=lu(t,t.width-1,t.height-1),l=e||10;if($o(n,r)<l&&$o(r,a)<l&&$o(a,s)<l&&$o(s,n)<l){const c=dw([r,n,a,s]),d=[];for(let p=0;p<t.width*t.height;p++){const m=$o(c,[t.data[p*4],t.data[p*4+1],t.data[p*4+2]]);d[p]=m<l?0:255}return d}}function hw(t,e){for(let n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function pw(t,e,n){const r=[1,1,1,1,0,1,1,1,1],s=Math.round(Math.sqrt(r.length)),a=Math.floor(s/2),l=[];for(let c=0;c<n;c++)for(let d=0;d<e;d++){const p=c*e+d;let m=0;for(let w=0;w<s;w++)for(let _=0;_<s;_++){const P=c+w-a,y=d+_-a;if(P>=0&&P<n&&y>=0&&y<e){const E=P*e+y,k=r[w*s+_];m+=t[E]*k}}l[p]=m===255*8?255:0}return l}function gw(t,e,n){const r=[1,1,1,1,1,1,1,1,1],s=Math.round(Math.sqrt(r.length)),a=Math.floor(s/2),l=[];for(let c=0;c<n;c++)for(let d=0;d<e;d++){const p=c*e+d;let m=0;for(let w=0;w<s;w++)for(let _=0;_<s;_++){const P=c+w-a,y=d+_-a;if(P>=0&&P<n&&y>=0&&y<e){const E=P*e+y,k=r[w*s+_];m+=t[E]*k}}l[p]=m>=255*4?255:0}return l}function mw(t,e,n){const r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],s=Math.round(Math.sqrt(r.length)),a=Math.floor(s/2),l=[];for(let c=0;c<n;c++)for(let d=0;d<e;d++){const p=c*e+d;let m=0;for(let w=0;w<s;w++)for(let _=0;_<s;_++){const P=c+w-a,y=d+_-a;if(P>=0&&P<n&&y>=0&&y<e){const E=P*e+y,k=r[w*s+_];m+=t[E]*k}}l[p]=m}return l}const yw=function(t){const e=this.threshold();let n=fw(t,e);return n&&(n=pw(n,t.width,t.height),n=gw(n,t.width,t.height),n=mw(n,t.width,t.height),hw(t,n)),t};od.Mask=yw;Tm.Factory.addGetterSetter(uw.Node,"threshold",0,(0,cw.getNumberValidator)(),Tm.Factory.afterSetFilter);var ad={};Object.defineProperty(ad,"__esModule",{value:!0});ad.Noise=void 0;const Rm=Pe,vw=et,_w=pe,Sw=function(t){const e=this.noise()*255,n=t.data,r=n.length,s=e/2;for(let a=0;a<r;a+=4)n[a+0]+=s-2*s*Math.random(),n[a+1]+=s-2*s*Math.random(),n[a+2]+=s-2*s*Math.random()};ad.Noise=Sw;Rm.Factory.addGetterSetter(vw.Node,"noise",.2,(0,_w.getNumberValidator)(),Rm.Factory.afterSetFilter);var ld={};Object.defineProperty(ld,"__esModule",{value:!0});ld.Pixelate=void 0;const Lm=Pe,xw=at,ww=et,kw=pe,Cw=function(t){let e=Math.ceil(this.pixelSize()),n=t.width,r=t.height,s=Math.ceil(n/e),a=Math.ceil(r/e),l=t.data;if(e<=0){xw.Util.error("pixelSize value can not be <= 0");return}for(let c=0;c<s;c+=1)for(let d=0;d<a;d+=1){let p=0,m=0,w=0,_=0;const P=c*e,y=P+e,E=d*e,k=E+e;let S=0;for(let C=P;C<y;C+=1)if(!(C>=n))for(let g=E;g<k;g+=1){if(g>=r)continue;const x=(n*g+C)*4;p+=l[x+0],m+=l[x+1],w+=l[x+2],_+=l[x+3],S+=1}p=p/S,m=m/S,w=w/S,_=_/S;for(let C=P;C<y;C+=1)if(!(C>=n))for(let g=E;g<k;g+=1){if(g>=r)continue;const x=(n*g+C)*4;l[x+0]=p,l[x+1]=m,l[x+2]=w,l[x+3]=_}}};ld.Pixelate=Cw;Lm.Factory.addGetterSetter(ww.Node,"pixelSize",8,(0,kw.getNumberValidator)(),Lm.Factory.afterSetFilter);var ud={};Object.defineProperty(ud,"__esModule",{value:!0});ud.Posterize=void 0;const Am=Pe,Ew=et,Pw=pe,Nw=function(t){const e=Math.round(this.levels()*254)+1,n=t.data,r=n.length,s=255/e;for(let a=0;a<r;a+=1)n[a]=Math.floor(n[a]/s)*s};ud.Posterize=Nw;Am.Factory.addGetterSetter(Ew.Node,"levels",.5,(0,Pw.getNumberValidator)(),Am.Factory.afterSetFilter);var cd={};Object.defineProperty(cd,"__esModule",{value:!0});cd.RGB=void 0;const rc=Pe,b1=et,Tw=pe,Rw=function(t){const e=t.data,n=e.length,r=this.red(),s=this.green(),a=this.blue();for(let l=0;l<n;l+=4){const c=(.34*e[l]+.5*e[l+1]+.16*e[l+2])/255;e[l]=c*r,e[l+1]=c*s,e[l+2]=c*a,e[l+3]=e[l+3]}};cd.RGB=Rw;rc.Factory.addGetterSetter(b1.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});rc.Factory.addGetterSetter(b1.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});rc.Factory.addGetterSetter(b1.Node,"blue",0,Tw.RGBComponent,rc.Factory.afterSetFilter);var dd={};Object.defineProperty(dd,"__esModule",{value:!0});dd.RGBA=void 0;const Aa=Pe,fd=et,Lw=pe,Aw=function(t){const e=t.data,n=e.length,r=this.red(),s=this.green(),a=this.blue(),l=this.alpha();for(let c=0;c<n;c+=4){const d=1-l;e[c]=r*l+e[c]*d,e[c+1]=s*l+e[c+1]*d,e[c+2]=a*l+e[c+2]*d}};dd.RGBA=Aw;Aa.Factory.addGetterSetter(fd.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});Aa.Factory.addGetterSetter(fd.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});Aa.Factory.addGetterSetter(fd.Node,"blue",0,Lw.RGBComponent,Aa.Factory.afterSetFilter);Aa.Factory.addGetterSetter(fd.Node,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});var hd={};Object.defineProperty(hd,"__esModule",{value:!0});hd.Sepia=void 0;const Fw=function(t){const e=t.data,n=e.length;for(let r=0;r<n;r+=4){const s=e[r+0],a=e[r+1],l=e[r+2];e[r+0]=Math.min(255,s*.393+a*.769+l*.189),e[r+1]=Math.min(255,s*.349+a*.686+l*.168),e[r+2]=Math.min(255,s*.272+a*.534+l*.131)}};hd.Sepia=Fw;var pd={};Object.defineProperty(pd,"__esModule",{value:!0});pd.Solarize=void 0;const Mw=function(t){const e=t.data,n=t.width,r=t.height,s=n*4;let a=r;do{const l=(a-1)*s;let c=n;do{const d=l+(c-1)*4;let p=e[d],m=e[d+1],w=e[d+2];p>127&&(p=255-p),m>127&&(m=255-m),w>127&&(w=255-w),e[d]=p,e[d+1]=m,e[d+2]=w}while(--c)}while(--a)};pd.Solarize=Mw;var gd={};Object.defineProperty(gd,"__esModule",{value:!0});gd.Threshold=void 0;const Fm=Pe,Ow=et,Dw=pe,Iw=function(t){const e=this.threshold()*255,n=t.data,r=n.length;for(let s=0;s<r;s+=1)n[s]=n[s]<e?0:255};gd.Threshold=Iw;Fm.Factory.addGetterSetter(Ow.Node,"threshold",.5,(0,Dw.getNumberValidator)(),Fm.Factory.afterSetFilter);Object.defineProperty(Ec,"__esModule",{value:!0});Ec.Konva=void 0;const Mm=Zu,bw=Lc,jw=Mc,zw=Ic,Uw=bc,Bw=jc,Om=oo,Gw=Wa,Hw=vo,Vw=Ya,Ww=Bc,Kw=Gc,Yw=Hc,Xw=Vc,Qw=So,qw=Wc,$w=Kc,Jw=Yc,Zw=Qc,ek=qc,tk=$c,nk=Jc,rk=ed,ik=td,sk=nd,ok=rd,ak=id,lk=sd,uk=od,ck=ad,dk=ld,fk=ud,hk=cd,pk=dd,gk=hd,mk=pd,yk=gd;Ec.Konva=Mm.Konva.Util._assign(Mm.Konva,{Arc:bw.Arc,Arrow:jw.Arrow,Circle:zw.Circle,Ellipse:Uw.Ellipse,Image:Bw.Image,Label:Om.Label,Tag:Om.Tag,Line:Gw.Line,Path:Hw.Path,Rect:Vw.Rect,RegularPolygon:Ww.RegularPolygon,Ring:Kw.Ring,Sprite:Yw.Sprite,Star:Xw.Star,Text:Qw.Text,TextPath:qw.TextPath,Transformer:$w.Transformer,Wedge:Jw.Wedge,Filters:{Blur:Zw.Blur,Brighten:ek.Brighten,Contrast:tk.Contrast,Emboss:nk.Emboss,Enhance:rk.Enhance,Grayscale:ik.Grayscale,HSL:sk.HSL,HSV:ok.HSV,Invert:ak.Invert,Kaleidoscope:lk.Kaleidoscope,Mask:uk.Mask,Noise:ck.Noise,Pixelate:dk.Pixelate,Posterize:fk.Posterize,RGB:hk.RGB,RGBA:pk.RGBA,Sepia:gk.Sepia,Solarize:mk.Solarize,Threshold:yk.Threshold}});var vk=A5.exports;Object.defineProperty(vk,"__esModule",{value:!0});const _k=Ec;A5.exports=_k.Konva;var k0={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var n=Zu;Object.defineProperty(e,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=Zu;t.exports=r.Konva})(k0,k0.exports);var Sk=k0.exports;const Fa=C0(Sk);var f3={exports:{}};/**
57
+ * @license React
58
+ * react-reconciler.production.min.js
59
+ *
60
+ * Copyright (c) Facebook, Inc. and its affiliates.
61
+ *
62
+ * This source code is licensed under the MIT license found in the
63
+ * LICENSE file in the root directory of this source tree.
64
+ */var xk=function(e){var n={},r=V,s=ra,a=Object.assign;function l(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,d=Symbol.for("react.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),y=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),T=Symbol.iterator;function R(i){return i===null||typeof i!="object"?null:(i=T&&i[T]||i["@@iterator"],typeof i=="function"?i:null)}function M(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case m:return"Fragment";case p:return"Portal";case _:return"Profiler";case w:return"StrictMode";case k:return"Suspense";case S:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case y:return(i.displayName||"Context")+".Consumer";case P:return(i._context.displayName||"Context")+".Provider";case E:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case C:return o=i.displayName||null,o!==null?o:M(i.type)||"Memo";case g:o=i._payload,i=i._init;try{return M(i(o))}catch{}}return null}function L(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M(o);case 8:return o===w?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function b(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,o.flags&4098&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function F(i){if(b(i)!==i)throw Error(l(188))}function B(i){var o=i.alternate;if(!o){if(o=b(i),o===null)throw Error(l(188));return o!==i?null:i}for(var u=i,f=o;;){var h=u.return;if(h===null)break;var v=h.alternate;if(v===null){if(f=h.return,f!==null){u=f;continue}break}if(h.child===v.child){for(v=h.child;v;){if(v===u)return F(h),i;if(v===f)return F(h),o;v=v.sibling}throw Error(l(188))}if(u.return!==f.return)u=h,f=v;else{for(var N=!1,D=h.child;D;){if(D===u){N=!0,u=h,f=v;break}if(D===f){N=!0,f=h,u=v;break}D=D.sibling}if(!N){for(D=v.child;D;){if(D===u){N=!0,u=v,f=h;break}if(D===f){N=!0,f=v,u=h;break}D=D.sibling}if(!N)throw Error(l(189))}}if(u.alternate!==f)throw Error(l(190))}if(u.tag!==3)throw Error(l(188));return u.stateNode.current===u?i:o}function W(i){return i=B(i),i!==null?X(i):null}function X(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=X(i);if(o!==null)return o;i=i.sibling}return null}function ie(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){if(i.tag!==4){var o=ie(i);if(o!==null)return o}i=i.sibling}return null}var ee=Array.isArray,ce=e.getPublicInstance,ve=e.getRootHostContext,G=e.getChildHostContext,Z=e.prepareForCommit,Q=e.resetAfterCommit,q=e.createInstance,te=e.appendInitialChild,we=e.finalizeInitialChildren,Be=e.prepareUpdate,Ke=e.shouldSetTextContent,je=e.createTextInstance,O=e.scheduleTimeout,K=e.cancelTimeout,ue=e.noTimeout,Ae=e.isPrimaryRenderer,ge=e.supportsMutation,fe=e.supportsPersistence,xe=e.supportsHydration,Lt=e.getInstanceFromNode,Me=e.preparePortalMount,tr=e.getCurrentEventPriority,$=e.detachDeletedInstance,le=e.supportsMicrotasks,me=e.scheduleMicrotask,Re=e.supportsTestSelectors,tt=e.findFiberRoot,wn=e.getBoundingRect,_r=e.getTextContent,Li=e.isHiddenSubtree,x3=e.matchAccessibilityRole,w3=e.setFocusIfFocusable,k3=e.setupIntersectionObserver,C3=e.appendChild,E3=e.appendChildToContainer,P3=e.commitTextUpdate,N3=e.commitMount,T3=e.commitUpdate,R3=e.insertBefore,L3=e.insertInContainerBefore,A3=e.removeChild,F3=e.removeChildFromContainer,U1=e.resetTextContent,M3=e.hideInstance,O3=e.hideTextInstance,D3=e.unhideInstance,I3=e.unhideTextInstance,b3=e.clearContainer,j3=e.cloneInstance,B1=e.createContainerChildSet,G1=e.appendChildToContainerChildSet,z3=e.finalizeContainerChildren,yd=e.replaceContainerChildren,H1=e.cloneHiddenInstance,V1=e.cloneHiddenTextInstance,U3=e.canHydrateInstance,B3=e.canHydrateTextInstance,G3=e.canHydrateSuspenseInstance,W1=e.isSuspenseInstancePending,vd=e.isSuspenseInstanceFallback,H3=e.getSuspenseInstanceFallbackErrorDetails,V3=e.registerSuspenseInstanceRetry,Xa=e.getNextHydratableSibling,W3=e.getFirstHydratableChild,K3=e.getFirstHydratableChildWithinContainer,Y3=e.getFirstHydratableChildWithinSuspenseInstance,X3=e.hydrateInstance,Q3=e.hydrateTextInstance,q3=e.hydrateSuspenseInstance,$3=e.getNextHydratableInstanceAfterSuspenseInstance,J3=e.commitHydratedContainer,Z3=e.commitHydratedSuspenseInstance,ev=e.clearSuspenseBoundary,tv=e.clearSuspenseBoundaryFromContainer,nv=e.shouldDeleteUnhydratedTailInstances,rv=e.didNotMatchHydratedContainerTextInstance,iv=e.didNotMatchHydratedTextInstance,_d;function xo(i){if(_d===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);_d=o&&o[1]||""}return`
65
+ `+_d+i}var Sd=!1;function xd(i,o){if(!i||Sd)return"";Sd=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(J){var f=J}Reflect.construct(i,[],o)}else{try{o.call()}catch(J){f=J}i.call(o.prototype)}else{try{throw Error()}catch(J){f=J}i()}}catch(J){if(J&&f&&typeof J.stack=="string"){for(var h=J.stack.split(`
66
+ `),v=f.stack.split(`
67
+ `),N=h.length-1,D=v.length-1;1<=N&&0<=D&&h[N]!==v[D];)D--;for(;1<=N&&0<=D;N--,D--)if(h[N]!==v[D]){if(N!==1||D!==1)do if(N--,D--,0>D||h[N]!==v[D]){var z=`
68
+ `+h[N].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=N&&0<=D);break}}}finally{Sd=!1,Error.prepareStackTrace=u}return(i=i?i.displayName||i.name:"")?xo(i):""}var sv=Object.prototype.hasOwnProperty,wd=[],gs=-1;function Vr(i){return{current:i}}function Ye(i){0>gs||(i.current=wd[gs],wd[gs]=null,gs--)}function Ve(i,o){gs++,wd[gs]=i.current,i.current=o}var Wr={},It=Vr(Wr),Zt=Vr(!1),Ai=Wr;function ms(i,o){var u=i.type.contextTypes;if(!u)return Wr;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===o)return f.__reactInternalMemoizedMaskedChildContext;var h={},v;for(v in u)h[v]=o[v];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=h),h}function en(i){return i=i.childContextTypes,i!=null}function Qa(){Ye(Zt),Ye(It)}function K1(i,o,u){if(It.current!==Wr)throw Error(l(168));Ve(It,o),Ve(Zt,u)}function Y1(i,o,u){var f=i.stateNode;if(o=o.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var h in f)if(!(h in o))throw Error(l(108,L(i)||"Unknown",h));return a({},u,f)}function qa(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Wr,Ai=It.current,Ve(It,i),Ve(Zt,Zt.current),!0}function X1(i,o,u){var f=i.stateNode;if(!f)throw Error(l(169));u?(i=Y1(i,o,Ai),f.__reactInternalMemoizedMergedChildContext=i,Ye(Zt),Ye(It),Ve(It,i)):Ye(Zt),Ve(Zt,u)}var jn=Math.clz32?Math.clz32:lv,ov=Math.log,av=Math.LN2;function lv(i){return i>>>=0,i===0?32:31-(ov(i)/av|0)|0}var $a=64,Ja=4194304;function wo(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Za(i,o){var u=i.pendingLanes;if(u===0)return 0;var f=0,h=i.suspendedLanes,v=i.pingedLanes,N=u&268435455;if(N!==0){var D=N&~h;D!==0?f=wo(D):(v&=N,v!==0&&(f=wo(v)))}else N=u&~h,N!==0?f=wo(N):v!==0&&(f=wo(v));if(f===0)return 0;if(o!==0&&o!==f&&!(o&h)&&(h=f&-f,v=o&-o,h>=v||h===16&&(v&4194240)!==0))return o;if(f&4&&(f|=u&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=f;0<o;)u=31-jn(o),h=1<<u,f|=i[u],o&=~h;return f}function uv(i,o){switch(i){case 1:case 2:case 4:return o+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 o+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 cv(i,o){for(var u=i.suspendedLanes,f=i.pingedLanes,h=i.expirationTimes,v=i.pendingLanes;0<v;){var N=31-jn(v),D=1<<N,z=h[N];z===-1?(!(D&u)||D&f)&&(h[N]=uv(D,o)):z<=o&&(i.expiredLanes|=D),v&=~D}}function kd(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Q1(){var i=$a;return $a<<=1,!($a&4194240)&&($a=64),i}function Cd(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function ko(i,o,u){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-jn(o),i[o]=u}function dv(i,o){var u=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<u;){var h=31-jn(u),v=1<<h;o[h]=0,f[h]=-1,i[h]=-1,u&=~v}}function Ed(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var f=31-jn(u),h=1<<f;h&o|i[f]&o&&(i[f]|=o),u&=~h}}var Oe=0;function q1(i){return i&=-i,1<i?4<i?i&268435455?16:536870912:4:1}var Pd=s.unstable_scheduleCallback,$1=s.unstable_cancelCallback,fv=s.unstable_shouldYield,hv=s.unstable_requestPaint,Ct=s.unstable_now,Nd=s.unstable_ImmediatePriority,pv=s.unstable_UserBlockingPriority,Td=s.unstable_NormalPriority,gv=s.unstable_IdlePriority,el=null,nr=null;function mv(i){if(nr&&typeof nr.onCommitFiberRoot=="function")try{nr.onCommitFiberRoot(el,i,void 0,(i.current.flags&128)===128)}catch{}}function yv(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var zn=typeof Object.is=="function"?Object.is:yv,Sr=null,tl=!1,Rd=!1;function J1(i){Sr===null?Sr=[i]:Sr.push(i)}function vv(i){tl=!0,J1(i)}function rr(){if(!Rd&&Sr!==null){Rd=!0;var i=0,o=Oe;try{var u=Sr;for(Oe=1;i<u.length;i++){var f=u[i];do f=f(!0);while(f!==null)}Sr=null,tl=!1}catch(h){throw Sr!==null&&(Sr=Sr.slice(i+1)),Pd(Nd,rr),h}finally{Oe=o,Rd=!1}}return null}var ys=[],vs=0,nl=null,rl=0,kn=[],Cn=0,Fi=null,xr=1,wr="";function Mi(i,o){ys[vs++]=rl,ys[vs++]=nl,nl=i,rl=o}function Z1(i,o,u){kn[Cn++]=xr,kn[Cn++]=wr,kn[Cn++]=Fi,Fi=i;var f=xr;i=wr;var h=32-jn(f)-1;f&=~(1<<h),u+=1;var v=32-jn(o)+h;if(30<v){var N=h-h%5;v=(f&(1<<N)-1).toString(32),f>>=N,h-=N,xr=1<<32-jn(o)+h|u<<h|f,wr=v+i}else xr=1<<v|u<<h|f,wr=i}function Ld(i){i.return!==null&&(Mi(i,1),Z1(i,1,0))}function Ad(i){for(;i===nl;)nl=ys[--vs],ys[vs]=null,rl=ys[--vs],ys[vs]=null;for(;i===Fi;)Fi=kn[--Cn],kn[Cn]=null,wr=kn[--Cn],kn[Cn]=null,xr=kn[--Cn],kn[Cn]=null}var pn=null,En=null,$e=!1,Co=!1,Un=null;function ep(i,o){var u=Ln(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=i,o=i.deletions,o===null?(i.deletions=[u],i.flags|=16):o.push(u)}function tp(i,o){switch(i.tag){case 5:return o=U3(o,i.type,i.pendingProps),o!==null?(i.stateNode=o,pn=i,En=W3(o),!0):!1;case 6:return o=B3(o,i.pendingProps),o!==null?(i.stateNode=o,pn=i,En=null,!0):!1;case 13:if(o=G3(o),o!==null){var u=Fi!==null?{id:xr,overflow:wr}:null;return i.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=Ln(18,null,null,0),u.stateNode=o,u.return=i,i.child=u,pn=i,En=null,!0}return!1;default:return!1}}function Fd(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Md(i){if($e){var o=En;if(o){var u=o;if(!tp(i,o)){if(Fd(i))throw Error(l(418));o=Xa(u);var f=pn;o&&tp(i,o)?ep(f,u):(i.flags=i.flags&-4097|2,$e=!1,pn=i)}}else{if(Fd(i))throw Error(l(418));i.flags=i.flags&-4097|2,$e=!1,pn=i}}}function np(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;pn=i}function il(i){if(!xe||i!==pn)return!1;if(!$e)return np(i),$e=!0,!1;if(i.tag!==3&&(i.tag!==5||nv(i.type)&&!Ke(i.type,i.memoizedProps))){var o=En;if(o){if(Fd(i))throw rp(),Error(l(418));for(;o;)ep(i,o),o=Xa(o)}}if(np(i),i.tag===13){if(!xe)throw Error(l(316));if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(l(317));En=$3(i)}else En=pn?Xa(i.stateNode):null;return!0}function rp(){for(var i=En;i;)i=Xa(i)}function _s(){xe&&(En=pn=null,Co=$e=!1)}function Od(i){Un===null?Un=[i]:Un.push(i)}var _v=c.ReactCurrentBatchConfig;function sl(i,o){if(zn(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var h=u[f];if(!sv.call(o,h)||!zn(i[h],o[h]))return!1}return!0}function Sv(i){switch(i.tag){case 5:return xo(i.type);case 16:return xo("Lazy");case 13:return xo("Suspense");case 19:return xo("SuspenseList");case 0:case 2:case 15:return i=xd(i.type,!1),i;case 11:return i=xd(i.type.render,!1),i;case 1:return i=xd(i.type,!0),i;default:return""}}function Eo(i,o,u){if(i=u.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(l(309));var f=u.stateNode}if(!f)throw Error(l(147,i));var h=f,v=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===v?o.ref:(o=function(N){var D=h.refs;N===null?delete D[v]:D[v]=N},o._stringRef=v,o)}if(typeof i!="string")throw Error(l(284));if(!u._owner)throw Error(l(290,i))}return i}function ol(i,o){throw i=Object.prototype.toString.call(o),Error(l(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function ip(i){var o=i._init;return o(i._payload)}function sp(i){function o(j,I){if(i){var H=j.deletions;H===null?(j.deletions=[I],j.flags|=16):H.push(I)}}function u(j,I){if(!i)return null;for(;I!==null;)o(j,I),I=I.sibling;return null}function f(j,I){for(j=new Map;I!==null;)I.key!==null?j.set(I.key,I):j.set(I.index,I),I=I.sibling;return j}function h(j,I){return j=Jr(j,I),j.index=0,j.sibling=null,j}function v(j,I,H){return j.index=H,i?(H=j.alternate,H!==null?(H=H.index,H<I?(j.flags|=2,I):H):(j.flags|=2,I)):(j.flags|=1048576,I)}function N(j){return i&&j.alternate===null&&(j.flags|=2),j}function D(j,I,H,re){return I===null||I.tag!==6?(I=Lf(H,j.mode,re),I.return=j,I):(I=h(I,H),I.return=j,I)}function z(j,I,H,re){var de=H.type;return de===m?ae(j,I,H.props.children,re,H.key):I!==null&&(I.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===g&&ip(de)===I.type)?(re=h(I,H.props),re.ref=Eo(j,I,H),re.return=j,re):(re=bl(H.type,H.key,H.props,null,j.mode,re),re.ref=Eo(j,I,H),re.return=j,re)}function J(j,I,H,re){return I===null||I.tag!==4||I.stateNode.containerInfo!==H.containerInfo||I.stateNode.implementation!==H.implementation?(I=Af(H,j.mode,re),I.return=j,I):(I=h(I,H.children||[]),I.return=j,I)}function ae(j,I,H,re,de){return I===null||I.tag!==7?(I=Ui(H,j.mode,re,de),I.return=j,I):(I=h(I,H),I.return=j,I)}function _e(j,I,H){if(typeof I=="string"&&I!==""||typeof I=="number")return I=Lf(""+I,j.mode,H),I.return=j,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case d:return H=bl(I.type,I.key,I.props,null,j.mode,H),H.ref=Eo(j,null,I),H.return=j,H;case p:return I=Af(I,j.mode,H),I.return=j,I;case g:var re=I._init;return _e(j,re(I._payload),H)}if(ee(I)||R(I))return I=Ui(I,j.mode,H,null),I.return=j,I;ol(j,I)}return null}function ne(j,I,H,re){var de=I!==null?I.key:null;if(typeof H=="string"&&H!==""||typeof H=="number")return de!==null?null:D(j,I,""+H,re);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case d:return H.key===de?z(j,I,H,re):null;case p:return H.key===de?J(j,I,H,re):null;case g:return de=H._init,ne(j,I,de(H._payload),re)}if(ee(H)||R(H))return de!==null?null:ae(j,I,H,re,null);ol(j,H)}return null}function Xe(j,I,H,re,de){if(typeof re=="string"&&re!==""||typeof re=="number")return j=j.get(H)||null,D(I,j,""+re,de);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case d:return j=j.get(re.key===null?H:re.key)||null,z(I,j,re,de);case p:return j=j.get(re.key===null?H:re.key)||null,J(I,j,re,de);case g:var ke=re._init;return Xe(j,I,H,ke(re._payload),de)}if(ee(re)||R(re))return j=j.get(H)||null,ae(I,j,re,de,null);ol(I,re)}return null}function Ge(j,I,H,re){for(var de=null,ke=null,Se=I,De=I=0,Nt=null;Se!==null&&De<H.length;De++){Se.index>De?(Nt=Se,Se=null):Nt=Se.sibling;var Ie=ne(j,Se,H[De],re);if(Ie===null){Se===null&&(Se=Nt);break}i&&Se&&Ie.alternate===null&&o(j,Se),I=v(Ie,I,De),ke===null?de=Ie:ke.sibling=Ie,ke=Ie,Se=Nt}if(De===H.length)return u(j,Se),$e&&Mi(j,De),de;if(Se===null){for(;De<H.length;De++)Se=_e(j,H[De],re),Se!==null&&(I=v(Se,I,De),ke===null?de=Se:ke.sibling=Se,ke=Se);return $e&&Mi(j,De),de}for(Se=f(j,Se);De<H.length;De++)Nt=Xe(Se,j,De,H[De],re),Nt!==null&&(i&&Nt.alternate!==null&&Se.delete(Nt.key===null?De:Nt.key),I=v(Nt,I,De),ke===null?de=Nt:ke.sibling=Nt,ke=Nt);return i&&Se.forEach(function(Zr){return o(j,Zr)}),$e&&Mi(j,De),de}function sn(j,I,H,re){var de=R(H);if(typeof de!="function")throw Error(l(150));if(H=de.call(H),H==null)throw Error(l(151));for(var ke=de=null,Se=I,De=I=0,Nt=null,Ie=H.next();Se!==null&&!Ie.done;De++,Ie=H.next()){Se.index>De?(Nt=Se,Se=null):Nt=Se.sibling;var Zr=ne(j,Se,Ie.value,re);if(Zr===null){Se===null&&(Se=Nt);break}i&&Se&&Zr.alternate===null&&o(j,Se),I=v(Zr,I,De),ke===null?de=Zr:ke.sibling=Zr,ke=Zr,Se=Nt}if(Ie.done)return u(j,Se),$e&&Mi(j,De),de;if(Se===null){for(;!Ie.done;De++,Ie=H.next())Ie=_e(j,Ie.value,re),Ie!==null&&(I=v(Ie,I,De),ke===null?de=Ie:ke.sibling=Ie,ke=Ie);return $e&&Mi(j,De),de}for(Se=f(j,Se);!Ie.done;De++,Ie=H.next())Ie=Xe(Se,j,De,Ie.value,re),Ie!==null&&(i&&Ie.alternate!==null&&Se.delete(Ie.key===null?De:Ie.key),I=v(Ie,I,De),ke===null?de=Ie:ke.sibling=Ie,ke=Ie);return i&&Se.forEach(function(qv){return o(j,qv)}),$e&&Mi(j,De),de}function Pr(j,I,H,re){if(typeof H=="object"&&H!==null&&H.type===m&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case d:e:{for(var de=H.key,ke=I;ke!==null;){if(ke.key===de){if(de=H.type,de===m){if(ke.tag===7){u(j,ke.sibling),I=h(ke,H.props.children),I.return=j,j=I;break e}}else if(ke.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===g&&ip(de)===ke.type){u(j,ke.sibling),I=h(ke,H.props),I.ref=Eo(j,ke,H),I.return=j,j=I;break e}u(j,ke);break}else o(j,ke);ke=ke.sibling}H.type===m?(I=Ui(H.props.children,j.mode,re,H.key),I.return=j,j=I):(re=bl(H.type,H.key,H.props,null,j.mode,re),re.ref=Eo(j,I,H),re.return=j,j=re)}return N(j);case p:e:{for(ke=H.key;I!==null;){if(I.key===ke)if(I.tag===4&&I.stateNode.containerInfo===H.containerInfo&&I.stateNode.implementation===H.implementation){u(j,I.sibling),I=h(I,H.children||[]),I.return=j,j=I;break e}else{u(j,I);break}else o(j,I);I=I.sibling}I=Af(H,j.mode,re),I.return=j,j=I}return N(j);case g:return ke=H._init,Pr(j,I,ke(H._payload),re)}if(ee(H))return Ge(j,I,H,re);if(R(H))return sn(j,I,H,re);ol(j,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,I!==null&&I.tag===6?(u(j,I.sibling),I=h(I,H),I.return=j,j=I):(u(j,I),I=Lf(H,j.mode,re),I.return=j,j=I),N(j)):u(j,I)}return Pr}var Ss=sp(!0),op=sp(!1),al=Vr(null),ll=null,xs=null,Dd=null;function Id(){Dd=xs=ll=null}function ap(i,o,u){Ae?(Ve(al,o._currentValue),o._currentValue=u):(Ve(al,o._currentValue2),o._currentValue2=u)}function bd(i){var o=al.current;Ye(al),Ae?i._currentValue=o:i._currentValue2=o}function jd(i,o,u){for(;i!==null;){var f=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),i===u)break;i=i.return}}function ws(i,o){ll=i,Dd=xs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&(i.lanes&o&&(tn=!0),i.firstContext=null)}function Pn(i){var o=Ae?i._currentValue:i._currentValue2;if(Dd!==i)if(i={context:i,memoizedValue:o,next:null},xs===null){if(ll===null)throw Error(l(308));xs=i,ll.dependencies={lanes:0,firstContext:i}}else xs=xs.next=i;return o}var Oi=null;function zd(i){Oi===null?Oi=[i]:Oi.push(i)}function lp(i,o,u,f){var h=o.interleaved;return h===null?(u.next=u,zd(o)):(u.next=h.next,h.next=u),o.interleaved=u,ir(i,f)}function ir(i,o){i.lanes|=o;var u=i.alternate;for(u!==null&&(u.lanes|=o),u=i,i=i.return;i!==null;)i.childLanes|=o,u=i.alternate,u!==null&&(u.childLanes|=o),u=i,i=i.return;return u.tag===3?u.stateNode:null}var Kr=!1;function Ud(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function up(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function kr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Yr(i,o,u){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,Ee&2){var h=f.pending;return h===null?o.next=o:(o.next=h.next,h.next=o),f.pending=o,ir(i,u)}return h=f.interleaved,h===null?(o.next=o,zd(f)):(o.next=h.next,h.next=o),f.interleaved=o,ir(i,u)}function ul(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var f=o.lanes;f&=i.pendingLanes,u|=f,o.lanes=u,Ed(i,u)}}function cp(i,o){var u=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var h=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var N={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};v===null?h=v=N:v=v.next=N,u=u.next}while(u!==null);v===null?h=v=o:v=v.next=o}else h=v=o;u={baseState:f.baseState,firstBaseUpdate:h,lastBaseUpdate:v,shared:f.shared,effects:f.effects},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}function cl(i,o,u,f){var h=i.updateQueue;Kr=!1;var v=h.firstBaseUpdate,N=h.lastBaseUpdate,D=h.shared.pending;if(D!==null){h.shared.pending=null;var z=D,J=z.next;z.next=null,N===null?v=J:N.next=J,N=z;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,D=ae.lastBaseUpdate,D!==N&&(D===null?ae.firstBaseUpdate=J:D.next=J,ae.lastBaseUpdate=z))}if(v!==null){var _e=h.baseState;N=0,ae=J=z=null,D=v;do{var ne=D.lane,Xe=D.eventTime;if((f&ne)===ne){ae!==null&&(ae=ae.next={eventTime:Xe,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ge=i,sn=D;switch(ne=o,Xe=u,sn.tag){case 1:if(Ge=sn.payload,typeof Ge=="function"){_e=Ge.call(Xe,_e,ne);break e}_e=Ge;break e;case 3:Ge.flags=Ge.flags&-65537|128;case 0:if(Ge=sn.payload,ne=typeof Ge=="function"?Ge.call(Xe,_e,ne):Ge,ne==null)break e;_e=a({},_e,ne);break e;case 2:Kr=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,ne=h.effects,ne===null?h.effects=[D]:ne.push(D))}else Xe={eventTime:Xe,lane:ne,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ae===null?(J=ae=Xe,z=_e):ae=ae.next=Xe,N|=ne;if(D=D.next,D===null){if(D=h.shared.pending,D===null)break;ne=D,D=ne.next,ne.next=null,h.lastBaseUpdate=ne,h.shared.pending=null}}while(!0);if(ae===null&&(z=_e),h.baseState=z,h.firstBaseUpdate=J,h.lastBaseUpdate=ae,o=h.shared.interleaved,o!==null){h=o;do N|=h.lane,h=h.next;while(h!==o)}else v===null&&(h.shared.lanes=0);Ii|=N,i.lanes=N,i.memoizedState=_e}}function dp(i,o,u){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var f=i[o],h=f.callback;if(h!==null){if(f.callback=null,f=u,typeof h!="function")throw Error(l(191,h));h.call(f)}}}var Po={},Nn=Vr(Po),No=Vr(Po),ks=Vr(Po);function sr(i){if(i===Po)throw Error(l(174));return i}function Bd(i,o){Ve(ks,o),Ve(No,i),Ve(Nn,Po),i=ve(o),Ye(Nn),Ve(Nn,i)}function Cs(){Ye(Nn),Ye(No),Ye(ks)}function fp(i){var o=sr(ks.current),u=sr(Nn.current);o=G(u,i.type,o),u!==o&&(Ve(No,i),Ve(Nn,o))}function Gd(i){No.current===i&&(Ye(Nn),Ye(No))}var nt=Vr(0);function dl(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||W1(u)||vd(u)))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Hd=[];function Vd(){for(var i=0;i<Hd.length;i++){var o=Hd[i];Ae?o._workInProgressVersionPrimary=null:o._workInProgressVersionSecondary=null}Hd.length=0}var fl=c.ReactCurrentDispatcher,Wd=c.ReactCurrentBatchConfig,Di=0,rt=null,yt=null,Et=null,hl=!1,To=!1,Ro=0,xv=0;function bt(){throw Error(l(321))}function Kd(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!zn(i[u],o[u]))return!1;return!0}function Yd(i,o,u,f,h,v){if(Di=v,rt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,fl.current=i===null||i.memoizedState===null?Ev:Pv,i=u(f,h),To){v=0;do{if(To=!1,Ro=0,25<=v)throw Error(l(301));v+=1,Et=yt=null,o.updateQueue=null,fl.current=Nv,i=u(f,h)}while(To)}if(fl.current=ml,o=yt!==null&&yt.next!==null,Di=0,Et=yt=rt=null,hl=!1,o)throw Error(l(300));return i}function Xd(){var i=Ro!==0;return Ro=0,i}function or(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?rt.memoizedState=Et=i:Et=Et.next=i,Et}function Tn(){if(yt===null){var i=rt.alternate;i=i!==null?i.memoizedState:null}else i=yt.next;var o=Et===null?rt.memoizedState:Et.next;if(o!==null)Et=o,yt=i;else{if(i===null)throw Error(l(310));yt=i,i={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},Et===null?rt.memoizedState=Et=i:Et=Et.next=i}return Et}function Lo(i,o){return typeof o=="function"?o(i):o}function Qd(i){var o=Tn(),u=o.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=i;var f=yt,h=f.baseQueue,v=u.pending;if(v!==null){if(h!==null){var N=h.next;h.next=v.next,v.next=N}f.baseQueue=h=v,u.pending=null}if(h!==null){v=h.next,f=f.baseState;var D=N=null,z=null,J=v;do{var ae=J.lane;if((Di&ae)===ae)z!==null&&(z=z.next={lane:0,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),f=J.hasEagerState?J.eagerState:i(f,J.action);else{var _e={lane:ae,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null};z===null?(D=z=_e,N=f):z=z.next=_e,rt.lanes|=ae,Ii|=ae}J=J.next}while(J!==null&&J!==v);z===null?N=f:z.next=D,zn(f,o.memoizedState)||(tn=!0),o.memoizedState=f,o.baseState=N,o.baseQueue=z,u.lastRenderedState=f}if(i=u.interleaved,i!==null){h=i;do v=h.lane,rt.lanes|=v,Ii|=v,h=h.next;while(h!==i)}else h===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function qd(i){var o=Tn(),u=o.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=i;var f=u.dispatch,h=u.pending,v=o.memoizedState;if(h!==null){u.pending=null;var N=h=h.next;do v=i(v,N.action),N=N.next;while(N!==h);zn(v,o.memoizedState)||(tn=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),u.lastRenderedState=v}return[v,f]}function hp(){}function pp(i,o){var u=rt,f=Tn(),h=o(),v=!zn(f.memoizedState,h);if(v&&(f.memoizedState=h,tn=!0),f=f.queue,$d(yp.bind(null,u,f,i),[i]),f.getSnapshot!==o||v||Et!==null&&Et.memoizedState.tag&1){if(u.flags|=2048,Ao(9,mp.bind(null,u,f,h,o),void 0,null),Pt===null)throw Error(l(349));Di&30||gp(u,o,h)}return h}function gp(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=rt.updateQueue,o===null?(o={lastEffect:null,stores:null},rt.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function mp(i,o,u,f){o.value=u,o.getSnapshot=f,vp(o)&&_p(i)}function yp(i,o,u){return u(function(){vp(o)&&_p(i)})}function vp(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!zn(i,u)}catch{return!0}}function _p(i){var o=ir(i,1);o!==null&&Rn(o,i,1,-1)}function Sp(i){var o=or();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:i},o.queue=i,i=i.dispatch=Cv.bind(null,rt,i),[o.memoizedState,i]}function Ao(i,o,u,f){return i={tag:i,create:o,destroy:u,deps:f,next:null},o=rt.updateQueue,o===null?(o={lastEffect:null,stores:null},rt.updateQueue=o,o.lastEffect=i.next=i):(u=o.lastEffect,u===null?o.lastEffect=i.next=i:(f=u.next,u.next=i,i.next=f,o.lastEffect=i)),i}function xp(){return Tn().memoizedState}function pl(i,o,u,f){var h=or();rt.flags|=i,h.memoizedState=Ao(1|o,u,void 0,f===void 0?null:f)}function gl(i,o,u,f){var h=Tn();f=f===void 0?null:f;var v=void 0;if(yt!==null){var N=yt.memoizedState;if(v=N.destroy,f!==null&&Kd(f,N.deps)){h.memoizedState=Ao(o,u,v,f);return}}rt.flags|=i,h.memoizedState=Ao(1|o,u,v,f)}function wp(i,o){return pl(8390656,8,i,o)}function $d(i,o){return gl(2048,8,i,o)}function kp(i,o){return gl(4,2,i,o)}function Cp(i,o){return gl(4,4,i,o)}function Ep(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Pp(i,o,u){return u=u!=null?u.concat([i]):null,gl(4,4,Ep.bind(null,o,i),u)}function Jd(){}function Np(i,o){var u=Tn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Kd(o,f[1])?f[0]:(u.memoizedState=[i,o],i)}function Tp(i,o){var u=Tn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Kd(o,f[1])?f[0]:(i=i(),u.memoizedState=[i,o],i)}function Rp(i,o,u){return Di&21?(zn(u,o)||(u=Q1(),rt.lanes|=u,Ii|=u,i.baseState=!0),o):(i.baseState&&(i.baseState=!1,tn=!0),i.memoizedState=u)}function wv(i,o){var u=Oe;Oe=u!==0&&4>u?u:4,i(!0);var f=Wd.transition;Wd.transition={};try{i(!1),o()}finally{Oe=u,Wd.transition=f}}function Lp(){return Tn().memoizedState}function kv(i,o,u){var f=qr(i);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Ap(i))Fp(o,u);else if(u=lp(i,o,u,f),u!==null){var h=Ut();Rn(u,i,f,h),Mp(u,o,f)}}function Cv(i,o,u){var f=qr(i),h={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ap(i))Fp(o,h);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var N=o.lastRenderedState,D=v(N,u);if(h.hasEagerState=!0,h.eagerState=D,zn(D,N)){var z=o.interleaved;z===null?(h.next=h,zd(o)):(h.next=z.next,z.next=h),o.interleaved=h;return}}catch{}finally{}u=lp(i,o,h,f),u!==null&&(h=Ut(),Rn(u,i,f,h),Mp(u,o,f))}}function Ap(i){var o=i.alternate;return i===rt||o!==null&&o===rt}function Fp(i,o){To=hl=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function Mp(i,o,u){if(u&4194240){var f=o.lanes;f&=i.pendingLanes,u|=f,o.lanes=u,Ed(i,u)}}var ml={readContext:Pn,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},Ev={readContext:Pn,useCallback:function(i,o){return or().memoizedState=[i,o===void 0?null:o],i},useContext:Pn,useEffect:wp,useImperativeHandle:function(i,o,u){return u=u!=null?u.concat([i]):null,pl(4194308,4,Ep.bind(null,o,i),u)},useLayoutEffect:function(i,o){return pl(4194308,4,i,o)},useInsertionEffect:function(i,o){return pl(4,2,i,o)},useMemo:function(i,o){var u=or();return o=o===void 0?null:o,i=i(),u.memoizedState=[i,o],i},useReducer:function(i,o,u){var f=or();return o=u!==void 0?u(o):o,f.memoizedState=f.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},f.queue=i,i=i.dispatch=kv.bind(null,rt,i),[f.memoizedState,i]},useRef:function(i){var o=or();return i={current:i},o.memoizedState=i},useState:Sp,useDebugValue:Jd,useDeferredValue:function(i){return or().memoizedState=i},useTransition:function(){var i=Sp(!1),o=i[0];return i=wv.bind(null,i[1]),or().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,u){var f=rt,h=or();if($e){if(u===void 0)throw Error(l(407));u=u()}else{if(u=o(),Pt===null)throw Error(l(349));Di&30||gp(f,o,u)}h.memoizedState=u;var v={value:u,getSnapshot:o};return h.queue=v,wp(yp.bind(null,f,v,i),[i]),f.flags|=2048,Ao(9,mp.bind(null,f,v,u,o),void 0,null),u},useId:function(){var i=or(),o=Pt.identifierPrefix;if($e){var u=wr,f=xr;u=(f&~(1<<32-jn(f)-1)).toString(32)+u,o=":"+o+"R"+u,u=Ro++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=xv++,o=":"+o+"r"+u.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},Pv={readContext:Pn,useCallback:Np,useContext:Pn,useEffect:$d,useImperativeHandle:Pp,useInsertionEffect:kp,useLayoutEffect:Cp,useMemo:Tp,useReducer:Qd,useRef:xp,useState:function(){return Qd(Lo)},useDebugValue:Jd,useDeferredValue:function(i){var o=Tn();return Rp(o,yt.memoizedState,i)},useTransition:function(){var i=Qd(Lo)[0],o=Tn().memoizedState;return[i,o]},useMutableSource:hp,useSyncExternalStore:pp,useId:Lp,unstable_isNewReconciler:!1},Nv={readContext:Pn,useCallback:Np,useContext:Pn,useEffect:$d,useImperativeHandle:Pp,useInsertionEffect:kp,useLayoutEffect:Cp,useMemo:Tp,useReducer:qd,useRef:xp,useState:function(){return qd(Lo)},useDebugValue:Jd,useDeferredValue:function(i){var o=Tn();return yt===null?o.memoizedState=i:Rp(o,yt.memoizedState,i)},useTransition:function(){var i=qd(Lo)[0],o=Tn().memoizedState;return[i,o]},useMutableSource:hp,useSyncExternalStore:pp,useId:Lp,unstable_isNewReconciler:!1};function Bn(i,o){if(i&&i.defaultProps){o=a({},o),i=i.defaultProps;for(var u in i)o[u]===void 0&&(o[u]=i[u]);return o}return o}function Zd(i,o,u,f){o=i.memoizedState,u=u(f,o),u=u==null?o:a({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var yl={isMounted:function(i){return(i=i._reactInternals)?b(i)===i:!1},enqueueSetState:function(i,o,u){i=i._reactInternals;var f=Ut(),h=qr(i),v=kr(f,h);v.payload=o,u!=null&&(v.callback=u),o=Yr(i,v,h),o!==null&&(Rn(o,i,h,f),ul(o,i,h))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var f=Ut(),h=qr(i),v=kr(f,h);v.tag=1,v.payload=o,u!=null&&(v.callback=u),o=Yr(i,v,h),o!==null&&(Rn(o,i,h,f),ul(o,i,h))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Ut(),f=qr(i),h=kr(u,f);h.tag=2,o!=null&&(h.callback=o),o=Yr(i,h,f),o!==null&&(Rn(o,i,f,u),ul(o,i,f))}};function Op(i,o,u,f,h,v,N){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,v,N):o.prototype&&o.prototype.isPureReactComponent?!sl(u,f)||!sl(h,v):!0}function Dp(i,o,u){var f=!1,h=Wr,v=o.contextType;return typeof v=="object"&&v!==null?v=Pn(v):(h=en(o)?Ai:It.current,f=o.contextTypes,v=(f=f!=null)?ms(i,h):Wr),o=new o(u,v),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=yl,i.stateNode=o,o._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=h,i.__reactInternalMemoizedMaskedChildContext=v),o}function Ip(i,o,u,f){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==i&&yl.enqueueReplaceState(o,o.state,null)}function ef(i,o,u,f){var h=i.stateNode;h.props=u,h.state=i.memoizedState,h.refs={},Ud(i);var v=o.contextType;typeof v=="object"&&v!==null?h.context=Pn(v):(v=en(o)?Ai:It.current,h.context=ms(i,v)),h.state=i.memoizedState,v=o.getDerivedStateFromProps,typeof v=="function"&&(Zd(i,o,v,u),h.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(o=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),o!==h.state&&yl.enqueueReplaceState(h,h.state,null),cl(i,u,h,f),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308)}function Es(i,o){try{var u="",f=o;do u+=Sv(f),f=f.return;while(f);var h=u}catch(v){h=`
69
+ Error generating stack: `+v.message+`
70
+ `+v.stack}return{value:i,source:o,stack:h,digest:null}}function tf(i,o,u){return{value:i,source:null,stack:u??null,digest:o??null}}function nf(i,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var Tv=typeof WeakMap=="function"?WeakMap:Map;function bp(i,o,u){u=kr(-1,u),u.tag=3,u.payload={element:null};var f=o.value;return u.callback=function(){Al||(Al=!0,kf=f),nf(i,o)},u}function jp(i,o,u){u=kr(-1,u),u.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var h=o.value;u.payload=function(){return f(h)},u.callback=function(){nf(i,o)}}var v=i.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(u.callback=function(){nf(i,o),typeof f!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var N=o.stack;this.componentDidCatch(o.value,{componentStack:N!==null?N:""})}),u}function zp(i,o,u){var f=i.pingCache;if(f===null){f=i.pingCache=new Tv;var h=new Set;f.set(o,h)}else h=f.get(o),h===void 0&&(h=new Set,f.set(o,h));h.has(u)||(h.add(u),i=Gv.bind(null,i,o,u),o.then(i,i))}function Up(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function Bp(i,o,u,f,h){return i.mode&1?(i.flags|=65536,i.lanes=h,i):(i===o?i.flags|=65536:(i.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=kr(-1,1),o.tag=2,Yr(u,o,1))),u.lanes|=1),i)}var Rv=c.ReactCurrentOwner,tn=!1;function Yt(i,o,u,f){o.child=i===null?op(o,null,u,f):Ss(o,i.child,u,f)}function Gp(i,o,u,f,h){u=u.render;var v=o.ref;return ws(o,h),f=Yd(i,o,u,f,v,h),u=Xd(),i!==null&&!tn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~h,Cr(i,o,h)):($e&&u&&Ld(o),o.flags|=1,Yt(i,o,f,h),o.child)}function Hp(i,o,u,f,h){if(i===null){var v=u.type;return typeof v=="function"&&!Rf(v)&&v.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=v,Vp(i,o,v,f,h)):(i=bl(u.type,null,f,o,o.mode,h),i.ref=o.ref,i.return=o,o.child=i)}if(v=i.child,!(i.lanes&h)){var N=v.memoizedProps;if(u=u.compare,u=u!==null?u:sl,u(N,f)&&i.ref===o.ref)return Cr(i,o,h)}return o.flags|=1,i=Jr(v,f),i.ref=o.ref,i.return=o,o.child=i}function Vp(i,o,u,f,h){if(i!==null){var v=i.memoizedProps;if(sl(v,f)&&i.ref===o.ref)if(tn=!1,o.pendingProps=f=v,(i.lanes&h)!==0)i.flags&131072&&(tn=!0);else return o.lanes=i.lanes,Cr(i,o,h)}return rf(i,o,u,f,h)}function Wp(i,o,u){var f=o.pendingProps,h=f.children,v=i!==null?i.memoizedState:null;if(f.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ve(Ns,gn),gn|=u;else{if(!(u&1073741824))return i=v!==null?v.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,Ve(Ns,gn),gn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:u,Ve(Ns,gn),gn|=f}else v!==null?(f=v.baseLanes|u,o.memoizedState=null):f=u,Ve(Ns,gn),gn|=f;return Yt(i,o,h,u),o.child}function Kp(i,o){var u=o.ref;(i===null&&u!==null||i!==null&&i.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function rf(i,o,u,f,h){var v=en(u)?Ai:It.current;return v=ms(o,v),ws(o,h),u=Yd(i,o,u,f,v,h),f=Xd(),i!==null&&!tn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~h,Cr(i,o,h)):($e&&f&&Ld(o),o.flags|=1,Yt(i,o,u,h),o.child)}function Yp(i,o,u,f,h){if(en(u)){var v=!0;qa(o)}else v=!1;if(ws(o,h),o.stateNode===null)_l(i,o),Dp(o,u,f),ef(o,u,f,h),f=!0;else if(i===null){var N=o.stateNode,D=o.memoizedProps;N.props=D;var z=N.context,J=u.contextType;typeof J=="object"&&J!==null?J=Pn(J):(J=en(u)?Ai:It.current,J=ms(o,J));var ae=u.getDerivedStateFromProps,_e=typeof ae=="function"||typeof N.getSnapshotBeforeUpdate=="function";_e||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(D!==f||z!==J)&&Ip(o,N,f,J),Kr=!1;var ne=o.memoizedState;N.state=ne,cl(o,f,N,h),z=o.memoizedState,D!==f||ne!==z||Zt.current||Kr?(typeof ae=="function"&&(Zd(o,u,ae,f),z=o.memoizedState),(D=Kr||Op(o,u,D,f,ne,z,J))?(_e||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(o.flags|=4194308)):(typeof N.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=z),N.props=f,N.state=z,N.context=J,f=D):(typeof N.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{N=o.stateNode,up(i,o),D=o.memoizedProps,J=o.type===o.elementType?D:Bn(o.type,D),N.props=J,_e=o.pendingProps,ne=N.context,z=u.contextType,typeof z=="object"&&z!==null?z=Pn(z):(z=en(u)?Ai:It.current,z=ms(o,z));var Xe=u.getDerivedStateFromProps;(ae=typeof Xe=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(D!==_e||ne!==z)&&Ip(o,N,f,z),Kr=!1,ne=o.memoizedState,N.state=ne,cl(o,f,N,h);var Ge=o.memoizedState;D!==_e||ne!==Ge||Zt.current||Kr?(typeof Xe=="function"&&(Zd(o,u,Xe,f),Ge=o.memoizedState),(J=Kr||Op(o,u,J,f,ne,Ge,z)||!1)?(ae||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(f,Ge,z),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(f,Ge,z)),typeof N.componentDidUpdate=="function"&&(o.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof N.componentDidUpdate!="function"||D===i.memoizedProps&&ne===i.memoizedState||(o.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ne===i.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=Ge),N.props=f,N.state=Ge,N.context=z,f=J):(typeof N.componentDidUpdate!="function"||D===i.memoizedProps&&ne===i.memoizedState||(o.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ne===i.memoizedState||(o.flags|=1024),f=!1)}return sf(i,o,u,f,v,h)}function sf(i,o,u,f,h,v){Kp(i,o);var N=(o.flags&128)!==0;if(!f&&!N)return h&&X1(o,u,!1),Cr(i,o,v);f=o.stateNode,Rv.current=o;var D=N&&typeof u.getDerivedStateFromError!="function"?null:f.render();return o.flags|=1,i!==null&&N?(o.child=Ss(o,i.child,null,v),o.child=Ss(o,null,D,v)):Yt(i,o,D,v),o.memoizedState=f.state,h&&X1(o,u,!0),o.child}function Xp(i){var o=i.stateNode;o.pendingContext?K1(i,o.pendingContext,o.pendingContext!==o.context):o.context&&K1(i,o.context,!1),Bd(i,o.containerInfo)}function Qp(i,o,u,f,h){return _s(),Od(h),o.flags|=256,Yt(i,o,u,f),o.child}var of={dehydrated:null,treeContext:null,retryLane:0};function af(i){return{baseLanes:i,cachePool:null,transitions:null}}function qp(i,o,u){var f=o.pendingProps,h=nt.current,v=!1,N=(o.flags&128)!==0,D;if((D=N)||(D=i!==null&&i.memoizedState===null?!1:(h&2)!==0),D?(v=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(h|=1),Ve(nt,h&1),i===null)return Md(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?(o.mode&1?vd(i)?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(N=f.children,i=f.fallback,v?(f=o.mode,v=o.child,N={mode:"hidden",children:N},!(f&1)&&v!==null?(v.childLanes=0,v.pendingProps=N):v=jl(N,f,0,null),i=Ui(i,f,u,null),v.return=o,i.return=o,v.sibling=i,o.child=v,o.child.memoizedState=af(u),o.memoizedState=of,i):lf(o,N));if(h=i.memoizedState,h!==null&&(D=h.dehydrated,D!==null))return Lv(i,o,N,f,D,h,u);if(v){v=f.fallback,N=o.mode,h=i.child,D=h.sibling;var z={mode:"hidden",children:f.children};return!(N&1)&&o.child!==h?(f=o.child,f.childLanes=0,f.pendingProps=z,o.deletions=null):(f=Jr(h,z),f.subtreeFlags=h.subtreeFlags&14680064),D!==null?v=Jr(D,v):(v=Ui(v,N,u,null),v.flags|=2),v.return=o,f.return=o,f.sibling=v,o.child=f,f=v,v=o.child,N=i.child.memoizedState,N=N===null?af(u):{baseLanes:N.baseLanes|u,cachePool:null,transitions:N.transitions},v.memoizedState=N,v.childLanes=i.childLanes&~u,o.memoizedState=of,f}return v=i.child,i=v.sibling,f=Jr(v,{mode:"visible",children:f.children}),!(o.mode&1)&&(f.lanes=u),f.return=o,f.sibling=null,i!==null&&(u=o.deletions,u===null?(o.deletions=[i],o.flags|=16):u.push(i)),o.child=f,o.memoizedState=null,f}function lf(i,o){return o=jl({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function vl(i,o,u,f){return f!==null&&Od(f),Ss(o,i.child,null,u),i=lf(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function Lv(i,o,u,f,h,v,N){if(u)return o.flags&256?(o.flags&=-257,f=tf(Error(l(422))),vl(i,o,N,f)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(v=f.fallback,h=o.mode,f=jl({mode:"visible",children:f.children},h,0,null),v=Ui(v,h,N,null),v.flags|=2,f.return=o,v.return=o,f.sibling=v,o.child=f,o.mode&1&&Ss(o,i.child,null,N),o.child.memoizedState=af(N),o.memoizedState=of,v);if(!(o.mode&1))return vl(i,o,N,null);if(vd(h))return f=H3(h).digest,v=Error(l(419)),f=tf(v,f,void 0),vl(i,o,N,f);if(u=(N&i.childLanes)!==0,tn||u){if(f=Pt,f!==null){switch(N&-N){case 4:h=2;break;case 16:h=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:h=32;break;case 536870912:h=268435456;break;default:h=0}h=h&(f.suspendedLanes|N)?0:h,h!==0&&h!==v.retryLane&&(v.retryLane=h,ir(i,h),Rn(f,i,h,-1))}return Tf(),f=tf(Error(l(421))),vl(i,o,N,f)}return W1(h)?(o.flags|=128,o.child=i.child,o=Hv.bind(null,i),V3(h,o),null):(i=v.treeContext,xe&&(En=Y3(h),pn=o,$e=!0,Un=null,Co=!1,i!==null&&(kn[Cn++]=xr,kn[Cn++]=wr,kn[Cn++]=Fi,xr=i.id,wr=i.overflow,Fi=o)),o=lf(o,f.children),o.flags|=4096,o)}function $p(i,o,u){i.lanes|=o;var f=i.alternate;f!==null&&(f.lanes|=o),jd(i.return,o,u)}function uf(i,o,u,f,h){var v=i.memoizedState;v===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:h}:(v.isBackwards=o,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=u,v.tailMode=h)}function Jp(i,o,u){var f=o.pendingProps,h=f.revealOrder,v=f.tail;if(Yt(i,o,f.children,u),f=nt.current,f&2)f=f&1|2,o.flags|=128;else{if(i!==null&&i.flags&128)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&$p(i,u,o);else if(i.tag===19)$p(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(Ve(nt,f),!(o.mode&1))o.memoizedState=null;else switch(h){case"forwards":for(u=o.child,h=null;u!==null;)i=u.alternate,i!==null&&dl(i)===null&&(h=u),u=u.sibling;u=h,u===null?(h=o.child,o.child=null):(h=u.sibling,u.sibling=null),uf(o,!1,h,u,v);break;case"backwards":for(u=null,h=o.child,o.child=null;h!==null;){if(i=h.alternate,i!==null&&dl(i)===null){o.child=h;break}i=h.sibling,h.sibling=u,u=h,h=i}uf(o,!0,u,null,v);break;case"together":uf(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function _l(i,o){!(o.mode&1)&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Cr(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Ii|=o.lanes,!(u&o.childLanes))return null;if(i!==null&&o.child!==i.child)throw Error(l(153));if(o.child!==null){for(i=o.child,u=Jr(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=Jr(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function Av(i,o,u){switch(o.tag){case 3:Xp(o),_s();break;case 5:fp(o);break;case 1:en(o.type)&&qa(o);break;case 4:Bd(o,o.stateNode.containerInfo);break;case 10:ap(o,o.type._context,o.memoizedProps.value);break;case 13:var f=o.memoizedState;if(f!==null)return f.dehydrated!==null?(Ve(nt,nt.current&1),o.flags|=128,null):u&o.child.childLanes?qp(i,o,u):(Ve(nt,nt.current&1),i=Cr(i,o,u),i!==null?i.sibling:null);Ve(nt,nt.current&1);break;case 19:if(f=(u&o.childLanes)!==0,i.flags&128){if(f)return Jp(i,o,u);o.flags|=128}var h=o.memoizedState;if(h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ve(nt,nt.current),f)break;return null;case 22:case 23:return o.lanes=0,Wp(i,o,u)}return Cr(i,o,u)}function ar(i){i.flags|=4}function Zp(i,o){if(i!==null&&i.child===o.child)return!0;if(o.flags&16)return!1;for(i=o.child;i!==null;){if(i.flags&12854||i.subtreeFlags&12854)return!1;i=i.sibling}return!0}var Fo,Mo,Sl,xl;if(ge)Fo=function(i,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)te(i,u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Mo=function(){},Sl=function(i,o,u,f,h){if(i=i.memoizedProps,i!==f){var v=o.stateNode,N=sr(Nn.current);u=Be(v,u,i,f,h,N),(o.updateQueue=u)&&ar(o)}},xl=function(i,o,u,f){u!==f&&ar(o)};else if(fe){Fo=function(i,o,u,f){for(var h=o.child;h!==null;){if(h.tag===5){var v=h.stateNode;u&&f&&(v=H1(v,h.type,h.memoizedProps,h)),te(i,v)}else if(h.tag===6)v=h.stateNode,u&&f&&(v=V1(v,h.memoizedProps,h)),te(i,v);else if(h.tag!==4){if(h.tag===22&&h.memoizedState!==null)v=h.child,v!==null&&(v.return=h),Fo(i,h,!0,!0);else if(h.child!==null){h.child.return=h,h=h.child;continue}}if(h===o)break;for(;h.sibling===null;){if(h.return===null||h.return===o)return;h=h.return}h.sibling.return=h.return,h=h.sibling}};var eg=function(i,o,u,f){for(var h=o.child;h!==null;){if(h.tag===5){var v=h.stateNode;u&&f&&(v=H1(v,h.type,h.memoizedProps,h)),G1(i,v)}else if(h.tag===6)v=h.stateNode,u&&f&&(v=V1(v,h.memoizedProps,h)),G1(i,v);else if(h.tag!==4){if(h.tag===22&&h.memoizedState!==null)v=h.child,v!==null&&(v.return=h),eg(i,h,!0,!0);else if(h.child!==null){h.child.return=h,h=h.child;continue}}if(h===o)break;for(;h.sibling===null;){if(h.return===null||h.return===o)return;h=h.return}h.sibling.return=h.return,h=h.sibling}};Mo=function(i,o){var u=o.stateNode;if(!Zp(i,o)){i=u.containerInfo;var f=B1(i);eg(f,o,!1,!1),u.pendingChildren=f,ar(o),z3(i,f)}},Sl=function(i,o,u,f,h){var v=i.stateNode,N=i.memoizedProps;if((i=Zp(i,o))&&N===f)o.stateNode=v;else{var D=o.stateNode,z=sr(Nn.current),J=null;N!==f&&(J=Be(D,u,N,f,h,z)),i&&J===null?o.stateNode=v:(v=j3(v,J,u,N,f,o,i,D),we(v,u,f,h,z)&&ar(o),o.stateNode=v,i?ar(o):Fo(v,o,!1,!1))}},xl=function(i,o,u,f){u!==f?(i=sr(ks.current),u=sr(Nn.current),o.stateNode=je(f,i,u,o),ar(o)):o.stateNode=i.stateNode}}else Mo=function(){},Sl=function(){},xl=function(){};function Oo(i,o){if(!$e)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function jt(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,f=0;if(o)for(var h=i.child;h!==null;)u|=h.lanes|h.childLanes,f|=h.subtreeFlags&14680064,f|=h.flags&14680064,h.return=i,h=h.sibling;else for(h=i.child;h!==null;)u|=h.lanes|h.childLanes,f|=h.subtreeFlags,f|=h.flags,h.return=i,h=h.sibling;return i.subtreeFlags|=f,i.childLanes=u,o}function Fv(i,o,u){var f=o.pendingProps;switch(Ad(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jt(o),null;case 1:return en(o.type)&&Qa(),jt(o),null;case 3:return u=o.stateNode,Cs(),Ye(Zt),Ye(It),Vd(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(il(o)?ar(o):i===null||i.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,Un!==null&&(Pf(Un),Un=null))),Mo(i,o),jt(o),null;case 5:Gd(o),u=sr(ks.current);var h=o.type;if(i!==null&&o.stateNode!=null)Sl(i,o,h,f,u),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!f){if(o.stateNode===null)throw Error(l(166));return jt(o),null}if(i=sr(Nn.current),il(o)){if(!xe)throw Error(l(175));i=X3(o.stateNode,o.type,o.memoizedProps,u,i,o,!Co),o.updateQueue=i,i!==null&&ar(o)}else{var v=q(h,f,u,i,o);Fo(v,o,!1,!1),o.stateNode=v,we(v,h,f,u,i)&&ar(o)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return jt(o),null;case 6:if(i&&o.stateNode!=null)xl(i,o,i.memoizedProps,f);else{if(typeof f!="string"&&o.stateNode===null)throw Error(l(166));if(i=sr(ks.current),u=sr(Nn.current),il(o)){if(!xe)throw Error(l(176));if(i=o.stateNode,u=o.memoizedProps,(f=Q3(i,u,o,!Co))&&(h=pn,h!==null))switch(h.tag){case 3:rv(h.stateNode.containerInfo,i,u,(h.mode&1)!==0);break;case 5:iv(h.type,h.memoizedProps,h.stateNode,i,u,(h.mode&1)!==0)}f&&ar(o)}else o.stateNode=je(f,i,u,o)}return jt(o),null;case 13:if(Ye(nt),f=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if($e&&En!==null&&o.mode&1&&!(o.flags&128))rp(),_s(),o.flags|=98560,h=!1;else if(h=il(o),f!==null&&f.dehydrated!==null){if(i===null){if(!h)throw Error(l(318));if(!xe)throw Error(l(344));if(h=o.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));q3(h,o)}else _s(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;jt(o),h=!1}else Un!==null&&(Pf(Un),Un=null),h=!0;if(!h)return o.flags&65536?o:null}return o.flags&128?(o.lanes=u,o):(u=f!==null,u!==(i!==null&&i.memoizedState!==null)&&u&&(o.child.flags|=8192,o.mode&1&&(i===null||nt.current&1?vt===0&&(vt=3):Tf())),o.updateQueue!==null&&(o.flags|=4),jt(o),null);case 4:return Cs(),Mo(i,o),i===null&&Me(o.stateNode.containerInfo),jt(o),null;case 10:return bd(o.type._context),jt(o),null;case 17:return en(o.type)&&Qa(),jt(o),null;case 19:if(Ye(nt),h=o.memoizedState,h===null)return jt(o),null;if(f=(o.flags&128)!==0,v=h.rendering,v===null)if(f)Oo(h,!1);else{if(vt!==0||i!==null&&i.flags&128)for(i=o.child;i!==null;){if(v=dl(i),v!==null){for(o.flags|=128,Oo(h,!1),i=v.updateQueue,i!==null&&(o.updateQueue=i,o.flags|=4),o.subtreeFlags=0,i=u,u=o.child;u!==null;)f=u,h=i,f.flags&=14680066,v=f.alternate,v===null?(f.childLanes=0,f.lanes=h,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=v.childLanes,f.lanes=v.lanes,f.child=v.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=v.memoizedProps,f.memoizedState=v.memoizedState,f.updateQueue=v.updateQueue,f.type=v.type,h=v.dependencies,f.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),u=u.sibling;return Ve(nt,nt.current&1|2),o.child}i=i.sibling}h.tail!==null&&Ct()>wf&&(o.flags|=128,f=!0,Oo(h,!1),o.lanes=4194304)}else{if(!f)if(i=dl(v),i!==null){if(o.flags|=128,f=!0,i=i.updateQueue,i!==null&&(o.updateQueue=i,o.flags|=4),Oo(h,!0),h.tail===null&&h.tailMode==="hidden"&&!v.alternate&&!$e)return jt(o),null}else 2*Ct()-h.renderingStartTime>wf&&u!==1073741824&&(o.flags|=128,f=!0,Oo(h,!1),o.lanes=4194304);h.isBackwards?(v.sibling=o.child,o.child=v):(i=h.last,i!==null?i.sibling=v:o.child=v,h.last=v)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=Ct(),o.sibling=null,i=nt.current,Ve(nt,f?i&1|2:i&1),o):(jt(o),null);case 22:case 23:return Nf(),u=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==u&&(o.flags|=8192),u&&o.mode&1?gn&1073741824&&(jt(o),ge&&o.subtreeFlags&6&&(o.flags|=8192)):jt(o),null;case 24:return null;case 25:return null}throw Error(l(156,o.tag))}function Mv(i,o){switch(Ad(o),o.tag){case 1:return en(o.type)&&Qa(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Cs(),Ye(Zt),Ye(It),Vd(),i=o.flags,i&65536&&!(i&128)?(o.flags=i&-65537|128,o):null;case 5:return Gd(o),null;case 13:if(Ye(nt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(l(340));_s()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Ye(nt),null;case 4:return Cs(),null;case 10:return bd(o.type._context),null;case 22:case 23:return Nf(),null;case 24:return null;default:return null}}var wl=!1,zt=!1,Ov=typeof WeakSet=="function"?WeakSet:Set,se=null;function Ps(i,o){var u=i.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){Je(i,o,f)}else u.current=null}function cf(i,o,u){try{u()}catch(f){Je(i,o,f)}}var tg=!1;function Dv(i,o){for(Z(i.containerInfo),se=o;se!==null;)if(i=se,o=i.child,(i.subtreeFlags&1028)!==0&&o!==null)o.return=i,se=o;else for(;se!==null;){i=se;try{var u=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(u!==null){var f=u.memoizedProps,h=u.memoizedState,v=i.stateNode,N=v.getSnapshotBeforeUpdate(i.elementType===i.type?f:Bn(i.type,f),h);v.__reactInternalSnapshotBeforeUpdate=N}break;case 3:ge&&b3(i.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(D){Je(i,i.return,D)}if(o=i.sibling,o!==null){o.return=i.return,se=o;break}se=i.return}return u=tg,tg=!1,u}function Do(i,o,u){var f=o.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var h=f=f.next;do{if((h.tag&i)===i){var v=h.destroy;h.destroy=void 0,v!==void 0&&cf(o,u,v)}h=h.next}while(h!==f)}}function kl(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&i)===i){var f=u.create;u.destroy=f()}u=u.next}while(u!==o)}}function df(i){var o=i.ref;if(o!==null){var u=i.stateNode;switch(i.tag){case 5:i=ce(u);break;default:i=u}typeof o=="function"?o(i):o.current=i}}function ng(i){var o=i.alternate;o!==null&&(i.alternate=null,ng(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&$(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function rg(i){return i.tag===5||i.tag===3||i.tag===4}function ig(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||rg(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ff(i,o,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?L3(u,i,o):E3(u,i);else if(f!==4&&(i=i.child,i!==null))for(ff(i,o,u),i=i.sibling;i!==null;)ff(i,o,u),i=i.sibling}function hf(i,o,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?R3(u,i,o):C3(u,i);else if(f!==4&&(i=i.child,i!==null))for(hf(i,o,u),i=i.sibling;i!==null;)hf(i,o,u),i=i.sibling}var At=null,Gn=!1;function lr(i,o,u){for(u=u.child;u!==null;)pf(i,o,u),u=u.sibling}function pf(i,o,u){if(nr&&typeof nr.onCommitFiberUnmount=="function")try{nr.onCommitFiberUnmount(el,u)}catch{}switch(u.tag){case 5:zt||Ps(u,o);case 6:if(ge){var f=At,h=Gn;At=null,lr(i,o,u),At=f,Gn=h,At!==null&&(Gn?F3(At,u.stateNode):A3(At,u.stateNode))}else lr(i,o,u);break;case 18:ge&&At!==null&&(Gn?tv(At,u.stateNode):ev(At,u.stateNode));break;case 4:ge?(f=At,h=Gn,At=u.stateNode.containerInfo,Gn=!0,lr(i,o,u),At=f,Gn=h):(fe&&(f=u.stateNode.containerInfo,h=B1(f),yd(f,h)),lr(i,o,u));break;case 0:case 11:case 14:case 15:if(!zt&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){h=f=f.next;do{var v=h,N=v.destroy;v=v.tag,N!==void 0&&(v&2||v&4)&&cf(u,o,N),h=h.next}while(h!==f)}lr(i,o,u);break;case 1:if(!zt&&(Ps(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(D){Je(u,o,D)}lr(i,o,u);break;case 21:lr(i,o,u);break;case 22:u.mode&1?(zt=(f=zt)||u.memoizedState!==null,lr(i,o,u),zt=f):lr(i,o,u);break;default:lr(i,o,u)}}function sg(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var u=i.stateNode;u===null&&(u=i.stateNode=new Ov),o.forEach(function(f){var h=Vv.bind(null,i,f);u.has(f)||(u.add(f),f.then(h,h))})}}function Hn(i,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var h=u[f];try{var v=i,N=o;if(ge){var D=N;e:for(;D!==null;){switch(D.tag){case 5:At=D.stateNode,Gn=!1;break e;case 3:At=D.stateNode.containerInfo,Gn=!0;break e;case 4:At=D.stateNode.containerInfo,Gn=!0;break e}D=D.return}if(At===null)throw Error(l(160));pf(v,N,h),At=null,Gn=!1}else pf(v,N,h);var z=h.alternate;z!==null&&(z.return=null),h.return=null}catch(J){Je(h,o,J)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)og(o,i),o=o.sibling}function og(i,o){var u=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Hn(o,i),ur(i),f&4){try{Do(3,i,i.return),kl(3,i)}catch(ne){Je(i,i.return,ne)}try{Do(5,i,i.return)}catch(ne){Je(i,i.return,ne)}}break;case 1:Hn(o,i),ur(i),f&512&&u!==null&&Ps(u,u.return);break;case 5:if(Hn(o,i),ur(i),f&512&&u!==null&&Ps(u,u.return),ge){if(i.flags&32){var h=i.stateNode;try{U1(h)}catch(ne){Je(i,i.return,ne)}}if(f&4&&(h=i.stateNode,h!=null)){var v=i.memoizedProps;if(u=u!==null?u.memoizedProps:v,f=i.type,o=i.updateQueue,i.updateQueue=null,o!==null)try{T3(h,o,f,u,v,i)}catch(ne){Je(i,i.return,ne)}}}break;case 6:if(Hn(o,i),ur(i),f&4&&ge){if(i.stateNode===null)throw Error(l(162));h=i.stateNode,v=i.memoizedProps,u=u!==null?u.memoizedProps:v;try{P3(h,u,v)}catch(ne){Je(i,i.return,ne)}}break;case 3:if(Hn(o,i),ur(i),f&4){if(ge&&xe&&u!==null&&u.memoizedState.isDehydrated)try{J3(o.containerInfo)}catch(ne){Je(i,i.return,ne)}if(fe){h=o.containerInfo,v=o.pendingChildren;try{yd(h,v)}catch(ne){Je(i,i.return,ne)}}}break;case 4:if(Hn(o,i),ur(i),f&4&&fe){v=i.stateNode,h=v.containerInfo,v=v.pendingChildren;try{yd(h,v)}catch(ne){Je(i,i.return,ne)}}break;case 13:Hn(o,i),ur(i),h=i.child,h.flags&8192&&(v=h.memoizedState!==null,h.stateNode.isHidden=v,!v||h.alternate!==null&&h.alternate.memoizedState!==null||(xf=Ct())),f&4&&sg(i);break;case 22:var N=u!==null&&u.memoizedState!==null;if(i.mode&1?(zt=(u=zt)||N,Hn(o,i),zt=u):Hn(o,i),ur(i),f&8192){if(u=i.memoizedState!==null,(i.stateNode.isHidden=u)&&!N&&i.mode&1)for(se=i,f=i.child;f!==null;){for(o=se=f;se!==null;){N=se;var D=N.child;switch(N.tag){case 0:case 11:case 14:case 15:Do(4,N,N.return);break;case 1:Ps(N,N.return);var z=N.stateNode;if(typeof z.componentWillUnmount=="function"){var J=N,ae=N.return;try{var _e=J;z.props=_e.memoizedProps,z.state=_e.memoizedState,z.componentWillUnmount()}catch(ne){Je(J,ae,ne)}}break;case 5:Ps(N,N.return);break;case 22:if(N.memoizedState!==null){ug(o);continue}}D!==null?(D.return=N,se=D):ug(o)}f=f.sibling}if(ge){e:if(f=null,ge)for(o=i;;){if(o.tag===5){if(f===null){f=o;try{h=o.stateNode,u?M3(h):D3(o.stateNode,o.memoizedProps)}catch(ne){Je(i,i.return,ne)}}}else if(o.tag===6){if(f===null)try{v=o.stateNode,u?O3(v):I3(v,o.memoizedProps)}catch(ne){Je(i,i.return,ne)}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;f===o&&(f=null),o=o.return}f===o&&(f=null),o.sibling.return=o.return,o=o.sibling}}}break;case 19:Hn(o,i),ur(i),f&4&&sg(i);break;case 21:break;default:Hn(o,i),ur(i)}}function ur(i){var o=i.flags;if(o&2){try{if(ge){e:{for(var u=i.return;u!==null;){if(rg(u)){var f=u;break e}u=u.return}throw Error(l(160))}switch(f.tag){case 5:var h=f.stateNode;f.flags&32&&(U1(h),f.flags&=-33);var v=ig(i);hf(i,v,h);break;case 3:case 4:var N=f.stateNode.containerInfo,D=ig(i);ff(i,D,N);break;default:throw Error(l(161))}}}catch(z){Je(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function Iv(i,o,u){se=i,ag(i)}function ag(i,o,u){for(var f=(i.mode&1)!==0;se!==null;){var h=se,v=h.child;if(h.tag===22&&f){var N=h.memoizedState!==null||wl;if(!N){var D=h.alternate,z=D!==null&&D.memoizedState!==null||zt;D=wl;var J=zt;if(wl=N,(zt=z)&&!J)for(se=h;se!==null;)N=se,z=N.child,N.tag===22&&N.memoizedState!==null?cg(h):z!==null?(z.return=N,se=z):cg(h);for(;v!==null;)se=v,ag(v),v=v.sibling;se=h,wl=D,zt=J}lg(i)}else h.subtreeFlags&8772&&v!==null?(v.return=h,se=v):lg(i)}}function lg(i){for(;se!==null;){var o=se;if(o.flags&8772){var u=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:zt||kl(5,o);break;case 1:var f=o.stateNode;if(o.flags&4&&!zt)if(u===null)f.componentDidMount();else{var h=o.elementType===o.type?u.memoizedProps:Bn(o.type,u.memoizedProps);f.componentDidUpdate(h,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=o.updateQueue;v!==null&&dp(o,v,f);break;case 3:var N=o.updateQueue;if(N!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=ce(o.child.stateNode);break;case 1:u=o.child.stateNode}dp(o,N,u)}break;case 5:var D=o.stateNode;u===null&&o.flags&4&&N3(D,o.type,o.memoizedProps,o);break;case 6:break;case 4:break;case 12:break;case 13:if(xe&&o.memoizedState===null){var z=o.alternate;if(z!==null){var J=z.memoizedState;if(J!==null){var ae=J.dehydrated;ae!==null&&Z3(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}zt||o.flags&512&&df(o)}catch(_e){Je(o,o.return,_e)}}if(o===i){se=null;break}if(u=o.sibling,u!==null){u.return=o.return,se=u;break}se=o.return}}function ug(i){for(;se!==null;){var o=se;if(o===i){se=null;break}var u=o.sibling;if(u!==null){u.return=o.return,se=u;break}se=o.return}}function cg(i){for(;se!==null;){var o=se;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{kl(4,o)}catch(z){Je(o,u,z)}break;case 1:var f=o.stateNode;if(typeof f.componentDidMount=="function"){var h=o.return;try{f.componentDidMount()}catch(z){Je(o,h,z)}}var v=o.return;try{df(o)}catch(z){Je(o,v,z)}break;case 5:var N=o.return;try{df(o)}catch(z){Je(o,N,z)}}}catch(z){Je(o,o.return,z)}if(o===i){se=null;break}var D=o.sibling;if(D!==null){D.return=o.return,se=D;break}se=o.return}}var Cl=0,El=1,Pl=2,Nl=3,Tl=4;if(typeof Symbol=="function"&&Symbol.for){var Io=Symbol.for;Cl=Io("selector.component"),El=Io("selector.has_pseudo_class"),Pl=Io("selector.role"),Nl=Io("selector.test_id"),Tl=Io("selector.text")}function gf(i){var o=Lt(i);if(o!=null){if(typeof o.memoizedProps["data-testname"]!="string")throw Error(l(364));return o}if(i=tt(i),i===null)throw Error(l(362));return i.stateNode.current}function mf(i,o){switch(o.$$typeof){case Cl:if(i.type===o.value)return!0;break;case El:e:{o=o.value,i=[i,0];for(var u=0;u<i.length;){var f=i[u++],h=i[u++],v=o[h];if(f.tag!==5||!Li(f)){for(;v!=null&&mf(f,v);)h++,v=o[h];if(h===o.length){o=!0;break e}else for(f=f.child;f!==null;)i.push(f,h),f=f.sibling}}o=!1}return o;case Pl:if(i.tag===5&&x3(i.stateNode,o.value))return!0;break;case Tl:if((i.tag===5||i.tag===6)&&(i=_r(i),i!==null&&0<=i.indexOf(o.value)))return!0;break;case Nl:if(i.tag===5&&(i=i.memoizedProps["data-testname"],typeof i=="string"&&i.toLowerCase()===o.value.toLowerCase()))return!0;break;default:throw Error(l(365))}return!1}function yf(i){switch(i.$$typeof){case Cl:return"<"+(M(i.value)||"Unknown")+">";case El:return":has("+(yf(i)||"")+")";case Pl:return'[role="'+i.value+'"]';case Tl:return'"'+i.value+'"';case Nl:return'[data-testname="'+i.value+'"]';default:throw Error(l(365))}}function dg(i,o){var u=[];i=[i,0];for(var f=0;f<i.length;){var h=i[f++],v=i[f++],N=o[v];if(h.tag!==5||!Li(h)){for(;N!=null&&mf(h,N);)v++,N=o[v];if(v===o.length)u.push(h);else for(h=h.child;h!==null;)i.push(h,v),h=h.sibling}}return u}function vf(i,o){if(!Re)throw Error(l(363));i=gf(i),i=dg(i,o),o=[],i=Array.from(i);for(var u=0;u<i.length;){var f=i[u++];if(f.tag===5)Li(f)||o.push(f.stateNode);else for(f=f.child;f!==null;)i.push(f),f=f.sibling}return o}var bv=Math.ceil,Rl=c.ReactCurrentDispatcher,_f=c.ReactCurrentOwner,dt=c.ReactCurrentBatchConfig,Ee=0,Pt=null,gt=null,Ft=0,gn=0,Ns=Vr(0),vt=0,bo=null,Ii=0,Ll=0,Sf=0,jo=null,nn=null,xf=0,wf=1/0,Er=null;function Ts(){wf=Ct()+500}var Al=!1,kf=null,Xr=null,Fl=!1,Qr=null,Ml=0,zo=0,Cf=null,Ol=-1,Dl=0;function Ut(){return Ee&6?Ct():Ol!==-1?Ol:Ol=Ct()}function qr(i){return i.mode&1?Ee&2&&Ft!==0?Ft&-Ft:_v.transition!==null?(Dl===0&&(Dl=Q1()),Dl):(i=Oe,i!==0?i:tr()):1}function Rn(i,o,u,f){if(50<zo)throw zo=0,Cf=null,Error(l(185));ko(i,u,f),(!(Ee&2)||i!==Pt)&&(i===Pt&&(!(Ee&2)&&(Ll|=u),vt===4&&$r(i,Ft)),rn(i,f),u===1&&Ee===0&&!(o.mode&1)&&(Ts(),tl&&rr()))}function rn(i,o){var u=i.callbackNode;cv(i,o);var f=Za(i,i===Pt?Ft:0);if(f===0)u!==null&&$1(u),i.callbackNode=null,i.callbackPriority=0;else if(o=f&-f,i.callbackPriority!==o){if(u!=null&&$1(u),o===1)i.tag===0?vv(hg.bind(null,i)):J1(hg.bind(null,i)),le?me(function(){!(Ee&6)&&rr()}):Pd(Nd,rr),u=null;else{switch(q1(f)){case 1:u=Nd;break;case 4:u=pv;break;case 16:u=Td;break;case 536870912:u=gv;break;default:u=Td}u=wg(u,fg.bind(null,i))}i.callbackPriority=o,i.callbackNode=u}}function fg(i,o){if(Ol=-1,Dl=0,Ee&6)throw Error(l(327));var u=i.callbackNode;if(zi()&&i.callbackNode!==u)return null;var f=Za(i,i===Pt?Ft:0);if(f===0)return null;if(f&30||f&i.expiredLanes||o)o=Il(i,f);else{o=f;var h=Ee;Ee|=2;var v=mg();(Pt!==i||Ft!==o)&&(Er=null,Ts(),bi(i,o));do try{Uv();break}catch(D){gg(i,D)}while(!0);Id(),Rl.current=v,Ee=h,gt!==null?o=0:(Pt=null,Ft=0,o=vt)}if(o!==0){if(o===2&&(h=kd(i),h!==0&&(f=h,o=Ef(i,h))),o===1)throw u=bo,bi(i,0),$r(i,f),rn(i,Ct()),u;if(o===6)$r(i,f);else{if(h=i.current.alternate,!(f&30)&&!jv(h)&&(o=Il(i,f),o===2&&(v=kd(i),v!==0&&(f=v,o=Ef(i,v))),o===1))throw u=bo,bi(i,0),$r(i,f),rn(i,Ct()),u;switch(i.finishedWork=h,i.finishedLanes=f,o){case 0:case 1:throw Error(l(345));case 2:ji(i,nn,Er);break;case 3:if($r(i,f),(f&130023424)===f&&(o=xf+500-Ct(),10<o)){if(Za(i,0)!==0)break;if(h=i.suspendedLanes,(h&f)!==f){Ut(),i.pingedLanes|=i.suspendedLanes&h;break}i.timeoutHandle=O(ji.bind(null,i,nn,Er),o);break}ji(i,nn,Er);break;case 4:if($r(i,f),(f&4194240)===f)break;for(o=i.eventTimes,h=-1;0<f;){var N=31-jn(f);v=1<<N,N=o[N],N>h&&(h=N),f&=~v}if(f=h,f=Ct()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*bv(f/1960))-f,10<f){i.timeoutHandle=O(ji.bind(null,i,nn,Er),f);break}ji(i,nn,Er);break;case 5:ji(i,nn,Er);break;default:throw Error(l(329))}}}return rn(i,Ct()),i.callbackNode===u?fg.bind(null,i):null}function Ef(i,o){var u=jo;return i.current.memoizedState.isDehydrated&&(bi(i,o).flags|=256),i=Il(i,o),i!==2&&(o=nn,nn=u,o!==null&&Pf(o)),i}function Pf(i){nn===null?nn=i:nn.push.apply(nn,i)}function jv(i){for(var o=i;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var h=u[f],v=h.getSnapshot;h=h.value;try{if(!zn(v(),h))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function $r(i,o){for(o&=~Sf,o&=~Ll,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var u=31-jn(o),f=1<<u;i[u]=-1,o&=~f}}function hg(i){if(Ee&6)throw Error(l(327));zi();var o=Za(i,0);if(!(o&1))return rn(i,Ct()),null;var u=Il(i,o);if(i.tag!==0&&u===2){var f=kd(i);f!==0&&(o=f,u=Ef(i,f))}if(u===1)throw u=bo,bi(i,0),$r(i,o),rn(i,Ct()),u;if(u===6)throw Error(l(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,ji(i,nn,Er),rn(i,Ct()),null}function pg(i){Qr!==null&&Qr.tag===0&&!(Ee&6)&&zi();var o=Ee;Ee|=1;var u=dt.transition,f=Oe;try{if(dt.transition=null,Oe=1,i)return i()}finally{Oe=f,dt.transition=u,Ee=o,!(Ee&6)&&rr()}}function Nf(){gn=Ns.current,Ye(Ns)}function bi(i,o){i.finishedWork=null,i.finishedLanes=0;var u=i.timeoutHandle;if(u!==ue&&(i.timeoutHandle=ue,K(u)),gt!==null)for(u=gt.return;u!==null;){var f=u;switch(Ad(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Qa();break;case 3:Cs(),Ye(Zt),Ye(It),Vd();break;case 5:Gd(f);break;case 4:Cs();break;case 13:Ye(nt);break;case 19:Ye(nt);break;case 10:bd(f.type._context);break;case 22:case 23:Nf()}u=u.return}if(Pt=i,gt=i=Jr(i.current,null),Ft=gn=o,vt=0,bo=null,Sf=Ll=Ii=0,nn=jo=null,Oi!==null){for(o=0;o<Oi.length;o++)if(u=Oi[o],f=u.interleaved,f!==null){u.interleaved=null;var h=f.next,v=u.pending;if(v!==null){var N=v.next;v.next=h,f.next=N}u.pending=f}Oi=null}return i}function gg(i,o){do{var u=gt;try{if(Id(),fl.current=ml,hl){for(var f=rt.memoizedState;f!==null;){var h=f.queue;h!==null&&(h.pending=null),f=f.next}hl=!1}if(Di=0,Et=yt=rt=null,To=!1,Ro=0,_f.current=null,u===null||u.return===null){vt=1,bo=o,gt=null;break}e:{var v=i,N=u.return,D=u,z=o;if(o=Ft,D.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var J=z,ae=D,_e=ae.tag;if(!(ae.mode&1)&&(_e===0||_e===11||_e===15)){var ne=ae.alternate;ne?(ae.updateQueue=ne.updateQueue,ae.memoizedState=ne.memoizedState,ae.lanes=ne.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var Xe=Up(N);if(Xe!==null){Xe.flags&=-257,Bp(Xe,N,D,v,o),Xe.mode&1&&zp(v,J,o),o=Xe,z=J;var Ge=o.updateQueue;if(Ge===null){var sn=new Set;sn.add(z),o.updateQueue=sn}else Ge.add(z);break e}else{if(!(o&1)){zp(v,J,o),Tf();break e}z=Error(l(426))}}else if($e&&D.mode&1){var Pr=Up(N);if(Pr!==null){!(Pr.flags&65536)&&(Pr.flags|=256),Bp(Pr,N,D,v,o),Od(Es(z,D));break e}}v=z=Es(z,D),vt!==4&&(vt=2),jo===null?jo=[v]:jo.push(v),v=N;do{switch(v.tag){case 3:v.flags|=65536,o&=-o,v.lanes|=o;var j=bp(v,z,o);cp(v,j);break e;case 1:D=z;var I=v.type,H=v.stateNode;if(!(v.flags&128)&&(typeof I.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(Xr===null||!Xr.has(H)))){v.flags|=65536,o&=-o,v.lanes|=o;var re=jp(v,D,o);cp(v,re);break e}}v=v.return}while(v!==null)}vg(u)}catch(de){o=de,gt===u&&u!==null&&(gt=u=u.return);continue}break}while(!0)}function mg(){var i=Rl.current;return Rl.current=ml,i===null?ml:i}function Tf(){(vt===0||vt===3||vt===2)&&(vt=4),Pt===null||!(Ii&268435455)&&!(Ll&268435455)||$r(Pt,Ft)}function Il(i,o){var u=Ee;Ee|=2;var f=mg();(Pt!==i||Ft!==o)&&(Er=null,bi(i,o));do try{zv();break}catch(h){gg(i,h)}while(!0);if(Id(),Ee=u,Rl.current=f,gt!==null)throw Error(l(261));return Pt=null,Ft=0,vt}function zv(){for(;gt!==null;)yg(gt)}function Uv(){for(;gt!==null&&!fv();)yg(gt)}function yg(i){var o=xg(i.alternate,i,gn);i.memoizedProps=i.pendingProps,o===null?vg(i):gt=o,_f.current=null}function vg(i){var o=i;do{var u=o.alternate;if(i=o.return,o.flags&32768){if(u=Mv(u,o),u!==null){u.flags&=32767,gt=u;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{vt=6,gt=null;return}}else if(u=Fv(u,o,gn),u!==null){gt=u;return}if(o=o.sibling,o!==null){gt=o;return}gt=o=i}while(o!==null);vt===0&&(vt=5)}function ji(i,o,u){var f=Oe,h=dt.transition;try{dt.transition=null,Oe=1,Bv(i,o,u,f)}finally{dt.transition=h,Oe=f}return null}function Bv(i,o,u,f){do zi();while(Qr!==null);if(Ee&6)throw Error(l(327));u=i.finishedWork;var h=i.finishedLanes;if(u===null)return null;if(i.finishedWork=null,i.finishedLanes=0,u===i.current)throw Error(l(177));i.callbackNode=null,i.callbackPriority=0;var v=u.lanes|u.childLanes;if(dv(i,v),i===Pt&&(gt=Pt=null,Ft=0),!(u.subtreeFlags&2064)&&!(u.flags&2064)||Fl||(Fl=!0,wg(Td,function(){return zi(),null})),v=(u.flags&15990)!==0,u.subtreeFlags&15990||v){v=dt.transition,dt.transition=null;var N=Oe;Oe=1;var D=Ee;Ee|=4,_f.current=null,Dv(i,u),og(u,i),Q(i.containerInfo),i.current=u,Iv(u),hv(),Ee=D,Oe=N,dt.transition=v}else i.current=u;if(Fl&&(Fl=!1,Qr=i,Ml=h),v=i.pendingLanes,v===0&&(Xr=null),mv(u.stateNode),rn(i,Ct()),o!==null)for(f=i.onRecoverableError,u=0;u<o.length;u++)h=o[u],f(h.value,{componentStack:h.stack,digest:h.digest});if(Al)throw Al=!1,i=kf,kf=null,i;return Ml&1&&i.tag!==0&&zi(),v=i.pendingLanes,v&1?i===Cf?zo++:(zo=0,Cf=i):zo=0,rr(),null}function zi(){if(Qr!==null){var i=q1(Ml),o=dt.transition,u=Oe;try{if(dt.transition=null,Oe=16>i?16:i,Qr===null)var f=!1;else{if(i=Qr,Qr=null,Ml=0,Ee&6)throw Error(l(331));var h=Ee;for(Ee|=4,se=i.current;se!==null;){var v=se,N=v.child;if(se.flags&16){var D=v.deletions;if(D!==null){for(var z=0;z<D.length;z++){var J=D[z];for(se=J;se!==null;){var ae=se;switch(ae.tag){case 0:case 11:case 15:Do(8,ae,v)}var _e=ae.child;if(_e!==null)_e.return=ae,se=_e;else for(;se!==null;){ae=se;var ne=ae.sibling,Xe=ae.return;if(ng(ae),ae===J){se=null;break}if(ne!==null){ne.return=Xe,se=ne;break}se=Xe}}}var Ge=v.alternate;if(Ge!==null){var sn=Ge.child;if(sn!==null){Ge.child=null;do{var Pr=sn.sibling;sn.sibling=null,sn=Pr}while(sn!==null)}}se=v}}if(v.subtreeFlags&2064&&N!==null)N.return=v,se=N;else e:for(;se!==null;){if(v=se,v.flags&2048)switch(v.tag){case 0:case 11:case 15:Do(9,v,v.return)}var j=v.sibling;if(j!==null){j.return=v.return,se=j;break e}se=v.return}}var I=i.current;for(se=I;se!==null;){N=se;var H=N.child;if(N.subtreeFlags&2064&&H!==null)H.return=N,se=H;else e:for(N=I;se!==null;){if(D=se,D.flags&2048)try{switch(D.tag){case 0:case 11:case 15:kl(9,D)}}catch(de){Je(D,D.return,de)}if(D===N){se=null;break e}var re=D.sibling;if(re!==null){re.return=D.return,se=re;break e}se=D.return}}if(Ee=h,rr(),nr&&typeof nr.onPostCommitFiberRoot=="function")try{nr.onPostCommitFiberRoot(el,i)}catch{}f=!0}return f}finally{Oe=u,dt.transition=o}}return!1}function _g(i,o,u){o=Es(u,o),o=bp(i,o,1),i=Yr(i,o,1),o=Ut(),i!==null&&(ko(i,1,o),rn(i,o))}function Je(i,o,u){if(i.tag===3)_g(i,i,u);else for(;o!==null;){if(o.tag===3){_g(o,i,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Xr===null||!Xr.has(f))){i=Es(u,i),i=jp(o,i,1),o=Yr(o,i,1),i=Ut(),o!==null&&(ko(o,1,i),rn(o,i));break}}o=o.return}}function Gv(i,o,u){var f=i.pingCache;f!==null&&f.delete(o),o=Ut(),i.pingedLanes|=i.suspendedLanes&u,Pt===i&&(Ft&u)===u&&(vt===4||vt===3&&(Ft&130023424)===Ft&&500>Ct()-xf?bi(i,0):Sf|=u),rn(i,o)}function Sg(i,o){o===0&&(i.mode&1?(o=Ja,Ja<<=1,!(Ja&130023424)&&(Ja=4194304)):o=1);var u=Ut();i=ir(i,o),i!==null&&(ko(i,o,u),rn(i,u))}function Hv(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),Sg(i,u)}function Vv(i,o){var u=0;switch(i.tag){case 13:var f=i.stateNode,h=i.memoizedState;h!==null&&(u=h.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(l(314))}f!==null&&f.delete(o),Sg(i,u)}var xg;xg=function(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps||Zt.current)tn=!0;else{if(!(i.lanes&u)&&!(o.flags&128))return tn=!1,Av(i,o,u);tn=!!(i.flags&131072)}else tn=!1,$e&&o.flags&1048576&&Z1(o,rl,o.index);switch(o.lanes=0,o.tag){case 2:var f=o.type;_l(i,o),i=o.pendingProps;var h=ms(o,It.current);ws(o,u),h=Yd(null,o,f,i,h,u);var v=Xd();return o.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,en(f)?(v=!0,qa(o)):v=!1,o.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Ud(o),h.updater=yl,o.stateNode=h,h._reactInternals=o,ef(o,f,i,u),o=sf(null,o,f,!0,v,u)):(o.tag=0,$e&&v&&Ld(o),Yt(null,o,h,u),o=o.child),o;case 16:f=o.elementType;e:{switch(_l(i,o),i=o.pendingProps,h=f._init,f=h(f._payload),o.type=f,h=o.tag=Kv(f),i=Bn(f,i),h){case 0:o=rf(null,o,f,i,u);break e;case 1:o=Yp(null,o,f,i,u);break e;case 11:o=Gp(null,o,f,i,u);break e;case 14:o=Hp(null,o,f,Bn(f.type,i),u);break e}throw Error(l(306,f,""))}return o;case 0:return f=o.type,h=o.pendingProps,h=o.elementType===f?h:Bn(f,h),rf(i,o,f,h,u);case 1:return f=o.type,h=o.pendingProps,h=o.elementType===f?h:Bn(f,h),Yp(i,o,f,h,u);case 3:e:{if(Xp(o),i===null)throw Error(l(387));f=o.pendingProps,v=o.memoizedState,h=v.element,up(i,o),cl(o,f,null,u);var N=o.memoizedState;if(f=N.element,xe&&v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:N.cache,pendingSuspenseBoundaries:N.pendingSuspenseBoundaries,transitions:N.transitions},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){h=Es(Error(l(423)),o),o=Qp(i,o,f,u,h);break e}else if(f!==h){h=Es(Error(l(424)),o),o=Qp(i,o,f,u,h);break e}else for(xe&&(En=K3(o.stateNode.containerInfo),pn=o,$e=!0,Un=null,Co=!1),u=op(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(_s(),f===h){o=Cr(i,o,u);break e}Yt(i,o,f,u)}o=o.child}return o;case 5:return fp(o),i===null&&Md(o),f=o.type,h=o.pendingProps,v=i!==null?i.memoizedProps:null,N=h.children,Ke(f,h)?N=null:v!==null&&Ke(f,v)&&(o.flags|=32),Kp(i,o),Yt(i,o,N,u),o.child;case 6:return i===null&&Md(o),null;case 13:return qp(i,o,u);case 4:return Bd(o,o.stateNode.containerInfo),f=o.pendingProps,i===null?o.child=Ss(o,null,f,u):Yt(i,o,f,u),o.child;case 11:return f=o.type,h=o.pendingProps,h=o.elementType===f?h:Bn(f,h),Gp(i,o,f,h,u);case 7:return Yt(i,o,o.pendingProps,u),o.child;case 8:return Yt(i,o,o.pendingProps.children,u),o.child;case 12:return Yt(i,o,o.pendingProps.children,u),o.child;case 10:e:{if(f=o.type._context,h=o.pendingProps,v=o.memoizedProps,N=h.value,ap(o,f,N),v!==null)if(zn(v.value,N)){if(v.children===h.children&&!Zt.current){o=Cr(i,o,u);break e}}else for(v=o.child,v!==null&&(v.return=o);v!==null;){var D=v.dependencies;if(D!==null){N=v.child;for(var z=D.firstContext;z!==null;){if(z.context===f){if(v.tag===1){z=kr(-1,u&-u),z.tag=2;var J=v.updateQueue;if(J!==null){J=J.shared;var ae=J.pending;ae===null?z.next=z:(z.next=ae.next,ae.next=z),J.pending=z}}v.lanes|=u,z=v.alternate,z!==null&&(z.lanes|=u),jd(v.return,u,o),D.lanes|=u;break}z=z.next}}else if(v.tag===10)N=v.type===o.type?null:v.child;else if(v.tag===18){if(N=v.return,N===null)throw Error(l(341));N.lanes|=u,D=N.alternate,D!==null&&(D.lanes|=u),jd(N,u,o),N=v.sibling}else N=v.child;if(N!==null)N.return=v;else for(N=v;N!==null;){if(N===o){N=null;break}if(v=N.sibling,v!==null){v.return=N.return,N=v;break}N=N.return}v=N}Yt(i,o,h.children,u),o=o.child}return o;case 9:return h=o.type,f=o.pendingProps.children,ws(o,u),h=Pn(h),f=f(h),o.flags|=1,Yt(i,o,f,u),o.child;case 14:return f=o.type,h=Bn(f,o.pendingProps),h=Bn(f.type,h),Hp(i,o,f,h,u);case 15:return Vp(i,o,o.type,o.pendingProps,u);case 17:return f=o.type,h=o.pendingProps,h=o.elementType===f?h:Bn(f,h),_l(i,o),o.tag=1,en(f)?(i=!0,qa(o)):i=!1,ws(o,u),Dp(o,f,h),ef(o,f,h,u),sf(null,o,f,!0,i,u);case 19:return Jp(i,o,u);case 22:return Wp(i,o,u)}throw Error(l(156,o.tag))};function wg(i,o){return Pd(i,o)}function Wv(i,o,u,f){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(i,o,u,f){return new Wv(i,o,u,f)}function Rf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Kv(i){if(typeof i=="function")return Rf(i)?1:0;if(i!=null){if(i=i.$$typeof,i===E)return 11;if(i===C)return 14}return 2}function Jr(i,o){var u=i.alternate;return u===null?(u=Ln(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&14680064,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u}function bl(i,o,u,f,h,v){var N=2;if(f=i,typeof i=="function")Rf(i)&&(N=1);else if(typeof i=="string")N=5;else e:switch(i){case m:return Ui(u.children,h,v,o);case w:N=8,h|=8;break;case _:return i=Ln(12,u,o,h|2),i.elementType=_,i.lanes=v,i;case k:return i=Ln(13,u,o,h),i.elementType=k,i.lanes=v,i;case S:return i=Ln(19,u,o,h),i.elementType=S,i.lanes=v,i;case x:return jl(u,h,v,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case P:N=10;break e;case y:N=9;break e;case E:N=11;break e;case C:N=14;break e;case g:N=16,f=null;break e}throw Error(l(130,i==null?i:typeof i,""))}return o=Ln(N,u,o,h),o.elementType=i,o.type=f,o.lanes=v,o}function Ui(i,o,u,f){return i=Ln(7,i,f,o),i.lanes=u,i}function jl(i,o,u,f){return i=Ln(22,i,f,o),i.elementType=x,i.lanes=u,i.stateNode={isHidden:!1},i}function Lf(i,o,u){return i=Ln(6,i,null,o),i.lanes=u,i}function Af(i,o,u){return o=Ln(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function Yv(i,o,u,f,h){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ue,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cd(0),this.expirationTimes=Cd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cd(0),this.identifierPrefix=f,this.onRecoverableError=h,xe&&(this.mutableSourceEagerHydrationData=null)}function kg(i,o,u,f,h,v,N,D,z){return i=new Yv(i,o,u,D,z),o===1?(o=1,v===!0&&(o|=8)):o=0,v=Ln(3,null,null,o),i.current=v,v.stateNode=i,v.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ud(v),i}function Cg(i){if(!i)return Wr;i=i._reactInternals;e:{if(b(i)!==i||i.tag!==1)throw Error(l(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(en(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(l(171))}if(i.tag===1){var u=i.type;if(en(u))return Y1(i,u,o)}return o}function Eg(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(l(188)):(i=Object.keys(i).join(","),Error(l(268,i)));return i=W(o),i===null?null:i.stateNode}function Pg(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function zl(i,o){Pg(i,o),(i=i.alternate)&&Pg(i,o)}function Xv(i){return i=W(i),i===null?null:i.stateNode}function Qv(){return null}return n.attemptContinuousHydration=function(i){if(i.tag===13){var o=ir(i,134217728);if(o!==null){var u=Ut();Rn(o,i,134217728,u)}zl(i,134217728)}},n.attemptDiscreteHydration=function(i){if(i.tag===13){var o=ir(i,1);if(o!==null){var u=Ut();Rn(o,i,1,u)}zl(i,1)}},n.attemptHydrationAtCurrentPriority=function(i){if(i.tag===13){var o=qr(i),u=ir(i,o);if(u!==null){var f=Ut();Rn(u,i,o,f)}zl(i,o)}},n.attemptSynchronousHydration=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var u=wo(o.pendingLanes);u!==0&&(Ed(o,u|1),rn(o,Ct()),!(Ee&6)&&(Ts(),rr()))}break;case 13:pg(function(){var f=ir(i,1);if(f!==null){var h=Ut();Rn(f,i,1,h)}}),zl(i,1)}},n.batchedUpdates=function(i,o){var u=Ee;Ee|=1;try{return i(o)}finally{Ee=u,Ee===0&&(Ts(),tl&&rr())}},n.createComponentSelector=function(i){return{$$typeof:Cl,value:i}},n.createContainer=function(i,o,u,f,h,v,N){return kg(i,o,!1,null,u,f,h,v,N)},n.createHasPseudoClassSelector=function(i){return{$$typeof:El,value:i}},n.createHydrationContainer=function(i,o,u,f,h,v,N,D,z){return i=kg(u,f,!0,i,h,v,N,D,z),i.context=Cg(null),u=i.current,f=Ut(),h=qr(u),v=kr(f,h),v.callback=o??null,Yr(u,v,h),i.current.lanes=h,ko(i,h,f),rn(i,f),i},n.createPortal=function(i,o,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:f==null?null:""+f,children:i,containerInfo:o,implementation:u}},n.createRoleSelector=function(i){return{$$typeof:Pl,value:i}},n.createTestNameSelector=function(i){return{$$typeof:Nl,value:i}},n.createTextSelector=function(i){return{$$typeof:Tl,value:i}},n.deferredUpdates=function(i){var o=Oe,u=dt.transition;try{return dt.transition=null,Oe=16,i()}finally{Oe=o,dt.transition=u}},n.discreteUpdates=function(i,o,u,f,h){var v=Oe,N=dt.transition;try{return dt.transition=null,Oe=1,i(o,u,f,h)}finally{Oe=v,dt.transition=N,Ee===0&&Ts()}},n.findAllNodes=vf,n.findBoundingRects=function(i,o){if(!Re)throw Error(l(363));o=vf(i,o),i=[];for(var u=0;u<o.length;u++)i.push(wn(o[u]));for(o=i.length-1;0<o;o--){u=i[o];for(var f=u.x,h=f+u.width,v=u.y,N=v+u.height,D=o-1;0<=D;D--)if(o!==D){var z=i[D],J=z.x,ae=J+z.width,_e=z.y,ne=_e+z.height;if(f>=J&&v>=_e&&h<=ae&&N<=ne){i.splice(o,1);break}else if(f!==J||u.width!==z.width||ne<v||_e>N){if(!(v!==_e||u.height!==z.height||ae<f||J>h)){J>f&&(z.width+=J-f,z.x=f),ae<h&&(z.width=h-J),i.splice(o,1);break}}else{_e>v&&(z.height+=_e-v,z.y=v),ne<N&&(z.height=N-_e),i.splice(o,1);break}}}return i},n.findHostInstance=Eg,n.findHostInstanceWithNoPortals=function(i){return i=B(i),i=i!==null?ie(i):null,i===null?null:i.stateNode},n.findHostInstanceWithWarning=function(i){return Eg(i)},n.flushControlled=function(i){var o=Ee;Ee|=1;var u=dt.transition,f=Oe;try{dt.transition=null,Oe=1,i()}finally{Oe=f,dt.transition=u,Ee=o,Ee===0&&(Ts(),rr())}},n.flushPassiveEffects=zi,n.flushSync=pg,n.focusWithin=function(i,o){if(!Re)throw Error(l(363));for(i=gf(i),o=dg(i,o),o=Array.from(o),i=0;i<o.length;){var u=o[i++];if(!Li(u)){if(u.tag===5&&w3(u.stateNode))return!0;for(u=u.child;u!==null;)o.push(u),u=u.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Oe},n.getFindAllNodesFailureDescription=function(i,o){if(!Re)throw Error(l(363));var u=0,f=[];i=[gf(i),0];for(var h=0;h<i.length;){var v=i[h++],N=i[h++],D=o[N];if((v.tag!==5||!Li(v))&&(mf(v,D)&&(f.push(yf(D)),N++,N>u&&(u=N)),N<o.length))for(v=v.child;v!==null;)i.push(v,N),v=v.sibling}if(u<o.length){for(i=[];u<o.length;u++)i.push(yf(o[u]));return`findAllNodes was able to match part of the selector:
71
+ `+(f.join(" > ")+`
72
+
73
+ No matching component was found for:
74
+ `)+i.join(" > ")}return null},n.getPublicRootInstance=function(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return ce(i.child.stateNode);default:return i.child.stateNode}},n.injectIntoDevTools=function(i){if(i={bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:Xv,findFiberByHostInstance:i.findFiberByHostInstance||Qv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")i=!1;else{var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled||!o.supportsFiber)i=!0;else{try{el=o.inject(i),nr=o}catch{}i=!!o.checkDCE}}return i},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(i,o,u,f){if(!Re)throw Error(l(363));i=vf(i,o);var h=k3(i,u,f).disconnect;return{disconnect:function(){h()}}},n.registerMutableSourceForHydration=function(i,o){var u=o._getVersion;u=u(o._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[o,u]:i.mutableSourceEagerHydrationData.push(o,u)},n.runWithPriority=function(i,o){var u=Oe;try{return Oe=i,o()}finally{Oe=u}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(i,o,u,f){var h=o.current,v=Ut(),N=qr(h);return u=Cg(u),o.context===null?o.context=u:o.pendingContext=u,o=kr(v,N),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=Yr(h,o,N),i!==null&&(Rn(i,h,N,v),ul(i,h,N)),N},n};f3.exports=xk;var wk=f3.exports;const kk=C0(wk);var h3={exports:{}},ps={};/**
75
+ * @license React
76
+ * react-reconciler-constants.production.min.js
77
+ *
78
+ * Copyright (c) Facebook, Inc. and its affiliates.
79
+ *
80
+ * This source code is licensed under the MIT license found in the
81
+ * LICENSE file in the root directory of this source tree.
82
+ */ps.ConcurrentRoot=1;ps.ContinuousEventPriority=4;ps.DefaultEventPriority=16;ps.DiscreteEventPriority=1;ps.IdleEventPriority=536870912;ps.LegacyRoot=0;h3.exports=ps;var p3=h3.exports;const Dm={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let Im=!1,bm=!1;const j1=".react-konva-event",Ck=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
83
+ Position of a node will be changed during drag&drop, so you should update state of the react app as well.
84
+ Consider to add onDragMove or onDragEnd events.
85
+ For more info see: https://github.com/konvajs/react-konva/issues/256
86
+ `,Ek=`ReactKonva: You are using "zIndex" attribute for a Konva node.
87
+ react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
88
+ For more info see: https://github.com/konvajs/react-konva/issues/194
89
+ `,Pk={};function md(t,e,n=Pk){if(!Im&&"zIndex"in e&&(console.warn(Ek),Im=!0),!bm&&e.draggable){var r=e.x!==void 0||e.y!==void 0,s=e.onDragEnd||e.onDragMove;r&&!s&&(console.warn(Ck),bm=!0)}for(var a in n)if(!Dm[a]){var l=a.slice(0,2)==="on",c=n[a]!==e[a];if(l&&c){var d=a.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),t.off(d,n[a])}var p=!e.hasOwnProperty(a);p&&t.setAttr(a,void 0)}var m=e._useStrictMode,w={},_=!1;const P={};for(var a in e)if(!Dm[a]){var l=a.slice(0,2)==="on",y=n[a]!==e[a];if(l&&y){var d=a.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),e[a]&&(P[d]=e[a])}!l&&(e[a]!==n[a]||m&&e[a]!==t.getAttr(a))&&(_=!0,w[a]=e[a])}_&&(t.setAttrs(w),Ri(t));for(var d in P)t.on(d+j1,P[d])}function Ri(t){if(!Ce.Konva.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}const g3={},Nk={};Fa.Node.prototype._applyProps=md;function Tk(t,e){if(typeof e=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);return}t.add(e),Ri(t)}function Rk(t,e,n){let r=Fa[t];r||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" 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=Fa.Group);const s={},a={};for(var l in e){var c=l.slice(0,2)==="on";c?a[l]=e[l]:s[l]=e[l]}const d=new r(s);return md(d,a),d}function Lk(t,e,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function Ak(t,e,n){return!1}function Fk(t){return t}function Mk(){return null}function Ok(){return null}function Dk(t,e,n,r){return Nk}function Ik(){}function bk(t){}function jk(t,e){return!1}function zk(){return g3}function Uk(){return g3}const Bk=setTimeout,Gk=clearTimeout,Hk=-1;function Vk(t,e){return!1}const Wk=!1,Kk=!0,Yk=!0;function Xk(t,e){e.parent===t?e.moveToTop():t.add(e),Ri(t)}function Qk(t,e){e.parent===t?e.moveToTop():t.add(e),Ri(t)}function m3(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),Ri(t)}function qk(t,e,n){m3(t,e,n)}function $k(t,e){e.destroy(),e.off(j1),Ri(t)}function Jk(t,e){e.destroy(),e.off(j1),Ri(t)}function Zk(t,e,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function eC(t,e,n){}function tC(t,e,n,r,s){md(t,s,r)}function nC(t){t.hide(),Ri(t)}function rC(t){}function iC(t,e){(e.visible==null||e.visible)&&t.show()}function sC(t,e){}function oC(t){}function aC(){}const lC=()=>p3.DefaultEventPriority,uC=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Xk,appendChildToContainer:Qk,appendInitialChild:Tk,cancelTimeout:Gk,clearContainer:oC,commitMount:eC,commitTextUpdate:Zk,commitUpdate:tC,createInstance:Rk,createTextInstance:Lk,detachDeletedInstance:aC,finalizeInitialChildren:Ak,getChildHostContext:Uk,getCurrentEventPriority:lC,getPublicInstance:Fk,getRootHostContext:zk,hideInstance:nC,hideTextInstance:rC,idlePriority:ra.unstable_IdlePriority,insertBefore:m3,insertInContainerBefore:qk,isPrimaryRenderer:Wk,noTimeout:Hk,now:ra.unstable_now,prepareForCommit:Mk,preparePortalMount:Ok,prepareUpdate:Dk,removeChild:$k,removeChildFromContainer:Jk,resetAfterCommit:Ik,resetTextContent:bk,run:ra.unstable_runWithPriority,scheduleTimeout:Bk,shouldDeprioritizeSubtree:jk,shouldSetTextContent:Vk,supportsMutation:Yk,unhideInstance:iC,unhideTextInstance:sC,warnsIfNotActing:Kk},Symbol.toStringTag,{value:"Module"}));var cC=Object.defineProperty,dC=Object.defineProperties,fC=Object.getOwnPropertyDescriptors,jm=Object.getOwnPropertySymbols,hC=Object.prototype.hasOwnProperty,pC=Object.prototype.propertyIsEnumerable,zm=(t,e,n)=>e in t?cC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Um=(t,e)=>{for(var n in e||(e={}))hC.call(e,n)&&zm(t,n,e[n]);if(jm)for(var n of jm(e))pC.call(e,n)&&zm(t,n,e[n]);return t},gC=(t,e)=>dC(t,fC(e)),Bm,Gm;typeof window<"u"&&((Bm=window.document)!=null&&Bm.createElement||((Gm=window.navigator)==null?void 0:Gm.product)==="ReactNative")?V.useLayoutEffect:V.useEffect;function y3(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const s=y3(r,e,n);if(s)return s;r=r.sibling}}function v3(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const Hm=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=Hm;return}return Hm.apply(this,arguments)};const z1=v3(V.createContext(null));class _3 extends V.Component{render(){return V.createElement(z1.Provider,{value:this._reactInternals},this.props.children)}}function mC(){const t=V.useContext(z1);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=V.useId();return V.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const s=y3(r,!1,a=>{let l=a.memoizedState;for(;l;){if(l.memoizedState===e)return!0;l=l.next}});if(s)return s}},[t,e])}function yC(){const t=mC(),[e]=V.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const s=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;s&&s!==z1&&!e.has(s)&&e.set(s,V.useContext(v3(s)))}n=n.return}return e}function vC(){const t=yC();return V.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>V.createElement(e,null,V.createElement(n.Provider,gC(Um({},r),{value:t.get(n)}))),e=>V.createElement(_3,Um({},e))),[t])}function _C(t){const e=Qt.useRef({});return Qt.useLayoutEffect(()=>{e.current=t}),Qt.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}const SC=t=>{const e=Qt.useRef(null),n=Qt.useRef(null),r=Qt.useRef(null),s=_C(t),a=vC(),l=c=>{const{forwardedRef:d}=t;d&&(typeof d=="function"?d(c):d.current=c)};return Qt.useLayoutEffect(()=>(n.current=new Fa.Stage({width:t.width,height:t.height,container:e.current}),l(n.current),r.current=na.createContainer(n.current,p3.LegacyRoot,!1,null),na.updateContainer(Qt.createElement(a,{},t.children),r.current),()=>{Fa.isBrowser&&(l(null),na.updateContainer(null,r.current,null),n.current.destroy())}),[]),Qt.useLayoutEffect(()=>{l(n.current),md(n.current,t,s),na.updateContainer(Qt.createElement(a,{},t.children),r.current,null)}),Qt.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},Vm="Layer",xC="Group",Wm="Rect",wC="Image",kC="Text",CC="Transformer",na=kk(uC);na.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:Qt.version,rendererPackageName:"react-konva"});const EC=Qt.forwardRef((t,e)=>Qt.createElement(_3,{},Qt.createElement(SC,{...t,forwardedRef:e}))),Km={product:"#22c55e",price:"#3b82f6",brand:"#f59e0b",promo:"#ef4444",default:"#8b5cf6"};function PC(t){return Km[t.toLowerCase()]??Km.default??"#8b5cf6"}const uu=50,cu=15;function NC({imageUrl:t,annotations:e,selectedId:n,toolMode:r,onSelectAnnotation:s,onAddAnnotation:a,onUpdateBbox:l,onDeleteAnnotation:c,onToolModeChange:d}){const p=V.useRef(null),m=V.useRef(null),w=V.useRef(null),[_,P]=V.useState(null),[y,E]=V.useState({width:800,height:600}),[k,S]=V.useState(1),[C,g]=V.useState(1),[x,T]=V.useState(!1),[R,M]=V.useState(null),[L,b]=V.useState(1),[F,B]=V.useState({x:0,y:0}),[W,X]=V.useState(!1),[ie,ee]=V.useState({x:0,y:0}),ce=V.useRef(null),ve=V.useRef(null);V.useEffect(()=>{if(!t){P(null);return}const $=new window.Image;$.crossOrigin="anonymous",$.src=t,$.onload=()=>{P($)}},[t]),V.useEffect(()=>{const $=()=>{if(p.current&&_){const le=p.current.clientWidth,me=p.current.clientHeight,Re=le/_.width,tt=me/_.height,wn=Math.min(Re,tt,1);g(wn),S(wn*L),E({width:le,height:me})}};return $(),window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[_,L]),V.useEffect(()=>{S(C*L)},[L,C]);const G=V.useCallback(()=>{b($=>Math.min($*1.25,5))},[]),Z=V.useCallback(()=>{b($=>Math.max($/1.25,.25))},[]),Q=V.useCallback(()=>{b(1),B({x:0,y:0})},[]),q=V.useCallback($=>{$.evt.preventDefault();const le=m.current;if(!le)return;const me=1.1,Re=L,tt=le.getPointerPosition();if(!tt)return;const wn=$.evt.deltaY<0?Math.min(Re*me,5):Math.max(Re/me,.25),_r={x:(tt.x-F.x)/(C*Re),y:(tt.y-F.y)/(C*Re)},Li={x:tt.x-_r.x*C*wn,y:tt.y-_r.y*C*wn};b(wn),B(Li)},[L,C,F]);V.useEffect(()=>{var $;if(!(!w.current||!m.current))if(n&&r==="select"){const le=m.current.findOne(`#${n}`);le&&(w.current.nodes([le]),($=w.current.getLayer())==null||$.batchDraw())}else w.current.nodes([])},[n,r,e]),V.useEffect(()=>{const $=le=>{le.key==="Escape"&&x&&(T(!1),M(null),te())};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[x]);const te=V.useCallback(()=>{ce.current!==null&&(cancelAnimationFrame(ce.current),ce.current=null)},[]);V.useEffect(()=>()=>te(),[te]);const we=V.useCallback($=>_?{x:($.x-$.width/2)*_.width,y:($.y-$.height/2)*_.height,width:$.width*_.width,height:$.height*_.height}:{x:0,y:0,width:0,height:0},[_]),Be=V.useCallback($=>_?{x:($.x+$.width/2)/_.width,y:($.y+$.height/2)/_.height,width:Math.abs($.width)/_.width,height:Math.abs($.height)/_.height}:{x:0,y:0,width:0,height:0},[_]),Ke=V.useCallback($=>{const le=$.getPointerPosition();return le?{x:(le.x-F.x)/k,y:(le.y-F.y)/k}:null},[k,F]),je=$=>{const le=$.target.getStage();if(!le)return;const me=le.getPointerPosition();if(!me)return;if(r==="pan"){X(!0),ee({x:me.x,y:me.y});return}if(r!=="draw"||!_)return;const Re=Ke(le);Re&&(T(!0),M({x:Re.x,y:Re.y,width:0,height:0}),s(null))},O=V.useCallback($=>{let le=0,me=0;return $.x<uu&&(le=cu),$.x>y.width-uu&&(le=-cu),$.y<uu+60&&(me=cu),$.y>y.height-uu&&(me=-cu),{dx:le,dy:me}},[y]),K=V.useCallback(()=>{const $=ve.current;if(!$||!x||!R){te();return}const{dx:le,dy:me}=O($);le!==0||me!==0?(B(Re=>({x:Re.x+le,y:Re.y+me})),M(Re=>Re&&{...Re,width:Re.width-le/k,height:Re.height-me/k}),ce.current=requestAnimationFrame(K)):te()},[x,R,O,te,k]),ue=V.useCallback($=>{ve.current=$;const{dx:le,dy:me}=O($);(le!==0||me!==0)&&ce.current===null?ce.current=requestAnimationFrame(K):le===0&&me===0&&te()},[O,K,te]),Ae=$=>{const le=$.target.getStage();if(!le)return;const me=le.getPointerPosition();if(!me)return;if(W&&r==="pan"){const tt=me.x-ie.x,wn=me.y-ie.y;B(_r=>({x:_r.x+tt,y:_r.y+wn})),ee({x:me.x,y:me.y});return}if(!x||!R)return;const Re=Ke(le);Re&&(M({...R,width:Re.x-R.x,height:Re.y-R.y}),ue(me))},ge=()=>{if(te(),ve.current=null,W){X(!1);return}if(!x||!R||!_){T(!1),M(null);return}const $=10;if(Math.abs(R.width)>$&&Math.abs(R.height)>$){const le={x:R.width<0?R.x+R.width:R.x,y:R.height<0?R.y+R.height:R.y,width:Math.abs(R.width),height:Math.abs(R.height)};a(le,_.width,_.height)}T(!1),M(null)},fe=($,le)=>{r==="select"&&($.cancelBubble=!0,s(le))},xe=($,le)=>{const me=$.target,Re=me.scaleX(),tt=me.scaleY();me.scaleX(1),me.scaleY(1);const wn={x:me.x(),y:me.y(),width:me.width()*Re,height:me.height()*tt},_r=Be(wn);l(le,_r)},Lt=($,le)=>{const me=$.target,Re={x:me.x(),y:me.y(),width:me.width(),height:me.height()},tt=Be(Re);l(le,tt)},Me=$=>{$.target===$.target.getStage()&&s(null)},tr=()=>{switch(r){case"pan":return W?"grabbing":"grab";case"draw":return"crosshair";case"select":default:return"default"}};return t?A.jsxs("div",{ref:p,className:"relative flex h-full w-full items-center justify-center bg-gray-800 dark:bg-gray-900 overflow-hidden",children:[A.jsxs("div",{className:"absolute top-3 left-3 z-10 flex items-center gap-1 rounded-lg bg-white dark:bg-gray-800 p-1 shadow-lg border border-gray-200 dark:border-gray-700",children:[A.jsx("button",{onClick:()=>d("select"),className:`p-2 rounded-md transition-colors ${r==="select"?"bg-blue-100 dark:bg-blue-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"}`,title:"Select (S)",children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})})}),A.jsx("button",{onClick:()=>d("draw"),className:`p-2 rounded-md transition-colors ${r==="draw"?"bg-green-100 dark:bg-green-900 text-green-600 dark:text-green-400":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"}`,title:"Draw Box (D)",children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v14a1 1 0 01-1 1H5a1 1 0 01-1-1V5z"})})}),A.jsx("button",{onClick:()=>d("pan"),className:`p-2 rounded-md transition-colors ${r==="pan"?"bg-amber-100 dark:bg-amber-900 text-amber-600 dark:text-amber-400":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"}`,title:"Pan (Space)",children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 11.5V14m0-2.5v-6a1.5 1.5 0 113 0m-3 6a1.5 1.5 0 00-3 0v2a7.5 7.5 0 0015 0v-5a1.5 1.5 0 00-3 0m-6-3V11m0-5.5v-1a1.5 1.5 0 013 0v1m0 0V11m0-5.5a1.5 1.5 0 013 0v3m0 0V11"})})}),A.jsx("div",{className:"w-px h-6 bg-gray-300 dark:bg-gray-600 mx-1"}),A.jsx("button",{onClick:Z,className:"p-2 rounded-md text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:"Zoom Out",children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),A.jsxs("button",{onClick:Q,className:"px-2 py-1 min-w-[48px] text-xs font-medium text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",title:"Reset Zoom",children:[Math.round(L*100),"%"]}),A.jsx("button",{onClick:G,className:"p-2 rounded-md text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:"Zoom In",children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),A.jsxs(EC,{ref:m,width:y.width,height:y.height,scaleX:k,scaleY:k,x:F.x,y:F.y,onMouseDown:je,onMouseMove:Ae,onMouseUp:ge,onMouseLeave:ge,onWheel:q,onClick:Me,style:{cursor:tr()},children:[A.jsx(Vm,{children:_&&A.jsx(wC,{image:_})}),A.jsxs(Vm,{children:[e.map($=>{const le=we($.bbox),me=PC($.label),Re=$.id===n;return A.jsxs(xC,{children:[A.jsx(Wm,{id:$.id,x:le.x,y:le.y,width:le.width,height:le.height,stroke:me,strokeWidth:Re?3:2,fill:`${me}20`,draggable:r==="select",onClick:tt=>fe(tt,$.id),onTap:tt=>fe(tt,$.id),onDragEnd:tt=>Lt(tt,$.id),onTransformEnd:tt=>xe(tt,$.id)}),A.jsx(kC,{x:le.x,y:le.y-18,text:$.label,fontSize:14,fill:me,fontStyle:"bold"})]},$.id)}),R&&A.jsx(Wm,{x:R.x,y:R.y,width:R.width,height:R.height,stroke:"#22c55e",strokeWidth:2,dash:[5,5],fill:"rgba(34, 197, 94, 0.1)"}),A.jsx(CC,{ref:w,boundBoxFunc:($,le)=>le.width<10||le.height<10?$:le})]})]})]}):A.jsx("div",{ref:p,className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:A.jsxs("div",{className:"text-center",children:[A.jsx("svg",{className:"mx-auto h-16 w-16 text-gray-400 dark:text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),A.jsx("p",{className:"mt-2",children:"No image selected"}),A.jsx("p",{className:"text-sm",children:"Upload images to get started"})]})})}function TC(){const[t,e]=V.useState([]),[n,r]=V.useState(null),[s,a]=V.useState(!1),[l,c]=V.useState(null),d=V.useCallback(async E=>{a(!0),c(null);try{const k=await o_(E);e(k),r(null)}catch(k){c(k instanceof Error?k.message:"Failed to load annotations"),e([])}finally{a(!1)}},[]),p=V.useCallback(async(E,k,S,C,g,x)=>{const T={x:(C.x+C.width/2)/g,y:(C.y+C.height/2)/x,width:Math.abs(C.width)/g,height:Math.abs(C.height)/x},R={label:k,class_id:S,bbox:T};try{const M=await a_(E,R);e(L=>[...L,M]),r(M.id)}catch(M){c(M instanceof Error?M.message:"Failed to add annotation")}},[]),m=V.useCallback(async(E,k,S)=>{try{const C=await l_(E,k,S);e(g=>g.map(x=>x.id===k?C:x))}catch(C){c(C instanceof Error?C.message:"Failed to update annotation")}},[]),w=V.useCallback(async(E,k)=>{try{await u_(E,k),e(S=>S.filter(C=>C.id!==k)),r(S=>S===k?null:S)}catch(S){c(S instanceof Error?S.message:"Failed to delete annotation")}},[]),_=V.useCallback(async E=>{try{await c_(E),e([]),r(null)}catch(k){c(k instanceof Error?k.message:"Failed to clear annotations")}},[]),P=V.useCallback(E=>{r(E)},[]),y=V.useCallback((E,k)=>{e(S=>S.map(C=>C.id===E?{...C,bbox:k}:C))},[]);return{annotations:t,selectedId:n,loading:s,error:l,loadAnnotations:d,addAnnotation:p,updateAnnotation:m,deleteAnnotation:w,clearAnnotations:_,selectAnnotation:P,updateLocalBbox:y}}function RC(){const[t,e]=V.useState([]),[n,r]=V.useState(null),[s,a]=V.useState(!1),[l,c]=V.useState(null),d=n?t.indexOf(n):-1,p=V.useCallback(async()=>{a(!0),c(null);try{const k=await em();e(k),k.length>0&&!n&&r(k[0]??null)}catch(k){c(k instanceof Error?k.message:"Failed to load images")}finally{a(!1)}},[n]),m=V.useCallback(async()=>{a(!0),c(null),r(null);try{const k=await em();e(k),k.length>0&&r(k[0]??null)}catch(k){c(k instanceof Error?k.message:"Failed to load images")}finally{a(!1)}},[]),w=V.useCallback(k=>{r(k)},[]),_=V.useCallback(()=>{if(t.length===0)return;const k=(d+1)%t.length,S=t[k];S&&r(S)},[t,d]),P=V.useCallback(()=>{if(t.length===0)return;const k=(d-1+t.length)%t.length,S=t[k];S&&r(S)},[t,d]),y=V.useCallback(async k=>{a(!0),c(null);try{const C=(await i_(k)).map(g=>g.filename);e(g=>[...g,...C]),C.length>0&&r(C[0]??null)}catch(S){c(S instanceof Error?S.message:"Failed to upload images")}finally{a(!1)}},[]),E=V.useCallback(async k=>{try{await s_(k),e(S=>{const C=S.filter(g=>g!==k);if(n===k){const g=Math.min(d,C.length-1);r(C[g]??null)}return C})}catch(S){c(S instanceof Error?S.message:"Failed to delete image")}},[n,d]);return{images:t,currentImage:n,currentIndex:d,loading:s,error:l,loadImages:p,refreshImages:m,selectImage:w,nextImage:_,prevImage:P,uploadImages:y,deleteImage:E}}const Ym=["product","price","brand","promo"];function LC(){if(typeof window>"u")return Ym;const t=localStorage.getItem("annotationLabels");if(t)try{const e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(n=>typeof n=="string"))return e}catch{}return Ym}function AC(t){typeof window<"u"&&localStorage.setItem("annotationLabels",JSON.stringify(t))}function FC(){const[t,e]=V.useState(null),[n,r]=V.useState("draw"),[s,a]=V.useState(LC),[l,c]=V.useState(s[0]??"product"),[d,p]=V.useState(!1),[m,w]=V.useState(!1),[_,P]=V.useState(()=>typeof window<"u"?localStorage.getItem("darkMode")==="true"||!localStorage.getItem("darkMode")&&window.matchMedia("(prefers-color-scheme: dark)").matches:!1),[y,E]=V.useState(0),{images:k,currentImage:S,currentIndex:C,loading:g,uploadImages:x,selectImage:T,nextImage:R,prevImage:M,deleteImage:L,refreshImages:b}=RC(),{annotations:F,selectedId:B,loading:W,loadAnnotations:X,addAnnotation:ie,updateAnnotation:ee,deleteAnnotation:ce,clearAnnotations:ve,selectAnnotation:G,updateLocalBbox:Z}=TC(),Q=V.useCallback(fe=>{e(fe),b()},[b]),q=V.useCallback(async()=>{await e_(),e(null)},[]);V.useEffect(()=>{S&&X(S)},[S,X]),V.useEffect(()=>{_?(document.documentElement.classList.add("dark"),localStorage.setItem("darkMode","true")):(document.documentElement.classList.remove("dark"),localStorage.setItem("darkMode","false"))},[_]),V.useEffect(()=>{(async()=>{try{const xe=await n_();E(xe.annotated_image_count)}catch{}})()},[k,F]);const te=V.useCallback(()=>{B&&S&&ce(S,B)},[B,S,ce]),we=V.useCallback(()=>{G(null)},[G]);V.useEffect(()=>{const fe=xe=>{if(!(xe.target instanceof HTMLInputElement||xe.target instanceof HTMLSelectElement||xe.target instanceof HTMLTextAreaElement))switch(xe.key){case"s":case"S":r("select");break;case"d":case"D":r("draw");break;case" ":xe.preventDefault(),r("pan");break;case"ArrowLeft":M();break;case"ArrowRight":R();break;case"Delete":case"Backspace":te();break;case"Escape":we();break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{const Lt=parseInt(xe.key,10)-1;Lt<s.length&&c(s[Lt]??l);break}}};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)},[M,R,te,we,s,l]);const Be=V.useCallback((fe,xe,Lt)=>{if(!S)return;const Me=s.indexOf(l);ie(S,l,Me>=0?Me:0,fe,xe,Lt)},[S,l,s,ie]),Ke=V.useCallback((fe,xe)=>{S&&(Z(fe,xe),ee(S,fe,{bbox:xe}))},[S,Z,ee]),je=V.useCallback(fe=>{S&&ce(S,fe)},[S,ce]),O=V.useCallback(()=>{S&&confirm("Clear all annotations for this image?")&&ve(S)},[S,ve]),K=V.useCallback(()=>{w(!0)},[]),ue=V.useCallback(fe=>{a(fe),AC(fe),!fe.includes(l)&&fe.length>0&&c(fe[0]??"product")},[l]),Ae=V.useCallback(fe=>{confirm(`Delete "${fe}" and all its annotations?`)&&L(fe)},[L]),ge=g||W;return t?A.jsxs("div",{className:"flex h-screen flex-col bg-white dark:bg-gray-900",children:[A.jsxs("header",{className:"flex items-center justify-between border-b border-gray-200 bg-white px-4 py-3 dark:border-gray-700 dark:bg-gray-800",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("button",{onClick:q,className:"rounded-lg p-2 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700",title:"Back to projects",children:A.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})}),A.jsx("div",{children:A.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:t.name})})]}),A.jsxs("div",{className:"flex items-center gap-4",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"h-2 w-32 overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700",children:A.jsx("div",{className:"h-full rounded-full bg-green-500 transition-all duration-300",style:{width:k.length>0?`${y/k.length*100}%`:"0%"}})}),A.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:[y,"/",k.length]})]}),A.jsx("button",{onClick:()=>P(!_),className:"rounded-lg p-2 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700",title:_?"Switch to light mode":"Switch to dark mode",children:_?A.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:A.jsx("path",{fillRule:"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",clipRule:"evenodd"})}):A.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:A.jsx("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})})})]})]}),A.jsx(g_,{toolMode:n,currentLabel:l,labels:s,onToolModeChange:r,onLabelChange:c,onPrevImage:M,onNextImage:R,onClearAnnotations:O,onExport:K,onManageLabels:()=>p(!0),imageIndex:C,imageCount:k.length}),d&&A.jsx(y_,{labels:s,onLabelsChange:ue,onClose:()=>p(!1)}),m&&A.jsx(v_,{onClose:()=>w(!1)}),A.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[A.jsxs("aside",{className:"flex w-64 flex-col border-r border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800",children:[A.jsxs("div",{className:"border-b border-gray-200 p-3 dark:border-gray-700",children:[A.jsx("h2",{className:"mb-2 text-sm font-semibold text-gray-700 dark:text-gray-300",children:"Images"}),A.jsx(w7,{onUpload:x,disabled:ge})]}),A.jsx("div",{className:"flex-1 overflow-y-auto",children:A.jsx(f_,{images:k,currentImage:S,onSelectImage:T,onDeleteImage:Ae})})]}),A.jsx("main",{className:"flex-1 overflow-hidden bg-gray-100 dark:bg-gray-950",children:A.jsx(NC,{imageUrl:S?L5(S):null,annotations:F,selectedId:B,toolMode:n,currentLabel:l,currentClassId:s.indexOf(l),onSelectAnnotation:G,onAddAnnotation:Be,onUpdateBbox:Ke,onDeleteAnnotation:je,onToolModeChange:r})}),A.jsxs("aside",{className:"flex w-64 flex-col border-l border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800",children:[A.jsx("div",{className:"border-b border-gray-200 p-3 dark:border-gray-700",children:A.jsxs("h2",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300",children:["Annotations (",F.length,")"]})}),A.jsx("div",{className:"flex-1 overflow-y-auto",children:A.jsx(p_,{annotations:F,selectedId:B,onSelectAnnotation:G,onDeleteAnnotation:je})})]})]}),A.jsx("footer",{className:"border-t border-gray-200 bg-gray-50 px-4 py-2 text-xs text-gray-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("span",{children:[ge?"Loading...":"Ready"," |"," ",A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"D"})," Draw"," ",A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"S"})," Select"," ",A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"Space"})," Pan"," ",A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"←"}),A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"→"})," Navigate"," ",A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"Del"})," Delete"," ",A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"Esc"})," Deselect"," ",A.jsx("kbd",{className:"rounded bg-gray-200 px-1 dark:bg-gray-700",children:"1-9"})," Labels"]}),A.jsx("span",{children:S&&`${S}`})]})})]}):A.jsx(m_,{onOpenProject:Q})}const S3=document.getElementById("root");if(!S3)throw new Error("Failed to find root element");o5(S3).render(A.jsx(V.StrictMode,{children:A.jsx(FC,{})}));