@visactor/react-vtable 1.7.0-alpha.8 → 1.7.1
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.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/table-components/custom/reconciler.js +1 -1
- package/cjs/table-components/custom/reconciler.js.map +1 -1
- package/dist/react-vtable.js +4325 -11418
- package/dist/react-vtable.min.js +2 -38
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/table-components/custom/reconciler.js +1 -1
- package/es/table-components/custom/reconciler.js.map +1 -1
- package/package.json +5 -5
package/dist/react-vtable.min.js
CHANGED
|
@@ -1,31 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@visactor/vtable")):"function"==typeof define&&define.amd?define(["exports","@visactor/vtable"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactVTable={},e.VTable)}(this,(function(e,t){"use strict";function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r,i={exports:{}},a={};var o,s={exports:{}};
|
|
2
|
-
/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.development.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/"production"===production?i.exports=function(){if(r)return a;r=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var x=b.prototype=new v;x.constructor=b,g(x,y.prototype),x.isPureReactComponent=!0;var S=Array.isArray,_=Object.prototype.hasOwnProperty,w={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function k(t,n,r){var i,a={},o=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(o=""+n.key),n)_.call(n,i)&&!A.hasOwnProperty(i)&&(a[i]=n[i]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];a.children=u}if(t&&t.defaultProps)for(i in l=t.defaultProps)void 0===a[i]&&(a[i]=l[i]);return{$$typeof:e,type:t,key:o,ref:s,props:a,_owner:w.current}}function T(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var B=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function E(n,r,i,a,o){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return o=o(l=n),n=""===a?"."+C(l,0):a,S(o)?(i="",null!=n&&(i=n.replace(B,"$&/")+"/"),E(o,r,i,"",(function(e){return e}))):null!=o&&(T(o)&&(o=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(o,i+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(B,"$&/")+"/")+n)),r.push(o)),1;if(l=0,a=""===a?".":a+":",S(n))for(var u=0;u<n.length;u++){var c=a+C(s=n[u],u);l+=E(s,r,i,c,o)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(n),"function"==typeof c)for(n=c.call(n),u=0;!(s=n.next()).done;)l+=E(s=s.value,r,i,c=a+C(s,u++),o);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,n){if(null==e)return e;var r=[],i=0;return E(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M={current:null},L={transition:null},O={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:L,ReactCurrentOwner:w};function I(){throw Error("act(...) is not supported in production builds of React.")}return a.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},a.Component=y,a.Fragment=n,a.Profiler=o,a.PureComponent=b,a.StrictMode=i,a.Suspense=c,a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,a.act=I,a.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=g({},t.props),a=t.key,o=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(o=n.ref,s=w.current),void 0!==n.key&&(a=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(u in n)_.call(n,u)&&!A.hasOwnProperty(u)&&(i[u]=void 0===n[u]&&void 0!==l?l[u]:n[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:e,type:t.type,key:a,ref:o,props:i,_owner:s}},a.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},a.createElement=k,a.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},a.createRef=function(){return{current:null}},a.forwardRef=function(e){return{$$typeof:u,render:e}},a.isValidElement=T,a.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:R}},a.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},a.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},a.unstable_act=I,a.useCallback=function(e,t){return M.current.useCallback(e,t)},a.useContext=function(e){return M.current.useContext(e)},a.useDebugValue=function(){},a.useDeferredValue=function(e){return M.current.useDeferredValue(e)},a.useEffect=function(e,t){return M.current.useEffect(e,t)},a.useId=function(){return M.current.useId()},a.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},a.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},a.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},a.useMemo=function(e,t){return M.current.useMemo(e,t)},a.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},a.useRef=function(e){return M.current.useRef(e)},a.useState=function(e){return M.current.useState(e)},a.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},a.useTransition=function(){return M.current.useTransition()},a.version="18.3.1",a}():i.exports=(o||(o=1,function(e,t){"production"!==production&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,m="@@iterator";function y(e){if(null===e||"object"!=typeof e)return null;var t=g&&e[g]||e[m];return"function"==typeof t?t:null}var v={current:null},b={transition:null},x={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},_={},w=null;function A(e){w=e}_.setExtraStackFrame=function(e){w=e},_.getCurrentStack=null,_.getStackAddendum=function(){var e="";w&&(e+=w);var t=_.getCurrentStack;return t&&(e+=t()||""),e};var k=!1,T=!1,B=!1,C=!1,E=!1,P={ReactCurrentDispatcher:v,ReactCurrentBatchConfig:b,ReactCurrentOwner:S};function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];L("warn",e,n)}function M(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];L("error",e,n)}function L(e,t,n){var r=P.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}P.ReactDebugCurrentFrame=_,P.ReactCurrentActQueue=x;var O={};function I(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;O[i]||(M("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),O[i]=!0)}var N={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){I(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){I(e,"replaceState")},enqueueSetState:function(e,t,n,r){I(e,"setState")}},U=Object.assign,D={};function z(e,t,n){this.props=e,this.context=t,this.refs=D,this.updater=n||N}Object.freeze(D),z.prototype.isReactComponent={},z.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},z.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var j={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},F=function(e,t){Object.defineProperty(z.prototype,e,{get:function(){R("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var W in j)j.hasOwnProperty(W)&&F(W,j[W]);function H(){}function $(e,t,n){this.props=e,this.context=t,this.refs=D,this.updater=n||N}H.prototype=z.prototype;var V=$.prototype=new H;V.constructor=$,U(V,z.prototype),V.isPureReactComponent=!0;var G=Array.isArray;function Y(e){return G(e)}function q(e){return""+e}function Q(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}function X(e){return e.displayName||"Context"}function K(e){if(null==e)return null;if("number"==typeof e.tag&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case r:return"Portal";case o:return"Profiler";case a:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return X(e)+".Consumer";case s:return X(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:K(e.type)||"Memo";case f:var n=e,p=n._payload,g=n._init;try{return K(g(p))}catch(e){return null}}return null}var Z,J,ee,te=Object.prototype.hasOwnProperty,ne={key:!0,ref:!0,__self:!0,__source:!0};function re(e){if(te.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function ie(e){if(te.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}ee={};var ae=function(e,t,r,i,a,o,s){var l={$$typeof:n,type:e,key:t,ref:r,props:s,_owner:o,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function oe(e,t,n){var r,i={},a=null,o=null,s=null,l=null;if(null!=t)for(r in re(t)&&(o=t.ref,function(e){if("string"==typeof e.ref&&S.current&&e.__self&&S.current.stateNode!==e.__self){var t=K(S.current.type);ee[t]||(M('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),ee[t]=!0)}}(t)),ie(t)&&(Q(t.key),a=""+t.key),s=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)te.call(t,r)&&!ne.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(u>1){for(var c=Array(u),d=0;d<u;d++)c[d]=arguments[d+2];Object.freeze&&Object.freeze(c),i.children=c}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===i[r]&&(i[r]=h[r])}if(a||o){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){Z||(Z=!0,M("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,f),o&&function(e,t){var n=function(){J||(J=!0,M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,f)}return ae(e,a,o,s,l,S.current,i)}function se(e,t,n){if(null==e)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r,i,a=U({},e.props),o=e.key,s=e.ref,l=e._self,u=e._source,c=e._owner;if(null!=t)for(r in re(t)&&(s=t.ref,c=S.current),ie(t)&&(Q(t.key),o=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)te.call(t,r)&&!ne.hasOwnProperty(r)&&(void 0===t[r]&&void 0!==i?a[r]=i[r]:a[r]=t[r]);var d=arguments.length-2;if(1===d)a.children=n;else if(d>1){for(var h=Array(d),f=0;f<d;f++)h[f]=arguments[f+2];a.children=h}return ae(e.type,o,s,l,u,c,a)}function le(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var ue=".",ce=":",de=!1,he=/\/+/g;function fe(e){return e.replace(he,"$&/")}function pe(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(Q(e.key),n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function ge(e,t,i,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,u,c,d=!1;if(null===e)d=!0;else switch(s){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case n:case r:d=!0}}if(d){var h=e,f=o(h),p=""===a?ue+pe(h,0):a;if(Y(f)){var g="";null!=p&&(g=fe(p)+"/"),ge(f,t,g,"",(function(e){return e}))}else null!=f&&(le(f)&&(!f.key||h&&h.key===f.key||Q(f.key),l=f,u=i+(!f.key||h&&h.key===f.key?"":fe(""+f.key)+"/")+p,f=ae(l.type,u,l.ref,l._self,l._source,l._owner,l.props)),t.push(f));return 1}var m=0,v=""===a?ue:a+ce;if(Y(e))for(var b=0;b<e.length;b++)m+=ge(c=e[b],t,i,v+pe(c,b),o);else{var x=y(e);if("function"==typeof x){var S=e;x===S.entries&&(de||R("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),de=!0);for(var _,w=x.call(S),A=0;!(_=w.next()).done;)m+=ge(c=_.value,t,i,v+pe(c,A++),o)}else if("object"===s){var k=String(e);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===k?"object with keys {"+Object.keys(e).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}}return m}function me(e,t,n){if(null==e)return e;var r=[],i=0;return ge(e,r,"","",(function(e){return t.call(n,e,i++)})),r}var ye,ve=-1,be=0,xe=1,Se=2;function _e(e){if(e._status===ve){var t=(0,e._result)();if(t.then((function(t){if(e._status===be||e._status===ve){var n=e;n._status=xe,n._result=t}}),(function(t){if(e._status===be||e._status===ve){var n=e;n._status=Se,n._result=t}})),e._status===ve){var n=e;n._status=be,n._result=t}}if(e._status===xe){var r=e._result;return void 0===r&&M("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",r),"default"in r||M("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",r),r.default}throw e._result}function we(e){return"string"==typeof e||"function"==typeof e||!!(e===i||e===o||E||e===a||e===c||e===d||C||e===p||k||T||B)||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===s||e.$$typeof===l||e.$$typeof===u||e.$$typeof===ye||void 0!==e.getModuleId)}function Ae(){var e=v.current;return null===e&&M("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}ye=Symbol.for("react.module.reference");var ke,Te,Be,Ce,Ee,Pe,Re,Me=0;function Le(){}Le.__reactDisabledLog=!0;var Oe,Ie=P.ReactCurrentDispatcher;function Ne(e,t,n){if(void 0===Oe)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);Oe=r&&r[1]||""}return"\n"+Oe+e}var Ue,De=!1,ze="function"==typeof WeakMap?WeakMap:Map;function je(e,t){if(!e||De)return"";var n,r=Ue.get(e);if(void 0!==r)return r;De=!0;var i,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Ie.current,Ie.current=null,function(){if(0===Me){ke=console.log,Te=console.info,Be=console.warn,Ce=console.error,Ee=console.group,Pe=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Me++}();try{if(t){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(e){n=e}Reflect.construct(e,[],o)}else{try{o.call()}catch(e){n=e}e.call(o.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),l=n.stack.split("\n"),u=s.length-1,c=l.length-1;u>=1&&c>=0&&s[u]!==l[c];)c--;for(;u>=1&&c>=0;u--,c--)if(s[u]!==l[c]){if(1!==u||1!==c)do{if(u--,--c<0||s[u]!==l[c]){var d="\n"+s[u].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&Ue.set(e,d),d}}while(u>=1&&c>=0);break}}}finally{De=!1,Ie.current=i,function(){if(0==--Me){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},e,{value:ke}),info:U({},e,{value:Te}),warn:U({},e,{value:Be}),error:U({},e,{value:Ce}),group:U({},e,{value:Ee}),groupCollapsed:U({},e,{value:Pe}),groupEnd:U({},e,{value:Re})})}Me<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var h=e?e.displayName||e.name:"",f=h?Ne(h):"";return"function"==typeof e&&Ue.set(e,f),f}function Fe(e,t,n){if(null==e)return"";if("function"==typeof e)return je(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Ne(e);switch(e){case c:return Ne("Suspense");case d:return Ne("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return je(e.render,!1);case h:return Fe(e.type,t,n);case f:var r=e,i=r._payload,a=r._init;try{return Fe(a(i),t,n)}catch(e){}}return""}Ue=new ze;var We,He={},$e=P.ReactDebugCurrentFrame;function Ve(e){if(e){var t=e._owner,n=Fe(e.type,e._source,t?t.type:null);$e.setExtraStackFrame(n)}else $e.setExtraStackFrame(null)}function Ge(e){if(e){var t=e._owner;A(Fe(e.type,e._source,t?t.type:null))}else A(null)}function Ye(){if(S.current){var e=K(S.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}We=!1;var qe={};function Qe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=Ye();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!qe[n]){qe[n]=!0;var r="";e&&e._owner&&e._owner!==S.current&&(r=" It was passed a child from "+K(e._owner.type)+"."),Ge(e),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),Ge(null)}}}function Xe(e,t){if("object"==typeof e)if(Y(e))for(var n=0;n<e.length;n++){var r=e[n];le(r)&&Qe(r,t)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var i=y(e);if("function"==typeof i&&i!==e.entries)for(var a,o=i.call(e);!(a=o.next()).done;)le(a.value)&&Qe(a.value,t)}}function Ke(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==u&&n.$$typeof!==h)return;t=n.propTypes}if(t){var r=K(n);!function(e,t,n,r,i){var a=Function.call.bind(te);for(var o in e)if(a(e,o)){var s=void 0;try{if("function"!=typeof e[o]){var l=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[o](t,o,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}!s||s instanceof Error||(Ve(i),M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,o,typeof s),Ve(null)),s instanceof Error&&!(s.message in He)&&(He[s.message]=!0,Ve(i),M("Failed %s type: %s",n,s.message),Ve(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||We||(We=!0,M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",K(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ze(e,t,r){var a,o,s=we(e);if(!s){var l,u="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),u+=(null!=(a=t)&&void 0!==(o=a.__source)?"\n\nCheck your code at "+o.fileName.replace(/^.*[\\\/]/,"")+":"+o.lineNumber+".":"")||Ye(),null===e?l="null":Y(e)?l="array":void 0!==e&&e.$$typeof===n?(l="<"+(K(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,M("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,u)}var c=oe.apply(this,arguments);if(null==c)return c;if(s)for(var d=2;d<arguments.length;d++)Xe(arguments[d],e);return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){Ge(e),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),Ge(null);break}}null!==e.ref&&(Ge(e),M("Invalid attribute `ref` supplied to `React.Fragment`."),Ge(null))}(c):Ke(c),c}var Je=!1,et=!1,tt=null,nt=0,rt=!1;function it(e){var t=nt;nt++,null===x.current&&(x.current=[]);var n,r=x.isBatchingLegacy;try{if(x.isBatchingLegacy=!0,n=e(),!r&&x.didScheduleLegacyUpdate){var i=x.current;null!==i&&(x.didScheduleLegacyUpdate=!1,lt(i))}}catch(e){throw at(t),e}finally{x.isBatchingLegacy=r}if(null!==n&&"object"==typeof n&&"function"==typeof n.then){var a=n,o=!1,s={then:function(e,n){o=!0,a.then((function(r){at(t),0===nt?ot(r,e,n):e(r)}),(function(e){at(t),n(e)}))}};return rt||"undefined"==typeof Promise||Promise.resolve().then((function(){})).then((function(){o||(rt=!0,M("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))})),s}var l=n;if(at(t),0===nt){var u=x.current;return null!==u&&(lt(u),x.current=null),{then:function(e,t){null===x.current?(x.current=[],ot(l,e,t)):e(l)}}}return{then:function(e,t){e(l)}}}function at(e){e!==nt-1&&M("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),nt=e}function ot(t,n,r){var i=x.current;if(null!==i)try{lt(i),function(t){if(null===tt)try{var n=("require"+Math.random()).slice(0,7);tt=(e&&e[n]).call(e,"timers").setImmediate}catch(e){tt=function(e){!1===et&&(et=!0,"undefined"==typeof MessageChannel&&M("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}tt(t)}((function(){0===i.length?(x.current=null,n(t)):ot(t,n,r)}))}catch(e){r(e)}else n(t)}var st=!1;function lt(e){if(!st){st=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}e.length=0}catch(n){throw e=e.slice(t+1),n}finally{st=!1}}}var ut=Ze,ct=function(e,t,n){for(var r=se.apply(this,arguments),i=2;i<arguments.length;i++)Xe(arguments[i],r.type);return Ke(r),r},dt=function(e){var t=Ze.bind(null,e);return t.type=e,Je||(Je=!0,R("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return R("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},ht={map:me,forEach:function(e,t,n){me(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return me(e,(function(){t++})),t},toArray:function(e){return me(e,(function(e){return e}))||[]},only:function(e){if(!le(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};t.Children=ht,t.Component=z,t.Fragment=i,t.Profiler=o,t.PureComponent=$,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.act=it,t.cloneElement=ct,t.createContext=function(e){var t={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};t.Provider={$$typeof:s,_context:t};var n=!1,r=!1,i=!1,a={$$typeof:l,_context:t};return Object.defineProperties(a,{Provider:{get:function(){return r||(r=!0,M("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return n||(n=!0,M("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){i||(R("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),i=!0)}}}),t.Consumer=a,t._currentRenderer=null,t._currentRenderer2=null,t},t.createElement=ut,t.createFactory=dt,t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){null!=e&&e.$$typeof===h?M("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?M("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&M("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||M("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:u,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,e.name||e.displayName||(e.displayName=n)}}),n},t.isValidElement=le,t.lazy=function(e){var t,n,r={$$typeof:f,_payload:{_status:ve,_result:e},_init:_e};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){M("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){M("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},t.memo=function(e,t){we(e)||M("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:h,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(e.displayName=t)}}),r},t.startTransition=function(e,t){var n=b.transition;b.transition={};var r=b.transition;b.transition._updatedFibers=new Set;try{e()}finally{b.transition=n,null===n&&r._updatedFibers&&(r._updatedFibers.size>10&&R("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),r._updatedFibers.clear())}},t.unstable_act=it,t.useCallback=function(e,t){return Ae().useCallback(e,t)},t.useContext=function(e){var t=Ae();if(void 0!==e._context){var n=e._context;n.Consumer===e?M("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&M("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},t.useDebugValue=function(e,t){return Ae().useDebugValue(e,t)},t.useDeferredValue=function(e){return Ae().useDeferredValue(e)},t.useEffect=function(e,t){return Ae().useEffect(e,t)},t.useId=function(){return Ae().useId()},t.useImperativeHandle=function(e,t,n){return Ae().useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return Ae().useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return Ae().useLayoutEffect(e,t)},t.useMemo=function(e,t){return Ae().useMemo(e,t)},t.useReducer=function(e,t,n){return Ae().useReducer(e,t,n)},t.useRef=function(e){return Ae().useRef(e)},t.useState=function(e){return Ae().useState(e)},t.useSyncExternalStore=function(e,t,n){return Ae().useSyncExternalStore(e,t,n)},t.useTransition=function(){return Ae().useTransition()},t.version="18.3.1","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(s,s.exports)),s.exports);var l=i.exports,u=n(l);const c=u.createContext(null);c.displayName="TableContext";var d={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=new Array(a);i<a;i++)o[i]=r[i].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,a),!0;case 6:return c.fn.call(c.context,t,r,i,a,o),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||o(this,a);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[a]=1===u.length?u[0]:u:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(d);var h=n(d.exports);var f=(e,t)=>Object.prototype.toString.call(e)===`[object ${t}]`;var p=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"boolean"==typeof e:!0===e||!1===e||f(e,"Boolean")};var g=e=>"function"==typeof e;var m=e=>null==e;var y=e=>null!=e;var v=e=>{const t=typeof e;return null!==e&&"object"===t||"function"===t};var b=e=>"object"==typeof e&&null!==e;var x=function(e){if(!b(e)||!f(e,"Object"))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t};var S=function(e){const t=typeof e;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"string"===t:"string"===t||f(e,"String")};var _=e=>Array.isArray?Array.isArray(e):f(e,"Array");var w=function(e){return null!==e&&"function"!=typeof e&&Number.isFinite(e.length)};var A=function(e){const t=typeof e;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"number"===t:"number"===t||f(e,"Number")};var k=e=>A(e)&&Number.isFinite(e);var T=e=>new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(e);var B=e=>new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(e);var C=e=>({}.toString.call(e).replace(/^\[object /,"").replace(/]$/,""));const E=Object.prototype;var P=function(e){const t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||E)};const R=Object.prototype.hasOwnProperty;function M(e){if(m(e))return!0;if(w(e))return!e.length;const t=C(e);if("Map"===t||"Set"===t)return!e.size;if(P(e))return!Object.keys(e).length;for(const t in e)if(R.call(e,t))return!1;return!0}const L=Object.prototype.hasOwnProperty;var O=(e,t)=>null!=e&&L.call(e,t);function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){if(e===t)return;if(y(t)&&"object"==typeof t){const i=Object(t),a=[];for(const e in i)a.push(e);let{length:o}=a,s=-1;for(;o--;){const o=a[++s];!y(i[o])||"object"!=typeof i[o]||r&&_(e[o])?U(e,o,i[o]):N(e,t,o,n,r)}}}}function N(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a=e[n],o=t[n];let s=t[n],l=!0;if(_(o)){if(r)s=[];else if(_(a))s=a;else if(w(a)){s=new Array(a.length);let e=-1;const t=a.length;for(;++e<t;)s[e]=a[e]}}else x(o)?(s=a,"function"!=typeof a&&"object"==typeof a||(s={})):l=!1;l&&I(s,o,r,i),U(e,n,s)}function U(e,t,n){(void 0!==n&&!function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}(e[t],n)||void 0===n&&!(t in e))&&(e[t]=n)}function D(e){let t=-1;const n=arguments.length<=1?0:arguments.length-1;for(;++t<n;)I(e,t+1<1||arguments.length<=t+1?void 0:arguments[t+1],!0);return e}function z(e,t){if(!e||!x(e))return e;const n={};return Object.keys(e).forEach((r=>{const i=e[r];let a=!1;t.forEach((e=>{(S(e)&&e===r||e instanceof RegExp&&r.match(e))&&(a=!0)})),a||(n[r]=i)})),n}function j(e){return Object.prototype.toString.call(e)}function F(e){return Object.keys(e)}function W(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(null==e||null==t)return!1;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(j(e)!==j(t))return!1;if(g(e))return!!(null==n?void 0:n.skipFunction);if("object"!=typeof e)return!1;if(_(e)){if(e.length!==t.length)return!1;for(let r=e.length-1;r>=0;r--)if(!W(e[r],t[r],n))return!1;return!0}if(!x(e))return!1;const r=F(e),i=F(t);if(r.length!==i.length)return!1;r.sort(),i.sort();for(let e=r.length-1;e>=0;e--)if(r[e]!=i[e])return!1;for(let i=r.length-1;i>=0;i--){const a=r[i];if(!W(e[a],t[a],n))return!1}return!0}function H(e,t){if(!_(e)||!_(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const $="undefined"!=typeof console;function V(e,t,n){const r=[t].concat([].slice.call(n));$&&console[e].apply(console,r)}var G;!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Info=3]="Info",e[e.Debug=4]="Debug"}(G||(G={}));class Y{static getInstance(e,t){return Y._instance&&A(e)?Y._instance.level(e):Y._instance||(Y._instance=new Y(e,t)),Y._instance}static setInstance(e){return Y._instance=e}static setInstanceLevel(e){Y._instance?Y._instance.level(e):Y._instance=new Y(e)}static clearInstance(){Y._instance=null}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G.None,t=arguments.length>1?arguments[1]:void 0;this._onErrorHandler=[],this._level=e,this._method=t}addErrorHandler(e){this._onErrorHandler.find((t=>t===e))||this._onErrorHandler.push(e)}removeErrorHandler(e){const t=this._onErrorHandler.findIndex((t=>t===e));t<0||this._onErrorHandler.splice(t,1)}callErrorHandler(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._onErrorHandler.forEach((e=>e(...t)))}canLogInfo(){return this._level>=G.Info}canLogDebug(){return this._level>=G.Debug}canLogError(){return this._level>=G.Error}canLogWarn(){return this._level>=G.Warn}level(e){return arguments.length?(this._level=+e,this):this._level}error(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._level>=G.Error&&(this._onErrorHandler.length?this.callErrorHandler(...n):V(null!==(e=this._method)&&void 0!==e?e:"error","ERROR",n)),this}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this._level>=G.Warn&&V(this._method||"warn","WARN",t),this}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this._level>=G.Info&&V(this._method||"log","INFO",t),this}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this._level>=G.Debug&&V(this._method||"log","DEBUG",t),this}}Y._instance=null;var q=function(e,t,n){return e<t?t:e>n?n:e};const Q=1e-12,X=Math.PI,K=X/2,Z=2*X,J=2*Math.PI,ee=Math.abs,te=Math.atan2,ne=Math.cos,re=Math.max,ie=Math.min,ae=Math.sin,oe=Math.sqrt,se=Math.pow;function le(e){return e>=1?K:e<=-1?-K:Math.asin(e)}class ue{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.x=0,this.y=0,this.x=e,this.y=t,this.x1=n,this.y1=r}clone(){return new ue(this.x,this.y)}copyFrom(e){return this.x=e.x,this.y=e.y,this.x1=e.x1,this.y1=e.y1,this.defined=e.defined,this.context=e.context,this}set(e,t){return this.x=e,this.y=t,this}add(e){return A(e)?(this.x+=e,void(this.y+=e)):(this.x+=e.x,this.y+=e.y,this)}sub(e){return A(e)?(this.x-=e,void(this.y-=e)):(this.x-=e.x,this.y-=e.y,this)}multi(e){throw new Error("暂不支持")}div(e){throw new Error("暂不支持")}}class ce{static distancePP(e,t){return oe(se(e.x-t.x,2)+se(e.y-t.y,2))}static distanceNN(e,t,n,r){return oe(se(e-n,2)+se(t-r,2))}static distancePN(e,t,n){return oe(se(t-e.x,2)+se(n-e.y,2))}static pointAtPP(e,t,n){return new ue((t.x-e.x)*n+e.x,(t.y-e.y)*n+e.y)}}function de(e,t,n){const{x1:r,y1:i,x2:a,y2:o}=t;return n.onlyTranslate()?(e!==t&&e.setValue(t.x1,t.y1,t.x2,t.y2),e.translate(n.e,n.f),t):(e.clear(),e.add(n.a*r+n.c*i+n.e,n.b*r+n.d*i+n.f),e.add(n.a*a+n.c*i+n.e,n.b*a+n.d*i+n.f),e.add(n.a*a+n.c*o+n.e,n.b*a+n.d*o+n.f),e.add(n.a*r+n.c*o+n.e,n.b*r+n.d*o+n.f),t)}class he{constructor(e){e?this.setValue(e.x1,e.y1,e.x2,e.y2):this.clear()}clone(){return new he(this)}clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this}empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE}equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2}setValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return this.x1=e,this.y1=t,this.x2=n,this.y2=r,this}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return n<e?(this.x2=e,this.x1=n):(this.x1=e,this.x2=n),r<t?(this.y2=t,this.y1=r):(this.y1=t,this.y2=r),this}add(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e<this.x1&&(this.x1=e),t<this.y1&&(this.y1=t),e>this.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this}expand(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return _(e)?(this.y1-=e[0],this.x2+=e[1],this.y2+=e[2],this.x1-=e[3]):(this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e),this}round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this}translate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}rotate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.rotatedPoints(e,t,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])}scale(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=this.scalePoints(e,t,n,r);return this.clear().add(i[0],i[1]).add(i[2],i[3])}union(e){return e.x1<this.x1&&(this.x1=e.x1),e.y1<this.y1&&(this.y1=e.y1),e.x2>this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this}intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2<this.x2&&(this.x2=e.x2),e.y2<this.y2&&(this.y2=e.y2),this}encloses(e){return e&&this.x1<=e.x1&&this.x2>=e.x2&&this.y1<=e.y1&&this.y2>=e.y2}alignsWith(e){return e&&(this.x1===e.x1||this.x2===e.x2||this.y1===e.y1||this.y2===e.y2)}intersects(e){return e&&!(this.x2<e.x1||this.x1>e.x2||this.y2<e.y1||this.y1>e.y2)}contains(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!(e<this.x1||e>this.x2||t<this.y1||t>this.y2)}containsPoint(e){return!(e.x<this.x1||e.x>this.x2||e.y<this.y1||e.y>this.y2)}width(){return this.empty()?0:this.x2-this.x1}height(){return this.empty()?0:this.y2-this.y1}scaleX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x1*=e,this.x2*=e,this}scaleY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y1*=e,this.y2*=e,this}transformWithMatrix(e){return de(this,this,e),this}copy(e){return this.x1=e.x1,this.y1=e.y1,this.x2=e.x2,this.y2=e.y2,this}rotatedPoints(e,t,n){const{x1:r,y1:i,x2:a,y2:o}=this,s=Math.cos(e),l=Math.sin(e),u=t-t*s+n*l,c=n-t*l-n*s;return[s*r-l*i+u,l*r+s*i+c,s*r-l*o+u,l*r+s*o+c,s*a-l*i+u,l*a+s*i+c,s*a-l*o+u,l*a+s*o+c]}scalePoints(e,t,n,r){const{x1:i,y1:a,x2:o,y2:s}=this;return[e*i+(1-e)*n,t*a+(1-t)*r,e*o+(1-e)*n,t*s+(1-t)*r]}}class fe extends he{}const pe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e<0)for(;e<-Z;)e+=Z;else if(e>0)for(;e>Z;)e-=Z;return e};class ge{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=a}equalToMatrix(e){return!(this.e!==e.e||this.f!==e.f||this.a!==e.a||this.d!==e.d||this.b!==e.b||this.c!==e.c)}equalTo(e,t,n,r,i,a){return!(this.e!==i||this.f!==a||this.a!==e||this.d!==r||this.b!==t||this.c!==n)}setValue(e,t,n,r,i,a){return this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=a,this}reset(){return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this}getInverse(){const e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,a=this.f,o=new ge,s=e*r-t*n;return o.a=r/s,o.b=-t/s,o.c=-n/s,o.d=e/s,o.e=(n*a-r*i)/s,o.f=-(e*a-t*i)/s,o}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.a*t+this.c*n,i=this.b*t+this.d*n,a=this.a*-n+this.c*t,o=this.b*-n+this.d*t;return this.a=r,this.b=i,this.c=a,this.d=o,this}rotateByCenter(e,t,n){const r=Math.cos(e),i=Math.sin(e),a=(1-r)*t+i*n,o=(1-r)*n-i*t,s=r*this.a-i*this.b,l=i*this.a+r*this.b,u=r*this.c-i*this.d,c=i*this.c+r*this.d,d=r*this.e-i*this.f+a,h=i*this.e+r*this.f+o;return this.a=s,this.b=l,this.c=u,this.d=c,this.e=d,this.f=h,this}scale(e,t){return this.a*=e,this.b*=e,this.c*=t,this.d*=t,this}setScale(e,t){return this.b=this.b/this.a*e,this.c=this.c/this.d*t,this.a=e,this.d=t,this}transform(e,t,n,r,i,a){return this.multiply(e,t,n,r,i,a),this}translate(e,t){return this.e+=this.a*e+this.c*t,this.f+=this.b*e+this.d*t,this}transpose(){const{a:e,b:t,c:n,d:r,e:i,f:a}=this;return this.a=t,this.b=e,this.c=r,this.d=n,this.e=a,this.f=i,this}multiply(e,t,n,r,i,a){const o=this.a,s=this.b,l=this.c,u=this.d,c=o*e+l*t,d=s*e+u*t,h=o*n+l*r,f=s*n+u*r,p=o*i+l*a+this.e,g=s*i+u*a+this.f;return this.a=c,this.b=d,this.c=h,this.d=f,this.e=p,this.f=g,this}interpolate(e,t){const n=new ge;return n.a=this.a+(e.a-this.a)*t,n.b=this.b+(e.b-this.b)*t,n.c=this.c+(e.c-this.c)*t,n.d=this.d+(e.d-this.d)*t,n.e=this.e+(e.e-this.e)*t,n.f=this.f+(e.f-this.f)*t,n}transformPoint(e,t){const{a:n,b:r,c:i,d:a,e:o,f:s}=this,l=n*a-r*i,u=a/l,c=-r/l,d=-i/l,h=n/l,f=(i*s-a*o)/l,p=-(n*s-r*o)/l,{x:g,y:m}=e;t.x=g*u+m*d+f,t.y=g*c+m*h+p}onlyTranslate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.a===e&&0===this.b&&0===this.c&&this.d===e}clone(){return new ge(this.a,this.b,this.c,this.d,this.e,this.f)}toTransformAttrs(){const e=this.a,t=this.b,n=this.c,r=this.d,i=e*r-t*n,a={x:this.e,y:this.f,rotateDeg:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!==e||0!==t){const o=Math.sqrt(e*e+t*t);a.rotateDeg=t>0?Math.acos(e/o):-Math.acos(e/o),a.scaleX=o,a.scaleY=i/o,a.skewX=(e*n+t*r)/i,a.skewY=0}else if(0!==n||0!==r){const o=Math.sqrt(n*n+r*r);a.rotateDeg=Math.PI/2-(r>0?Math.acos(-n/o):-Math.acos(n/o)),a.scaleX=i/o,a.scaleY=o,a.skewX=0,a.skewY=(e*n+t*r)/i}return a.rotateDeg=180*a.rotateDeg/Math.PI,a}}function me(e,t,n){t/=100,n/=100;const r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r/2;let o=0,s=0,l=0;return 0<=e&&e<60?(o=r,s=i,l=0):60<=e&&e<120?(o=i,s=r,l=0):120<=e&&e<180?(o=0,s=r,l=i):180<=e&&e<240?(o=0,s=i,l=r):240<=e&&e<300?(o=i,s=0,l=r):300<=e&&e<360&&(o=r,s=0,l=i),o=Math.round(255*(o+a)),s=Math.round(255*(s+a)),l=Math.round(255*(l+a)),{r:o,g:s,b:l}}function ye(e,t,n){e/=255,t/=255,n/=255;const r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r;let o=0,s=0,l=0;return o=0===a?0:i===e?(t-n)/a%6:i===t?(n-e)/a+2:(e-t)/a+4,o=Math.round(60*o),o<0&&(o+=360),l=(i+r)/2,s=0===a?0:a/(1-Math.abs(2*l-1)),s=+(100*s).toFixed(1),l=+(100*l).toFixed(1),{h:o,s:s,l:l}}const ve=/^#([0-9a-f]{3,8})$/,be={transparent:4294967040},xe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Se(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function _e(e){return A(e)?new Be(e>>16,e>>8&255,255&e,1):_(e)?new Be(e[0],e[1],e[2]):new Be(255,255,255)}function we(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Ae(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const ke=(e,t)=>{const n=ve.exec(e);if(t||n){const e=parseInt(n[1],16),t=n[1].length;return 3===t?new Be((e>>8&15)+((e>>8&15)<<4),(e>>4&15)+((e>>4&15)<<4),(15&e)+((15&e)<<4),1):6===t?_e(e):8===t?new Be(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):null}};class Te{static Brighter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===t?e:new Te(e).brighter(t).toRGBA()}static SetOpacity(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===t?e:new Te(e).setOpacity(t).toRGBA()}static getColorBrightness(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hsl";const n=e instanceof Te?e:new Te(e);switch(t){case"hsv":default:return n.getHSVBrightness();case"hsl":return n.getHSLBrightness();case"lum":return n.getLuminance();case"lum2":return n.getLuminance2();case"lum3":return n.getLuminance3()}}static parseColorString(e){if(y(be[e]))return function(e){return A(e)?new Be(e>>>24,e>>>16&255,e>>>8&255,255&e):_(e)?new Be(e[0],e[1],e[2],e[3]):new Be(255,255,255,1)}(be[e]);if(y(xe[e]))return _e(xe[e]);const t=`${e}`.trim().toLowerCase(),n=ke(t);if(void 0!==n)return n;if(/^(rgb|RGB|rgba|RGBA)/.test(t)){const e=t.replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(",");return new Be(parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseFloat(e[3]))}if(/^(hsl|HSL|hsla|HSLA)/.test(t)){const e=t.replace(/(?:\(|\)|hsla|HSLA|hsl|HSL)*/g,"").split(","),n=me(parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10));return new Be(n.r,n.g,n.b,parseFloat(e[3]))}}constructor(e){const t=Te.parseColorString(e);this.color=t||new Be(255,255,255)}toRGBA(){return this.color.formatRgb()}toString(){return this.color.formatRgb()}toHex(){return this.color.formatHex()}toHsl(){return this.color.formatHsl()}brighter(e){const{r:t,g:n,b:r}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(t*e))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*e))),this.color.b=Math.max(0,Math.min(255,Math.floor(r*e))),this}add(e){const{r:t,g:n,b:r}=this.color;return this.color.r+=Math.min(255,t+e.color.r),this.color.g+=Math.min(255,n+e.color.g),this.color.b+=Math.min(255,r+e.color.b),this}sub(e){return this.color.r=Math.max(0,this.color.r-e.color.r),this.color.g=Math.max(0,this.color.g-e.color.g),this.color.b=Math.max(0,this.color.b-e.color.b),this}multiply(e){const{r:t,g:n,b:r}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(t*e.color.r))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*e.color.g))),this.color.b=Math.max(0,Math.min(255,Math.floor(r*e.color.b))),this}getHSVBrightness(){return Math.max(this.color.r,this.color.g,this.color.b)/255}getHSLBrightness(){return.5*(Math.max(this.color.r,this.color.g,this.color.b)/255+Math.min(this.color.r,this.color.g,this.color.b)/255)}setHsl(e,t,n){const r=this.color.opacity,i=ye(this.color.r,this.color.g,this.color.b),a=me(m(e)?i.h:q(e,0,360),m(t)?i.s:t>=0&&t<=1?100*t:t,m(n)?i.l:n<=1&&n>=0?100*n:n);return this.color=new Be(a.r,a.g,a.b,r),this}setRGB(e,t,n){return!m(e)&&(this.color.r=e),!m(t)&&(this.color.g=t),!m(n)&&(this.color.b=n),this}setHex(e){const t=`${e}`.trim().toLowerCase(),n=ke(t,!0);return null!=n?n:this}setColorName(e){const t=xe[e.toLowerCase()];return void 0!==t&&this.setHex(t),this}setScalar(e){return this.color.r=e,this.color.g=e,this.color.b=e,this}setOpacity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.color.opacity=e,this}getLuminance(){return(.2126*this.color.r+.7152*this.color.g+.0722*this.color.b)/255}getLuminance2(){return(.2627*this.color.r+.678*this.color.g+.0593*this.color.b)/255}getLuminance3(){return(.299*this.color.r+.587*this.color.g+.114*this.color.b)/255}clone(){return new Te(this.color.toString())}copyGammaToLinear(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return this.color.r=Math.pow(e.color.r,t),this.color.g=Math.pow(e.color.g,t),this.color.b=Math.pow(e.color.b,t),this}copyLinearToGamma(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const n=t>0?1/t:1;return this.color.r=Math.pow(e.color.r,n),this.color.g=Math.pow(e.color.g,n),this.color.b=Math.pow(e.color.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.color.r=we(e.color.r),this.color.g=we(e.color.g),this.color.b=we(e.color.b),this}copyLinearToSRGB(e){return this.color.r=Ae(e.color.r),this.color.g=Ae(e.color.g),this.color.b=Ae(e.color.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}}class Be{constructor(e,t,n,r){this.r=isNaN(+e)?255:Math.max(0,Math.min(255,+e)),this.g=isNaN(+t)?255:Math.max(0,Math.min(255,+t)),this.b=isNaN(+n)?255:Math.max(0,Math.min(255,+n)),y(r)?this.opacity=isNaN(+r)?1:Math.max(0,Math.min(1,+r)):this.opacity=1}formatHex(){return`#${Se(this.r)+Se(this.g)+Se(this.b)+(1===this.opacity?"":Se(255*this.opacity))}`}formatRgb(){const e=this.opacity;return`${1===e?"rgb(":"rgba("}${this.r},${this.g},${this.b}${1===e?")":`,${e})`}`}formatHsl(){const e=this.opacity,{h:t,s:n,l:r}=ye(this.r,this.g,this.b);return`${1===e?"hsl(":"hsla("}${t},${n}%,${r}%${1===e?")":`,${e})`}`}toString(){return this.formatHex()}}const Ce=(e,t)=>{const{x1:n,x2:r,y1:i,y2:a}=e,o=Math.abs(r-n),s=Math.abs(a-i);let l=(n+r)/2,u=(i+a)/2,c=0,d=0;switch(t){case"top":case"inside-top":d=-.5;break;case"bottom":case"inside-bottom":d=.5;break;case"left":case"inside-left":c=-.5;break;case"right":case"inside-right":c=.5;break;case"top-right":c=.5,d=-.5;break;case"top-left":c=-.5,d=-.5;break;case"bottom-right":c=.5,d=.5;break;case"bottom-left":c=-.5,d=.5}return l+=c*o,u+=d*s,{x:l,y:u}};const Ee=function(){const e={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(";").forEach((t=>{if(t){const n=t.split(":");if(2===n.length){const t=n[0].trim(),r=n[1].trim();t&&r&&(e[t]=r)}}})),e},Pe=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase();var Re,Me={exports:{}},Le={};var Oe,Ie={};
|
|
11
|
-
/**
|
|
12
|
-
* @license React
|
|
13
|
-
* react-is.development.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/"production"===production?Me.exports=function(){if(Re)return Le;Re=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case u:case f:case h:case o:return e;default:return p}}case n:return p}}}return e=Symbol.for("react.module.reference"),Le.ContextConsumer=s,Le.ContextProvider=o,Le.Element=t,Le.ForwardRef=u,Le.Fragment=r,Le.Lazy=f,Le.Memo=h,Le.Portal=n,Le.Profiler=a,Le.StrictMode=i,Le.Suspense=c,Le.SuspenseList=d,Le.isAsyncMode=function(){return!1},Le.isConcurrentMode=function(){return!1},Le.isContextConsumer=function(e){return g(e)===s},Le.isContextProvider=function(e){return g(e)===o},Le.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Le.isForwardRef=function(e){return g(e)===u},Le.isFragment=function(e){return g(e)===r},Le.isLazy=function(e){return g(e)===f},Le.isMemo=function(e){return g(e)===h},Le.isPortal=function(e){return g(e)===n},Le.isProfiler=function(e){return g(e)===a},Le.isStrictMode=function(e){return g(e)===i},Le.isSuspense=function(e){return g(e)===c},Le.isSuspenseList=function(e){return g(e)===d},Le.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===i||t===c||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===h||t.$$typeof===o||t.$$typeof===s||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},Le.typeOf=g,Le}():Me.exports=(Oe||(Oe=1,"production"!==production&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var g=e.type;switch(g){case r:case a:case i:case c:case d:return g;default:var m=g&&g.$$typeof;switch(m){case l:case s:case u:case f:case h:case o:return m;default:return p}}case n:return p}}}e=Symbol.for("react.module.reference");var m=s,y=o,v=t,b=u,x=r,S=f,_=h,w=n,A=a,k=i,T=c,B=d,C=!1,E=!1;Ie.ContextConsumer=m,Ie.ContextProvider=y,Ie.Element=v,Ie.ForwardRef=b,Ie.Fragment=x,Ie.Lazy=S,Ie.Memo=_,Ie.Portal=w,Ie.Profiler=A,Ie.StrictMode=k,Ie.Suspense=T,Ie.SuspenseList=B,Ie.isAsyncMode=function(e){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Ie.isConcurrentMode=function(e){return E||(E=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Ie.isContextConsumer=function(e){return g(e)===s},Ie.isContextProvider=function(e){return g(e)===o},Ie.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ie.isForwardRef=function(e){return g(e)===u},Ie.isFragment=function(e){return g(e)===r},Ie.isLazy=function(e){return g(e)===f},Ie.isMemo=function(e){return g(e)===h},Ie.isPortal=function(e){return g(e)===n},Ie.isProfiler=function(e){return g(e)===a},Ie.isStrictMode=function(e){return g(e)===i},Ie.isSuspense=function(e){return g(e)===c},Ie.isSuspenseList=function(e){return g(e)===d},Ie.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===i||t===c||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===h||t.$$typeof===o||t.$$typeof===s||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},Ie.typeOf=g}()),Ie);var Ne=Me.exports;const Ue=e=>{let t=[];return u.Children.forEach(e,(e=>{m(e)||(Ne.isFragment(e)?t=t.concat(Ue(e.props.children)):t.push(e))})),t},De={...t.TABLE_EVENT_TYPE,...t.PIVOT_TABLE_EVENT_TYPE,...t.PIVOT_CHART_EVENT_TYPE},ze={onClickCell:De.CLICK_CELL,onDblClickCell:De.DBLCLICK_CELL,onMouseDownCell:De.MOUSEDOWN_CELL,onMouseUpCell:De.MOUSEUP_CELL,onSelectedCell:De.SELECTED_CELL,onSelectedClear:De.SELECTED_CLEAR,onKeyDown:De.KEYDOWN,onMouseEnterTable:De.MOUSEENTER_TABLE,onMouseLeaveTable:De.MOUSELEAVE_TABLE,onMouseDownTable:De.MOUSEDOWN_TABLE,onMouseMoveCell:De.MOUSEMOVE_CELL,onMouseEnterCell:De.MOUSEENTER_CELL,onMouseLeaveCell:De.MOUSELEAVE_CELL,onContextMenuCell:De.CONTEXTMENU_CELL,onResizeColumn:De.RESIZE_COLUMN,onResizeColumnEnd:De.RESIZE_COLUMN_END,onChangeHeaderPosition:De.CHANGE_HEADER_POSITION,onSortClick:De.SORT_CLICK,onFreezeClick:De.FREEZE_CLICK,onScroll:De.SCROLL,onDropdownMenuClick:De.DROPDOWN_MENU_CLICK,onMouseOverChartSymbol:De.MOUSEOVER_CHART_SYMBOL,onDragSelectEnd:De.DRAG_SELECT_END,onDropdownIconClick:De.DROPDOWN_ICON_CLICK,onDropdownMenuClear:De.DROPDOWN_MENU_CLEAR,onTreeHierarchyStateChange:De.TREE_HIERARCHY_STATE_CHANGE,onShowMenu:De.SHOW_MENU,onHideMenu:De.HIDE_MENU,onIconClick:De.ICON_CLICK,onLegendItemClick:De.LEGEND_ITEM_CLICK,onLegendItemHover:De.LEGEND_ITEM_HOVER,onLegendItemUnHover:De.LEGEND_ITEM_UNHOVER,onLegendChange:De.LEGEND_CHANGE,onMouseEnterAxis:De.MOUSEENTER_AXIS,onMouseLeaveAxis:De.MOUSELEAVE_AXIS,onCheckboxStateChange:De.CHECKBOX_STATE_CHANGE,onRadioStateChange:De.RADIO_STATE_CHANGE,onAfterRender:De.AFTER_RENDER,onInitialized:De.INITIALIZED,onPivotSortClick:De.PIVOT_SORT_CLICK,onDrillMenuClick:De.DRILLMENU_CLICK,onVChartEventType:De.VCHART_EVENT_TYPE,onChangCellValue:De.CHANGE_CELL_VALUE,onMousedownFillHandle:De.MOUSEDOWN_FILL_HANDLE,onDragFillHandleEnd:De.DRAG_FILL_HANDLE_END,onDblclickFillHandle:De.DBLCLICK_FILL_HANDLE,onScrollVerticalEnd:De.SCROLL_VERTICAL_END,onScrollHorizontalEnd:De.SCROLL_HORIZONTAL_END},je=Object.keys(ze),Fe=(e,t=ze)=>{const n={};return Object.keys(e).forEach((r=>{t[r]&&e[r]&&(n[r]=e[r])})),n},We=(e,t,n,r=ze)=>{if(!t&&!n||!e)return!1;const i=n?Fe(n,r):null,a=t?Fe(t,r):null;return i&&Object.keys(i).forEach((t=>{a&&a[t]&&a[t]===i[t]||e.off(r[t],n[t])})),a&&Object.keys(a).forEach((t=>{i&&i[t]&&i[t]===a[t]||e.on(r[t],a[t])})),!0};class He{static GenAutoIncrementId(){return He.auto_increment_id++}}He.auto_increment_id=0;class $e{constructor(e){this.id=He.GenAutoIncrementId(),this.registry=e}}const Ve="named",Ge="inject",Ye="inversify:tagged",qe="inversify:paramtypes";class Qe{constructor(e,t){this.key=e,this.value=t}toString(){return this.key===Ve?`named: ${String(this.value).toString()} `:`tagged: { key:${this.key.toString()}, value: ${String(this.value)} }`}}var Xe=function(e){var t;return function(e){const t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,o={__proto__:[]}instanceof Array,s=!a&&!o,l={create:a?function(){return A(Object.create(null))}:o?function(){return A({__proto__:null})}:function(){return A({})},has:s?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:s?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),c="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,d=c||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){const e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){const e=this._index;if(e>=0&&e<this._keys.length){const n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){const t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){const n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){const n=this._find(t,!1);if(n>=0){const r=this._keys.length;for(let e=n+1;e<r;e++)this._keys[e-1]=this._keys[e],this._values[e-1]=this._values[e];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,a)},t.prototype.entries=function(){return new n(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function a(e,t){return t}function o(e,t){return[e,t]}}():Map,h=(c||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new d}Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()}}():Set,new(c||"function"!=typeof WeakMap?function(){const e=16,n=l.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){const t=a(e,!1);return void 0!==t&&l.has(t,this._key)},e.prototype.get=function(e){const t=a(e,!1);return void 0!==t?l.get(t,this._key):void 0},e.prototype.set=function(e,t){return a(e,!0)[this._key]=t,this},e.prototype.delete=function(e){const t=a(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){let e;do{e="@@WeakMap@@"+s()}while(l.has(n,e));return n[e]=!0,e}function a(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:l.create()})}return e[r]}function o(e,t){for(let n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function s(){const t=(n=e,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(n)):o(new Uint8Array(n),n):o(new Array(n),n));var n;t[6]=79&t[6]|64,t[8]=191&t[8]|128;let r="";for(let n=0;n<e;++n){const e=t[n];4!==n&&6!==n&&8!==n||(r+="-"),e<16&&(r+="0"),r+=e.toString(16).toLowerCase()}return r}}():WeakMap));function f(e,t,n){let r=h.get(e);if(y(r)){if(!n)return;r=new d,h.set(e,r)}let i=r.get(t);if(y(i)){if(!n)return;i=new d,r.set(t,i)}return i}function p(e,t,n){if(g(e,t,n))return!0;const r=w(t);return!v(r)&&p(e,r,n)}function g(e,t,n){const r=f(t,n,!1);return!y(r)&&!!r.has(e)}function m(e,t,n){if(g(e,t,n))return function(e,t,n){const r=f(t,n,!1);if(!y(r))return r.get(e)}(e,t,n);const r=w(t);return v(r)?void 0:m(e,r,n)}function y(e){return void 0===e}function v(e){return null===e}function b(e){return"object"==typeof e?null!==e:"function"==typeof e}function x(e,t){switch(function(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}const n=3===t?"string":5===t?"number":"default",i=function(e,t){const n=e[t];if(null!=n){if(!_(n))throw new TypeError;return n}}(e,r);if(void 0!==i){const t=i.call(e,n);if(b(t))throw new TypeError;return t}return function(e,t){if("string"===t){const t=e.toString;if(_(t)){const n=t.call(e);if(!b(n))return n}const n=e.valueOf;if(_(n)){const t=n.call(e);if(!b(t))return t}}else{const t=e.valueOf;if(_(t)){const n=t.call(e);if(!b(n))return n}const n=e.toString;if(_(n)){const t=n.call(e);if(!b(t))return t}}throw new TypeError}(e,"default"===n?"number":n)}function S(e){const t=x(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function _(e){return"function"==typeof e}function w(e){const t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;const n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;const i=r.constructor;return"function"!=typeof i||i===e?t:i}function A(e){return e.__=void 0,delete e.__,e}e("defineMetadata",(function(e,t,n,r){if(!b(n))throw new TypeError;return i=e,a=t,void f(n,r,!0).set(i,a);var i,a})),e("hasMetadata",(function(e,t,n){if(!b(t))throw new TypeError;return y(n)||(n=S(n)),p(e,t,n)})),e("hasOwnMetadata",(function(e,t,n){if(!b(t))throw new TypeError;return y(n)||(n=S(n)),g(e,t,n)})),e("getMetadata",(function(e,t,n){if(!b(t))throw new TypeError;return y(n)||(n=S(n)),m(e,t,n)}))}((t=e,function(e,n){"function"!=typeof t[e]&&Object.defineProperty(t,e,{configurable:!0,writable:!0,value:n})})),e}({});function Ke(e,t,n,r){!function(e,t,n,r){const i=[r];let a={};Xe.hasOwnMetadata(e,t)&&(a=Xe.getMetadata(e,t));let o=a[n];void 0===o&&(o=[]),o.push(...i),a[n]=o,Xe.defineMetadata(e,a,t)}(Ye,e,n.toString(),r)}function Ze(e){return(t,n,r)=>{Ke(t,0,r,e)}}const Je=(et=Ge,e=>(t,n,r)=>Ze(new Qe(et,e))(t,n,r));var et;function tt(){return function(e){return Xe.defineMetadata(qe,null,e),e}}function nt(e){return Ze(new Qe(Ve,e))}const rt="Singleton",it="Transient",at="ConstantValue",ot="DynamicValue",st="Factory",lt="Function",ut="Instance",ct="Invalid";class dt{constructor(e,t){this.id=He.GenAutoIncrementId(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=ct,this.constraint=e=>!0,this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.dynamicValue=null}clone(){const e=new dt(this.serviceIdentifier,this.scope);return e.activated=e.scope===rt&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.provider=this.provider,e.constraint=this.constraint,e.cache=this.cache,e}}class ht{getConstructorMetadata(e){return{compilerGeneratedMetadata:Xe.getMetadata(qe,e),userGeneratedMetadata:Xe.getMetadata(Ye,e)||{}}}getPropertiesMetadata(e){throw new Error("暂未实现")}}const ft=(pt=Ve,e=>{const t=t=>{if(null==t)return!1;if(t.key===pt&&t.value===e)return!0;if(null==t.constructorArgsMetadata)return!1;const n=t.constructorArgsMetadata;for(let t=0;t<n.length;t++)if(n[t].key===pt&&n[t].value===e)return!0;return!1};return t.metaData=new Qe(pt,e),t});var pt;class gt{constructor(e){this._binding=e}inRequestScope(){throw new Error("暂未实现")}inSingletonScope(){return this._binding.scope=rt,this}inTransientScope(){return this._binding.scope=it,this}whenTargetNamed(e){return this._binding.constraint=ft(e),this}}class mt{constructor(e){this._binding=e}to(e){return this._binding.type=ut,this._binding.implementationType=e,new gt(this._binding)}toSelf(){const e=this._binding.serviceIdentifier;return this.to(e)}toDynamicValue(e){return this._binding.type=ot,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new gt(this._binding)}toConstantValue(e){return this._binding.type=at,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=rt,new gt(this._binding)}toFactory(e){return this._binding.type=st,this._binding.factory=e,this._binding.scope=rt,new gt(this._binding)}toService(e){this.toDynamicValue((t=>t.container.get(e)))}}const yt=Symbol("ContributionProvider");class vt{constructor(e,t){this.serviceIdentifier=e,this.container=t}getContributions(){return this.caches||(this.caches=[],this.container&&this.container.isBound(this.serviceIdentifier)&&this.caches.push(...this.container.getAll(this.serviceIdentifier))),this.caches}}function bt(e,t){e(yt).toDynamicValue((e=>{let{container:n}=e;return new vt(t,n)})).inSingletonScope().whenTargetNamed(t)}class xt{constructor(e,t){this._args=e,this.name=t,this.taps=[]}tap(e,t){this._tap("sync",e,t)}unTap(e,t){const n="string"==typeof e?e.trim():e.name;n&&(this.taps=this.taps.filter((e=>!(e.name===n&&(!t||e.fn===t)))))}_parseOptions(e,t,n){let r;if("string"==typeof t)r={name:t.trim()};else if("object"!=typeof t||null===t)throw new Error("Invalid tap options");if("string"!=typeof r.name||""===r.name)throw new Error("Missing name for tap");return r=Object.assign({type:e,fn:n},r),r}_tap(e,t,n){this._insert(this._parseOptions(e,t,n))}_insert(e){let t;"string"==typeof e.before?t=new Set([e.before]):Array.isArray(e.before)&&(t=new Set(e.before));let n=0;"number"==typeof e.stage&&(n=e.stage);let r=this.taps.length;for(;r>0;){r--;const e=this.taps[r];this.taps[r+1]=e;const i=e.stage||0;if(t){if(t.has(e.name)){t.delete(e.name);continue}if(t.size>0)continue}if(!(i>n)){r++;break}}this.taps[r]=e}}class St extends xt{call(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.taps.map((e=>e.fn)).forEach((e=>e(...t)))}}const _t=Symbol.for("EnvContribution"),wt=Z-1e-8;class At{constructor(e){this.init(e)}init(e){this.bounds=e}arc(e,t,n,r,i,a){if(Math.abs(i-r)>wt)return this.bounds.add(e-n,t-n),void this.bounds.add(e+n,t+n);let o,s,l,u,c=1/0,d=-1/0,h=1/0,f=-1/0;function p(e){l=n*Math.cos(e),u=n*Math.sin(e),l<c&&(c=l),l>d&&(d=l),u<h&&(h=u),u>f&&(f=u)}if(p(r),p(i),i!==r)if((r%=Z)<0&&(r+=Z),(i%=Z)<0&&(i+=Z),i<r&&(a=!a,o=r,r=i,i=o),a)for(i-=Z,o=r-r%K,s=0;s<4&&o>i;++s,o-=K)p(o);else for(o=r-r%K+K,s=0;s<4&&o<i;++s,o+=K)p(o);this.bounds.add(e+c,t+h),this.bounds.add(e+d,t+f)}arcTo(e,t,n,r,i){throw new Error("不支持arcTo")}bezierCurveTo(e,t,n,r,i,a){this.bounds.add(e,t),this.bounds.add(n,r),this.bounds.add(i,a)}closePath(){}ellipse(){throw new Error("不支持ellipse")}lineTo(e,t){this.bounds.add(e,t)}moveTo(e,t){this.bounds.add(e,t)}quadraticCurveTo(e,t,n,r){this.bounds.add(e,t),this.bounds.add(n,r)}rect(e,t,n,r){this.bounds.add(e,t),this.bounds.add(e+n,t+r)}clear(){this.bounds.clear()}release(){}}class kt{constructor(){this.curves=[],this.bounds=new fe}getCurveLengths(){return this.curves.map((e=>e.getLength()))}getPointAt(e){return{x:0,y:0}}getLength(){return 0}getBounds(){return this.bounds}}const Tt=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,Bt={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7},Ct=0,Et=1,Pt=2,Rt=3,Mt=4,Lt=5,Ot=6,It=7,Nt=8;let Ut,Dt,zt,jt,Ft,Wt;var Ht,$t,Vt,Gt,Yt,qt,Qt,Xt,Kt;function Zt(e,t,n,r,i,a,o,s,l){const u=o*(Math.PI/180),c=Math.sin(u),d=Math.cos(u),h=d*(s-e)*.5+c*(l-t)*.5,f=d*(l-t)*.5-c*(s-e)*.5;let p=h*h/((n=Math.abs(n))*n)+f*f/((r=Math.abs(r))*r);p>1&&(p=Math.sqrt(p),n*=p,r*=p);const g=d/n,m=c/n,y=-c/r,v=d/r,b=g*s+m*l,x=y*s+v*l,S=g*e+m*t,_=y*e+v*t;let w=1/((S-b)*(S-b)+(_-x)*(_-x))-.25;w<0&&(w=0);let A=Math.sqrt(w);a===i&&(A=-A);const k=.5*(b+S)-A*(_-x),T=.5*(x+_)+A*(S-b),B=Math.atan2(x-T,b-k);let C=Math.atan2(_-T,S-k)-B;C<0&&1===a?C+=Z:C>0&&0===a&&(C-=Z);const E=Math.ceil(Math.abs(C/(K+.001))),P=[];for(let e=0;e<E;++e){const t=B+e*C/E,i=B+(e+1)*C/E;P[e]=[k,T,t,i,n,r,c,d]}return P}function Jt(e){const t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=l*a,c=-s*o,d=s*a,h=l*o,f=Math.cos(r),p=Math.sin(r),g=Math.cos(i),m=Math.sin(i),y=.5*(i-r),v=Math.sin(.5*y),b=8/3*v*v/Math.sin(y),x=t+f-b*p,S=n+p+b*f,_=t+g,w=n+m,A=_+b*m,k=w-b*g;return[u*x+c*S,d*x+h*S,u*A+c*k,d*A+h*k,u*_+c*w,d*_+h*w]}function en(e,t,n,r){const i=Zt(r[5],r[6],r[0],r[1],r[3],r[4],r[2],t,n);for(let t=0;t<i.length;++t){const n=Jt(i[t]);e.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5])}}!function(e){e[e.NONE=0]="NONE",e[e.UPDATE_BOUNDS=1]="UPDATE_BOUNDS",e[e.UPDATE_SHAPE=2]="UPDATE_SHAPE",e[e.CLEAR_SHAPE=253]="CLEAR_SHAPE",e[e.UPDATE_SHAPE_AND_BOUNDS=3]="UPDATE_SHAPE_AND_BOUNDS",e[e.INIT=179]="INIT",e[e.CLEAR_BOUNDS=254]="CLEAR_BOUNDS",e[e.UPDATE_GLOBAL_MATRIX=32]="UPDATE_GLOBAL_MATRIX",e[e.CLEAR_GLOBAL_MATRIX=223]="CLEAR_GLOBAL_MATRIX",e[e.UPDATE_LOCAL_MATRIX=16]="UPDATE_LOCAL_MATRIX",e[e.CLEAR_LOCAL_MATRIX=239]="CLEAR_LOCAL_MATRIX",e[e.UPDATE_GLOBAL_LOCAL_MATRIX=48]="UPDATE_GLOBAL_LOCAL_MATRIX",e[e.UPDATE_LAYOUT=128]="UPDATE_LAYOUT",e[e.CLEAR_LAYOUT=127]="CLEAR_LAYOUT"}(Ht||(Ht={})),function(e){e[e.GLOBAL=1]="GLOBAL",e[e.LOCAL=16]="LOCAL",e[e.GLOBAL_ACCURATE=3]="GLOBAL_ACCURATE",e[e.LOCAL_ACCURATE=48]="LOCAL_ACCURATE"}($t||($t={})),function(e){e[e.INIT=0]="INIT",e[e.DEFAULT=1]="DEFAULT",e[e.STATE=2]="STATE",e[e.ANIMATE_BIND=10]="ANIMATE_BIND",e[e.ANIMATE_PLAY=11]="ANIMATE_PLAY",e[e.ANIMATE_START=12]="ANIMATE_START",e[e.ANIMATE_UPDATE=13]="ANIMATE_UPDATE",e[e.ANIMATE_END=14]="ANIMATE_END",e[e.TRANSLATE=20]="TRANSLATE",e[e.TRANSLATE_TO=21]="TRANSLATE_TO",e[e.SCALE=22]="SCALE",e[e.SCALE_TO=23]="SCALE_TO",e[e.ROTATE=24]="ROTATE",e[e.ROTATE_TO=25]="ROTATE_TO"}(Vt||(Vt={})),function(e){e[e.INITIAL=0]="INITIAL",e[e.RUNNING=1]="RUNNING",e[e.PAUSED=2]="PAUSED",e[e.END=3]="END"}(Gt||(Gt={})),function(e){e[e.NORMAL=0]="NORMAL",e[e.SET_ATTR_IMMEDIATELY=1]="SET_ATTR_IMMEDIATELY"}(Yt||(Yt={})),function(e){e.wait="wait",e.from="from",e.to="to",e.customAnimate="customAnimate"}(qt||(qt={})),function(e){e[e.ROW=1]="ROW",e[e.COLUMN=2]="COLUMN"}(Qt||(Qt={})),function(e){e[e.CubicBezierCurve=0]="CubicBezierCurve",e[e.QuadraticBezierCurve=1]="QuadraticBezierCurve",e[e.ArcCurve=2]="ArcCurve",e[e.LineCurve=3]="LineCurve",e[e.EllipseCurve=4]="EllipseCurve",e[e.MoveCurve=5]="MoveCurve"}(Xt||(Xt={})),function(e){e[e.beforeFillStroke=0]="beforeFillStroke",e[e.afterFillStroke=1]="afterFillStroke"}(Kt||(Kt={}));const tn=[(e,t,n,r,i,a,o)=>t.arc(e[1]*i+n,e[2]*a+r,e[3]*(i+a)/2,e[4],e[5],e[6],o),(e,t,n,r,i,a,o)=>t.arcTo(e[1]*i+n,e[2]*a+r,e[3]*i+n,e[4]*a+r,e[5]*(i+a)/2,o),(e,t,n,r,i,a,o)=>t.bezierCurveTo(e[1]*i+n,e[2]*a+r,e[3]*i+n,e[4]*a+r,e[5]*i+n,e[6]*a+r,o),(e,t,n,r)=>t.closePath(),(e,t,n,r,i,a)=>t.ellipse(e[1]*i+n,e[2]*a+r,e[3]*i,e[4]*a,e[5],e[6],e[7],e[8]),(e,t,n,r,i,a,o)=>t.lineTo(e[1]*i+n,e[2]*a+r,o),(e,t,n,r,i,a,o)=>t.moveTo(e[1]*i+n,e[2]*a+r,o),(e,t,n,r,i,a,o)=>t.quadraticCurveTo(e[1]*i+n,e[2]*a+r,e[3]*i+n,e[4]*a+r,o),(e,t,n,r,i,a,o)=>t.rect(e[1]*i+n,e[2]*a+r,e[3]*i,e[4]*a,o)];function nn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6?arguments[6]:void 0;for(let s=0;s<e.length;s++){const l=e[s];tn[l[0]](l,t,n,r,i,a,o)}}class rn{getLength(e){return null!=e?this.calcProjLength(e):(Number.isFinite(this.length)||(this.length=this.calcLength()),this.length)}}function an(e,t,n,r,i){return function(e,t){let n=0;const r=e.length;for(let i=0;i<r;i++){const a=e[i],o=t[i],s=e[(i+1)%r],l=t[(i+1)%r];n+=ce.distanceNN(a,o,s,l)}return n/2}([e.x,t.x,n.x,r.x],[e.y,t.y,n.y,r.y])}function on(e,t,n,r,i){const a=1-i;return a*a*a*e+3*t*i*a*a+3*n*i*i*a+r*i*i*i}class sn extends rn{constructor(e,t,n,r){super(),this.type=Xt.CubicBezierCurve,this.p0=e,this.p1=t,this.p2=n,this.p3=r}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y+this.p3.x+this.p3.y)}getPointAt(e){if(!1!==this.defined)return function(e,t,n,r,i){const a=on(e.x,t.x,n.x,r.x,i),o=on(e.y,t.y,n.y,r.y,i);return new ue(a,o)}(this.p0,this.p1,this.p2,this.p3,e);throw new Error("defined为false的点不能getPointAt")}calcLength(){return this._validPoint()?an(this.p0,this.p1,this.p2,this.p3):60}calcProjLength(e){return e===Qt.ROW?ee(this.p0.x-this.p3.x):e===Qt.COLUMN?ee(this.p0.y-this.p3.y):0}getAngleAt(e){const t=re(e-.01,0),n=ie(e+.01,1),r=this.getPointAt(t),i=this.getPointAt(n);return te(i.y-r.y,i.x-r.x)}}class ln extends rn{constructor(e,t){super(),this.type=Xt.LineCurve,this.p0=e,this.p1=t}getPointAt(e){if(!1!==this.defined)return ce.pointAtPP(this.p0,this.p1,e);throw new Error("defined为false的点不能getPointAt")}getAngleAt(e){return null==this.angle&&(this.angle=te(this.p1.y-this.p0.y,this.p1.x-this.p0.x)),this.angle}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y)}calcLength(){return this._validPoint()?ce.distancePP(this.p0,this.p1):60}calcProjLength(e){return e===Qt.ROW?ee(this.p0.x-this.p1.x):e===Qt.COLUMN?ee(this.p0.y-this.p1.y):0}}class un{get endX(){return this._lastX}get endY(){return this._lastY}constructor(e,t){this.init(e,t)}init(e,t){this._lastX=this._lastY=this._startX=this._startY=0,this.curveType=e,this.direction=t,this.curves=[]}bezierCurveTo(e,t,n,r,i,a,o,s){const l=new sn(new ue(this._lastX,this._lastY),new ue(e,t),new ue(n,r),new ue(i,a));l.originP1=this._lastOriginP,l.originP2=s,l.defined=o,this.curves.push(l),this._lastX=i,this._lastY=a,this._lastOriginP=s}closePath(){if(this.curves.length<2)return;const e=this.curves[this.curves.length-1];this.lineTo(this._startX,this._startY,e.defined,this._startOriginP)}ellipse(){throw new Error("SegContext不支持调用ellipse")}lineTo(e,t,n,r){const i=this.addLinearCurve(e,t,n,this._lastOriginP,r);this.curves.push(i),this._lastX=e,this._lastY=t,this._lastOriginP=r}moveTo(e,t,n){return this._lastX=this._startX=e,this._lastY=this._startY=t,this._lastOriginP=n,this._startOriginP=n,this}quadraticCurveTo(e,t,n,r){throw new Error("SegContext不支持调用quadraticCurveTo")}clear(){this.curves=[],this.length=NaN}tryUpdateLength(e){return this.getLength(e)}addLinearCurve(e,t,n,r,i){const a=new ln(new ue(this._lastX,this._lastY),new ue(e,t));return a.originP1=r,a.originP2=i,a.defined=n,a}getPointAt(e){throw new Error("暂未实现")}getCurveLengths(){return[]}getLength(e){var t,n;if(e===Qt.COLUMN){if(!this.curves.length)return 0;const e=this.curves[0],n=this.curves[this.curves.length-1],r=null!==(t=n.p3)&&void 0!==t?t:n.p1;return ee(e.p0.y-r.y)}if(e===Qt.ROW){if(!this.curves.length)return 0;const e=this.curves[0],t=this.curves[this.curves.length-1],r=null!==(n=t.p3)&&void 0!==n?n:t.p1;return ee(e.p0.x-r.x)}return Number.isFinite(this.length)||(this.length=this.curves.reduce(((e,t)=>e+t.getLength()),0)),this.length}}class cn extends un{bezierCurveTo(e,t,n,r,i,a,o,s){return super.bezierCurveTo(t,e,r,n,a,i,o,s)}lineTo(e,t,n,r){return super.lineTo(t,e,n,r)}moveTo(e,t,n){return super.moveTo(t,e,n)}clear(){return super.clear()}}function dn(e,t){let n=!1;for(let r=0,i=t.length;r<=i;r++)r>=i===n&&((n=!n)?e.lineStart():e.lineEnd()),n&&e.point(t[r])}function hn(e,t,n){const r=null!=t?t:ee(n[n.length-1].x-n[0].x)>ee(n[n.length-1].y-n[0].y)?Qt.ROW:Qt.COLUMN;return"monotoneY"===e?new cn(e,r):new un(e,r)}class fn{constructor(e,t){this.context=e,t&&(this.startPoint=t)}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(e){const t=e.x,n=e.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(t,n,!1!==this._lastDefined&&!1!==e.defined,e):this.context.moveTo(t,n,e);break;case 1:this._point=2;default:this.context.lineTo(t,n,!1!==this._lastDefined&&!1!==e.defined,e)}this._lastDefined=e.defined}tryUpdateLength(){return this.context.tryUpdateLength()}}function pn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:r}=t;if(e.length<2-Number(!!r))return null;const i=hn("linear",n,e);return function(e,t){dn(e,t)}(new fn(i,r),e),i}function gn(e,t,n,r,i){e.context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6,r,e.lastPoint1)}class mn{constructor(e,t){this.context=e,this.startPoint=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){2===this._point&&gn(this,6*this._x1-(this._x0+4*this._x1),6*this._y1-(this._y0+4*this._y1),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(e){const t=e.x,n=e.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(t,n,!1!==this._lastDefined1&&!1!==this._lastDefined2,e):this.context.moveTo(t,n,e);break;case 1:this._point=2;break;default:gn(this,t,n,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=e.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=e}tryUpdateLength(){return this.context.tryUpdateLength()}}function yn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:r}=t;if(e.length<2-Number(!!r))return null;if(e.length<3-Number(!!r))return pn(e,t);const i=hn("basis",n,e);return function(e,t){dn(e,t)}(new mn(i,r),e),i}function vn(e){return e<0?-1:1}function bn(e,t,n){const r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||Number(i<0&&-0)),o=(n-e._y1)/(i||Number(r<0&&-0)),s=(a*i+o*r)/(r+i);return(vn(a)+vn(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xn(e,t){const n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Sn(e,t,n,r,i){const a=e._x0,o=e._y0,s=e._x1,l=e._y1,u=(s-a)/3;e.context.bezierCurveTo(a+u,o+u*t,s-u,l-u*n,s,l,r,e.lastPoint1)}class _n{constructor(e,t){this.context=e,this.startPoint=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x1,this._y1,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:Sn(this,this._t0,xn(this,this._t0),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1)}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(e){let t=NaN;const n=e.x,r=e.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(n,r,!1!==this._lastDefined1&&!1!==this._lastDefined2,e):this.context.moveTo(n,r,e);break;case 1:this._point=2;break;case 2:this._point=3,Sn(this,xn(this,t=bn(this,n,r)),t,!1!==this._lastDefined1&&!1!==this._lastDefined2);break;default:Sn(this,this._t0,t=bn(this,n,r),!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=n,this._y0=this._y1,this._y1=r,this._t0=t,this._lastDefined1=this._lastDefined2,this._lastDefined2=!1!==e.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=e}tryUpdateLength(){return this.context.tryUpdateLength()}}class wn extends _n{constructor(e,t){super(e,t)}point(e){return super.point({y:e.x,x:e.y,defined:e.defined})}}function An(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:r}=t;if(e.length<2-Number(!!r))return null;if(e.length<3-Number(!!r))return pn(e,t);const i=hn("monotoneX",n,e);return function(e,t){dn(e,t)}(new _n(i,r),e),i}function kn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:r}=t;if(e.length<2-Number(!!r))return null;if(e.length<3-Number(!!r))return pn(e,t);const i=hn("monotoneY",n,e);return function(e,t){dn(e,t)}(new wn(i,r),e),i}let Tn=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2?arguments[2]:void 0;this.context=e,this._t=t,this.startPoint=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x=this._y=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){0<this._t&&this._t<1&&2===this._point&&this.context.lineTo(this._x,this._y,!1!==this._lastDefined,this.lastPoint),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)}point(e){const t=e.x,n=e.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(t,n,!1!==this._lastDefined&&!1!==e.defined,e):this.context.moveTo(t,n,e);break;case 1:this._point=2;default:if(this._t<=0)this.context.lineTo(this._x,n,!1!==this._lastDefined&&!1!==e.defined,this.lastPoint),this.context.lineTo(t,n,!1!==this._lastDefined&&!1!==e.defined,e);else{const r=this._x*(1-this._t)+t*this._t;this.context.lineTo(r,this._y,!1!==this._lastDefined&&!1!==e.defined,this.lastPoint),this.context.lineTo(r,n,!1!==this._lastDefined&&!1!==e.defined,e)}}this._lastDefined=e.defined,this._x=t,this._y=n,this.lastPoint=e}tryUpdateLength(){return this.context.tryUpdateLength()}};function Bn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:r,startPoint:i}=n;if(e.length<2-Number(!!i))return null;const a=new un("step",null!=r?r:ee(e[e.length-1].x-e[0].x)>ee(e[e.length-1].y-e[0].y)?Qt.ROW:Qt.COLUMN);return function(e,t){dn(e,t)}(new Tn(a,t,i),e),a}class Cn extends fn{lineEnd(){this.context.closePath()}}function En(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:r}=t;if(e.length<2-Number(!!r))return null;const i=hn("linear",n,e);return function(e,t){dn(e,t)}(new Cn(i,r),e),i}function Pn(e,t,n,r,i){let a=e._x1,o=e._y1,s=e._x2,l=e._y2;if(e._l01_a>Q){const t=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,n=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*t-e._x0*e._l12_2a+e._x2*e._l01_2a)/n,o=(o*t-e._y0*e._l12_2a+e._y2*e._l01_2a)/n}if(e._l23_a>Q){const r=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,i=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*r+e._x1*e._l23_2a-t*e._l12_2a)/i,l=(l*r+e._y1*e._l23_2a-n*e._l12_2a)/i}e.context.bezierCurveTo(a,o,s,l,e._x2,e._y2,r,e.lastPoint1)}function Rn(e,t){return function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:a,startPoint:o}=i;if(n.length<2-Number(!!o))return null;if(n.length<3-Number(!!o))return pn(n,i);const s=hn(e,a,n);return dn(new t(s,r,o),n),s}}const Mn=Rn("catmullRom",class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2?arguments[2]:void 0;this.context=e,this.startPoint=n,this._alpha=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x2,this._y2,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:this.point({x:this._x2,y:this._y2})}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(e){const{x:t,y:n}=e;if(this._point){const e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(t,n,!1!==this._lastDefined1&&!1!==this._lastDefined2):this.context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Pn(this,t,n,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=e.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=e}tryUpdateLength(){return this.context.tryUpdateLength()}});const Ln=Rn("catmullRomClosed",class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2?arguments[2]:void 0;this.context=e,this.startPoint=n,this._alpha=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 1:this.context.moveTo(this._x3,this._y3,this.lastPoint1),this.context.closePath();break;case 2:this.context.lineTo(this._x3,this._y3,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),this.context.closePath();break;case 3:this.point({x:this._x3,y:this._y3}),this.point({x:this._x4,y:this._y4}),this.point({x:this._x5,y:this._y5})}}point(e){const{x:t,y:n}=e;if(this._point){const e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this.context.moveTo(this._x4=t,this._y4=n,e);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Pn(this,t,n,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=e.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=e}tryUpdateLength(){return this.context.tryUpdateLength()}});class On extends kt{constructor(e){super(),this.commandList=[],e&&(this._ctx=e),this._boundsContext=new At(this.bounds)}setCtx(e){this._ctx=e}moveTo(e,t){return this.commandList.push([Ot,e,t]),this._ctx&&this._ctx.moveTo(e,t),this}lineTo(e,t){return this.commandList.push([Lt,e,t]),this._ctx&&this._ctx.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.commandList.push([It,e,t,n,r]),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.commandList.push([Pt,e,t,n,r,i,a]),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this}arcTo(e,t,n,r,i){return this.commandList.push([Et,e,t,n,r,i]),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this}ellipse(e,t,n,r,i,a,o,s){return this.commandList.push([Mt,e,t,n,r,i,a,o,s]),this._ctx&&this._ctx.ellipse(e,t,n,r,i,a,o,s),this}rect(e,t,n,r){return this.commandList.push([Nt,e,t,n,r]),this._ctx&&this._ctx.rect(e,t,n,r),this}arc(e,t,n,r,i,a){return this.commandList.push([Ct,e,t,n,r,i,a]),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this}closePath(){return this.commandList.push([Rt]),this._ctx&&this._ctx.closePath(),this}addCurve(e){this.curves.push(e)}clear(){this.transformCbList=null,this.commandList.length=0,this.curves.length=0}beginPath(){this.clear()}toString(){if(!this.toStringCbList){const e=[];e[Ot]=e=>`M${e[1]} ${e[2]}`,e[Lt]=e=>`L${e[1]} ${e[2]}`,e[It]=e=>`Q${e[1]} ${e[2]} ${e[3]} ${e[4]}`,e[Pt]=e=>`C${e[1]} ${e[2]} ${e[3]} ${e[4]} ${e[5]} ${e[6]}`,e[Ct]=e=>{const t=[];((e,t,n,r,i,a,o)=>{const s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=n<t?-1:1,c=Math.cos(t),d=Math.sin(t),h=Math.cos(n),f=Math.sin(n),p=c*a+r,g=d*o+i,m=h*a+r,y=f*o+i,v=a*l*u,b=o*l*u;e.push(p-v*d,g+b*c,m+v*f,y-b*h,m,y)})(t,e[4],e[5],e[1],e[2],e[3],e[3]);let n="";for(let e=0;e<t.length;e+=6)n+=`C${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${t[e+5]}`;return n},e[Nt]=e=>`M${e[1]} ${e[2]} h${e[3]} v${e[4]} H${e[1]}Z`,e[Rt]=e=>"Z",this.toStringCbList=e}const e=this.toStringCbList;let t="";return this.commandList.forEach((n=>{t+=e[n[0]](n)})),t}fromString(e,t,n,r,i){this.clear();const a=function(e){if(!e)return[];const t=e.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);if(null===t)return[];let n,r;const i=[];for(let e=0,a=t.length;e<a;e++)if(Ut=t[e],Dt=Ut.slice(1),zt=Ut[0],n=[zt],r=Dt.match(Tt),null!==r){for(let e=0,t=r.length;e<t;e++)jt=r[e],Ft=parseFloat(jt),Number.isNaN(Ft)||n.push(Ft);if(Wt=Bt[zt],n.length-1>Wt){let e;for(let t=1,r=n.length;t<r;t+=Wt){e=[zt];for(let r=t,i=t+Wt;r<i;r++)e.push(n[r]);i.push(e)}}else i.push(n)}else i.push(n);return i}(e);return this._runCommandStrList(a,t,n,r,i),this._updateBounds(),this}fromLine(e){const{points:t,curveType:n,clipRangeByDimension:r}=e.attribute;if(!t)return;const i=function(e,t,n){var r,i;switch(t){case"linear":default:return pn(e,n);case"basis":return yn(e,n);case"monotoneX":return An(e,n);case"monotoneY":return kn(e,n);case"step":return Bn(e,.5,n);case"stepBefore":return Bn(e,0,n);case"stepAfter":return Bn(e,1,n);case"catmullRom":return Mn(e,null!==(r=null==n?void 0:n.curveTension)&&void 0!==r?r:.5,n);case"catmullRomClosed":return Ln(e,null!==(i=null==n?void 0:n.curveTension)&&void 0!==i?i:.5,n);case"linearClosed":return En(e,n)}}(t,n);"x"===r?this.direction=Qt.ROW:"y"===r?this.direction=Qt.COLUMN:"auto"===r&&(this.direction=i.direction),this.curves=i.curves}fromCustomPath2D(e,t,n,r,i){return this.clear(),this._runCommandList(e.commandList,t,n,r,i),this._updateBounds(),this}transform(e,t,n,r){const i=this.commandList;if(!this.transformCbList){const e=[];e[Ot]=this.moveToTransform,e[Lt]=this.lineToTransform,e[It]=this.quadraticCurveToTransform,e[Pt]=this.bezierCurveToTransform,e[Et]=this.arcToTransform,e[Mt]=this.ellipseTransform,e[Nt]=this.rectTransform,e[Ct]=this.arcTransform,e[Rt]=this.closePathTransform,this.transformCbList=e}i.forEach((i=>{this.transformCbList[i[0]](i,e,t,n,r)})),this._updateBounds()}moveToTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n}lineToTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n}quadraticCurveToTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n,e[3]=e[3]*r+t,e[4]=e[4]*i+n}bezierCurveToTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n,e[3]=e[3]*r+t,e[4]=e[4]*i+n,e[5]=e[5]*r+t,e[6]=e[6]*i+n}arcToTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n,e[3]=e[3]*r+t,e[4]=e[4]*i+n,e[5]=e[5]*(r+i)/2}ellipseTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n,e[3]=e[3]*r,e[4]=e[4]*i}rectTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n,e[3]=e[3]*r,e[4]=e[4]*i}arcTransform(e,t,n,r,i){e[1]=e[1]*r+t,e[2]=e[2]*i+n,e[3]=e[3]*(r+i)/2}closePathTransform(){}_runCommandStrList(e){let t,n,r,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,c=null,d=0,h=0,f=0,p=0;for(let g=0,m=e.length;g<m;++g){switch(t=e[g],1===l&&1===u||(t=Nn(t,l,u)),t[0]){case"l":d+=t[1],h+=t[2],this.lineTo(d+o,h+s);break;case"L":d=t[1],h=t[2],this.lineTo(d+o,h+s);break;case"h":d+=t[1],this.lineTo(d+o,h+s);break;case"H":d=t[1],this.lineTo(d+o,h+s);break;case"v":h+=t[1],this.lineTo(d+o,h+s);break;case"V":h=t[1],this.lineTo(d+o,h+s);break;case"m":d+=t[1],h+=t[2],this.moveTo(d+o,h+s);break;case"M":d=t[1],h=t[2],this.moveTo(d+o,h+s);break;case"c":n=d+t[5],r=h+t[6],f=d+t[3],p=h+t[4],this.bezierCurveTo(d+t[1]+o,h+t[2]+s,f+o,p+s,n+o,r+s),d=n,h=r;break;case"C":d=t[5],h=t[6],f=t[3],p=t[4],this.bezierCurveTo(t[1]+o,t[2]+s,f+o,p+s,d+o,h+s);break;case"s":n=d+t[3],r=h+t[4],f=2*d-f,p=2*h-p,this.bezierCurveTo(f+o,p+s,d+t[1]+o,h+t[2]+s,n+o,r+s),f=d+t[1],p=h+t[2],d=n,h=r;break;case"S":n=t[3],r=t[4],f=2*d-f,p=2*h-p,this.bezierCurveTo(f+o,p+s,t[1]+o,t[2]+s,n+o,r+s),d=n,h=r,f=t[1],p=t[2];break;case"q":n=d+t[3],r=h+t[4],f=d+t[1],p=h+t[2],this.quadraticCurveTo(f+o,p+s,n+o,r+s),d=n,h=r;break;case"Q":n=t[3],r=t[4],this.quadraticCurveTo(t[1]+o,t[2]+s,n+o,r+s),d=n,h=r,f=t[1],p=t[2];break;case"t":n=d+t[1],r=h+t[2],null===c[0].match(/[QqTt]/)?(f=d,p=h):"t"===c[0]?(f=2*d-i,p=2*h-a):"q"===c[0]&&(f=2*d-f,p=2*h-p),i=f,a=p,this.quadraticCurveTo(f+o,p+s,n+o,r+s),d=n,h=r,f=d+t[1],p=h+t[2];break;case"T":n=t[1],r=t[2],f=2*d-f,p=2*h-p,this.quadraticCurveTo(f+o,p+s,n+o,r+s),d=n,h=r;break;case"a":en(this,d+o,h+s,[t[1],t[2],t[3],t[4],t[5],t[6]+d+o,t[7]+h+s]),d+=t[6],h+=t[7];break;case"A":en(this,d+o,h+s,[t[1],t[2],t[3],t[4],t[5],t[6]+o,t[7]+s]),d=t[6],h=t[7];break;case"z":case"Z":this.closePath()}c=t}}_runCommandList(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if(0!==t||0!==n||1!==r||1!==i)for(let a=0,o=e.length;a<o;++a){const o=e[a].slice();switch(o[0]){case Lt:this.lineToTransform(o,t,n,r,i);break;case Ot:this.moveToTransform(o,t,n,r,i);break;case Pt:this.bezierCurveToTransform(o,t,n,r,i);break;case It:this.quadraticCurveToTransform(o,t,n,r,i);break;case Ct:this.arcToTransform(o,t,n,r,i);break;case Mt:this.ellipseTransform(o,t,n,r,i);break;case Nt:this.rectTransform(o,t,n,r,i);break;case Et:this.arcToTransform(o,t,n,r,i);break;case Rt:this.closePath()}}else this.commandList=e.map((e=>e.slice()))}_updateBounds(){this.bounds.clear(),nn(this.commandList,this._boundsContext)}release(){this.commandList=[],this._boundsContext=null,this._ctx=null}getLength(){if(this.direction===Qt.COLUMN){if(!this.curves.length)return 0;const e=this.curves[0],t=this.curves[this.curves.length-1];return ee(e.p0.y-t.p1.y)}if(this.direction===Qt.ROW){if(!this.curves.length)return 0;const e=this.curves[0],t=this.curves[this.curves.length-1];return ee(e.p0.x-t.p1.x)}return this.curves.reduce(((e,t)=>e+t.getLength()),0)}getAttrAt(e){if(!this.curves)return{pos:{x:0,y:0},angle:0};let t,n=0;for(let r=0;r<this.curves.length;r++){t=this.curves[r];const i=t.getLength(this.direction);if(n+i>=e)break;n+=i}const r=(e-n)/t.getLength(this.direction);return{pos:t.getPointAt(r),angle:t.getAngleAt(r)}}}const In=["l",0,0,0,0,0,0,0];function Nn(e,t,n){const r=In[0]=e[0];if("a"===r||"A"===r)In[1]=t*e[1],In[2]=n*e[2],In[3]=e[3],In[4]=e[4],In[5]=e[5],In[6]=t*e[6],In[7]=n*e[7];else if("h"===r||"H"===r)In[1]=t*e[1];else if("v"===r||"V"===r)In[1]=n*e[1];else for(let r=1,i=e.length;r<i;++r)In[r]=(r%2==1?t:n)*e[r];return In}const Un={x:0,y:0,z:0,dx:0,dy:0,dz:0,scrollX:0,scrollY:0,scaleX:1,scaleY:1,scaleZ:1,angle:0,alpha:0,beta:0,scaleCenter:[0,0],anchor:[0,0],anchor3d:[0,0],postMatrix:new ge},Dn={strokeOpacity:1,lineDash:[],lineDashOffset:0,lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,strokeBoundsBuffer:2,stroke:!1},zn=Object.assign({outerBorder:Object.assign(Object.assign({},Dn),{distance:0}),innerBorder:Object.assign(Object.assign({},Dn),{distance:0})},Dn),jn={text:"",maxLineWidth:1/0,textAlign:"left",textBaseline:"alphabetic",fontSize:16,fontFamily:"PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",fontWeight:"",ellipsis:"…",fontVariant:"",fontStyle:"",lineHeight:void 0,underline:0,lineThrough:0,scaleIn3d:!1,direction:"horizontal",wordBreak:"break-all",ignoreBuf:!1,verticalMode:0,wrap:!1,whiteSpace:"no-wrap",heightLimit:1/0,lineClamp:1/0,suffixPosition:"end",underlineDash:[],underlineOffset:0,disableAutoClipedPoptip:void 0},Fn=Object.assign(Object.assign(Object.assign(Object.assign({forceBoundsWidth:void 0,forceBoundsHeight:void 0,opacity:1,background:null,backgroundOpacity:1,backgroundCornerRadius:0,texture:null,textureColor:"black",textureSize:10,texturePadding:2,backgroundMode:"no-repeat",backgroundFit:!0,blur:0,cursor:null,html:null,react:null},{fillOpacity:1,fill:!1,shadowBlur:0,shadowColor:"black",shadowOffsetX:0,shadowOffsetY:0}),zn),{alignSelf:"auto"}),{pickStrokeBuffer:0}),Wn={connectedType:"none",connectedStyle:{},connectedX:NaN,connectedY:NaN},Hn=Object.assign(Object.assign(Object.assign({strokeSeg:null,renderable:!0,pickable:!0,shadowGraphic:void 0,childrenPickable:!0,fillPickable:!0,strokePickable:!0,visible:!0,zIndex:0,layout:null,boundsPadding:0,renderStyle:"default",pickMode:"accurate",customPickShape:null,boundsMode:"accurate",keepDirIn3d:!0,shadowRootIdx:1,globalZIndex:1,globalCompositeOperation:"",overflow:"hidden",shadowPickMode:"graphic"},{_debug_bounds:!1}),Fn),Un),$n=Object.assign(Object.assign({},Hn),{startAngle:0,endAngle:J,innerRadius:0,outerRadius:1,innerPadding:0,outerPadding:0,cornerRadius:0,padRadius:0,padAngle:0,cap:!1,forceShowCap:!1}),Vn=Object.assign(Object.assign(Object.assign({},Hn),Wn),{points:[],segments:[],curveType:"linear",clipRange:1,closePath:!1,curveTension:1}),Gn=Object.assign(Object.assign({},Hn),{radius:1,startAngle:0,endAngle:J}),Yn=Object.assign(Object.assign({},Hn),{width:0,height:0,cornerRadius:0,path:[],clip:!1,visibleAll:!0,display:"relative",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",alignContent:"flex-start",baseOpacity:1}),qn=Object.assign(Object.assign({},Hn),{path:"",width:0,height:0,cornerRadius:0,clip:!1}),Qn=Object.assign(Object.assign(Object.assign({},Hn),Wn),{points:[],segments:[],curveType:"linear",clipRange:1,clipRangeByDimension:"default",closePath:!1,curveTension:1}),Xn=Object.assign(Object.assign({},Hn),{path:new On,customPath:()=>{Y.getInstance().warn("空函数")}}),Kn=Object.assign(Object.assign({},Hn),{points:[],cornerRadius:0,closePath:!0}),Zn=Object.assign(Object.assign({},Hn),{width:0,height:0,x1:0,y1:0,strokeBoundsBuffer:0,cornerRadius:0});Object.assign(Object.assign({},Hn),{width:0,height:0,x1:0,y1:0,cornerRadius:0,length:0});const Jn=Object.assign(Object.assign({},Hn),{symbolType:"circle",size:10,keepDirIn3d:!0}),er=Object.assign(Object.assign(Object.assign({},Hn),jn),{strokeBoundsBuffer:0,keepDirIn3d:!0}),tr=Object.assign(Object.assign(Object.assign({},Hn),jn),{editable:!1,width:300,height:300,ellipsis:!0,wordBreak:"break-word",verticalDirection:"top",textAlign:"left",textBaseline:"top",layoutDirection:"horizontal",textConfig:[],disableAutoWrapLine:!1,maxHeight:void 0,maxWidth:void 0,singleLine:!1}),nr=Object.assign(Object.assign({repeatX:"no-repeat",repeatY:"no-repeat",image:"",width:0,height:0},Hn),{fill:!0,cornerRadius:0}),rr=Object.assign(Object.assign({},nr),{backgroundShowMode:"never",backgroundWidth:0,backgroundHeight:0,textAlign:"left",textBaseline:"middle",direction:"horizontal",margin:0,id:"",width:20,height:20,backgroundFill:"rgba(101, 117, 168, 0.1)",backgroundFillOpacity:1,backgroundStroke:!1,backgroundStrokeOpacity:1,backgroundRadius:4,opacity:1});const ir=new class{},ar={horizontal:{width:"width",height:"height",left:"left",top:"top",x:"x",y:"y",bottom:"bottom"},vertical:{width:"height",height:"width",left:"top",top:"left",x:"y",y:"x",bottom:"right"}},or=!0,sr=!1,lr=/\w|\(|\)|-/,ur=/[.?!,;:/,。?!、;:]/,cr=/\S/;function dr(e,t,n,r,i){if(!t||t<=0)return 0;const a=ir.graphicUtil.textMeasure;let o=r,s=e.slice(0,o),l=Math.floor(a.measureText(s,n).width),u=e.slice(0,o+1),c=Math.floor(a.measureText(u,n).width);for(;l>t||c<=t;){if(l>t?o--:o++,o>e.length){o=e.length;break}if(o<0){o=0;break}s=e.slice(0,o),l=Math.floor(a.measureText(s,n).width),u=e.slice(0,o+1),c=Math.floor(a.measureText(u,n).width)}return i&&(o=function(e,t){let n=t;for(;lr.test(e[n-1])&&lr.test(e[n])||ur.test(e[n]);)if(n--,n<=0)return t;return n}(e,o)),o}function hr(e,t){const n=ir.graphicUtil.textMeasure.measureText(e,t),r={ascent:0,height:0,descent:0,width:0};return"number"!=typeof n.actualBoundingBoxAscent||"number"!=typeof n.actualBoundingBoxDescent?(r.width=Math.floor(n.width),r.height=t.fontSize||0,r.ascent=r.height,r.descent=0):(r.width=Math.floor(n.width),r.height=Math.floor(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent),r.ascent=Math.floor(n.actualBoundingBoxAscent),r.descent=r.height-r.ascent),r}const fr=new class{constructor(e){const t=e||{};t.defaultScope=t.defaultScope||it,this.options=t,this.id=He.GenAutoIncrementId(),this._bindingDictionary=new Map,this._metadataReader=new ht}load(e){const t=this._getContainerModuleHelpersFactory()(e.id);e.registry(t.bindFunction,t.unbindFunction,t.isboundFunction,t.rebindFunction)}get(e){const t=this._getNotAllArgs(e,!1);return this._get(t)}getAll(e){const t=this._getAllArgs(e);return this._get(t)}getTagged(e,t,n){const r=this._getNotAllArgs(e,!1,t,n);return this._get(r)}getNamed(e,t){return this.getTagged(e,Ve,t)}isBound(e){return this._bindingDictionary.has(e)}bind(e){const t=this.options.defaultScope,n=new dt(e,t),r=this._bindingDictionary.get(e)||[];return r.push(n),this._bindingDictionary.set(e,r),new mt(n)}unbind(e){this._bindingDictionary.delete(e)}rebind(e){return this.unbind(e),this.bind(e)}_getContainerModuleHelpersFactory(){const e=(e,t)=>{e._binding.moduleId=t},t=t=>n=>{const r=this.bind(n);return e(r,t),r},n=()=>e=>this.unbind(e),r=()=>e=>this.isBound(e),i=t=>n=>{const r=this.rebind(n);return e(r,t),r};return e=>({bindFunction:t(e),isboundFunction:r(),rebindFunction:i(e),unbindFunction:n(),unbindAsyncFunction:e=>null})}_getNotAllArgs(e,t,n,r){return{avoidConstraints:!1,isMultiInject:t,serviceIdentifier:e,key:n,value:r}}_getAllArgs(e){return{avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:e}}_get(e){const t=[];return this._bindingDictionary.get(e.serviceIdentifier).filter((t=>t.constraint(e))).forEach((e=>{t.push(this._resolveFromBinding(e))})),e.isMultiInject||1!==t.length?t:t[0]}_getChildRequest(e){const t=e.implementationType,{userGeneratedMetadata:n}=this._metadataReader.getConstructorMetadata(t),r=Object.keys(n),i=[];for(let e=0;e<r.length;e++){const t=n[e],r={};t.forEach((e=>{r[e.key]=e.value}));const a={inject:r[Ge],multiInject:r.multi_inject},o=a.inject||a.multiInject,s={serviceIdentifier:o,constructorArgsMetadata:t},l={injectIdentifier:o,metadata:t,bindings:this._bindingDictionary.get(o).filter((e=>e.constraint(s)))};i.push(l)}return i}_resolveFromBinding(e){const t=this._getResolvedFromBinding(e);return this._saveToScope(e,t),t}_getResolvedFromBinding(e){let t;switch(e.type){case at:case lt:t=e.cache;break;case ut:t=this._resolveInstance(e,e.implementationType);break;default:t=e.dynamicValue({container:this})}return t}_resolveInstance(e,t){if(e.activated)return e.cache;const n=this._getChildRequest(e);return this._createInstance(t,n)}_createInstance(e,t){return t.length?new e(...this._resolveRequests(t)):new e}_resolveRequests(e){return e.map((e=>e.bindings.length>1?e.bindings.map((e=>this._resolveFromBinding(e))):this._resolveFromBinding(e.bindings[0])))}_saveToScope(e,t){e.scope===rt&&(e.cache=t,e.activated=!0)}},pr=Symbol.for("CanvasFactory");function gr(e){return fr.getNamed(pr,ir.global.env)(e)}const mr=new class{constructor(){this.pools=[],this.allocatedCanvas=[]}shareCanvas(){return this.allocatedCanvas.length?this.allocatedCanvas[0]:this.getCommonCanvas()}getCommonCanvas(){return this._commonCanvas||(this._commonCanvas=this.allocate({width:100,height:100,dpr:2})),this._commonCanvas}allocate(e){if(!this.pools.length){const t=gr(Object.assign({nativeCanvas:ir.global.createCanvas(e)},e));return this.allocatedCanvas.push(t),t}const t=this.pools.pop();return t.resize(e.width,e.height),t.dpr=e.dpr,t}allocateByObj(e){if(!this.pools.length){const t={width:e.width/e.dpr,height:e.height/e.dpr,dpr:e.dpr},n=gr(Object.assign({nativeCanvas:ir.global.createCanvas(t)},t));return this.allocatedCanvas.push(n),n}const t=this.pools.pop();return t.width=e.width,t.height=e.height,t}free(e){this.pools.push(e)}get length(){return this.pools.length}release(){this.pools=[]}},yr={arc:$n,area:Vn,circle:Gn,line:Qn,path:Xn,symbol:Jn,text:er,rect:Zn,polygon:Kn,richtext:tr,richtextIcon:rr,image:nr,group:Yn,glyph:qn},vr=Object.keys(yr);function br(e,t){Object.keys(t).forEach((n=>{e[n]=t[n]}))}const xr={arc:Object.assign({},yr.arc),area:Object.assign({},yr.area),circle:Object.assign({},yr.circle),line:Object.assign({},yr.line),path:Object.assign({},yr.path),symbol:Object.assign({},yr.symbol),text:Object.assign({},yr.text),rect:Object.assign({},yr.rect),polygon:Object.assign({},yr.polygon),richtext:Object.assign({},yr.richtext),richtextIcon:Object.assign({},yr.richtextIcon),image:Object.assign({},yr.image),group:Object.assign({},yr.group),glyph:Object.assign({},yr.glyph)};class Sr{constructor(){this.initTheme(),this.dirty=!1}initTheme(){this._defaultTheme={},vr.forEach((e=>{this._defaultTheme[e]=Object.create(xr[e])})),this.combinedTheme=this._defaultTheme}getTheme(e){if(!e)return this.combinedTheme;if(!this.dirty)return this.combinedTheme;let t={};const n=this.getParentWithTheme(e);return n&&(t=n.theme),this.applyTheme(e,t),this.combinedTheme}getParentWithTheme(e){for(;e.parent;)if((e=e.parent).theme)return e;return null}applyTheme(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.dirty){const r=this.getParentWithTheme(e);if(r){const e=r.theme;(e.dirty||n)&&e.applyTheme(r,t,!0)}this.userTheme?this.doCombine(r&&r.theme.combinedTheme):(r?this.combinedTheme=r.theme.combinedTheme:(this.combinedTheme=this._defaultTheme,Y.getInstance().warn("未知错误,走到不应该走的区域里")),this.dirty=!1)}return this.combinedTheme}doCombine(e){const t=this.userTheme,n=this.combinedTheme;vr.forEach((r=>{const i=Object.create(xr[r]);e&&e[r]&&br(i,e[r]),n[r]&&br(i,n[r]),t[r]&&br(i,t[r]),this.combinedTheme[r]=i})),t.common&&vr.forEach((e=>{br(this.combinedTheme[e],t.common)})),this.dirty=!1}setTheme(e,t){let n=this.userTheme;n?Object.keys(e).forEach((t=>{n[t]?Object.assign(n[t],e[t]):n[t]=Object.assign({},e[t])})):n=e,this.userTheme=n,this.dirty=!0,this.dirtyChildren(t)}resetTheme(e,t){this.userTheme=e,this.dirty=!0,this.dirtyChildren(t)}dirtyChildren(e){e.forEachChildren((e=>{e.isContainer&&(e.theme&&(e.theme.dirty=!0),this.dirtyChildren(e))}))}}const _r=new Sr;function wr(e,t){return e.glyphHost?wr(e.glyphHost):t?(e.isContainer,t):function(e){let t;if(t=e.isContainer?e:e.parent,t){for(;t&&!t.theme;)t=t.parent;return t?(t.theme||t.createTheme(),t.theme.getTheme(t)):_r.getTheme()}return null}(e)||e.attachedThemeGraphic&&wr(e.attachedThemeGraphic)||_r.getTheme()}var Ar=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};class kr extends h{get previousSibling(){return this._prev}get nextSibling(){return this._next}get children(){return this.getChildren()}get firstChild(){return this._firstChild}get lastChild(){return this._lastChild}get count(){return this._count}get childrenCount(){return this._idMap?this._idMap.size:0}constructor(){super(),this._uid=He.GenAutoIncrementId(),this._firstChild=null,this._lastChild=null,this.parent=null,this._count=1}forEachChildren(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){let t=this._lastChild,n=0;for(;t;){if(e(t,n++))return;t=t._prev}}else{let t=this._firstChild,n=0;for(;t;){if(e(t,n++))return;t=t._next}}}forEachChildrenAsync(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Ar(this,void 0,void 0,(function*(){if(t){let t=this._lastChild,n=0;for(;t;){let r=e(t,n++);if(r.then&&(r=yield r),r)return;t=t._prev}}else{let t=this._firstChild,n=0;for(;t;){let r=e(t,n++);if(r.then&&(r=yield r),r)return;t=t._next}}}))}forEach(e){return this.forEachChildren(e)}appendChild(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._uid===e._uid)return null;if(!t&&e.isAncestorsOf(this))throw new Error("【Node::appendChild】不能将父辈元素append为子元素");return e.parent&&e.parent.removeChild(e),e.parent=this,this._lastChild?(this._lastChild._next=e,e._prev=this._lastChild,this._lastChild=e):(this._firstChild=this._lastChild=e,e._prev=e._next=null),this._idMap||(this._idMap=new Map),this._idMap.set(e._uid,e),this.setCount(e.count),this._structEdit=!0,e}appendChildArrHighPerformance(e){return e}insertBefore(e,t){if(!t)return this.appendChild(e);if(this._uid===e._uid)return null;if(e.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");return t.parent!==this?null:(e.parent&&e.parent.removeChild(e),e.parent=this,e._prev=t._prev,t._prev?t._prev._next=e:this._firstChild=e,t._prev=e,e._next=t,this._idMap||(this._idMap=new Map),this._idMap.set(e._uid,e),this._structEdit=!0,this.setCount(e.count),e)}insertAfter(e,t){if(!t)return this.appendChild(e);if(this._uid===e._uid)return null;if(e.isAncestorsOf(this))throw new Error("【Node::insertAfter】不能将父辈元素insert为子元素");return t.parent!==this?null:(e.parent&&e.parent.removeChild(e),e.parent=this,t._next?(t._next._prev=e,e._next=t._next):this._lastChild=e,t._next=e,e._prev=t,this._idMap||(this._idMap=new Map),this._idMap.set(e._uid,e),this._structEdit=!0,this.setCount(e.count),e)}insertInto(e,t){if(!this._ignoreWarn&&this._nodeList&&Y.getInstance().warn("insertIntoKeepIdx和insertInto混用可能会存在错误"),t>=this.childrenCount)return this.appendChild(e);if(this._uid===e._uid)return null;if(e.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");if(e.parent&&e.parent.removeChild(e),e.parent=this,0===t)e._next=this._firstChild,this._firstChild&&(this._firstChild._prev=e),e._prev=null,this._firstChild=e;else{let n=this._firstChild;for(let e=0;e<t;e++){if(!n)return null;e>0&&(n=n._next)}if(!n)return null;e._next=n._next,e._prev=n,n._next=e,e._next&&(e._next._prev=e)}return this._idMap||(this._idMap=new Map),this._idMap.set(e._uid,e),this._structEdit=!0,this.setCount(e.count),e}insertIntoKeepIdx(e,t){if(this._nodeList||(this._nodeList=this.children),this._nodeList[t]){const n=this._nodeList[t];return this._nodeList.splice(t,0,e),this.insertBefore(e,n)}let n;this._nodeList[t]=e;for(let e=t-1;e>=0&&(n=this._nodeList[e],!n);e--);if(n)return n._next?this.insertBefore(e,n._next):this.appendChild(e);this._ignoreWarn=!0;const r=this.insertInto(e,0);return this._ignoreWarn=!1,r}removeChild(e){if(!this._idMap)return null;if(!this._idMap.has(e._uid))return null;if(this._idMap.delete(e._uid),this._nodeList){const t=this._nodeList.findIndex((t=>t===e));t>=0&&this._nodeList.splice(t,1)}return e._prev?e._prev._next=e._next:this._firstChild=e._next,e._next?e._next._prev=e._prev:this._lastChild=e._prev,e.parent=null,e._prev=null,e._next=null,this._structEdit=!0,this.setCount(-e.count),e}delete(){this.parent&&this.parent.removeChild(this)}removeAllChild(e){if(!this._idMap)return;this._nodeList&&(this._nodeList.length=0);let t=this._firstChild;for(;t;){const e=t._next;t.parent=null,t._prev=null,t._next=null,t=t._next,t=e}this._firstChild=null,this._lastChild=null,this._idMap.clear(),this._structEdit=!0,this.setCount(1-this._count)}replaceChild(e,t){throw new Error("暂不支持")}find(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return this.forEachChildren(((t,r)=>!(t===this||!e(t,r)||(n=t,0)))),t&&this.forEachChildren((t=>{if(t.isContainer){const r=t.find(e,!0);if(r)return n=r,!0}return!1})),n}findAll(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];return this.forEachChildren(((t,r)=>{t!==this&&e(t,r)&&n.push(t)})),t&&this.forEachChildren((t=>{if(t.isContainer){const r=t.findAll(e,!0);r.length&&(n=n.concat(r))}})),n}getElementById(e){return this.find((t=>t.id===e),!0)}findChildById(e){return this.getElementById(e)}findChildByUid(e){return this._idMap&&this._idMap.get(e)||null}getElementsByName(e){return this.findAll((t=>t.name===e),!0)}findChildrenByName(e){return this.getElementsByName(e)}getElementsByType(e){return this.findAll((t=>t.type===e),!0)}getChildByName(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.find((t=>t.name===e),t)}getChildAt(e){let t=this._firstChild;if(!t)return null;for(let n=0;n<e;n++){if(!t._next)return null;t=t._next}return t}at(e){return this.getChildAt(e)}containNode(e){if(!this._idMap)return!1;if(this._idMap.has(e._uid))return!0;let t=this._firstChild;for(;t;){if(t.containNode(e))return!0;t=t._next}return!1}getRootNode(){let e=this.parent;for(;null==e?void 0:e.parent;)e=e.parent;return e||this}hasChildNodes(){return null!==this._firstChild}addChild(e){return this.appendChild(e)}add(e){return this.appendChild(e)}getChildren(){const e=[];let t=this._firstChild;for(;t;)e.push(t),t=t._next;return e}isChildOf(e){return!!this.parent&&this.parent._uid===e._uid}isParentOf(e){return e.isChildOf(this)}isDescendantsOf(e){let t=this.parent;if(!t)return!1;do{if(t._uid===e._uid)return!0;t=t.parent}while(null!==t);return!1}isAncestorsOf(e){return e.isDescendantsOf(this)}getAncestor(e){throw new Error("暂不支持")}setAllDescendantsProps(e,t){let n=this._firstChild;for(;n;)n[e]=t,n.setAllDescendantsProps(e,t),n=n._next}setCount(e){this._count+=e;let t=this.parent;if(t)do{t._count+=e,t=t.parent}while(null!==t)}clone(){throw new Error("暂不支持")}cloneTo(e){throw new Error("暂不支持")}getParent(){return this.parent}del(e){return this.removeChild(e)}addEventListener(e,t,n){const r=p(n,!0)&&n||v(n)&&n.capture,i=v(n)&&n.once,a=g(t)?void 0:t;return e=r?`${e}capture`:e,t=g(t)?t:t.handleEvent,i?super.once(e,t,a):super.on(e,t,a),this}on(e,t,n){return this.addEventListener(e,t,n)}removeEventListener(e,t,n){const r=p(n,!0)&&n||v(n)&&n.capture,i=g(t)?void 0:t;e=r?`${e}capture`:e,t=g(t)?t:t.handleEvent;const a=v(n)&&n.once;return super.off(e,t,i,a),this}off(e,t,n){return this.removeEventListener(e,t,n)}once(e,t,n){return v(n)?(n.once=!0,this.addEventListener(e,t,n)):this.addEventListener(e,t,{once:!0})}removeAllEventListeners(){return super.removeAllListeners(),this}removeAllListeners(){return this.removeAllEventListeners()}dispatchEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return super.emit(e.type,e,...n),!e.defaultPrevented}emit(e,t){return this.dispatchEvent(e,t)}release(){this.removeAllListeners()}}class Tr{get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get x(){return this.canvas.x}get y(){return this.canvas.y}get canvasX(){return this.canvas.x}get canvasY(){return this.canvas.y}get viewX(){return this.viewport.x}get viewY(){return this.viewport.y}constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Tr.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer={x:0,y:0},this.page={x:0,y:0},this.canvas={x:0,y:0},this.viewport={x:0,y:0},this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}composedPath(){return!this.manager||this.path&&this.path[this.path.length-1]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.composedDetailPath(),this.path}composedDetailPath(){return this.pickParams&&this.pickParams.graphic?(this.detailPath=this.path.slice(),this._composedDetailPath(this.pickParams)):this.detailPath=this.path.slice(),this.detailPath}_composedDetailPath(e){if(e&&e.graphic){const t=this.pickParams.graphic;if(t.stage){const n=t.stage.eventSystem.manager.propagationPath(t);this.detailPath.push(n),this._composedDetailPath(e.params)}}}preventDefault(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault()}catch(e){this.nativeEvent.preventDefault&&g(this.nativeEvent.preventDefault)&&this.nativeEvent.preventDefault()}this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.stopPropagation()}catch(e){this.nativeEvent.stopPropagation&&g(this.nativeEvent.stopPropagation)&&this.nativeEvent.stopPropagation()}this.propagationStopped=!0}initEvent(){}initUIEvent(){}clone(){throw new Error("Method not implemented.")}}class Br extends Tr{constructor(e,t){super(),this.type=e,this.detail=t}}const Cr={dispatchEvent(e){var t;if(!(e instanceof Tr))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return e.defaultPrevented=!1,e.path=[],e.detailPath&&(e.detailPath=[]),e.target=this,null===(t=null==e?void 0:e.manager)||void 0===t||t.dispatchEvent(e),!e.defaultPrevented},emit(e,t){return this.dispatchEvent(new Br(e,t))}};class Er{constructor(){}static linear(e){return e}static none(){return this.linear}static get(e){return e<-1?e=-1:e>1&&(e=1),function(t){return 0===e?t:e<0?t*(t*-e+1+e):t*((2-t)*e+(1-e))}}static getPowIn(e){return function(t){return Math.pow(t,e)}}static getPowOut(e){return function(t){return 1-Math.pow(1-t,e)}}static getPowInOut(e){return function(t){return(t*=2)<1?.5*Math.pow(t,e):1-.5*Math.abs(Math.pow(2-t,e))}}static getBackIn(e){return function(t){return t*t*((e+1)*t-e)}}static getBackOut(e){return function(t){return--t*t*((e+1)*t+e)+1}}static getBackInOut(e){return e*=1.525,function(t){return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}}static sineIn(e){return 1-Math.cos(e*Math.PI/2)}static sineOut(e){return Math.sin(e*Math.PI/2)}static sineInOut(e){return-(Math.cos(Math.PI*e)-1)/2}static expoIn(e){return 0===e?0:Math.pow(2,10*e-10)}static expoOut(e){return 1===e?1:1-Math.pow(2,-10*e)}static expoInOut(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2}static circIn(e){return-(Math.sqrt(1-e*e)-1)}static circOut(e){return Math.sqrt(1- --e*e)}static circInOut(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}static bounceOut(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}static bounceIn(e){return 1-Er.bounceOut(1-e)}static bounceInOut(e){return e<.5?.5*Er.bounceIn(2*e):.5*Er.bounceOut(2*e-1)+.5}static getElasticIn(e,t){return function(n){if(0===n||1===n)return n;const r=t/J*Math.asin(1/e);return-e*Math.pow(2,10*(n-=1))*Math.sin((n-r)*J/t)}}static getElasticOut(e,t){return function(n){if(0===n||1===n)return n;const r=t/J*Math.asin(1/e);return e*Math.pow(2,-10*n)*Math.sin((n-r)*J/t)+1}}static getElasticInOut(e,t){return function(n){const r=t/J*Math.asin(1/e);return(n*=2)<1?e*Math.pow(2,10*(n-=1))*Math.sin((n-r)*J/t)*-.5:e*Math.pow(2,-10*(n-=1))*Math.sin((n-r)*J/t)*.5+1}}}Er.quadIn=Er.getPowIn(2),Er.quadOut=Er.getPowOut(2),Er.quadInOut=Er.getPowInOut(2),Er.cubicIn=Er.getPowIn(3),Er.cubicOut=Er.getPowOut(3),Er.cubicInOut=Er.getPowInOut(3),Er.quartIn=Er.getPowIn(4),Er.quartOut=Er.getPowOut(4),Er.quartInOut=Er.getPowInOut(4),Er.quintIn=Er.getPowIn(5),Er.quintOut=Er.getPowOut(5),Er.quintInOut=Er.getPowInOut(5),Er.backIn=Er.getBackIn(1.7),Er.backOut=Er.getBackOut(1.7),Er.backInOut=Er.getBackInOut(1.7),Er.elasticIn=Er.getElasticIn(1,.3),Er.elasticOut=Er.getElasticOut(1,.3),Er.elasticInOut=Er.getElasticInOut(1,.3*1.5);const Pr=new class{constructor(){this.id=He.GenAutoIncrementId(),this.animateHead=null,this.animateTail=null,this.animateCount=0,this.paused=!1}addAnimate(e){this.animateTail?(this.animateTail.nextAnimate=e,e.prevAnimate=this.animateTail,this.animateTail=e,e.nextAnimate=null):(this.animateHead=e,this.animateTail=e),this.animateCount++}pause(){this.paused=!0}resume(){this.paused=!1}tick(e){if(this.paused)return;let t=this.animateHead;for(this.animateCount=0;t;)t.status===Gt.END?this.removeAnimate(t):t.status===Gt.RUNNING||t.status===Gt.INITIAL?(this.animateCount++,t.advance(e)):t.status===Gt.PAUSED&&this.animateCount++,t=t.nextAnimate}clear(){let e=this.animateHead;for(;e;)e.release(),e=e.nextAnimate;this.animateHead=null,this.animateTail=null,this.animateCount=0}removeAnimate(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e._onRemove&&e._onRemove.forEach((e=>e())),e===this.animateHead?(this.animateHead=e.nextAnimate,e===this.animateTail?this.animateTail=null:this.animateHead.prevAnimate=null):e===this.animateTail?(this.animateTail=e.prevAnimate,this.animateTail.nextAnimate=null):(e.prevAnimate.nextAnimate=e.nextAnimate,e.nextAnimate.prevAnimate=e.prevAnimate),t&&e.release()}};class Rr{constructor(e,t,n,r,i){this.from=e,this.to=t,this.duration=n,this.easing=r,this.params=i,this.updateCount=0}bind(e,t){this.target=e,this.subAnimate=t,this.onBind()}onBind(){}onFirstRun(){}onStart(){}onEnd(){}getEndProps(){return this.to}getFromProps(){return this.from}getMergedEndProps(){var e;const t=this.getEndProps();return t?this._endProps===t?this._mergedEndProps:(this._endProps=t,void(this._mergedEndProps=Object.assign({},null!==(e=this.step.prev.getLastProps())&&void 0!==e?e:{},t))):this.step.prev?this.step.prev.getLastProps():t}update(e,t,n){if(0===this.updateCount){this.onFirstRun();const e=this.step.getLastProps();Object.keys(e).forEach((t=>{this.subAnimate.animate.validAttr(t)&&(n[t]=e[t])}))}this.updateCount+=1,this.onUpdate(e,t,n),e&&this.onEnd()}}class Mr extends Rr{constructor(e){super(null,null,0,"linear"),this.cb=e}onUpdate(e,t,n){}onStart(){this.cb()}}class Lr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.GenAutoIncrementId(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pr;this.id=e,this.timeline=t,this.status=Gt.INITIAL,this.tailAnimate=new Or(this),this.subAnimates=[this.tailAnimate],this.timeScale=1,this.rawPosition=-1,this._startTime=0,this._duringTime=0,this.timeline.addAnimate(this)}setTimeline(e){e!==this.timeline&&(this.timeline.removeAnimate(this,!1),e.addAnimate(this))}getStartTime(){return this._startTime}getDuration(){return this.subAnimates.reduce(((e,t)=>e+t.totalDuration),0)}after(e){const t=e.getDuration();return this._startTime=t,this}afterAll(e){let t=-1/0;return e.forEach((e=>{t=re(e.getDuration(),t)})),this._startTime=t,this}parallel(e){return this._startTime=e.getStartTime(),this}static AddInterpolate(e,t){Lr.interpolateMap.set(e,t)}play(e){if(this.tailAnimate.play(e),this.target){const e=this.target.stage;e&&e.renderNextFrame()}return 1===this.subAnimates.length&&this.tailAnimate.totalDuration===e.duration&&this.trySetAttribute(e.getFromProps(),e.mode),this}trySetAttribute(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lr.mode;e&&t&Yt.SET_ATTR_IMMEDIATELY&&this.target.setAttributes&&this.target.setAttributes(e,!1,{type:Vt.ANIMATE_PLAY})}runCb(e){const t=new Mr((()=>{e(this,t.step.prev)}));return this.tailAnimate.play(t),this}customInterpolate(e,t,n,r,i,a){const o=Lr.interpolateMap.get(e)||Lr.interpolateMap.get("");return!!o&&o(e,t,n,r,i,a)}pause(){this.status===Gt.RUNNING&&(this.status=Gt.PAUSED)}resume(){this.status===Gt.PAUSED&&(this.status=Gt.RUNNING)}to(e,t,n,r){if(this.tailAnimate.to(e,t,n,r),this.target){const e=this.target.stage;e&&e.renderNextFrame()}return this}from(e,t,n,r){if(this.tailAnimate.from(e,t,n,r),this.target){const e=this.target.stage;e&&e.renderNextFrame()}return this}wait(e){if(this.tailAnimate.wait(e),this.target){const e=this.target.stage;e&&e.renderNextFrame()}return this}startAt(e){if(this.tailAnimate.startAt(e),this.target){const e=this.target.stage;e&&e.renderNextFrame()}return this}loop(e){if(this.tailAnimate.loop=e,this.target){const e=this.target.stage;e&&e.renderNextFrame()}return this}reversed(e){if(this.tailAnimate.reversed=e,this.target){const e=this.target.stage;e&&e.renderNextFrame()}return this}bounce(e){if(this.tailAnimate.bounce=e,this.target){const e=this.target.stage;e&&e.renderNextFrame()}return this}subAnimate(){const e=new Or(this,this.tailAnimate);return this.tailAnimate=e,this.subAnimates.push(e),e.bind(this.target),this}getStartProps(){return this.subAnimates[0].getStartProps()}getEndProps(){return this.tailAnimate.getEndProps()}depreventAttr(e){this._preventAttrs&&this._preventAttrs.delete(e)}preventAttr(e){this._preventAttrs||(this._preventAttrs=new Set),this._preventAttrs.add(e)}preventAttrs(e){e.forEach((e=>this.preventAttr(e)))}validAttr(e){return!this._preventAttrs||!this._preventAttrs.has(e)}bind(e){return this.target=e,this.target.onAnimateBind&&this.target.onAnimateBind(this),this.subAnimates.forEach((t=>{t.bind(e)})),this}advance(e){if(this._duringTime<this._startTime){if(this._duringTime+e*this.timeScale<this._startTime)return void(this._duringTime+=e*this.timeScale);e=this._duringTime+e*this.timeScale-this._startTime,this._duringTime=this._startTime}this.status===Gt.INITIAL&&(this.status=Gt.RUNNING,this._onStart&&this._onStart.forEach((e=>e()))),this.setPosition(this.rawPosition+e*this.timeScale)&&this.status===Gt.RUNNING&&(this.status=Gt.END,this._onEnd&&this._onEnd.forEach((e=>e())))}setPosition(e){let t,n=0;const r=this.rawPosition,i=this.subAnimates.reduce(((e,t)=>e+t.totalDuration),0);e<0&&(e=0);const a=e>=i;if(a&&(e=i),e===r)return a;for(let r=0;r<this.subAnimates.length&&(t=this.subAnimates[r],!(n+t.totalDuration>=e));r++)n+=t.totalDuration,t=void 0;return this.rawPosition=e,t.setPosition(e-n),a}onStart(e){this._onStart||(this._onStart=[]),this._onStart.push(e)}onEnd(e){this._onEnd||(this._onEnd=[]),this._onEnd.push(e)}onRemove(e){this._onRemove||(this._onRemove=[]),this._onRemove.push(e)}onFrame(e){this._onFrame||(this._onFrame=[]),this._onFrame.push(e)}release(){this.status=Gt.END}stop(e){e||this.target.onStop(),"start"===e?this.target.onStop(this.getStartProps()):"end"===e?this.target.onStop(this.getEndProps()):this.target.onStop(e),this.release()}}Lr.mode=Yt.NORMAL,Lr.interpolateMap=new Map;class Or{get totalDuration(){return this.calcAttr(),this._totalDuration+this._startAt}constructor(e,t){this.rawPosition=-1,this.position=0,this.loop=0,this.duration=0,this.animate=e,this.stepHead=new Ir(0,0,t?Object.assign({},t.stepTail.props):{}),this.stepTail=this.stepHead,this.dirty=!0,this._startAt=0}calcAttr(){this.dirty&&(this._totalDuration=this.duration*(this.loop+1))}bind(e){return this.target=e,this}play(e){let t=e.duration;(null==t||t<0)&&(t=0);const n=e.easing,r="string"==typeof n?Er[n]:n,i=this._addStep(t,null,r);return i.type=qt.customAnimate,this._appendProps(e.getEndProps(),i,!1),this._appendCustomAnimate(e,i),this}to(e,t,n,r){(null==t||t<0)&&(t=0);const i="string"==typeof n?Er[n]:n,a=this._addStep(t,null,i);return a.type=qt.to,this._appendProps(e,a,!!r&&r.tempProps),a.propKeys||(a.propKeys=Object.keys(a.props)),r&&r.noPreventAttrs||this.target.animates.forEach((e=>{e.id!==this.animate.id&&e.preventAttrs(a.propKeys)})),this}from(e,t,n,r){this.to(e,0,n,r);const i={};this.stepTail.propKeys||(this.stepTail.propKeys=Object.keys(this.stepTail.props)),this.stepTail.propKeys.forEach((e=>{i[e]=this.getLastPropByName(e,this.stepTail)})),this.to(i,t,n,r),this.stepTail.type=qt.from}startAt(e){return e<0&&(e=0),this._startAt=e,this}getStartProps(){var e;return null===(e=this.stepHead)||void 0===e?void 0:e.props}getEndProps(){return this.stepTail.props}getLastStep(){return this._lastStep}wait(e){if(e>0){const t=this._addStep(+e,null);t.type=qt.wait,t.prev.customAnimate?t.props=t.prev.customAnimate.getEndProps():t.props=t.prev.props,this.target.onAddStep&&this.target.onAddStep(t)}return this}_addStep(e,t,n){const r=new Ir(this.duration,e,t,n);return this.duration+=e,this.stepTail.append(r),this.stepTail=r,r}_appendProps(e,t,n){t.props=n?e:Object.assign({},e);let r=t.prev;const i=t.props;for(t.propKeys||(t.propKeys=Object.keys(t.props)),t.propKeys.forEach((e=>{void 0===t.props[e]&&(t.props[e]=this.target.getDefaultAttribute(e))}));r.prev;)r.props&&(r.propKeys||(r.propKeys=Object.keys(r.props)),r.propKeys.forEach((e=>{void 0===i[e]&&(i[e]=r.props[e])}))),t.propKeys=Object.keys(t.props),r=r.prev;const a=this.stepHead.props;t.propKeys||(t.propKeys=Object.keys(i)),t.propKeys.forEach((e=>{if(void 0===a[e]){const t=this.animate.getStartProps();a[e]=t[e]=this.target.getComputedAttribute(e)}})),this.target.onAddStep&&this.target.onAddStep(t)}_appendCustomAnimate(e,t){t.customAnimate=e,e.step=t,e.bind(this.target,this)}setPosition(e){var t;const n=this.duration,r=this.loop,i=this.rawPosition;let a,o,s=!1;const l=null!==(t=this._startAt)&&void 0!==t?t:0;if(e<0&&(e=0),e<l)return this.rawPosition=e,!1;if(e-=l,n<=0)return s=!0,s;if(a=Math.floor(e/n),o=e-a*n,s=e>=r*n+n,s&&(o=n,a=r,e=o*a+n),e===i)return s;const u=!this.reversed!=!(this.bounce&&a%2);return u&&(o=n-o),this._deltaPosition=o-this.position,this.position=o,this.rawPosition=e+l,this.updatePosition(s,u),s}updatePosition(e,t){if(!this.stepHead)return;let n=this.stepHead.next;const r=this.position,i=this.duration;if(this.target&&n){let a=n.next;for(;a&&a.position<=r;)n=a,a=n.next;let o=e?0===i?1:r/i:(r-n.position)/n.duration;n.easing&&(o=n.easing(o)),this.tryCallCustomAnimateLifeCycle(n,this._lastStep||(t?this.stepTail:this.stepHead),t),this.updateTarget(n,o,e),this._lastStep=n,this.animate._onFrame&&this.animate._onFrame.forEach((e=>e(n,o)))}}tryCallCustomAnimateLifeCycle(e,t,n){if(e!==t)if(n){let n=t.prev;for(;n&&n!==e;)n.customAnimate&&(n.customAnimate.onStart&&n.customAnimate.onStart(),n.customAnimate.onEnd&&n.customAnimate.onEnd()),n=e.prev;t&&t.customAnimate&&t.customAnimate.onEnd&&t.customAnimate.onEnd(),e&&e.customAnimate&&e.customAnimate.onStart&&e.customAnimate.onStart()}else{let n=t.next;for(;n&&n!==e;)n.customAnimate&&(n.customAnimate.onStart&&n.customAnimate.onStart(),n.customAnimate.onEnd&&n.customAnimate.onEnd()),n=n.next;t&&t.customAnimate&&t.customAnimate.onEnd&&t.customAnimate.onEnd(),e&&e.customAnimate&&e.customAnimate.onStart&&e.customAnimate.onStart()}}getLastPropByName(e,t){let n=t.prev;for(;n;){if(n.props&&void 0!==n.props[e])return n.props[e];if(n.customAnimate){const t=n.customAnimate.getEndProps()[e];if(void 0!==t)return t}n=n.prev}return Y.getInstance().warn("未知错误,step中找不到属性"),t.props[e]}updateTarget(e,t,n){null==e.props&&null==e.customAnimate||this.target.onStep(this,this.animate,e,t,n)}}class Ir{constructor(e,t,n,r){this.duration=t,this.position=e,this.props=n,this.easing=r}append(e){e.prev=this,e.next=this.next,this.next=e}getLastProps(){let e=this.prev;for(;e;){if(e.props)return e.props;if(e.customAnimate)return e.customAnimate.getMergedEndProps();e=e.prev}return null}}const Nr=200,Ur="cubicOut";var Dr;!function(e){e[e.Top=1]="Top",e[e.Right=2]="Right",e[e.Bottom=4]="Bottom",e[e.Left=8]="Left",e[e.ALL=15]="ALL"}(Dr||(Dr={}));const zr=[0,0,0,0],jr=e=>e?_(e)?0===e.length?0:1===e.length?e[0]:2===e.length?(zr[0]=e[0],zr[2]=e[0],zr[1]=e[1],zr[3]=e[1],zr):e:e:0,Fr=[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],Wr=[1,2,3,0,1,2,3,0];function Hr(e,t,n,r){for(;e>=J;)e-=J;for(;e<0;)e+=J;for(;e>t;)t+=J;Fr[0].x=n,Fr[1].y=n,Fr[2].x=-n,Fr[3].y=-n;const i=Math.ceil(e/K)%4,a=Math.ceil(t/K)%4;if(r.add(ne(e)*n,ae(e)*n),r.add(ne(t)*n,ae(t)*n),i!==a||t-e>X){let e=!1;for(let t=0;t<Wr.length;t++)if(e||i!==Wr[t]){if(e&&a===Wr[t])break;if(e){const e=Fr[Wr[t]];r.add(e.x,e.y)}}else{e=!0;const t=Fr[i];r.add(t.x,t.y)}}}const $r=(e,t)=>S(e)&&"%"===e[e.length-1]?t*(Number.parseFloat(e.substring(0,e.length-1))/100):e;var Vr;!function(e){e[e.Color255=0]="Color255",e[e.Color1=1]="Color1"}(Vr||(Vr={}));class Gr{static Get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vr.Color1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,0,1];if(t===Vr.Color1){const t=Gr.store1[e];if(t)return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n;const r=Te.parseColorString(e);if(r){const t=[r.r/255,r.g/255,r.b/255,r.opacity];Gr.store1[e]=t,Gr.store255[e]=[r.r,r.g,r.b,r.opacity],n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]}return n}const r=Gr.store255[e];if(r)return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n;const i=Te.parseColorString(e);return i&&(Gr.store1[e]=[i.r/255,i.g/255,i.b/255,i.opacity],Gr.store255[e]=[i.r,i.g,i.b,i.opacity],n[0]=i.r,n[1]=i.g,n[2]=i.b,n[3]=i.opacity),n}static Set(e,t,n){if(t===Vr.Color1){if(Gr.store1[e])return;Gr.store1[e]=n,Gr.store255[e]=[Math.floor(255*n[0]),Math.floor(255*n[1]),Math.floor(255*n[2]),Math.floor(255*n[3])]}else{if(Gr.store255[e])return;Gr.store255[e]=n,Gr.store1[e]=[n[0]/255,n[1]/255,n[2]/255,n[3]]}}}function Yr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(e)&&A(e[0])?t?`rgb(${Math.round(e[0])},${Math.round(e[1])},${Math.round(e[2])},${e[3].toFixed(2)})`:`rgb(${Math.round(e[0])},${Math.round(e[1])},${Math.round(e[2])})`:e}function qr(e,t,n,r,i){return Array.isArray(e)&&!A(e[0])||Array.isArray(t)&&!A(t[0])?new Array(4).fill(0).map(((i,a)=>Qr(_(e)?e[a]:e,_(t)?t[a]:t,n,r))):Qr(e,t,n,r,i)}function Qr(e,t,n,r,i){if(!e||!t)return e&&Yr(e)||t&&Yr(t)||!1;let a,o,s=!1,l=!1;if(Array.isArray(e)?a=e:"string"==typeof e?a=Gr.Get(e,Vr.Color255):s=!0,Array.isArray(t)?o=t:"string"==typeof t?o=Gr.Get(t,Vr.Color255):l=!0,s!==l){const a=s?e:t,o=s?t:e,l=Object.assign(Object.assign({},a),{stops:a.stops.map((e=>Object.assign(Object.assign({},e),{color:Yr(o)})))});return s?qr(a,l,n,r,i):qr(l,a,n,r,i)}if(s){if(e.gradient===t.gradient){const r=e,i=t,a=r.stops,o=i.stops;if(a.length!==o.length)return!1;if("linear"===r.gradient)return function(e,t,n){const r=e.stops,i=t.stops;return{gradient:"linear",x0:e.x0+(t.x0-e.x0)*n,x1:e.x1+(t.x1-e.x1)*n,y0:e.y0+(t.y0-e.y0)*n,y1:e.y1+(t.y1-e.y1)*n,stops:new Array(r.length).fill(0).map(((e,t)=>({color:Zr(r[t].color,i[t].color,n),offset:r[t].offset+(i[t].offset-r[t].offset)*n})))}}(r,i,n);if("radial"===r.gradient)return function(e,t,n){const r=e.stops,i=t.stops;return{gradient:"radial",x0:e.x0+(t.x0-e.x0)*n,x1:e.x1+(t.x1-e.x1)*n,y0:e.y0+(t.y0-e.y0)*n,y1:e.y1+(t.y1-e.y1)*n,r0:e.r0+(t.r0-e.r0)*n,r1:e.r1+(t.r1-e.r1)*n,stops:new Array(r.length).fill(0).map(((e,t)=>({color:Zr(r[t].color,i[t].color,n),offset:r[t].offset+(i[t].offset-r[t].offset)*n})))}}(r,i,n);if("conical"===r.gradient)return function(e,t,n){const r=e.stops,i=t.stops;return{gradient:"conical",startAngle:e.startAngle+(t.startAngle-e.startAngle)*n,endAngle:e.endAngle+(t.endAngle-e.endAngle)*n,x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n,stops:new Array(r.length).fill(0).map(((e,t)=>({color:Zr(r[t].color,i[t].color,n),offset:r[t].offset+(i[t].offset-r[t].offset)*n})))}}(r,i,n)}return!1}return i&&i(a,o),Yr(function(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n,e[3]+(t[3]-e[3])*n]}(a,o,n),r)}Gr.store255={},Gr.store1={};const Xr=[0,0,0,0],Kr=[0,0,0,0];function Zr(e,t,n){return Gr.Get(e,Vr.Color255,Xr),Gr.Get(t,Vr.Color255,Kr),`rgba(${Math.round(Xr[0]+(Kr[0]-Xr[0])*n)},${Math.round(Xr[1]+(Kr[1]-Xr[1])*n)},${Math.round(Xr[2]+(Kr[2]-Xr[2])*n)},${Xr[3]+(Kr[3]-Xr[3])*n})`}class Jr{static GetImage(e,t){var n;const r=Jr.cache.get(e);r?"fail"===r.loadState?ir.global.getRequestAnimationFrame()((()=>{t.imageLoadFail(e)})):"init"===r.loadState||"loading"===r.loadState?null===(n=r.waitingMark)||void 0===n||n.push(t):t&&t.imageLoadSuccess(e,r.data):Jr.loadImage(e,t)}static GetSvg(e,t){var n;let r=Jr.cache.get(e);r?"fail"===r.loadState?ir.global.getRequestAnimationFrame()((()=>{t.imageLoadFail(e)})):"init"===r.loadState||"loading"===r.loadState?null===(n=r.waitingMark)||void 0===n||n.push(t):t&&t.imageLoadSuccess(e,r.data):(r={type:"image",loadState:"init"},Jr.cache.set(e,r),r.dataPromise=ir.global.loadSvg(e),r.dataPromise?(r.waitingMark=[t],r.dataPromise.then((t=>{var n;r.loadState=(null==t?void 0:t.data)?"success":"fail",r.data=null==t?void 0:t.data,null===(n=r.waitingMark)||void 0===n||n.map(((n,i)=>{(null==t?void 0:t.data)?(r.loadState="success",r.data=t.data,n.imageLoadSuccess(e,t.data)):(r.loadState="fail",n.imageLoadFail(e))}))}))):(r.loadState="fail",t.imageLoadFail(e)))}static GetFile(e,t){let n=Jr.cache.get(e);return n?"init"===n.loadState||"fail"===n.loadState?Promise.reject():"loading"===n.loadState?n.dataPromise.then((e=>e.data)):Promise.resolve(n.data):(n={type:t,loadState:"init"},Jr.cache.set(e,n),"arrayBuffer"===t?n.dataPromise=ir.global.loadArrayBuffer(e):"blob"===t?n.dataPromise=ir.global.loadBlob(e):"json"===t&&(n.dataPromise=ir.global.loadJson(e)),n.dataPromise.then((e=>e.data)))}static loading(){setTimeout((()=>{if(!Jr.isLoading&&Jr.toLoadAueue.length){Jr.isLoading=!0;const e=Jr.toLoadAueue.splice(0,10),t=[];e.forEach((e=>{const{url:n,marks:r}=e,i={type:"image",loadState:"init"};if(Jr.cache.set(n,i),i.dataPromise=ir.global.loadImage(n),i.dataPromise){i.waitingMark=r;const e=i.dataPromise.then((e=>{var t;i.loadState=(null==e?void 0:e.data)?"success":"fail",i.data=null==e?void 0:e.data,null===(t=i.waitingMark)||void 0===t||t.map(((t,r)=>{(null==e?void 0:e.data)?(i.loadState="success",i.data=e.data,t.imageLoadSuccess(n,e.data)):(i.loadState="fail",t.imageLoadFail(n))}))}));t.push(e)}else i.loadState="fail",r.forEach((e=>e.imageLoadFail(n)))})),Promise.all(t).then((()=>{Jr.isLoading=!1,this.onLoadSuccessCb.forEach((e=>e())),Jr.loading()})).catch((e=>{Jr.isLoading=!1,this.onLoadSuccessCb.forEach((e=>e())),Jr.loading()}))}}),0)}static loadImage(e,t){const n=ei(e,Jr.toLoadAueue);if(-1!==n)return Jr.toLoadAueue[n].marks.push(t),void Jr.loading();Jr.toLoadAueue.push({url:e,marks:[t]}),Jr.loading()}static improveImageLoading(e){const t=ei(e,Jr.toLoadAueue);if(-1!==t){const e=Jr.toLoadAueue.splice(t,1);Jr.toLoadAueue.unshift(e[0])}}static onLoadSuccess(e){this.onLoadSuccessCb.push(e)}}function ei(e,t){for(let n=0;n<t.length;n++)if(t[n].url===e)return n;return-1}Jr.cache=new Map,Jr.isLoading=!1,Jr.toLoadAueue=[],Jr.onLoadSuccessCb=[];const ti=new ge,ni=new fe,ri=["lineWidth","scaleX","scaleY","angle","anchor","visible"],ii=["x","y"],ai=["scaleX","scaleY"],oi=["angle"],si=new ue,li={strokeSeg:1,boundsPadding:2,pickMode:1,boundsMode:1,customPickShape:1,pickable:1,childrenPickable:1,visible:1,zIndex:1,layout:1,keepDirIn3d:1,globalZIndex:1,outerBorder:1,innerBorder:1,lineDash:1,lineCap:1,lineJoin:1,miterLimit:2,strokeBoundsBuffer:2,scaleCenter:1,anchor:1,anchor3d:1,postMatrix:1,backgroundMode:2,background:1,texture:1,cursor:1,html:1};class ui extends kr{static mixin(e){const t=Object.keys(e);for(let n=0;n<t.length;++n){const r=t[n];Object.defineProperty(ui.prototype,r,Object.getOwnPropertyDescriptor(e,r))}}get AABBBounds(){return this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode)}get OBBBounds(){return this.tryUpdateOBBBounds()}get globalAABBBounds(){return this.tryUpdateGlobalAABBBounds()}get transMatrix(){return this.tryUpdateLocalTransMatrix(!0)}get globalTransMatrix(){return this.tryUpdateGlobalTransMatrix(!0)}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;super(),this._AABBBounds=new fe,this._updateTag=Ht.INIT,this.attribute=e,this.valid=this.isValid(),e.background?this.loadImage(null!==(t=e.background.background)&&void 0!==t?t:e.background,!0):e.shadowGraphic&&this.setShadowGraphic(e.shadowGraphic)}setMode(e){"3d"===e?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}getOffsetXY(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,r;const{dx:i=e.dx,dy:a=e.dy}=this.attribute;if(t&&this.parent){const e=this.parent.attribute;si.x=i+(null!==(n=e.scrollX)&&void 0!==n?n:0),si.y=a+(null!==(r=e.scrollY)&&void 0!==r?r:0)}else si.x=i,si.y=a;return si}onAnimateBind(e){this._emitCustomEvent("animate-bind",e)}tryUpdateAABBBounds(e){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;if(!this.valid)return this._AABBBounds.clear(),this._AABBBounds;ir.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const t=this.doUpdateAABBBounds(e);return ir.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,!0),t}combindShadowAABBBounds(e){if(this.shadowRoot){const t=this.shadowRoot.AABBBounds.clone();e.union(t)}}tryUpdateGlobalAABBBounds(){const e=this.AABBBounds;return this._globalAABBBounds?this._globalAABBBounds.setValue(e.x1,e.y1,e.x2,e.y2):this._globalAABBBounds=e.clone(),this._globalAABBBounds.empty()||this.parent&&this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix),this._globalAABBBounds}tryUpdateGlobalTransMatrix(){if(this._globalTransMatrix){if(this.parent){const e=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(e.a,e.b,e.c,e.d,e.e,e.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();return this.shouldUpdateGlobalMatrix()&&this.doUpdateGlobalMatrix(),this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!0}tryUpdateLocalTransMatrix(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._transMatrix||(this._transMatrix=new ge),this.shouldUpdateLocalMatrix()&&(this.doUpdateLocalMatrix(),e&&this.clearUpdateLocalPositionTag()),this._transMatrix}shouldUpdateAABBBounds(){return this.shadowRoot?!!(this._updateTag&Ht.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&Ht.UPDATE_BOUNDS)}shouldSelfChangeUpdateAABBBounds(){return this.shadowRoot?!!(this._updateTag&Ht.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&Ht.UPDATE_BOUNDS)}shouldUpdateLocalMatrix(){return!!(this._updateTag&Ht.UPDATE_LOCAL_MATRIX)}isValid(){var e,t;const n=this.attribute;return Number.isFinite((null!==(e=n.x)&&void 0!==e?e:0)+(null!==(t=n.y)&&void 0!==t?t:0))}_validNumber(e){return null==e||Number.isFinite(e)}shouldUpdateShape(){return!!(this._updateTag&Ht.UPDATE_SHAPE)}clearUpdateShapeTag(){this._updateTag&=Ht.CLEAR_SHAPE}containsPoint(e,t,n,r){if(!r)return!1;if(n===$t.GLOBAL){const n=new ue(e,t);this.parent&&this.parent.globalTransMatrix.transformPoint(n,n),e=n.x,t=n.y}return r.containsPoint(this,{x:e,y:t})}setAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;(e=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(e,this.attribute,null,n)||e).background?this.loadImage(e.background,!0):e.shadowGraphic&&this.setShadowGraphic(e.shadowGraphic),this._setAttributes(e,t,n)}_setAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const r=Object.keys(e);for(let t=0;t<r.length;t++){const n=r[t];this.attribute[n]=e[n]}this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!t&&!this.needUpdateTags(r)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n)}setAttribute(e,t,n,r){var i;const a=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({[e]:t},this.attribute,e,r);a?this._setAttributes(a,n,r):m(null===(i=this.normalAttrs)||void 0===i?void 0:i[e])?(this.attribute[e]=t,this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!n&&!this.needUpdateTag(e)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(r)):this.normalAttrs[e]=t,"background"===e?this.loadImage(t,!0):"shadowGraphic"===e&&this.setShadowGraphic(t)}needUpdateTags(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ri;for(let n=0;n<t.length;n++){const r=t[n];if(-1!==e.indexOf(r))return!0}return!1}needUpdateTag(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ri;for(let n=0;n<t.length;n++)if(e===t[n])return!0;return!1}initAttributes(e){const t={type:Vt.INIT};e=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(e,this.attribute,null,t)||e,this.attribute=e,e.background?this.loadImage(e.background,!0):e.shadowGraphic&&this.setShadowGraphic(e.shadowGraphic),this._updateTag=Ht.INIT,this.valid=this.isValid(),this.onAttributeUpdate(t)}translate(e,t){var n,r;if(0===e&&0===t)return this;const i={type:Vt.TRANSLATE},a=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:e,y:t},this.attribute,ii,i);a&&(e=a.x,t=a.y,delete a.x,delete a.y,this._setAttributes(a));const o=this.attribute,s=o.postMatrix;return s?ir.transformUtil.fromMatrix(s,s).translate(e,t):(o.x=(null!==(n=o.x)&&void 0!==n?n:Un.x)+e,o.y=(null!==(r=o.y)&&void 0!==r?r:Un.y)+t),this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i),this}translateTo(e,t){const n=this.attribute;if(n.x===e&&n.y===t)return this;const r={type:Vt.TRANSLATE_TO},i=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:e,y:t},this.attribute,ii,r);return i?(this._setAttributes(i,!1,r),this):(n.x=e,n.y=t,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(r),this)}scale(e,t,n){var r,i;if(1===e&&1===t)return this;const a={type:Vt.SCALE},o=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:e,scaleY:t,scaleCenter:n},this.attribute,ai,a);o&&(e=o.scaleX,t=o.scaleY,delete o.scaleX,delete o.scaleY,this._setAttributes(o));const s=this.attribute;if(n){let{postMatrix:r}=this.attribute;r||(r=new ge,s.postMatrix=r),ir.transformUtil.fromMatrix(r,r).scale(e,t,n)}else s.scaleX=(null!==(r=s.scaleX)&&void 0!==r?r:Un.scaleX)*e,s.scaleY=(null!==(i=s.scaleY)&&void 0!==i?i:Un.scaleY)*t;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(a),this}scaleTo(e,t){const n=this.attribute;if(n.scaleX===e&&n.scaleY===t)return this;const r={type:Vt.SCALE_TO},i=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:e,scaleY:t},this.attribute,ai,r);return i?(this._setAttributes(i,!1,r),this):(n.scaleX=e,n.scaleY=t,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(r),this)}rotate(e,t){var n;if(0===e)return this;const r={type:Vt.ROTATE},i=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({angle:e,rotateCenter:t},this.attribute,oi,r);i&&(delete i.angle,this._setAttributes(i,!1,r));const a=this.attribute;if(t){let{postMatrix:n}=this.attribute;n||(n=new ge,a.postMatrix=n),ir.transformUtil.fromMatrix(n,n).rotate(e,t)}else a.angle=(null!==(n=a.angle)&&void 0!==n?n:Un.angle)+e;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(r),this}rotateTo(e){const t=this.attribute;if(t.angle===e)return this;const n={type:Vt.ROTATE_TO},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(e,this.attribute,oi,n);return r?(this._setAttributes(r,!1,n),this):(t.angle=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this)}skewTo(e,t){return this}animate(e){this.animates||(this.animates=new Map);const t=new Lr(null==e?void 0:e.id,this.stage&&this.stage.getTimeline()).bind(this);if(e){const{onStart:n,onFrame:r,onEnd:i,onRemove:a}=e;null!=n&&t.onStart(n),null!=r&&t.onFrame(r),null!=i&&t.onEnd(i),null!=a&&t.onRemove(a),t.interpolateFunc=e.interpolate}return this.animates.set(t.id,t),t.onRemove((()=>{this.animates.delete(t.id)})),t}onAttributeUpdate(e){e&&e.skipUpdateCallback||(ir.graphicService.onAttributeUpdate(this),this._emitCustomEvent("afterAttributeUpdate",e))}update(e){e?(e.bounds&&this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),e.trans&&this.tryUpdateLocalTransMatrix()):(this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),this.tryUpdateLocalTransMatrix())}hasState(e){return!(!this.currentStates||!this.currentStates.length)&&(!!m(e)||this.currentStates.includes(e))}getState(e){var t;return null===(t=this.states)||void 0===t?void 0:t[e]}applyStateAttrs(e,t,n,r){var i,a,o,s;if(n){const n=Object.keys(e),l=this.getNoWorkAnimateAttr(),u={};let c;n.forEach((t=>{l[t]?(c||(c={}),c[t]=e[t]):u[t]=r&&void 0===e[t]?this.getDefaultAttribute(t):e[t]}));const d=this.animate();d.stateNames=t,d.to(u,null!==(a=null===(i=this.stateAnimateConfig)||void 0===i?void 0:i.duration)&&void 0!==a?a:Nr,null!==(s=null===(o=this.stateAnimateConfig)||void 0===o?void 0:o.easing)&&void 0!==s?s:Ur),c&&this.setAttributes(c,!1,{type:Vt.STATE})}else this.stopStateAnimates(),this.setAttributes(e,!1,{type:Vt.STATE})}updateNormalAttrs(e){const t={};this.normalAttrs?(Object.keys(e).forEach((e=>{e in this.normalAttrs?(t[e]=this.normalAttrs[e],delete this.normalAttrs[e]):t[e]=this.getNormalAttribute(e)})),Object.keys(this.normalAttrs).forEach((t=>{e[t]=this.normalAttrs[t]}))):Object.keys(e).forEach((e=>{t[e]=this.getNormalAttribute(e)})),this.normalAttrs=t}stopStateAnimates(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end";this.animates&&this.animates.forEach((t=>{t.stateNames&&(t.stop(e),this.animates.delete(t.id))}))}getNormalAttribute(e){let t=this.attribute[e];return this.animates&&this.animates.forEach((n=>{if(n.stateNames){const r=n.getEndProps();O(r,e)&&(t=r[e])}})),t}clearStates(e){this.hasState()&&this.normalAttrs?(this.currentStates=[],this.applyStateAttrs(this.normalAttrs,this.currentStates,e,!0)):this.currentStates=[],this.normalAttrs=null}removeState(e,t){if((this.currentStates?this.currentStates.indexOf(e):-1)>=0){const n=this.currentStates.filter((t=>t!==e));this.useStates(n,t)}}toggleState(e,t){if(this.hasState(e))this.removeState(e,t);else if((this.currentStates?this.currentStates.indexOf(e):-1)<0){const n=this.currentStates?this.currentStates.slice():[];n.push(e),this.useStates(n,t)}}addState(e,t,n){var r;if(this.currentStates&&this.currentStates.includes(e)&&(t||1===this.currentStates.length))return;const i=t&&(null===(r=this.currentStates)||void 0===r?void 0:r.length)?this.currentStates.concat([e]):[e];this.useStates(i,n)}useStates(e,t){var n;if(!e.length)return void this.clearStates(t);if((null===(n=this.currentStates)||void 0===n?void 0:n.length)===e.length&&!e.some(((e,t)=>this.currentStates[t]!==e)))return;const r={};e.forEach((t=>{var n;const i=this.stateProxy?this.stateProxy(t,e):null===(n=this.states)||void 0===n?void 0:n[t];i&&Object.assign(r,i)})),this.updateNormalAttrs(r),this.currentStates=e,this.applyStateAttrs(r,e,t)}addUpdateBoundTag(){this._updateTag|=Ht.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}addUpdateShapeTag(){this._updateTag|=Ht.UPDATE_SHAPE}addUpdateShapeAndBoundsTag(){this._updateTag|=Ht.UPDATE_SHAPE_AND_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}updateShapeAndBoundsTagSetted(){return(this._updateTag&Ht.UPDATE_SHAPE_AND_BOUNDS)===Ht.UPDATE_SHAPE_AND_BOUNDS}clearUpdateBoundTag(){this._updateTag&=Ht.CLEAR_BOUNDS}addUpdatePositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=Ht.UPDATE_GLOBAL_LOCAL_MATRIX}addUpdateGlobalPositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=Ht.UPDATE_GLOBAL_MATRIX}clearUpdateLocalPositionTag(){this._updateTag&=Ht.CLEAR_LOCAL_MATRIX}clearUpdateGlobalPositionTag(){this._updateTag&=Ht.CLEAR_GLOBAL_MATRIX}addUpdateLayoutTag(){this._updateTag|=Ht.UPDATE_LAYOUT}clearUpdateLayoutTag(){this._updateTag&=Ht.CLEAR_LAYOUT}needUpdateLayout(){return!!(this._updateTag&Ht.UPDATE_LAYOUT)}getAnchor(e,t){const n=[0,0],r=()=>{if(t.b)return t.b;const{scaleX:e,scaleY:n,angle:r}=this.attribute;return ni.copy(this._AABBBounds),this.setAttributes({scaleX:1,scaleY:1,angle:0}),t.b=this.AABBBounds.clone(),this._AABBBounds.copy(ni),this.setAttributes({scaleX:e,scaleY:n,angle:r}),t.b};if("string"==typeof e[0]){const t=parseFloat(e[0])/100,i=r();n[0]=i.x1+(i.x2-i.x1)*t}else n[0]=e[0];if("string"==typeof e[1]){const t=parseFloat(e[1])/100,i=r();n[1]=i.y1+(i.y2-i.y1)*t}else n[1]=e[1];return n}doUpdateLocalMatrix(){const{x:e=Un.x,y:t=Un.y,scaleX:n=Un.scaleX,scaleY:r=Un.scaleY,angle:i=Un.angle,scaleCenter:a,anchor:o,postMatrix:s}=this.attribute;let l=[0,0];const u={};if(o&&(l=this.getAnchor(o,u)),!a||1===n&&1===r)!function(e,t,n,r,i,a,o,s){const l=t.a,u=t.b,c=t.c,d=t.d,h=t.e,f=t.f,p=ne(o),g=ae(o);let m,y;s?(m=s[0],y=s[1]):(m=n,y=r);const v=m-n,b=y-r,x=l*p+c*g,S=u*p+d*g,_=c*p-l*g,w=d*p-u*g;e.a=i*x,e.b=i*S,e.c=a*_,e.d=a*w,e.e=h+l*m+c*y-x*v-_*b,e.f=f+u*m+d*y-S*v-w*b}(this._transMatrix,this._transMatrix.reset(),e,t,n,r,i,o&&l);else{const o=this._transMatrix;o.reset(),o.translate(l[0],l[1]),o.rotate(i),o.translate(-l[0],-l[1]),o.translate(e,t),l=this.getAnchor(a,u),ir.transformUtil.fromMatrix(o,o).scale(n,r,{x:l[0],y:l[1]})}const c=this.getOffsetXY(Un);if(this._transMatrix.e+=c.x,this._transMatrix.f+=c.y,s){const e=ti.setValue(s.a,s.b,s.c,s.d,s.e,s.f),t=this._transMatrix;e.multiply(t.a,t.b,t.c,t.d,t.e,t.f),t.setValue(e.a,e.b,e.c,e.d,e.e,e.f)}}doUpdateGlobalMatrix(){if(this.parent){this._globalTransMatrix.multiply(this.transMatrix.a,this.transMatrix.b,this.transMatrix.c,this.transMatrix.d,this.transMatrix.e,this.transMatrix.f);const{scrollX:e=0,scrollY:t=0}=this.parent.attribute;this._globalTransMatrix.translate(e,t)}}setStage(e,t){if(this.stage!==e){if(this.stage=e,this.layer=t,this.setStageToShadowRoot(e,t),this.animates&&this.animates.size){const t=e.getTimeline();this.animates.forEach((e=>{e.setTimeline(t)}))}this._onSetStage&&this._onSetStage(this,e,t),ir.graphicService.onSetStage(this,e)}}setStageToShadowRoot(e,t){this.shadowRoot&&this.shadowRoot.setStage(e,t)}onAddStep(e){}onStop(e){e&&this.setAttributes(e,!1,{type:Vt.ANIMATE_END})}onStep(e,t,n,r,i){const a={};if(n.customAnimate)n.customAnimate.update(i,r,a);else{const o=n.props,s=n.parsedProps,l=n.propKeys;this.stepInterpolate(e,t,a,n,r,i,o,void 0,s,l)}this.setAttributes(a,!1,{type:Vt.ANIMATE_UPDATE,animationState:{ratio:r,end:i,step:n,isFirstFrameOfStep:e.getLastStep()!==n}}),this.stage&&this.stage.renderNextFrame()}stepInterpolate(e,t,n,r,i,a,o,s,l,u){u||(u=Object.keys(o),r.propKeys=u),a?r.propKeys.forEach((e=>{t.validAttr(e)&&(n[e]=o[e])})):u.forEach((a=>{var u;if(!t.validAttr(a))return;const c=o[a],d=null!==(u=s&&s[a])&&void 0!==u?u:e.getLastPropByName(a,r);if(null==c||null==d)return void(n[a]=c);let h;h=t.interpolateFunc&&t.interpolateFunc(a,i,d,c,n),h||(h=t.customInterpolate(a,i,d,c,this,n),h||this.defaultInterpolate(c,d,a,n,l,i)||this._interpolate(a,i,d,c,n))})),r.parsedProps=l}defaultInterpolate(e,t,n,r,i,a){if(Number.isFinite(e))return r[n]=t+(e-t)*a,!0;if("fill"===n){i||(i={});const o=i.fillColorArray,s=qr(t,null!=o?o:e,a,!1,((e,t)=>{i.fillColorArray=t}));return s&&(r[n]=s),!0}if("stroke"===n){i||(i={});const o=i.strokeColorArray,s=qr(t,null!=o?o:e,a,!1,((e,t)=>{i.strokeColorArray=t}));return s&&(r[n]=s),!0}if("shadowColor"===n){i||(i={});const o=i.shadowColorArray,s=qr(t,null!=o?o:e,a,!0,((e,t)=>{i.shadowColorArray=t}));return s&&(r[n]=s),!0}return!1}_interpolate(e,t,n,r,i){}getDefaultAttribute(e){return wr(this)[this.type][e]}getComputedAttribute(e){var t;return null!==(t=this.attribute[e])&&void 0!==t?t:this.getDefaultAttribute(e)}onSetStage(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._onSetStage=e,t&&this.stage&&e(this,this.stage)}attachShadow(e){return e&&(e.shadowHost=this),this.shadowRoot=null!=e?e:ir.graphicService.creator.shadowRoot(this),this.addUpdateBoundTag(),this.shadowRoot.setStage(this.stage,this.layer),this.shadowRoot}detachShadow(){this.shadowRoot&&(this.addUpdateBoundTag(),this.shadowRoot=null)}toJson(){return{attribute:this.attribute,_uid:this._uid,type:this.type,name:this.name,children:this.children.map((e=>e.toJson()))}}createPathProxy(e){return S(e,!0)?this.pathProxy=(new On).fromString(e):this.pathProxy=new On,this.pathProxy}loadImage(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e||t&&function(e){return!(!e.fill&&!e.stroke)}(e))return;const n=e;this.resources||(this.resources=new Map);const r={data:"init",state:null};this.resources.set(n,r),"string"==typeof e?(r.state="loading",e.startsWith("<svg")?(Jr.GetSvg(e,this),this.backgroundImg=this.backgroundImg||t):(T(e)||e.includes("/")||B(e))&&(Jr.GetImage(e,this),this.backgroundImg=this.backgroundImg||t)):v(e)?(r.state="success",r.data=e,this.backgroundImg=this.backgroundImg||t):r.state="fail"}setShadowGraphic(e){e?this.attachShadow().add(e):this.detachShadow()}imageLoadSuccess(e,t,n){if(!this.resources)return;const r=this.resources.get(e);r&&(r.state="success",r.data=t,n&&n(),this.addUpdateBoundTag(),this.stage&&this.stage.renderNextFrame())}imageLoadFail(e,t){if(!this.resources)return;const n=this.resources.get(e);n&&(n.state="fail",t&&t())}_stopAnimates(e){e&&e.forEach((e=>{e.stop()}))}stopAnimates(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._stopAnimates(this.animates),this.shadowRoot&&this.shadowRoot.stopAnimates(!0),this.isContainer&&e&&this.forEachChildren((t=>{t.stopAnimates(e)}))}release(){this.releaseStatus="released",ir.graphicService.onRelease(this)}_emitCustomEvent(e,t){var n,r;if(this._events&&e in this._events){const i=new Br(e,t);i.bubbles=!1,i.manager=null===(r=null===(n=this.stage)||void 0===n?void 0:n.eventSystem)||void 0===r?void 0:r.manager,this.dispatchEvent(i)}}}ui.mixin(Cr);class ci{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}function di(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function hi(e,t,n){const r=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="";for(let a=t;a<e.length;a++){let t=e[a];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:i,index:a};if(e[a+1]===r[1])return{data:i,index:a}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!r)return;let i=r.data;const a=r.index,o=i.search(/\s/);let s=i,l=!0;-1!==o&&(s=i.substr(0,o).replace(/\s\s*$/,""),i=i.substr(o+1));const u=s;if(n){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1),l=s!==r.data.substr(e+1))}return{tagName:s,tagExp:i,closeIndex:a,attrExpPresent:l,rawTagName:u}}const fi=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");class pi{constructor(e){this.currentNode=null,this.options=e,this.tagsNodeStack=[],this.docTypeEntities={}}addChild(e,t,n){const r=t.tagname;"string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t)}buildAttributesMap(e,t,n){const r={};if(!e)return;const i=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const a=r.length;for(let e=0;e<a;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n}(e,fi),a=i.length;for(let e=0;e<a;e++){const t=i[e][1],n=i[e][4];t&&(r[t]=void 0===n||(isNaN(n)?n:Number(n)))}return r}parseXml(e){e=e.replace(/\r\n?/g,"\n");const t=new ci("!xml");let n=t,r="",i="";for(let a=0;a<e.length;a++)if("<"===e[a])if("/"===e[a+1]){const t=di(e,">",a,"Closing Tag is not closed."),o=i.lastIndexOf(".");i=i.substring(0,o),n=this.tagsNodeStack.pop(),n&&n.child&&r&&n.child[n.child.length-1][":@"]&&(n.child[n.child.length-1][":@"].text=r),r="",a=t}else if("?"===e[a+1])a=hi(e,a,!1,"?>").closeIndex+1;else if("!--"===e.substr(a+1,3))a=di(e,"--\x3e",a+4,"Comment is not closed.");else{const o=hi(e,a,!1);let s=o.tagName,l=o.tagExp;const u=o.attrExpPresent,c=o.closeIndex;if(s!==t.tagname&&(i+=i?"."+s:s),l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===s[s.length-1]?(s=s.substr(0,s.length-1),i=i.substr(0,i.length-1),l=s):l=l.substr(0,l.length-1);const e=new ci(s);s!==l&&u&&(e[":@"]=this.buildAttributesMap(l,i,s)),this.addChild(n,e,i),i=i.substr(0,i.lastIndexOf("."))}else{const e=new ci(s);this.tagsNodeStack.push(n),s!==l&&u&&(e[":@"]=this.buildAttributesMap(l,i,s)),this.addChild(n,e,i),n=e}r="",a=c}else r+=e[a];return t.child}}function gi(e,t){return mi(e)}function mi(e,t){const n={};for(let t=0;t<e.length;t++){const i=e[t],a=yi(i);if(void 0!==a&&i[a]){const e=mi(i[a]);r=e,Object.keys(r).length,i[":@"]&&vi(e,i[":@"]),void 0!==n[a]&&n.hasOwnProperty(a)?(Array.isArray(n[a])||(n[a]=[n[a]]),n[a].push(e)):n[a]=e}}var r;return n}function yi(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function vi(e,t,n){if(t){const n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){const r=n[i];e[r]=t[r]}}}class bi{constructor(e){this.options=Object.assign({},bi.defaultOptions,e)}valid(e){return e.startsWith("<")}parse(e){if(!this.valid)return!1;return gi(new pi(this.options).parseXml(e),this.options)}}function xi(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e.expand(t+(r/2+(n?function(e,t){return e?t:0}(n,t):0))),e}bi.defaultOptions={};let Si=0;function _i(){return Si++}var wi;function Ai(e){const t=[];let n=0,r="";for(let i=0;i<e.length;i++)Bi(e[i])?n?r+=e[i]:(n=1,r=e[i]):(n&&(t.push({text:r,direction:wi.VERTICAL}),r="",n=0),t.push({text:e[i],direction:wi.HORIZONTAL}));return r&&t.push({text:r,direction:wi.VERTICAL}),t}!function(e){e[e.HORIZONTAL=0]="HORIZONTAL",e[e.VERTICAL=1]="VERTICAL"}(wi||(wi={}));const ki=new Map;["…","(",")","—","【","】","「","」","《","》"].forEach((e=>ki.set(e,!0)));const Ti=new Map;function Bi(e){if(ki.has(e))return!0;if(Ti.has(e))return!1;let t=!1;return e.codePointAt(0)<256&&(t=!0),t}[""].forEach((e=>Ti.set(e,!0)));const Ci=_i();_i(),_i(),_i(),_i();const Ei=_i(),Pi=_i();_i(),_i(),_i(),_i();const Ri=_i();_i();const Mi=_i(),Li=_i(),Oi=_i(),Ii=Symbol.for("GraphicCreator"),Ni={"stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-width":"lineWidth","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity",stroke:"stroke",fill:"fill"},Ui=Object.keys(Ni);var Di;!function(e){e[e.LESS_GROUP=0]="LESS_GROUP",e[e.MORE_GROUP=1]="MORE_GROUP"}(Di||(Di={}));let zi=class e extends ui{constructor(e){super(e),this.type="group",this.parent=null,this.isContainer=!0,this.numberType=Ei,this._childUpdateTag=Ht.UPDATE_BOUNDS}setMode(e){"3d"===e?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}setTheme(e){return this.theme||(this.theme=new Sr),this.theme.setTheme(e,this)}createTheme(){this.theme||(this.theme=new Sr)}hideAll(){this.setAttribute("visible",!1),this.forEachChildren((e=>{e.isContainer&&e.hideAll?e.hideAll():e.setAttribute("visible",!1)}))}showAll(){this.setAttribute("visible",!0),this.forEachChildren((e=>{e.isContainer&&e.showAll?e.showAll():e.setAttribute("visible",!0)}))}containsPoint(e,t,n){if(n===$t.GLOBAL){const n=new ue(e,t);return this.parent&&this.parent.globalTransMatrix.transformPoint(n,n),this.AABBBounds.contains(n.x,n.y)}return this.AABBBounds.contains(e,t)}shouldUpdateAABBBounds(){return!!super.shouldUpdateAABBBounds()||!!(this._childUpdateTag&Ht.UPDATE_BOUNDS)}tryUpdateAABBBounds(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;ir.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const e=this.shouldSelfChangeUpdateAABBBounds(),t=this.doUpdateAABBBounds();return this.addUpdateLayoutTag(),ir.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,e),t}doUpdateLocalMatrix(){const{x:e=Un.x,y:t=Un.y,dx:n=Un.dx,dy:r=Un.dy,scaleX:i=Un.scaleX,scaleY:a=Un.scaleY,angle:o=Un.angle,postMatrix:s}=this.attribute;if(0!==e||0!==t||0!==n||0!==r||1!==i||1!==a||0!==o||s)return super.doUpdateLocalMatrix();this._transMatrix.reset()}doUpdateAABBBounds(){const e=this.attribute,t=wr(this).group;this._AABBBounds.clear();const n=ir.graphicService.updateGroupAABBBounds(e,t,this._AABBBounds,this),{boundsPadding:r=t.boundsPadding}=e,i=jr(r);return i&&n.expand(i),this.parent&&this.parent.addChildUpdateBoundTag(),this.clearUpdateBoundTag(),this._emitCustomEvent("AAABBBoundsChange"),n}clearUpdateBoundTag(){this._updateTag&=Ht.CLEAR_BOUNDS,this._childUpdateTag&=Ht.CLEAR_BOUNDS}tryUpdateOBBBounds(){throw new Error("暂不支持")}addUpdateBoundTag(){this._updateTag|=Ht.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag()}addChildUpdateBoundTag(){this._childUpdateTag&Ht.UPDATE_BOUNDS||(this._childUpdateTag|=Ht.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag())}getTheme(){return this.theme.getTheme(this)}incrementalAppendChild(e){const t=super.appendChild(e);return this.stage&&t&&(t.stage=this.stage,t.layer=this.layer),this.addUpdateBoundTag(),ir.graphicService.onAddIncremental(e,this,this.stage),t}incrementalClearChild(){super.removeAllChild(),this.addUpdateBoundTag(),ir.graphicService.onClearIncremental(this,this.stage)}appendChild(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=super.appendChild(e);return t&&this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}insertBefore(e,t){const n=super.insertBefore(e,t);return this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}insertAfter(e,t){const n=super.insertAfter(e,t);return this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}insertInto(e,t){const n=super.insertInto(e,t);return this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}removeChild(e){const t=super.removeChild(e);return e.stage=null,ir.graphicService.onRemove(e),this.addUpdateBoundTag(),t}removeAllChild(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.forEachChildren((t=>{ir.graphicService.onRemove(t),e&&t.isContainer&&t.removeAllChild(e)})),super.removeAllChild(),this.addUpdateBoundTag()}setStage(e,t){this.stage!==e&&(this.stage=e,this.layer=t,this.setStageToShadowRoot(e,t),this._onSetStage&&this._onSetStage(this,e,t),ir.graphicService.onSetStage(this,e),this.forEachChildren((t=>{t.setStage(e,this.layer)})))}addUpdatePositionTag(){super.addUpdatePositionTag(),this.forEachChildren((e=>{e.isContainer&&e.addUpdateGlobalPositionTag()}))}addUpdateGlobalPositionTag(){super.addUpdateGlobalPositionTag(),this.forEachChildren((e=>{e.isContainer&&e.addUpdateGlobalPositionTag()}))}tryUpdateGlobalTransMatrix(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.shouldUpdateGlobalMatrix()){if(this._globalTransMatrix){if(this.parent){const e=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(e.a,e.b,e.c,e.d,e.e,e.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();this.doUpdateGlobalMatrix(),e&&this.clearUpdateGlobalPositionTag()}return this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!!(this._updateTag&Ht.UPDATE_GLOBAL_MATRIX)}_getChildByName(e,t){return this.find((t=>t.name===e),t)}createOrUpdateChild(e,t,n){let r=this._getChildByName(e);return r?r.setAttributes(t):(r=ir.graphicService.creator[n](t),r.name=e,this.add(r)),r}clone(){return new e(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return e.NOWORK_ANIMATE_ATTR}};function ji(e){return new zi(e)}function Fi(e,t){return!(!e&&!t)}function Wi(e,t){let n;return n=_(e)?e.some((e=>e||void 0===e)):!!e,n&&t>0}function Hi(e,t,n){return n&&e*t>0}function $i(e,t){return e*t>0}zi.NOWORK_ANIMATE_ATTR=li;const Vi=Symbol.for("ImageRenderContribution"),Gi=Symbol.for("RectRenderContribution"),Yi=Symbol.for("SymbolRenderContribution"),qi=Symbol.for("TextRenderContribution"),Qi=Symbol.for("InteractiveSubRenderContribution");function Xi(e,t){return"end"===e||"right"===e?-t:"center"===e?-t/2:0}function Ki(e,t,n){return"middle"===e?-t/2:"top"===e?0:"bottom"===e?(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)-t:e&&"alphabetic"!==e?0:(n||(n=t),-(t-n)/2-.79*n)}class Zi{constructor(e,t,n){this.fontFamily=e,this.textOptions=t,this.textMeasure=n}LayoutBBox(e,t,n){if("left"===t||"start"===t)e.xOffset=0;else if("center"===t)e.xOffset=e.width/-2;else{if("right"!==t&&"end"!==t)throw new Error("非法的textAlign");e.xOffset=-e.width}return e.yOffset="top"===n?0:"middle"===n?e.height/-2:"alphabetic"===n?-.79*e.height:-e.height,e}GetLayout(e,t,n,r,i,a,o,s,l){const u=[],c=[t,n],d=[0,0];for(;e.length>0;){const{str:n}=this.textMeasure.clipTextWithSuffix(e,this.textOptions,t,o,s,l);u.push({str:n,width:this.textMeasure.measureTextWidth(n,this.textOptions)}),e=e.substring(n.length)}"left"===r||"start"===r||("center"===r?d[0]=c[0]/-2:"right"!==r&&"end"!==r||(d[0]=-c[0])),"top"===i||("middle"===i?d[1]=c[1]/-2:"bottom"===i&&(d[1]=-c[1]));const h={xOffset:d[0],yOffset:d[1],width:c[0],height:c[1]};return this.layoutWithBBox(h,u,r,i,a)}GetLayoutByLines(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"end";e=e.map((e=>e.toString()));const l=[],u=[0,0];if("number"==typeof o&&o!==1/0){let t;for(let n=0,r=e.length;n<r;n++)t=Math.min(this.textMeasure.measureTextWidth(e[n],this.textOptions),o),l.push({str:this.textMeasure.clipTextWithSuffix(e[n],this.textOptions,t,i,a,s).str,width:t});u[0]=o}else{let t,n;o=0;for(let r=0,i=e.length;r<i;r++)n=e[r],t=this.textMeasure.measureTextWidth(n,this.textOptions),o=Math.max(o,t),l.push({str:n,width:t});u[0]=o}u[1]=l.length*r,u[0]=l.reduce(((e,t)=>Math.max(e,t.width)),0);const c={xOffset:0,yOffset:0,width:u[0],height:u[1]};return this.LayoutBBox(c,t,n),this.layoutWithBBox(c,l,t,n,r)}layoutWithBBox(e,t,n,r,i){const a=[0,0],o=t.length*i;"top"===r||("middle"===r?a[1]=(e.height-o)/2:"bottom"===r&&(a[1]=e.height-o));for(let o=0;o<t.length;o++)this.lineOffset(e,t[o],n,r,i,a);return{bbox:e,lines:t,fontFamily:this.fontFamily,fontSize:this.textOptions.fontSize,fontWeight:this.textOptions.fontWeight,lineHeight:i,textAlign:n,textBaseline:r}}lineOffset(e,t,n,r,i,a){return"left"===n||"start"===n?t.leftOffset=0:"center"===n?t.leftOffset=(e.width-t.width)/2:"right"!==n&&"end"!==n||(t.leftOffset=e.width-t.width),t.topOffset=(i-this.textOptions.fontSize)/2+.79*this.textOptions.fontSize+a[1],a[1]+=i,t}}const Ji=["text","maxLineWidth","textAlign","textBaseline","heightLimit","lineClamp","fontSize","fontFamily","fontWeight","ellipsis","lineHeight","direction","wordBreak","heightLimit","lineClamp",...ri];let ea=class e extends ui{get font(){const e=wr(this).text;return this._font||(this._font=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;n||(n=1);const{fontStyle:r=t.fontStyle,fontVariant:i=t.fontVariant,fontWeight:a=t.fontWeight,fontSize:o=t.fontSize,fontFamily:s=t.fontFamily}=e;return(r?r+" ":"")+(i?i+" ":"")+(a?a+" ":"")+o*n+"px "+(s||"sans-serif")}(this.attribute,e)),this._font}get clipedText(){var e;const t=this.attribute,n=wr(this).text;if(!this.isSimplify())return;const{maxLineWidth:r=n.maxLineWidth}=t;return Number.isFinite(r)?(this.tryUpdateAABBBounds(),this.cache.clipedText):(null!==(e=t.text)&&void 0!==e?e:n.text).toString()}get clipedWidth(){if(this.isSimplify())return this.tryUpdateAABBBounds(),this.cache.clipedWidth}get cliped(){const e=wr(this).text,t=this.attribute;if(this.isMultiLine)return;const{maxLineWidth:n=e.maxLineWidth}=t;return!!Number.isFinite(n)&&(this.tryUpdateAABBBounds(),"vertical"===t.direction&&this.cache.verticalList&&this.cache.verticalList[0]?this.cache.verticalList[0].map((e=>e.text)).join("")!==t.text.toString():null!=this.clipedText&&this.clipedText!==t.text.toString())}get multilineLayout(){if(this.isMultiLine)return this.tryUpdateAABBBounds(),this.cache.layoutData}isSimplify(){return!this.isMultiLine&&"vertical"!==this.attribute.direction}get isMultiLine(){return Array.isArray(this.attribute.text)||"normal"===this.attribute.whiteSpace}constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{text:"",fontSize:16}),this.type="text",this.numberType=Oi,this.cache={}}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{text:e}=this.attribute;return _(e)?!e.every((e=>null==e||""===e)):null!=e&&""!==e}doUpdateAABBBounds(){const e=wr(this).text;this._AABBBounds.clear();const t=this.attribute,n=ir.graphicService.updateTextAABBBounds(t,e,this._AABBBounds,this),{boundsPadding:r=e.boundsPadding}=this.attribute,i=jr(r);return i&&n.expand(i),this.clearUpdateBoundTag(),n}updateWrapAABBBounds(e){var t,n,r,i;const a=wr(this).text,{fontFamily:o=a.fontFamily,textAlign:s=a.textAlign,textBaseline:l=a.textBaseline,fontSize:u=a.fontSize,ellipsis:c=a.ellipsis,maxLineWidth:d,stroke:h=a.stroke,lineWidth:f=a.lineWidth,wordBreak:p=a.wordBreak,fontWeight:g=a.fontWeight,ignoreBuf:m=a.ignoreBuf,suffixPosition:y=a.suffixPosition,heightLimit:v=0,lineClamp:b}=this.attribute,x=null!==(t=$r(this.attribute.lineHeight,this.attribute.fontSize||a.fontSize))&&void 0!==t?t:this.attribute.fontSize||a.fontSize,S=m?0:2;if(!this.shouldUpdateShape()&&(null===(n=this.cache)||void 0===n?void 0:n.layoutData)){const e=this.cache.layoutData.bbox;return this._AABBBounds.set(e.xOffset,e.yOffset,e.xOffset+e.width,e.yOffset+e.height),h&&this._AABBBounds.expand(f/2),this._AABBBounds}const w=ir.graphicUtil.textMeasure,A=new Zi(o,{fontSize:u,fontWeight:g,fontFamily:o},w),k=_(e)?e.map((e=>e.toString())):[e.toString()],T=[],B=[0,0];let C=1/0;if(v>0&&(C=Math.max(Math.floor(v/x),1)),b&&(C=Math.min(C,b)),"number"==typeof d&&d!==1/0){if(d>0)for(let e=0;e<k.length;e++){const t=k[e];let n=!0;if(e===C-1){const n=A.textMeasure.clipTextWithSuffix(t,A.textOptions,d,c,!1,y,e!==k.length-1);T.push({str:n.str,width:n.width});break}const a=A.textMeasure.clipText(t,A.textOptions,d,"break-word"===p);if(""!==t&&""===a.str){if(c){const e=A.textMeasure.clipTextWithSuffix(t,A.textOptions,d,c,!1,y);a.str=null!==(r=e.str)&&void 0!==r?r:"",a.width=null!==(i=e.width)&&void 0!==i?i:0}else a.str="",a.width=0;n=!1}if(T.push({str:a.str,width:a.width}),a.str.length===t.length);else if(n){const n=t.substring(a.str.length);k.splice(e+1,0,n)}}let e=0;T.forEach((t=>{e=Math.max(e,t.width)})),B[0]=e}else{let e,t,n=0;for(let r=0,i=k.length;r<i;r++){if(r===C-1){const e=A.textMeasure.clipTextWithSuffix(k[r],A.textOptions,d,c,!1,y);T.push({str:e.str,width:e.width}),n=Math.max(n,e.width);break}t=k[r],e=A.textMeasure.measureTextWidth(t,A.textOptions,"break-word"===p),n=Math.max(n,e),T.push({str:t,width:e})}B[0]=n}B[1]=T.length*(x+S);const E={xOffset:0,yOffset:0,width:B[0],height:B[1]};A.LayoutBBox(E,s,l);const P=A.layoutWithBBox(E,T,s,l,x);return this.cache.layoutData=P,this.clearUpdateShapeTag(),this._AABBBounds.set(E.xOffset,E.yOffset,E.xOffset+E.width,E.yOffset+E.height),h&&this._AABBBounds.expand(f/2),this._AABBBounds}updateSingallineAABBBounds(e){const t=wr(this).text,{direction:n=t.direction,underlineOffset:r=t.underlineOffset}=this.attribute,i="horizontal"===n?this.updateHorizontalSinglelineAABBBounds(e):this.updateVerticalSinglelineAABBBounds(e);return"horizontal"===n&&r&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+r),i}updateMultilineAABBBounds(e){const t=wr(this).text,{direction:n=t.direction,underlineOffset:r=t.underlineOffset}=this.attribute,i="horizontal"===n?this.updateHorizontalMultilineAABBBounds(e):this.updateVerticalMultilineAABBBounds(e);return"horizontal"===n&&r&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+r),i}updateHorizontalSinglelineAABBBounds(e){var t,n;const r=wr(this).text,{wrap:i=r.wrap}=this.attribute;if(i)return this.updateWrapAABBBounds([e]);const a=ir.graphicUtil.textMeasure;let o,s;const l=this.attribute,{maxLineWidth:u=r.maxLineWidth,ellipsis:c=r.ellipsis,textAlign:d=r.textAlign,textBaseline:h=r.textBaseline,fontFamily:f=r.fontFamily,fontSize:p=r.fontSize,fontWeight:g=r.fontWeight,stroke:m=r.stroke,lineWidth:y=r.lineWidth,ignoreBuf:v=r.ignoreBuf,whiteSpace:b=r.whiteSpace,suffixPosition:x=r.suffixPosition}=l;if("normal"===b)return this.updateWrapAABBBounds(e);const S=v?0:Math.max(2,.075*p),_=l.fontSize||r.fontSize,w=null!==(t=$r(l.lineHeight,_))&&void 0!==t?t:_+S;if(!this.shouldUpdateShape()&&this.cache){o=null!==(n=this.cache.clipedWidth)&&void 0!==n?n:0;const e=Xi(d,o),t=Ki(h,w,p);return this._AABBBounds.set(e,t,e+o,t+w),m&&this._AABBBounds.expand(y/2),this._AABBBounds}if(Number.isFinite(u)){if(c){const t=!0===c?r.ellipsis:c,n=a.clipTextWithSuffix(e.toString(),{fontSize:p,fontWeight:g,fontFamily:f},u,t,!1,x);s=n.str,o=n.width}else{const t=a.clipText(e.toString(),{fontSize:p,fontWeight:g,fontFamily:f},u,!1);s=t.str,o=t.width}this.cache.clipedText=s,this.cache.clipedWidth=o}else o=a.measureTextWidth(e.toString(),{fontSize:p,fontWeight:g,fontFamily:f}),this.cache.clipedText=e.toString(),this.cache.clipedWidth=o;this.clearUpdateShapeTag();const A=Xi(d,o);let k=w;ir.global&&ir.global.isSafari()&&(k+=.2*p);const T=Ki(h,k,p,S);return this._AABBBounds.set(A,T,A+o,T+k),m&&this._AABBBounds.expand(y/2),this._AABBBounds}getBaselineMapAlign(){return e.baselineMapAlign}getAlignMapBaseline(){return e.alignMapBaseline}updateVerticalSinglelineAABBBounds(t){var n,r,i;const a=wr(this).text,o=ir.graphicUtil.textMeasure;let s;const l=this.attribute,{ignoreBuf:u=a.ignoreBuf}=l,c=u?0:2,{maxLineWidth:d=a.maxLineWidth,ellipsis:h=a.ellipsis,fontSize:f=a.fontSize,fontWeight:p=a.fontWeight,fontFamily:g=a.fontFamily,stroke:m=a.stroke,lineWidth:y=a.lineWidth,verticalMode:v=a.verticalMode,suffixPosition:b=a.suffixPosition}=l,x=null!==(n=$r(l.lineHeight,l.fontSize||a.fontSize))&&void 0!==n?n:(l.fontSize||a.fontSize)+c;let{textAlign:S=a.textAlign,textBaseline:_=a.textBaseline}=l;if(!v){const t=S;S=null!==(r=e.baselineMapAlign[_])&&void 0!==r?r:"left",_=null!==(i=e.alignMapBaseline[t])&&void 0!==i?i:"top"}if(!this.shouldUpdateShape()&&this.cache){s=this.cache.clipedWidth;const e=Xi(S,s),t=Ki(_,x,f);return this._AABBBounds.set(t,e,t+x,e+s),m&&this._AABBBounds.expand(y/2),this._AABBBounds}let w=[Ai(t.toString())];if(Number.isFinite(d)){if(h){const e=!0===h?a.ellipsis:h,t=o.clipTextWithSuffixVertical(w[0],{fontSize:f,fontWeight:p,fontFamily:g},d,e,!1,b);w=[t.verticalList],s=t.width}else{const e=o.clipTextVertical(w[0],{fontSize:f,fontWeight:p,fontFamily:g},d,!1);w=[e.verticalList],s=e.width}this.cache.verticalList=w,this.cache.clipedWidth=s}else s=0,w[0].forEach((e=>{const t=e.direction===wi.HORIZONTAL?f:o.measureTextWidth(e.text,{fontSize:f,fontWeight:p,fontFamily:g});s+=t,e.width=t})),this.cache.verticalList=w,this.cache.clipedWidth=s;this.clearUpdateShapeTag();const A=Xi(S,s),k=Ki(_,x,f);return this._AABBBounds.set(k,A,k+x,A+s),m&&this._AABBBounds.expand(y/2),this._AABBBounds}updateHorizontalMultilineAABBBounds(e){var t,n;const r=wr(this).text,{wrap:i=r.wrap}=this.attribute;if(i)return this.updateWrapAABBBounds(e);const a=this.attribute,{fontFamily:o=r.fontFamily,textAlign:s=r.textAlign,textBaseline:l=r.textBaseline,fontSize:u=r.fontSize,fontWeight:c=r.fontWeight,ellipsis:d=r.ellipsis,maxLineWidth:h,stroke:f=r.stroke,lineWidth:p=r.lineWidth,whiteSpace:g=r.whiteSpace,suffixPosition:m=r.suffixPosition}=a,y=null!==(t=$r(a.lineHeight,a.fontSize||r.fontSize))&&void 0!==t?t:a.fontSize||r.fontSize;if("normal"===g)return this.updateWrapAABBBounds(e);if(!this.shouldUpdateShape()&&(null===(n=this.cache)||void 0===n?void 0:n.layoutData)){const e=this.cache.layoutData.bbox;return this._AABBBounds.set(e.xOffset,e.yOffset,e.xOffset+e.width,e.yOffset+e.height),f&&this._AABBBounds.expand(p/2),this._AABBBounds}const v=ir.graphicUtil.textMeasure,b=new Zi(o,{fontSize:u,fontWeight:c,fontFamily:o},v).GetLayoutByLines(e,s,l,y,!0===d?r.ellipsis:d||void 0,!1,h,m),{bbox:x}=b;return this.cache.layoutData=b,this.clearUpdateShapeTag(),this._AABBBounds.set(x.xOffset,x.yOffset,x.xOffset+x.width,x.yOffset+x.height),f&&this._AABBBounds.expand(p/2),this._AABBBounds}updateVerticalMultilineAABBBounds(t){var n,r,i;const a=wr(this).text,o=ir.graphicUtil.textMeasure;let s;const l=this.attribute,{ignoreBuf:u=a.ignoreBuf}=l,c=u?0:2,{maxLineWidth:d=a.maxLineWidth,ellipsis:h=a.ellipsis,fontFamily:f=a.fontFamily,fontSize:p=a.fontSize,fontWeight:g=a.fontWeight,stroke:m=a.stroke,lineWidth:y=a.lineWidth,verticalMode:v=a.verticalMode,suffixPosition:b=a.suffixPosition}=l,x=null!==(n=$r(l.lineHeight,l.fontSize||a.fontSize))&&void 0!==n?n:(l.fontSize||a.fontSize)+c;let{textAlign:S=a.textAlign,textBaseline:_=a.textBaseline}=l;if(!v){const t=S;S=null!==(r=e.baselineMapAlign[_])&&void 0!==r?r:"left",_=null!==(i=e.alignMapBaseline[t])&&void 0!==i?i:"top"}if(s=0,!this.shouldUpdateShape()&&this.cache){this.cache.verticalList.forEach((e=>{const t=e.reduce(((e,t)=>e+t.width),0);s=re(t,s)}));const e=Xi(S,s),t=this.cache.verticalList.length*x,n=Ki(_,t,p);return this._AABBBounds.set(n,e,n+t,e+s),m&&this._AABBBounds.expand(y/2),this._AABBBounds}const w=t.map((e=>Ai(e.toString())));w.forEach(((e,t)=>{if(Number.isFinite(d))if(h){const n=!0===h?a.ellipsis:h,r=o.clipTextWithSuffixVertical(e,{fontSize:p,fontWeight:g,fontFamily:f},d,n,!1,b);w[t]=r.verticalList,s=r.width}else{const n=o.clipTextVertical(e,{fontSize:p,fontWeight:g,fontFamily:f},d,!1);w[t]=n.verticalList,s=n.width}else s=0,e.forEach((e=>{const t=e.direction===wi.HORIZONTAL?p:o.measureTextWidth(e.text,{fontSize:p,fontWeight:g,fontFamily:f});s+=t,e.width=t}))})),this.cache.verticalList=w,this.clearUpdateShapeTag(),this.cache.verticalList.forEach((e=>{const t=e.reduce(((e,t)=>e+t.width),0);s=re(t,s)}));const A=Xi(S,s),k=this.cache.verticalList.length*x,T=Ki(_,k,p);return this._AABBBounds.set(T,A,T+k,A+s),m&&this._AABBBounds.expand(y/2),this._AABBBounds}tryUpdateOBBBounds(){throw new Error("暂不支持")}getDefaultAttribute(e){return wr(this).text[e]}needUpdateTags(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ji;return super.needUpdateTags(e,t)}needUpdateTag(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ji;return super.needUpdateTag(e,t)}clone(){return new e(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return e.NOWORK_ANIMATE_ATTR}};function ta(e){return new ea(e)}ea.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,direction:1,textAlign:1,textBaseline:1,fontFamily:1,fontWeight:1},li),ea.baselineMapAlign={top:"left",bottom:"right",middle:"center"},ea.alignMapBaseline={left:"top",right:"bottom",center:"middle"};const na=["heightLimit","lineClamp"];class ra extends ea{constructor(e){super(Object.assign(Object.assign({},e),{wrap:!0}))}_isValid(){const{text:e}=this.attribute;return _(e)?!e.every((e=>null==e||""===e)):null!=e&&""!==e}updateMultilineAABBBounds(e){var t,n,r,i;const a=wr(this).text,{fontFamily:o=a.fontFamily,textAlign:s=a.textAlign,textBaseline:l=a.textBaseline,fontSize:u=a.fontSize,ellipsis:c=a.ellipsis,maxLineWidth:d,stroke:h=a.stroke,lineWidth:f=a.lineWidth,wordBreak:p=a.wordBreak,fontWeight:g=a.fontWeight,ignoreBuf:m=a.ignoreBuf,heightLimit:y=0,suffixPosition:v=a.suffixPosition,lineClamp:b}=this.attribute,x=null!==(t=$r(this.attribute.lineHeight,this.attribute.fontSize||a.fontSize))&&void 0!==t?t:this.attribute.fontSize||a.fontSize,S=m?0:2;if(!this.shouldUpdateShape()&&(null===(n=this.cache)||void 0===n?void 0:n.layoutData)){const e=this.cache.layoutData.bbox;return this._AABBBounds.set(e.xOffset,e.yOffset,e.xOffset+e.width,e.yOffset+e.height),h&&this._AABBBounds.expand(f/2),this._AABBBounds}const _=ir.graphicUtil.textMeasure,w=new Zi(o,{fontSize:u,fontWeight:g,fontFamily:o},_),A=e.map((e=>e.toString())),k=[],T=[0,0];let B=1/0;if(y>0&&(B=Math.max(Math.floor(y/x),1)),b&&(B=Math.min(B,b)),"number"==typeof d&&d!==1/0){if(d>0)for(let e=0;e<A.length;e++){const t=A[e];let n=!0;if(e===B-1){const e=w.textMeasure.clipTextWithSuffix(t,w.textOptions,d,c,!1,v);k.push({str:e.str,width:e.width});break}const a=w.textMeasure.clipText(t,w.textOptions,d,"break-word"===p);if(""!==t&&""===a.str){if(c){const e=w.textMeasure.clipTextWithSuffix(t,w.textOptions,d,c,!1,v);a.str=null!==(r=e.str)&&void 0!==r?r:"",a.width=null!==(i=e.width)&&void 0!==i?i:0}else a.str="",a.width=0;n=!1}if(k.push({str:a.str,width:a.width}),a.str.length===t.length);else if(n){const n=t.substring(a.str.length);A.splice(e+1,0,n)}}let e=0;k.forEach((t=>{e=Math.max(e,t.width)})),T[0]=e}else{let e,t,n=0;for(let r=0,i=A.length;r<i;r++){if(r===B-1){const e=w.textMeasure.clipTextWithSuffix(A[r],w.textOptions,d,c,!1,v);k.push({str:e.str,width:e.width}),n=Math.max(n,e.width);break}t=A[r],e=w.textMeasure.measureTextWidth(t,w.textOptions,"break-word"===p),n=Math.max(n,e),k.push({str:t,width:e})}T[0]=n}T[1]=k.length*(x+S);const C={xOffset:0,yOffset:0,width:T[0],height:T[1]};w.LayoutBBox(C,s,l);const E=w.layoutWithBBox(C,k,s,l,x);return this.cache.layoutData=E,this.clearUpdateShapeTag(),this._AABBBounds.set(C.xOffset,C.yOffset,C.xOffset+C.width,C.yOffset+C.height),h&&this._AABBBounds.expand(f/2),this._AABBBounds}needUpdateTags(e){for(let t=0;t<na.length;t++){const n=na[t];if(-1!==e.indexOf(n))return!0}return super.needUpdateTags(e)}needUpdateTag(e){for(let t=0;t<na.length;t++)if(e===na[t])return!0;return super.needUpdateTag(e)}getNoWorkAnimateAttr(){return ra.NOWORK_ANIMATE_ATTR}}function ia(e){return new ra(e)}class aa{bounds(e,t){if(A(e)){const n=e/2;t.x1=-n,t.x2=n,t.y1=-n,t.y2=n}else t.x1=-e[0]/2,t.x2=e[0]/2,t.y1=-e[1]/2,t.y2=e[1]/2}}function oa(e,t,n,r,i){return i?e.arc(n,r,t,0,Z,!1,i):e.arc(n,r,t,0,Z),!1}var sa=new class extends aa{constructor(){super(...arguments),this.type="circle",this.pathStr="M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0"}draw(e,t,n,r,i){return oa(e,t/2,n,r,i)}drawOffset(e,t,n,r,i,a){return oa(e,t/2+i,n,r,a)}drawToSvgPath(e,t,n,r){const i=e/2;return`M ${t-i}, ${n} a ${i},${i} 0 1,0 ${2*i},0 a ${i},${i} 0 1,0 -${2*i},0`}};var la=new class extends aa{constructor(){super(...arguments),this.type="cross",this.pathStr="M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z"}draw(e,t,n,r,i){return function(e,t,n,r,i){return e.moveTo(-3*t+n,-t+r,i),e.lineTo(-t+n,-t+r,i),e.lineTo(-t+n,-3*t+r,i),e.lineTo(t+n,-3*t+r,i),e.lineTo(t+n,-t+r,i),e.lineTo(3*t+n,-t+r,i),e.lineTo(3*t+n,t+r,i),e.lineTo(t+n,t+r,i),e.lineTo(t+n,3*t+r,i),e.lineTo(-t+n,3*t+r,i),e.lineTo(-t+n,t+r,i),e.lineTo(-3*t+n,t+r,i),e.closePath(),!0}(e,t/6,n,r,i)}drawOffset(e,t,n,r,i,a){return function(e,t,n,r,i,a){return e.moveTo(-3*t+n-i,-t+r-i,a),e.lineTo(-t+n-i,-t+r-i,a),e.lineTo(-t+n-i,-3*t+r-i,a),e.lineTo(t+n+i,-3*t+r-i,a),e.lineTo(t+n+i,-t+r-i,a),e.lineTo(3*t+n+i,-t+r-i,a),e.lineTo(3*t+n+i,t+r+i,a),e.lineTo(t+n+i,t+r+i,a),e.lineTo(t+n+i,3*t+r+i,a),e.lineTo(-t+n-i,3*t+r+i,a),e.lineTo(-t+n-i,t+r+i,a),e.lineTo(-3*t+n-i,t+r+i,a),e.closePath(),!0}(e,t/6,n,r,i,a)}};function ua(e,t,n,r,i){return e.moveTo(n,r-t,i),e.lineTo(t+n,r,i),e.lineTo(n,r+t,i),e.lineTo(n-t,r,i),e.closePath(),!0}var ca=new class extends aa{constructor(){super(...arguments),this.type="diamond",this.pathStr="M-0.5,0L0,-0.5L0.5,0L0,0.5Z"}draw(e,t,n,r,i){return ua(e,t/2,n,r,i)}drawFitDir(e,t,n,r,i){return ua(e,t/2,n,r,i)}drawOffset(e,t,n,r,i,a){return ua(e,t/2+i,n,r,a)}};function da(e,t,n,r){const i=2*t;return e.rect(n-t,r-t,i,i),!1}var ha=new class extends aa{constructor(){super(...arguments),this.type="square",this.pathStr="M-0.5,-0.5h1v1h-1Z"}draw(e,t,n,r){return da(e,t/2,n,r)}drawOffset(e,t,n,r,i){return da(e,t/2+i,n,r)}};class fa extends aa{constructor(){super(...arguments),this.type="triangleUp",this.pathStr="M0.5,0.5 L-0.5,0.5 L0,-0.5 Z"}draw(e,t,n,r){return function(e,t,n,r){return e.moveTo(n+t,t+r),e.lineTo(n-t,t+r),e.lineTo(n,r-t),e.closePath(),!0}(e,t/2,n,r)}drawOffset(e,t,n,r,i){return function(e,t,n,r,i){return e.moveTo(n+t+2*i,t+r+i),e.lineTo(n-t-2*i,t+r+i),e.lineTo(n,r-t-2*i),e.closePath(),!0}(e,t/2,n,r,i)}}var pa=new fa;var ga=new class extends fa{constructor(){super(...arguments),this.type="triangle"}};const ma=Math.sin(Math.PI/10)/Math.sin(7*Math.PI/10),ya=Math.sin(Z/10)*ma,va=-Math.cos(Z/10)*ma;function ba(e,t,n,r){const i=ya*t,a=va*t;e.moveTo(n,-t+r),e.lineTo(i+n,a+r);for(let o=1;o<5;++o){const s=Z*o/5,l=Math.cos(s),u=Math.sin(s);e.lineTo(u*t+n,-l*t+r),e.lineTo(l*i-u*a+n,u*i+l*a+r)}return e.closePath(),!0}var xa=new class extends aa{constructor(){super(...arguments),this.type="star",this.pathStr="M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z"}draw(e,t,n,r){return ba(e,t/2,n,r)}drawOffset(e,t,n,r,i){return ba(e,t/2+i,n,r)}};const Sa=oe(3);function _a(e,t,n,r){const i=t,a=i/Sa,o=a/5,s=t;return e.moveTo(0+n,-i+r),e.lineTo(a/2+n,r),e.lineTo(o/2+n,r),e.lineTo(o/2+n,s+r),e.lineTo(-o/2+n,s+r),e.lineTo(-o/2+n,r),e.lineTo(-a/2+n,r),e.closePath(),!0}var wa=new class extends aa{constructor(){super(...arguments),this.type="arrow",this.pathStr="M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z"}draw(e,t,n,r){return _a(e,t/2,n,r)}drawOffset(e,t,n,r,i){return _a(e,t/2+i,n,r)}};function Aa(e,t,n,r){const i=2*t;return e.moveTo(n,-t+r),e.lineTo(i/3/2+n,t+r),e.lineTo(-i/3/2+n,t+r),e.closePath(),!0}var ka=new class extends aa{constructor(){super(...arguments),this.type="wedge",this.pathStr="M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z"}draw(e,t,n,r){return Aa(e,t/2,n,r)}drawOffset(e,t,n,r,i){return Aa(e,t/2+i,n,r)}};function Ta(e,t,n,r){return e.moveTo(-t+n,r),e.lineTo(n,t+r),!1}var Ba=new class extends aa{constructor(){super(...arguments),this.type="stroke",this.pathStr=""}draw(e,t,n,r){return Ta(e,t/2,n,r)}drawOffset(e,t,n,r,i){return Ta(e,t/2+i,n,r)}};const Ca=-.5,Ea=oe(3)/2,Pa=1/oe(12);function Ra(e,t,n,r){const i=t/2,a=t*Pa,o=i,s=t*Pa+t,l=-o,u=s;return e.moveTo(i+n,a+r),e.lineTo(o+n,s+r),e.lineTo(l+n,u+r),e.lineTo(Ca*i-Ea*a+n,Ea*i+Ca*a+r),e.lineTo(Ca*o-Ea*s+n,Ea*o+Ca*s+r),e.lineTo(Ca*l-Ea*u+n,Ea*l+Ca*u+r),e.lineTo(Ca*i+Ea*a+n,Ca*a-Ea*i+r),e.lineTo(Ca*o+Ea*s+n,Ca*s-Ea*o+r),e.lineTo(Ca*l+Ea*u+n,Ca*u-Ea*l+r),e.closePath(),!1}var Ma=new class extends aa{constructor(){super(...arguments),this.type="wye",this.pathStr="M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z"}draw(e,t,n,r){return Ra(e,t/2,n,r)}drawOffset(e,t,n,r,i){return Ra(e,t/2+i,n,r)}};var La=new class extends aa{constructor(){super(...arguments),this.type="triangleLeft",this.pathStr="M-0.5,0 L0.5,0.5 L0.5,-0.5 Z"}draw(e,t,n,r){return function(e,t,n,r){return e.moveTo(-t+n,r),e.lineTo(t+n,t+r),e.lineTo(t+n,r-t),e.closePath(),!0}(e,t/2,n,r)}drawOffset(e,t,n,r,i){return function(e,t,n,r,i){return e.moveTo(-t+n-2*i,r),e.lineTo(t+n+i,t+r+2*i),e.lineTo(t+n+i,r-t-2*i),e.closePath(),!0}(e,t/2,n,r,i)}};var Oa=new class extends aa{constructor(){super(...arguments),this.type="triangleRight",this.pathStr="M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z"}draw(e,t,n,r){return function(e,t,n,r){return e.moveTo(n-t,t+r),e.lineTo(t+n,r),e.lineTo(n-t,r-t),e.closePath(),!0}(e,t/2,n,r)}drawOffset(e,t,n,r,i){return function(e,t,n,r,i){return e.moveTo(n-t-i,t+r+2*i),e.lineTo(t+n+2*i,r),e.lineTo(n-t-i,r-t-2*i),e.closePath(),!0}(e,t/2,n,r,i)}};var Ia=new class extends aa{constructor(){super(...arguments),this.type="triangleDown",this.pathStr="M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z"}draw(e,t,n,r){return function(e,t,n,r){return e.moveTo(n-t,r-t),e.lineTo(n+t,r-t),e.lineTo(n,r+t),e.closePath(),!0}(e,t/2,n,r)}drawOffset(e,t,n,r,i){return function(e,t,n,r,i){return e.moveTo(n-t-2*i,r-t-i),e.lineTo(n+t+2*i,r-t-i),e.lineTo(n,r+t+2*i),e.closePath(),!0}(e,t/2,n,r,i)}};const Na=oe(3);function Ua(e,t,n,r){const i=t*Na;return e.moveTo(n,r+-i/3*2),e.lineTo(t+n,r+i),e.lineTo(n-t,r+i),e.closePath(),!0}var Da=new class extends fa{constructor(){super(...arguments),this.type="thinTriangle",this.pathStr="M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z"}draw(e,t,n,r){return Ua(e,t/2/Na,n,r)}drawOffset(e,t,n,r,i){return Ua(e,t/2/Na+i,n,r)}};function za(e,t,n,r){const i=2*t;return e.moveTo(t+n,r-i),e.lineTo(n-t,r),e.lineTo(t+n,i+r),!0}var ja=new class extends aa{constructor(){super(...arguments),this.type="arrow2Left",this.pathStr="M 0.25 -0.5 L -0.25 0 l 0.25 0.5"}draw(e,t,n,r){return za(e,t/4,n,r)}drawOffset(e,t,n,r,i){return za(e,t/4+i,n,r)}};function Fa(e,t,n,r){const i=2*t;return e.moveTo(n-t,r-i),e.lineTo(n+t,r),e.lineTo(n-t,i+r),!0}var Wa=new class extends aa{constructor(){super(...arguments),this.type="arrow2Right",this.pathStr="M -0.25 -0.5 l 0.25 0 l -0.25 0.5"}draw(e,t,n,r){return Fa(e,t/4,n,r)}drawOffset(e,t,n,r,i){return Fa(e,t/4+i,n,r)}};function Ha(e,t,n,r){const i=2*t;return e.moveTo(n-i,r+t),e.lineTo(n,r-t),e.lineTo(n+i,r+t),!0}var $a=new class extends aa{constructor(){super(...arguments),this.type="arrow2Up",this.pathStr="M -0.5 0.25 L 0 -0.25 l 0.5 0.25"}draw(e,t,n,r){return Ha(e,t/4,n,r)}drawOffset(e,t,n,r,i){return Ha(e,t/4+i,n,r)}};function Va(e,t,n,r){const i=2*t;return e.moveTo(n-i,r-t),e.lineTo(n,r+t),e.lineTo(n+i,r-t),!0}var Ga=new class extends aa{constructor(){super(...arguments),this.type="arrow2Down",this.pathStr="M -0.5 -0.25 L 0 0.25 l 0.5 -0.25"}draw(e,t,n,r){return Va(e,t/4,n,r)}drawOffset(e,t,n,r,i){return Va(e,t/4+i,n,r)}};function Ya(e,t,n,r,i){return e.moveTo(n,r-t),e.lineTo(n,r+t),!0}var qa=new class extends aa{constructor(){super(...arguments),this.type="lineV",this.pathStr="M0,-0.5L0,0.5"}draw(e,t,n,r,i){return Ya(e,t/2,n,r)}drawOffset(e,t,n,r,i,a){return Ya(e,t/2+i,n,r)}drawToSvgPath(e,t,n,r){const i=e/2;return`M ${t}, ${n-i} L ${t},${n+i}`}};function Qa(e,t,n,r,i){return e.moveTo(n-t,r),e.lineTo(n+t,r),!0}var Xa=new class extends aa{constructor(){super(...arguments),this.type="lineH",this.pathStr="M-0.5,0L0.5,0"}draw(e,t,n,r,i){return Qa(e,t/2,n,r)}drawOffset(e,t,n,r,i,a){return Qa(e,t/2+i,n,r)}drawToSvgPath(e,t,n,r){const i=e/2;return`M ${t-i}, ${n} L ${t+i},${n}`}};function Ka(e,t,n,r,i){return e.moveTo(n-t,r-t),e.lineTo(n+t,r+t),e.moveTo(n+t,r-t),e.lineTo(n-t,r+t),!0}var Za=new class extends aa{constructor(){super(...arguments),this.type="close",this.pathStr="M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5"}draw(e,t,n,r,i){return Ka(e,t/2,n,r)}drawOffset(e,t,n,r,i,a){return Ka(e,t/2+i,n,r)}drawToSvgPath(e,t,n,r){const i=e/2;return`M ${t-i}, ${n-i} L ${t+i},${n+i} M ${t+i}, ${n-i} L ${t-i},${n+i}`}};function Ja(e,t,n,r){return e.rect(n-t[0]/2,r-t[1]/2,t[0],t[1]),!1}function eo(e,t,n,r){const i=t,a=t/2;return e.rect(n-i/2,r-a/2,i,a),!1}var to=new class extends aa{constructor(){super(...arguments),this.type="rect",this.pathStr="M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z"}draw(e,t,n,r){return A(t)?eo(e,t,n,r):Ja(e,t,n,r)}drawOffset(e,t,n,r,i){return A(t)?eo(e,t+2*i,n,r):Ja(e,[t[0]+2*i,t[1]+2*i],n,r)}};const no=new fe;class ro{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.pathStr="",this.type=e,_(t)?this.svgCache=t:this.path=t,this.isSvg=n}drawOffset(e,t,n,r,i,a,o){return this.isSvg?!!this.svgCache&&(this.svgCache.forEach((i=>{e.beginPath(),nn(i.path.commandList,e,n,r,t,t),o&&o(i.path,i.attribute)})),!1):(nn(this.path.commandList,e,n,r,t+i,t+i),!1)}draw(e,t,n,r,i,a){return this.isSvg?!!this.svgCache&&(this.svgCache.forEach((i=>{e.beginPath(),nn(i.path.commandList,e,n,r,t,t),a&&a(i.path,i.attribute)})),!1):(nn(this.path.commandList,e,n,r,t,t),!1)}bounds(e,t){if(this.isSvg){if(!this.svgCache)return;return t.clear(),void this.svgCache.forEach((n=>{let{path:r}=n;no.x1=r.bounds.x1*e,no.y1=r.bounds.y1*e,no.x2=r.bounds.x2*e,no.y2=r.bounds.y2*e,t.union(no)}))}this.path.bounds&&(t.x1=this.path.bounds.x1*e,t.y1=this.path.bounds.y1*e,t.x2=this.path.bounds.x2*e,t.y2=this.path.bounds.y2*e)}}const io={};[sa,la,ca,ha,Da,ga,xa,wa,ka,Ba,Ma,La,Oa,pa,Ia,ja,Wa,$a,Ga,to,qa,Xa,Za].forEach((e=>{io[e.type]=e}));const ao={arrowLeft:"M 0.25 -0.5 L -0.25 0 l 0.5 0.5",arrowRight:"M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5",rectRound:"M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",roundLine:"M 1.2392 -0.258 L -1.3432 -0.258 C -1.4784 -0.258 -1.588 -0.1436 -1.588 -0.002 c 0 0.1416 0.1096 0.256 0.2448 0.256 l 2.5824 0 c 0.1352 0 0.2448 -0.1144 0.2448 -0.256 C 1.484 -0.1436 1.3744 -0.258 1.2392 -0.258 z"},oo=new fe,so=["symbolType","size",...ri];let lo=class e extends ui{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{symbolType:"circle"}),this.type="symbol",this.numberType=Li}getParsedPath(){return this.shouldUpdateShape()&&(this.doUpdateParsedPath(),this.clearUpdateShapeTag()),this._parsedPath}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{size:e}=this.attribute;return _(e)?2===e.length&&e.every(this._validNumber):this._validNumber(e)}doUpdateParsedPath(){const t=wr(this).symbol;let{symbolType:n=t.symbolType}=this.attribute,r=io[n];if(r)return this._parsedPath=r,r;if(r=e.userSymbolMap[n],r)return this._parsedPath=r,r;if(n=ao[n]||n,!0===((i=n).startsWith("<svg")||i.startsWith("<?xml"))){const t=new bi,{svg:r}=t.parse(n);if(!r)return null;const i=_(r.path)?r.path:[r.path];oo.clear();const a=[];i.forEach((e=>{const t=(new On).fromString(e.d),n={};Ui.forEach((t=>{e[t]&&(n[Ni[t]]=e[t])})),a.push({path:t,attribute:n}),oo.union(t.bounds)}));const o=oo.width(),s=oo.height(),l=1/re(o,s);return a.forEach((e=>e.path.transform(0,0,l,l))),this._parsedPath=new ro(n,a,!0),e.userSymbolMap[n]=this._parsedPath,this._parsedPath}var i;const a=(new On).fromString(n),o=a.bounds.width(),s=a.bounds.height(),l=1/re(o,s);return a.transform(0,0,l,l),this._parsedPath=new ro(n,a),e.userSymbolMap[n]=this._parsedPath,this._parsedPath}doUpdateAABBBounds(e){const t=wr(this).symbol;this._AABBBounds.clear();const n=this.attribute,r=ir.graphicService.updateSymbolAABBBounds(n,wr(this).symbol,this._AABBBounds,e,this),{boundsPadding:i=t.boundsPadding}=n,a=jr(i);return a&&r.expand(a),this.clearUpdateBoundTag(),r}tryUpdateOBBBounds(){throw new Error("暂不支持")}getDefaultAttribute(e){return wr(this).symbol[e]}needUpdateTags(e){return super.needUpdateTags(e,so)}needUpdateTag(e){return super.needUpdateTag(e,so)}toCustomPath(){const e=this.getParsedPath(),t=this.attribute.size,n=_(t)?t:[t,t];return e.path?(new On).fromCustomPath2D(e.path,0,0,n[0],n[1]):(new On).fromString(e.pathStr,0,0,n[0],n[1])}clone(){return new e(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return e.NOWORK_ANIMATE_ATTR}};function uo(e){return new lo(e)}lo.userSymbolMap={},lo.NOWORK_ANIMATE_ATTR=Object.assign({symbolType:1},li);const co=["width","x1","y1","height","cornerRadius",...ri];let ho=class e extends ui{constructor(e){super(e),this.type="rect",this.numberType=Ri}isValid(){return super.isValid()&&this._isValid()}_isValid(){return!0}doUpdateAABBBounds(){const e=wr(this).rect;this._AABBBounds.clear();const t=this.attribute,n=ir.graphicService.updateRectAABBBounds(t,wr(this).rect,this._AABBBounds,this),{boundsPadding:r=e.boundsPadding}=t,i=jr(r);return i&&n.expand(i),this.clearUpdateBoundTag(),n}tryUpdateOBBBounds(){throw new Error("暂不支持")}getDefaultAttribute(e){return wr(this).rect[e]}needUpdateTags(e){return super.needUpdateTags(e,co)}needUpdateTag(e){return super.needUpdateTag(e,co)}toCustomPath(){const e=this.attribute,{x:t,y:n,width:r,height:i}=(e=>{if(!e)return{x:0,y:0,width:0,height:0};let t=m(e.width)?e.x1-e.x:e.width,n=m(e.height)?e.y1-e.y:e.height,r=0,i=0;return t<0?(r=t,t=-t):Number.isNaN(t)&&(t=0),n<0?(i=n,n=-n):Number.isNaN(n)&&(n=0),{x:r,y:i,width:t,height:n}})(e),a=new On;return a.moveTo(t,n),a.rect(t,n,r,i),a}clone(){return new e(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return e.NOWORK_ANIMATE_ATTR}};function fo(e){return new ho(e)}ho.NOWORK_ANIMATE_ATTR=li;class po{constructor(e,t,n,r,i,a,o,s,l,u,c,d,h,f){this.left=e,this.top=t,this.width=n,this.height=r,this.actualHeight=0,this.bottom=t+r,this.right=e+n,this.ellipsis=i,this.wordBreak=a,this.verticalDirection=o,this.lines=[],this.globalAlign=s,this.globalBaseline=l,this.layoutDirection=u,this.directionKey=ar[this.layoutDirection],this.isWidthMax=c,this.isHeightMax=d,this.singleLine=h,f?(f.clear(),this.icons=f):this.icons=new Map}draw(e,t){const{width:n,height:r}=this.getActualSize(),i=this.isWidthMax?Math.min(this.width,n):this.width||n||0;let a=this.isHeightMax?Math.min(this.height,r):this.height||r||0;a=Math.min(a,r);let o=0;switch(this.globalBaseline){case"top":o=0;break;case"middle":o=-a/2;break;case"bottom":o=-a}let s=0;"right"===this.globalAlign||"end"===this.globalAlign?s=-i:"center"===this.globalAlign&&(s=-i/2);let l=this[this.directionKey.height];this.singleLine&&(l=this.lines[0].height+1);let u=!1;if("middle"===this.verticalDirection)if(this.actualHeight>=l&&0!==l)for(let n=0;n<this.lines.length;n++){const{top:r,height:i}=this.lines[n];if(r+i<this[this.directionKey.top]||r+i>this[this.directionKey.top]+l)return u;let a=!1;this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+l&&(a=!0,u=!0),this.lines[n].draw(e,a,this.lines[n][this.directionKey.left]+s,this.lines[n][this.directionKey.top]+o,this.ellipsis,t)}else{const n=Math.floor((l-this.actualHeight)/2);"vertical"===this.layoutDirection?s+=n:o+=n;for(let n=0;n<this.lines.length;n++)this.lines[n].draw(e,!1,this.lines[n][this.directionKey.left]+s,this.lines[n][this.directionKey.top]+o,this.ellipsis,t)}else if("bottom"===this.verticalDirection&&"vertical"!==this.layoutDirection)for(let n=0;n<this.lines.length;n++){const{top:r,height:i}=this.lines[n],a=l-this.lines[n].top-this.lines[n].height;if(0===l)this.lines[n].draw(e,!1,s,a+o,this.ellipsis,t);else{if(a+i>this[this.directionKey.top]+l||a<this[this.directionKey.top])return u;{let r=!1;this.ellipsis&&this.lines[n+1]&&a-this.lines[n+1].height<this[this.directionKey.top]&&(r=!0,u=!0),this.lines[n].draw(e,r,s,a+o,this.ellipsis,t)}}}else{"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&this.singleLine&&this.isWidthMax&&(s+=this.lines[0].height+1);for(let n=0;n<this.lines.length;n++){"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&(s-=this.lines[n].height+this.lines[n].top);const{top:r,height:i}=this.lines[n];if(0===l)this.lines[n].draw(e,!1,this.lines[n][this.directionKey.left]+s,this.lines[n][this.directionKey.top]+o,this.ellipsis,t);else{if(r+i<this[this.directionKey.top]||r+i>this[this.directionKey.top]+l)return u;{let r=!1;this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+l&&(r=!0,u=!0),this.lines[n].draw(e,r,this.lines[n][this.directionKey.left]+s,this.lines[n][this.directionKey.top]+o,this.ellipsis,t)}}}}return u}getActualSize(){return this.ellipsis?this.getActualSizeWidthEllipsis():this.getRawActualSize()}getRawActualSize(){let e=0,t=0;for(let n=0;n<this.lines.length;n++){const r=this.lines[n];r.actualWidth>e&&(e=r.actualWidth),t+=r.height}return{width:"vertical"===this.layoutDirection?t:e,height:"vertical"===this.layoutDirection?e:t}}getActualSizeWidthEllipsis(){let e=0,t=0;const{width:n,height:r}=this.getRawActualSize();this.width,this.height;let i=this[this.directionKey.height];if(this.singleLine&&(i=this.lines[0].height+1),"middle"===this.verticalDirection)if(this.actualHeight>=i&&0!==i)for(let n=0;n<this.lines.length;n++){const{top:r,height:a}=this.lines[n];if(r+a<this[this.directionKey.top]||r+a>this[this.directionKey.top]+i);else if(this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+i){const r=!0===this.ellipsis?"...":this.ellipsis||"",i=this.lines[n].getWidthWithEllips(r);i>e&&(e=i),t+=this.lines[n].height}else this.lines[n].actualWidth>e&&(e=this.lines[n].actualWidth),t+=this.lines[n].height}else{Math.floor((i-this.actualHeight)/2);for(let n=0;n<this.lines.length;n++)this.lines[n].actualWidth>e&&(e=this.lines[n].actualWidth),t+=this.lines[n].height}else if("bottom"===this.verticalDirection)for(let n=0;n<this.lines.length;n++){const{top:r,height:a}=this.lines[n],o=i-this.lines[n].top-this.lines[n].height;if(0===i)this.lines[n].actualWidth>e&&(e=this.lines[n].actualWidth),t+=this.lines[n].height;else if(o+a>this[this.directionKey.top]+i||o<this[this.directionKey.top]);else if(this.ellipsis&&this.lines[n+1]&&o-this.lines[n+1].height<this[this.directionKey.top]){const r=!0===this.ellipsis?"...":this.ellipsis||"",i=this.lines[n].getWidthWithEllips(r);i>e&&(e=i),t+=this.lines[n].height}else this.lines[n].actualWidth>e&&(e=this.lines[n].actualWidth),t+=this.lines[n].height}else for(let n=0;n<this.lines.length;n++){const{top:r,height:a}=this.lines[n];if(0===i)this.lines[n].actualWidth>e&&(e=this.lines[n].actualWidth),t+=this.lines[n].height;else if(r+a<this[this.directionKey.top]||r+a>this[this.directionKey.top]+i);else if(this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+i){const r=!0===this.ellipsis?"...":this.ellipsis||"",i=this.lines[n].getWidthWithEllips(r);i>e&&(e=i),t+=this.lines[n].height}else this.lines[n].actualWidth>e&&(e=this.lines[n].actualWidth),t+=this.lines[n].height}return{width:"vertical"===this.layoutDirection?t:e,height:"vertical"===this.layoutDirection?e:t}}}class go{constructor(e,t,n){this.fontSize=n.fontSize||16,this.textBaseline=n.textBaseline||"alphabetic";const r=$r(n.lineHeight,this.fontSize);this.lineHeight="number"==typeof r?r>this.fontSize?r:this.fontSize:Math.floor(1.2*this.fontSize),this.height=this.lineHeight;const{ascent:i,height:a,descent:o,width:s}=hr(e,n);let l=0,u=0,c=0;this.height>a&&(l=(this.height-a)/2,u=Math.ceil(l),c=Math.floor(l)),"top"===this.textBaseline?(this.ascent=l,this.descent=a-l):"bottom"===this.textBaseline?(this.ascent=a-l,this.descent=l):"middle"===this.textBaseline?(this.ascent=this.height/2,this.descent=this.height/2):(this.ascent=i+u,this.descent=o+c),this.length=e.length,this.width=s||0,this.text=e||"",this.newLine=t||!1,this.character=n,this.left=0,this.top=0,this.ellipsis="normal",this.ellipsisWidth=0,this.ellipsisOtherParagraphWidth=0,"vertical"===n.direction&&(this.direction=n.direction,this.widthOrigin=this.width,this.heightOrigin=this.height,this.width=this.heightOrigin,this.height=this.widthOrigin,this.lineHeight=this.height),this.ellipsisStr="..."}updateWidth(){const{width:e}=hr(this.text,this.character);this.width=e,"vertical"===this.direction&&(this.widthOrigin=this.width,this.width=this.heightOrigin,this.height=this.widthOrigin)}draw(e,t,n,r,i){let a=this.text,o=this.left+n;t+=this.top;let s=this.direction;if(this.verticalEllipsis)a=this.ellipsisStr,s="vertical",t-=this.ellipsisWidth/2;else{if("hide"===this.ellipsis)return;if("add"===this.ellipsis)a+=this.ellipsisStr,"right"!==i&&"end"!==i||(o-=this.ellipsisWidth);else if("replace"===this.ellipsis){const e=dr(a,("vertical"===s?this.height:this.width)-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,a.length-1);if(a=a.slice(0,e),a+=this.ellipsisStr,"right"===i||"end"===i){const{width:t}=hr(this.text.slice(e),this.character);"vertical"===s||(o-=this.ellipsisWidth-t)}}}switch(this.character.script){case"super":t-=this.ascent*(1/3);break;case"sub":t+=this.descent/2}"vertical"===s&&(e.save(),e.rotateAbout(Math.PI/2,o,t),e.translate(-this.heightOrigin||-this.lineHeight/2,-this.descent/2),e.translate(o,t),o=0,t=0),this.character.stroke&&(function(e,t){const n=t&&t.stroke||sr;if(!n)return void(e.globalAlpha=0);const{strokeOpacity:r=1,opacity:i=1}=t;e.globalAlpha=r*i,e.lineWidth=t&&"number"==typeof t.lineWidth?t.lineWidth:1,e.strokeStyle=n;let a=t.fontSize||16;switch(t.script){case"super":case"sub":a*=.8}e.setTextStyle({textAlign:"left",textBaseline:t.textBaseline||"alphabetic",fontStyle:t.fontStyle||"",fontWeight:t.fontWeight||"",fontSize:a,fontFamily:t.fontFamily||"sans-serif"})}(e,this.character),e.strokeText(a,o,t)),function(e,t){const n=t&&t.fill||or;if(!n)return void(e.globalAlpha=0);const{fillOpacity:r=1,opacity:i=1}=t;e.globalAlpha=r*i,e.fillStyle=n;let a=t.fontSize||16;switch(t.script){case"super":case"sub":a*=.8}e.setTextStyle({textAlign:"left",textBaseline:t.textBaseline||"alphabetic",fontStyle:t.fontStyle||"",fontWeight:t.fontWeight||"",fontSize:a,fontFamily:t.fontFamily||"sans-serif"})}(e,this.character),this.character.fill&&e.fillText(a,o,t),this.character.fill&&("boolean"==typeof this.character.lineThrough||"boolean"==typeof this.character.underline?(this.character.underline&&e.fillRect(o,1+t,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1),this.character.lineThrough&&e.fillRect(o,1+t-this.ascent/2,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)):"underline"===this.character.textDecoration?e.fillRect(o,1+t,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1):"line-through"===this.character.textDecoration&&e.fillRect(o,1+t-this.ascent/2,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)),"vertical"===s&&e.restore()}getWidthWithEllips(e){let t=this.text;const n="vertical"===e?this.height:this.width;if("hide"===this.ellipsis)return n;if("add"===this.ellipsis)return n+this.ellipsisWidth;if("replace"===this.ellipsis){const e=dr(t,n-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,t.length-1);t=t.slice(0,e),t+=this.ellipsisStr;const{width:r}=hr(this.text.slice(e),this.character);return n+this.ellipsisWidth-r}return n}}const mo=["width","height","image",...ri];let yo=class e extends ui{constructor(e){super(e),this.type="image",this.numberType=Pi,this.loadImage(this.attribute.image)}get width(){var e;return null!==(e=this.attribute.width)&&void 0!==e?e:0}set width(e){this.attribute.width===e&&(this.attribute.width=e,this.addUpdateShapeAndBoundsTag())}get height(){var e;return null!==(e=this.attribute.height)&&void 0!==e?e:0}set height(e){this.attribute.height===e&&(this.attribute.height=e,this.addUpdateShapeAndBoundsTag())}get repeatX(){var e;return null!==(e=this.attribute.repeatX)&&void 0!==e?e:"no-repeat"}set repeatX(e){this.attribute.repeatX===e&&(this.attribute.repeatX=e)}get repeatY(){var e;return null!==(e=this.attribute.repeatY)&&void 0!==e?e:"no-repeat"}set repeatY(e){this.attribute.repeatY===e&&(this.attribute.repeatY=e)}get image(){return this.attribute.image}set image(e){e!==this.attribute.image&&(this.attribute.image=e,this.loadImage(this.attribute.image))}imageLoadSuccess(e,t,n){super.imageLoadSuccess(e,t,(()=>{this.successCallback&&this.successCallback()}))}imageLoadFail(e,t){super.imageLoadFail(e,(()=>{this.failCallback&&this.failCallback()}))}setAttributes(e,t,n){return e.image&&this.loadImage(e.image),super.setAttributes(e,t,n)}setAttribute(e,t,n,r){return"image"===e&&this.loadImage(t),super.setAttribute(e,t,n,r)}doUpdateAABBBounds(){const e=wr(this).image;this._AABBBounds.clear();const t=this.attribute,n=ir.graphicService.updateImageAABBBounds(t,wr(this).image,this._AABBBounds,this),{boundsPadding:r=e.boundsPadding}=t,i=jr(r);return i&&n.expand(i),this.clearUpdateBoundTag(),n}tryUpdateOBBBounds(){throw new Error("暂不支持")}getDefaultAttribute(e){return nr[e]}needUpdateTags(e){return super.needUpdateTags(e,mo)}needUpdateTag(e){return super.needUpdateTag(e,mo)}clone(){return new e(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return e.NOWORK_ANIMATE_ATTR}};function vo(e){return new yo(e)}yo.NOWORK_ANIMATE_ATTR=Object.assign({image:1,repeatX:1,repeatY:1},li);class bo extends yo{constructor(e){if(super(e),this._x=0,this._y=0,this._hovered=!1,this._marginArray=[0,0,0,0],"always"===e.backgroundShowMode&&(this._hovered=!0),e.margin){const t=jr(e.margin);this._marginArray="number"==typeof t?[t,t,t,t]:t}this.onBeforeAttributeUpdate=(e,t,n)=>{if(_(n)&&-1!==n.indexOf("margin")||"margin"===n)if(t.margin){const e=jr(t.margin);this._marginArray="number"==typeof e?[e,e,e,e]:e}else this._marginArray=[0,0,0,0]}}get width(){var e;return(null!==(e=this.attribute.width)&&void 0!==e?e:0)+this._marginArray[1]+this._marginArray[3]}get height(){var e;return(null!==(e=this.attribute.height)&&void 0!==e?e:0)+this._marginArray[0]+this._marginArray[2]}tryUpdateAABBBounds(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;this.doUpdateAABBBounds();const{width:e=nr.width,height:t=nr.height}=this.attribute,{backgroundWidth:n=e,backgroundHeight:r=t}=this.attribute,i=(n-e)/2,a=(r-t)/2;return this._AABBBounds.expand([0,2*i,2*a,0]),this._AABBBounds}setHoverState(e){"hover"===this.attribute.backgroundShowMode&&this._hovered!==e&&(this._hovered=e)}}class xo{constructor(e){this.frame=e,this.width=this.frame.width,this.height=this.frame.height,this.lineWidth=0,this.y=this.frame.top,this.maxAscent=0,this.maxDescent=0,this.maxAscentForBlank=0,this.maxDescentForBlank=0,this.lineBuffer=[],this.direction=e.layoutDirection,this.directionKey=ar[this.direction]}store(e){if(e instanceof bo){this.frame.icons.set(e.richtextId,e),this.lineBuffer.push(e),this.lineWidth+=e[this.directionKey.width];let t=0,n=0;"top"===e.attribute.textBaseline?(t=0,n=e.height):"bottom"===e.attribute.textBaseline?(t=e.height,n=0):(t=e.height/2,n=e.height/2),this.maxAscent=Math.max(this.maxAscent,t),this.maxDescent=Math.max(this.maxDescent,n)}else this.lineBuffer.push(e),0!==e.text.length?(this.lineWidth+=e[this.directionKey.width],this.maxAscent=Math.max(this.maxAscent,e.ascent),this.maxDescent=Math.max(this.maxDescent,e.descent)):(this.maxAscentForBlank=Math.max(this.maxAscentForBlank,e.ascent),this.maxDescentForBlank=Math.max(this.maxDescentForBlank,e.descent))}send(){if(0===this.lineBuffer.length)return;const e=0===this.maxAscent?this.maxAscentForBlank:this.maxAscent,t=0===this.maxDescent?this.maxDescentForBlank:this.maxDescent,n=new class{constructor(e,t,n,r,i,a,o,s){this.left=e,this.width=t,this.baseline=n,this.ascent=r,this.descent=i,this.top=n-r,this.paragraphs=a.map((e=>e)),this.textAlign=(this.paragraphs[0]instanceof bo?this.paragraphs[0].attribute.textAlign:this.paragraphs[0].character.textAlign)||"left",this.direction=o,this.directionKey=ar[this.direction],this.actualWidth=0;let l=0;this.paragraphs.forEach(((e,t)=>{if(0===t&&e instanceof go){const t=cr.exec(e.text);0!==(null==t?void 0:t.index)&&(e.text=e.text.slice(null==t?void 0:t.index),e.updateWidth())}this.actualWidth+=e[this.directionKey.width],l=Math.max(e[this.directionKey.height],l)})),this.height=l,this.blankWidth=s?0:this.width-this.actualWidth,this.calcOffset(t,s)}calcOffset(e,t){const n=this.directionKey,r=this.height;let i=this.left,a=0;this.actualWidth<e&&!t&&("right"===this.textAlign||"end"===this.textAlign?i=e-this.actualWidth:"center"===this.textAlign?i=(e-this.actualWidth)/2:"justify"===this.textAlign&&(this.paragraphs.length<2?i=(e-this.actualWidth)/2:a=(e-this.actualWidth)/(this.paragraphs.length-1))),this.paragraphs.map((function(e){e instanceof bo?(e["_"+n.x]=i,i+=e[n.width]+a,e["_"+n.y]="top"===e.attribute.textBaseline?0:"bottom"===e.attribute.textBaseline?r-e.height:(r-e.height)/2):(e[n.left]=i,i+=e[n.width]+a)}))}draw(e,t,n,r,i,a){if(i&&(t||this.paragraphs.some((e=>e.overflow)))){let e=0;for(let n=this.paragraphs.length-1;n>=0;n--){const r=this.paragraphs[n];if(r.overflow)continue;if(r instanceof bo)break;if("vertical"===this.direction&&"vertical"!==r.direction){r.verticalEllipsis=!0;break}const a=!0===i?"...":i||"";r.ellipsisStr=a;const{width:o}=hr(a,r.character),s=o||0;if(s<=this.blankWidth+e){t&&(r.ellipsis="add");break}if(s<=this.blankWidth+e+r.width){r.ellipsis="replace",r.ellipsisWidth=s,r.ellipsisOtherParagraphWidth=this.blankWidth+e;break}r.ellipsis="hide",e+=r.width}}this.paragraphs.map(((t,i)=>{if(t instanceof bo)return t.setAttributes({x:n+t._x,y:r+t._y}),void a(t,e,n+t._x,r+t._y,this.ascent);t.draw(e,r+this.ascent,n,0===i,this.textAlign)}))}getWidthWithEllips(e){let t=0;for(let n=this.paragraphs.length-1;n>=0;n--){const r=this.paragraphs[n];if(r instanceof bo)break;const{width:i}=hr(e,r.character),a=i||0;if(a<=this.blankWidth+t){r.ellipsis="add",r.ellipsisWidth=a;break}if(a<=this.blankWidth+t+r.width){r.ellipsis="replace",r.ellipsisWidth=a,r.ellipsisOtherParagraphWidth=this.blankWidth+t;break}r.ellipsis="hide",t+=r.width}let n=0;return this.paragraphs.map(((e,t)=>{n+=e instanceof bo?e.width:e.getWidthWithEllips(this.direction)})),n}}(this.frame.left,this[this.directionKey.width],this.y+e,e,t,this.lineBuffer,this.direction,"horizontal"===this.direction?this.frame.isWidthMax:this.frame.isHeightMax);this.frame.lines.push(n),this.frame.actualHeight+=n.height,this.y+=n.height,this.lineBuffer.length=0,this.lineWidth=this.maxAscent=this.maxDescent=this.maxAscentForBlank=this.maxDescentForBlank=0}deal(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e instanceof bo?"horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+e[this.directionKey.width]<=this[this.directionKey.width]?this.store(e):0===this.lineBuffer.length?(this.store(e),this.send()):(this.send(),this.deal(e)):"number"!=typeof this.width||this.width<0||(e.newLine&&this.send(),0!==e.text.length&&("horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+e[this.directionKey.width]<=this[this.directionKey.width]?this.store(e):this.lineWidth===this[this.directionKey.width]?(this.send(),this.deal(e)):this.cut(e,t)))}cut(e,t){const n=this[this.directionKey.width]-this.lineWidth||0,r=Math.ceil(n/e[this.directionKey.width]*e.length)||0,i=dr(e.text,n,e.character,r,"break-word"===this.frame.wordBreak);if(0!==i){const[n,r]=function(e,t){const n=e.text.slice(0,t),r=e.text.slice(t);return[new go(n,e.newLine,e.character),new go(r,!0,e.character)]}(e,i);this.store(n),t?this.send():this.deal(r)}else 0!==this.lineBuffer.length&&(this.send(),this.deal(e))}}const So=["width","height","ellipsis","wordBreak","verticalDirection","maxHeight","maxWidth","textAlign","textBaseline","textConfig","layoutDirection","fill","stroke","fontSize",...ri];let _o=class e extends ui{constructor(e){super(e),this.type="richtext",this._currentHoverIcon=null,this.numberType=Mi}get width(){var e;return null!==(e=this.attribute.width)&&void 0!==e?e:tr.width}set width(e){this.attribute.width!==e&&(this.attribute.width=e,this.addUpdateShapeAndBoundsTag())}get height(){var e;return null!==(e=this.attribute.height)&&void 0!==e?e:tr.height}set height(e){this.attribute.height!==e&&(this.attribute.height=e,this.addUpdateShapeAndBoundsTag())}get maxWidth(){return this.attribute.maxWidth}set maxWidth(e){this.attribute.maxWidth!==e&&(this.attribute.maxWidth=e,this.addUpdateShapeAndBoundsTag())}get maxHeight(){return this.attribute.maxHeight}set maxHeight(e){this.attribute.maxHeight!==e&&(this.attribute.maxHeight=e,this.addUpdateShapeAndBoundsTag())}get ellipsis(){var e;return null!==(e=this.attribute.ellipsis)&&void 0!==e?e:tr.ellipsis}set ellipsis(e){this.attribute.ellipsis!==e&&(this.attribute.ellipsis=e,this.addUpdateShapeAndBoundsTag())}get wordBreak(){var e;return null!==(e=this.attribute.wordBreak)&&void 0!==e?e:tr.wordBreak}set wordBreak(e){this.attribute.wordBreak!==e&&(this.attribute.wordBreak=e,this.addUpdateShapeAndBoundsTag())}get verticalDirection(){var e;return null!==(e=this.attribute.verticalDirection)&&void 0!==e?e:tr.verticalDirection}set verticalDirection(e){this.attribute.verticalDirection!==e&&(this.attribute.verticalDirection=e,this.addUpdateShapeAndBoundsTag())}get textAlign(){var e;return null!==(e=this.attribute.textAlign)&&void 0!==e?e:tr.textAlign}set textAlign(e){this.attribute.textAlign!==e&&(this.attribute.textAlign=e,this.addUpdateShapeAndBoundsTag())}get textBaseline(){var e;return null!==(e=this.attribute.textBaseline)&&void 0!==e?e:tr.textBaseline}set textBaseline(e){this.attribute.textBaseline!==e&&(this.attribute.textBaseline=e,this.addUpdateShapeAndBoundsTag())}get textConfig(){var e;return null!==(e=this.attribute.textConfig)&&void 0!==e?e:tr.textConfig}set textConfig(e){this.attribute.textConfig=e,this.addUpdateShapeAndBoundsTag()}doUpdateAABBBounds(){const e=wr(this).richtext;this._AABBBounds.clear();const t=this.attribute,n=ir.graphicService.updateRichTextAABBBounds(t,wr(this).richtext,this._AABBBounds,this),{boundsPadding:r=e.boundsPadding}=t,i=jr(r);return i&&n.expand(i),this.clearUpdateBoundTag(),n}tryUpdateOBBBounds(){throw new Error("暂不支持")}getDefaultAttribute(e){return tr[e]}needUpdateTags(e){return super.needUpdateTags(e,So)}needUpdateTag(e){return super.needUpdateTag(e,So)}getFrameCache(){return this.shouldUpdateShape()&&(this.doUpdateFrameCache(),this.clearUpdateShapeTag()),this._frameCache}combinedStyleToCharacter(e){const{fill:t,stroke:n,fontSize:r,fontFamily:i,fontStyle:a,fontWeight:o,lineWidth:s,opacity:l,fillOpacity:u,strokeOpacity:c}=this.attribute;return Object.assign({fill:t,stroke:n,fontSize:r,fontFamily:i,fontStyle:a,fontWeight:o,lineWidth:s,opacity:l,fillOpacity:u,strokeOpacity:c},e)}doUpdateFrameCache(e){var t;const{textConfig:n=[],maxWidth:r,maxHeight:i,width:a,height:o,ellipsis:s,wordBreak:l,verticalDirection:u,textAlign:c,textBaseline:d,layoutDirection:h,singleLine:f,disableAutoWrapLine:p}=this.attribute,g=[],m=null!=e?e:n;for(let e=0;e<m.length;e++)if("image"in m[e]){const t=this.combinedStyleToCharacter(m[e]),n=t.id&&this._frameCache&&this._frameCache.icons&&this._frameCache.icons.get(t.id);if(n)g.push(n);else{const e=new bo(t);e.successCallback=()=>{var e;this.addUpdateBoundTag(),null===(e=this.stage)||void 0===e||e.renderNextFrame()},e.richtextId=t.id,g.push(e)}}else{const t=this.combinedStyleToCharacter(m[e]);if(A(t.text)&&(t.text=`${t.text}`),t.text&&t.text.includes("\n")){const e=t.text.split("\n");for(let n=0;n<e.length;n++)g.push(new go(e[n],0!==n,t))}else t.text&&g.push(new go(t.text,!1,t))}const y="number"==typeof r&&Number.isFinite(r)&&r>0,v="number"==typeof i&&Number.isFinite(i)&&i>0,b="number"==typeof a&&Number.isFinite(a)&&a>0&&(!y||a<=r),x="number"==typeof o&&Number.isFinite(o)&&o>0&&(!v||o<=i),S=new po(0,0,(b?a:y?r:0)||0,(x?o:v?i:0)||0,s,l,u,c,d,h||"horizontal",!b&&y,!x&&v,f||!1,null===(t=this._frameCache)||void 0===t?void 0:t.icons),_=new xo(S);if(p){let e=0,t=!1;for(let n=0;n<g.length;n++){const r=g[n];t?(r.overflow=!0,r.left=1/0,r.top=1/0,!r.newLine&&S.lines[S.lines.length-1].paragraphs.push(r)):_.deal(r,!0),S.lines.length!==e&&(e=S.lines.length,_.lineBuffer.length=0,r.overflow=!0,r.left=1e3,r.top=1e3,S.lines[S.lines.length-1].paragraphs.push(r),t=!0),r.newLine&&(t=!1,_.lineWidth=0),_.send()}}else for(let e=0;e<g.length;e++)_.deal(g[e]);if(_.send(),!("horizontal"===S.layoutDirection?b:x)){const e=S.getActualSizeWidthEllipsis();let t="horizontal"===S.layoutDirection?e.width:e.height;("horizontal"===S.layoutDirection?y:v)&&(t=Math.min(t,"horizontal"===S.layoutDirection?r:i)),S.lines.forEach((function(e){e.calcOffset(t,!1)}))}this._frameCache=S}clone(){return new e(Object.assign({},this.attribute))}setStage(e,t){super.setStage(e,t),this.getFrameCache().icons.forEach((n=>{n.setStage(e,t)}))}bindIconEvent(){this.addEventListener("pointermove",(e=>{var t,n,r,i,a;const o=this.pickIcon(e.global);o&&o===this._currentHoverIcon||(o?(null===(t=this._currentHoverIcon)||void 0===t||t.setHoverState(!1),this._currentHoverIcon=o,this._currentHoverIcon.setHoverState(!0),null===(n=this.stage)||void 0===n||n.setCursor(o.attribute.cursor),null===(r=this.stage)||void 0===r||r.renderNextFrame()):!o&&this._currentHoverIcon&&(this._currentHoverIcon.setHoverState(!1),this._currentHoverIcon=null,null===(i=this.stage)||void 0===i||i.setCursor(),null===(a=this.stage)||void 0===a||a.renderNextFrame()))})),this.addEventListener("pointerleave",(e=>{var t,n;this._currentHoverIcon&&(this._currentHoverIcon.setHoverState(!1),this._currentHoverIcon=null,null===(t=this.stage)||void 0===t||t.setCursor(),null===(n=this.stage)||void 0===n||n.renderNextFrame())}))}pickIcon(e){const t=this.getFrameCache(),{e:n,f:r}=this.globalTransMatrix;let i;return t.icons.forEach((t=>{var a,o;const s=t.AABBBounds.clone();s.translate(t._marginArray[3],t._marginArray[0]),s.containsPoint({x:e.x-n,y:e.y-r})&&(i=t,i.globalX=(null!==(a=i.attribute.x)&&void 0!==a?a:0)+n+t._marginArray[3],i.globalY=(null!==(o=i.attribute.y)&&void 0!==o?o:0)+r+t._marginArray[0])})),i}getNoWorkAnimateAttr(){return e.NOWORK_ANIMATE_ATTR}};function wo(e){return new _o(e)}_o.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,verticalDirection:1,textAlign:1,textBaseline:1,textConfig:1,layoutDirection:1},li);const Ao=["innerRadius","outerRadius","startAngle","endAngle","cornerRadius","padAngle","padRadius","cap",...ri];let ko=class e extends ui{constructor(e){super(e),this.type="arc",this.numberType=Ci}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{startAngle:e,endAngle:t,outerRadius:n,innerRadius:r}=this.attribute;return this._validNumber(e)&&this._validNumber(t)&&this._validNumber(n)&&this._validNumber(r)}getParsedCornerRadius(){const e=wr(this).arc,{cornerRadius:t=e.cornerRadius,innerPadding:n=e.innerPadding,outerPadding:r=e.outerPadding}=this.attribute;let{outerRadius:i=e.outerRadius,innerRadius:a=e.innerRadius}=this.attribute;if(i+=r,a-=n,0===t||"0%"===t)return 0;const o=Math.abs(i-a),s=e=>Math.min(A(e,!0)?e:o*parseFloat(e)/100,o/2);if(_(t)){const e=t.map((e=>s(e)||0));return 0===e.length?[e[0],e[0],e[0],e[0]]:2===e.length?[e[0],e[1],e[0],e[1]]:(3===e.length&&e.push(0),e)}return s(t)}getParsedAngle(){const e=wr(this).arc;let{startAngle:t=e.startAngle,endAngle:n=e.endAngle}=this.attribute;const{cap:r=e.cap}=this.attribute,i=n-t>=0?1:-1,a=n-t;if(t=pe(t),n=t+a,r&&ee(a)<J-Q){let a=1,o=1;r.length&&(a=Number(r[0]),o=Number(r[1]));let{outerRadius:s=e.outerRadius,innerRadius:l=e.innerRadius}=this.attribute;const{outerPadding:u=e.outerPadding,innerPadding:c=e.innerPadding}=this.attribute;s+=u,l-=c;const d=Math.abs(s-l)/2,h=d/s;if(d>Q&&s>Q)return{startAngle:t-i*h*a,endAngle:n+i*h*o,sc:i*h*a,ec:i*h*o}}return{startAngle:t,endAngle:n}}getParsePadAngle(e,t){const n=wr(this).arc,{innerPadding:r=n.innerPadding,outerPadding:i=n.outerPadding,padAngle:a=n.padAngle}=this.attribute;let{outerRadius:o=n.outerRadius,innerRadius:s=n.innerRadius}=this.attribute;o+=i,s-=r;const{padRadius:l=oe(o*o+s*s)}=this.attribute,u=ee(t-e);let c=e,d=t,h=e,f=t;const p=a/2;let g=u,m=u;if(p>Q&&l>Q){const n=t>e?1:-1;let r=le(Number(l)/s*ae(p)),i=le(Number(l)/o*ae(p));return(g-=2*r)>Q?(r*=n,h+=r,f-=r):(g=0,h=f=(e+t)/2),(m-=2*i)>Q?(i*=n,c+=i,d-=i):(m=0,c=d=(e+t)/2),{outerStartAngle:c,outerEndAngle:d,innerStartAngle:h,innerEndAngle:f,innerDeltaAngle:g,outerDeltaAngle:m}}return{outerStartAngle:c,outerEndAngle:d,innerStartAngle:h,innerEndAngle:f,innerDeltaAngle:g,outerDeltaAngle:m}}doUpdateAABBBounds(e){const t=wr(this).arc;this._AABBBounds.clear();const n=this.attribute,r=ir.graphicService.updateArcAABBBounds(n,wr(this).arc,this._AABBBounds,e,this),{boundsPadding:i=t.boundsPadding}=n,a=jr(i);return a&&r.expand(a),this.clearUpdateBoundTag(),r}tryUpdateOBBBounds(){throw new Error("暂不支持")}needUpdateTags(e){return super.needUpdateTags(e,Ao)}needUpdateTag(e){return super.needUpdateTag(e,Ao)}getDefaultAttribute(e){return wr(this).arc[e]}toCustomPath(){const e=this.attribute,{startAngle:t,endAngle:n}=this.getParsedAngle();let r=e.innerRadius-(e.innerPadding||0),i=e.outerRadius-(e.outerPadding||0);const a=ee(n-t),o=n>t;if(i<r){const e=i;i=r,r=e}const s=new On;if(i<=Q)s.moveTo(0,0);else if(a>=J-Q)s.moveTo(0+i*ne(t),0+i*ae(t)),s.arc(0,0,i,t,n,!o),r>Q&&(s.moveTo(0+r*ne(n),0+r*ae(n)),s.arc(0,0,r,n,t,o));else{const e=i*ne(t),a=i*ae(t),l=r*ne(n),u=r*ae(n);s.moveTo(0+e,0+a),s.arc(0,0,i,t,n,!o),s.lineTo(0+l,0+u),s.arc(0,0,r,n,t,o),s.closePath()}return s}clone(){return new e(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return e.NOWORK_ANIMATE_ATTR}};ko.NOWORK_ANIMATE_ATTR=Object.assign({cap:1},li);class To{updateBounds(e,t,n,r){const{outerBorder:i,shadowBlur:a=t.shadowBlur}=e;if(i){const e=t.outerBorder,{distance:r=e.distance,lineWidth:o=e.lineWidth}=i;n.expand(r+(a+o)/2)}return n}}class Bo extends To{updateBounds(e,t,n,r){const{outerBorder:i,shadowBlur:a=t.shadowBlur,strokeBoundsBuffer:o=t.strokeBoundsBuffer}=e;if(i){const e=t.outerBorder,{distance:r=e.distance,lineWidth:s=e.lineWidth}=i;xi(n,r+(a+s)/2,!0,o)}return n}}class Co{constructor(){this.pools=[]}static identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}allocate(){if(!this.pools.length)return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];const e=this.pools.pop();return Co.identity(e),e}allocateByObj(e){let t;t=this.pools.length?this.pools.pop():[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];for(let n=0;n<t.length;n++)t[n]=e[n];return t}free(e){e&&this.pools.push(e)}get length(){return this.pools.length}release(){this.pools=[]}}const Eo=new class{constructor(){this.pools=[]}allocate(e,t,n,r,i,a){if(!this.pools.length)return new ge(e,t,n,r,i,a);const o=this.pools.pop();return o.a=e,o.b=t,o.c=n,o.d=r,o.e=i,o.f=a,o}allocateByObj(e){if(!this.pools.length)return new ge(e.a,e.b,e.c,e.d,e.e,e.f);const t=this.pools.pop();return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t}free(e){this.pools.push(e)}get length(){return this.pools.length}release(){this.pools=[]}},Po=new Co;var Ro=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Mo=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Lo=function(e,t){return function(n,r){t(n,r,e)}};function Oo(e,t,n){const r=n[0],i=n[1],a=n[2];let o,s,l,u,c,d,h,f,p,g,m,y;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*a+t[12],e[13]=t[1]*r+t[5]*i+t[9]*a+t[13],e[14]=t[2]*r+t[6]*i+t[10]*a+t[14],e[15]=t[3]*r+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],d=t[5],h=t[6],f=t[7],p=t[8],g=t[9],m=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=d,e[6]=h,e[7]=f,e[8]=p,e[9]=g,e[10]=m,e[11]=y,e[12]=o*r+c*i+p*a+t[12],e[13]=s*r+d*i+g*a+t[13],e[14]=l*r+h*i+m*a+t[14],e[15]=u*r+f*i+y*a+t[15]),e}function Io(e,t,n){const r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=t[9],f=t[10],p=t[11],g=t[12],m=t[13],y=t[14],v=t[15];let b=n[0],x=n[1],S=n[2],_=n[3];return e[0]=b*r+x*s+S*d+_*g,e[1]=b*i+x*l+S*h+_*m,e[2]=b*a+x*u+S*f+_*y,e[3]=b*o+x*c+S*p+_*v,b=n[4],x=n[5],S=n[6],_=n[7],e[4]=b*r+x*s+S*d+_*g,e[5]=b*i+x*l+S*h+_*m,e[6]=b*a+x*u+S*f+_*y,e[7]=b*o+x*c+S*p+_*v,b=n[8],x=n[9],S=n[10],_=n[11],e[8]=b*r+x*s+S*d+_*g,e[9]=b*i+x*l+S*h+_*m,e[10]=b*a+x*u+S*f+_*y,e[11]=b*o+x*c+S*p+_*v,b=n[12],x=n[13],S=n[14],_=n[15],e[12]=b*r+x*s+S*d+_*g,e[13]=b*i+x*l+S*h+_*m,e[14]=b*a+x*u+S*f+_*y,e[15]=b*o+x*c+S*p+_*v,e}function No(e,t,n){var r;const{x:i=n.x,y:a=n.y,z:o=n.z,dx:s=n.dx,dy:l=n.dy,dz:u=n.dz,scaleX:c=n.scaleX,scaleY:d=n.scaleY,scaleZ:h=n.scaleZ,alpha:f=n.alpha,beta:p=n.beta,angle:g=n.angle,anchor3d:m=t.attribute.anchor,anchor:y}=t.attribute,v=[0,0,0];if(m){if("string"==typeof m[0]){const e=parseFloat(m[0])/100,n=t.AABBBounds;v[0]=n.x1+(n.x2-n.x1)*e}else v[0]=m[0];if("string"==typeof m[1]){const e=parseFloat(m[1])/100,n=t.AABBBounds;v[1]=n.x1+(n.x2-n.x1)*e}else v[1]=m[1];v[2]=null!==(r=m[2])&&void 0!==r?r:0}if(function(e){e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1}(e),Oo(e,e,[i+s,a+l,o+u]),Oo(e,e,[v[0],v[1],v[2]]),function(e,t,n){const r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],d=t[10],h=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*r,e[5]=o*i+c*r,e[6]=s*i+d*r,e[7]=l*i+h*r,e[8]=u*i-a*r,e[9]=c*i-o*r,e[10]=d*i-s*r,e[11]=h*i-l*r}(e,e,p),function(e,t,n){const r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],d=t[10],h=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*r,e[1]=o*i-c*r,e[2]=s*i-d*r,e[3]=l*i-h*r,e[8]=a*r+u*i,e[9]=o*r+c*i,e[10]=s*r+d*i,e[11]=l*r+h*i}(e,e,f),Oo(e,e,[-v[0],-v[1],v[2]]),function(e,t,n){const r=n[0],i=n[1],a=n[2];e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]}(e,e,[c,d,h]),g){const n=Po.allocate(),r=[0,0];if(y){if("string"==typeof m[0]){const e=parseFloat(m[0])/100,n=t.AABBBounds;r[0]=n.x1+(n.x2-n.x1)*e}else r[0]=m[0];if("string"==typeof m[1]){const e=parseFloat(m[1])/100,n=t.AABBBounds;r[1]=n.x1+(n.x2-n.x1)*e}else r[1]=m[1]}Oo(n,n,[r[0],r[1],0]),function(e,t,n){const r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],d=t[6],h=t[7];t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*r,e[1]=o*i+c*r,e[2]=s*i+d*r,e[3]=l*i+h*r,e[4]=u*i-a*r,e[5]=c*i-o*r,e[6]=d*i-s*r,e[7]=h*i-l*r}(n,n,g),Oo(n,n,[-r[0],-r[1],0]),Io(e,e,n)}}let Uo=class{constructor(e){this.creator=e,this.hooks={onAttributeUpdate:new St(["graphic"]),onSetStage:new St(["graphic","stage"]),onRemove:new St(["graphic"]),onRelease:new St(["graphic"]),onAddIncremental:new St(["graphic","group","stage"]),onClearIncremental:new St(["graphic","group","stage"]),beforeUpdateAABBBounds:new St(["graphic","stage","willUpdate","aabbBounds"]),afterUpdateAABBBounds:new St(["graphic","stage","aabbBounds","globalAABBBounds","selfChange"])},this.tempAABBBounds1=new fe,this.tempAABBBounds2=new fe,this._rectBoundsContribitions=[new To],this._symbolBoundsContribitions=[new Bo],this._imageBoundsContribitions=[new To],this._circleBoundsContribitions=[new To],this._arcBoundsContribitions=[new To],this._pathBoundsContribitions=[new To]}onAttributeUpdate(e){this.hooks.onAttributeUpdate.taps.length&&this.hooks.onAttributeUpdate.call(e)}onSetStage(e,t){this.hooks.onSetStage.taps.length&&this.hooks.onSetStage.call(e,t)}onRemove(e){this.hooks.onRemove.taps.length&&this.hooks.onRemove.call(e)}onRelease(e){this.hooks.onRelease.taps.length&&this.hooks.onRelease.call(e)}onAddIncremental(e,t,n){this.hooks.onAddIncremental.taps.length&&this.hooks.onAddIncremental.call(e,t,n)}onClearIncremental(e,t){this.hooks.onClearIncremental.taps.length&&this.hooks.onClearIncremental.call(e,t)}beforeUpdateAABBBounds(e,t,n,r){this.hooks.beforeUpdateAABBBounds.taps.length&&this.hooks.beforeUpdateAABBBounds.call(e,t,n,r)}afterUpdateAABBBounds(e,t,n,r,i){this.hooks.afterUpdateAABBBounds.taps.length&&this.hooks.afterUpdateAABBBounds.call(e,t,n,r,i)}updatePathProxyAABBBounds(e,t){const n="function"==typeof t.pathProxy?t.pathProxy(t.attribute):t.pathProxy;if(!n)return!1;const r=new At(e);return nn(n.commandList,r,0,0),!0}updateRectAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;if(!this.updatePathProxyAABBBounds(n,r)){let{width:t,height:r}=e;const{x1:i,y1:a,x:o,y:s}=e;t=null!=t?t:i-o,r=null!=r?r:a-s,(isFinite(t)||isFinite(r)||isFinite(o)||isFinite(s))&&n.set(0,0,t||0,r||0)}const i=this.tempAABBBounds1,a=this.tempAABBBounds2;return i.setValue(n.x1,n.y1,n.x2,n.y2),a.setValue(n.x1,n.y1,n.x2,n.y2),this._rectBoundsContribitions.length&&this._rectBoundsContribitions.forEach((o=>{o.updateBounds(e,t,i,r),n.union(i),i.setValue(a.x1,a.y1,a.x2,a.y2)})),this.transformAABBBounds(e,n,t,!1,r),n}updateGroupAABBBounds(e,t,n,r){const i=n;n=n.clone();const{width:a,height:o,path:s,clip:l=t.clip,display:u}=e;s&&s.length?s.forEach((e=>{n.union(e.AABBBounds)})):null!=a&&null!=o&&n.set(0,0,Math.max(0,a),Math.max(0,o)),l||r.forEachChildren((e=>{n.union(e.AABBBounds)}));const c=this.tempAABBBounds1,d=this.tempAABBBounds2;return c.setValue(n.x1,n.y1,n.x2,n.y2),d.setValue(n.x1,n.y1,n.x2,n.y2),this.transformAABBBounds(e,n,t,!1,r),i.copy(n),i}updateGlyphAABBBounds(e,t,n,r){return this._validCheck(e,t,n,r)?(r.getSubGraphic().forEach((e=>{n.union(e.AABBBounds)})),n):n}updateHTMLTextAABBBounds(e,t,n,r){const{textAlign:i,textBaseline:a}=e;if(null!=e.forceBoundsHeight){const t=A(e.forceBoundsHeight)?e.forceBoundsHeight:e.forceBoundsHeight(),r=Ki(a,t,t);n.set(n.x1,r,n.x2,r+t)}if(null!=e.forceBoundsWidth){const t=A(e.forceBoundsWidth)?e.forceBoundsWidth:e.forceBoundsWidth(),r=Xi(i,t);n.set(r,n.y1,r+t,n.y2)}}updateRichTextAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;if(!r)return n;const{width:i=t.width,height:a=t.height,maxWidth:o=t.maxWidth,maxHeight:s=t.maxHeight,textAlign:l=t.textAlign,textBaseline:u=t.textBaseline}=e;if(i>0&&a>0)n.set(0,0,i,a);else{const e=r.getFrameCache(),{width:t,height:l}=e.getActualSize();let u=i||t||0,c=a||l||0;c="number"==typeof s&&c>s?s:c||0,u="number"==typeof o&&u>o?o:u||0,n.set(0,0,u,c)}let c=0;switch(u){case"top":c=0;break;case"middle":c=-n.height()/2;break;case"bottom":c=-n.height()}let d=0;switch(l){case"left":d=0;break;case"center":d=-n.width()/2;break;case"right":d=-n.width()}n.translate(d,c);const h=this.tempAABBBounds1,f=this.tempAABBBounds2;return h.setValue(n.x1,n.y1,n.x2,n.y2),f.setValue(n.x1,n.y1,n.x2,n.y2),null==e.forceBoundsHeight&&null==e.forceBoundsWidth||this.updateHTMLTextAABBBounds(e,t,n),this.transformAABBBounds(e,n,t,!1,r),n}updateTextAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;if(!r)return n;const{text:i=t.text}=r.attribute;Array.isArray(i)?r.updateMultilineAABBBounds(i):r.updateSingallineAABBBounds(i);const a=this.tempAABBBounds1,o=this.tempAABBBounds2;a.setValue(n.x1,n.y1,n.x2,n.y2),o.setValue(n.x1,n.y1,n.x2,n.y2);const{scaleX:s=t.scaleX,scaleY:l=t.scaleY,shadowBlur:u=t.shadowBlur,strokeBoundsBuffer:c=t.strokeBoundsBuffer}=e;if(u){xi(a,u/Math.abs(s+l),!0,c),n.union(a)}return this.combindShadowAABBBounds(n,r),null==e.forceBoundsHeight&&null==e.forceBoundsWidth||this.updateHTMLTextAABBBounds(e,t,n),de(n,n,r.transMatrix),n}updatePathAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;this.updatePathProxyAABBBounds(n,r)||this.updatePathAABBBoundsImprecise(e,t,n,r);const i=this.tempAABBBounds1,a=this.tempAABBBounds2;i.setValue(n.x1,n.y1,n.x2,n.y2),a.setValue(n.x1,n.y1,n.x2,n.y2),this._pathBoundsContribitions.length&&this._pathBoundsContribitions.forEach((o=>{o.updateBounds(e,t,i,r),n.union(i),i.setValue(a.x1,a.y1,a.x2,a.y2)}));const{lineJoin:o=t.lineJoin}=e;return this.transformAABBBounds(e,n,t,"miter"===o,r),n}updatePathAABBBoundsImprecise(e,t,n,r){if(!r)return n;const i=r.getParsedPathShape();return n.union(i.getBounds()),n}updatePyramid3dAABBBounds(e,t,n,r){if(!r)return n;const i=r.stage;if(!i||!i.camera)return n;r.findFace().vertices.forEach((e=>{const t=e[0],r=e[1];n.add(t,r)}));const a=this.tempAABBBounds1,o=this.tempAABBBounds2;return a.setValue(n.x1,n.y1,n.x2,n.y2),o.setValue(n.x1,n.y1,n.x2,n.y2),this.transformAABBBounds(e,n,t,!1,r),n}updateArc3dAABBBounds(e,t,n,r){if(!r)return n;const i=r.stage;if(!i||!i.camera)return n;const{outerRadius:a=t.outerRadius,height:o=0}=e,s=a+o;n.setValue(-s,-s,s,s);const l=this.tempAABBBounds1,u=this.tempAABBBounds2;return l.setValue(n.x1,n.y1,n.x2,n.y2),u.setValue(n.x1,n.y1,n.x2,n.y2),this.transformAABBBounds(e,n,t,!1,r),n}updatePolygonAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;this.updatePathProxyAABBBounds(n,r)||this.updatePolygonAABBBoundsImprecise(e,t,n,r);const i=this.tempAABBBounds1,a=this.tempAABBBounds2;i.setValue(n.x1,n.y1,n.x2,n.y2),a.setValue(n.x1,n.y1,n.x2,n.y2);const{lineJoin:o=t.lineJoin}=e;return this.transformAABBBounds(e,n,t,"miter"===o,r),n}updatePolygonAABBBoundsImprecise(e,t,n,r){const{points:i=t.points}=e;return i.forEach((e=>{n.add(e.x,e.y)})),n}updateLineAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;this.updatePathProxyAABBBounds(n,r)||(e.segments?this.updateLineAABBBoundsBySegments(e,t,n,r):this.updateLineAABBBoundsByPoints(e,t,n,r));const i=this.tempAABBBounds1,a=this.tempAABBBounds2;i.setValue(n.x1,n.y1,n.x2,n.y2),a.setValue(n.x1,n.y1,n.x2,n.y2);const{lineJoin:o=t.lineJoin}=e;return this.transformAABBBounds(e,n,t,"miter"===o,r),n}updateLineAABBBoundsByPoints(e,t,n,r){const{points:i=t.points,connectedType:a}=e,o=n;return i.forEach((e=>{!1===e.defined&&"zero"!==a||o.add(e.x,e.y)})),o}updateLineAABBBoundsBySegments(e,t,n,r){const{segments:i=t.segments,connectedType:a}=e,o=n;return i.forEach((e=>{e.points.forEach((e=>{!1===e.defined&&"zero"!==a||o.add(e.x,e.y)}))})),o}updateAreaAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;this.updatePathProxyAABBBounds(n,r)||(e.segments?this.updateAreaAABBBoundsBySegments(e,t,n,r):this.updateAreaAABBBoundsByPoints(e,t,n,r));const i=this.tempAABBBounds1,a=this.tempAABBBounds2;i.setValue(n.x1,n.y1,n.x2,n.y2),a.setValue(n.x1,n.y1,n.x2,n.y2);const{lineJoin:o=t.lineJoin}=e;return this.transformAABBBounds(e,n,t,"miter"===o,r),n}updateAreaAABBBoundsByPoints(e,t,n,r){const{points:i=t.points}=e,a=n;return i.forEach((e=>{var t,n;a.add(e.x,e.y),a.add(null!==(t=e.x1)&&void 0!==t?t:e.x,null!==(n=e.y1)&&void 0!==n?n:e.y)})),a}updateAreaAABBBoundsBySegments(e,t,n,r){const{segments:i=t.segments}=e,a=n;return i.forEach((e=>{e.points.forEach((e=>{var t,n;a.add(e.x,e.y),a.add(null!==(t=e.x1)&&void 0!==t?t:e.x,null!==(n=e.y1)&&void 0!==n?n:e.y)}))})),a}updateCircleAABBBounds(e,t,n,r,i){if(!this._validCheck(e,t,n,i))return n;this.updatePathProxyAABBBounds(n,i)||(r?this.updateCircleAABBBoundsImprecise(e,t,n,i):this.updateCircleAABBBoundsAccurate(e,t,n,i));const a=this.tempAABBBounds1,o=this.tempAABBBounds2;return a.setValue(n.x1,n.y1,n.x2,n.y2),o.setValue(n.x1,n.y1,n.x2,n.y2),this._circleBoundsContribitions.length&&this._circleBoundsContribitions.forEach((r=>{r.updateBounds(e,t,a,i),n.union(a),a.setValue(o.x1,o.y1,o.x2,o.y2)})),this.transformAABBBounds(e,n,t,!1,i),n}updateCircleAABBBoundsImprecise(e,t,n,r){const{radius:i=t.radius}=e;return n.set(-i,-i,i,i),n}updateCircleAABBBoundsAccurate(e,t,n,r){const{startAngle:i=t.startAngle,endAngle:a=t.endAngle,radius:o=t.radius}=e;return a-i>J-Q?n.set(-o,-o,o,o):Hr(i,a,o,n),n}updateArcAABBBounds(e,t,n,r,i){if(!this._validCheck(e,t,n,i))return n;this.updatePathProxyAABBBounds(n,i)||(r?this.updateArcAABBBoundsImprecise(e,t,n,i):this.updateArcAABBBoundsAccurate(e,t,n,i));const a=this.tempAABBBounds1,o=this.tempAABBBounds2;a.setValue(n.x1,n.y1,n.x2,n.y2),o.setValue(n.x1,n.y1,n.x2,n.y2),this._arcBoundsContribitions.length&&this._arcBoundsContribitions.forEach((r=>{r.updateBounds(e,t,a,i),n.union(a),a.setValue(o.x1,o.y1,o.x2,o.y2)}));const{lineJoin:s=t.lineJoin}=e;return this.transformAABBBounds(e,n,t,"miter"===s,i),n}updateArcAABBBoundsImprecise(e,t,n,r){let{outerRadius:i=t.outerRadius,innerRadius:a=t.innerRadius}=e;const{outerPadding:o=t.outerPadding,innerPadding:s=t.innerPadding}=e;return i+=o,a-=s,i<a&&(i=a),n.set(-i,-i,i,i),n}updateArcAABBBoundsAccurate(e,t,n,r){let{outerRadius:i=t.outerRadius,innerRadius:a=t.innerRadius}=e;const{outerPadding:o=t.outerPadding,innerPadding:s=t.innerPadding}=e;if(i+=o,a-=s,i<a){const e=i;i=a,a=e}let{endAngle:l=t.endAngle,startAngle:u=t.startAngle}=e;if(u>l){const e=u;u=l,l=e}return i<=Q?n.set(0,0,0,0):Math.abs(l-u)>J-Q?n.set(-i,-i,i,i):(Hr(u,l,i,n),Hr(u,l,a,n)),n}updateSymbolAABBBounds(e,t,n,r,i){if(!this._validCheck(e,t,n,i))return n;this.updatePathProxyAABBBounds(n,i)||(r?this.updateSymbolAABBBoundsImprecise(e,t,n,i):this.updateSymbolAABBBoundsAccurate(e,t,n,i));const a=this.tempAABBBounds1,o=this.tempAABBBounds2;a.setValue(n.x1,n.y1,n.x2,n.y2),o.setValue(n.x1,n.y1,n.x2,n.y2),this._symbolBoundsContribitions.length&&this._symbolBoundsContribitions.forEach((r=>{r.updateBounds(e,t,a,i),n.union(a),a.setValue(o.x1,o.y1,o.x2,o.y2)}));const{lineJoin:s=t.lineJoin}=e;return this.transformAABBBounds(e,n,t,"miter"===s,i),n}updateSymbolAABBBoundsImprecise(e,t,n,r){const{size:i=t.size}=e;if(_(i))n.set(-i[0]/2,-i[1]/2,i[0]/2,i[1]/2);else{const e=i/2;n.set(-e,-e,e,e)}return n}updateSymbolAABBBoundsAccurate(e,t,n,r){if(!r)return n;const{size:i=t.size}=e;return r.getParsedPath().bounds(i,n),n}updateImageAABBBounds(e,t,n,r){if(!this._validCheck(e,t,n,r))return n;if(!this.updatePathProxyAABBBounds(n,r)){const{width:r=t.width,height:i=t.height}=e;n.set(0,0,r,i)}const i=this.tempAABBBounds1,a=this.tempAABBBounds2;return i.setValue(n.x1,n.y1,n.x2,n.y2),a.setValue(n.x1,n.y1,n.x2,n.y2),this._imageBoundsContribitions.length&&this._imageBoundsContribitions.forEach((o=>{o.updateBounds(e,t,i,r),n.union(i),i.setValue(a.x1,a.y1,a.x2,a.y2)})),this.transformAABBBounds(e,n,t,!1,r),n}combindShadowAABBBounds(e,t){if(t&&t.shadowRoot){const n=t.shadowRoot.AABBBounds;e.union(n)}}transformAABBBounds(e,t,n,r,i){if(!t.empty()){const{scaleX:i=n.scaleX,scaleY:a=n.scaleY,stroke:o=n.stroke,shadowBlur:s=n.shadowBlur,lineWidth:l=n.lineWidth,pickStrokeBuffer:u=n.pickStrokeBuffer,strokeBoundsBuffer:c=n.strokeBoundsBuffer}=e,d=this.tempAABBBounds1,h=this.tempAABBBounds2;if(o&&l){xi(d,(l+u)/Math.abs(i+a),r,c),t.union(d),d.setValue(h.x1,h.y1,h.x2,h.y2)}if(s){const{shadowOffsetX:r=n.shadowOffsetX,shadowOffsetY:o=n.shadowOffsetY}=e;xi(d,s/Math.abs(i+a)*2,!1,c+1),d.translate(r,o),t.union(d)}}if(this.combindShadowAABBBounds(t,i),t.empty())return;let a=!0;const o=i.transMatrix;i&&i.isContainer&&(a=!(1===o.a&&0===o.b&&0===o.c&&1===o.d&&0===o.e&&0===o.f)),a&&de(t,t,o)}_validCheck(e,t,n,r){if(!r)return!0;if(null!=e.forceBoundsHeight||null!=e.forceBoundsWidth)return!0;if(!r.valid)return n.clear(),!1;const{visible:i=t.visible}=e;return!!i||(n.clear(),!1)}};Uo=Ro([tt(),Lo(0,Je(Ii)),Mo("design:paramtypes",[Object])],Uo);const Do=new class{constructor(){this.store=new Map}RegisterGraphicCreator(e,t){this.store.set(e,t),this[e]=t}CreateGraphic(e,t){const n=this.store.get(e);return n?n(t):null}};let zo;function jo(e){return zo||(zo=Do.CreateGraphic("text",{})),zo.initAttributes(e),zo.AABBBounds}const Fo={x:0,y:0,z:0,lastModelMatrix:null};class Wo{init(e){e&&(this._renderContribitions=e.getContributions()),this._renderContribitions||(this._renderContribitions=[]),this.builtinContributions&&this.builtinContributions.forEach((e=>this._renderContribitions.push(e))),this._renderContribitions.length&&(this._renderContribitions.sort(((e,t)=>t.order-e.order)),this._beforeRenderContribitions=this._renderContribitions.filter((e=>e.time===Kt.beforeFillStroke)),this._afterRenderContribitions=this._renderContribitions.filter((e=>e.time===Kt.afterFillStroke)))}beforeRenderStep(e,t,n,r,i,a,o,s,l,u,c,d,h){this._beforeRenderContribitions&&this._beforeRenderContribitions.forEach((f=>{f.supportedAppName&&e.stage&&e.stage.params&&e.stage.params.context&&e.stage.params.context.appName&&!(Array.isArray(f.supportedAppName)?f.supportedAppName:[f.supportedAppName]).includes(e.stage.params.context.appName)||f.drawShape(e,t,n,r,i,a,o,s,l,u,c,d,h)}))}afterRenderStep(e,t,n,r,i,a,o,s,l,u,c,d,h){this._afterRenderContribitions&&this._afterRenderContribitions.forEach((f=>{f.supportedAppName&&e.stage&&e.stage.params&&e.stage.params.context&&e.stage.params.context.appName&&!(Array.isArray(f.supportedAppName)?f.supportedAppName:[f.supportedAppName]).includes(e.stage.params.context.appName)||f.drawShape(e,t,n,r,i,a,o,s,l,u,c,d,h)}))}valid(e,t,n,r){const{fill:i=t.fill,background:a,stroke:o=t.stroke,opacity:s=t.opacity,fillOpacity:l=t.fillOpacity,lineWidth:u=t.lineWidth,strokeOpacity:c=t.strokeOpacity,visible:d=t.visible}=e.attribute,h=Hi(s,l,i),f=$i(s,c),p=Fi(i,a),g=Wi(o,u);return!(!e.valid||!d)&&!(!p&&!g)&&!!(h||f||n||r||a)&&{fVisible:h,sVisible:f,doFill:p,doStroke:g}}transform(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{x:i=t.x,y:a=t.y,z:o=t.z,scaleX:s=t.scaleX,scaleY:l=t.scaleY,angle:u=t.angle,postMatrix:c}=e.attribute,d=n.modelMatrix,h=n.camera;Fo.x=i,Fo.y=a,Fo.z=o,Fo.lastModelMatrix=d;const f=h&&(r||function(e){const{alpha:t,beta:n}=e.attribute;return t||n}(e)),p=f?e.transMatrix.onlyTranslate()&&!c:1===s&&1===l&&0===u&&!c;if(f){const r=Po.allocate(),i=Po.allocate();No(i,e,t),Io(r,d||r,i),Fo.x=0,Fo.y=0,Fo.z=0,n.modelMatrix=r,n.setTransform(1,0,0,1,0,0,!0),Po.free(i)}if(p&&!d){const r=e.getOffsetXY(t);Fo.x+=r.x,Fo.y+=r.y,Fo.z=o,n.setTransformForCurrent()}else if(f)Fo.x=0,Fo.y=0,Fo.z=0,n.setTransform(1,0,0,1,0,0,!0);else if(h&&n.project){const r=e.getOffsetXY(t);Fo.x+=r.x,Fo.y+=r.y,this.transformWithoutTranslate(n,Fo.x,Fo.y,Fo.z,s,l,u)}else n.transformFromMatrix(e.transMatrix,!0),Fo.x=0,Fo.y=0,Fo.z=0;return Fo}transformUseContext2d(e,t,n,r){const i=r.camera;if(this.camera=i,i){const t=e.AABBBounds,i=t.x2-t.x1,a=t.y2-t.y1,o=r.project(0,0,n),s=r.project(i,0,n),l=r.project(i,a,n),u={x:0,y:0},c={x:i,y:0},d={x:i,y:a};r.camera=null;const h=1/(u.x*(d.y-c.y)-c.x*d.y+d.x*c.y+(c.x-d.x)*u.y),f=-(u.y*(l.x-s.x)-c.y*l.x+d.y*s.x+(c.y-d.y)*o.x)*h,p=(c.y*l.y+u.y*(s.y-l.y)-d.y*s.y+(d.y-c.y)*o.y)*h,g=(u.x*(l.x-s.x)-c.x*l.x+d.x*s.x+(c.x-d.x)*o.x)*h,m=-(c.x*l.y+u.x*(s.y-l.y)-d.x*s.y+(d.x-c.x)*o.y)*h,y=(u.x*(d.y*s.x-c.y*l.x)+u.y*(c.x*l.x-d.x*s.x)+(d.x*c.y-c.x*d.y)*o.x)*h,v=(u.x*(d.y*s.y-c.y*l.y)+u.y*(c.x*l.y-d.x*s.y)+(d.x*c.y-c.x*d.y)*o.y)*h;r.setTransform(f,p,g,m,y,v,!0)}}restoreTransformUseContext2d(e,t,n,r){this.camera&&(r.camera=this.camera)}transformWithoutTranslate(e,t,n,r,i,a,o){const s=e.project(t,n,r);e.translate(s.x,s.y,!1),e.scale(i,a,!1),e.rotate(o,!1),e.translate(-s.x,-s.y,!1),e.setTransformForCurrent()}_draw(e,t,n,r,i){const{context:a}=r;if(!a)return;const{renderable:o}=e.attribute;if(!1===o)return;a.highPerformanceSave();const s=this.transform(e,t,a,n),{x:l,y:u,z:c,lastModelMatrix:d}=s;this.z=c,function(e,t,n,r,i,a,o,s){if(!e.pathProxy)return!1;const l=wr(e,null==a?void 0:a.theme)[e.type.replace("3d","")],{fill:u=l.fill,stroke:c=l.stroke,opacity:d=l.opacity,fillOpacity:h=l.fillOpacity,lineWidth:f=l.lineWidth,strokeOpacity:p=l.strokeOpacity,visible:g=l.visible,x:m=l.x,y:y=l.y}=e.attribute,v=Hi(d,h,u),b=$i(d,p),x=Fi(u),S=Wi(c,f);return!g||(!x&&!S||(!(v||b||o||s)||(t.beginPath(),nn(("function"==typeof e.pathProxy?e.pathProxy(e.attribute):e.pathProxy).commandList,t,n,r),t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,l),S&&(s?s(t,e.attribute,l):b&&(t.setStrokeStyle(e,e.attribute,n-m,r-y,l),t.stroke())),x&&(o?o(t,e.attribute,l):v&&(t.setCommonStyle(e,e.attribute,n-m,r-y,l),t.fill())),!0)))}(e,a,l,u,0,i)||(this.drawShape(e,a,l,u,r,i),this.z=0,a.modelMatrix!==d&&Po.free(a.modelMatrix),a.modelMatrix=d),a.highPerformanceRestore()}}function Ho(e,t,n){let r=t;const{a:i,b:a,c:o,d:s}=e.currentMatrix,l=Math.sign(i)*Math.sqrt(i*i+a*a),u=Math.sign(s)*Math.sqrt(o*o+s*s);return l+u===0?0:(r=r/Math.abs(l+u)*2*n,r)}var $o=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Vo=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Go=function(e,t){return function(n,r){t(n,r,e)}};class Yo{constructor(){this.time=Kt.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(e,t,n,r,i,a,o,s,l,u,c,d,h){var f;const{background:p,backgroundOpacity:g=(null!==(f=e.attribute.fillOpacity)&&void 0!==f?f:l.backgroundOpacity),opacity:m=l.opacity,backgroundMode:y=l.backgroundMode,backgroundFit:v=l.backgroundFit}=e.attribute;if(p)if(e.backgroundImg&&e.resources){const i=e.resources.get(p);if("success"!==i.state||!i.data)return;if(t.save(),e.parent&&!e.transMatrix.onlyTranslate()){const n=wr(e.parent).group,{scrollX:r=n.scrollX,scrollY:i=n.scrollY}=e.parent.attribute;t.setTransformFromMatrix(e.parent.globalTransMatrix,!0),t.translate(r,i)}t.clip();const a=e.AABBBounds;t.setCommonStyle(e,e.attribute,n,r,l),t.globalAlpha=g*m,this.doDrawImage(t,i.data,a,y,v),t.restore(),e.transMatrix.onlyTranslate()||t.setTransformForCurrent()}else t.highPerformanceSave(),t.setCommonStyle(e,e.attribute,n,r,l),t.globalAlpha=g*m,t.fillStyle=p,t.fill(),t.highPerformanceRestore()}doDrawImage(e,t,n,r,i){if("no-repeat"===r)e.drawImage(t,n.x1,n.y1,n.width(),n.height());else{const a=n.width(),o=n.height();let s=a,l=o;if(i&&"repeat"!==r&&(t.width||t.height)){const n=t.width,i=t.height;"repeat-x"===r?(s=n*(o/i),l=o):"repeat-y"===r&&(l=i*(a/n),s=a);const u=e.dpr,c=mr.allocate({width:s,height:l,dpr:u}),d=c.getContext("2d");d&&(d.inuse=!0,d.clearMatrix(),d.setTransformForCurrent(!0),d.clearRect(0,0,s,l),d.drawImage(t,0,0,s,l),t=c.nativeCanvas),mr.free(c)}const u=e.dpr,c=e.createPattern(t,r);c.setTransform&&c.setTransform(new DOMMatrix([1/u,0,0,1/u,0,0])),e.fillStyle=c,e.translate(n.x1,n.y1),e.fillRect(0,0,a,o),e.translate(-n.x1,-n.y1)}}}const qo=new Yo;let Qo=class{constructor(e){this.subRenderContribitions=e,this.time=Kt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(e,t,n,r,i,a,o,s,l,u,c,d,h){this._subRenderContribitions||(this._subRenderContribitions=this.subRenderContribitions.getContributions()),this._subRenderContribitions.forEach((f=>{f.render(e,t,n,r,i,a,o,s,l,u,c,d,h)}))}};Qo=$o([tt(),Go(0,Je(yt)),Go(0,nt(Qi)),Vo("design:paramtypes",[Object])],Qo);const Xo=new class{constructor(){this.time=Kt.afterFillStroke,this.useStyle=!0,this.order=10}createCommonPattern(e,t,n,r,i){const a=(e-2*t)/2,o=r.dpr,s=mr.allocate({width:e,height:e,dpr:o}),l=s.getContext("2d");if(!l)return null;l.inuse=!0,l.clearMatrix(),l.setTransformForCurrent(!0),l.clearRect(0,0,e,e),i(a,l);const u=r.createPattern(s.nativeCanvas,"repeat");return u.setTransform&&u.setTransform(new DOMMatrix([1/o,0,0,1/o,0,0])),mr.free(s),u}createCirclePattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((e,t)=>{t.fillStyle=n,t.arc(e,e,e,0,J),t.fill()}))}createDiamondPattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((t,r)=>{const i=e/2,a=i;r.fillStyle=n,r.moveTo(i,a-t),r.lineTo(t+i,a),r.lineTo(i,a+t),r.lineTo(i-t,a),r.closePath(),r.fill()}))}createRectPattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((e,r)=>{const i=t,a=i;r.fillStyle=n,r.fillRect(i,a,2*e,2*e)}))}createVerticalLinePattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((r,i)=>{const a=t;i.fillStyle=n,i.fillRect(a,0,2*r,e)}))}createHorizontalLinePattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((r,i)=>{const a=t;i.fillStyle=n,i.fillRect(0,a,e,2*r)}))}createBiasLRLinePattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((t,r)=>{r.strokeStyle=n,r.lineWidth=t,r.moveTo(0,0),r.lineTo(e,e);const i=e/2,a=-i;r.moveTo(i,a),r.lineTo(i+e,a+e),r.moveTo(-i,-a),r.lineTo(-i+e,-a+e),r.stroke()}))}createBiasRLLinePattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((t,r)=>{r.strokeStyle=n,r.lineWidth=t,r.moveTo(e,0),r.lineTo(0,e);const i=e/2,a=i;r.moveTo(e+i,a),r.lineTo(i,a+e),r.moveTo(e-i,-a),r.lineTo(-i,-a+e),r.stroke()}))}createGridPattern(e,t,n,r){return this.createCommonPattern(e,t,n,r,((e,r)=>{const i=t,a=i;r.fillStyle=n,r.fillRect(i,a,e,e),r.fillRect(i+e,a+e,e,e)}))}initTextureMap(e,t){this.textureMap=new Map}drawShape(e,t,n,r,i,a,o,s,l,u,c,d,h){this.textureMap||this.initTextureMap(t,e.stage);const{texture:f=l.texture,textureColor:p=l.textureColor,textureSize:g=l.textureSize,texturePadding:m=l.texturePadding}=e.attribute;f&&this.drawTexture(f,e,t,n,r,l,p,g,m)}drawTexture(e,t,n,r,i,a,o,s,l){let u=this.textureMap.get(e);if(!u)switch(e){case"circle":u=this.createCirclePattern(s,l,o,n);break;case"diamond":u=this.createDiamondPattern(s,l,o,n);break;case"rect":u=this.createRectPattern(s,l,o,n);break;case"vertical-line":u=this.createVerticalLinePattern(s,l,o,n);break;case"horizontal-line":u=this.createHorizontalLinePattern(s,l,o,n);break;case"bias-lr":u=this.createBiasLRLinePattern(s,l,o,n);break;case"bias-rl":u=this.createBiasRLLinePattern(s,l,o,n);break;case"grid":u=this.createGridPattern(s,l,o,n)}u&&(n.highPerformanceSave(),n.setCommonStyle(t,t.attribute,r,i,a),n.fillStyle=u,n.fill(),n.highPerformanceRestore())}},Ko=X/2;function Zo(e,t,n,r,i,a,o){let s;if(r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),A(a,!0))s=[a=ee(a),a,a,a];else if(Array.isArray(a)){const e=a;let t,n;switch(e.length){case 0:s=[0,0,0,0];break;case 1:t=ee(e[0]),s=[t,t,t,t];break;case 2:case 3:t=ee(e[0]),n=ee(e[1]),s=[t,n,t,n];break;default:s=e,s[0]=ee(s[0]),s[1]=ee(s[1]),s[2]=ee(s[2]),s[3]=ee(s[3])}}else s=[0,0,0,0];if(r<0||s[0]+s[1]+s[2]+s[3]<1e-12)return e.rect(t,n,r,i);const[l,u,c,d]=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]],h=Math.min(r/2,i/2),f=[Math.min(h,s[0]),Math.min(h,s[1]),Math.min(h,s[2]),Math.min(h,s[3])],p=[l[0]+f[0],l[1]],g=[l[0],l[1]+f[0]],m=[u[0]-f[1],u[1]],y=[u[0],u[1]+f[1]],v=[c[0]-f[2],c[1]],b=[c[0],c[1]-f[2]],x=[d[0]+f[3],d[1]],S=[d[0],d[1]-f[3]];if(e.moveTo(p[0],p[1]),o&&o[0]?o[0](p[0],p[1],m[0],m[1]):e.lineTo(m[0],m[1]),!H(m,y)){o&&o[0]&&e.moveTo(m[0],m[1]);const t=m[0],n=m[1]+f[1];e.arc(t,n,f[1],-Ko,0,!1)}if(o&&o[1]?o[1](y[0],y[1],b[0],b[1]):e.lineTo(b[0],b[1]),!H(v,b)){const t=b[0]-f[2],n=b[1];o&&o[1]&&e.moveTo(b[0],b[1]),e.arc(t,n,f[2],0,Ko,!1)}if(o&&o[2]?o[2](v[0],v[1],x[0],x[1]):e.lineTo(x[0],x[1]),!H(x,S)){const t=x[0],n=x[1]-f[3];o&&o[2]&&e.moveTo(x[0],x[1]),e.arc(t,n,f[3],Ko,X,!1)}if(o&&o[3]?o[3](S[0],S[1],g[0],g[1]):e.lineTo(g[0],g[1]),!H(p,g)){const t=p[0],n=p[1]+f[0];o&&o[3]&&e.moveTo(g[0],g[1]),e.arc(t,n,f[0],X,X+Ko,!1)}return!o&&e.closePath(),e}var Jo=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class es{constructor(){this.time=Kt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(e,t,n,r,i,a,o,s,l,u,c,d){const{outerBorder:h,innerBorder:f}=e.attribute,p=h&&!1!==h.visible,g=f&&!1!==f.visible;if(!p&&!g)return;const{cornerRadius:m=l.cornerRadius,opacity:y=l.opacity,x:v=l.x,y:b=l.y,scaleX:x=l.scaleX,scaleY:S=l.scaleY,x1:w,y1:A}=e.attribute;let{width:k,height:T}=e.attribute;k=(null!=k?k:w-n)||0,T=(null!=T?T:A-r)||0;const B=!(!h||!h.stroke),C=!(!f||!f.stroke);if(p){const{distance:i=l.outerBorder.distance}=h,a=Ho(t,i,t.dpr),o=n-a,s=r-a,u=2*a;if(0===m||_(m)&&m.every((e=>0===e))?(t.beginPath(),t.rect(o,s,k+u,T+u)):(t.beginPath(),Zo(t,o,s,k+u,T+u,m)),t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,l),d)d(t,h,l.outerBorder);else if(B){const i=l.outerBorder.opacity;l.outerBorder.opacity=y,t.setStrokeStyle(e,h,(v-n)/x,(b-r)/S,l.outerBorder),l.outerBorder.opacity=i,t.stroke()}}if(g){const{distance:i=l.innerBorder.distance}=f,a=Ho(t,i,t.dpr),o=n+a,s=r+a,u=2*a;if(0===m||_(m)&&m.every((e=>0===e))?(t.beginPath(),t.rect(o,s,k-u,T-u)):(t.beginPath(),Zo(t,o,s,k-u,T-u,m)),t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,l),d)d(t,f,l.innerBorder);else if(C){const i=l.innerBorder.opacity;l.innerBorder.opacity=y,t.setStrokeStyle(e,f,(v-n)/x,(b-r)/S,l.innerBorder),l.innerBorder.opacity=i,t.stroke()}}}}let ts=class{constructor(){this.time=Kt.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(e,t,n,r,i,a,o,s,l,u,c,d,h){const{stroke:f=l.stroke}=e.attribute;Array.isArray(f)&&f.some((e=>!1===e))&&(h.doStroke=!1)}};ts=Jo([tt()],ts);let ns=class{constructor(){this.time=Kt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(e,t,n,r,i,a,o,s,l,u,c,d){const{x1:h,y1:f,x:p=l.x,y:g=l.y,stroke:m=l.stroke,cornerRadius:y=l.cornerRadius}=e.attribute;let{width:v,height:b}=e.attribute;if(v=(null!=v?v:h-p)||0,b=(null!=b?b:f-g)||0,Array.isArray(m)&&m.some((e=>!1===e))){if(t.setStrokeStyle(e,e.attribute,n,r,l),!(0===y||_(y)&&y.every((e=>0===e)))){let i,a=0;return Zo(t,n,r,v,b,y,new Array(4).fill(0).map(((o,s)=>(o,u,c,d)=>{m[s]&&(a===s-1&&m[s]===i||(t.setStrokeStyle(e,Object.assign(Object.assign({},e.attribute),{stroke:m[s]}),n,r,l),t.beginPath(),t.moveTo(o,u),i=m[s]),a=s,t.lineTo(c,d),t.stroke(),3===s&&t.beginPath())}))),void t.stroke()}if(t.beginPath(),t.moveTo(n,r),m[0]?t.lineTo(n+v,r):t.moveTo(n+v,r),m[1]?t.lineTo(n+v,r+b):t.moveTo(n+v,r+b),m[2]?t.lineTo(n,r+b):t.moveTo(n,r+b),m[3]){const e=m[0]?r-t.lineWidth/2:r;t.lineTo(n,e)}else t.moveTo(n,r);t.stroke()}}};ns=Jo([tt()],ns);const rs=new es,is=Xo,as=qo;const os=new class extends es{constructor(){super(...arguments),this.time=Kt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(e,t,n,r,i,a,o,s,l,u,c,d){return super.drawShape(e,t,n,r,i,a,o,s,l,u,c,d)}},ss=new class extends Yo{constructor(){super(...arguments),this.time=Kt.beforeFillStroke}drawShape(e,t,n,r,i,a,o,s,l,u,c,d){const{background:h,backgroundMode:f=l.backgroundMode,backgroundFit:p=l.backgroundFit}=e.attribute;if(h)if(e.backgroundImg){const n=e.resources.get(h);if("success"!==n.state||!n.data)return;if(t.save(),e.parent&&!e.transMatrix.onlyTranslate()){const n=wr(e.parent).group,{scrollX:r=n.scrollX,scrollY:i=n.scrollY}=e.parent.attribute;t.setTransformFromMatrix(e.parent.globalTransMatrix,!0),t.translate(r,i)}const r=e.AABBBounds;this.doDrawImage(t,n.data,r,f,p),t.restore(),e.transMatrix.onlyTranslate()||t.setTransformForCurrent()}else if(v(h)){const{stroke:n,fill:r,lineWidth:i=1,cornerRadius:a=0,expandX:o=0,expandY:s=0}=h;if(!n&&!r)return;t.beginPath();const{x:l,y:u,width:c,height:d}=function(e){const t=jr(e.attribute.boundsPadding),n=e.AABBBounds;let r=n.x1,i=n.y1,a=n.width(),o=n.height();return A(t)?(r+=t,i+=t,a-=2*t,o-=2*t):(r+=t[3],i+=t[0],a-=t[1]+t[3],o-=t[0]+t[2]),{x:r,y:i,width:a,height:o}}(e);a?Zo(t,l-o,u-s,c+2*o,d+2*s,a):t.rect(l-o,u-s,c+2*o,d+2*s),t.globalAlpha=1,r&&(t.fillStyle=r,t.fill()),n&&i>0&&(t.lineWidth=i,t.strokeStyle=n,t.stroke())}else{t.beginPath();const i=e.AABBBounds;t.rect(n,r,i.width(),i.height()),t.fillStyle=h,t.globalAlpha=1,t.fill()}}};const ls=new class{constructor(){this.time=Kt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(e,t,n,r,i,a,o,s,l,u,c,d){const h=e.getParsedPath();if(!h)return;const{outerBorder:f,innerBorder:p}=e.attribute,g=f&&!1!==f.visible,m=p&&!1!==p.visible;if(!g&&!m)return;const{size:y=l.size,opacity:v=l.opacity,x:b=l.x,y:x=l.y,scaleX:S=l.scaleX,scaleY:_=l.scaleY}=e.attribute,w=!(!f||!f.stroke),A=!(!p||!p.stroke);if(g){const{distance:i=l.outerBorder.distance}=f,a=Ho(t,i,t.dpr);if(t.beginPath(),!1===h.drawOffset(t,y,n,r,a)&&t.closePath(),t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,l),d)d(t,f,l.outerBorder);else if(w){const i=l.outerBorder.opacity;l.outerBorder.opacity=v,t.setStrokeStyle(e,f,(b-n)/S,(x-r)/_,l.outerBorder),l.outerBorder.opacity=i,t.stroke()}}if(m){const{distance:i=l.innerBorder.distance}=p,a=Ho(t,i,t.dpr);if(t.beginPath(),!1===h.drawOffset(t,y,n,r,-a)&&t.closePath(),t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,l),d)d(t,p,l.innerBorder);else if(A){const i=l.innerBorder.opacity;l.innerBorder.opacity=v,t.setStrokeStyle(e,p,(b-n)/S,(x-r)/_,l.innerBorder),l.innerBorder.opacity=i,t.stroke()}}}},us=Xo,cs=qo;var ds=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},hs=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},fs=function(e,t){return function(n,r){t(n,r,e)}};let ps=class extends Wo{constructor(e){super(),this.rectRenderContribitions=e,this.type="rect",this.numberType=Ri,this.builtinContributions=[rs,as,is],this.init(e)}drawShape(e,t,n,r,i,a,o,s){var l;const u=null!==(l=this.tempTheme)&&void 0!==l?l:wr(e,null==a?void 0:a.theme).rect,{fill:c=u.fill,background:d,stroke:h=u.stroke,cornerRadius:f=u.cornerRadius,opacity:p=u.opacity,fillOpacity:g=u.fillOpacity,lineWidth:m=u.lineWidth,strokeOpacity:y=u.strokeOpacity,visible:v=u.visible,x1:b,y1:x,x:S=u.x,y:w=u.y}=e.attribute;let{width:A,height:k}=e.attribute;A=(null!=A?A:b-S)||0,k=(null!=k?k:x-w)||0;const T=function(e,t,n,r,i){return i&&e*t>0&&0!==n&&0!==r}(p,g,A,k,c),B=function(e,t,n,r){return e*t>0&&0!==n&&0!==r}(p,y,A,k),C=Fi(c,d),E=Wi(h,m);if(!e.valid||!v)return;if(!C&&!E)return;if(!(T||B||o||s||d))return;0===f||_(f)&&f.every((e=>0===e))?(t.beginPath(),t.rect(n,r,A,k)):(t.beginPath(),Zo(t,n,r,A,k,f));const P={doFill:C,doStroke:E};t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,u),this.beforeRenderStep(e,t,n,r,C,E,T,B,u,i,o,s,P),P.doFill&&(o?o(t,e.attribute,u):T&&(t.setCommonStyle(e,e.attribute,S-n,w-r,u),t.fill())),P.doStroke&&(s?s(t,e.attribute,u):B&&(t.setStrokeStyle(e,e.attribute,S-n,w-r,u),t.stroke())),this.afterRenderStep(e,t,n,r,C,E,T,B,u,i,o,s)}draw(e,t,n,r){const i=wr(e,null==r?void 0:r.theme).rect;this.tempTheme=i,this._draw(e,i,!1,n,r),this.tempTheme=null}};ps=ds([tt(),fs(0,Je(yt)),fs(0,nt(Gi)),hs("design:paramtypes",[Object])],ps);var gs=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ms=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ys=function(e,t){return function(n,r){t(n,r,e)}};let vs=class extends Wo{constructor(e){super(),this.symbolRenderContribitions=e,this.numberType=Li,this.builtinContributions=[ls,cs,us],this.init(e)}drawShape(e,t,n,r,i,a,o,s){var l;const u=wr(e,null==a?void 0:a.theme).symbol,{size:c=u.size,x:d=u.x,y:h=u.y,scaleX:f=u.scaleX,scaleY:p=u.scaleY}=e.attribute,g=this.valid(e,u,o,s);if(!g)return;const{fVisible:m,sVisible:y,doFill:v,doStroke:b}=g,x=e.getParsedPath();if(!x)return;const{keepDirIn3d:S=u.keepDirIn3d}=e.attribute,w=null!==(l=this.z)&&void 0!==l?l:0;if(t.beginPath(),S&&t.camera&&t.project){const i=t.project(n,r,w),a=t.camera;t.camera=null,!1===x.draw(t,_(c)?[c[0]*f,c[1]*p]:c*f,i.x,i.y,void 0,((i,a)=>{var l,c,g;if(e._parsedPath.svgCache){const t=Object.assign({},a);t.fill=null!==(l=a.fill)&&void 0!==l?l:e.attribute.fill,t.opacity=null!==(c=a.fill)&&void 0!==c?c:e.attribute.opacity,t.fillOpacity=e.attribute.fillOpacity,t.stroke=null!==(g=a.stroke)&&void 0!==g?g:e.attribute.stroke,a=t}a.fill&&(o?o(t,e.attribute,u):(t.setCommonStyle(e,a,d-n,h-r,u),t.fill())),a.stroke&&(s?s(t,e.attribute,u):(t.setStrokeStyle(e,a,(d-n)/f,(h-r)/p,u),t.stroke()))}))&&t.closePath(),t.camera=a}else!1===x.draw(t,c,n,r,w,((i,a)=>{var l,c,g;if(e._parsedPath.svgCache){const t=Object.assign({},a);t.fill=null!==(l=a.fill)&&void 0!==l?l:e.attribute.fill,t.opacity=null!==(c=a.opacity)&&void 0!==c?c:e.attribute.opacity,t.fillOpacity=e.attribute.fillOpacity,t.stroke=null!==(g=a.stroke)&&void 0!==g?g:e.attribute.stroke,a=t}a.fill&&(o?o(t,e.attribute,u):(t.setCommonStyle(e,a,d-n,h-r,u),t.fill())),a.stroke&&(s?s(t,e.attribute,u):(t.setStrokeStyle(e,a,(d-n)/f,(h-r)/p,u),t.stroke()))}))&&t.closePath();t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,u),this.beforeRenderStep(e,t,n,r,v,b,m,y,u,i,o,s),v&&!x.isSvg&&(o?o(t,e.attribute,u):m&&(t.setCommonStyle(e,e.attribute,d-n,h-r,u),t.fill())),b&&!x.isSvg&&(s?s(t,e.attribute,u):y&&(t.setStrokeStyle(e,e.attribute,(d-n)/f,(h-r)/p,u),t.stroke())),this.afterRenderStep(e,t,n,r,v,b,m,y,u,i,o,s)}draw(e,t,n,r){const i=wr(e,null==r?void 0:r.theme).symbol;this._draw(e,i,!1,n,r)}};vs=gs([tt(),ys(0,Je(yt)),ys(0,nt(Yi)),ms("design:paramtypes",[Object])],vs);const bs=new class{constructor(){this.pools=[];for(let e=0;e<10;e++)this.pools.push(new fe)}allocate(e,t,n,r){if(!this.pools.length)return(new fe).setValue(e,t,n,r);const i=this.pools.pop();return i.x1=e,i.y1=t,i.x2=n,i.y2=r,i}allocateByObj(e){if(!this.pools.length)return new fe(e);const t=this.pools.pop();return t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t}free(e){this.pools.push(e)}get length(){return this.pools.length}release(){this.pools=[]}};const xs=new class extends Yo{constructor(){super(...arguments),this.time=Kt.beforeFillStroke}drawShape(e,t,n,r,i,a,o,s,l,u,c,d){var h,f,p,g,m,y,b,x,S,_;const{backgroundMode:w=l.backgroundMode,backgroundFit:A=l.backgroundFit}=e.attribute;let k,{background:T}=e.attribute;if(!T)return;const B=()=>{"richtext"===e.type&&(t.restore(),t.save(),k&&t.setTransformFromMatrix(k,!0,1))};let C;"richtext"===e.type&&(k=t.currentMatrix.clone(),t.restore(),t.save(),t.setTransformForCurrent());const E=v(T)&&T.background,P=e.transMatrix.onlyTranslate();if(E){const t=e.AABBBounds,n=(null!==(h=T.x)&&void 0!==h?h:t.x1)+(null!==(f=T.dx)&&void 0!==f?f:0),r=(null!==(p=T.y)&&void 0!==p?p:t.y1)+(null!==(g=T.dy)&&void 0!==g?g:0),i=null!==(m=T.width)&&void 0!==m?m:t.width(),a=null!==(y=T.height)&&void 0!==y?y:t.height();if(C=bs.allocate(n,r,n+i,r+a),T=T.background,!P){const e=C.width(),t=C.height();C.set((null!==(b=T.x)&&void 0!==b?b:0)+(null!==(x=T.dx)&&void 0!==x?x:0),(null!==(S=T.y)&&void 0!==S?S:0)+(null!==(_=T.dy)&&void 0!==_?_:0),e,t)}}else C=e.AABBBounds,P||(C=jo(Object.assign(Object.assign({},e.attribute),{angle:0,scaleX:1,scaleY:1,x:0,y:0,dx:0,dy:0})).clone());if(e.backgroundImg&&e.resources){const i=e.resources.get(T);if("success"!==i.state||!i.data)return void B();t.highPerformanceSave(),P&&t.setTransformFromMatrix(e.parent.globalTransMatrix,!0),t.setCommonStyle(e,e.attribute,n,r,l),this.doDrawImage(t,i.data,C,w,A),t.highPerformanceRestore(),t.setTransformForCurrent()}else{const{backgroundCornerRadius:i}=e.attribute;t.highPerformanceSave(),t.setCommonStyle(e,e.attribute,n,r,l),t.fillStyle=T,i?(Zo(t,C.x1,C.y1,C.width(),C.height(),i),t.fill()):t.fillRect(C.x1,C.y1,C.width(),C.height()),t.highPerformanceRestore()}E&&bs.free(C),B()}};var Ss=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},_s=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ws=function(e,t){return function(n,r){t(n,r,e)}};let As=class extends Wo{constructor(e){super(),this.textRenderContribitions=e,this.numberType=Oi,this.builtinContributions=[xs],this.init(e)}drawShape(e,t,n,r,i,a,o,s){var l,u,c;const d=wr(e,null==a?void 0:a.theme).text,{text:h,underline:f=d.underline,lineThrough:p=d.lineThrough,keepDirIn3d:g=d.keepDirIn3d,direction:m=d.direction,whiteSpace:y=d.whiteSpace,fontSize:v=d.fontSize,verticalMode:b=d.verticalMode,x:x=d.x,y:S=d.y}=e.attribute;let{textAlign:_=d.textAlign,textBaseline:w=d.textBaseline}=e.attribute;if(!b&&"vertical"===m){const t=_;_=null!==(l=e.getBaselineMapAlign()[w])&&void 0!==l?l:"left",w=null!==(u=e.getAlignMapBaseline()[t])&&void 0!==u?u:"top"}const A=null!==(c=$r(e.attribute.lineHeight,v))&&void 0!==c?c:v,k=this.valid(e,d,o,s);if(!k)return;const{fVisible:T,sVisible:B,doFill:C,doStroke:E}=k,P=!g,R=this.z||0;t.beginPath(),t.setShadowBlendStyle&&t.setShadowBlendStyle(e,e.attribute,d),this.beforeRenderStep(e,t,n,r,C,E,T,B,d,i,o,s),P&&this.transformUseContext2d(e,d,R,t);const M=(i,a,l,u)=>{let c=n+a;const h=r+l;if(u){t.highPerformanceSave(),c+=v;const e=Eo.allocate(1,0,0,1,0,0);e.rotateByCenter(Math.PI/2,c,h),t.transformFromMatrix(e,!0),Eo.free(e)}E&&(s?s(t,e.attribute,d):B&&(t.setStrokeStyle(e,e.attribute,x-n,S-r,d),t.strokeText(i,c,h,R))),C&&(o?o(t,e.attribute,d):T&&(t.setCommonStyle(e,e.attribute,x-n,S-r,d),t.fillText(i,c,h,R),this.drawUnderLine(f,p,e,c,h,R,d,t))),u&&(t.highPerformanceRestore(),t.setTransformForCurrent())};if(e.isMultiLine)if(t.setTextStyleWithoutAlignBaseline(e.attribute,d,R),"horizontal"===m){const{multilineLayout:i}=e;if(!i)return void t.highPerformanceRestore();const{xOffset:a,yOffset:l}=i.bbox;E&&(s?s(t,e.attribute,d):B&&(t.setStrokeStyle(e,e.attribute,x-n,S-r,d),i.lines.forEach((e=>{t.strokeText(e.str,(e.leftOffset||0)+a+n,(e.topOffset||0)+l+r,R)})))),C&&(o?o(t,e.attribute,d):T&&(t.setCommonStyle(e,e.attribute,x-n,S-r,d),i.lines.forEach((i=>{var o,s;t.fillText(i.str,(i.leftOffset||0)+a+n,(i.topOffset||0)+l+r,R),this.drawMultiUnderLine(f,p,e,(i.leftOffset||0)+a+n,(i.topOffset||0)+l+r-(s=v,"top"===(o="bottom")?Math.ceil(.79*s):"middle"===o?Math.round(.3*s):"bottom"===o?Math.round(-.21*s):0)-.05*v,R,i.width,d,t)}))))}else{e.tryUpdateAABBBounds();const n=e.cache,{verticalList:r}=n;t.textAlign="left",t.textBaseline="top";const i=A*r.length;let a=0;r.forEach((e=>{const t=e.reduce(((e,t)=>e+(t.width||0)),0);a=re(t,a)}));let o=0,s=0;"bottom"===w?s=-i:"middle"===w&&(s=-i/2),"center"===_?o-=a/2:"right"===_&&(o-=a),r.forEach(((e,t)=>{const n=e.reduce(((e,t)=>e+(t.width||0)),0),r=a-n;let l=o;"center"===_?l+=r/2:"right"===_&&(l+=r),e.forEach((e=>{const{text:n,width:r,direction:a}=e;M(n,i-(t+1)*A+s,l,a),l+=r}))}))}else if("horizontal"===m){t.setTextStyle(e.attribute,d,R);const n=e.clipedText;let r=0;A!==v&&("top"===w?r=(A-v)/2:"middle"===w||"bottom"===w&&(r=-(A-v)/2)),M(n,0,r,0)}else{e.tryUpdateAABBBounds();const n=e.cache;if(n){t.setTextStyleWithoutAlignBaseline(e.attribute,d,R);const{verticalList:r}=n;let i=0;const a=r[0].reduce(((e,t)=>e+(t.width||0)),0);let o=0;"bottom"===w?o=-A:"middle"===w&&(o=-A/2),"center"===_?i-=a/2:"right"===_&&(i-=a),t.textAlign="left",t.textBaseline="top",r[0].forEach((e=>{const{text:t,width:n,direction:r}=e;M(t,o,i,r),i+=n}))}}P&&this.restoreTransformUseContext2d(e,d,R,t),this.afterRenderStep(e,t,n,r,C,E,T,B,d,i,o,s)}draw(e,t,n,r){const i=wr(e,null==r?void 0:r.theme).text,{keepDirIn3d:a=i.keepDirIn3d}=e.attribute,o=!a;this._draw(e,i,o,n,r)}drawUnderLine(e,t,n,r,i,a,o,s){if(t+e<=0)return;const{textAlign:l=o.textAlign,textBaseline:u=o.textBaseline,fontSize:c=o.fontSize,fill:d=o.fill,opacity:h=o.opacity,underlineOffset:f=o.underlineOffset,underlineDash:p=o.underlineDash,fillOpacity:g=o.fillOpacity}=n.attribute,m=n.clipedWidth,y=Xi(l,m),v=Ki(u,c,c),b={lineWidth:0,stroke:d,opacity:h,strokeOpacity:g};if(e){b.lineWidth=e,s.setStrokeStyle(n,b,r,i,o),p&&s.setLineDash(p),s.beginPath();const t=i+v+c+f;s.moveTo(r+y,t,a),s.lineTo(r+y+m,t,a),s.stroke()}if(t){b.lineWidth=t,s.setStrokeStyle(n,b,r,i,o),s.beginPath();const e=i+v+c/2;s.moveTo(r+y,e,a),s.lineTo(r+y+m,e,a),s.stroke()}}drawMultiUnderLine(e,t,n,r,i,a,o,s,l){if(t+e<=0)return;const{fontSize:u=s.fontSize,fill:c=s.fill,opacity:d=s.opacity,underlineOffset:h=s.underlineOffset,underlineDash:f=s.underlineDash,fillOpacity:p=s.fillOpacity}=n.attribute,g=Ki("alphabetic",u,u),m={lineWidth:0,stroke:c,opacity:d,strokeOpacity:p};let y=-3;if(e){m.lineWidth=e,l.setStrokeStyle(n,m,r,i,s),f&&l.setLineDash(f),l.beginPath();const t=i+g+u+y+h;l.moveTo(r+0,t,a),l.lineTo(r+0+o,t,a),l.stroke()}if(y=-1,t){m.lineWidth=t,l.setStrokeStyle(n,m,r,i,s),l.beginPath();const e=i+g+u/2+y;l.moveTo(r+0,e,a),l.lineTo(r+0+o,e,a),l.stroke()}}};As=Ss([tt(),ws(0,Je(yt)),ws(0,nt(qi)),_s("design:paramtypes",[Object])],As);var ks=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ts=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Bs=function(e,t){return function(n,r){t(n,r,e)}};const Cs=["","repeat-x","repeat-y","repeat"];let Es=class extends Wo{constructor(e){super(),this.imageRenderContribitions=e,this.numberType=Pi,this.builtinContributions=[os,ss],this.init(e)}drawShape(e,t,n,r,i,a,o,s){const l=wr(e).image,{width:u=l.width,height:c=l.height,repeatX:d=l.repeatX,repeatY:h=l.repeatY,x:f=l.x,y:p=l.y,cornerRadius:g=l.cornerRadius,image:m}=e.attribute,y=this.valid(e,l,o);if(!y)return;const{fVisible:v,sVisible:b,doFill:x,doStroke:S}=y;if(t.setShadowBlendStyle&&t.setShadowBlendStyle(e,l),this.beforeRenderStep(e,t,n,r,x,!1,v,!1,l,i,o),x)if(o)o(t,e.attribute,l);else if(v){if(!m||!e.resources)return;const i=e.resources.get(m);if("success"!==i.state)return;let a=!1;0===g||_(g)&&g.every((e=>0===e))||(t.beginPath(),Zo(t,n,r,u,c,g),t.save(),t.clip(),a=!0),t.setCommonStyle(e,e.attribute,n,r,l);let o=0;if("repeat"===d&&(o|=1),"repeat"===h&&(o|=2),o){const e=t.createPattern(i.data,Cs[o]);t.fillStyle=e,t.translate(n,r,!0),t.fillRect(0,0,u,c),t.translate(-n,-r,!0)}else t.drawImage(i.data,n,r,u,c);a&&t.restore()}S&&(s?s(t,e.attribute,l):b&&(t.setStrokeStyle(e,e.attribute,f-n,p-r,l),t.stroke())),this.afterRenderStep(e,t,n,r,x,!1,v,!1,l,i,o)}draw(e,t,n){const{image:r}=e.attribute;if(!r||!e.resources)return;const i=e.resources.get(r);if("loading"===i.state&&S(r))return void Jr.improveImageLoading(r);if("success"!==i.state)return;const{context:a}=t.drawParams;if(!a)return;const o=wr(e).image;this._draw(e,o,!1,n)}};Es=ks([tt(),Bs(0,Je(yt)),Bs(0,nt(Vi)),Ts("design:paramtypes",[Object])],Es);const Ps=Symbol.for("GraphicRender"),Rs=Symbol.for("RectRender"),Ms=Symbol.for("SymbolRender"),Ls=Symbol.for("TextRender"),Os=Symbol.for("RichTextRender"),Is=Symbol.for("ImageRender");class Ns{constructor(){this.name="HtmlAttributePlugin",this.activeEvent="onRegister",this._uid=He.GenAutoIncrementId(),this.key=this.name+this._uid,this.htmlMap={},this.renderId=0}activate(e){this.pluginService=e,e.stage.hooks.afterRender.tap(this.key,(t=>{t&&t===this.pluginService.stage&&this.drawHTML(e.stage.renderService)}))}deactivate(e){e.stage.hooks.afterRender.taps=e.stage.hooks.afterRender.taps.filter((e=>e.name!==this.key)),ir.graphicService.hooks.onRemove.unTap(this.key),ir.graphicService.hooks.onRelease.unTap(this.key),this.release()}getWrapContainer(e,t,n){let r;return r=t?"string"==typeof t?ir.global.getElementById(t):t:e.window.getContainer(),{wrapContainer:ir.global.createDom(Object.assign({tagName:"div",parent:r},n)),nativeContainer:r}}parseDefaultStyleFromGraphic(e){return function(e){const t={},n=e=>/^\d+(\.\d+)?$/.test(`${e}`)?`${e}px`:`${e}`;return["textAlign","fontFamily","fontVariant","fontStyle","fontWeight"].forEach((n=>{e[n]&&(t[Pe(n)]=e[n])})),["fontSize","lineHeight"].forEach((r=>{const i=Pe(r);m(e[r])||(t[i]=n(e[r]))})),y(e.maxLineWidth)&&(t["max-width"]=n(e.maxLineWidth)),e.underline?t["text-decoration"]="underline":e.lineThrough&&(t["text-decoration"]="line-through"),e.fill&&S(e.fill)&&(t.color=e.fill),t}("text"===e.type&&e.attribute?e.attribute:wr(e).text)}getTransformOfText(e){const t=wr(e).text,{textAlign:n=t.textAlign,textBaseline:r=t.textBaseline}=e.attribute,i=e.globalTransMatrix.toTransformAttrs(),{rotateDeg:a,scaleX:o,scaleY:s}=i,l={left:"0",start:"0",end:"-100%",center:"-50%",right:"-100%",top:"0",middle:"-50%",bottom:"-100%",alphabetic:"-79%"},u={left:"0",start:"0",end:"100%",center:"50%",right:"100%",top:"0",middle:"50%",bottom:"100%",alphabetic:"79%"};return{textAlign:n,transform:`translate(${l[n]},${l[r]}) rotate(${a}deg) scaleX(${o}) scaleY(${s})`,transformOrigin:`${u[n]} ${u[r]}`}}updateStyleOfWrapContainer(e,t,n,r,i){const{pointerEvents:a}=i;let o=this.parseDefaultStyleFromGraphic(e);o.display=!1!==e.attribute.visible?"block":"none",o.pointerEvents=!0===a?"all":a||"none",n.style.position||(n.style.position="absolute",r.style.position="relative");let s=0,l=0;const u=e.globalAABBBounds;let c=i.anchorType;if(m(c)&&(c="text"===e.type?"position":"boundsLeftTop"),"boundsLeftTop"===c&&(c="top-left"),"position"===c||u.empty()){const t=e.globalTransMatrix;s=t.e,l=t.f}else{const e=Ce(u,c);s=e.x,l=e.y}const d=ir.global.getElementTopLeft(r,!1),h=t.window.getTopLeft(!1),f=t.viewBox,p=s+h.left-d.left+f.x1,y=l+h.top-d.top+f.y1;if(o.left=`${p}px`,o.top=`${y}px`,"text"===e.type&&"position"===c&&(o=Object.assign(Object.assign({},o),this.getTransformOfText(e))),g(i.style)){const t=i.style({top:y,left:p,width:u.width(),height:u.height()},e,n);t&&(o=Object.assign(Object.assign({},o),t))}else v(i.style)?o=Object.assign(Object.assign({},o),i.style):S(i.style)&&i.style&&(o=Object.assign(Object.assign({},o),Ee(i.style)));ir.global.updateDom(n,{width:i.width,height:i.width,style:o})}clearCacheContainer(){this.htmlMap&&Object.keys(this.htmlMap).forEach((e=>{this.htmlMap[e]&&this.htmlMap[e].renderId!==this.renderId&&this.removeElement(e)})),this.renderId+=1}drawHTML(e){"browser"===ir.global.env&&(e.renderTreeRoots.sort(((e,t)=>{var n,r;return(null!==(n=e.attribute.zIndex)&&void 0!==n?n:Hn.zIndex)-(null!==(r=t.attribute.zIndex)&&void 0!==r?r:Hn.zIndex)})).forEach((e=>{this.renderGroupHTML(e)})),this.clearCacheContainer())}renderGroupHTML(e){this.renderGraphicHTML(e),e.forEachChildren((e=>{e.isContainer?this.renderGroupHTML(e):this.renderGraphicHTML(e)}))}removeElement(e){if(!this.htmlMap||!this.htmlMap[e])return;const{wrapContainer:t}=this.htmlMap[e];t&&ir.global.removeDom(t),this.htmlMap[e]=null}renderGraphicHTML(e){var t;const{html:n}=e.attribute;if(!n)return;const r=e.stage;if(!r)return;const{dom:i,container:a}=n;if(!i)return;const o=m(n.id)?`${null!==(t=e.id)&&void 0!==t?t:e._uid}_react`:n.id;if(this.htmlMap&&this.htmlMap[o]&&a&&a!==this.htmlMap[o].container&&this.removeElement(o),this.htmlMap&&this.htmlMap[o])"string"==typeof i?this.htmlMap[o].wrapContainer.innerHTML=i:i!==this.htmlMap[o].wrapContainer.firstChild&&(this.htmlMap[o].wrapContainer.removeChild(this.htmlMap[o].wrapContainer.firstChild),this.htmlMap[o].wrapContainer.appendChild(i));else{const{wrapContainer:e,nativeContainer:t}=this.getWrapContainer(r,a);e&&("string"==typeof i?e.innerHTML=i:e.appendChild(i),this.htmlMap||(this.htmlMap={}),this.htmlMap[o]={wrapContainer:e,nativeContainer:t,container:a,renderId:this.renderId})}if(!this.htmlMap||!this.htmlMap[o])return;const{wrapContainer:s,nativeContainer:l}=this.htmlMap[o];this.updateStyleOfWrapContainer(e,r,s,l,n),this.htmlMap[o].renderId=this.renderId}release(){"browser"===ir.global.env&&this.removeAllDom(this.pluginService.stage.defaultLayer)}removeAllDom(e){this.htmlMap&&(Object.keys(this.htmlMap).forEach((e=>{this.removeElement(e)})),this.htmlMap=null)}}let Us;function Ds(){!function(){if(null==Us)try{const e=document.createElement("canvas"),t=e.getContext("2d");Us=!!(window&&e.getBoundingClientRect&&requestAnimationFrame&&window.devicePixelRatio&&t&&t.isPointInPath&&t.isPointInStroke),Us&&(Us=!!document.createElement)}catch(e){Us=!1}}();const e=ir.global&&ir.global.env;return e?"browser"===e:Us}class zs extends Ns{constructor(){super(...arguments),this.name="ReactAttributePlugin",this.activeEvent="onRegister",this._uid=He.GenAutoIncrementId(),this.key=this.name+this._uid,this.htmlMap={}}removeElement(e){if(!this.htmlMap||!this.htmlMap[e])return;const{root:t,wrapContainer:n,unmount:r}=this.htmlMap[e];t?ir.global.getRequestAnimationFrame()((()=>{t.unmount()})):r&&r(),n&&ir.global.removeDom(n),this.htmlMap[e]=null}renderGraphicHTML(e){var t;const{react:n}=e.attribute;if(!n)return;const r=e.stage;if(!r)return;const i=r.params.ReactDOM,{element:a,container:o}=n;if(!a||!i||!i.createRoot&&!i.render)return;const s=m(n.id)?`${null!==(t=e.id)&&void 0!==t?t:e._uid}_react`:n.id;if(this.htmlMap&&this.htmlMap[s]&&o&&o!==this.htmlMap[s].container&&this.removeElement(s),this.htmlMap&&this.htmlMap[s])i.createRoot?this.htmlMap[s].root.render(a):i.render(a,this.htmlMap[s].wrapContainer);else{const{wrapContainer:e,nativeContainer:t}=this.getWrapContainer(r,o);if(e)if(this.htmlMap||(this.htmlMap={}),i.createRoot){const n=i.createRoot(e);n.render(a),this.htmlMap[s]={root:n,wrapContainer:e,nativeContainer:t,container:o,renderId:this.renderId}}else i.render(a,e),this.htmlMap[s]={wrapContainer:e,nativeContainer:t,container:o,renderId:this.renderId,unmount:()=>{i.unmountComponentAtNode(e)}}}if(!this.htmlMap||!this.htmlMap[s])return;const{wrapContainer:l,nativeContainer:u}=this.htmlMap[s];this.updateStyleOfWrapContainer(e,r,l,u,n),this.htmlMap[s].renderId=this.renderId}}var js=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};let Fs=class{configure(e){e.env===this.type&&e.setActiveEnvContribution(this)}getNativeAABBBounds(e){return new fe}removeDom(e){return!1}createDom(e){return null}updateDom(e,t){return!1}getDynamicCanvasCount(){return 999}getStaticCanvasCount(){return 999}getElementById(e){return document.getElementById(e)}getRootElement(){return document.body}loadJson(e){const t=fetch(e).then((e=>e.json()));return t.then((e=>({data:e,state:"success"}))).catch((()=>({data:null,state:"fail"}))),t}loadArrayBuffer(e){return fetch(e).then((e=>e.arrayBuffer())).then((e=>({data:e,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}loadBlob(e){return fetch(e).then((e=>e.blob())).then((e=>({data:e,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}getElementTop(e,t){return 0}getElementLeft(e,t){return 0}getElementTopLeft(e,t){return{top:0,left:0}}};Fs=js([tt()],Fs);let Ws=!1;const Hs=new $e((e=>{Ws||(Ws=!0,e(ps).toSelf().inSingletonScope(),e(Rs).to(ps).inSingletonScope(),e(Ps).toService(Rs),e(ns).toSelf(),e(ts).toSelf(),e(Gi).toService(ns),e(Gi).toService(ts),e(Gi).toService(Qo),bt(e,Gi))}));let $s=!1;const Vs=new $e((e=>{$s||($s=!0,e(vs).toSelf().inSingletonScope(),e(Ms).to(vs).inSingletonScope(),e(Ps).toService(Ms),e(Yi).toService(Qo),bt(e,Yi))}));let Gs=!1;const Ys=new $e((e=>{Gs||(Gs=!0,e(Ls).to(As).inSingletonScope(),e(Ps).toService(Ls),e(qi).toService(Qo),bt(e,qi))}));var qs=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Qs=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Xs=class extends Wo{constructor(){super(),this.numberType=Mi,this.builtinContributions=[xs],this.init()}drawShape(e,t,n,r,i){const a=wr(e).richtext,{strokeOpacity:o=a.strokeOpacity,opacity:s=a.opacity,fillOpacity:l=a.fillOpacity,visible:u=a.visible}=e.attribute;if(!e.valid||!u)return;const c=Hi(s,l,!0),d=Hi(s,o,!0);c&&(t.translate(n,r),this.beforeRenderStep(e,t,n,r,c,d,c,d,a,i),e.getFrameCache().draw(t,this.drawIcon),this.afterRenderStep(e,t,n,r,c,d,c,d,a,i))}drawIcon(e,t,n,r,i){var a;const o=wr(e).richtextIcon,{width:s=o.width,height:l=o.height,opacity:u=o.opacity,image:c,backgroundFill:d=o.backgroundFill,backgroundFillOpacity:h=o.backgroundFillOpacity,backgroundStroke:f=o.backgroundStroke,backgroundStrokeOpacity:p=o.backgroundStrokeOpacity,backgroundRadius:g=o.backgroundRadius,margin:m}=e.attribute,{backgroundWidth:y=s,backgroundHeight:v=l}=e.attribute;if(m&&(n+=e._marginArray[3],r+=e._marginArray[0]),e._hovered){const e=(y-s)/2,i=(v-l)/2;0===g?(t.beginPath(),t.rect(n-e,r-i,y,v)):(t.beginPath(),Zo(t,n-e,r-i,y,v,g)),d&&(t.globalAlpha=h,t.fillStyle=d,t.fill()),f&&(t.globalAlpha=p,t.strokeStyle=f,t.stroke())}const b=c&&(null===(a=null==e?void 0:e.resources)||void 0===a?void 0:a.get(c));b&&"success"===b.state&&(t.globalAlpha=u,t.drawImage(b.data,n,r,s,l))}draw(e,t,n){const r=wr(e).richtext;this._draw(e,r,!1,n)}};Xs=qs([tt(),Qs("design:paramtypes",[])],Xs);let Ks=!1;const Zs=new $e((e=>{Ks||(Ks=!0,e(Os).to(Xs).inSingletonScope(),e(Ps).toService(Os))}));let Js=!1;const el=new $e((e=>{Js||(Js=!0,e(Is).to(Es).inSingletonScope(),e(Ps).toService(Is),e(Vi).toService(Qo),bt(e,Vi))}));const tl=["x","y","dx","dy","scaleX","scaleY","angle","anchor","postMatrix","visible","clip","pickable","childrenPickable","zIndex","cursor"];class nl extends zi{constructor(e,t){super(e),(null==t?void 0:t.mode)&&(this.mode=t.mode,this.setMode(t.mode)),(null==t?void 0:t.skipDefault)&&(this.skipDefault=!0),this.setTheme({common:{strokeBoundsBuffer:0}}),this.attribute=e,this.onSetStage((()=>{this.render(),this.bindEvents()}))}setAttribute(e,t,n){x(this.attribute[e])&&x(t)&&!g(this.attribute[e])&&!g(t)?D(this.attribute[e],t):this.attribute[e]=t,tl.includes(e)||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!n&&!this.needUpdateTag(e)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}setAttributes(e,t){const n=Object.keys(e);this._mergeAttributes(e,n),n.every((e=>tl.includes(e)))||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!t&&!this.needUpdateTags(n)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}_mergeAttributes(e,t){m(t)&&(t=Object.keys(e));for(let n=0;n<t.length;n++){const r=t[n];!x(this.attribute[r])||g(this.attribute[r])||g(e[r])?this.attribute[r]=e[r]:D(this.attribute[r],e[r])}}bindEvents(){}_getNodeId(e){var t;return`${null!==(t=this.id)&&void 0!==t?t:this._uid}-${this.name}-${e}`}_dispatchEvent(e,t){var n;const r=new Br(e,t);r.manager=null===(n=this.stage)||void 0===n?void 0:n.eventSystem.manager,this.dispatchEvent(r)}}const rl=Symbol.for("MathPickerContribution"),il=Symbol.for("MathImagePicker"),al=Symbol.for("MathRectPicker"),ol=Symbol.for("MathSymbolPicker"),sl=Symbol.for("MathTextPicker"),ll=Symbol.for("CanvasImagePicker"),ul=Symbol.for("CanvasRectPicker"),cl=Symbol.for("CanvasSymbolPicker"),dl=Symbol.for("CanvasTextPicker"),hl=Symbol.for("CanvasRichTextPicker"),fl=Symbol.for("CanvasPickerContribution"),pl={onPointerDown:"pointerdown",onPointerUp:"pointerup",onPointerUpOutside:"pointerupoutside",onPointerTap:"pointertap",onPointerOver:"pointerover",onPointerMove:"pointermove",onPointerEnter:"pointerenter",onPointerLeave:"pointerleave",onPointerOut:"pointerout",onMouseDown:"mousedown",onMouseUp:"mouseup",onMouseUpOutside:"mouseupoutside",onMouseMove:"mousemove",onMouseOver:"mouseover",onMouseOut:"mouseout",onMouseEnter:"mouseenter",onMouseLeave:"mouseleave",onPinch:"pinch",onPinchStart:"pinchstart",onPinchEnd:"pinchend",onPan:"pan",onPanStart:"panstart",onPanEnd:"panend",onDrag:"drag",onDragStart:"dragstart",onDragEnter:"dragenter",onDragLeave:"dragleave",onDragOver:"dragover",onDragEnd:"dragend",onRightDown:"rightdown",onRightUp:"rightup",onRightUpOutside:"rightupoutside",onTouchStart:"touchstart",onTouchEnd:"touchend",onTouchEndOutside:"touchendoutside",onTouchMove:"touchmove",onTouchCancel:"touchcancel",onPress:"press",onPressUp:"pressup",onPressEnd:"pressend",onSwipe:"swipe",onDrop:"drop",onWeel:"wheel",onClick:"click",onDblClick:"dblclick"};var gl=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ml=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class yl{get x1(){return this.dom.getBoundingClientRect().left}get x2(){return this.dom.getBoundingClientRect().right}get y1(){return this.dom.getBoundingClientRect().top}get y2(){return this.dom.getBoundingClientRect().bottom}get width(){return this.dom.getBoundingClientRect().width}get height(){return this.dom.getBoundingClientRect().height}constructor(e){this.dom=e}}function vl(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("img");if(n.crossOrigin="anonymous",t){const t=new Blob([e],{type:"image/svg+xml"});e=window.URL.createObjectURL(t)}return n.src=e,n.complete?Promise.resolve(n):new Promise(((e,t)=>{n.onload=()=>{e(n)},n.onerror=()=>{t(new Error("加载失败"))}}))}let bl=class extends Fs{constructor(){super(),this.type="browser",this.supportEvent=!0;try{this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.supportsMouseEvents=!!globalThis.MouseEvent}catch(e){this.supportsTouchEvents=!1,this.supportsPointerEvents=!1,this.supportsPointerEvents=!1}this.applyStyles=!0}mapToCanvasPoint(e,t){var n,r;let i=0,a=0,o=0,s=0;if(e.changedTouches){const t=null!==(n=e.changedTouches[0])&&void 0!==n?n:{};i=t.clientX||0,a=t.clientY||0,o=i,s=a}else i=e.clientX||0,a=e.clientY||0,o=e.offsetX||0,s=e.offsetY||0;if(t){const e=i,n=a,o=t.getBoundingClientRect(),s=null===(r=t.getNativeHandler)||void 0===r?void 0:r.call(t).nativeCanvas;let l,u;return s&&(l=o.width/s.offsetWidth,u=o.height/s.offsetHeight),{x:(e-o.left)/(k(l)?l:1),y:(n-o.top)/(k(u)?u:1)}}return{x:o,y:s}}getNativeAABBBounds(e){let t=e;if("string"==typeof e&&(t=(new DOMParser).parseFromString(e,"text/html").firstChild,t.lastChild&&(t=t.lastChild.firstChild)),t.getBoundingClientRect){const e=t.getBoundingClientRect();return new yl(e)}return new fe}removeDom(e){return e.parentElement.removeChild(e),!0}updateDom(e,t){const{width:n,height:r,style:i}=t;return i&&(S(i)?e.setAttribute("style",i):Object.keys(i).forEach((t=>{e.style[t]=i[t]}))),null!=n&&(e.style.width=`${n}px`),null!=r&&(e.style.height=`${r}px`),!0}createDom(e){const{tagName:t="div",parent:n}=e,r=document.createElement(t);if(this.updateDom(r,e),n){const e=S(n)?this.getElementById(n):n;e&&e.appendChild&&e.appendChild(r)}return r}loadImage(e){return vl(e,!1).then((e=>({data:e,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}loadSvg(e){return vl(e,!0).then((e=>({data:e,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}createCanvas(e){var t,n;const r=document.createElement("canvas");e.id&&(r.id=null!==(t=e.id)&&void 0!==t?t:He.GenAutoIncrementId().toString());const i=null!==(n=e.dpr)&&void 0!==n?n:window.devicePixelRatio;return e.width&&e.height&&(r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.width=e.width*i,r.height=e.height*i),r}createOffscreenCanvas(e){var t;const n=null!==(t=e.dpr)&&void 0!==t?t:window.devicePixelRatio;return new OffscreenCanvas(e.width*n,e.height*n)}releaseCanvas(e){let t;t="string"==typeof e?document.getElementById(e):e,t&&t.parentElement&&t.parentElement.removeChild(t)}getDevicePixelRatio(){return window.devicePixelRatio}getRequestAnimationFrame(){return window.requestAnimationFrame}getCancelAnimationFrame(){return window.cancelAnimationFrame}addEventListener(e,t,n){return document.addEventListener(e,t,n)}removeEventListener(e,t,n){return document.removeEventListener(e,t,n)}dispatchEvent(e){return document.dispatchEvent(e)}getElementById(e){return document.getElementById(e)}getRootElement(){return document.body}getDocument(){return document}release(){}getElementTop(e,t){let n=e.offsetTop,r=e.offsetParent;for(;null!==r;)n+=r.offsetTop,r=r.offsetParent;return n}getElementLeft(e,t){let n=e.offsetLeft,r=e.offsetParent;for(;null!==r;)n+=r.offsetLeft,r=r.offsetParent;return n}getElementTopLeft(e,t){let n=e.offsetTop,r=e.offsetLeft,i=e.offsetParent;for(;null!==i;)n+=i.offsetTop,r+=i.offsetLeft,i=i.offsetParent;return{top:n,left:r}}};bl=gl([tt(),ml("design:paramtypes",[])],bl);var xl=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};let Sl=class{constructor(){this.type="image",this.numberType=Pi}contains(e,t,n){const{pickContext:r}=null!=n?n:{};return!!r&&!!e.AABBBounds.containsPoint(t)}};Sl=xl([tt()],Sl);let _l=!1;const wl=new $e(((e,t,n,r)=>{_l||(_l=!0,e(il).to(Sl).inSingletonScope(),e(Sl).toService(il))}));var Al=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},kl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Tl=function(e,t){return function(n,r){t(n,r,e)}};const Bl=new fe;let Cl=class{constructor(e){this.canvasRenderer=e,this.type="rect",this.numberType=Ri}contains(e,t,n){if(!e.AABBBounds.containsPoint(t))return!1;if("imprecise"===e.attribute.pickMode)return!0;const{pickContext:r}=null!=n?n:{};if(!r)return!1;const i=wr(e).rect,{cornerRadius:a=i.cornerRadius}=e.attribute;let{x:o=i.x,y:s=i.y}=e.attribute;r.highPerformanceSave();let l=!0;if(e.transMatrix.onlyTranslate()){const t=e.getOffsetXY(i);o+=t.x,s+=t.y,r.setTransformForCurrent()}else o=0,s=0,l=!1,r.transformFromMatrix(e.transMatrix,!0);let u=!0;if(!l||A(a,!0)&&0!==a||_(a)&&a.some((e=>0!==e)))u=!1,this.canvasRenderer.drawShape(e,r,o,s,{},null,((e,n,r)=>!!u||(u=e.isPointInPath(t.x,t.y),u)),((e,n,i)=>{if(u)return!0;const a=n.lineWidth||i.lineWidth,o=n.pickStrokeBuffer||i.pickStrokeBuffer;return r.lineWidth=a+o,u=e.isPointInStroke(t.x,t.y),u}));else if(u){const{fill:n=i.fill,stroke:r=i.stroke,lineWidth:a=i.lineWidth}=e.attribute;if(n)u=!0;else if(r){const n=e.AABBBounds;Bl.setValue(n.x1,n.y1,n.x2,n.y2),Bl.expand(-a/2),u=!Bl.containsPoint(t)}}return r.highPerformanceRestore(),u}};Cl=Al([tt(),Tl(0,Je(Rs)),kl("design:paramtypes",[Object])],Cl);let El=!1;const Pl=new $e(((e,t,n,r)=>{El||(El=!0,e(al).to(Cl).inSingletonScope(),e(rl).toService(al))}));let Rl=!1;const Ml=new $e(((e,t,n,r)=>{Rl||(Rl=!0,e(il).to(Sl).inSingletonScope(),e(Sl).toService(il))}));var Ll=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ol=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Il=function(e,t){return function(n,r){t(n,r,e)}};let Nl=class{constructor(e){this.canvasRenderer=e,this.type="symbol",this.numberType=Li}contains(e,t,n){if(!e.AABBBounds.containsPoint(t))return!1;if("imprecise"===e.attribute.pickMode)return!0;const{pickContext:r}=null!=n?n:{};if(!r)return!1;const i=wr(e).symbol;let{x:a=i.x,y:o=i.y}=e.attribute;if(r.highPerformanceSave(),e.transMatrix.onlyTranslate()){const t=e.getOffsetXY(i);a+=t.x,o+=t.y,r.setTransformForCurrent()}else a=0,o=0,r.transformFromMatrix(e.transMatrix,!0);let s=!1;return this.canvasRenderer.drawShape(e,r,a,o,{},null,((e,n,r)=>!!s||(s=e.isPointInPath(t.x,t.y),s)),((e,n,i)=>{if(s)return!0;const a=n.lineWidth||i.lineWidth,o=n.pickStrokeBuffer||i.pickStrokeBuffer;return r.lineWidth=a+o,s=e.isPointInStroke(t.x,t.y),s})),r.highPerformanceRestore(),s}};Nl=Ll([tt(),Il(0,Je(Ms)),Ol("design:paramtypes",[Object])],Nl);let Ul=!1;const Dl=new $e(((e,t,n,r)=>{Ul||(Ul=!0,e(ol).to(Nl).inSingletonScope(),e(rl).toService(ol))}));var zl=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};let jl=class{constructor(){this.type="text",this.numberType=Oi}contains(e,t,n){return!!e.AABBBounds.containsPoint(t)}};jl=zl([tt()],jl);let Fl=!1;const Wl=new $e(((e,t,n,r)=>{Fl||(Fl=!0,e(sl).to(jl).inSingletonScope(),e(rl).toService(sl))}));var Hl=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},$l=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Vl=function(e,t){return function(n,r){t(n,r,e)}};const Gl=new fe;let Yl=class{constructor(e){this.canvasRenderer=e,this.type="rect",this.numberType=Ri}contains(e,t,n){if(!e.AABBBounds.containsPoint(t))return!1;if("imprecise"===e.attribute.pickMode)return!0;const{pickContext:r}=null!=n?n:{};if(!r)return!1;const i=wr(e).rect,{cornerRadius:a=i.cornerRadius}=e.attribute;let{x:o=i.x,y:s=i.y}=e.attribute;r.highPerformanceSave();let l=!0;if(e.transMatrix.onlyTranslate()){const t=e.getOffsetXY(i);o+=t.x,s+=t.y,r.setTransformForCurrent()}else o=0,s=0,l=!1,r.transformFromMatrix(e.transMatrix,!0);let u=!0;if(!l||e.shadowRoot||A(a,!0)&&0!==a||_(a)&&a.some((e=>0!==e)))u=!1,this.canvasRenderer.drawShape(e,r,o,s,{},null,((e,n,r)=>!!u||(u=e.isPointInPath(t.x,t.y),u)),((e,n,i)=>{if(u)return!0;const a=n.lineWidth||i.lineWidth,o=n.pickStrokeBuffer||i.pickStrokeBuffer;return r.lineWidth=Ho(r,a+o,r.dpr),u=e.isPointInStroke(t.x,t.y),u}));else{const{fill:n=i.fill,stroke:r=i.stroke,lineWidth:a=i.lineWidth}=e.attribute;if(n)u=!0;else if(r){const n=e.AABBBounds;Gl.setValue(n.x1,n.y1,n.x2,n.y2),Gl.expand(-a/2),u=!Gl.containsPoint(t)}}return r.highPerformanceRestore(),u}};Yl=Hl([tt(),Vl(0,Je(Rs)),$l("design:paramtypes",[Object])],Yl);let ql=!1;const Ql=new $e(((e,t,n,r)=>{ql||(ql=!0,e(ul).to(Yl).inSingletonScope(),e(fl).toService(ul))}));var Xl=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};let Kl=class extends Wo{};Kl=Xl([tt()],Kl);var Zl=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Jl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},eu=function(e,t){return function(n,r){t(n,r,e)}};let tu=class extends Kl{constructor(e){super(),this.canvasRenderer=e,this.type="symbol",this.numberType=Li}contains(e,t,n){const{pickContext:r}=null!=n?n:{};if(!r)return!1;const i=e.getParsedPath();if(!r.camera){if(!e.AABBBounds.containsPoint(t))return!1;if(i.isSvg||"imprecise"===e.attribute.pickMode)return!0}r.highPerformanceSave();const a=wr(e).symbol,o=this.transform(e,a,r),{x:s,y:l,z:u,lastModelMatrix:c}=o;let d=t;if(r.camera){d=t.clone();const n=e.parent.globalTransMatrix;d.x=n.a*t.x+n.c*t.y+n.e,d.y=n.b*t.x+n.d*t.y+n.f}this.canvasRenderer.z=u;let h=!1;return this.canvasRenderer.drawShape(e,r,s,l,{},null,((e,t,n)=>!!h||(h=e.isPointInPath(d.x,d.y),h)),((e,t,n)=>{if(h)return!0;const i=t.lineWidth||n.lineWidth,a=t.pickStrokeBuffer||n.pickStrokeBuffer;return r.lineWidth=Ho(r,i+a,r.dpr),h=e.isPointInStroke(d.x,d.y),h})),this.canvasRenderer.z=0,r.modelMatrix!==c&&Po.free(r.modelMatrix),r.modelMatrix=c,r.highPerformanceRestore(),h}};tu=Zl([tt(),eu(0,Je(Ms)),Jl("design:paramtypes",[Object])],tu);let nu=!1;const ru=new $e(((e,t,n,r)=>{nu||(nu=!0,e(cl).to(tu).inSingletonScope(),e(fl).toService(cl))}));var iu=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},au=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ou=function(e,t){return function(n,r){t(n,r,e)}};let su=class extends Kl{constructor(e){super(),this.canvasRenderer=e,this.type="text",this.numberType=Oi}contains(e,t,n){const{pickContext:r}=null!=n?n:{};if(!r)return!1;const i=e.AABBBounds;if(!r.camera)return!!i.containsPoint(t);r.highPerformanceSave();const a=wr(e).text,{keepDirIn3d:o=a.keepDirIn3d}=e.attribute,s=!o,l=this.transform(e,a,r,s),{x:u,y:c,z:d,lastModelMatrix:h}=l;this.canvasRenderer.z=d;let f=t;if(r.camera){f=t.clone();const n=e.parent.globalTransMatrix;f.x=n.a*t.x+n.c*t.y+n.e,f.y=n.b*t.x+n.d*t.y+n.f}let p=!1;return this.canvasRenderer.drawShape(e,r,u,c,{},null,((t,n,r)=>{if(p)return!0;const{fontSize:i=a.fontSize,textBaseline:o=a.textBaseline,textAlign:s=a.textAlign}=e.attribute,l=e.AABBBounds,h=l.height(),g=l.width(),m=Ki(o,h,i),y=Xi(s,g);return t.rect(y+u,m+c,g,h,d),p=t.isPointInPath(f.x,f.y),p}),((e,t,n)=>p)),this.canvasRenderer.z=0,r.modelMatrix!==h&&Po.free(r.modelMatrix),r.modelMatrix=h,r.highPerformanceRestore(),p}};su=iu([tt(),ou(0,Je(Ls)),au("design:paramtypes",[Object])],su);let lu=!1;const uu=new $e(((e,t,n,r)=>{lu||(lu=!0,e(dl).to(su).inSingletonScope(),e(fl).toService(dl))}));var cu=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},du=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hu=function(e,t){return function(n,r){t(n,r,e)}};let fu=class{constructor(e){this.canvasRenderer=e,this.type="richtext",this.numberType=Mi}contains(e,t,n){return!!e.AABBBounds.containsPoint(t)}};fu=cu([tt(),hu(0,Je(Os)),du("design:paramtypes",[Object])],fu);let pu=!1;const gu=new $e(((e,t,n,r)=>{pu||(pu=!0,e(hl).to(fu).inSingletonScope(),e(fl).toService(hl))}));var mu=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};let yu=class{constructor(){this.type="image",this.numberType=Pi}contains(e,t,n){const{pickContext:r}=null!=n?n:{};return!!r&&!!e.AABBBounds.containsPoint(t)}};yu=mu([tt()],yu);let vu=!1;const bu=new $e(((e,t,n,r)=>{vu||(vu=!0,e(ll).to(yu).inSingletonScope(),e(fl).toService(ll))})),xu=Ds();function Su(){Su.__loaded||(Su.__loaded=!0,Do.RegisterGraphicCreator("group",ji))}Su.__loaded=!1;const _u=Su;function wu(){wu.__loaded||(wu.__loaded=!0,Do.RegisterGraphicCreator("image",vo),fr.load(el),fr.load(xu?bu:wl))}wu.__loaded=!1;const Au=wu;function ku(){ku.__loaded||(ku.__loaded=!0,Do.RegisterGraphicCreator("rect",fo),fr.load(Hs),fr.load(xu?Ql:Pl))}ku.__loaded=!1;const Tu=ku;function Bu(){Bu.__loaded||(Bu.__loaded=!0,Do.RegisterGraphicCreator("richtext",wo),fr.load(Zs),fr.load(xu?gu:Ml))}Bu.__loaded=!1;const Cu=Bu;function Eu(){Eu.__loaded||(Eu.__loaded=!0,Do.RegisterGraphicCreator("symbol",uo),fr.load(Vs),fr.load(xu?ru:Dl))}Eu.__loaded=!1;const Pu=Eu;function Ru(){Ru.__loaded||(Ru.__loaded=!0,Do.RegisterGraphicCreator("text",ta),fr.load(Ys),fr.load(xu?uu:Wl))}Ru.__loaded=!1;const Mu=Ru;function Lu(){Lu.__loaded||(Lu.__loaded=!0,Do.RegisterGraphicCreator("wrapText",ia))}Lu.__loaded=!1;const Ou=Lu,Iu="PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";var Nu;function Uu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return{width:0,height:0};const r=jo({text:e,fontFamily:t.fontFamily||n.fontFamily||Iu,fontSize:t.fontSize||n.fontSize||12,fontWeight:t.fontWeight||n.fontWeight,textAlign:t.textAlign||"center",textBaseline:t.textBaseline,ellipsis:!!t.ellipsis,maxLineWidth:t.maxLineWidth||1/0,lineHeight:t.fontSize||n.fontSize||12});return{width:r.width(),height:r.height()}}function Du(e){return"rich"===function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type";var n,r;return v(e.text)&&"type"in e.text?null!==(n=e.text.type)&&void 0!==n?n:"text":t in e&&null!==(r=e[t])&&void 0!==r?r:"text"}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type")}!function(e){e.selected="selected",e.selectedReverse="selected_reverse",e.hover="hover",e.hoverReverse="hover_reverse"}(Nu||(Nu={})),Nu.selectedReverse,Nu.selected,Nu.hover,Nu.hoverReverse;var zu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};_u(),Tu(),Pu(),Cu(),Mu();let ju=class e extends nl{getBgRect(){return this._bgRect}getTextShape(){return this._textShape}constructor(t,n){super((null==n?void 0:n.skipDefault)?t:D({},e.defaultAttributes,t)),this.name="tag",this._tagStates=[],this._rectStates=[],this._symbolStates=[],this._textStates=[]}render(){var e,t,n;this.cacheStates();const{text:r="",textStyle:i={},shape:a={},panel:o={},space:s=4,minWidth:l,maxWidth:u,padding:c=4,visible:d,state:h,type:f,textAlwaysCenter:g,containerTextAlign:b}=this.attribute,x=function(e){if(k(e))return[e,e,e,e];if(_(e)){const t=e.length;if(1===t){const t=e[0];return[t,t,t,t]}if(2===t){const[t,n]=e;return[t,n,t,n]}if(3===t){const[t,n,r]=e;return[t,n,r,n]}if(4===t)return e}if(v(e)){const{top:t=0,right:n=0,bottom:r=0,left:i=0}=e;return[t,n,r,i]}return[0,0,0,0]}(c),S=this.createOrUpdateChild("tag-content",{x:0,y:0,zIndex:1},"group");let w,T=x[1]+x[3],B=x[0]+x[2],C=0,E=0;const{visible:P}=a,R=zu(a,["visible"]);if(p(P)){const e=(null==R?void 0:R.size)||10,t=A(e)?e:Math.max(e[0],e[1]);w=S.createOrUpdateChild("tag-shape",Object.assign(Object.assign({symbolType:"circle",size:e,strokeBoundsBuffer:0},R),{visible:P,x:t/2,y:t/2}),"symbol"),M(null==h?void 0:h.shape)||(w.states=h.shape),P&&(E=t+s)}let L;if(T+=E,C+=E,Du({text:r})||"rich"===f){const e=Object.assign(Object.assign(Object.assign({},function(e){var t,n;return e.width=null!==(t=e.width)&&void 0!==t?t:0,e.height=null!==(n=e.height)&&void 0!==n?n:0,e.maxWidth=e.maxLineWidth,e.textConfig=e.text.text||e.text,e}(Object.assign({type:f,text:r},i))),i),{visible:y(r)&&!1!==d,x:C,y:0});L=S.createOrUpdateChild("tag-text",e,"richtext");const{visible:t}=o,n=zu(o,["visible"]);if(d&&p(t)){const e=this.createOrUpdateChild("tag-panel",Object.assign(Object.assign({},n),{visible:t&&!!r,x:L.AABBBounds.x1,y:L.AABBBounds.y1,width:L.AABBBounds.width(),height:L.AABBBounds.height()}),"rect");if(M(null==h?void 0:h.panel)||(e.states=h.panel),n.customShape){const t=n.customShape;e.pathProxy=e=>t(L.attribute,e,new On)}this._bgRect=e}}else{const s=Object.assign(Object.assign({text:v(r)&&"type"in r&&"text"===r.type?r.text:r,visible:y(r)&&!1!==d,lineHeight:null==i?void 0:i.fontSize},i),{x:C,y:0});m(s.lineHeight)&&(s.lineHeight=i.fontSize),L=S.createOrUpdateChild("tag-text",s,"text"),M(null==h?void 0:h.text)||(L.states=h.text);const c=Uu(s.text,i,null===(t=null===(e=this.stage)||void 0===e?void 0:e.getTheme())||void 0===t?void 0:t.text),f=c.width,_=c.height;T+=f;const k=null!==(n=a.size)&&void 0!==n?n:10,P=A(k)?k:Math.max(k[0],k[1]);B+=Math.max(_,a.visible?P:0);const{textAlign:R,textBaseline:O}=i;(y(l)||y(u))&&(y(l)&&T<l&&(T=l),y(u)&&T>u&&(T=u,L.setAttribute("maxLineWidth",u-x[1]-x[2])));let I=0,N=0,U=0;"left"===R||"start"===R?U=1:"right"===R||"end"===R?U=-1:"center"===R&&(U=0),U?U<0?(I-=T,w&&w.setAttribute("x",(w.attribute.x||0)-f),S.setAttribute("x",-x[1]-E)):U>0&&S.setAttribute("x",x[3]):(I-=T/2,w&&w.setAttribute("x",(w.attribute.x||0)-f/2),S.setAttribute("x",-E/2));const D="right"===b||"end"===b,z="left"===b||"start"===b;if((b?"center"===b:g)&&U){const e=T-x[1]-x[3],t=f+E,n=1===U?(e-t)/2+E+f/2:x[0]+E-(T/2+t/2-E)+f/2;if(L.setAttributes({x:n,textAlign:"center"}),w){const e=n-f/2-E+P/2;w.setAttributes({x:e})}}if(z&&1!==U){const e=T-x[1]-x[3],t=0===U?-e/2+E/2:-T+x[3]+x[1]+E,n=t+E;if(L.setAttributes({x:n,textAlign:"left"}),w){const e=t+P/2;w.setAttributes({x:e})}}if(D&&-1!==U){const e=T-x[1]-x[3],t=0===U?e/2+E/2:e;if(L.setAttributes({x:t,textAlign:"right"}),w){const e=t-f-E+P/2;w.setAttributes({x:e})}}"middle"===O?(N-=B/2,w&&w.setAttribute("y",0)):"bottom"===O?(N-=B,w&&w.setAttribute("y",-_/2),S.setAttribute("y",-x[2])):"top"===O&&(S.setAttribute("y",x[0]),w&&w.setAttribute("y",_/2));const{visible:j}=o,F=zu(o,["visible"]);if(d&&p(j)){const e=this.createOrUpdateChild("tag-panel",Object.assign(Object.assign({},F),{visible:j&&!!r,x:I,y:N,width:T,height:B}),"rect");if(M(null==h?void 0:h.panel)||(e.states=h.panel),F.customShape){const t=F.customShape;e.pathProxy=e=>t(L.attribute,e,new On)}this._bgRect=e}}this._textShape=L,this._symbol=w,this.resetStates()}initAttributes(t,n){t=(null==n?void 0:n.skipDefault)?t:D({},e.defaultAttributes,t),super.initAttributes(t),this.render()}addState(e,t,n){super.addState(e,t,n),this._textShape&&this._textShape.addState(e,t,n),this._bgRect&&this._bgRect.addState(e,t,n),this._symbol&&this._symbol.addState(e,t,n)}removeState(e,t){super.removeState(e,t),this._textShape&&this._textShape.removeState(e,t),this._bgRect&&this._bgRect.removeState(e,t),this._symbol&&this._symbol.removeState(e,t)}cacheStates(){var e,t,n,r,i,a,o,s,l,u,c,d,h,f;this._tagStates=null!==(t=null===(e=this.currentStates)||void 0===e?void 0:e.slice())&&void 0!==t?t:[],this._rectStates=null!==(i=null===(r=null===(n=this._bgRect)||void 0===n?void 0:n.currentStates)||void 0===r?void 0:r.slice())&&void 0!==i?i:[],this._symbolStates=null!==(s=null===(o=null===(a=this._symbol)||void 0===a?void 0:a.currentStates)||void 0===o?void 0:o.slice())&&void 0!==s?s:[],this._textStates=null!==(c=null===(u=null===(l=this._textShape)||void 0===l?void 0:l.currentStates)||void 0===u?void 0:u.slice())&&void 0!==c?c:[],this.clearStates(),null===(d=this._bgRect)||void 0===d||d.clearStates(),null===(h=this._symbol)||void 0===h||h.clearStates(),null===(f=this._textShape)||void 0===f||f.clearStates()}resetStates(){var e,t,n;this._tagStates.length&&this.useStates(this._tagStates),this._rectStates.length&&(null===(e=this._bgRect)||void 0===e||e.useStates(this._rectStates)),this._symbolStates.length&&(null===(t=this._symbol)||void 0===t||t.useStates(this._symbolStates)),this._textStates.length&&(null===(n=this._textShape)||void 0===n||n.useStates(this._textStates))}};ju.defaultAttributes={visible:!0,textStyle:{fontSize:12,fill:"#000",textAlign:"left",textBaseline:"top"},space:4,padding:4,shape:{fill:"#000"}};_u(),Tu(),Mu(),Au();class Fu extends nl{constructor(e,t){super((null==t?void 0:t.skipDefault)?e:D({},Fu.defaultAttributes,e)),this._handlePointerUp=()=>{this.attribute.disabled||(this.attribute.checked?(this.setAttribute("checked",!1),this.setAttribute("indeterminate",!1)):(this.setAttribute("checked",!0),this.setAttribute("indeterminate",!1)),this._dispatchEvent("checkbox_state_change",{eventType:"checkbox_state_change",checked:this.attribute.checked}),this.stage.renderNextFrame())},this.renderGroup(),this.onBeforeAttributeUpdate=(e,t,n)=>{"interactive"in e&&this.setAttribute("pickable",e.interactive),"disabled"in e&&this.setAttribute("cursor",e.disable?this.attribute.disableCursor:this.attribute.cursor)},this.addEventListener("pointerup",this._handlePointerUp)}render(){this.removeAllChild(!0),this.renderBox(),this.renderIcon(),this.renderText(),this.layout()}renderBox(){this._box=new ho(D({},this.attribute.box));const e=this.attribute.checked||this.attribute.indeterminate;e&&this.attribute.disabled?this._box.setAttributes({fill:this.attribute.box.disableCheckedFill,stroke:this.attribute.box.disableCheckedStroke}):e&&this._box.setAttributes({fill:this.attribute.box.checkedFill,stroke:this.attribute.box.checkedStroke}),this.appendChild(this._box)}renderIcon(){this._checkIcon=new yo(D({image:this.attribute.icon.checkIconImage},this.attribute.icon)),this.appendChild(this._checkIcon),this._indeterminateIcon=new yo(D({image:this.attribute.icon.indeterminateIconImage},this.attribute.icon)),this.appendChild(this._indeterminateIcon),this.attribute.checked?(this._checkIcon.setAttribute("visible",!0),this._indeterminateIcon.setAttribute("visible",!1)):this.attribute.indeterminate?(this._checkIcon.setAttribute("visible",!1),this._indeterminateIcon.setAttribute("visible",!0)):(this._checkIcon.setAttribute("visible",!1),this._indeterminateIcon.setAttribute("visible",!1))}renderText(){this._text=new ea(D({wrap:!0},this.attribute.text)),this.attribute.disabled&&this._text.setAttribute("fill",this.attribute.text.disableFill),this.appendChild(this._text)}renderGroup(){this.attribute.interactive||this.setAttribute("pickable",!1),this.attribute.disabled&&this.setAttribute("cursor",this.attribute.disableCursor)}layout(){const e=this.attribute.box.height,t=this.attribute.icon.height,n=this._text.AABBBounds.height(),r=Math.max(e,t,n),i=r/2-e/2,a=r/2-t/2,o=r/2-n/2,s=this.attribute.box.width,l=this.attribute.icon.width,u=Math.max(s,l),c=u/2-s/2,d=u/2-l/2,h=u+this.attribute.spaceBetweenTextAndIcon;this._box.setAttributes({x:c,y:i}),this._checkIcon.setAttributes({x:d,y:a}),this._indeterminateIcon.setAttributes({x:d,y:a}),this._text.setAttributes({x:h,y:o})}initAttributes(e,t){e=(null==t?void 0:t.skipDefault)?e:D({},Fu.defaultAttributes,e),super.initAttributes(e),this.renderGroup(),this.render()}}Fu.defaultAttributes={interactive:!0,disabled:!1,checked:!1,indeterminate:!1,cursor:"pointer",disableCursor:"not-allowed",spaceBetweenTextAndIcon:8,text:{text:"text",fontSize:14,fill:"#000",disableFill:"rgb(201,205,212)",textBaseline:"top",pickable:!1},icon:{checkIconImage:'<svg width="200" height="200" viewBox="0 0 1024 1024" fill="#fff" xmlns="http://www.w3.org/2000/svg"><path d="M877.44815445 206.10060629a64.72691371 64.72691371 0 0 0-95.14856334 4.01306852L380.73381888 685.46812814 235.22771741 533.48933518a64.72691371 64.72691371 0 0 0-92.43003222-1.03563036l-45.82665557 45.82665443a64.72691371 64.72691371 0 0 0-0.90617629 90.61767965l239.61903446 250.10479331a64.72691371 64.72691371 0 0 0 71.19960405 15.14609778 64.33855261 64.33855261 0 0 0 35.08198741-21.23042702l36.24707186-42.71976334 40.5190474-40.77795556-3.36579926-3.49525333 411.40426297-486.74638962a64.72691371 64.72691371 0 0 0-3.88361443-87.64024149l-45.3088404-45.43829334z"></path></svg>',indeterminateIconImage:'<svg width="200" height="200" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5" d="M5 12h14"/></svg>',width:10,height:10,pickable:!1},box:{width:14,height:14,cornerRadius:2,fill:"#fff",stroke:"rgb(229,230,235)",disableFill:"rgb(242,243,245)",checkedFill:"rgb(22, 93, 255)",checkedStroke:"rgb(22, 93, 255)",disableCheckedFill:"rgb(148, 191, 255)",disableCheckedStroke:"rgb(148, 191, 255)",pickable:!1}},_u(),Tu(),Ou(),Au();let Wu=class e extends nl{constructor(t,n){super((null==n?void 0:n.skipDefault)?t:D({},e.defaultAttributes,t)),this._handlePointerUp=()=>{this.attribute.disabled||this.attribute.checked||(this.setAttribute("checked",!0),this._dispatchEvent("radio_checked",{eventType:"radio_checked",target:this}),this.stage.renderNextFrame())},this.renderGroup(),this.onBeforeAttributeUpdate=(e,t,n)=>{"interactive"in e&&this.setAttribute("pickable",e.interactive),"disabled"in e&&this.setAttribute("cursor",e.disable?this.attribute.disableCursor:this.attribute.cursor)},this.addEventListener("pointerup",this._handlePointerUp)}render(){this.removeAllChild(!0),this.renderCircle(),this.renderText(),this.layout()}renderCircle(){this._circle=new ko(D({},this.attribute.circle));const e=this.attribute.checked;e&&this.attribute.disabled?this._circle.setAttributes({fill:this.attribute.circle.disableCheckedFill,stroke:this.attribute.circle.disableCheckedStroke}):e&&this._circle.setAttributes({fill:this.attribute.circle.checkedFill,stroke:this.attribute.circle.checkedStroke}),this.appendChild(this._circle)}renderText(){this._text=new ra(D({},this.attribute.text)),this.attribute.disabled&&this._text.setAttribute("fill",this.attribute.text.disableFill),this.appendChild(this._text)}renderGroup(){this.attribute.interactive||this.setAttribute("pickable",!1),this.attribute.disabled&&this.setAttribute("cursor",this.attribute.disableCursor)}layout(){const e=2*(this.attribute.circle.outerRadius+this.attribute.circle.lineWidth),t=this._text.AABBBounds.height(),n=Math.max(e,t),r=n/2-e/2+this.attribute.circle.outerRadius+this.attribute.circle.lineWidth,i=n/2-t/2,a=2*(this.attribute.circle.outerRadius+this.attribute.circle.lineWidth),o=this.attribute.circle.outerRadius+this.attribute.circle.lineWidth,s=a+this.attribute.spaceBetweenTextAndIcon;this._circle.setAttributes({x:o,y:r}),this._text.setAttributes({x:s,y:i})}initAttributes(t,n){t=(null==n?void 0:n.skipDefault)?t:D({},e.defaultAttributes,t),super.initAttributes(t),this.renderGroup(),this.render()}};Wu.defaultAttributes={interactive:!0,disabled:!1,checked:!1,cursor:"pointer",disableCursor:"not-allowed",spaceBetweenTextAndIcon:8,text:{text:"text",fontSize:14,fill:"#000",disableFill:"rgb(201,205,212)",textBaseline:"top",pickable:!1},circle:{outerRadius:7,innerRadius:3,startAngle:0,endAngle:2*Math.PI,lineWidth:1,fill:"#fff",stroke:"rgb(229,230,235)",disableFill:"rgb(242,243,245)",checkedFill:"rgb(22, 93, 255)",checkedStroke:"rgb(22, 93, 255)",disableCheckedFill:"rgb(148, 191, 255)",disableCheckedStroke:"rgb(148, 191, 255)",pickable:!1}};class Hu extends zs{removeElement(e){super.removeElement(e),delete this.htmlMap[e]}renderGraphicHTML(e){const{react:t}=e.attribute;if(!t)return;const n=e.stage;if(!n)return;const r=n.params.ReactDOM,{element:i,container:a}=t;if(!(i&&r&&r.createRoot))return;const o=m(t.id)?`${e.id??e._uid}_react`:t.id;if(this.htmlMap&&this.htmlMap[o]&&a&&a!==this.htmlMap[o].container&&this.removeElement(o),this.htmlMap&&this.htmlMap[o])this.htmlMap[o].root.render(i);else{const{wrapContainer:e,nativeContainer:t}=this.getWrapContainer(n,a);if(e){const n=r.createRoot(e);n.render(i),this.htmlMap||(this.htmlMap={}),this.htmlMap[o]={root:n,wrapContainer:e,nativeContainer:t,container:a,renderId:this.renderId}}}if(!this.htmlMap||!this.htmlMap[o])return;const{wrapContainer:s,nativeContainer:l}=this.htmlMap[o];this.updateStyleOfWrapContainer(e,n,s,l,t),this.htmlMap[o].renderId=this.renderId}getWrapContainer(e,t,n){let r;return r=t?"string"==typeof t?ir.global.getElementById(t):t:e.window.getContainer(),{wrapContainer:ir.global.createDom({tagName:"div",parent:r,...n}),nativeContainer:r}}updateStyleOfWrapContainer(e,t,n,r,i){const{pointerEvents:a}=i;let o=this.parseDefaultStyleFromGraphic(e);o.display=!1!==e.attribute.visible?"block":"none",o.pointerEvents=!0===a?"all":a||"none",n.style.position||(n.style.position="absolute",r.style.position="relative");let s=0,l=0;const u=e.globalAABBBounds;let c=i.anchorType;if(m(c)&&(c="text"===e.type?"position":"boundsLeftTop"),"boundsLeftTop"===c&&(c="top-left"),"position"===c||u.empty()){const t=e.globalTransMatrix;s=t.e,l=t.f}else{const e=Ce(u,c);s=e.x,l=e.y}const d=ir.global.getElementTopLeft(r,!1),h=t.window.getTopLeft(!1),f=s+h.left-d.left,p=l+h.top-d.top;if(o.left=`${f}px`,o.top=`${p}px`,"text"===e.type&&"position"===c&&(o={...o,...this.getTransformOfText(e)}),g(i.style)){const t=i.style({top:p,left:f,width:u.width(),height:u.height()},e,n);t&&(o={...o,...t})}else v(i.style)?o={...o,...i.style}:S(i.style)&&i.style&&(o={...o,...Ee(i.style)});ir.global.updateDom(n,{width:i.width,height:i.width,style:o,graphic:e})}}const $u=new $e(((e,t,n,r)=>{e(Vu).toSelf().inSingletonScope(),n(_t)?r(_t).toService(Vu):e(_t).toService(Vu)}));class Vu extends bl{updateDom(e,n){const r=e.parentElement;if(r){const i=parseInt(n.style.top,10),a=parseInt(n.style.left,10);let o,s;if(e.style.display="none"){const e=t.getTargetCell(n.graphic);o=e.attribute.width??1,s=e.attribute.height??1}else o=e.offsetWidth,s=e.offsetHeight;if(i+s<0||a+o<0||i>r.offsetHeight||a>r.offsetWidth)return e.style.display="none",!1}const{width:i,height:a,style:o}=n;return o&&(S(o)?e.setAttribute("style",o):Object.keys(o).forEach((t=>{e.style[t]=o[t]}))),null!=i&&(e.style.width=`${i}px`),null!=a&&(e.style.height=`${a}px`),!0}}Ds()&&fr.load($u);const Gu=["children","hooks","ref",...je,"skipFunctionDiff","onError","onReady","option","records","container","vtableConstrouctor"],Yu=(e,t)=>`${e&&e.type&&(e.type.displayName||e.type.name)}-${t}`,qu=u.forwardRef(((e,t)=>{const[n,r]=l.useState(0),i=l.useRef({});l.useImperativeHandle(t,(()=>i.current?.table));const a=!!e.option,o=!!e.records,s=l.useRef(!1),d=l.useRef(z(e,Gu)),h=l.useRef(null),f=l.useRef(e.records),p=u.useRef(null),g=!!e.skipFunctionDiff,y=l.useCallback((e=>a&&e.option?o&&e.records?{...e.option,clearDOM:!1,records:e.records}:{...e.option,clearDOM:!1}:{records:e.records,...d.current,...h.current,clearDOM:!1,customConfig:{createReactContainer:!0}}),[a,o]),v=l.useCallback((e=>{const t=new e.vtableConstrouctor(e.container,y(e));t.scenegraph.stage.reactAttribute=e.ReactDOM,t.scenegraph.stage.pluginService.register(new Hu),t.scenegraph.stage.params.ReactDOM=e.ReactDOM,i.current={...i.current,table:t},s.current=!1}),[y]),b=l.useCallback((()=>{if(!s.current){if(!i.current||!i.current.table)return;We(i.current.table,e,p.current,ze),r(n+1),e.onReady&&e.onReady(i.current.table,0===n)}}),[n,r,e]),x=l.useCallback((()=>{i.current.table&&(i.current.table.render(),b())}),[b]);return l.useEffect((()=>{const t=a?null:(e=>{const t={};return Ue(e.children).map(((e,n)=>{const r=e&&e.type&&e.type.parseOption;if(r&&e.props){const i=r(m(e.props.componentId)?{...e.props,componentId:Yu(e,n)}:e.props);i.isSingle?t[i.optionName]=i.option:(t[i.optionName]||(t[i.optionName]=[]),t[i.optionName].push(i.option))}})),t})(e);if(!i.current?.table)return a||(h.current=t),v(e),x(),void(p.current=e);if(a)return void(W(p.current.option,e.option,{skipFunction:g})?o&&!W(p.current.records,e.records,{skipFunction:g})&&(i.current.table.setRecords(e.records),b(),p.current=e):(i.current.table.updateOption(y(e)),b(),p.current=e));const n=z(e,Gu);W(n,d.current,{skipFunction:g})&&W(t,h.current,{skipFunction:g})?o&&!W(e.records,f.current,{skipFunction:g})&&(f.current=e.records,i.current.table.setRecords(e.records),b(),p.current=e):(d.current=n,h.current=t,i.current.table.updateOption(y(e)),b(),p.current=e)}),[v,a,o,y,b,x,g,e]),l.useEffect((()=>()=>{i&&i.current&&i.current.table&&(i.current.table.release(),i.current=null),p.current=null,s.current=!0}),[]),u.createElement(c.Provider,{value:i.current},Ue(e.children).map(((e,t)=>{if("string"==typeof e)return;const r=Yu(e,t);return u.createElement(u.Fragment,{key:r},u.cloneElement(e,{updateId:n,componentId:r,componentIndex:t}))})))})),Qu=(e,t,n)=>{const r=function(e,t="TableContainer",n){const r=u.forwardRef(((t,r)=>{const i=l.useRef(),[a,o]=l.useState(!1),{className:s,style:c,width:d,...h}=t;return l.useLayoutEffect((()=>{o(!0)}),[]),u.createElement("div",{ref:i,className:s,style:{position:"relative",height:t.height||"100%",width:t.width||"100%",...c}},a?u.createElement(e,{ref:r,container:i.current,...n?n(h):h}):u.createElement(u.Fragment,null))}));return r.displayName=t||e.name,r}(qu,e,(e=>t?Object.assign(e,t):e));return r.displayName=e,r},Xu=Qu("ListTable",{type:"list-table",vtableConstrouctor:t.ListTable}),Ku=Qu("PivotTable",{type:"pivot-table",vtableConstrouctor:t.PivotTable}),Zu=Qu("PivotChart",{type:"pivot-chart",vtableConstrouctor:t.PivotChart});const Ju=Qu("ListTable",{type:"list-table",vtableConstrouctor:t.ListTableSimple}),ec=Qu("PivotTable",{type:"pivot-table",vtableConstrouctor:t.PivotTableSimple});var tc,nc={exports:{}},rc={exports:{}},ic={};var ac,oc,sc,lc,uc={};
|
|
20
|
-
/**
|
|
21
|
-
* @license React
|
|
22
|
-
* scheduler.development.js
|
|
23
|
-
*
|
|
24
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
25
|
-
*
|
|
26
|
-
* This source code is licensed under the MIT license found in the
|
|
27
|
-
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/function cc(){return ac||(ac=1,function(e){"production"!==production&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=!1,n=!1;function r(e,t){var n=e.length;e.push(t),function(e,t,n){var r=n;for(;r>0;){var i=r-1>>>1,a=e[i];if(!(o(a,t)>0))return;e[i]=t,e[r]=a,r=i}}(e,t,n)}function i(e){return 0===e.length?null:e[0]}function a(e){if(0===e.length)return null;var t=e[0],n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){var r=n,i=e.length,a=i>>>1;for(;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(o(l,t)<0)u<i&&o(c,l)<0?(e[r]=c,e[u]=t,r=u):(e[r]=l,e[s]=t,r=s);else{if(!(u<i&&o(c,t)<0))return;e[r]=c,e[u]=t,r=u}}}(e,n,0)),t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],d=[],h=1,f=null,p=3,g=!1,m=!1,y=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=i(d);null!==t;){if(null===t.callback)a(d);else{if(!(t.startTime<=e))return;a(d),t.sortIndex=t.expirationTime,r(c,t)}t=i(d)}}function _(e){if(y=!1,S(e),!m)if(null!==i(c))m=!0,O(w);else{var t=i(d);null!==t&&I(_,t.startTime-e)}}function w(r,o){m=!1,y&&(y=!1,N()),g=!0;var s=p;try{if(!n)return function(n,r){var o=r;S(o),f=i(c);for(;null!==f&&!t&&(!(f.expirationTime>o)||n&&!E());){var s=f.callback;if("function"==typeof s){f.callback=null,p=f.priorityLevel;var l=s(f.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?f.callback=l:f===i(c)&&a(c),S(o)}else a(c);f=i(c)}if(null!==f)return!0;var u=i(d);return null!==u&&I(_,u.startTime-o),!1}(r,o)}finally{f=null,p=s,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var A=!1,k=null,T=-1,B=5,C=-1;function E(){return!(e.unstable_now()-C<B)}var P,R=function(){if(null!==k){var t=e.unstable_now();C=t;var n=!0;try{n=k(!0,t)}finally{n?P():(A=!1,k=null)}}else A=!1};if("function"==typeof x)P=function(){x(R)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,L=M.port2;M.port1.onmessage=R,P=function(){L.postMessage(null)}}else P=function(){v(R,0)};function O(e){k=e,A||(A=!0,P())}function I(t,n){T=v((function(){t(e.unstable_now())}),n)}function N(){b(T),T=-1}var U=function(){};e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||g||(m=!0,O(w))},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(c)},e.unstable_next=function(e){var t;switch(p){case 1:case 2:case 3:t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=U,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_scheduleCallback=function(t,n,a){var o,s,l=e.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;o="number"==typeof u&&u>0?l+u:l}else o=l;switch(t){case 1:s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}var f=o+s,p={id:h++,callback:n,priorityLevel:t,startTime:o,expirationTime:f,sortIndex:-1};return o>l?(p.sortIndex=o,r(d,p),null===i(c)&&p===i(d)&&(y?N():y=!0,I(_,o-l))):(p.sortIndex=f,r(c,p),m||g||(m=!0,O(w))),p},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(uc)),uc}function dc(){return oc||(oc=1,"production"===production?rc.exports=(tc||(tc=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<i(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>i(l,n))u<a&&0>i(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<a&&0>i(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,d=null,h=3,f=!1,p=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(u);null!==i;){if(null===i.callback)r(u);else{if(!(i.startTime<=e))break;r(u),i.sortIndex=i.expirationTime,t(l,i)}i=n(u)}}function x(e){if(g=!1,b(e),!p)if(null!==n(l))p=!0,M(S);else{var t=n(u);null!==t&&L(x,t.startTime-e)}}function S(t,i){p=!1,g&&(g=!1,y(k),k=-1),f=!0;var a=h;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!C());){var o=d.callback;if("function"==typeof o){d.callback=null,h=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var m=n(u);null!==m&&L(x,m.startTime-i),c=!1}return c}finally{d=null,h=a,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,w=!1,A=null,k=-1,T=5,B=-1;function C(){return!(e.unstable_now()-B<T)}function E(){if(null!==A){var t=e.unstable_now();B=t;var n=!0;try{n=A(!0,t)}finally{n?_():(w=!1,A=null)}}else w=!1}if("function"==typeof v)_=function(){v(E)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,R=P.port2;P.port1.onmessage=E,_=function(){R.postMessage(null)}}else _=function(){m(E,0)};function M(e){A=e,w||(w=!0,_())}function L(t,n){k=m((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,M(S))},e.unstable_forceFrameRate=function(e){0>e||125<e||(T=0<e?Math.floor(1e3/e):5)},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:i,priorityLevel:r,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(r.sortIndex=a,t(u,r),null===n(l)&&r===n(u)&&(g?(y(k),k=-1):g=!0,L(x,a-o))):(r.sortIndex=s,t(l,r),p||f||(p=!0,M(S))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ic)),ic):rc.exports=cc()),rc.exports}
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@visactor/vtable")):"function"==typeof define&&define.amd?define(["exports","@visactor/vtable"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ReactVTable={},t.VTable)}(this,(function(t,e){"use strict";function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var i,r={exports:{}},s={};r.exports=function(){if(i)return s;i=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function b(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||p}function y(){}function v(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||p}b.prototype.isReactComponent={},b.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)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")},b.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},y.prototype=b.prototype;var x=v.prototype=new y;x.constructor=v,g(x,b.prototype),x.isPureReactComponent=!0;var _=Array.isArray,A=Object.prototype.hasOwnProperty,S={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,i){var r,s={},a=null,o=null;if(null!=n)for(r in void 0!==n.ref&&(o=n.ref),void 0!==n.key&&(a=""+n.key),n)A.call(n,r)&&!w.hasOwnProperty(r)&&(s[r]=n[r]);var l=arguments.length-2;if(1===l)s.children=i;else if(1<l){for(var u=Array(l),h=0;h<l;h++)u[h]=arguments[h+2];s.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===s[r]&&(s[r]=l[r]);return{$$typeof:t,type:e,key:a,ref:o,props:s,_owner:S.current}}function B(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var C=/\/+/g;function k(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function M(n,i,r,s,a){var o=typeof n;"undefined"!==o&&"boolean"!==o||(n=null);var l=!1;if(null===n)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case t:case e:l=!0}}if(l)return a=a(l=n),n=""===s?"."+k(l,0):s,_(a)?(r="",null!=n&&(r=n.replace(C,"$&/")+"/"),M(a,i,r,"",(function(t){return t}))):null!=a&&(B(a)&&(a=function(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}(a,r+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+n)),i.push(a)),1;if(l=0,s=""===s?".":s+":",_(n))for(var u=0;u<n.length;u++){var h=s+k(o=n[u],u);l+=M(o,i,r,h,a)}else if(h=function(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=f&&t[f]||t["@@iterator"])?t:null}(n),"function"==typeof h)for(n=h.call(n),u=0;!(o=n.next()).done;)l+=M(o=o.value,i,r,h=s+k(o,u++),a);else if("object"===o)throw i=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===i?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.");return l}function P(t,e,n){if(null==t)return t;var i=[],r=0;return M(t,i,"","",(function(t){return e.call(n,t,r++)})),i}function E(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var O={current:null},L={transition:null},R={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:L,ReactCurrentOwner:S};function I(){throw Error("act(...) is not supported in production builds of React.")}return s.Children={map:P,forEach:function(t,e,n){P(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return P(t,(function(){e++})),e},toArray:function(t){return P(t,(function(t){return t}))||[]},only:function(t){if(!B(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},s.Component=b,s.Fragment=n,s.Profiler=a,s.PureComponent=v,s.StrictMode=r,s.Suspense=h,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,s.act=I,s.cloneElement=function(e,n,i){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=g({},e.props),s=e.key,a=e.ref,o=e._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,o=S.current),void 0!==n.key&&(s=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in n)A.call(n,u)&&!w.hasOwnProperty(u)&&(r[u]=void 0===n[u]&&void 0!==l?l[u]:n[u])}var u=arguments.length-2;if(1===u)r.children=i;else if(1<u){l=Array(u);for(var h=0;h<u;h++)l[h]=arguments[h+2];r.children=l}return{$$typeof:t,type:e.type,key:s,ref:a,props:r,_owner:o}},s.createContext=function(t){return(t={$$typeof:l,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:t},t.Consumer=t},s.createElement=T,s.createFactory=function(t){var e=T.bind(null,t);return e.type=t,e},s.createRef=function(){return{current:null}},s.forwardRef=function(t){return{$$typeof:u,render:t}},s.isValidElement=B,s.lazy=function(t){return{$$typeof:d,_payload:{_status:-1,_result:t},_init:E}},s.memo=function(t,e){return{$$typeof:c,type:t,compare:void 0===e?null:e}},s.startTransition=function(t){var e=L.transition;L.transition={};try{t()}finally{L.transition=e}},s.unstable_act=I,s.useCallback=function(t,e){return O.current.useCallback(t,e)},s.useContext=function(t){return O.current.useContext(t)},s.useDebugValue=function(){},s.useDeferredValue=function(t){return O.current.useDeferredValue(t)},s.useEffect=function(t,e){return O.current.useEffect(t,e)},s.useId=function(){return O.current.useId()},s.useImperativeHandle=function(t,e,n){return O.current.useImperativeHandle(t,e,n)},s.useInsertionEffect=function(t,e){return O.current.useInsertionEffect(t,e)},s.useLayoutEffect=function(t,e){return O.current.useLayoutEffect(t,e)},s.useMemo=function(t,e){return O.current.useMemo(t,e)},s.useReducer=function(t,e,n){return O.current.useReducer(t,e,n)},s.useRef=function(t){return O.current.useRef(t)},s.useState=function(t){return O.current.useState(t)},s.useSyncExternalStore=function(t,e,n){return O.current.useSyncExternalStore(t,e,n)},s.useTransition=function(){return O.current.useTransition()},s.version="18.3.1",s}();var a=r.exports,o=n(a);const l=o.createContext(null);l.displayName="TableContext";var u={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,i,s,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new r(i,s||t,a),l=n?n+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],o]:t._events[l].push(o):(t._events[l]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function o(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),o.prototype.eventNames=function(){var t,i,r=[];if(0===this._eventsCount)return r;for(i in t=this._events)e.call(t,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,s=i.length,a=new Array(s);r<s;r++)a[r]=i[r].fn;return a},o.prototype.listenerCount=function(t){var e=n?n+t:t,i=this._events[e];return i?i.fn?1:i.length:0},o.prototype.emit=function(t,e,i,r,s,a){var o=n?n+t:t;if(!this._events[o])return!1;var l,u,h=this._events[o],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,i),!0;case 4:return h.fn.call(h.context,e,i,r),!0;case 5:return h.fn.call(h.context,e,i,r,s),!0;case 6:return h.fn.call(h.context,e,i,r,s,a),!0}for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];h.fn.apply(h.context,l)}else{var d,f=h.length;for(u=0;u<f;u++)switch(h[u].once&&this.removeListener(t,h[u].fn,void 0,!0),c){case 1:h[u].fn.call(h[u].context);break;case 2:h[u].fn.call(h[u].context,e);break;case 3:h[u].fn.call(h[u].context,e,i);break;case 4:h[u].fn.call(h[u].context,e,i,r);break;default:if(!l)for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];h[u].fn.apply(h[u].context,l)}}return!0},o.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},o.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},o.prototype.removeListener=function(t,e,i,r){var s=n?n+t:t;if(!this._events[s])return this;if(!e)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==e||r&&!o.once||i&&o.context!==i||a(this,s);else{for(var l=0,u=[],h=o.length;l<h;l++)(o[l].fn!==e||r&&!o[l].once||i&&o[l].context!==i)&&u.push(o[l]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,t.exports=o}(u);var h=n(u.exports);var c=(t,e)=>Object.prototype.toString.call(t)===`[object ${e}]`;var d=function(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"boolean"==typeof t:!0===t||!1===t||c(t,"Boolean")};var f=t=>"function"==typeof t;var p=t=>null==t;var g=t=>null!=t;var m=t=>{const e=typeof t;return null!==t&&"object"===e||"function"===e};var b=t=>"object"==typeof t&&null!==t;var y=function(t){if(!b(t)||!c(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};var v=function(t){const e=typeof t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"string"===e:"string"===e||c(t,"String")};var x=t=>Array.isArray?Array.isArray(t):c(t,"Array");var _=function(t){return null!==t&&"function"!=typeof t&&Number.isFinite(t.length)};var A=function(t){const e=typeof t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"number"===e:"number"===e||c(t,"Number")};var S=t=>A(t)&&Number.isFinite(t);var w=t=>new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(t);var T=t=>new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(t);var B=t=>({}.toString.call(t).replace(/^\[object /,"").replace(/]$/,""));const C=Object.prototype;var k=function(t){const e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||C)};const M=Object.prototype.hasOwnProperty;function P(t){if(p(t))return!0;if(_(t))return!t.length;const e=B(t);if("Map"===e||"Set"===e)return!t.size;if(k(t))return!Object.keys(t).length;for(const e in t)if(M.call(t,e))return!1;return!0}const E=Object.prototype.hasOwnProperty;var O=(t,e)=>null!=t&&E.call(t,e);function L(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e){if(t===e)return;if(g(e)&&"object"==typeof e){const r=Object(e),s=[];for(const t in r)s.push(t);let{length:a}=s,o=-1;for(;a--;){const a=s[++o];!g(r[a])||"object"!=typeof r[a]||i&&x(t[a])?I(t,a,r[a]):R(t,e,a,n,i)}}}}function R(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=t[n],a=e[n];let o=e[n],l=!0;if(x(a)){if(i)o=[];else if(x(s))o=s;else if(_(s)){o=new Array(s.length);let t=-1;const e=s.length;for(;++t<e;)o[t]=s[t]}}else y(a)?(o=null!=s?s:{},"function"!=typeof s&&"object"==typeof s||(o={})):l=!1;l&&L(o,a,i,r),I(t,n,o)}function I(t,e,n){(void 0!==n&&!function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t[e],n)||void 0===n&&!(e in t))&&(t[e]=n)}function N(t){let e=-1;const n=arguments.length<=1?0:arguments.length-1;for(;++e<n;)L(t,e+1<1||arguments.length<=e+1?void 0:arguments[e+1],!0);return t}function U(t,e){if(!t||!y(t))return t;const n={};return Object.keys(t).forEach((i=>{const r=t[i];let s=!1;e.forEach((t=>{(v(t)&&t===i||t instanceof RegExp&&i.match(t))&&(s=!0)})),s||(n[i]=r)})),n}function D(t){return Object.prototype.toString.call(t)}function z(t){return Object.keys(t)}function W(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(null==t||null==e)return!1;if(Number.isNaN(t)&&Number.isNaN(e))return!0;if(D(t)!==D(e))return!1;if(f(t))return!!(null==n?void 0:n.skipFunction);if("object"!=typeof t)return!1;if(x(t)){if(t.length!==e.length)return!1;for(let i=t.length-1;i>=0;i--)if(!W(t[i],e[i],n))return!1;return!0}if(!y(t))return!1;const i=z(t),r=z(e);if(i.length!==r.length)return!1;i.sort(),r.sort();for(let t=i.length-1;t>=0;t--)if(i[t]!=r[t])return!1;for(let r=i.length-1;r>=0;r--){const s=i[r];if(!W(t[s],e[s],n))return!1}return!0}function F(t,e){if(!x(t)||!x(e))return!1;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}const j="undefined"!=typeof console;function H(t,e,n){const i=[e].concat([].slice.call(n));j&&console[t].apply(console,i)}var $;!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Info=3]="Info",t[t.Debug=4]="Debug"}($||($={}));class G{static getInstance(t,e){return G._instance&&A(t)?G._instance.level(t):G._instance||(G._instance=new G(t,e)),G._instance}static setInstance(t){return G._instance=t}static setInstanceLevel(t){G._instance?G._instance.level(t):G._instance=new G(t)}static clearInstance(){G._instance=null}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$.None,e=arguments.length>1?arguments[1]:void 0;this._onErrorHandler=[],this._level=t,this._method=e}addErrorHandler(t){this._onErrorHandler.find((e=>e===t))||this._onErrorHandler.push(t)}removeErrorHandler(t){const e=this._onErrorHandler.findIndex((e=>e===t));e<0||this._onErrorHandler.splice(e,1)}callErrorHandler(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._onErrorHandler.forEach((t=>t(...e)))}canLogInfo(){return this._level>=$.Info}canLogDebug(){return this._level>=$.Debug}canLogError(){return this._level>=$.Error}canLogWarn(){return this._level>=$.Warn}level(t){return arguments.length?(this._level=+t,this):this._level}error(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this._level>=$.Error&&(this._onErrorHandler.length?this.callErrorHandler(...n):H(null!==(t=this._method)&&void 0!==t?t:"error","ERROR",n)),this}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this._level>=$.Warn&&H(this._method||"warn","WARN",e),this}info(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this._level>=$.Info&&H(this._method||"log","INFO",e),this}debug(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this._level>=$.Debug&&H(this._method||"log","DEBUG",e),this}}G._instance=null;var V=function(t,e,n){return t<e?e:t>n?n:t};const X=1e-12,Y=Math.PI,K=Y/2,q=2*Y,Q=2*Math.PI,Z=Math.abs,J=Math.atan2,tt=Math.cos,et=Math.max,nt=Math.min,it=Math.sin,rt=Math.sqrt,st=Math.pow;function at(t){return t>=1?K:t<=-1?-K:Math.asin(t)}class ot{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;this.x=0,this.y=0,this.x=t,this.y=e,this.x1=n,this.y1=i}clone(){return new ot(this.x,this.y)}copyFrom(t){return this.x=t.x,this.y=t.y,this.x1=t.x1,this.y1=t.y1,this.defined=t.defined,this.context=t.context,this}set(t,e){return this.x=t,this.y=e,this}add(t){return A(t)?(this.x+=t,void(this.y+=t)):(this.x+=t.x,this.y+=t.y,this)}sub(t){return A(t)?(this.x-=t,void(this.y-=t)):(this.x-=t.x,this.y-=t.y,this)}multi(t){throw new Error("暂不支持")}div(t){throw new Error("暂不支持")}}class lt{static distancePP(t,e){return rt(st(t.x-e.x,2)+st(t.y-e.y,2))}static distanceNN(t,e,n,i){return rt(st(t-n,2)+st(e-i,2))}static distancePN(t,e,n){return rt(st(e-t.x,2)+st(n-t.y,2))}static pointAtPP(t,e,n){return new ot((e.x-t.x)*n+t.x,(e.y-t.y)*n+t.y)}}function ut(t,e,n){const{x1:i,y1:r,x2:s,y2:a}=e;return n.onlyTranslate()?(t!==e&&t.setValue(e.x1,e.y1,e.x2,e.y2),t.translate(n.e,n.f),e):(t.clear(),t.add(n.a*i+n.c*r+n.e,n.b*i+n.d*r+n.f),t.add(n.a*s+n.c*r+n.e,n.b*s+n.d*r+n.f),t.add(n.a*s+n.c*a+n.e,n.b*s+n.d*a+n.f),t.add(n.a*i+n.c*a+n.e,n.b*i+n.d*a+n.f),e)}class ht{constructor(t){t?this.setValue(t.x1,t.y1,t.x2,t.y2):this.clear()}clone(){return new ht(this)}clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this}empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE}equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2}setValue(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return this.x1=t,this.y1=e,this.x2=n,this.y2=i,this}set(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),i<e?(this.y2=e,this.y1=i):(this.y1=e,this.y2=i),this}add(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this}expand(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return x(t)?(this.y1-=t[0],this.x2+=t[1],this.y2+=t[2],this.x1-=t[3]):(this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t),this}round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this}translate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this}rotate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const i=this.rotatedPoints(t,e,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])}scale(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const r=this.scalePoints(t,e,n,i);return this.clear().add(r[0],r[1]).add(r[2],r[3])}union(t){return t.x1<this.x1&&(this.x1=t.x1),t.y1<this.y1&&(this.y1=t.y1),t.x2>this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this}intersect(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2<this.x2&&(this.x2=t.x2),t.y2<this.y2&&(this.y2=t.y2),this}encloses(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2}alignsWith(t){return t&&(this.x1===t.x1||this.x2===t.x2||this.y1===t.y1||this.y2===t.y2)}intersects(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)}contains(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)}containsPoint(t){return!(t.x<this.x1||t.x>this.x2||t.y<this.y1||t.y>this.y2)}width(){return this.empty()?0:this.x2-this.x1}height(){return this.empty()?0:this.y2-this.y1}scaleX(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x1*=t,this.x2*=t,this}scaleY(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y1*=t,this.y2*=t,this}transformWithMatrix(t){return ut(this,this,t),this}copy(t){return this.x1=t.x1,this.y1=t.y1,this.x2=t.x2,this.y2=t.y2,this}rotatedPoints(t,e,n){const{x1:i,y1:r,x2:s,y2:a}=this,o=Math.cos(t),l=Math.sin(t),u=e-e*o+n*l,h=n-e*l-n*o;return[o*i-l*r+u,l*i+o*r+h,o*i-l*a+u,l*i+o*a+h,o*s-l*r+u,l*s+o*r+h,o*s-l*a+u,l*s+o*a+h]}scalePoints(t,e,n,i){const{x1:r,y1:s,x2:a,y2:o}=this;return[t*r+(1-t)*n,e*s+(1-e)*i,t*a+(1-t)*n,e*o+(1-e)*i]}}class ct extends ht{}const dt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(t<0)for(;t<-q;)t+=q;else if(t>0)for(;t>q;)t-=q;return t};class ft{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;this.a=t,this.b=e,this.c=n,this.d=i,this.e=r,this.f=s}equalToMatrix(t){return!(this.e!==t.e||this.f!==t.f||this.a!==t.a||this.d!==t.d||this.b!==t.b||this.c!==t.c)}equalTo(t,e,n,i,r,s){return!(this.e!==r||this.f!==s||this.a!==t||this.d!==i||this.b!==e||this.c!==n)}setValue(t,e,n,i,r,s){return this.a=t,this.b=e,this.c=n,this.d=i,this.e=r,this.f=s,this}reset(){return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this}getInverse(){const t=this.a,e=this.b,n=this.c,i=this.d,r=this.e,s=this.f,a=new ft,o=t*i-e*n;return a.a=i/o,a.b=-e/o,a.c=-n/o,a.d=t/o,a.e=(n*s-i*r)/o,a.f=-(t*s-e*r)/o,a}rotate(t){const e=Math.cos(t),n=Math.sin(t),i=this.a*e+this.c*n,r=this.b*e+this.d*n,s=this.a*-n+this.c*e,a=this.b*-n+this.d*e;return this.a=i,this.b=r,this.c=s,this.d=a,this}rotateByCenter(t,e,n){const i=Math.cos(t),r=Math.sin(t),s=(1-i)*e+r*n,a=(1-i)*n-r*e,o=i*this.a-r*this.b,l=r*this.a+i*this.b,u=i*this.c-r*this.d,h=r*this.c+i*this.d,c=i*this.e-r*this.f+s,d=r*this.e+i*this.f+a;return this.a=o,this.b=l,this.c=u,this.d=h,this.e=c,this.f=d,this}scale(t,e){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this}setScale(t,e){return this.b=this.b/this.a*t,this.c=this.c/this.d*e,this.a=t,this.d=e,this}transform(t,e,n,i,r,s){return this.multiply(t,e,n,i,r,s),this}translate(t,e){return this.e+=this.a*t+this.c*e,this.f+=this.b*t+this.d*e,this}transpose(){const{a:t,b:e,c:n,d:i,e:r,f:s}=this;return this.a=e,this.b=t,this.c=i,this.d=n,this.e=s,this.f=r,this}multiply(t,e,n,i,r,s){const a=this.a,o=this.b,l=this.c,u=this.d,h=a*t+l*e,c=o*t+u*e,d=a*n+l*i,f=o*n+u*i,p=a*r+l*s+this.e,g=o*r+u*s+this.f;return this.a=h,this.b=c,this.c=d,this.d=f,this.e=p,this.f=g,this}interpolate(t,e){const n=new ft;return n.a=this.a+(t.a-this.a)*e,n.b=this.b+(t.b-this.b)*e,n.c=this.c+(t.c-this.c)*e,n.d=this.d+(t.d-this.d)*e,n.e=this.e+(t.e-this.e)*e,n.f=this.f+(t.f-this.f)*e,n}transformPoint(t,e){const{a:n,b:i,c:r,d:s,e:a,f:o}=this,l=n*s-i*r,u=s/l,h=-i/l,c=-r/l,d=n/l,f=(r*o-s*a)/l,p=-(n*o-i*a)/l,{x:g,y:m}=t;e.x=g*u+m*c+f,e.y=g*h+m*d+p}onlyTranslate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.a===t&&0===this.b&&0===this.c&&this.d===t}clone(){return new ft(this.a,this.b,this.c,this.d,this.e,this.f)}toTransformAttrs(){const t=this.a,e=this.b,n=this.c,i=this.d,r=t*i-e*n,s={x:this.e,y:this.f,rotateDeg:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!==t||0!==e){const a=Math.sqrt(t*t+e*e);s.rotateDeg=e>0?Math.acos(t/a):-Math.acos(t/a),s.scaleX=a,s.scaleY=r/a,s.skewX=(t*n+e*i)/r,s.skewY=0}else if(0!==n||0!==i){const a=Math.sqrt(n*n+i*i);s.rotateDeg=Math.PI/2-(i>0?Math.acos(-n/a):-Math.acos(n/a)),s.scaleX=r/a,s.scaleY=a,s.skewX=0,s.skewY=(t*n+e*i)/r}return s.rotateDeg=180*s.rotateDeg/Math.PI,s}}function pt(t,e,n){e/=100,n/=100;const i=(1-Math.abs(2*n-1))*e,r=i*(1-Math.abs(t/60%2-1)),s=n-i/2;let a=0,o=0,l=0;return 0<=t&&t<60?(a=i,o=r,l=0):60<=t&&t<120?(a=r,o=i,l=0):120<=t&&t<180?(a=0,o=i,l=r):180<=t&&t<240?(a=0,o=r,l=i):240<=t&&t<300?(a=r,o=0,l=i):300<=t&&t<360&&(a=i,o=0,l=r),a=Math.round(255*(a+s)),o=Math.round(255*(o+s)),l=Math.round(255*(l+s)),{r:a,g:o,b:l}}function gt(t,e,n){t/=255,e/=255,n/=255;const i=Math.min(t,e,n),r=Math.max(t,e,n),s=r-i;let a=0,o=0,l=0;return a=0===s?0:r===t?(e-n)/s%6:r===e?(n-t)/s+2:(t-e)/s+4,a=Math.round(60*a),a<0&&(a+=360),l=(r+i)/2,o=0===s?0:s/(1-Math.abs(2*l-1)),o=+(100*o).toFixed(1),l=+(100*l).toFixed(1),{h:a,s:o,l:l}}const mt=/^#([0-9a-f]{3,8})$/,bt={transparent:4294967040},yt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function vt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function xt(t){return A(t)?new Tt(t>>16,t>>8&255,255&t,1):x(t)?new Tt(t[0],t[1],t[2]):new Tt(255,255,255)}function _t(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function At(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}const St=(t,e)=>{const n=mt.exec(t);if(e||n){const t=parseInt(n[1],16),e=n[1].length;return 3===e?new Tt((t>>8&15)+((t>>8&15)<<4),(t>>4&15)+((t>>4&15)<<4),(15&t)+((15&t)<<4),1):6===e?xt(t):8===e?new Tt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):null}};class wt{static Brighter(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===e?t:new wt(t).brighter(e).toRGBA()}static SetOpacity(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===e?t:new wt(t).setOpacity(e).toRGBA()}static getColorBrightness(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hsl";const n=t instanceof wt?t:new wt(t);switch(e){case"hsv":default:return n.getHSVBrightness();case"hsl":return n.getHSLBrightness();case"lum":return n.getLuminance();case"lum2":return n.getLuminance2();case"lum3":return n.getLuminance3()}}static parseColorString(t){if(g(bt[t]))return function(t){return A(t)?new Tt(t>>>24,t>>>16&255,t>>>8&255,255&t):x(t)?new Tt(t[0],t[1],t[2],t[3]):new Tt(255,255,255,1)}(bt[t]);if(g(yt[t]))return xt(yt[t]);const e=`${t}`.trim().toLowerCase(),n=St(e);if(void 0!==n)return n;if(/^(rgb|RGB|rgba|RGBA)/.test(e)){const t=e.replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(",");return new Tt(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),parseFloat(t[3]))}if(/^(hsl|HSL|hsla|HSLA)/.test(e)){const t=e.replace(/(?:\(|\)|hsla|HSLA|hsl|HSL)*/g,"").split(","),n=pt(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10));return new Tt(n.r,n.g,n.b,parseFloat(t[3]))}}constructor(t){const e=wt.parseColorString(t);this.color=e||new Tt(255,255,255)}toRGBA(){return this.color.formatRgb()}toString(){return this.color.formatRgb()}toHex(){return this.color.formatHex()}toHsl(){return this.color.formatHsl()}brighter(t){const{r:e,g:n,b:i}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(e*t))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t))),this.color.b=Math.max(0,Math.min(255,Math.floor(i*t))),this}add(t){const{r:e,g:n,b:i}=this.color;return this.color.r+=Math.min(255,e+t.color.r),this.color.g+=Math.min(255,n+t.color.g),this.color.b+=Math.min(255,i+t.color.b),this}sub(t){return this.color.r=Math.max(0,this.color.r-t.color.r),this.color.g=Math.max(0,this.color.g-t.color.g),this.color.b=Math.max(0,this.color.b-t.color.b),this}multiply(t){const{r:e,g:n,b:i}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(e*t.color.r))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t.color.g))),this.color.b=Math.max(0,Math.min(255,Math.floor(i*t.color.b))),this}getHSVBrightness(){return Math.max(this.color.r,this.color.g,this.color.b)/255}getHSLBrightness(){return.5*(Math.max(this.color.r,this.color.g,this.color.b)/255+Math.min(this.color.r,this.color.g,this.color.b)/255)}setHsl(t,e,n){const i=this.color.opacity,r=gt(this.color.r,this.color.g,this.color.b),s=pt(p(t)?r.h:V(t,0,360),p(e)?r.s:e>=0&&e<=1?100*e:e,p(n)?r.l:n<=1&&n>=0?100*n:n);return this.color=new Tt(s.r,s.g,s.b,i),this}setRGB(t,e,n){return!p(t)&&(this.color.r=t),!p(e)&&(this.color.g=e),!p(n)&&(this.color.b=n),this}setHex(t){const e=`${t}`.trim().toLowerCase(),n=St(e,!0);return null!=n?n:this}setColorName(t){const e=yt[t.toLowerCase()];return void 0!==e&&this.setHex(e),this}setScalar(t){return this.color.r=t,this.color.g=t,this.color.b=t,this}setOpacity(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.color.opacity=t,this}getLuminance(){return(.2126*this.color.r+.7152*this.color.g+.0722*this.color.b)/255}getLuminance2(){return(.2627*this.color.r+.678*this.color.g+.0593*this.color.b)/255}getLuminance3(){return(.299*this.color.r+.587*this.color.g+.114*this.color.b)/255}clone(){return new wt(this.color.toString())}copyGammaToLinear(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return this.color.r=Math.pow(t.color.r,e),this.color.g=Math.pow(t.color.g,e),this.color.b=Math.pow(t.color.b,e),this}copyLinearToGamma(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const n=e>0?1/e:1;return this.color.r=Math.pow(t.color.r,n),this.color.g=Math.pow(t.color.g,n),this.color.b=Math.pow(t.color.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.color.r=_t(t.color.r),this.color.g=_t(t.color.g),this.color.b=_t(t.color.b),this}copyLinearToSRGB(t){return this.color.r=At(t.color.r),this.color.g=At(t.color.g),this.color.b=At(t.color.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}}class Tt{constructor(t,e,n,i){this.r=isNaN(+t)?255:Math.max(0,Math.min(255,+t)),this.g=isNaN(+e)?255:Math.max(0,Math.min(255,+e)),this.b=isNaN(+n)?255:Math.max(0,Math.min(255,+n)),g(i)?this.opacity=isNaN(+i)?1:Math.max(0,Math.min(1,+i)):this.opacity=1}formatHex(){return`#${vt(this.r)+vt(this.g)+vt(this.b)+(1===this.opacity?"":vt(255*this.opacity))}`}formatRgb(){const t=this.opacity;return`${1===t?"rgb(":"rgba("}${this.r},${this.g},${this.b}${1===t?")":`,${t})`}`}formatHsl(){const t=this.opacity,{h:e,s:n,l:i}=gt(this.r,this.g,this.b);return`${1===t?"hsl(":"hsla("}${e},${n}%,${i}%${1===t?")":`,${t})`}`}toString(){return this.formatHex()}}const Bt=(t,e)=>{const{x1:n,x2:i,y1:r,y2:s}=t,a=Math.abs(i-n),o=Math.abs(s-r);let l=(n+i)/2,u=(r+s)/2,h=0,c=0;switch(e){case"top":case"inside-top":c=-.5;break;case"bottom":case"inside-bottom":c=.5;break;case"left":case"inside-left":h=-.5;break;case"right":case"inside-right":h=.5;break;case"top-right":h=.5,c=-.5;break;case"top-left":h=-.5,c=-.5;break;case"bottom-right":h=.5,c=.5;break;case"bottom-left":h=-.5,c=.5}return l+=h*a,u+=c*o,{x:l,y:u}};const Ct=function(){const t={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(";").forEach((e=>{if(e){const n=e.split(":");if(2===n.length){const e=n[0].trim(),i=n[1].trim();e&&i&&(t[e]=i)}}})),t},kt=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase();var Mt,Pt={exports:{}},Et={};Pt.exports=function(){if(Mt)return Et;Mt=1;var t,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function g(t){if("object"==typeof t&&null!==t){var p=t.$$typeof;switch(p){case e:switch(t=t.type){case i:case s:case r:case h:case c:return t;default:switch(t=t&&t.$$typeof){case l:case o:case u:case f:case d:case a:return t;default:return p}}case n:return p}}}return t=Symbol.for("react.module.reference"),Et.ContextConsumer=o,Et.ContextProvider=a,Et.Element=e,Et.ForwardRef=u,Et.Fragment=i,Et.Lazy=f,Et.Memo=d,Et.Portal=n,Et.Profiler=s,Et.StrictMode=r,Et.Suspense=h,Et.SuspenseList=c,Et.isAsyncMode=function(){return!1},Et.isConcurrentMode=function(){return!1},Et.isContextConsumer=function(t){return g(t)===o},Et.isContextProvider=function(t){return g(t)===a},Et.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Et.isForwardRef=function(t){return g(t)===u},Et.isFragment=function(t){return g(t)===i},Et.isLazy=function(t){return g(t)===f},Et.isMemo=function(t){return g(t)===d},Et.isPortal=function(t){return g(t)===n},Et.isProfiler=function(t){return g(t)===s},Et.isStrictMode=function(t){return g(t)===r},Et.isSuspense=function(t){return g(t)===h},Et.isSuspenseList=function(t){return g(t)===c},Et.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===r||e===h||e===c||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===a||e.$$typeof===o||e.$$typeof===u||e.$$typeof===t||void 0!==e.getModuleId)},Et.typeOf=g,Et}();var Ot=Pt.exports;const Lt=t=>{let e=[];return o.Children.forEach(t,(t=>{p(t)||(Ot.isFragment(t)?e=e.concat(Lt(t.props.children)):e.push(t))})),e},Rt={...e.TABLE_EVENT_TYPE,...e.PIVOT_TABLE_EVENT_TYPE,...e.PIVOT_CHART_EVENT_TYPE},It={onClickCell:Rt.CLICK_CELL,onDblClickCell:Rt.DBLCLICK_CELL,onMouseDownCell:Rt.MOUSEDOWN_CELL,onMouseUpCell:Rt.MOUSEUP_CELL,onSelectedCell:Rt.SELECTED_CELL,onSelectedClear:Rt.SELECTED_CLEAR,onKeyDown:Rt.KEYDOWN,onMouseEnterTable:Rt.MOUSEENTER_TABLE,onMouseLeaveTable:Rt.MOUSELEAVE_TABLE,onMouseDownTable:Rt.MOUSEDOWN_TABLE,onMouseMoveCell:Rt.MOUSEMOVE_CELL,onMouseEnterCell:Rt.MOUSEENTER_CELL,onMouseLeaveCell:Rt.MOUSELEAVE_CELL,onContextMenuCell:Rt.CONTEXTMENU_CELL,onResizeColumn:Rt.RESIZE_COLUMN,onResizeColumnEnd:Rt.RESIZE_COLUMN_END,onChangeHeaderPosition:Rt.CHANGE_HEADER_POSITION,onSortClick:Rt.SORT_CLICK,onFreezeClick:Rt.FREEZE_CLICK,onScroll:Rt.SCROLL,onDropdownMenuClick:Rt.DROPDOWN_MENU_CLICK,onMouseOverChartSymbol:Rt.MOUSEOVER_CHART_SYMBOL,onDragSelectEnd:Rt.DRAG_SELECT_END,onDropdownIconClick:Rt.DROPDOWN_ICON_CLICK,onDropdownMenuClear:Rt.DROPDOWN_MENU_CLEAR,onTreeHierarchyStateChange:Rt.TREE_HIERARCHY_STATE_CHANGE,onShowMenu:Rt.SHOW_MENU,onHideMenu:Rt.HIDE_MENU,onIconClick:Rt.ICON_CLICK,onLegendItemClick:Rt.LEGEND_ITEM_CLICK,onLegendItemHover:Rt.LEGEND_ITEM_HOVER,onLegendItemUnHover:Rt.LEGEND_ITEM_UNHOVER,onLegendChange:Rt.LEGEND_CHANGE,onMouseEnterAxis:Rt.MOUSEENTER_AXIS,onMouseLeaveAxis:Rt.MOUSELEAVE_AXIS,onCheckboxStateChange:Rt.CHECKBOX_STATE_CHANGE,onRadioStateChange:Rt.RADIO_STATE_CHANGE,onAfterRender:Rt.AFTER_RENDER,onInitialized:Rt.INITIALIZED,onPivotSortClick:Rt.PIVOT_SORT_CLICK,onDrillMenuClick:Rt.DRILLMENU_CLICK,onVChartEventType:Rt.VCHART_EVENT_TYPE,onChangCellValue:Rt.CHANGE_CELL_VALUE,onMousedownFillHandle:Rt.MOUSEDOWN_FILL_HANDLE,onDragFillHandleEnd:Rt.DRAG_FILL_HANDLE_END,onDblclickFillHandle:Rt.DBLCLICK_FILL_HANDLE,onScrollVerticalEnd:Rt.SCROLL_VERTICAL_END,onScrollHorizontalEnd:Rt.SCROLL_HORIZONTAL_END},Nt=Object.keys(It),Ut=(t,e=It)=>{const n={};return Object.keys(t).forEach((i=>{e[i]&&t[i]&&(n[i]=t[i])})),n},Dt=(t,e,n,i=It)=>{if(!e&&!n||!t)return!1;const r=n?Ut(n,i):null,s=e?Ut(e,i):null;return r&&Object.keys(r).forEach((e=>{s&&s[e]&&s[e]===r[e]||t.off(i[e],n[e])})),s&&Object.keys(s).forEach((e=>{r&&r[e]&&r[e]===s[e]||t.on(i[e],s[e])})),!0};class zt{static GenAutoIncrementId(){return zt.auto_increment_id++}}zt.auto_increment_id=0;class Wt{constructor(t){this.id=zt.GenAutoIncrementId(),this.registry=t}}const Ft="named",jt="inject",Ht="inversify:tagged",$t="inversify:paramtypes";class Gt{constructor(t,e){this.key=t,this.value=e}toString(){return this.key===Ft?`named: ${String(this.value).toString()} `:`tagged: { key:${this.key.toString()}, value: ${String(this.value)} }`}}var Vt=function(t){var e;return function(t){const e="function"==typeof Symbol&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=Object.getPrototypeOf(Function),i=("object"==typeof process&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL,Map),r=new WeakMap;function s(t,e,n){let s=r.get(t);if(u(s)){if(!n)return;s=new i,r.set(t,s)}let a=s.get(e);if(u(a)){if(!n)return;a=new i,s.set(e,a)}return a}function a(t,e,n){if(o(t,e,n))return!0;const i=g(e);return!h(i)&&a(t,i,n)}function o(t,e,n){const i=s(e,n,!1);return!u(i)&&!!i.has(t)}function l(t,e,n){if(o(t,e,n))return function(t,e,n){const i=s(e,n,!1);if(!u(i))return i.get(t)}(t,e,n);const i=g(e);return h(i)?void 0:l(t,i,n)}function u(t){return void 0===t}function h(t){return null===t}function c(t){return"object"==typeof t?null!==t:"function"==typeof t}function d(t,n){switch(function(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}const i=3===n?"string":5===n?"number":"default",r=function(t,e){const n=t[e];if(null!=n){if(!p(n))throw new TypeError;return n}}(t,e);if(void 0!==r){const e=r.call(t,i);if(c(e))throw new TypeError;return e}return function(t,e){if("string"===e){const e=t.toString;if(p(e)){const n=e.call(t);if(!c(n))return n}const n=t.valueOf;if(p(n)){const e=n.call(t);if(!c(e))return e}}else{const e=t.valueOf;if(p(e)){const n=e.call(t);if(!c(n))return n}const n=t.toString;if(p(n)){const e=n.call(t);if(!c(e))return e}}throw new TypeError}(t,"default"===i?"number":i)}function f(t){const e=d(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function p(t){return"function"==typeof t}function g(t){const e=Object.getPrototypeOf(t);if("function"!=typeof t||t===n)return e;if(e!==n)return e;const i=t.prototype,r=i&&Object.getPrototypeOf(i);if(null==r||r===Object.prototype)return e;const s=r.constructor;return"function"!=typeof s||s===t?e:s}t("defineMetadata",(function(t,e,n,i){if(!c(n))throw new TypeError;return r=t,a=e,void s(n,i,!0).set(r,a);var r,a})),t("hasMetadata",(function(t,e,n){if(!c(e))throw new TypeError;return u(n)||(n=f(n)),a(t,e,n)})),t("hasOwnMetadata",(function(t,e,n){if(!c(e))throw new TypeError;return u(n)||(n=f(n)),o(t,e,n)})),t("getMetadata",(function(t,e,n){if(!c(e))throw new TypeError;return u(n)||(n=f(n)),l(t,e,n)}))}((e=t,function(t,n){"function"!=typeof e[t]&&Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n})})),t}({});function Xt(t,e,n,i){!function(t,e,n,i){const r=[i];let s={};Vt.hasOwnMetadata(t,e)&&(s=Vt.getMetadata(t,e));let a=s[n];void 0===a&&(a=[]),a.push(...r),s[n]=a,Vt.defineMetadata(t,s,e)}(Ht,t,n.toString(),i)}function Yt(t){return(e,n,i)=>{Xt(e,0,i,t)}}const Kt=(qt=jt,t=>(e,n,i)=>Yt(new Gt(qt,t))(e,n,i));var qt;function Qt(){return function(t){return Vt.defineMetadata($t,null,t),t}}function Zt(t){return Yt(new Gt(Ft,t))}const Jt="Singleton",te="Transient",ee="ConstantValue",ne="DynamicValue",ie="Factory",re="Function",se="Instance",ae="Invalid";class oe{constructor(t,e){this.id=zt.GenAutoIncrementId(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=ae,this.constraint=t=>!0,this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.dynamicValue=null}clone(){const t=new oe(this.serviceIdentifier,this.scope);return t.activated=t.scope===Jt&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.provider=this.provider,t.constraint=this.constraint,t.cache=this.cache,t}}class le{getConstructorMetadata(t){return{compilerGeneratedMetadata:Vt.getMetadata($t,t),userGeneratedMetadata:Vt.getMetadata(Ht,t)||{}}}getPropertiesMetadata(t){throw new Error("暂未实现")}}const ue=(he=Ft,t=>{const e=e=>{if(null==e)return!1;if(e.key===he&&e.value===t)return!0;if(null==e.constructorArgsMetadata)return!1;const n=e.constructorArgsMetadata;for(let e=0;e<n.length;e++)if(n[e].key===he&&n[e].value===t)return!0;return!1};return e.metaData=new Gt(he,t),e});var he;class ce{constructor(t){this._binding=t}inRequestScope(){throw new Error("暂未实现")}inSingletonScope(){return this._binding.scope=Jt,this}inTransientScope(){return this._binding.scope=te,this}whenTargetNamed(t){return this._binding.constraint=ue(t),this}}class de{constructor(t){this._binding=t}to(t){return this._binding.type=se,this._binding.implementationType=t,new ce(this._binding)}toSelf(){const t=this._binding.serviceIdentifier;return this.to(t)}toDynamicValue(t){return this._binding.type=ne,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new ce(this._binding)}toConstantValue(t){return this._binding.type=ee,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Jt,new ce(this._binding)}toFactory(t){return this._binding.type=ie,this._binding.factory=t,this._binding.scope=Jt,new ce(this._binding)}toService(t){this.toDynamicValue((e=>e.container.get(t)))}}const fe=Symbol("ContributionProvider");class pe{constructor(t,e){this.serviceIdentifier=t,this.container=e}getContributions(){return this.caches||(this.caches=[],this.container&&this.container.isBound(this.serviceIdentifier)&&this.caches.push(...this.container.getAll(this.serviceIdentifier))),this.caches}}function ge(t,e){t(fe).toDynamicValue((t=>{let{container:n}=t;return new pe(e,n)})).inSingletonScope().whenTargetNamed(e)}class me{constructor(t,e){this._args=t,this.name=e,this.taps=[]}tap(t,e){this._tap("sync",t,e)}unTap(t,e){const n="string"==typeof t?t.trim():t.name;n&&(this.taps=this.taps.filter((t=>!(t.name===n&&(!e||t.fn===e)))))}_parseOptions(t,e,n){let i;if("string"==typeof e)i={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof i.name||""===i.name)throw new Error("Missing name for tap");return i=Object.assign({type:t,fn:n},i),i}_tap(t,e,n){this._insert(this._parseOptions(t,e,n))}_insert(t){let e;"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let n=0;"number"==typeof t.stage&&(n=t.stage);let i=this.taps.length;for(;i>0;){i--;const t=this.taps[i];this.taps[i+1]=t;const r=t.stage||0;if(e){if(e.has(t.name)){e.delete(t.name);continue}if(e.size>0)continue}if(!(r>n)){i++;break}}this.taps[i]=t}}class be extends me{call(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.taps.map((t=>t.fn)).forEach((t=>t(...e)))}}const ye=Symbol.for("EnvContribution"),ve=q-1e-8;class xe{constructor(t){this.init(t)}init(t){this.bounds=t}arc(t,e,n,i,r,s){if(Math.abs(r-i)>ve)return this.bounds.add(t-n,e-n),void this.bounds.add(t+n,e+n);let a,o,l,u,h=1/0,c=-1/0,d=1/0,f=-1/0;function p(t){l=n*Math.cos(t),u=n*Math.sin(t),l<h&&(h=l),l>c&&(c=l),u<d&&(d=u),u>f&&(f=u)}if(p(i),p(r),r!==i)if((i%=q)<0&&(i+=q),(r%=q)<0&&(r+=q),r<i&&(s=!s,a=i,i=r,r=a),s)for(r-=q,a=i-i%K,o=0;o<4&&a>r;++o,a-=K)p(a);else for(a=i-i%K+K,o=0;o<4&&a<r;++o,a+=K)p(a);this.bounds.add(t+h,e+d),this.bounds.add(t+c,e+f)}arcTo(t,e,n,i,r){throw new Error("不支持arcTo")}bezierCurveTo(t,e,n,i,r,s){this.bounds.add(t,e),this.bounds.add(n,i),this.bounds.add(r,s)}closePath(){}ellipse(){throw new Error("不支持ellipse")}lineTo(t,e){this.bounds.add(t,e)}moveTo(t,e){this.bounds.add(t,e)}quadraticCurveTo(t,e,n,i){this.bounds.add(t,e),this.bounds.add(n,i)}rect(t,e,n,i){this.bounds.add(t,e),this.bounds.add(t+n,e+i)}clear(){this.bounds.clear()}release(){}}class _e{constructor(){this.curves=[],this.bounds=new ct}getCurveLengths(){return this.curves.map((t=>t.getLength()))}getPointAt(t){return{x:0,y:0}}getLength(){return 0}getBounds(){return this.bounds}}const Ae=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,Se={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7},we=0,Te=1,Be=2,Ce=3,ke=4,Me=5,Pe=6,Ee=7,Oe=8;let Le,Re,Ie,Ne,Ue,De;var ze,We,Fe,je,He,$e,Ge,Ve,Xe;function Ye(t,e,n,i,r,s,a,o,l){const u=a*(Math.PI/180),h=Math.sin(u),c=Math.cos(u),d=c*(o-t)*.5+h*(l-e)*.5,f=c*(l-e)*.5-h*(o-t)*.5;let p=d*d/((n=Math.abs(n))*n)+f*f/((i=Math.abs(i))*i);p>1&&(p=Math.sqrt(p),n*=p,i*=p);const g=c/n,m=h/n,b=-h/i,y=c/i,v=g*o+m*l,x=b*o+y*l,_=g*t+m*e,A=b*t+y*e;let S=1/((_-v)*(_-v)+(A-x)*(A-x))-.25;S<0&&(S=0);let w=Math.sqrt(S);s===r&&(w=-w);const T=.5*(v+_)-w*(A-x),B=.5*(x+A)+w*(_-v),C=Math.atan2(x-B,v-T);let k=Math.atan2(A-B,_-T)-C;k<0&&1===s?k+=q:k>0&&0===s&&(k-=q);const M=Math.ceil(Math.abs(k/(K+.001))),P=[];for(let t=0;t<M;++t){const e=C+t*k/M,r=C+(t+1)*k/M;P[t]=[T,B,e,r,n,i,h,c]}return P}function Ke(t){const e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],u=l*s,h=-o*a,c=o*s,d=l*a,f=Math.cos(i),p=Math.sin(i),g=Math.cos(r),m=Math.sin(r),b=.5*(r-i),y=Math.sin(.5*b),v=8/3*y*y/Math.sin(b),x=e+f-v*p,_=n+p+v*f,A=e+g,S=n+m,w=A+v*m,T=S-v*g;return[u*x+h*_,c*x+d*_,u*w+h*T,c*w+d*T,u*A+h*S,c*A+d*S]}function qe(t,e,n,i){const r=Ye(i[5],i[6],i[0],i[1],i[3],i[4],i[2],e,n);for(let e=0;e<r.length;++e){const n=Ke(r[e]);t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5])}}!function(t){t[t.NONE=0]="NONE",t[t.UPDATE_BOUNDS=1]="UPDATE_BOUNDS",t[t.UPDATE_SHAPE=2]="UPDATE_SHAPE",t[t.CLEAR_SHAPE=253]="CLEAR_SHAPE",t[t.UPDATE_SHAPE_AND_BOUNDS=3]="UPDATE_SHAPE_AND_BOUNDS",t[t.INIT=179]="INIT",t[t.CLEAR_BOUNDS=254]="CLEAR_BOUNDS",t[t.UPDATE_GLOBAL_MATRIX=32]="UPDATE_GLOBAL_MATRIX",t[t.CLEAR_GLOBAL_MATRIX=223]="CLEAR_GLOBAL_MATRIX",t[t.UPDATE_LOCAL_MATRIX=16]="UPDATE_LOCAL_MATRIX",t[t.CLEAR_LOCAL_MATRIX=239]="CLEAR_LOCAL_MATRIX",t[t.UPDATE_GLOBAL_LOCAL_MATRIX=48]="UPDATE_GLOBAL_LOCAL_MATRIX",t[t.UPDATE_LAYOUT=128]="UPDATE_LAYOUT",t[t.CLEAR_LAYOUT=127]="CLEAR_LAYOUT"}(ze||(ze={})),function(t){t[t.GLOBAL=1]="GLOBAL",t[t.LOCAL=16]="LOCAL",t[t.GLOBAL_ACCURATE=3]="GLOBAL_ACCURATE",t[t.LOCAL_ACCURATE=48]="LOCAL_ACCURATE"}(We||(We={})),function(t){t[t.INIT=0]="INIT",t[t.DEFAULT=1]="DEFAULT",t[t.STATE=2]="STATE",t[t.ANIMATE_BIND=10]="ANIMATE_BIND",t[t.ANIMATE_PLAY=11]="ANIMATE_PLAY",t[t.ANIMATE_START=12]="ANIMATE_START",t[t.ANIMATE_UPDATE=13]="ANIMATE_UPDATE",t[t.ANIMATE_END=14]="ANIMATE_END",t[t.TRANSLATE=20]="TRANSLATE",t[t.TRANSLATE_TO=21]="TRANSLATE_TO",t[t.SCALE=22]="SCALE",t[t.SCALE_TO=23]="SCALE_TO",t[t.ROTATE=24]="ROTATE",t[t.ROTATE_TO=25]="ROTATE_TO"}(Fe||(Fe={})),function(t){t[t.INITIAL=0]="INITIAL",t[t.RUNNING=1]="RUNNING",t[t.PAUSED=2]="PAUSED",t[t.END=3]="END"}(je||(je={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SET_ATTR_IMMEDIATELY=1]="SET_ATTR_IMMEDIATELY"}(He||(He={})),function(t){t.wait="wait",t.from="from",t.to="to",t.customAnimate="customAnimate"}($e||($e={})),function(t){t[t.ROW=1]="ROW",t[t.COLUMN=2]="COLUMN"}(Ge||(Ge={})),function(t){t[t.CubicBezierCurve=0]="CubicBezierCurve",t[t.QuadraticBezierCurve=1]="QuadraticBezierCurve",t[t.ArcCurve=2]="ArcCurve",t[t.LineCurve=3]="LineCurve",t[t.EllipseCurve=4]="EllipseCurve",t[t.MoveCurve=5]="MoveCurve"}(Ve||(Ve={})),function(t){t[t.beforeFillStroke=0]="beforeFillStroke",t[t.afterFillStroke=1]="afterFillStroke"}(Xe||(Xe={}));const Qe=[(t,e,n,i,r,s,a)=>e.arc(t[1]*r+n,t[2]*s+i,t[3]*(r+s)/2,t[4],t[5],t[6],a),(t,e,n,i,r,s,a)=>e.arcTo(t[1]*r+n,t[2]*s+i,t[3]*r+n,t[4]*s+i,t[5]*(r+s)/2,a),(t,e,n,i,r,s,a)=>e.bezierCurveTo(t[1]*r+n,t[2]*s+i,t[3]*r+n,t[4]*s+i,t[5]*r+n,t[6]*s+i,a),(t,e,n,i)=>e.closePath(),(t,e,n,i,r,s)=>e.ellipse(t[1]*r+n,t[2]*s+i,t[3]*r,t[4]*s,t[5],t[6],t[7],t[8]),(t,e,n,i,r,s,a)=>e.lineTo(t[1]*r+n,t[2]*s+i,a),(t,e,n,i,r,s,a)=>e.moveTo(t[1]*r+n,t[2]*s+i,a),(t,e,n,i,r,s,a)=>e.quadraticCurveTo(t[1]*r+n,t[2]*s+i,t[3]*r+n,t[4]*s+i,a),(t,e,n,i,r,s,a)=>e.rect(t[1]*r+n,t[2]*s+i,t[3]*r,t[4]*s,a)];function Ze(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,a=arguments.length>6?arguments[6]:void 0;for(let o=0;o<t.length;o++){const l=t[o];Qe[l[0]](l,e,n,i,r,s,a)}}class Je{getLength(t){return null!=t?this.calcProjLength(t):(Number.isFinite(this.length)||(this.length=this.calcLength()),this.length)}}function tn(t,e,n,i,r){return function(t,e){let n=0;const i=t.length;for(let r=0;r<i;r++){const s=t[r],a=e[r],o=t[(r+1)%i],l=e[(r+1)%i];n+=lt.distanceNN(s,a,o,l)}return n/2}([t.x,e.x,n.x,i.x],[t.y,e.y,n.y,i.y])}function en(t,e,n,i,r){const s=1-r;return s*s*s*t+3*e*r*s*s+3*n*r*r*s+i*r*r*r}class nn extends Je{constructor(t,e,n,i){super(),this.type=Ve.CubicBezierCurve,this.p0=t,this.p1=e,this.p2=n,this.p3=i}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y+this.p3.x+this.p3.y)}getPointAt(t){if(!1!==this.defined)return function(t,e,n,i,r){const s=en(t.x,e.x,n.x,i.x,r),a=en(t.y,e.y,n.y,i.y,r);return new ot(s,a)}(this.p0,this.p1,this.p2,this.p3,t);throw new Error("defined为false的点不能getPointAt")}calcLength(){return this._validPoint()?tn(this.p0,this.p1,this.p2,this.p3):60}calcProjLength(t){return t===Ge.ROW?Z(this.p0.x-this.p3.x):t===Ge.COLUMN?Z(this.p0.y-this.p3.y):0}getAngleAt(t){const e=et(t-.01,0),n=nt(t+.01,1),i=this.getPointAt(e),r=this.getPointAt(n);return J(r.y-i.y,r.x-i.x)}}class rn extends Je{constructor(t,e){super(),this.type=Ve.LineCurve,this.p0=t,this.p1=e}getPointAt(t){if(!1!==this.defined)return lt.pointAtPP(this.p0,this.p1,t);throw new Error("defined为false的点不能getPointAt")}getAngleAt(t){return null==this.angle&&(this.angle=J(this.p1.y-this.p0.y,this.p1.x-this.p0.x)),this.angle}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y)}calcLength(){return this._validPoint()?lt.distancePP(this.p0,this.p1):60}calcProjLength(t){return t===Ge.ROW?Z(this.p0.x-this.p1.x):t===Ge.COLUMN?Z(this.p0.y-this.p1.y):0}}class sn{get endX(){return this._lastX}get endY(){return this._lastY}constructor(t,e){this.init(t,e)}init(t,e){this._lastX=this._lastY=this._startX=this._startY=0,this.curveType=t,this.direction=e,this.curves=[]}bezierCurveTo(t,e,n,i,r,s,a,o){const l=new nn(new ot(this._lastX,this._lastY),new ot(t,e),new ot(n,i),new ot(r,s));l.originP1=this._lastOriginP,l.originP2=o,l.defined=a,this.curves.push(l),this._lastX=r,this._lastY=s,this._lastOriginP=o}closePath(){if(this.curves.length<2)return;const t=this.curves[this.curves.length-1];this.lineTo(this._startX,this._startY,t.defined,this._startOriginP)}ellipse(){throw new Error("SegContext不支持调用ellipse")}lineTo(t,e,n,i){const r=this.addLinearCurve(t,e,n,this._lastOriginP,i);this.curves.push(r),this._lastX=t,this._lastY=e,this._lastOriginP=i}moveTo(t,e,n){return this._lastX=this._startX=t,this._lastY=this._startY=e,this._lastOriginP=n,this._startOriginP=n,this}quadraticCurveTo(t,e,n,i){throw new Error("SegContext不支持调用quadraticCurveTo")}clear(){this.curves=[],this.length=NaN}tryUpdateLength(t){return this.getLength(t)}addLinearCurve(t,e,n,i,r){const s=new rn(new ot(this._lastX,this._lastY),new ot(t,e));return s.originP1=i,s.originP2=r,s.defined=n,s}getPointAt(t){throw new Error("暂未实现")}getCurveLengths(){return[]}getLength(t){var e,n;if(t===Ge.COLUMN){if(!this.curves.length)return 0;const t=this.curves[0],n=this.curves[this.curves.length-1],i=null!==(e=n.p3)&&void 0!==e?e:n.p1;return Z(t.p0.y-i.y)}if(t===Ge.ROW){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1],i=null!==(n=e.p3)&&void 0!==n?n:e.p1;return Z(t.p0.x-i.x)}return Number.isFinite(this.length)||(this.length=this.curves.reduce(((t,e)=>t+e.getLength()),0)),this.length}}class an extends sn{bezierCurveTo(t,e,n,i,r,s,a,o){return super.bezierCurveTo(e,t,i,n,s,r,a,o)}lineTo(t,e,n,i){return super.lineTo(e,t,n,i)}moveTo(t,e,n){return super.moveTo(e,t,n)}clear(){return super.clear()}}function on(t,e){let n=!1;for(let i=0,r=e.length;i<=r;i++)i>=r===n&&((n=!n)?t.lineStart():t.lineEnd()),n&&t.point(e[i])}function ln(t,e,n){const i=null!=e?e:Z(n[n.length-1].x-n[0].x)>Z(n[n.length-1].y-n[0].y)?Ge.ROW:Ge.COLUMN;return"monotoneY"===t?new an(t,i):new sn(t,i)}class un{constructor(t,e){this.context=t,e&&(this.startPoint=e)}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;default:this.context.lineTo(e,n,!1!==this._lastDefined&&!1!==t.defined,t)}this._lastDefined=t.defined}tryUpdateLength(){return this.context.tryUpdateLength()}}function hn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:i}=e;if(t.length<2-Number(!!i))return null;const r=ln("linear",n,t);return function(t,e){on(t,e)}(new un(r,i),t),r}function cn(t,e,n,i,r){t.context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6,i,t.lastPoint1)}class dn{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){2===this._point&&cn(this,6*this._x1-(this._x0+4*this._x1),6*this._y1-(this._y0+4*this._y1),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;break;default:cn(this,e,n,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}function fn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:i}=e;if(t.length<2-Number(!!i))return null;if(t.length<3-Number(!!i))return hn(t,e);const r=ln("basis",n,t);return function(t,e){on(t,e)}(new dn(r,i),t),r}function pn(t){return t<0?-1:1}function gn(t,e,n){const i=t._x1-t._x0,r=e-t._x1,s=(t._y1-t._y0)/(i||Number(r<0&&-0)),a=(n-t._y1)/(r||Number(i<0&&-0)),o=(s*r+a*i)/(i+r);return(pn(s)+pn(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function mn(t,e){const n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function bn(t,e,n,i,r){const s=t._x0,a=t._y0,o=t._x1,l=t._y1,u=(o-s)/3;t.context.bezierCurveTo(s+u,a+u*e,o-u,l-u*n,o,l,i,t.lastPoint1)}class yn{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x1,this._y1,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:bn(this,this._t0,mn(this,this._t0),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1)}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){let e=NaN;const n=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(n,i,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(n,i,t);break;case 1:this._point=2;break;case 2:this._point=3,bn(this,mn(this,e=gn(this,n,i)),e,!1!==this._lastDefined1&&!1!==this._lastDefined2);break;default:bn(this,this._t0,e=gn(this,n,i),!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=n,this._y0=this._y1,this._y1=i,this._t0=e,this._lastDefined1=this._lastDefined2,this._lastDefined2=!1!==t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}class vn extends yn{constructor(t,e){super(t,e)}point(t){return super.point({y:t.x,x:t.y,defined:t.defined})}}function xn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:i}=e;if(t.length<2-Number(!!i))return null;if(t.length<3-Number(!!i))return hn(t,e);const r=ln("monotoneX",n,t);return function(t,e){on(t,e)}(new yn(r,i),t),r}function _n(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:i}=e;if(t.length<2-Number(!!i))return null;if(t.length<3-Number(!!i))return hn(t,e);const r=ln("monotoneY",n,t);return function(t,e){on(t,e)}(new vn(r,i),t),r}let An=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2?arguments[2]:void 0;this.context=t,this._t=e,this.startPoint=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x=this._y=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){0<this._t&&this._t<1&&2===this._point&&this.context.lineTo(this._x,this._y,!1!==this._lastDefined,this.lastPoint),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;default:if(this._t<=0)this.context.lineTo(this._x,n,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(e,n,!1!==this._lastDefined&&!1!==t.defined,t);else{const i=this._x*(1-this._t)+e*this._t;this.context.lineTo(i,this._y,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(i,n,!1!==this._lastDefined&&!1!==t.defined,t)}}this._lastDefined=t.defined,this._x=e,this._y=n,this.lastPoint=t}tryUpdateLength(){return this.context.tryUpdateLength()}};function Sn(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:i,startPoint:r}=n;if(t.length<2-Number(!!r))return null;const s=new sn("step",null!=i?i:Z(t[t.length-1].x-t[0].x)>Z(t[t.length-1].y-t[0].y)?Ge.ROW:Ge.COLUMN);return function(t,e){on(t,e)}(new An(s,e,r),t),s}class wn extends un{lineEnd(){this.context.closePath()}}function Tn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:n,startPoint:i}=e;if(t.length<2-Number(!!i))return null;const r=ln("linear",n,t);return function(t,e){on(t,e)}(new wn(r,i),t),r}function Bn(t,e,n,i,r){let s=t._x1,a=t._y1,o=t._x2,l=t._y2;if(t._l01_a>X){const e=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,n=3*t._l01_a*(t._l01_a+t._l12_a);s=(s*e-t._x0*t._l12_2a+t._x2*t._l01_2a)/n,a=(a*e-t._y0*t._l12_2a+t._y2*t._l01_2a)/n}if(t._l23_a>X){const i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,r=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*i+t._x1*t._l23_2a-e*t._l12_2a)/r,l=(l*i+t._y1*t._l23_2a-n*t._l12_2a)/r}t.context.bezierCurveTo(s,a,o,l,t._x2,t._y2,i,t.lastPoint1)}function Cn(t,e){return function(n,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:s,startPoint:a}=r;if(n.length<2-Number(!!a))return null;if(n.length<3-Number(!!a))return hn(n,r);const o=ln(t,s,n);return on(new e(o,i,a),n),o}}const kn=Cn("catmullRom",class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2?arguments[2]:void 0;this.context=t,this.startPoint=n,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x2,this._y2,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:this.point({x:this._x2,y:this._y2})}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const{x:e,y:n}=t;if(this._point){const t=this._x2-e,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(t*t+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,!1!==this._lastDefined1&&!1!==this._lastDefined2):this.context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Bn(this,e,n,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}});const Mn=Cn("catmullRomClosed",class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2?arguments[2]:void 0;this.context=t,this.startPoint=n,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 1:this.context.moveTo(this._x3,this._y3,this.lastPoint1),this.context.closePath();break;case 2:this.context.lineTo(this._x3,this._y3,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),this.context.closePath();break;case 3:this.point({x:this._x3,y:this._y3}),this.point({x:this._x4,y:this._y4}),this.point({x:this._x5,y:this._y5})}}point(t){const{x:e,y:n}=t;if(this._point){const t=this._x2-e,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(t*t+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=n;break;case 1:this._point=2,this.context.moveTo(this._x4=e,this._y4=n,t);break;case 2:this._point=3,this._x5=e,this._y5=n;break;default:Bn(this,e,n,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}});class Pn extends _e{constructor(t){super(),this.commandList=[],t&&(this._ctx=t),this._boundsContext=new xe(this.bounds)}setCtx(t){this._ctx=t}moveTo(t,e){return this.commandList.push([Pe,t,e]),this._ctx&&this._ctx.moveTo(t,e),this}lineTo(t,e){return this.commandList.push([Me,t,e]),this._ctx&&this._ctx.lineTo(t,e),this}quadraticCurveTo(t,e,n,i){return this.commandList.push([Ee,t,e,n,i]),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,s){return this.commandList.push([Be,t,e,n,i,r,s]),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,s),this}arcTo(t,e,n,i,r){return this.commandList.push([Te,t,e,n,i,r]),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,s,a,o){return this.commandList.push([ke,t,e,n,i,r,s,a,o]),this._ctx&&this._ctx.ellipse(t,e,n,i,r,s,a,o),this}rect(t,e,n,i){return this.commandList.push([Oe,t,e,n,i]),this._ctx&&this._ctx.rect(t,e,n,i),this}arc(t,e,n,i,r,s){return this.commandList.push([we,t,e,n,i,r,s]),this._ctx&&this._ctx.arc(t,e,n,i,r,s),this}closePath(){return this.commandList.push([Ce]),this._ctx&&this._ctx.closePath(),this}addCurve(t){this.curves.push(t)}clear(){this.transformCbList=null,this.commandList.length=0,this.curves.length=0}beginPath(){this.clear()}toString(){if(!this.toStringCbList){const t=[];t[Pe]=t=>`M${t[1]} ${t[2]}`,t[Me]=t=>`L${t[1]} ${t[2]}`,t[Ee]=t=>`Q${t[1]} ${t[2]} ${t[3]} ${t[4]}`,t[Be]=t=>`C${t[1]} ${t[2]} ${t[3]} ${t[4]} ${t[5]} ${t[6]}`,t[we]=t=>{const e=[];((t,e,n,i,r,s,a)=>{const o=Math.abs(n-e),l=4*Math.tan(o/4)/3,u=n<e?-1:1,h=Math.cos(e),c=Math.sin(e),d=Math.cos(n),f=Math.sin(n),p=h*s+i,g=c*a+r,m=d*s+i,b=f*a+r,y=s*l*u,v=a*l*u;t.push(p-y*c,g+v*h,m+y*f,b-v*d,m,b)})(e,t[4],t[5],t[1],t[2],t[3],t[3]);let n="";for(let t=0;t<e.length;t+=6)n+=`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`;return n},t[Oe]=t=>`M${t[1]} ${t[2]} h${t[3]} v${t[4]} H${t[1]}Z`,t[Ce]=t=>"Z",this.toStringCbList=t}const t=this.toStringCbList;let e="";return this.commandList.forEach((n=>{e+=t[n[0]](n)})),e}fromString(t,e,n,i,r){this.clear();const s=function(t){if(!t)return[];const e=t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);if(null===e)return[];let n,i;const r=[];for(let t=0,s=e.length;t<s;t++)if(Le=e[t],Re=Le.slice(1),Ie=Le[0],n=[Ie],i=Re.match(Ae),null!==i){for(let t=0,e=i.length;t<e;t++)Ne=i[t],Ue=parseFloat(Ne),Number.isNaN(Ue)||n.push(Ue);if(De=Se[Ie],n.length-1>De){let t;for(let e=1,i=n.length;e<i;e+=De){t=[Ie];for(let i=e,r=e+De;i<r;i++)t.push(n[i]);r.push(t)}}else r.push(n)}else r.push(n);return r}(t);return this._runCommandStrList(s,e,n,i,r),this._updateBounds(),this}fromLine(t){const{points:e,curveType:n,clipRangeByDimension:i}=t.attribute;if(!e)return;const r=function(t,e,n){var i,r;switch(e){case"linear":default:return hn(t,n);case"basis":return fn(t,n);case"monotoneX":return xn(t,n);case"monotoneY":return _n(t,n);case"step":return Sn(t,.5,n);case"stepBefore":return Sn(t,0,n);case"stepAfter":return Sn(t,1,n);case"catmullRom":return kn(t,null!==(i=null==n?void 0:n.curveTension)&&void 0!==i?i:.5,n);case"catmullRomClosed":return Mn(t,null!==(r=null==n?void 0:n.curveTension)&&void 0!==r?r:.5,n);case"linearClosed":return Tn(t,n)}}(e,n);"x"===i?this.direction=Ge.ROW:"y"===i?this.direction=Ge.COLUMN:"auto"===i&&(this.direction=r.direction),this.curves=r.curves}fromCustomPath2D(t,e,n,i,r){return this.clear(),this._runCommandList(t.commandList,e,n,i,r),this._updateBounds(),this}transform(t,e,n,i){const r=this.commandList;if(!this.transformCbList){const t=[];t[Pe]=this.moveToTransform,t[Me]=this.lineToTransform,t[Ee]=this.quadraticCurveToTransform,t[Be]=this.bezierCurveToTransform,t[Te]=this.arcToTransform,t[ke]=this.ellipseTransform,t[Oe]=this.rectTransform,t[we]=this.arcTransform,t[Ce]=this.closePathTransform,this.transformCbList=t}r.forEach((r=>{this.transformCbList[r[0]](r,t,e,n,i)})),this._updateBounds()}moveToTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n}lineToTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n}quadraticCurveToTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n,t[3]=t[3]*i+e,t[4]=t[4]*r+n}bezierCurveToTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n,t[3]=t[3]*i+e,t[4]=t[4]*r+n,t[5]=t[5]*i+e,t[6]=t[6]*r+n}arcToTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n,t[3]=t[3]*i+e,t[4]=t[4]*r+n,t[5]=t[5]*(i+r)/2}ellipseTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n,t[3]=t[3]*i,t[4]=t[4]*r}rectTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n,t[3]=t[3]*i,t[4]=t[4]*r}arcTransform(t,e,n,i,r){t[1]=t[1]*i+e,t[2]=t[2]*r+n,t[3]=t[3]*(i+r)/2}closePathTransform(){}_runCommandStrList(t){let e,n,i,r,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,h=null,c=0,d=0,f=0,p=0;for(let g=0,m=t.length;g<m;++g){switch(e=t[g],1===l&&1===u||(e=On(e,l,u)),e[0]){case"l":c+=e[1],d+=e[2],this.lineTo(c+a,d+o);break;case"L":c=e[1],d=e[2],this.lineTo(c+a,d+o);break;case"h":c+=e[1],this.lineTo(c+a,d+o);break;case"H":c=e[1],this.lineTo(c+a,d+o);break;case"v":d+=e[1],this.lineTo(c+a,d+o);break;case"V":d=e[1],this.lineTo(c+a,d+o);break;case"m":c+=e[1],d+=e[2],this.moveTo(c+a,d+o);break;case"M":c=e[1],d=e[2],this.moveTo(c+a,d+o);break;case"c":n=c+e[5],i=d+e[6],f=c+e[3],p=d+e[4],this.bezierCurveTo(c+e[1]+a,d+e[2]+o,f+a,p+o,n+a,i+o),c=n,d=i;break;case"C":c=e[5],d=e[6],f=e[3],p=e[4],this.bezierCurveTo(e[1]+a,e[2]+o,f+a,p+o,c+a,d+o);break;case"s":n=c+e[3],i=d+e[4],f=2*c-f,p=2*d-p,this.bezierCurveTo(f+a,p+o,c+e[1]+a,d+e[2]+o,n+a,i+o),f=c+e[1],p=d+e[2],c=n,d=i;break;case"S":n=e[3],i=e[4],f=2*c-f,p=2*d-p,this.bezierCurveTo(f+a,p+o,e[1]+a,e[2]+o,n+a,i+o),c=n,d=i,f=e[1],p=e[2];break;case"q":n=c+e[3],i=d+e[4],f=c+e[1],p=d+e[2],this.quadraticCurveTo(f+a,p+o,n+a,i+o),c=n,d=i;break;case"Q":n=e[3],i=e[4],this.quadraticCurveTo(e[1]+a,e[2]+o,n+a,i+o),c=n,d=i,f=e[1],p=e[2];break;case"t":n=c+e[1],i=d+e[2],null===h[0].match(/[QqTt]/)?(f=c,p=d):"t"===h[0]?(f=2*c-r,p=2*d-s):"q"===h[0]&&(f=2*c-f,p=2*d-p),r=f,s=p,this.quadraticCurveTo(f+a,p+o,n+a,i+o),c=n,d=i,f=c+e[1],p=d+e[2];break;case"T":n=e[1],i=e[2],f=2*c-f,p=2*d-p,this.quadraticCurveTo(f+a,p+o,n+a,i+o),c=n,d=i;break;case"a":qe(this,c+a,d+o,[e[1],e[2],e[3],e[4],e[5],e[6]+c+a,e[7]+d+o]),c+=e[6],d+=e[7];break;case"A":qe(this,c+a,d+o,[e[1],e[2],e[3],e[4],e[5],e[6]+a,e[7]+o]),c=e[6],d=e[7];break;case"z":case"Z":this.closePath()}h=e}}_runCommandList(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if(0!==e||0!==n||1!==i||1!==r)for(let s=0,a=t.length;s<a;++s){const a=t[s].slice();switch(a[0]){case Me:this.lineToTransform(a,e,n,i,r);break;case Pe:this.moveToTransform(a,e,n,i,r);break;case Be:this.bezierCurveToTransform(a,e,n,i,r);break;case Ee:this.quadraticCurveToTransform(a,e,n,i,r);break;case we:this.arcToTransform(a,e,n,i,r);break;case ke:this.ellipseTransform(a,e,n,i,r);break;case Oe:this.rectTransform(a,e,n,i,r);break;case Te:this.arcToTransform(a,e,n,i,r);break;case Ce:this.closePath()}}else this.commandList=t.map((t=>t.slice()))}_updateBounds(){this.bounds.clear(),Ze(this.commandList,this._boundsContext)}release(){this.commandList=[],this._boundsContext=null,this._ctx=null}getLength(){if(this.direction===Ge.COLUMN){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return Z(t.p0.y-e.p1.y)}if(this.direction===Ge.ROW){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return Z(t.p0.x-e.p1.x)}return this.curves.reduce(((t,e)=>t+e.getLength()),0)}getAttrAt(t){if(!this.curves)return{pos:{x:0,y:0},angle:0};let e,n=0;for(let i=0;i<this.curves.length;i++){e=this.curves[i];const r=e.getLength(this.direction);if(n+r>=t)break;n+=r}const i=(t-n)/e.getLength(this.direction);return{pos:e.getPointAt(i),angle:e.getAngleAt(i)}}}const En=["l",0,0,0,0,0,0,0];function On(t,e,n){const i=En[0]=t[0];if("a"===i||"A"===i)En[1]=e*t[1],En[2]=n*t[2],En[3]=t[3],En[4]=t[4],En[5]=t[5],En[6]=e*t[6],En[7]=n*t[7];else if("h"===i||"H"===i)En[1]=e*t[1];else if("v"===i||"V"===i)En[1]=n*t[1];else for(let i=1,r=t.length;i<r;++i)En[i]=(i%2==1?e:n)*t[i];return En}const Ln={x:0,y:0,z:0,dx:0,dy:0,dz:0,scrollX:0,scrollY:0,scaleX:1,scaleY:1,scaleZ:1,angle:0,alpha:0,beta:0,scaleCenter:[0,0],anchor:[0,0],anchor3d:[0,0],postMatrix:new ft},Rn={strokeOpacity:1,lineDash:[],lineDashOffset:0,lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,strokeBoundsBuffer:2,stroke:!1},In=Object.assign({outerBorder:Object.assign(Object.assign({},Rn),{distance:0}),innerBorder:Object.assign(Object.assign({},Rn),{distance:0})},Rn),Nn={text:"",maxLineWidth:1/0,textAlign:"left",textBaseline:"alphabetic",fontSize:16,fontFamily:"PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",fontWeight:"",ellipsis:"…",fontVariant:"",fontStyle:"",lineHeight:void 0,underline:0,lineThrough:0,scaleIn3d:!1,direction:"horizontal",wordBreak:"break-all",ignoreBuf:!1,verticalMode:0,wrap:!1,whiteSpace:"no-wrap",heightLimit:1/0,lineClamp:1/0,suffixPosition:"end",underlineDash:[],underlineOffset:0,disableAutoClipedPoptip:void 0},Un=Object.assign(Object.assign(Object.assign(Object.assign({forceBoundsWidth:void 0,forceBoundsHeight:void 0,opacity:1,background:null,backgroundOpacity:1,backgroundCornerRadius:0,texture:null,textureColor:"black",textureSize:10,texturePadding:2,backgroundMode:"no-repeat",backgroundFit:!0,blur:0,cursor:null,html:null,react:null},{fillOpacity:1,fill:!1,shadowBlur:0,shadowColor:"black",shadowOffsetX:0,shadowOffsetY:0}),In),{alignSelf:"auto"}),{pickStrokeBuffer:0}),Dn={connectedType:"none",connectedStyle:{},connectedX:NaN,connectedY:NaN},zn=Object.assign(Object.assign(Object.assign({strokeSeg:null,renderable:!0,pickable:!0,shadowGraphic:void 0,childrenPickable:!0,fillPickable:!0,strokePickable:!0,visible:!0,zIndex:0,layout:null,boundsPadding:0,renderStyle:"default",pickMode:"accurate",customPickShape:null,boundsMode:"accurate",keepDirIn3d:!0,shadowRootIdx:1,globalZIndex:1,globalCompositeOperation:"",overflow:"hidden",shadowPickMode:"graphic"},{_debug_bounds:!1}),Un),Ln),Wn=Object.assign(Object.assign({},zn),{startAngle:0,endAngle:Q,innerRadius:0,outerRadius:1,innerPadding:0,outerPadding:0,cornerRadius:0,padRadius:0,padAngle:0,cap:!1,forceShowCap:!1}),Fn=Object.assign(Object.assign(Object.assign({},zn),Dn),{points:[],segments:[],curveType:"linear",clipRange:1,closePath:!1,curveTension:1}),jn=Object.assign(Object.assign({},zn),{radius:1,startAngle:0,endAngle:Q}),Hn=Object.assign(Object.assign({},zn),{width:0,height:0,cornerRadius:0,path:[],clip:!1,visibleAll:!0,display:"relative",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",alignContent:"flex-start",baseOpacity:1}),$n=Object.assign(Object.assign({},zn),{path:"",width:0,height:0,cornerRadius:0,clip:!1}),Gn=Object.assign(Object.assign(Object.assign({},zn),Dn),{points:[],segments:[],curveType:"linear",clipRange:1,clipRangeByDimension:"default",closePath:!1,curveTension:1}),Vn=Object.assign(Object.assign({},zn),{path:new Pn,customPath:()=>{G.getInstance().warn("空函数")}}),Xn=Object.assign(Object.assign({},zn),{points:[],cornerRadius:0,closePath:!0}),Yn=Object.assign(Object.assign({},zn),{width:0,height:0,x1:0,y1:0,strokeBoundsBuffer:0,cornerRadius:0});Object.assign(Object.assign({},zn),{width:0,height:0,x1:0,y1:0,cornerRadius:0,length:0});const Kn=Object.assign(Object.assign({},zn),{symbolType:"circle",size:10,keepDirIn3d:!0}),qn=Object.assign(Object.assign(Object.assign({},zn),Nn),{strokeBoundsBuffer:0,keepDirIn3d:!0}),Qn=Object.assign(Object.assign(Object.assign({},zn),Nn),{editable:!1,width:300,height:300,ellipsis:!0,wordBreak:"break-word",verticalDirection:"top",textAlign:"left",textBaseline:"top",layoutDirection:"horizontal",textConfig:[],disableAutoWrapLine:!1,maxHeight:void 0,maxWidth:void 0,singleLine:!1}),Zn=Object.assign(Object.assign({repeatX:"no-repeat",repeatY:"no-repeat",image:"",width:0,height:0},zn),{fill:!0,cornerRadius:0}),Jn=Object.assign(Object.assign({},Zn),{backgroundShowMode:"never",backgroundWidth:0,backgroundHeight:0,textAlign:"left",textBaseline:"middle",direction:"horizontal",margin:0,id:"",width:20,height:20,backgroundFill:"rgba(101, 117, 168, 0.1)",backgroundFillOpacity:1,backgroundStroke:!1,backgroundStrokeOpacity:1,backgroundRadius:4,opacity:1});const ti=new class{},ei={horizontal:{width:"width",height:"height",left:"left",top:"top",x:"x",y:"y",bottom:"bottom"},vertical:{width:"height",height:"width",left:"top",top:"left",x:"y",y:"x",bottom:"right"}},ni=!0,ii=!1,ri=/\w|\(|\)|-/,si=/[.?!,;:/,。?!、;:]/,ai=/\S/,oi=(t,e)=>{let n=e.fontSize||16;switch(e.script){case"super":case"sub":n*=.8}t.setTextStyle({textAlign:"left",textBaseline:e.textBaseline||"alphabetic",fontStyle:e.fontStyle||"",fontWeight:e.fontWeight||"",fontSize:n,fontFamily:e.fontFamily||"sans-serif"})};function li(t,e,n,i,r){if(!e||e<=0)return 0;const s=ti.graphicUtil.textMeasure;let a=i,o=t.slice(0,a),l=Math.floor(s.measureText(o,n).width),u=t.slice(0,a+1),h=Math.floor(s.measureText(u,n).width);for(;l>e||h<=e;){if(l>e?a--:a++,a>t.length){a=t.length;break}if(a<0){a=0;break}o=t.slice(0,a),l=Math.floor(s.measureText(o,n).width),u=t.slice(0,a+1),h=Math.floor(s.measureText(u,n).width)}return r&&(a=function(t,e){let n=e;for(;ri.test(t[n-1])&&ri.test(t[n])||si.test(t[n]);)if(n--,n<=0)return e;return n}(t,a)),a}function ui(t,e){const n=ti.graphicUtil.textMeasure.measureText(t,e),i={ascent:0,height:0,descent:0,width:0};return"number"!=typeof n.actualBoundingBoxAscent||"number"!=typeof n.actualBoundingBoxDescent?(i.width=Math.floor(n.width),i.height=e.fontSize||0,i.ascent=i.height,i.descent=0):(i.width=Math.floor(n.width),i.height=Math.floor(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent),i.ascent=Math.floor(n.actualBoundingBoxAscent),i.descent=i.height-i.ascent),i}const hi=new class{constructor(t){const e=t||{};e.defaultScope=e.defaultScope||te,this.options=e,this.id=zt.GenAutoIncrementId(),this._bindingDictionary=new Map,this._metadataReader=new le}load(t){const e=this._getContainerModuleHelpersFactory()(t.id);t.registry(e.bindFunction,e.unbindFunction,e.isboundFunction,e.rebindFunction)}get(t){const e=this._getNotAllArgs(t,!1);return this._get(e)}getAll(t){const e=this._getAllArgs(t);return this._get(e)}getTagged(t,e,n){const i=this._getNotAllArgs(t,!1,e,n);return this._get(i)}getNamed(t,e){return this.getTagged(t,Ft,e)}isBound(t){return this._bindingDictionary.has(t)}bind(t){const e=this.options.defaultScope,n=new oe(t,e),i=this._bindingDictionary.get(t)||[];return i.push(n),this._bindingDictionary.set(t,i),new de(n)}unbind(t){this._bindingDictionary.delete(t)}rebind(t){return this.unbind(t),this.bind(t)}_getContainerModuleHelpersFactory(){const t=(t,e)=>{t._binding.moduleId=e},e=e=>n=>{const i=this.bind(n);return t(i,e),i},n=()=>t=>this.unbind(t),i=()=>t=>this.isBound(t),r=e=>n=>{const i=this.rebind(n);return t(i,e),i};return t=>({bindFunction:e(t),isboundFunction:i(),rebindFunction:r(t),unbindFunction:n(),unbindAsyncFunction:t=>null})}_getNotAllArgs(t,e,n,i){return{avoidConstraints:!1,isMultiInject:e,serviceIdentifier:t,key:n,value:i}}_getAllArgs(t){return{avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t}}_get(t){const e=[];return this._bindingDictionary.get(t.serviceIdentifier).filter((e=>e.constraint(t))).forEach((t=>{e.push(this._resolveFromBinding(t))})),t.isMultiInject||1!==e.length?e:e[0]}_getChildRequest(t){const e=t.implementationType,{userGeneratedMetadata:n}=this._metadataReader.getConstructorMetadata(e),i=Object.keys(n),r=[];for(let t=0;t<i.length;t++){const e=n[t],i={};e.forEach((t=>{i[t.key]=t.value}));const s={inject:i[jt],multiInject:i.multi_inject},a=s.inject||s.multiInject,o={serviceIdentifier:a,constructorArgsMetadata:e},l={injectIdentifier:a,metadata:e,bindings:this._bindingDictionary.get(a).filter((t=>t.constraint(o)))};r.push(l)}return r}_resolveFromBinding(t){const e=this._getResolvedFromBinding(t);return this._saveToScope(t,e),e}_getResolvedFromBinding(t){let e;switch(t.type){case ee:case re:e=t.cache;break;case se:e=this._resolveInstance(t,t.implementationType);break;default:e=t.dynamicValue({container:this})}return e}_resolveInstance(t,e){if(t.activated)return t.cache;const n=this._getChildRequest(t);return this._createInstance(e,n)}_createInstance(t,e){return e.length?new t(...this._resolveRequests(e)):new t}_resolveRequests(t){return t.map((t=>t.bindings.length>1?t.bindings.map((t=>this._resolveFromBinding(t))):this._resolveFromBinding(t.bindings[0])))}_saveToScope(t,e){t.scope===Jt&&(t.cache=e,t.activated=!0)}},ci=Symbol.for("CanvasFactory");function di(t){return hi.getNamed(ci,ti.global.env)(t)}const fi=new class{constructor(){this.pools=[],this.allocatedCanvas=[]}shareCanvas(){return this.allocatedCanvas.length?this.allocatedCanvas[0]:this.getCommonCanvas()}getCommonCanvas(){return this._commonCanvas||(this._commonCanvas=this.allocate({width:100,height:100,dpr:2})),this._commonCanvas}allocate(t){if(!this.pools.length){const e=di(Object.assign({nativeCanvas:ti.global.createCanvas(t)},t));return this.allocatedCanvas.push(e),e}const e=this.pools.pop();return e.resize(t.width,t.height),e.dpr=t.dpr,e}allocateByObj(t){if(!this.pools.length){const e={width:t.width/t.dpr,height:t.height/t.dpr,dpr:t.dpr},n=di(Object.assign({nativeCanvas:ti.global.createCanvas(e)},e));return this.allocatedCanvas.push(n),n}const e=this.pools.pop();return e.width=t.width,e.height=t.height,e}free(t){this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}},pi={arc:Wn,area:Fn,circle:jn,line:Gn,path:Vn,symbol:Kn,text:qn,rect:Yn,polygon:Xn,richtext:Qn,richtextIcon:Jn,image:Zn,group:Hn,glyph:$n},gi=Object.keys(pi);function mi(t,e){Object.keys(e).forEach((n=>{t[n]=e[n]}))}const bi={arc:Object.assign({},pi.arc),area:Object.assign({},pi.area),circle:Object.assign({},pi.circle),line:Object.assign({},pi.line),path:Object.assign({},pi.path),symbol:Object.assign({},pi.symbol),text:Object.assign({},pi.text),rect:Object.assign({},pi.rect),polygon:Object.assign({},pi.polygon),richtext:Object.assign({},pi.richtext),richtextIcon:Object.assign({},pi.richtextIcon),image:Object.assign({},pi.image),group:Object.assign({},pi.group),glyph:Object.assign({},pi.glyph)};class yi{constructor(){this.initTheme(),this.dirty=!1}initTheme(){this._defaultTheme={},gi.forEach((t=>{this._defaultTheme[t]=Object.create(bi[t])})),this.combinedTheme=this._defaultTheme}getTheme(t){if(!t)return this.combinedTheme;if(!this.dirty)return this.combinedTheme;let e={};const n=this.getParentWithTheme(t);return n&&(e=n.theme),this.applyTheme(t,e),this.combinedTheme}getParentWithTheme(t){for(;t.parent;)if((t=t.parent).theme)return t;return null}applyTheme(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.dirty){const i=this.getParentWithTheme(t);if(i){const t=i.theme;(t.dirty||n)&&t.applyTheme(i,e,!0)}this.userTheme?this.doCombine(i&&i.theme.combinedTheme):(i?this.combinedTheme=i.theme.combinedTheme:(this.combinedTheme=this._defaultTheme,G.getInstance().warn("未知错误,走到不应该走的区域里")),this.dirty=!1)}return this.combinedTheme}doCombine(t){const e=this.userTheme,n=this.combinedTheme;gi.forEach((i=>{const r=Object.create(bi[i]);t&&t[i]&&mi(r,t[i]),n[i]&&mi(r,n[i]),e[i]&&mi(r,e[i]),this.combinedTheme[i]=r})),e.common&&gi.forEach((t=>{mi(this.combinedTheme[t],e.common)})),this.dirty=!1}setTheme(t,e){let n=this.userTheme;n?Object.keys(t).forEach((e=>{n[e]?Object.assign(n[e],t[e]):n[e]=Object.assign({},t[e])})):n=t,this.userTheme=n,this.dirty=!0,this.dirtyChildren(e)}resetTheme(t,e){this.userTheme=t,this.dirty=!0,this.dirtyChildren(e)}dirtyChildren(t){t.forEachChildren((t=>{t.isContainer&&(t.theme&&(t.theme.dirty=!0),this.dirtyChildren(t))}))}}const vi=new yi;function xi(t,e){return t.glyphHost?xi(t.glyphHost):e?(t.isContainer,e):function(t){let e;if(e=t.isContainer?t:t.parent,e){for(;e&&!e.theme;)e=e.parent;return e?(e.theme||e.createTheme(),e.theme.getTheme(e)):vi.getTheme()}return null}(t)||t.attachedThemeGraphic&&xi(t.attachedThemeGraphic)||vi.getTheme()}var _i=function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function a(t){try{l(i.next(t))}catch(t){s(t)}}function o(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}l((i=i.apply(t,e||[])).next())}))};class Ai extends h{get previousSibling(){return this._prev}get nextSibling(){return this._next}get children(){return this.getChildren()}get firstChild(){return this._firstChild}get lastChild(){return this._lastChild}get count(){return this._count}get childrenCount(){return this._idMap?this._idMap.size:0}constructor(){super(),this._uid=zt.GenAutoIncrementId(),this._firstChild=null,this._lastChild=null,this.parent=null,this._count=1}forEachChildren(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){let e=this._lastChild,n=0;for(;e;){if(t(e,n++))return;e=e._prev}}else{let e=this._firstChild,n=0;for(;e;){if(t(e,n++))return;e=e._next}}}forEachChildrenAsync(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _i(this,void 0,void 0,(function*(){if(e){let e=this._lastChild,n=0;for(;e;){let i=t(e,n++);if(i.then&&(i=yield i),i)return;e=e._prev}}else{let e=this._firstChild,n=0;for(;e;){let i=t(e,n++);if(i.then&&(i=yield i),i)return;e=e._next}}}))}forEach(t){return this.forEachChildren(t)}appendChild(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._uid===t._uid)return null;if(!e&&t.isAncestorsOf(this))throw new Error("【Node::appendChild】不能将父辈元素append为子元素");return t.parent&&t.parent.removeChild(t),t.parent=this,this._lastChild?(this._lastChild._next=t,t._prev=this._lastChild,this._lastChild=t):(this._firstChild=this._lastChild=t,t._prev=t._next=null),this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this.setCount(t.count),this._structEdit=!0,t}appendChildArrHighPerformance(t){return t}insertBefore(t,e){if(!e)return this.appendChild(t);if(this._uid===t._uid)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,t._prev=e._prev,e._prev?e._prev._next=t:this._firstChild=t,e._prev=t,t._next=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}insertAfter(t,e){if(!e)return this.appendChild(t);if(this._uid===t._uid)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertAfter】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,e._next?(e._next._prev=t,t._next=e._next):this._lastChild=t,e._next=t,t._prev=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}insertInto(t,e){if(!this._ignoreWarn&&this._nodeList&&G.getInstance().warn("insertIntoKeepIdx和insertInto混用可能会存在错误"),e>=this.childrenCount)return this.appendChild(t);if(this._uid===t._uid)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");if(t.parent&&t.parent.removeChild(t),t.parent=this,0===e)t._next=this._firstChild,this._firstChild&&(this._firstChild._prev=t),t._prev=null,this._firstChild=t;else{let n=this._firstChild;for(let t=0;t<e;t++){if(!n)return null;t>0&&(n=n._next)}if(!n)return null;t._next=n._next,t._prev=n,n._next=t,t._next&&(t._next._prev=t)}return this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t}insertIntoKeepIdx(t,e){if(this._nodeList||(this._nodeList=this.children),this._nodeList[e]){const n=this._nodeList[e];return this._nodeList.splice(e,0,t),this.insertBefore(t,n)}let n;this._nodeList[e]=t;for(let t=e-1;t>=0&&(n=this._nodeList[t],!n);t--);if(n)return n._next?this.insertBefore(t,n._next):this.appendChild(t);this._ignoreWarn=!0;const i=this.insertInto(t,0);return this._ignoreWarn=!1,i}removeChild(t){if(!this._idMap)return null;if(!this._idMap.has(t._uid))return null;if(this._idMap.delete(t._uid),this._nodeList){const e=this._nodeList.findIndex((e=>e===t));e>=0&&this._nodeList.splice(e,1)}return t._prev?t._prev._next=t._next:this._firstChild=t._next,t._next?t._next._prev=t._prev:this._lastChild=t._prev,t.parent=null,t._prev=null,t._next=null,this._structEdit=!0,this.setCount(-t.count),t}delete(){this.parent&&this.parent.removeChild(this)}removeAllChild(t){if(!this._idMap)return;this._nodeList&&(this._nodeList.length=0);let e=this._firstChild;for(;e;){const t=e._next;e.parent=null,e._prev=null,e._next=null,e=e._next,e=t}this._firstChild=null,this._lastChild=null,this._idMap.clear(),this._structEdit=!0,this.setCount(1-this._count)}replaceChild(t,e){throw new Error("暂不支持")}find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return this.forEachChildren(((e,i)=>!(e===this||!t(e,i)||(n=e,0)))),e&&this.forEachChildren((e=>{if(e.isContainer){const i=e.find(t,!0);if(i)return n=i,!0}return!1})),n}findAll(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];return this.forEachChildren(((e,i)=>{e!==this&&t(e,i)&&n.push(e)})),e&&this.forEachChildren((e=>{if(e.isContainer){const i=e.findAll(t,!0);i.length&&(n=n.concat(i))}})),n}getElementById(t){return this.find((e=>e.id===t),!0)}findChildById(t){return this.getElementById(t)}findChildByUid(t){return this._idMap&&this._idMap.get(t)||null}getElementsByName(t){return this.findAll((e=>e.name===t),!0)}findChildrenByName(t){return this.getElementsByName(t)}getElementsByType(t){return this.findAll((e=>e.type===t),!0)}getChildByName(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.find((e=>e.name===t),e)}getChildAt(t){let e=this._firstChild;if(!e)return null;for(let n=0;n<t;n++){if(!e._next)return null;e=e._next}return e}at(t){return this.getChildAt(t)}containNode(t){if(!this._idMap)return!1;if(this._idMap.has(t._uid))return!0;let e=this._firstChild;for(;e;){if(e.containNode(t))return!0;e=e._next}return!1}getRootNode(){let t=this.parent;for(;null==t?void 0:t.parent;)t=t.parent;return t||this}hasChildNodes(){return null!==this._firstChild}addChild(t){return this.appendChild(t)}add(t){return this.appendChild(t)}getChildren(){const t=[];let e=this._firstChild;for(;e;)t.push(e),e=e._next;return t}isChildOf(t){return!!this.parent&&this.parent._uid===t._uid}isParentOf(t){return t.isChildOf(this)}isDescendantsOf(t){let e=this.parent;if(!e)return!1;do{if(e._uid===t._uid)return!0;e=e.parent}while(null!==e);return!1}isAncestorsOf(t){return t.isDescendantsOf(this)}getAncestor(t){throw new Error("暂不支持")}setAllDescendantsProps(t,e){let n=this._firstChild;for(;n;)n[t]=e,n.setAllDescendantsProps(t,e),n=n._next}setCount(t){this._count+=t;let e=this.parent;if(e)do{e._count+=t,e=e.parent}while(null!==e)}clone(){throw new Error("暂不支持")}cloneTo(t){throw new Error("暂不支持")}getParent(){return this.parent}del(t){return this.removeChild(t)}addEventListener(t,e,n){const i=d(n,!0)&&n||m(n)&&n.capture,r=m(n)&&n.once,s=f(e)?void 0:e;return t=i?`${t}capture`:t,e=f(e)?e:e.handleEvent,r?super.once(t,e,s):super.on(t,e,s),this}on(t,e,n){return this.addEventListener(t,e,n)}removeEventListener(t,e,n){const i=d(n,!0)&&n||m(n)&&n.capture,r=f(e)?void 0:e;t=i?`${t}capture`:t,e=f(e)?e:e.handleEvent;const s=m(n)&&n.once;return super.off(t,e,r,s),this}off(t,e,n){return this.removeEventListener(t,e,n)}once(t,e,n){return m(n)?(n.once=!0,this.addEventListener(t,e,n)):this.addEventListener(t,e,{once:!0})}removeAllEventListeners(){return super.removeAllListeners(),this}removeAllListeners(){return this.removeAllEventListeners()}dispatchEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return super.emit(t.type,t,...n),!t.defaultPrevented}emit(t,e){return this.dispatchEvent(t,e)}release(){this.removeAllListeners()}}class Si{get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get x(){return this.canvas.x}get y(){return this.canvas.y}get canvasX(){return this.canvas.x}get canvasY(){return this.canvas.y}get viewX(){return this.viewport.x}get viewY(){return this.viewport.y}constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Si.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer={x:0,y:0},this.page={x:0,y:0},this.canvas={x:0,y:0},this.viewport={x:0,y:0},this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}composedPath(){return!this.manager||this.path&&this.path[this.path.length-1]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.composedDetailPath(),this.path}composedDetailPath(){return this.pickParams&&this.pickParams.graphic?(this.detailPath=this.path.slice(),this._composedDetailPath(this.pickParams)):this.detailPath=this.path.slice(),this.detailPath}_composedDetailPath(t){if(t&&t.graphic){const e=this.pickParams.graphic;if(e.stage){const n=e.stage.eventSystem.manager.propagationPath(e);this.detailPath.push(n),this._composedDetailPath(t.params)}}}preventDefault(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault()}catch(t){this.nativeEvent.preventDefault&&f(this.nativeEvent.preventDefault)&&this.nativeEvent.preventDefault()}this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.stopPropagation()}catch(t){this.nativeEvent.stopPropagation&&f(this.nativeEvent.stopPropagation)&&this.nativeEvent.stopPropagation()}this.propagationStopped=!0}initEvent(){}initUIEvent(){}clone(){throw new Error("Method not implemented.")}}class wi extends Si{constructor(t,e){super(),this.type=t,this.detail=e}}const Ti={dispatchEvent(t){var e;if(!(t instanceof Si))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return t.defaultPrevented=!1,t.path=[],t.detailPath&&(t.detailPath=[]),t.target=this,null===(e=null==t?void 0:t.manager)||void 0===e||e.dispatchEvent(t),!t.defaultPrevented},emit(t,e){return this.dispatchEvent(new wi(t,e))}};class Bi{constructor(){}static linear(t){return t}static none(){return this.linear}static get(t){return t<-1?t=-1:t>1&&(t=1),function(e){return 0===t?e:t<0?e*(e*-t+1+t):e*((2-e)*t+(1-t))}}static getPowIn(t){return function(e){return Math.pow(e,t)}}static getPowOut(t){return function(e){return 1-Math.pow(1-e,t)}}static getPowInOut(t){return function(e){return(e*=2)<1?.5*Math.pow(e,t):1-.5*Math.abs(Math.pow(2-e,t))}}static getBackIn(t){return function(e){return e*e*((t+1)*e-t)}}static getBackOut(t){return function(e){return--e*e*((t+1)*e+t)+1}}static getBackInOut(t){return t*=1.525,function(e){return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}static sineIn(t){return 1-Math.cos(t*Math.PI/2)}static sineOut(t){return Math.sin(t*Math.PI/2)}static sineInOut(t){return-(Math.cos(Math.PI*t)-1)/2}static expoIn(t){return 0===t?0:Math.pow(2,10*t-10)}static expoOut(t){return 1===t?1:1-Math.pow(2,-10*t)}static expoInOut(t){return 0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2}static circIn(t){return-(Math.sqrt(1-t*t)-1)}static circOut(t){return Math.sqrt(1- --t*t)}static circInOut(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}static bounceOut(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}static bounceIn(t){return 1-Bi.bounceOut(1-t)}static bounceInOut(t){return t<.5?.5*Bi.bounceIn(2*t):.5*Bi.bounceOut(2*t-1)+.5}static getElasticIn(t,e){return function(n){if(0===n||1===n)return n;const i=e/Q*Math.asin(1/t);return-t*Math.pow(2,10*(n-=1))*Math.sin((n-i)*Q/e)}}static getElasticOut(t,e){return function(n){if(0===n||1===n)return n;const i=e/Q*Math.asin(1/t);return t*Math.pow(2,-10*n)*Math.sin((n-i)*Q/e)+1}}static getElasticInOut(t,e){return function(n){const i=e/Q*Math.asin(1/t);return(n*=2)<1?t*Math.pow(2,10*(n-=1))*Math.sin((n-i)*Q/e)*-.5:t*Math.pow(2,-10*(n-=1))*Math.sin((n-i)*Q/e)*.5+1}}}Bi.quadIn=Bi.getPowIn(2),Bi.quadOut=Bi.getPowOut(2),Bi.quadInOut=Bi.getPowInOut(2),Bi.cubicIn=Bi.getPowIn(3),Bi.cubicOut=Bi.getPowOut(3),Bi.cubicInOut=Bi.getPowInOut(3),Bi.quartIn=Bi.getPowIn(4),Bi.quartOut=Bi.getPowOut(4),Bi.quartInOut=Bi.getPowInOut(4),Bi.quintIn=Bi.getPowIn(5),Bi.quintOut=Bi.getPowOut(5),Bi.quintInOut=Bi.getPowInOut(5),Bi.backIn=Bi.getBackIn(1.7),Bi.backOut=Bi.getBackOut(1.7),Bi.backInOut=Bi.getBackInOut(1.7),Bi.elasticIn=Bi.getElasticIn(1,.3),Bi.elasticOut=Bi.getElasticOut(1,.3),Bi.elasticInOut=Bi.getElasticInOut(1,.3*1.5);const Ci=new class{constructor(){this.id=zt.GenAutoIncrementId(),this.animateHead=null,this.animateTail=null,this.animateCount=0,this.paused=!1}addAnimate(t){this.animateTail?(this.animateTail.nextAnimate=t,t.prevAnimate=this.animateTail,this.animateTail=t,t.nextAnimate=null):(this.animateHead=t,this.animateTail=t),this.animateCount++}pause(){this.paused=!0}resume(){this.paused=!1}tick(t){if(this.paused)return;let e=this.animateHead;for(this.animateCount=0;e;)e.status===je.END?this.removeAnimate(e):e.status===je.RUNNING||e.status===je.INITIAL?(this.animateCount++,e.advance(t)):e.status===je.PAUSED&&this.animateCount++,e=e.nextAnimate}clear(){let t=this.animateHead;for(;t;)t.release(),t=t.nextAnimate;this.animateHead=null,this.animateTail=null,this.animateCount=0}removeAnimate(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t._onRemove&&t._onRemove.forEach((t=>t())),t===this.animateHead?(this.animateHead=t.nextAnimate,t===this.animateTail?this.animateTail=null:this.animateHead.prevAnimate=null):t===this.animateTail?(this.animateTail=t.prevAnimate,this.animateTail.nextAnimate=null):(t.prevAnimate.nextAnimate=t.nextAnimate,t.nextAnimate.prevAnimate=t.prevAnimate),e&&t.release()}};class ki{constructor(t,e,n,i,r){this.from=t,this.to=e,this.duration=n,this.easing=i,this.params=r,this.updateCount=0}bind(t,e){this.target=t,this.subAnimate=e,this.onBind()}onBind(){}onFirstRun(){}onStart(){}onEnd(){}getEndProps(){return this.to}getFromProps(){return this.from}getMergedEndProps(){var t;const e=this.getEndProps();return e?this._endProps===e?this._mergedEndProps:(this._endProps=e,void(this._mergedEndProps=Object.assign({},null!==(t=this.step.prev.getLastProps())&&void 0!==t?t:{},e))):this.step.prev?this.step.prev.getLastProps():e}update(t,e,n){if(0===this.updateCount){this.onFirstRun();const t=this.step.getLastProps();Object.keys(t).forEach((e=>{this.subAnimate.animate.validAttr(e)&&(n[e]=t[e])}))}this.updateCount+=1,this.onUpdate(t,e,n),t&&this.onEnd()}}class Mi extends ki{constructor(t){super(null,null,0,"linear"),this.cb=t}onUpdate(t,e,n){}onStart(){this.cb()}}class Pi{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zt.GenAutoIncrementId(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ci;this.id=t,this.timeline=e,this.status=je.INITIAL,this.tailAnimate=new Ei(this),this.subAnimates=[this.tailAnimate],this.timeScale=1,this.rawPosition=-1,this._startTime=0,this._duringTime=0,this.timeline.addAnimate(this)}setTimeline(t){t!==this.timeline&&(this.timeline.removeAnimate(this,!1),t.addAnimate(this))}getStartTime(){return this._startTime}getDuration(){return this.subAnimates.reduce(((t,e)=>t+e.totalDuration),0)}after(t){const e=t.getDuration();return this._startTime=e,this}afterAll(t){let e=-1/0;return t.forEach((t=>{e=et(t.getDuration(),e)})),this._startTime=e,this}parallel(t){return this._startTime=t.getStartTime(),this}static AddInterpolate(t,e){Pi.interpolateMap.set(t,e)}play(t){if(this.tailAnimate.play(t),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return 1===this.subAnimates.length&&this.tailAnimate.totalDuration===t.duration&&this.trySetAttribute(t.getFromProps(),t.mode),this}trySetAttribute(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pi.mode;t&&e&He.SET_ATTR_IMMEDIATELY&&this.target.setAttributes&&this.target.setAttributes(t,!1,{type:Fe.ANIMATE_PLAY})}runCb(t){const e=new Mi((()=>{t(this,e.step.prev)}));return this.tailAnimate.play(e),this}customInterpolate(t,e,n,i,r,s){const a=Pi.interpolateMap.get(t)||Pi.interpolateMap.get("");return!!a&&a(t,e,n,i,r,s)}pause(){this.status===je.RUNNING&&(this.status=je.PAUSED)}resume(){this.status===je.PAUSED&&(this.status=je.RUNNING)}to(t,e,n,i){if(this.tailAnimate.to(t,e,n,i),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}from(t,e,n,i){if(this.tailAnimate.from(t,e,n,i),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}wait(t){if(this.tailAnimate.wait(t),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}startAt(t){if(this.tailAnimate.startAt(t),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}loop(t){if(this.tailAnimate.loop=t,this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}reversed(t){if(this.tailAnimate.reversed=t,this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}bounce(t){if(this.tailAnimate.bounce=t,this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}subAnimate(){const t=new Ei(this,this.tailAnimate);return this.tailAnimate=t,this.subAnimates.push(t),t.bind(this.target),this}getStartProps(){return this.subAnimates[0].getStartProps()}getEndProps(){return this.tailAnimate.getEndProps()}depreventAttr(t){this._preventAttrs&&this._preventAttrs.delete(t)}preventAttr(t){this._preventAttrs||(this._preventAttrs=new Set),this._preventAttrs.add(t)}preventAttrs(t){t.forEach((t=>this.preventAttr(t)))}validAttr(t){return!this._preventAttrs||!this._preventAttrs.has(t)}bind(t){return this.target=t,this.target.onAnimateBind&&this.target.onAnimateBind(this),this.subAnimates.forEach((e=>{e.bind(t)})),this}advance(t){if(this._duringTime<this._startTime){if(this._duringTime+t*this.timeScale<this._startTime)return void(this._duringTime+=t*this.timeScale);t=this._duringTime+t*this.timeScale-this._startTime,this._duringTime=this._startTime}this.status===je.INITIAL&&(this.status=je.RUNNING,this._onStart&&this._onStart.forEach((t=>t()))),this.setPosition(Math.max(this.rawPosition,0)+t*this.timeScale)&&this.status===je.RUNNING&&(this.status=je.END,this._onEnd&&this._onEnd.forEach((t=>t())))}setPosition(t){let e,n=0;const i=this.rawPosition,r=this.subAnimates.reduce(((t,e)=>t+e.totalDuration),0);t<0&&(t=0);const s=t>=r;if(s&&(t=r),t===i)return s;for(let i=0;i<this.subAnimates.length&&(e=this.subAnimates[i],!(n+e.totalDuration>=t));i++)n+=e.totalDuration,e=void 0;return this.rawPosition=t,e.setPosition(t-n),s}onStart(t){this._onStart||(this._onStart=[]),this._onStart.push(t)}onEnd(t){this._onEnd||(this._onEnd=[]),this._onEnd.push(t)}onRemove(t){this._onRemove||(this._onRemove=[]),this._onRemove.push(t)}onFrame(t){this._onFrame||(this._onFrame=[]),this._onFrame.push(t)}release(){this.status=je.END}stop(t){t||this.target.onStop(),"start"===t?this.target.onStop(this.getStartProps()):"end"===t?this.target.onStop(this.getEndProps()):this.target.onStop(t),this.release()}}Pi.mode=He.NORMAL,Pi.interpolateMap=new Map;class Ei{get totalDuration(){return this.calcAttr(),this._totalDuration+this._startAt}constructor(t,e){this.rawPosition=-1,this.position=0,this.loop=0,this.duration=0,this.animate=t,this.stepHead=new Oi(0,0,e?Object.assign({},e.stepTail.props):{}),this.stepTail=this.stepHead,this.dirty=!0,this._startAt=0}calcAttr(){this.dirty&&(this._totalDuration=this.duration*(this.loop+1))}bind(t){return this.target=t,this}play(t){let e=t.duration;(null==e||e<0)&&(e=0);const n=t.easing,i="string"==typeof n?Bi[n]:n,r=this._addStep(e,null,i);return r.type=$e.customAnimate,this._appendProps(t.getEndProps(),r,!1),this._appendCustomAnimate(t,r),this}to(t,e,n,i){(null==e||e<0)&&(e=0);const r="string"==typeof n?Bi[n]:n,s=this._addStep(e,null,r);return s.type=$e.to,this._appendProps(t,s,!!i&&i.tempProps),s.propKeys||(s.propKeys=Object.keys(s.props)),i&&i.noPreventAttrs||this.target.animates.forEach((t=>{t.id!==this.animate.id&&t.preventAttrs(s.propKeys)})),this}from(t,e,n,i){this.to(t,0,n,i);const r={};this.stepTail.propKeys||(this.stepTail.propKeys=Object.keys(this.stepTail.props)),this.stepTail.propKeys.forEach((t=>{r[t]=this.getLastPropByName(t,this.stepTail)})),this.to(r,e,n,i),this.stepTail.type=$e.from}startAt(t){return t<0&&(t=0),this._startAt=t,this}getStartProps(){var t;return null===(t=this.stepHead)||void 0===t?void 0:t.props}getEndProps(){return this.stepTail.props}getLastStep(){return this._lastStep}wait(t){if(t>0){const e=this._addStep(+t,null);e.type=$e.wait,e.prev.customAnimate?e.props=e.prev.customAnimate.getEndProps():e.props=e.prev.props,this.target.onAddStep&&this.target.onAddStep(e)}return this}_addStep(t,e,n){const i=new Oi(this.duration,t,e,n);return this.duration+=t,this.stepTail.append(i),this.stepTail=i,i}_appendProps(t,e,n){e.props=n?t:Object.assign({},t);let i=e.prev;const r=e.props;for(e.propKeys||(e.propKeys=Object.keys(e.props)),e.propKeys.forEach((t=>{void 0===e.props[t]&&(e.props[t]=this.target.getDefaultAttribute(t))}));i.prev;)i.props&&(i.propKeys||(i.propKeys=Object.keys(i.props)),i.propKeys.forEach((t=>{void 0===r[t]&&(r[t]=i.props[t])}))),e.propKeys=Object.keys(e.props),i=i.prev;const s=this.stepHead.props;e.propKeys||(e.propKeys=Object.keys(r)),e.propKeys.forEach((t=>{if(void 0===s[t]){const e=this.animate.getStartProps();s[t]=e[t]=this.target.getComputedAttribute(t)}})),this.target.onAddStep&&this.target.onAddStep(e)}_appendCustomAnimate(t,e){e.customAnimate=t,t.step=e,t.bind(this.target,this)}setPosition(t){var e;const n=this.duration,i=this.loop,r=this.rawPosition;let s,a,o=!1;const l=null!==(e=this._startAt)&&void 0!==e?e:0;if(t<0&&(t=0),t<l)return this.rawPosition=t,!1;if(t-=l,n<=0&&(o=!0,n<0))return o;if(s=Math.floor(t/n),a=t-s*n,o=t>=i*n+n,o&&(a=n,s=i,t=a*s+n),t===r)return o;const u=!this.reversed!=!(this.bounce&&s%2);return u&&(a=n-a),this._deltaPosition=a-this.position,this.position=a,this.rawPosition=t+l,this.updatePosition(o,u),o}updatePosition(t,e){if(!this.stepHead)return;let n=this.stepHead.next;const i=this.position,r=this.duration;if(this.target&&n){let s=n.next;for(;s&&s.position<=i;)n=s,s=n.next;let a=t?0===r?1:i/r:(i-n.position)/n.duration;n.easing&&(a=n.easing(a)),this.tryCallCustomAnimateLifeCycle(n,this._lastStep||(e?this.stepTail:this.stepHead),e),this.updateTarget(n,a,t),this._lastStep=n,this.animate._onFrame&&this.animate._onFrame.forEach((t=>t(n,a)))}}tryCallCustomAnimateLifeCycle(t,e,n){if(t!==e)if(n){let n=e.prev;for(;n&&n!==t;)n.customAnimate&&(n.customAnimate.onStart&&n.customAnimate.onStart(),n.customAnimate.onEnd&&n.customAnimate.onEnd()),n=t.prev;e&&e.customAnimate&&e.customAnimate.onEnd&&e.customAnimate.onEnd(),t&&t.customAnimate&&t.customAnimate.onStart&&t.customAnimate.onStart()}else{let n=e.next;for(;n&&n!==t;)n.customAnimate&&(n.customAnimate.onStart&&n.customAnimate.onStart(),n.customAnimate.onEnd&&n.customAnimate.onEnd()),n=n.next;e&&e.customAnimate&&e.customAnimate.onEnd&&e.customAnimate.onEnd(),t&&t.customAnimate&&t.customAnimate.onStart&&t.customAnimate.onStart()}}getLastPropByName(t,e){let n=e.prev;for(;n;){if(n.props&&void 0!==n.props[t])return n.props[t];if(n.customAnimate){const e=n.customAnimate.getEndProps()[t];if(void 0!==e)return e}n=n.prev}return G.getInstance().warn("未知错误,step中找不到属性"),e.props[t]}updateTarget(t,e,n){null==t.props&&null==t.customAnimate||this.target.onStep(this,this.animate,t,e,n)}}class Oi{constructor(t,e,n,i){this.duration=e,this.position=t,this.props=n,this.easing=i}append(t){t.prev=this,t.next=this.next,this.next=t}getLastProps(){let t=this.prev;for(;t;){if(t.props)return t.props;if(t.customAnimate)return t.customAnimate.getMergedEndProps();t=t.prev}return null}}const Li=200,Ri="cubicOut";var Ii;!function(t){t[t.Top=1]="Top",t[t.Right=2]="Right",t[t.Bottom=4]="Bottom",t[t.Left=8]="Left",t[t.ALL=15]="ALL"}(Ii||(Ii={}));const Ni=[0,0,0,0],Ui=t=>t?x(t)?0===t.length?0:1===t.length?t[0]:2===t.length?(Ni[0]=t[0],Ni[2]=t[0],Ni[1]=t[1],Ni[3]=t[1],Ni):t:t:0,Di=[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],zi=[1,2,3,0,1,2,3,0];function Wi(t,e,n,i){for(;t>=Q;)t-=Q;for(;t<0;)t+=Q;for(;t>e;)e+=Q;Di[0].x=n,Di[1].y=n,Di[2].x=-n,Di[3].y=-n;const r=Math.ceil(t/K)%4,s=Math.ceil(e/K)%4;if(i.add(tt(t)*n,it(t)*n),i.add(tt(e)*n,it(e)*n),r!==s||e-t>Y){let t=!1;for(let e=0;e<zi.length;e++)if(t||r!==zi[e]){if(t&&s===zi[e])break;if(t){const t=Di[zi[e]];i.add(t.x,t.y)}}else{t=!0;const e=Di[r];i.add(e.x,e.y)}}}const Fi=(t,e)=>v(t)&&"%"===t[t.length-1]?e*(Number.parseFloat(t.substring(0,t.length-1))/100):t;var ji;!function(t){t[t.Color255=0]="Color255",t[t.Color1=1]="Color1"}(ji||(ji={}));class Hi{static Get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ji.Color1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,0,1];if(e===ji.Color1){const e=Hi.store1[t];if(e)return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n;const i=wt.parseColorString(t);if(i){const e=[i.r/255,i.g/255,i.b/255,i.opacity];Hi.store1[t]=e,Hi.store255[t]=[i.r,i.g,i.b,i.opacity],n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3]}return n}const i=Hi.store255[t];if(i)return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n;const r=wt.parseColorString(t);return r&&(Hi.store1[t]=[r.r/255,r.g/255,r.b/255,r.opacity],Hi.store255[t]=[r.r,r.g,r.b,r.opacity],n[0]=r.r,n[1]=r.g,n[2]=r.b,n[3]=r.opacity),n}static Set(t,e,n){if(e===ji.Color1){if(Hi.store1[t])return;Hi.store1[t]=n,Hi.store255[t]=[Math.floor(255*n[0]),Math.floor(255*n[1]),Math.floor(255*n[2]),Math.floor(255*n[3])]}else{if(Hi.store255[t])return;Hi.store255[t]=n,Hi.store1[t]=[n[0]/255,n[1]/255,n[2]/255,n[3]]}}}function $i(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(t)&&A(t[0])?e?`rgb(${Math.round(t[0])},${Math.round(t[1])},${Math.round(t[2])},${t[3].toFixed(2)})`:`rgb(${Math.round(t[0])},${Math.round(t[1])},${Math.round(t[2])})`:t}function Gi(t,e,n,i,r){return Array.isArray(t)&&!A(t[0])||Array.isArray(e)&&!A(e[0])?new Array(4).fill(0).map(((r,s)=>Vi(x(t)?t[s]:t,x(e)?e[s]:e,n,i))):Vi(t,e,n,i,r)}function Vi(t,e,n,i,r){if(!t||!e)return t&&$i(t)||e&&$i(e)||!1;let s,a,o=!1,l=!1;if(Array.isArray(t)?s=t:"string"==typeof t?s=Hi.Get(t,ji.Color255):o=!0,Array.isArray(e)?a=e:"string"==typeof e?a=Hi.Get(e,ji.Color255):l=!0,o!==l){const s=o?t:e,a=o?e:t,l=Object.assign(Object.assign({},s),{stops:s.stops.map((t=>Object.assign(Object.assign({},t),{color:$i(a)})))});return o?Gi(s,l,n,i,r):Gi(l,s,n,i,r)}if(o){if(t.gradient===e.gradient){const i=t,r=e,s=i.stops,a=r.stops;if(s.length!==a.length)return!1;if("linear"===i.gradient)return function(t,e,n){const i=t.stops,r=e.stops;return{gradient:"linear",x0:t.x0+(e.x0-t.x0)*n,x1:t.x1+(e.x1-t.x1)*n,y0:t.y0+(e.y0-t.y0)*n,y1:t.y1+(e.y1-t.y1)*n,stops:new Array(i.length).fill(0).map(((t,e)=>({color:Ki(i[e].color,r[e].color,n),offset:i[e].offset+(r[e].offset-i[e].offset)*n})))}}(i,r,n);if("radial"===i.gradient)return function(t,e,n){const i=t.stops,r=e.stops;return{gradient:"radial",x0:t.x0+(e.x0-t.x0)*n,x1:t.x1+(e.x1-t.x1)*n,y0:t.y0+(e.y0-t.y0)*n,y1:t.y1+(e.y1-t.y1)*n,r0:t.r0+(e.r0-t.r0)*n,r1:t.r1+(e.r1-t.r1)*n,stops:new Array(i.length).fill(0).map(((t,e)=>({color:Ki(i[e].color,r[e].color,n),offset:i[e].offset+(r[e].offset-i[e].offset)*n})))}}(i,r,n);if("conical"===i.gradient)return function(t,e,n){const i=t.stops,r=e.stops;return{gradient:"conical",startAngle:t.startAngle+(e.startAngle-t.startAngle)*n,endAngle:t.endAngle+(e.endAngle-t.endAngle)*n,x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n,stops:new Array(i.length).fill(0).map(((t,e)=>({color:Ki(i[e].color,r[e].color,n),offset:i[e].offset+(r[e].offset-i[e].offset)*n})))}}(i,r,n)}return!1}return r&&r(s,a),$i(function(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n,t[2]+(e[2]-t[2])*n,t[3]+(e[3]-t[3])*n]}(s,a,n),i)}Hi.store255={},Hi.store1={};const Xi=[0,0,0,0],Yi=[0,0,0,0];function Ki(t,e,n){return Hi.Get(t,ji.Color255,Xi),Hi.Get(e,ji.Color255,Yi),`rgba(${Math.round(Xi[0]+(Yi[0]-Xi[0])*n)},${Math.round(Xi[1]+(Yi[1]-Xi[1])*n)},${Math.round(Xi[2]+(Yi[2]-Xi[2])*n)},${Xi[3]+(Yi[3]-Xi[3])*n})`}class qi{static GetImage(t,e){var n;const i=qi.cache.get(t);i?"fail"===i.loadState?ti.global.getRequestAnimationFrame()((()=>{e.imageLoadFail(t)})):"init"===i.loadState||"loading"===i.loadState?null===(n=i.waitingMark)||void 0===n||n.push(e):e&&e.imageLoadSuccess(t,i.data):qi.loadImage(t,e)}static GetSvg(t,e){var n;let i=qi.cache.get(t);i?"fail"===i.loadState?ti.global.getRequestAnimationFrame()((()=>{e.imageLoadFail(t)})):"init"===i.loadState||"loading"===i.loadState?null===(n=i.waitingMark)||void 0===n||n.push(e):e&&e.imageLoadSuccess(t,i.data):(i={type:"image",loadState:"init"},qi.cache.set(t,i),i.dataPromise=ti.global.loadSvg(t),i.dataPromise?(i.waitingMark=[e],i.dataPromise.then((e=>{var n;i.loadState=(null==e?void 0:e.data)?"success":"fail",i.data=null==e?void 0:e.data,null===(n=i.waitingMark)||void 0===n||n.map(((n,r)=>{(null==e?void 0:e.data)?(i.loadState="success",i.data=e.data,n.imageLoadSuccess(t,e.data)):(i.loadState="fail",n.imageLoadFail(t))})),i.waitingMark&&(i.waitingMark=[])}))):(i.loadState="fail",e.imageLoadFail(t)))}static GetFile(t,e){let n=qi.cache.get(t);return n?"init"===n.loadState||"fail"===n.loadState?Promise.reject():"loading"===n.loadState?n.dataPromise.then((t=>t.data)):Promise.resolve(n.data):(n={type:e,loadState:"init"},qi.cache.set(t,n),"arrayBuffer"===e?n.dataPromise=ti.global.loadArrayBuffer(t):"blob"===e?n.dataPromise=ti.global.loadBlob(t):"json"===e&&(n.dataPromise=ti.global.loadJson(t)),n.dataPromise.then((t=>t.data)))}static loading(){setTimeout((()=>{if(!qi.isLoading&&qi.toLoadAueue.length){qi.isLoading=!0;const t=qi.toLoadAueue.splice(0,10),e=[];t.forEach((t=>{const{url:n,marks:i}=t,r={type:"image",loadState:"init"};if(qi.cache.set(n,r),r.dataPromise=ti.global.loadImage(n),r.dataPromise){r.waitingMark=i;const t=r.dataPromise.then((t=>{var e;r.loadState=(null==t?void 0:t.data)?"success":"fail",r.data=null==t?void 0:t.data,null===(e=r.waitingMark)||void 0===e||e.map(((e,i)=>{(null==t?void 0:t.data)?(r.loadState="success",r.data=t.data,e.imageLoadSuccess(n,t.data)):(r.loadState="fail",e.imageLoadFail(n))})),r.waitingMark&&(r.waitingMark=[])}));e.push(t)}else r.loadState="fail",i.forEach((t=>t.imageLoadFail(n)))})),Promise.all(e).then((()=>{qi.isLoading=!1,this.onLoadSuccessCb.forEach((t=>t())),qi.loading()})).catch((t=>{qi.isLoading=!1,this.onLoadSuccessCb.forEach((t=>t())),qi.loading()}))}}),0)}static loadImage(t,e){const n=Qi(t,qi.toLoadAueue);if(-1!==n)return qi.toLoadAueue[n].marks.push(e),void qi.loading();qi.toLoadAueue.push({url:t,marks:[e]}),qi.loading()}static improveImageLoading(t){const e=Qi(t,qi.toLoadAueue);if(-1!==e){const t=qi.toLoadAueue.splice(e,1);qi.toLoadAueue.unshift(t[0])}}static onLoadSuccess(t){this.onLoadSuccessCb.push(t)}}function Qi(t,e){for(let n=0;n<e.length;n++)if(e[n].url===t)return n;return-1}qi.cache=new Map,qi.isLoading=!1,qi.toLoadAueue=[],qi.onLoadSuccessCb=[];const Zi=new ft,Ji=new ct,tr=["lineWidth","scaleX","scaleY","angle","anchor","visible"],er=["x","y"],nr=["scaleX","scaleY"],ir=["angle"],rr=new ot,sr={strokeSeg:1,boundsPadding:2,pickMode:1,boundsMode:1,customPickShape:1,pickable:1,childrenPickable:1,visible:1,zIndex:1,layout:1,keepDirIn3d:1,globalZIndex:1,outerBorder:1,innerBorder:1,lineDash:1,lineCap:1,lineJoin:1,miterLimit:2,strokeBoundsBuffer:2,scaleCenter:1,anchor:1,anchor3d:1,postMatrix:1,backgroundMode:2,background:1,texture:1,cursor:1,html:1};class ar extends Ai{static mixin(t){const e=Object.keys(t);for(let n=0;n<e.length;++n){const i=e[n];Object.defineProperty(ar.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}get AABBBounds(){return this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode)}get globalAABBBounds(){return this.tryUpdateGlobalAABBBounds()}get transMatrix(){return this.tryUpdateLocalTransMatrix(!0)}get globalTransMatrix(){return this.tryUpdateGlobalTransMatrix(!0)}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var e;super(),this._AABBBounds=new ct,this._updateTag=ze.INIT,this.attribute=t,this.valid=this.isValid(),t.background?this.loadImage(null!==(e=t.background.background)&&void 0!==e?e:t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic)}setMode(t){"3d"===t?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}getOffsetXY(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,i;const{dx:r=t.dx,dy:s=t.dy}=this.attribute;if(e&&this.parent){const t=this.parent.attribute;rr.x=r+(null!==(n=t.scrollX)&&void 0!==n?n:0),rr.y=s+(null!==(i=t.scrollY)&&void 0!==i?i:0)}else rr.x=r,rr.y=s;return rr}onAnimateBind(t){this._emitCustomEvent("animate-bind",t)}tryUpdateAABBBounds(t){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;if(!this.valid)return this._AABBBounds.clear(),this._AABBBounds;ti.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const e=this.doUpdateAABBBounds(t);return ti.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,!0),e}combindShadowAABBBounds(t){if(this.shadowRoot){const e=this.shadowRoot.AABBBounds.clone();t.union(e)}}doUpdateAABBBounds(t){const e=this.getGraphicTheme();this._AABBBounds.clear();const n=this.attribute,i=this.updateAABBBounds(n,e,this._AABBBounds,t),{boundsPadding:r=e.boundsPadding}=n,s=Ui(r);return s&&i.expand(s),this.clearUpdateBoundTag(),i}updatePathProxyAABBBounds(t){const e="function"==typeof this.pathProxy?this.pathProxy(this.attribute):this.pathProxy;if(!e)return!1;const n=new xe(t);return Ze(e.commandList,n,0,0),!0}tryUpdateGlobalAABBBounds(){const t=this.AABBBounds;return this._globalAABBBounds?this._globalAABBBounds.setValue(t.x1,t.y1,t.x2,t.y2):this._globalAABBBounds=t.clone(),this._globalAABBBounds.empty()||this.parent&&this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix),this._globalAABBBounds}tryUpdateGlobalTransMatrix(){if(this._globalTransMatrix){if(this.parent){const t=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();return this.shouldUpdateGlobalMatrix()&&this.doUpdateGlobalMatrix(),this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!0}tryUpdateLocalTransMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._transMatrix||(this._transMatrix=new ft),this.shouldUpdateLocalMatrix()&&(this.doUpdateLocalMatrix(),t&&this.clearUpdateLocalPositionTag()),this._transMatrix}shouldUpdateAABBBounds(){return this.shadowRoot?!!(this._updateTag&ze.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&ze.UPDATE_BOUNDS)}shouldSelfChangeUpdateAABBBounds(){return this.shadowRoot?!!(this._updateTag&ze.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&ze.UPDATE_BOUNDS)}shouldUpdateLocalMatrix(){return!!(this._updateTag&ze.UPDATE_LOCAL_MATRIX)}isValid(){var t,e;const n=this.attribute;return Number.isFinite((null!==(t=n.x)&&void 0!==t?t:0)+(null!==(e=n.y)&&void 0!==e?e:0))}_validNumber(t){return null==t||Number.isFinite(t)}shouldUpdateShape(){return!!(this._updateTag&ze.UPDATE_SHAPE)}clearUpdateShapeTag(){this._updateTag&=ze.CLEAR_SHAPE}containsPoint(t,e,n,i){if(!i)return!1;if(n===We.GLOBAL){const n=new ot(t,e);this.parent&&this.parent.globalTransMatrix.transformPoint(n,n),t=n.x,e=n.y}return i.containsPoint(this,{x:t,y:e})}setAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;(t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,n)||t).background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._setAttributes(t,e,n)}_setAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const i=Object.keys(t);for(let e=0;e<i.length;e++){const n=i[e];this.attribute[n]=t[n]}this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!e&&!this.needUpdateTags(i)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n)}setAttribute(t,e,n,i){var r;const s=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({[t]:e},this.attribute,t,i);s?this._setAttributes(s,n,i):p(null===(r=this.normalAttrs)||void 0===r?void 0:r[t])?(this.attribute[t]=e,this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!n&&!this.needUpdateTag(t)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i)):this.normalAttrs[t]=e,"background"===t?this.loadImage(e,!0):"shadowGraphic"===t&&this.setShadowGraphic(e)}needUpdateTags(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tr;for(let n=0;n<e.length;n++){const i=e[n];if(-1!==t.indexOf(i))return!0}return!1}needUpdateTag(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tr;for(let n=0;n<e.length;n++)if(t===e[n])return!0;return!1}initAttributes(t){const e={type:Fe.INIT};t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,e)||t,this.attribute=t,t.background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._updateTag=ze.INIT,this.valid=this.isValid(),this.onAttributeUpdate(e)}translate(t,e){var n,i;if(0===t&&0===e)return this;const r={type:Fe.TRANSLATE},s=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,er,r);s&&(t=s.x,e=s.y,delete s.x,delete s.y,this._setAttributes(s));const a=this.attribute,o=a.postMatrix;return o?ti.transformUtil.fromMatrix(o,o).translate(t,e):(a.x=(null!==(n=a.x)&&void 0!==n?n:Ln.x)+t,a.y=(null!==(i=a.y)&&void 0!==i?i:Ln.y)+e),this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(r),this}translateTo(t,e){const n=this.attribute;if(n.x===t&&n.y===e)return this;const i={type:Fe.TRANSLATE_TO},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,er,i);return r?(this._setAttributes(r,!1,i),this):(n.x=t,n.y=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i),this)}scale(t,e,n){var i,r;if(1===t&&1===e)return this;const s={type:Fe.SCALE},a=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e,scaleCenter:n},this.attribute,nr,s);a&&(t=a.scaleX,e=a.scaleY,delete a.scaleX,delete a.scaleY,this._setAttributes(a));const o=this.attribute;if(n){let{postMatrix:i}=this.attribute;i||(i=new ft,o.postMatrix=i),ti.transformUtil.fromMatrix(i,i).scale(t,e,n)}else o.scaleX=(null!==(i=o.scaleX)&&void 0!==i?i:Ln.scaleX)*t,o.scaleY=(null!==(r=o.scaleY)&&void 0!==r?r:Ln.scaleY)*e;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(s),this}scaleTo(t,e){const n=this.attribute;if(n.scaleX===t&&n.scaleY===e)return this;const i={type:Fe.SCALE_TO},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e},this.attribute,nr,i);return r?(this._setAttributes(r,!1,i),this):(n.scaleX=t,n.scaleY=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i),this)}rotate(t,e){var n;if(0===t)return this;const i={type:Fe.ROTATE},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({angle:t,rotateCenter:e},this.attribute,ir,i);r&&(delete r.angle,this._setAttributes(r,!1,i));const s=this.attribute;if(e){let{postMatrix:n}=this.attribute;n||(n=new ft,s.postMatrix=n),ti.transformUtil.fromMatrix(n,n).rotate(t,e)}else s.angle=(null!==(n=s.angle)&&void 0!==n?n:Ln.angle)+t;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i),this}rotateTo(t){const e=this.attribute;if(e.angle===t)return this;const n={type:Fe.ROTATE_TO},i=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,ir,n);return i?(this._setAttributes(i,!1,n),this):(e.angle=t,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this)}skewTo(t,e){return this}animate(t){this.animates||(this.animates=new Map);const e=new Pi(null==t?void 0:t.id,this.stage&&this.stage.getTimeline()).bind(this);if(t){const{onStart:n,onFrame:i,onEnd:r,onRemove:s}=t;null!=n&&e.onStart(n),null!=i&&e.onFrame(i),null!=r&&e.onEnd(r),null!=s&&e.onRemove(s),e.interpolateFunc=t.interpolate}return this.animates.set(e.id,e),e.onRemove((()=>{this.animates.delete(e.id)})),e}onAttributeUpdate(t){t&&t.skipUpdateCallback||(ti.graphicService.onAttributeUpdate(this),this._emitCustomEvent("afterAttributeUpdate",t))}update(t){t?(t.bounds&&this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),t.trans&&this.tryUpdateLocalTransMatrix()):(this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),this.tryUpdateLocalTransMatrix())}hasState(t){return!(!this.currentStates||!this.currentStates.length)&&(!!p(t)||this.currentStates.includes(t))}getState(t){var e;return null===(e=this.states)||void 0===e?void 0:e[t]}applyStateAttrs(t,e,n,i){var r,s,a,o;if(n){const n=Object.keys(t),l=this.getNoWorkAnimateAttr(),u={};let h;n.forEach((e=>{l[e]?(h||(h={}),h[e]=t[e]):u[e]=i&&void 0===t[e]?this.getDefaultAttribute(e):t[e]}));const c=this.animate();c.stateNames=e,c.to(u,null!==(s=null===(r=this.stateAnimateConfig)||void 0===r?void 0:r.duration)&&void 0!==s?s:Li,null!==(o=null===(a=this.stateAnimateConfig)||void 0===a?void 0:a.easing)&&void 0!==o?o:Ri),h&&this.setAttributes(h,!1,{type:Fe.STATE})}else this.stopStateAnimates(),this.setAttributes(t,!1,{type:Fe.STATE})}updateNormalAttrs(t){const e={};this.normalAttrs?(Object.keys(t).forEach((t=>{t in this.normalAttrs?(e[t]=this.normalAttrs[t],delete this.normalAttrs[t]):e[t]=this.getNormalAttribute(t)})),Object.keys(this.normalAttrs).forEach((e=>{t[e]=this.normalAttrs[e]}))):Object.keys(t).forEach((t=>{e[t]=this.getNormalAttribute(t)})),this.normalAttrs=e}stopStateAnimates(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end";this.animates&&this.animates.forEach((e=>{e.stateNames&&(e.stop(t),this.animates.delete(e.id))}))}getNormalAttribute(t){let e=this.attribute[t];return this.animates&&this.animates.forEach((n=>{if(n.stateNames){const i=n.getEndProps();O(i,t)&&(e=i[t])}})),e}clearStates(t){this.hasState()&&this.normalAttrs?(this.currentStates=[],this.applyStateAttrs(this.normalAttrs,this.currentStates,t,!0)):this.currentStates=[],this.normalAttrs=null}removeState(t,e){if((this.currentStates?this.currentStates.indexOf(t):-1)>=0){const n=this.currentStates.filter((e=>e!==t));this.useStates(n,e)}}toggleState(t,e){if(this.hasState(t))this.removeState(t,e);else if((this.currentStates?this.currentStates.indexOf(t):-1)<0){const n=this.currentStates?this.currentStates.slice():[];n.push(t),this.useStates(n,e)}}addState(t,e,n){var i;if(this.currentStates&&this.currentStates.includes(t)&&(e||1===this.currentStates.length))return;const r=e&&(null===(i=this.currentStates)||void 0===i?void 0:i.length)?this.currentStates.concat([t]):[t];this.useStates(r,n)}useStates(t,e){var n;if(!t.length)return void this.clearStates(e);if((null===(n=this.currentStates)||void 0===n?void 0:n.length)===t.length&&!t.some(((t,e)=>this.currentStates[e]!==t)))return;const i={};t.forEach((e=>{var n;const r=this.stateProxy?this.stateProxy(e,t):null===(n=this.states)||void 0===n?void 0:n[e];r&&Object.assign(i,r)})),this.updateNormalAttrs(i),this.currentStates=t,this.applyStateAttrs(i,t,e)}addUpdateBoundTag(){this._updateTag|=ze.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}addUpdateShapeTag(){this._updateTag|=ze.UPDATE_SHAPE}addUpdateShapeAndBoundsTag(){this._updateTag|=ze.UPDATE_SHAPE_AND_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}updateShapeAndBoundsTagSetted(){return(this._updateTag&ze.UPDATE_SHAPE_AND_BOUNDS)===ze.UPDATE_SHAPE_AND_BOUNDS}clearUpdateBoundTag(){this._updateTag&=ze.CLEAR_BOUNDS}addUpdatePositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=ze.UPDATE_GLOBAL_LOCAL_MATRIX}addUpdateGlobalPositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=ze.UPDATE_GLOBAL_MATRIX}clearUpdateLocalPositionTag(){this._updateTag&=ze.CLEAR_LOCAL_MATRIX}clearUpdateGlobalPositionTag(){this._updateTag&=ze.CLEAR_GLOBAL_MATRIX}addUpdateLayoutTag(){this._updateTag|=ze.UPDATE_LAYOUT}clearUpdateLayoutTag(){this._updateTag&=ze.CLEAR_LAYOUT}needUpdateLayout(){return!!(this._updateTag&ze.UPDATE_LAYOUT)}getAnchor(t,e){const n=[0,0],i=()=>{if(e.b)return e.b;const{scaleX:t,scaleY:n,angle:i}=this.attribute;return Ji.copy(this._AABBBounds),this.setAttributes({scaleX:1,scaleY:1,angle:0}),e.b=this.AABBBounds.clone(),this._AABBBounds.copy(Ji),this.setAttributes({scaleX:t,scaleY:n,angle:i}),e.b};if("string"==typeof t[0]){const e=parseFloat(t[0])/100,r=i();n[0]=r.x1+(r.x2-r.x1)*e}else n[0]=t[0];if("string"==typeof t[1]){const e=parseFloat(t[1])/100,r=i();n[1]=r.y1+(r.y2-r.y1)*e}else n[1]=t[1];return n}doUpdateLocalMatrix(){const{x:t=Ln.x,y:e=Ln.y,scaleX:n=Ln.scaleX,scaleY:i=Ln.scaleY,angle:r=Ln.angle,scaleCenter:s,anchor:a,postMatrix:o}=this.attribute;let l=[0,0];const u={};if(a&&(l=this.getAnchor(a,u)),!s||1===n&&1===i)!function(t,e,n,i,r,s,a,o){const l=e.a,u=e.b,h=e.c,c=e.d,d=e.e,f=e.f,p=tt(a),g=it(a);let m,b;o?(m=o[0],b=o[1]):(m=n,b=i);const y=m-n,v=b-i,x=l*p+h*g,_=u*p+c*g,A=h*p-l*g,S=c*p-u*g;t.a=r*x,t.b=r*_,t.c=s*A,t.d=s*S,t.e=d+l*m+h*b-x*y-A*v,t.f=f+u*m+c*b-_*y-S*v}(this._transMatrix,this._transMatrix.reset(),t,e,n,i,r,a&&l);else{const a=this._transMatrix;a.reset(),a.translate(l[0],l[1]),a.rotate(r),a.translate(-l[0],-l[1]),a.translate(t,e),l=this.getAnchor(s,u),ti.transformUtil.fromMatrix(a,a).scale(n,i,{x:l[0],y:l[1]})}const h=this.getOffsetXY(Ln);if(this._transMatrix.e+=h.x,this._transMatrix.f+=h.y,o){const t=Zi.setValue(o.a,o.b,o.c,o.d,o.e,o.f),e=this._transMatrix;t.multiply(e.a,e.b,e.c,e.d,e.e,e.f),e.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}doUpdateGlobalMatrix(){if(this.parent){this._globalTransMatrix.multiply(this.transMatrix.a,this.transMatrix.b,this.transMatrix.c,this.transMatrix.d,this.transMatrix.e,this.transMatrix.f);const{scrollX:t=0,scrollY:e=0}=this.parent.attribute;this._globalTransMatrix.translate(t,e)}}setStage(t,e){if(this.stage!==t){if(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this.animates&&this.animates.size){const e=t.getTimeline();this.animates.forEach((t=>{t.setTimeline(e)}))}this._onSetStage&&this._onSetStage(this,t,e),ti.graphicService.onSetStage(this,t)}}setStageToShadowRoot(t,e){this.shadowRoot&&this.shadowRoot.setStage(t,e)}onAddStep(t){}onStop(t){t&&this.setAttributes(t,!1,{type:Fe.ANIMATE_END})}onStep(t,e,n,i,r){const s={};if(n.customAnimate)n.customAnimate.update(r,i,s);else{const a=n.props,o=n.parsedProps,l=n.propKeys;this.stepInterpolate(t,e,s,n,i,r,a,void 0,o,l)}this.setAttributes(s,!1,{type:Fe.ANIMATE_UPDATE,animationState:{ratio:i,end:r,step:n,isFirstFrameOfStep:t.getLastStep()!==n}}),this.stage&&this.stage.renderNextFrame()}stepInterpolate(t,e,n,i,r,s,a,o,l,u){u||(u=Object.keys(a),i.propKeys=u),s?i.propKeys.forEach((t=>{e.validAttr(t)&&(n[t]=a[t])})):u.forEach((s=>{var u;if(!e.validAttr(s))return;const h=a[s],c=null!==(u=o&&o[s])&&void 0!==u?u:t.getLastPropByName(s,i);if(null==h||null==c)return void(n[s]=h);let d;d=e.interpolateFunc&&e.interpolateFunc(s,r,c,h,n),d||(d=e.customInterpolate(s,r,c,h,this,n),d||this.defaultInterpolate(h,c,s,n,l,r)||this._interpolate(s,r,c,h,n))})),i.parsedProps=l}defaultInterpolate(t,e,n,i,r,s){if(Number.isFinite(t))return i[n]=e+(t-e)*s,!0;if("fill"===n){r||(r={});const a=r.fillColorArray,o=Gi(e,null!=a?a:t,s,!1,((t,e)=>{r.fillColorArray=e}));return o&&(i[n]=o),!0}if("stroke"===n){r||(r={});const a=r.strokeColorArray,o=Gi(e,null!=a?a:t,s,!1,((t,e)=>{r.strokeColorArray=e}));return o&&(i[n]=o),!0}if("shadowColor"===n){r||(r={});const a=r.shadowColorArray,o=Gi(e,null!=a?a:t,s,!0,((t,e)=>{r.shadowColorArray=e}));return o&&(i[n]=o),!0}return!1}_interpolate(t,e,n,i,r){}getDefaultAttribute(t){return this.getGraphicTheme()[t]}getComputedAttribute(t){var e;return null!==(e=this.attribute[t])&&void 0!==e?e:this.getDefaultAttribute(t)}onSetStage(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._onSetStage=t,e&&this.stage&&t(this,this.stage)}attachShadow(t){return t&&(t.shadowHost=this),this.shadowRoot=null!=t?t:ti.graphicService.creator.shadowRoot(this),this.addUpdateBoundTag(),this.shadowRoot.setStage(this.stage,this.layer),this.shadowRoot}detachShadow(){this.shadowRoot&&(this.addUpdateBoundTag(),this.shadowRoot=null)}toJson(){return{attribute:this.attribute,_uid:this._uid,type:this.type,name:this.name,children:this.children.map((t=>t.toJson()))}}createPathProxy(t){return v(t,!0)?this.pathProxy=(new Pn).fromString(t):this.pathProxy=new Pn,this.pathProxy}loadImage(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t||e&&function(t){return!(!t.fill&&!t.stroke)}(t))return;const n=t;this.resources||(this.resources=new Map);const i={data:"init",state:null};this.resources.set(n,i),"string"==typeof t?(i.state="loading",t.startsWith("<svg")?(qi.GetSvg(t,this),this.backgroundImg=this.backgroundImg||e):(w(t)||t.includes("/")||T(t))&&(qi.GetImage(t,this),this.backgroundImg=this.backgroundImg||e)):m(t)?(i.state="success",i.data=t,this.backgroundImg=this.backgroundImg||e):i.state="fail"}setShadowGraphic(t){t?this.attachShadow().add(t):this.detachShadow()}imageLoadSuccess(t,e,n){if(!this.resources)return;const i=this.resources.get(t);i&&(i.state="success",i.data=e,n&&n(),this.addUpdateBoundTag(),this.stage&&this.stage.renderNextFrame())}imageLoadFail(t,e){if(!this.resources)return;const n=this.resources.get(t);n&&(n.state="fail",e&&e())}_stopAnimates(t){t&&t.forEach((t=>{t.stop()}))}stopAnimates(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._stopAnimates(this.animates),this.shadowRoot&&this.shadowRoot.stopAnimates(!0),this.isContainer&&t&&this.forEachChildren((e=>{e.stopAnimates(t)}))}release(){this.releaseStatus="released",ti.graphicService.onRelease(this)}_emitCustomEvent(t,e){var n,i;if(this._events&&t in this._events){const r=new wi(t,e);r.bubbles=!1,r.manager=null===(i=null===(n=this.stage)||void 0===n?void 0:n.eventSystem)||void 0===i?void 0:i.manager,this.dispatchEvent(r)}}}ar.mixin(Ti);class or{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}function lr(t,e,n,i){const r=t.indexOf(e,n);if(-1===r)throw new Error(i);return r+e.length-1}function ur(t,e,n){const i=function(t,e){let n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",r="";for(let s=e;s<t.length;s++){let e=t[s];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===i[0]){if(!i[1])return{data:r,index:s};if(t[s+1]===i[1])return{data:r,index:s}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!i)return;let r=i.data;const s=i.index,a=r.search(/\s/);let o=r,l=!0;-1!==a&&(o=r.substr(0,a).replace(/\s\s*$/,""),r=r.substr(a+1));const u=o;if(n){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1),l=o!==i.data.substr(t+1))}return{tagName:o,tagExp:r,closeIndex:s,attrExpPresent:l,rawTagName:u}}const hr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");class cr{constructor(t){this.currentNode=null,this.options=t,this.tagsNodeStack=[],this.docTypeEntities={}}addChild(t,e,n){const i=e.tagname;"string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e)}buildAttributesMap(t,e,n){const i={};if(!t)return;const r=function(t,e){const n=[];let i=e.exec(t);for(;i;){const r=[];r.startIndex=e.lastIndex-i[0].length;const s=i.length;for(let t=0;t<s;t++)r.push(i[t]);n.push(r),i=e.exec(t)}return n}(t,hr),s=r.length;for(let t=0;t<s;t++){const e=r[t][1],n=r[t][4];e&&(i[e]=void 0===n||(isNaN(n)?n:Number(n)))}return i}parseXml(t){t=t.replace(/\r\n?/g,"\n");const e=new or("!xml");let n=e,i="",r="";for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=lr(t,">",s,"Closing Tag is not closed."),a=r.lastIndexOf(".");r=r.substring(0,a),n=this.tagsNodeStack.pop(),n&&n.child&&i&&n.child[n.child.length-1][":@"]&&(n.child[n.child.length-1][":@"].text=i),i="",s=e}else if("?"===t[s+1])s=ur(t,s,!1,"?>").closeIndex+1;else if("!--"===t.substr(s+1,3))s=lr(t,"--\x3e",s+4,"Comment is not closed.");else{const a=ur(t,s,!1);let o=a.tagName,l=a.tagExp;const u=a.attrExpPresent,h=a.closeIndex;if(o!==e.tagname&&(r+=r?"."+o:o),l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===o[o.length-1]?(o=o.substr(0,o.length-1),r=r.substr(0,r.length-1),l=o):l=l.substr(0,l.length-1);const t=new or(o);o!==l&&u&&(t[":@"]=this.buildAttributesMap(l,r,o)),this.addChild(n,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new or(o);this.tagsNodeStack.push(n),o!==l&&u&&(t[":@"]=this.buildAttributesMap(l,r,o)),this.addChild(n,t,r),n=t}i="",s=h}else i+=t[s];return e.child}}function dr(t,e){return fr(t)}function fr(t,e){const n={};for(let e=0;e<t.length;e++){const r=t[e],s=pr(r);if(void 0!==s&&r[s]){const t=fr(r[s]);i=t,Object.keys(i).length,r[":@"]&&gr(t,r[":@"]),void 0!==n[s]&&n.hasOwnProperty(s)?(Array.isArray(n[s])||(n[s]=[n[s]]),n[s].push(t)):n[s]=t}}var i;return n}function pr(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function gr(t,e,n){if(e){const n=Object.keys(e),i=n.length;for(let r=0;r<i;r++){const i=n[r];t[i]=e[i]}}}class mr{constructor(t){this.options=Object.assign({},mr.defaultOptions,t)}valid(t){return t.startsWith("<")}parse(t){if(!this.valid)return!1;return dr(new cr(this.options).parseXml(t),this.options)}}function br(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.expand(e+(i/2+(n?function(t,e){return t?e:0}(n,e):0))),t}mr.defaultOptions={};let yr=0;function vr(){return yr++}var xr;function _r(t){const e=[];let n=0,i="";for(let r=0;r<t.length;r++)wr(t[r])?n?i+=t[r]:(n=1,i=t[r]):(n&&(e.push({text:i,direction:xr.VERTICAL}),i="",n=0),e.push({text:t[r],direction:xr.HORIZONTAL}));return i&&e.push({text:i,direction:xr.VERTICAL}),e}!function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(xr||(xr={}));const Ar=new Map;["…","(",")","—","【","】","「","」","《","》"].forEach((t=>Ar.set(t,!0)));const Sr=new Map;function wr(t){if(Ar.has(t))return!0;if(Sr.has(t))return!1;let e=!1;return t.codePointAt(0)<256&&(e=!0),e}[""].forEach((t=>Sr.set(t,!0)));const Tr=vr();vr(),vr(),vr(),vr();const Br=vr(),Cr=vr();vr(),vr(),vr(),vr();const kr=vr();vr();const Mr=vr(),Pr=vr(),Er=vr(),Or=Symbol.for("GraphicCreator"),Lr={"stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-width":"lineWidth","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity",stroke:"stroke",fill:"fill"},Rr=Object.keys(Lr);var Ir;!function(t){t[t.LESS_GROUP=0]="LESS_GROUP",t[t.MORE_GROUP=1]="MORE_GROUP"}(Ir||(Ir={}));let Nr=class t extends ar{constructor(t){super(t),this.type="group",this.parent=null,this.isContainer=!0,this.numberType=Br,this._childUpdateTag=ze.UPDATE_BOUNDS}setMode(t){"3d"===t?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}setTheme(t){return this.theme||(this.theme=new yi),this.theme.setTheme(t,this)}createTheme(){this.theme||(this.theme=new yi)}visibleAll(t){this.setAttribute("visible",t),this.forEachChildren((e=>{e.isContainer&&e.visibleAll?e.visibleAll(t):e.setAttribute("visible",t)}))}hideAll(){this.visibleAll(!1)}showAll(){this.visibleAll(!0)}containsPoint(t,e,n){if(n===We.GLOBAL){const n=new ot(t,e);return this.parent&&this.parent.globalTransMatrix.transformPoint(n,n),this.AABBBounds.contains(n.x,n.y)}return this.AABBBounds.contains(t,e)}shouldUpdateAABBBounds(){return!!super.shouldUpdateAABBBounds()||!!(this._childUpdateTag&ze.UPDATE_BOUNDS)}tryUpdateAABBBounds(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;ti.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const t=this.shouldSelfChangeUpdateAABBBounds(),e=this.doUpdateAABBBounds();return this.addUpdateLayoutTag(),ti.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,t),e}doUpdateLocalMatrix(){const{x:t=Ln.x,y:e=Ln.y,dx:n=Ln.dx,dy:i=Ln.dy,scaleX:r=Ln.scaleX,scaleY:s=Ln.scaleY,angle:a=Ln.angle,postMatrix:o}=this.attribute;if(0!==t||0!==e||0!==n||0!==i||1!==r||1!==s||0!==a||o)return super.doUpdateLocalMatrix();this._transMatrix.reset()}getGraphicTheme(){return xi(this).group}updateAABBBounds(t,e,n){const i=n;n=n.clone();const{width:r,height:s,path:a,clip:o=e.clip,display:l}=t;return a&&a.length?a.forEach((t=>{n.union(t.AABBBounds)})):null!=r&&null!=s&&n.set(0,0,Math.max(0,r),Math.max(0,s)),o||this.forEachChildren((t=>{n.union(t.AABBBounds)})),ti.graphicService.updateTempAABBBounds(n),ti.graphicService.transformAABBBounds(t,n,e,!1,this),i.copy(n),i}doUpdateAABBBounds(){const t=super.doUpdateAABBBounds();return this.parent&&this.parent.addChildUpdateBoundTag(),this._emitCustomEvent("AAABBBoundsChange"),t}clearUpdateBoundTag(){this._updateTag&=ze.CLEAR_BOUNDS,this._childUpdateTag&=ze.CLEAR_BOUNDS}addUpdateBoundTag(){this._updateTag|=ze.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag()}addChildUpdateBoundTag(){this._childUpdateTag&ze.UPDATE_BOUNDS||(this._childUpdateTag|=ze.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag())}getTheme(){return this.theme.getTheme(this)}incrementalAppendChild(t){const e=super.appendChild(t);return this.stage&&e&&(e.stage=this.stage,e.layer=this.layer),this.addUpdateBoundTag(),ti.graphicService.onAddIncremental(t,this,this.stage),e}incrementalClearChild(){super.removeAllChild(),this.addUpdateBoundTag(),ti.graphicService.onClearIncremental(this,this.stage)}_updateChildToStage(t){return this.stage&&t&&t.setStage(this.stage,this.layer),this.addUpdateBoundTag(),t}appendChild(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=super.appendChild(t);return e&&this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}insertBefore(t,e){return this._updateChildToStage(super.insertBefore(t,e))}insertAfter(t,e){return this._updateChildToStage(super.insertAfter(t,e))}insertInto(t,e){return this._updateChildToStage(super.insertInto(t,e))}removeChild(t){const e=super.removeChild(t);return t.stage=null,ti.graphicService.onRemove(t),this.addUpdateBoundTag(),e}removeAllChild(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.forEachChildren((e=>{ti.graphicService.onRemove(e),t&&e.isContainer&&e.removeAllChild(t)})),super.removeAllChild(),this.addUpdateBoundTag()}setStage(t,e){this.stage!==t&&(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this._onSetStage&&this._onSetStage(this,t,e),ti.graphicService.onSetStage(this,t),this.forEachChildren((e=>{e.setStage(t,this.layer)})))}addUpdatePositionTag(){super.addUpdatePositionTag(),this.forEachChildren((t=>{t.isContainer&&t.addUpdateGlobalPositionTag()}))}addUpdateGlobalPositionTag(){super.addUpdateGlobalPositionTag(),this.forEachChildren((t=>{t.isContainer&&t.addUpdateGlobalPositionTag()}))}tryUpdateGlobalTransMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.shouldUpdateGlobalMatrix()){if(this._globalTransMatrix){if(this.parent){const t=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();this.doUpdateGlobalMatrix(),t&&this.clearUpdateGlobalPositionTag()}return this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!!(this._updateTag&ze.UPDATE_GLOBAL_MATRIX)}_getChildByName(t,e){return this.find((e=>e.name===t),e)}createOrUpdateChild(t,e,n){let i=this._getChildByName(t);return i?i.setAttributes(e):(i=ti.graphicService.creator[n](e),i.name=t,this.add(i)),i}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function Ur(t){return new Nr(t)}function Dr(t,e){return!(!t&&!e)}function zr(t,e){let n;return n=x(t)?t.some((t=>t||void 0===t)):!!t,n&&e>0}function Wr(t,e,n){return n&&t*e>0}function Fr(t,e){return t*e>0}Nr.NOWORK_ANIMATE_ATTR=sr;const jr=Symbol.for("ImageRenderContribution"),Hr=Symbol.for("RectRenderContribution"),$r=Symbol.for("SymbolRenderContribution"),Gr=Symbol.for("TextRenderContribution"),Vr=Symbol.for("InteractiveSubRenderContribution");function Xr(t,e){return"end"===t||"right"===t?-e:"center"===t?-e/2:0}function Yr(t,e,n){return"middle"===t?-e/2:"top"===t?0:"bottom"===t?(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)-e:t&&"alphabetic"!==t?0:(n||(n=e),-(e-n)/2-.79*n)}function Kr(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function qr(t,e,n){const i=n[0],r=n[1],s=n[2];let a,o,l,u,h,c,d,f,p,g,m,b;return e===t?(t[12]=e[0]*i+e[4]*r+e[8]*s+e[12],t[13]=e[1]*i+e[5]*r+e[9]*s+e[13],t[14]=e[2]*i+e[6]*r+e[10]*s+e[14],t[15]=e[3]*i+e[7]*r+e[11]*s+e[15]):(a=e[0],o=e[1],l=e[2],u=e[3],h=e[4],c=e[5],d=e[6],f=e[7],p=e[8],g=e[9],m=e[10],b=e[11],t[0]=a,t[1]=o,t[2]=l,t[3]=u,t[4]=h,t[5]=c,t[6]=d,t[7]=f,t[8]=p,t[9]=g,t[10]=m,t[11]=b,t[12]=a*i+h*r+p*s+e[12],t[13]=o*i+c*r+g*s+e[13],t[14]=l*i+d*r+m*s+e[14],t[15]=u*i+f*r+b*s+e[15]),t}function Qr(t,e,n){const i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],m=e[13],b=e[14],y=e[15];let v=n[0],x=n[1],_=n[2],A=n[3];return t[0]=v*i+x*o+_*c+A*g,t[1]=v*r+x*l+_*d+A*m,t[2]=v*s+x*u+_*f+A*b,t[3]=v*a+x*h+_*p+A*y,v=n[4],x=n[5],_=n[6],A=n[7],t[4]=v*i+x*o+_*c+A*g,t[5]=v*r+x*l+_*d+A*m,t[6]=v*s+x*u+_*f+A*b,t[7]=v*a+x*h+_*p+A*y,v=n[8],x=n[9],_=n[10],A=n[11],t[8]=v*i+x*o+_*c+A*g,t[9]=v*r+x*l+_*d+A*m,t[10]=v*s+x*u+_*f+A*b,t[11]=v*a+x*h+_*p+A*y,v=n[12],x=n[13],_=n[14],A=n[15],t[12]=v*i+x*o+_*c+A*g,t[13]=v*r+x*l+_*d+A*m,t[14]=v*s+x*u+_*f+A*b,t[15]=v*a+x*h+_*p+A*y,t}class Zr{constructor(){this.pools=[]}static identity(t){return Kr(t)}allocate(){if(!this.pools.length)return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];const t=this.pools.pop();return Zr.identity(t),t}allocateByObj(t){let e;e=this.pools.length?this.pools.pop():[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];for(let n=0;n<e.length;n++)e[n]=t[n];return e}free(t){t&&this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}}const Jr=new class{constructor(){this.pools=[]}allocate(t,e,n,i,r,s){if(!this.pools.length)return new ft(t,e,n,i,r,s);const a=this.pools.pop();return a.a=t,a.b=e,a.c=n,a.d=i,a.e=r,a.f=s,a}allocateByObj(t){if(!this.pools.length)return new ft(t.a,t.b,t.c,t.d,t.e,t.f);const e=this.pools.pop();return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e}free(t){this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}},ts=new Zr;var es=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},ns=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},is=function(t,e){return function(n,i){e(n,i,t)}};function rs(t,e,n){var i;const{x:r=n.x,y:s=n.y,z:a=n.z,dx:o=n.dx,dy:l=n.dy,dz:u=n.dz,scaleX:h=n.scaleX,scaleY:c=n.scaleY,scaleZ:d=n.scaleZ,alpha:f=n.alpha,beta:p=n.beta,angle:g=n.angle,anchor3d:m=e.attribute.anchor,anchor:b}=e.attribute,y=[0,0,0];if(m){if("string"==typeof m[0]){const t=parseFloat(m[0])/100,n=e.AABBBounds;y[0]=n.x1+(n.x2-n.x1)*t}else y[0]=m[0];if("string"==typeof m[1]){const t=parseFloat(m[1])/100,n=e.AABBBounds;y[1]=n.x1+(n.x2-n.x1)*t}else y[1]=m[1];y[2]=null!==(i=m[2])&&void 0!==i?i:0}if(Kr(t),qr(t,t,[r+o,s+l,a+u]),qr(t,t,[y[0],y[1],y[2]]),function(t,e,n){const i=Math.sin(n),r=Math.cos(n),s=e[4],a=e[5],o=e[6],l=e[7],u=e[8],h=e[9],c=e[10],d=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*r+u*i,t[5]=a*r+h*i,t[6]=o*r+c*i,t[7]=l*r+d*i,t[8]=u*r-s*i,t[9]=h*r-a*i,t[10]=c*r-o*i,t[11]=d*r-l*i}(t,t,p),function(t,e,n){const i=Math.sin(n),r=Math.cos(n),s=e[0],a=e[1],o=e[2],l=e[3],u=e[8],h=e[9],c=e[10],d=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*r-u*i,t[1]=a*r-h*i,t[2]=o*r-c*i,t[3]=l*r-d*i,t[8]=s*i+u*r,t[9]=a*i+h*r,t[10]=o*i+c*r,t[11]=l*i+d*r}(t,t,f),qr(t,t,[-y[0],-y[1],y[2]]),function(t,e,n){const i=n[0],r=n[1],s=n[2];t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]}(t,t,[h,c,d]),g){const n=ts.allocate(),i=[0,0];if(b){if("string"==typeof m[0]){const t=parseFloat(m[0])/100,n=e.AABBBounds;i[0]=n.x1+(n.x2-n.x1)*t}else i[0]=m[0];if("string"==typeof m[1]){const t=parseFloat(m[1])/100,n=e.AABBBounds;i[1]=n.x1+(n.x2-n.x1)*t}else i[1]=m[1]}qr(n,n,[i[0],i[1],0]),function(t,e,n){const i=Math.sin(n),r=Math.cos(n),s=e[0],a=e[1],o=e[2],l=e[3],u=e[4],h=e[5],c=e[6],d=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*r+u*i,t[1]=a*r+h*i,t[2]=o*r+c*i,t[3]=l*r+d*i,t[4]=u*r-s*i,t[5]=h*r-a*i,t[6]=c*r-o*i,t[7]=d*r-l*i}(n,n,g),qr(n,n,[-i[0],-i[1],0]),Qr(t,t,n)}}let ss=class{constructor(t){this.creator=t,this.hooks={onAttributeUpdate:new be(["graphic"]),onSetStage:new be(["graphic","stage"]),onRemove:new be(["graphic"]),onRelease:new be(["graphic"]),onAddIncremental:new be(["graphic","group","stage"]),onClearIncremental:new be(["graphic","group","stage"]),beforeUpdateAABBBounds:new be(["graphic","stage","willUpdate","aabbBounds"]),afterUpdateAABBBounds:new be(["graphic","stage","aabbBounds","globalAABBBounds","selfChange"])},this.tempAABBBounds1=new ct,this.tempAABBBounds2=new ct}onAttributeUpdate(t){this.hooks.onAttributeUpdate.taps.length&&this.hooks.onAttributeUpdate.call(t)}onSetStage(t,e){this.hooks.onSetStage.taps.length&&this.hooks.onSetStage.call(t,e)}onRemove(t){this.hooks.onRemove.taps.length&&this.hooks.onRemove.call(t)}onRelease(t){this.hooks.onRelease.taps.length&&this.hooks.onRelease.call(t)}onAddIncremental(t,e,n){this.hooks.onAddIncremental.taps.length&&this.hooks.onAddIncremental.call(t,e,n)}onClearIncremental(t,e){this.hooks.onClearIncremental.taps.length&&this.hooks.onClearIncremental.call(t,e)}beforeUpdateAABBBounds(t,e,n,i){this.hooks.beforeUpdateAABBBounds.taps.length&&this.hooks.beforeUpdateAABBBounds.call(t,e,n,i)}afterUpdateAABBBounds(t,e,n,i,r){this.hooks.afterUpdateAABBBounds.taps.length&&this.hooks.afterUpdateAABBBounds.call(t,e,n,i,r)}updatePathProxyAABBBounds(t,e){const n="function"==typeof e.pathProxy?e.pathProxy(e.attribute):e.pathProxy;if(!n)return!1;const i=new xe(t);return Ze(n.commandList,i,0,0),!0}updateHTMLTextAABBBounds(t,e,n,i){const{textAlign:r,textBaseline:s}=t;if(null!=t.forceBoundsHeight){const e=A(t.forceBoundsHeight)?t.forceBoundsHeight:t.forceBoundsHeight(),i=Yr(s,e,e);n.set(n.x1,i,n.x2,i+e)}if(null!=t.forceBoundsWidth){const e=A(t.forceBoundsWidth)?t.forceBoundsWidth:t.forceBoundsWidth(),i=Xr(r,e);n.set(i,n.y1,i+e,n.y2)}}combindShadowAABBBounds(t,e){if(e&&e.shadowRoot){const n=e.shadowRoot.AABBBounds;t.union(n)}}transformAABBBounds(t,e,n,i,r){if(!e.empty()){const{scaleX:r=n.scaleX,scaleY:s=n.scaleY,stroke:a=n.stroke,shadowBlur:o=n.shadowBlur,lineWidth:l=n.lineWidth,pickStrokeBuffer:u=n.pickStrokeBuffer,strokeBoundsBuffer:h=n.strokeBoundsBuffer}=t,c=this.tempAABBBounds1,d=this.tempAABBBounds2;if(a&&l){br(c,(l+u)/Math.abs(r+s),i,h),e.union(c),c.setValue(d.x1,d.y1,d.x2,d.y2)}if(o){const{shadowOffsetX:i=n.shadowOffsetX,shadowOffsetY:a=n.shadowOffsetY}=t;br(c,o/Math.abs(r+s)*2,!1,h+1),c.translate(i,a),e.union(c)}}if(this.combindShadowAABBBounds(e,r),e.empty())return;let s=!0;const a=r.transMatrix;r&&r.isContainer&&(s=!(1===a.a&&0===a.b&&0===a.c&&1===a.d&&0===a.e&&0===a.f)),s&&ut(e,e,a)}validCheck(t,e,n,i){if(!i)return!0;if(null!=t.forceBoundsHeight||null!=t.forceBoundsWidth)return!0;if(!i.valid)return n.clear(),!1;const{visible:r=e.visible}=t;return!!r||(n.clear(),!1)}updateTempAABBBounds(t){const e=this.tempAABBBounds1,n=this.tempAABBBounds2;return e.setValue(t.x1,t.y1,t.x2,t.y2),n.setValue(t.x1,t.y1,t.x2,t.y2),{tb1:e,tb2:n}}};ss=es([Qt(),is(0,Kt(Or)),ns("design:paramtypes",[Object])],ss);const as={x:0,y:0,z:0,lastModelMatrix:null};class os{init(t){t&&(this._renderContribitions=t.getContributions()),this._renderContribitions||(this._renderContribitions=[]),this.builtinContributions&&this.builtinContributions.forEach((t=>this._renderContribitions.push(t))),this._renderContribitions.length&&(this._renderContribitions.sort(((t,e)=>e.order-t.order)),this._beforeRenderContribitions=this._renderContribitions.filter((t=>t.time===Xe.beforeFillStroke)),this._afterRenderContribitions=this._renderContribitions.filter((t=>t.time===Xe.afterFillStroke)))}beforeRenderStep(t,e,n,i,r,s,a,o,l,u,h,c,d){this._beforeRenderContribitions&&this._beforeRenderContribitions.forEach((f=>{f.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(f.supportedAppName)?f.supportedAppName:[f.supportedAppName]).includes(t.stage.params.context.appName)||f.drawShape(t,e,n,i,r,s,a,o,l,u,h,c,d)}))}afterRenderStep(t,e,n,i,r,s,a,o,l,u,h,c,d){this._afterRenderContribitions&&this._afterRenderContribitions.forEach((f=>{f.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(f.supportedAppName)?f.supportedAppName:[f.supportedAppName]).includes(t.stage.params.context.appName)||f.drawShape(t,e,n,i,r,s,a,o,l,u,h,c,d)}))}valid(t,e,n,i){const{fill:r=e.fill,background:s,stroke:a=e.stroke,opacity:o=e.opacity,fillOpacity:l=e.fillOpacity,lineWidth:u=e.lineWidth,strokeOpacity:h=e.strokeOpacity,visible:c=e.visible}=t.attribute,d=Wr(o,l,r),f=Fr(o,h),p=Dr(r,s),g=zr(a,u);return!(!t.valid||!c)&&!(!p&&!g)&&!!(d||f||n||i||s)&&{fVisible:d,sVisible:f,doFill:p,doStroke:g}}transform(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{x:r=e.x,y:s=e.y,z:a=e.z,scaleX:o=e.scaleX,scaleY:l=e.scaleY,angle:u=e.angle,postMatrix:h}=t.attribute,c=n.modelMatrix,d=n.camera;as.x=r,as.y=s,as.z=a,as.lastModelMatrix=c;const f=d&&(i||function(t){const{alpha:e,beta:n}=t.attribute;return e||n}(t)),p=f?t.transMatrix.onlyTranslate()&&!h:1===o&&1===l&&0===u&&!h;if(f){const i=ts.allocate(),r=ts.allocate();rs(r,t,e),Qr(i,c||i,r),as.x=0,as.y=0,as.z=0,n.modelMatrix=i,n.setTransform(1,0,0,1,0,0,!0),ts.free(r)}if(p&&!c){const i=t.getOffsetXY(e);as.x+=i.x,as.y+=i.y,as.z=a,n.setTransformForCurrent()}else if(f)as.x=0,as.y=0,as.z=0,n.setTransform(1,0,0,1,0,0,!0);else if(d&&n.project){const i=t.getOffsetXY(e);as.x+=i.x,as.y+=i.y,this.transformWithoutTranslate(n,as.x,as.y,as.z,o,l,u)}else n.transformFromMatrix(t.transMatrix,!0),as.x=0,as.y=0,as.z=0;return as}transformUseContext2d(t,e,n,i){const r=i.camera;if(this.camera=r,r){const e=t.AABBBounds,r=e.x2-e.x1,s=e.y2-e.y1,a=i.project(0,0,n),o=i.project(r,0,n),l=i.project(r,s,n),u={x:0,y:0},h={x:r,y:0},c={x:r,y:s};i.camera=null;const d=1/(u.x*(c.y-h.y)-h.x*c.y+c.x*h.y+(h.x-c.x)*u.y),f=-(u.y*(l.x-o.x)-h.y*l.x+c.y*o.x+(h.y-c.y)*a.x)*d,p=(h.y*l.y+u.y*(o.y-l.y)-c.y*o.y+(c.y-h.y)*a.y)*d,g=(u.x*(l.x-o.x)-h.x*l.x+c.x*o.x+(h.x-c.x)*a.x)*d,m=-(h.x*l.y+u.x*(o.y-l.y)-c.x*o.y+(c.x-h.x)*a.y)*d,b=(u.x*(c.y*o.x-h.y*l.x)+u.y*(h.x*l.x-c.x*o.x)+(c.x*h.y-h.x*c.y)*a.x)*d,y=(u.x*(c.y*o.y-h.y*l.y)+u.y*(h.x*l.y-c.x*o.y)+(c.x*h.y-h.x*c.y)*a.y)*d;i.setTransform(f,p,g,m,b,y,!0)}}restoreTransformUseContext2d(t,e,n,i){this.camera&&(i.camera=this.camera)}transformWithoutTranslate(t,e,n,i,r,s,a){const o=t.project(e,n,i);t.translate(o.x,o.y,!1),t.scale(r,s,!1),t.rotate(a,!1),t.translate(-o.x,-o.y,!1),t.setTransformForCurrent()}_draw(t,e,n,i,r){const{context:s}=i;if(!s)return;const{renderable:a}=t.attribute;if(!1===a)return;s.highPerformanceSave();const o=this.transform(t,e,s,n),{x:l,y:u,z:h,lastModelMatrix:c}=o;this.z=h,function(t,e,n,i,r,s,a,o){if(!t.pathProxy)return!1;const l=xi(t,null==s?void 0:s.theme)[t.type.replace("3d","")],{fill:u=l.fill,stroke:h=l.stroke,opacity:c=l.opacity,fillOpacity:d=l.fillOpacity,lineWidth:f=l.lineWidth,strokeOpacity:p=l.strokeOpacity,visible:g=l.visible,x:m=l.x,y:b=l.y}=t.attribute,y=Wr(c,d,u),v=Fr(c,p),x=Dr(u),_=zr(h,f);return!g||(!x&&!_||(!(y||v||a||o)||(e.beginPath(),Ze(("function"==typeof t.pathProxy?t.pathProxy(t.attribute):t.pathProxy).commandList,e,n,i),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),_&&(o?o(e,t.attribute,l):v&&(e.setStrokeStyle(t,t.attribute,n-m,i-b,l),e.stroke())),x&&(a?a(e,t.attribute,l):y&&(e.setCommonStyle(t,t.attribute,n-m,i-b,l),e.fill())),!0)))}(t,s,l,u,0,r)||(this.drawShape(t,s,l,u,i,r),this.z=0,s.modelMatrix!==c&&ts.free(s.modelMatrix),s.modelMatrix=c),s.highPerformanceRestore()}}function ls(t,e,n){let i=e;const{a:r,b:s,c:a,d:o}=t.currentMatrix,l=Math.sign(r)*Math.sqrt(r*r+s*s),u=Math.sign(o)*Math.sqrt(a*a+o*o);return l+u===0?0:(i=i/Math.abs(l+u)*2*n,i)}var us=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},hs=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},cs=function(t,e){return function(n,i){e(n,i,t)}};class ds{constructor(){this.time=Xe.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,n,i,r,s,a,o,l,u,h,c,d){var f;const{background:p,backgroundOpacity:g=(null!==(f=t.attribute.fillOpacity)&&void 0!==f?f:l.backgroundOpacity),opacity:m=l.opacity,backgroundMode:b=l.backgroundMode,backgroundFit:y=l.backgroundFit}=t.attribute;if(p)if(t.backgroundImg&&t.resources){const r=t.resources.get(p);if("success"!==r.state||!r.data)return;if(e.save(),t.parent&&!t.transMatrix.onlyTranslate()){const n=xi(t.parent).group,{scrollX:i=n.scrollX,scrollY:r=n.scrollY}=t.parent.attribute;e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.translate(i,r)}e.clip();const s=t.AABBBounds;e.setCommonStyle(t,t.attribute,n,i,l),e.globalAlpha=g*m,this.doDrawImage(e,r.data,s,b,y),e.restore(),t.transMatrix.onlyTranslate()||e.setTransformForCurrent()}else e.highPerformanceSave(),e.setCommonStyle(t,t.attribute,n,i,l),e.globalAlpha=g*m,e.fillStyle=p,e.fill(),e.highPerformanceRestore()}doDrawImage(t,e,n,i,r){if("no-repeat"===i)t.drawImage(e,n.x1,n.y1,n.width(),n.height());else{const s=n.width(),a=n.height();let o=s,l=a;if(r&&"repeat"!==i&&(e.width||e.height)){const n=e.width,r=e.height;"repeat-x"===i?(o=n*(a/r),l=a):"repeat-y"===i&&(l=r*(s/n),o=s);const u=t.dpr,h=fi.allocate({width:o,height:l,dpr:u}),c=h.getContext("2d");c&&(c.inuse=!0,c.clearMatrix(),c.setTransformForCurrent(!0),c.clearRect(0,0,o,l),c.drawImage(e,0,0,o,l),e=h.nativeCanvas),fi.free(h)}const u=t.dpr,h=t.createPattern(e,i);h.setTransform&&h.setTransform(new DOMMatrix([1/u,0,0,1/u,0,0])),t.fillStyle=h,t.translate(n.x1,n.y1),t.fillRect(0,0,s,a),t.translate(-n.x1,-n.y1)}}}const fs=new ds;let ps=class{constructor(t){this.subRenderContribitions=t,this.time=Xe.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,n,i,r,s,a,o,l,u,h,c,d){this._subRenderContribitions||(this._subRenderContribitions=this.subRenderContribitions.getContributions()),this._subRenderContribitions.forEach((f=>{f.render(t,e,n,i,r,s,a,o,l,u,h,c,d)}))}};ps=us([Qt(),cs(0,Kt(fe)),cs(0,Zt(Vr)),hs("design:paramtypes",[Object])],ps);const gs=new class{constructor(){this.time=Xe.afterFillStroke,this.useStyle=!0,this.order=10}createCommonPattern(t,e,n,i,r){const s=(t-2*e)/2,a=i.dpr,o=fi.allocate({width:t,height:t,dpr:a}),l=o.getContext("2d");if(!l)return null;l.inuse=!0,l.clearMatrix(),l.setTransformForCurrent(!0),l.clearRect(0,0,t,t),r(s,l);const u=i.createPattern(o.nativeCanvas,"repeat");return u.setTransform&&u.setTransform(new DOMMatrix([1/a,0,0,1/a,0,0])),fi.free(o),u}createCirclePattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((t,e)=>{e.fillStyle=n,e.arc(t,t,t,0,Q),e.fill()}))}createDiamondPattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((e,i)=>{const r=t/2,s=r;i.fillStyle=n,i.moveTo(r,s-e),i.lineTo(e+r,s),i.lineTo(r,s+e),i.lineTo(r-e,s),i.closePath(),i.fill()}))}createRectPattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((t,i)=>{const r=e,s=r;i.fillStyle=n,i.fillRect(r,s,2*t,2*t)}))}createVerticalLinePattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((i,r)=>{const s=e;r.fillStyle=n,r.fillRect(s,0,2*i,t)}))}createHorizontalLinePattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((i,r)=>{const s=e;r.fillStyle=n,r.fillRect(0,s,t,2*i)}))}createBiasLRLinePattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((e,i)=>{i.strokeStyle=n,i.lineWidth=e,i.moveTo(0,0),i.lineTo(t,t);const r=t/2,s=-r;i.moveTo(r,s),i.lineTo(r+t,s+t),i.moveTo(-r,-s),i.lineTo(-r+t,-s+t),i.stroke()}))}createBiasRLLinePattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((e,i)=>{i.strokeStyle=n,i.lineWidth=e,i.moveTo(t,0),i.lineTo(0,t);const r=t/2,s=r;i.moveTo(t+r,s),i.lineTo(r,s+t),i.moveTo(t-r,-s),i.lineTo(-r,-s+t),i.stroke()}))}createGridPattern(t,e,n,i){return this.createCommonPattern(t,e,n,i,((t,i)=>{const r=e,s=r;i.fillStyle=n,i.fillRect(r,s,t,t),i.fillRect(r+t,s+t,t,t)}))}initTextureMap(t,e){this.textureMap=new Map}drawShape(t,e,n,i,r,s,a,o,l,u,h,c,d){this.textureMap||this.initTextureMap(e,t.stage);const{texture:f=l.texture,textureColor:p=l.textureColor,textureSize:g=l.textureSize,texturePadding:m=l.texturePadding}=t.attribute;f&&this.drawTexture(f,t,e,n,i,l,p,g,m)}drawTexture(t,e,n,i,r,s,a,o,l){let u=this.textureMap.get(t);if(!u)switch(t){case"circle":u=this.createCirclePattern(o,l,a,n);break;case"diamond":u=this.createDiamondPattern(o,l,a,n);break;case"rect":u=this.createRectPattern(o,l,a,n);break;case"vertical-line":u=this.createVerticalLinePattern(o,l,a,n);break;case"horizontal-line":u=this.createHorizontalLinePattern(o,l,a,n);break;case"bias-lr":u=this.createBiasLRLinePattern(o,l,a,n);break;case"bias-rl":u=this.createBiasRLLinePattern(o,l,a,n);break;case"grid":u=this.createGridPattern(o,l,a,n)}u&&(n.highPerformanceSave(),n.setCommonStyle(e,e.attribute,i,r,s),n.fillStyle=u,n.fill(),n.highPerformanceRestore())}},ms=Y/2;function bs(t,e,n,i,r,s,a){let o;if(i<0&&(e+=i,i=-i),r<0&&(n+=r,r=-r),A(s,!0))o=[s=Z(s),s,s,s];else if(Array.isArray(s)){const t=s;let e,n;switch(t.length){case 0:o=[0,0,0,0];break;case 1:e=Z(t[0]),o=[e,e,e,e];break;case 2:case 3:e=Z(t[0]),n=Z(t[1]),o=[e,n,e,n];break;default:o=t,o[0]=Z(o[0]),o[1]=Z(o[1]),o[2]=Z(o[2]),o[3]=Z(o[3])}}else o=[0,0,0,0];if(i<0||o[0]+o[1]+o[2]+o[3]<1e-12)return t.rect(e,n,i,r);const[l,u,h,c]=[[e,n],[e+i,n],[e+i,n+r],[e,n+r]],d=Math.min(i/2,r/2),f=[Math.min(d,o[0]),Math.min(d,o[1]),Math.min(d,o[2]),Math.min(d,o[3])],p=[l[0]+f[0],l[1]],g=[l[0],l[1]+f[0]],m=[u[0]-f[1],u[1]],b=[u[0],u[1]+f[1]],y=[h[0]-f[2],h[1]],v=[h[0],h[1]-f[2]],x=[c[0]+f[3],c[1]],_=[c[0],c[1]-f[3]];if(t.moveTo(p[0],p[1]),a&&a[0]?a[0](p[0],p[1],m[0],m[1]):t.lineTo(m[0],m[1]),!F(m,b)){a&&a[0]&&t.moveTo(m[0],m[1]);const e=m[0],n=m[1]+f[1];t.arc(e,n,f[1],-ms,0,!1)}if(a&&a[1]?a[1](b[0],b[1],v[0],v[1]):t.lineTo(v[0],v[1]),!F(y,v)){const e=v[0]-f[2],n=v[1];a&&a[1]&&t.moveTo(v[0],v[1]),t.arc(e,n,f[2],0,ms,!1)}if(a&&a[2]?a[2](y[0],y[1],x[0],x[1]):t.lineTo(x[0],x[1]),!F(x,_)){const e=x[0],n=x[1]-f[3];a&&a[2]&&t.moveTo(x[0],x[1]),t.arc(e,n,f[3],ms,Y,!1)}if(a&&a[3]?a[3](_[0],_[1],g[0],g[1]):t.lineTo(g[0],g[1]),!F(p,g)){const e=p[0],n=p[1]+f[0];a&&a[3]&&t.moveTo(g[0],g[1]),t.arc(e,n,f[0],Y,Y+ms,!1)}return!a&&t.closePath(),t}var ys=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a};class vs{constructor(){this.time=Xe.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,n,i,r,s,a,o,l,u,h,c){const{outerBorder:d,innerBorder:f}=t.attribute,p=d&&!1!==d.visible,g=f&&!1!==f.visible;if(!p&&!g)return;const{cornerRadius:m=l.cornerRadius,opacity:b=l.opacity,x:y=l.x,y:v=l.y,scaleX:_=l.scaleX,scaleY:A=l.scaleY,x1:S,y1:w}=t.attribute;let{width:T,height:B}=t.attribute;T=(null!=T?T:S-n)||0,B=(null!=B?B:w-i)||0;const C=(r,s)=>{const a=!(!r||!r.stroke),o="outerBorder"===s?-1:1,{distance:u=l[s].distance}=r,h=ls(e,u,e.dpr),d=n+o*h,f=i+o*h,p=2*h;if(0===m||x(m)&&m.every((t=>0===t))?(e.beginPath(),e.rect(d,f,T-o*p,B-o*p)):(e.beginPath(),bs(e,d,f,T-o*p,B-o*p,m)),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),c)c(e,r,l[s]);else if(a){const a=l[s].opacity;l[s].opacity=b,e.setStrokeStyle(t,r,(y-n)/_,(v-i)/A,l[s]),l[s].opacity=a,e.stroke()}};p&&C(d,"outerBorder"),g&&C(f,"innerBorder")}}let xs=class{constructor(){this.time=Xe.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,n,i,r,s,a,o,l,u,h,c,d){const{stroke:f=l.stroke}=t.attribute;Array.isArray(f)&&f.some((t=>!1===t))&&(d.doStroke=!1)}};xs=ys([Qt()],xs);let _s=class{constructor(){this.time=Xe.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,n,i,r,s,a,o,l,u,h,c){const{x1:d,y1:f,x:p=l.x,y:g=l.y,stroke:m=l.stroke,cornerRadius:b=l.cornerRadius}=t.attribute;let{width:y,height:v}=t.attribute;if(y=(null!=y?y:d-p)||0,v=(null!=v?v:f-g)||0,Array.isArray(m)&&m.some((t=>!1===t))){if(e.setStrokeStyle(t,t.attribute,n,i,l),!(0===b||x(b)&&b.every((t=>0===t)))){let r,s=0;return bs(e,n,i,y,v,b,new Array(4).fill(0).map(((a,o)=>(a,u,h,c)=>{m[o]&&(s===o-1&&m[o]===r||(e.setStrokeStyle(t,Object.assign(Object.assign({},t.attribute),{stroke:m[o]}),n,i,l),e.beginPath(),e.moveTo(a,u),r=m[o]),s=o,e.lineTo(h,c),e.stroke(),3===o&&e.beginPath())}))),void e.stroke()}if(e.beginPath(),e.moveTo(n,i),m[0]?e.lineTo(n+y,i):e.moveTo(n+y,i),m[1]?e.lineTo(n+y,i+v):e.moveTo(n+y,i+v),m[2]?e.lineTo(n,i+v):e.moveTo(n,i+v),m[3]){const t=m[0]?i-e.lineWidth/2:i;e.lineTo(n,t)}else e.moveTo(n,i);e.stroke()}}};_s=ys([Qt()],_s);const As=new vs,Ss=gs,ws=fs;const Ts=new class extends vs{constructor(){super(...arguments),this.time=Xe.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,n,i,r,s,a,o,l,u,h,c){return super.drawShape(t,e,n,i,r,s,a,o,l,u,h,c)}},Bs=new class extends ds{constructor(){super(...arguments),this.time=Xe.beforeFillStroke}drawShape(t,e,n,i,r,s,a,o,l,u,h,c){const{background:d,backgroundMode:f=l.backgroundMode,backgroundFit:p=l.backgroundFit}=t.attribute;if(d)if(t.backgroundImg){const n=t.resources.get(d);if("success"!==n.state||!n.data)return;if(e.save(),t.parent&&!t.transMatrix.onlyTranslate()){const n=xi(t.parent).group,{scrollX:i=n.scrollX,scrollY:r=n.scrollY}=t.parent.attribute;e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.translate(i,r)}const i=t.AABBBounds;this.doDrawImage(e,n.data,i,f,p),e.restore(),t.transMatrix.onlyTranslate()||e.setTransformForCurrent()}else if(m(d)){const{stroke:n,fill:i,lineWidth:r=1,cornerRadius:s=0,expandX:a=0,expandY:o=0}=d;if(!n&&!i)return;e.beginPath();const{x:l,y:u,width:h,height:c}=function(t){const e=Ui(t.attribute.boundsPadding),n=t.AABBBounds;let i=n.x1,r=n.y1,s=n.width(),a=n.height();return A(e)?(i+=e,r+=e,s-=2*e,a-=2*e):(i+=e[3],r+=e[0],s-=e[1]+e[3],a-=e[0]+e[2]),{x:i,y:r,width:s,height:a}}(t);s?bs(e,l-a,u-o,h+2*a,c+2*o,s):e.rect(l-a,u-o,h+2*a,c+2*o),e.globalAlpha=1,i&&(e.fillStyle=i,e.fill()),n&&r>0&&(e.lineWidth=r,e.strokeStyle=n,e.stroke())}else{e.beginPath();const r=t.AABBBounds;e.rect(n,i,r.width(),r.height()),e.fillStyle=d,e.globalAlpha=1,e.fill()}}};const Cs=new class{constructor(){this.time=Xe.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,n,i,r,s,a,o,l,u,h,c){const d=t.getParsedPath();if(!d)return;const{outerBorder:f,innerBorder:p}=t.attribute,g=f&&!1!==f.visible,m=p&&!1!==p.visible;if(!g&&!m)return;const{size:b=l.size,opacity:y=l.opacity,x:v=l.x,y:x=l.y,scaleX:_=l.scaleX,scaleY:A=l.scaleY}=t.attribute,S=(r,s)=>{const a=!(!r||!r.stroke),{distance:o=l[s].distance}=r,u=ls(e,o,e.dpr),h="outerBorder"===s?1:-1;if(e.beginPath(),!1===d.drawOffset(e,b,n,i,h*u)&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),c)c(e,r,l[s]);else if(a){const a=l[s].opacity;l[s].opacity=y,e.setStrokeStyle(t,r,(v-n)/_,(x-i)/A,l[s]),l[s].opacity=a,e.stroke()}};g&&S(f,"outerBorder"),m&&S(p,"innerBorder")}},ks=gs,Ms=fs;var Ps=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},Es=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Os=function(t,e){return function(n,i){e(n,i,t)}};let Ls=class extends os{constructor(t){super(),this.rectRenderContribitions=t,this.type="rect",this.numberType=kr,this.builtinContributions=[As,ws,Ss],this.init(t)}drawShape(t,e,n,i,r,s,a,o){var l;const u=null!==(l=this.tempTheme)&&void 0!==l?l:xi(t,null==s?void 0:s.theme).rect,{fill:h=u.fill,background:c,stroke:d=u.stroke,cornerRadius:f=u.cornerRadius,opacity:p=u.opacity,fillOpacity:g=u.fillOpacity,lineWidth:m=u.lineWidth,strokeOpacity:b=u.strokeOpacity,visible:y=u.visible,x1:v,y1:_,x:A=u.x,y:S=u.y}=t.attribute;let{width:w,height:T}=t.attribute;w=(null!=w?w:v-A)||0,T=(null!=T?T:_-S)||0;const B=function(t,e,n,i,r){return r&&t*e>0&&0!==n&&0!==i}(p,g,w,T,h),C=function(t,e,n,i){return t*e>0&&0!==n&&0!==i}(p,b,w,T),k=Dr(h,c),M=zr(d,m);if(!t.valid||!y)return;if(!k&&!M)return;if(!(B||C||a||o||c))return;0===f||x(f)&&f.every((t=>0===t))?(e.beginPath(),e.rect(n,i,w,T)):(e.beginPath(),bs(e,n,i,w,T,f));const P={doFill:k,doStroke:M};e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),this.beforeRenderStep(t,e,n,i,k,M,B,C,u,r,a,o,P),P.doFill&&(a?a(e,t.attribute,u):B&&(e.setCommonStyle(t,t.attribute,A-n,S-i,u),e.fill())),P.doStroke&&(o?o(e,t.attribute,u):C&&(e.setStrokeStyle(t,t.attribute,A-n,S-i,u),e.stroke())),this.afterRenderStep(t,e,n,i,k,M,B,C,u,r,a,o)}draw(t,e,n,i){const r=xi(t,null==i?void 0:i.theme).rect;this.tempTheme=r,this._draw(t,r,!1,n,i),this.tempTheme=null}};Ls=Ps([Qt(),Os(0,Kt(fe)),Os(0,Zt(Hr)),Es("design:paramtypes",[Object])],Ls);var Rs=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},Is=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ns=function(t,e){return function(n,i){e(n,i,t)}};let Us=class extends os{constructor(t){super(),this.symbolRenderContribitions=t,this.numberType=Pr,this.builtinContributions=[Cs,Ms,ks],this.init(t)}drawShape(t,e,n,i,r,s,a,o){var l;const u=xi(t,null==s?void 0:s.theme).symbol,{size:h=u.size,x:c=u.x,y:d=u.y,scaleX:f=u.scaleX,scaleY:p=u.scaleY}=t.attribute,g=this.valid(t,u,a,o);if(!g)return;const{fVisible:m,sVisible:b,doFill:y,doStroke:v}=g,_=t.getParsedPath();if(!_)return;const{keepDirIn3d:A=u.keepDirIn3d}=t.attribute,S=null!==(l=this.z)&&void 0!==l?l:0;e.beginPath();const w=(r,s)=>{var l,h,g;if(t._parsedPath.svgCache){const e=Object.assign({},s);e.fill=null!==(l=s.fill)&&void 0!==l?l:t.attribute.fill,e.opacity=null!==(h=s.opacity)&&void 0!==h?h:t.attribute.opacity,e.fillOpacity=t.attribute.fillOpacity,e.stroke=null!==(g=s.stroke)&&void 0!==g?g:t.attribute.stroke,s=e}s.fill&&(a?a(e,t.attribute,u):(e.setCommonStyle(t,s,c-n,d-i,u),e.fill())),s.stroke&&(o?o(e,t.attribute,u):(e.setStrokeStyle(t,s,(c-n)/f,(d-i)/p,u),e.stroke()))};if(A&&e.camera&&e.project){const t=e.project(n,i,S),r=e.camera;e.camera=null,!1===_.draw(e,x(h)?[h[0]*f,h[1]*p]:h*f,t.x,t.y,void 0,w)&&e.closePath(),e.camera=r}else!1===_.draw(e,h,n,i,S,w)&&e.closePath();e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),this.beforeRenderStep(t,e,n,i,y,v,m,b,u,r,a,o),y&&!_.isSvg&&(a?a(e,t.attribute,u):m&&(e.setCommonStyle(t,t.attribute,c-n,d-i,u),e.fill())),v&&!_.isSvg&&(o?o(e,t.attribute,u):b&&(e.setStrokeStyle(t,t.attribute,(c-n)/f,(d-i)/p,u),e.stroke())),this.afterRenderStep(t,e,n,i,y,v,m,b,u,r,a,o)}draw(t,e,n,i){const r=xi(t,null==i?void 0:i.theme).symbol;this._draw(t,r,!1,n,i)}};Us=Rs([Qt(),Ns(0,Kt(fe)),Ns(0,Zt($r)),Is("design:paramtypes",[Object])],Us);const Ds=new class{constructor(){this.pools=[];for(let t=0;t<10;t++)this.pools.push(new ct)}allocate(t,e,n,i){if(!this.pools.length)return(new ct).setValue(t,e,n,i);const r=this.pools.pop();return r.x1=t,r.y1=e,r.x2=n,r.y2=i,r}allocateByObj(t){if(!this.pools.length)return new ct(t);const e=this.pools.pop();return e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e}free(t){this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}};const zs=new class{constructor(){this.store=new Map}RegisterGraphicCreator(t,e){this.store.set(t,e),this[t]=e}CreateGraphic(t,e){const n=this.store.get(t);return n?n(e):null}};let Ws;function Fs(t){return Ws||(Ws=zs.CreateGraphic("text",{})),Ws.initAttributes(t),Ws.AABBBounds}const js=new class extends ds{constructor(){super(...arguments),this.time=Xe.beforeFillStroke}drawShape(t,e,n,i,r,s,a,o,l,u,h,c){var d,f,p,g,b,y,v,x,_,A;const{backgroundMode:S=l.backgroundMode,backgroundFit:w=l.backgroundFit}=t.attribute;let T,{background:B}=t.attribute;if(!B)return;const C=()=>{"richtext"===t.type&&(e.restore(),e.save(),T&&e.setTransformFromMatrix(T,!0,1))};let k;"richtext"===t.type&&(T=e.currentMatrix.clone(),e.restore(),e.save(),e.setTransformForCurrent());const M=m(B)&&B.background,P=t.transMatrix.onlyTranslate();if(M){const e=t.AABBBounds,n=(null!==(d=B.x)&&void 0!==d?d:e.x1)+(null!==(f=B.dx)&&void 0!==f?f:0),i=(null!==(p=B.y)&&void 0!==p?p:e.y1)+(null!==(g=B.dy)&&void 0!==g?g:0),r=null!==(b=B.width)&&void 0!==b?b:e.width(),s=null!==(y=B.height)&&void 0!==y?y:e.height();if(k=Ds.allocate(n,i,n+r,i+s),B=B.background,!P){const t=k.width(),e=k.height();k.set((null!==(v=B.x)&&void 0!==v?v:0)+(null!==(x=B.dx)&&void 0!==x?x:0),(null!==(_=B.y)&&void 0!==_?_:0)+(null!==(A=B.dy)&&void 0!==A?A:0),t,e)}}else k=t.AABBBounds,P||(k=Fs(Object.assign(Object.assign({},t.attribute),{angle:0,scaleX:1,scaleY:1,x:0,y:0,dx:0,dy:0})).clone());if(t.backgroundImg&&t.resources){const r=t.resources.get(B);if("success"!==r.state||!r.data)return void C();e.highPerformanceSave(),P&&e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.setCommonStyle(t,t.attribute,n,i,l),this.doDrawImage(e,r.data,k,S,w),e.highPerformanceRestore(),e.setTransformForCurrent()}else{const{backgroundCornerRadius:r}=t.attribute;e.highPerformanceSave(),e.setCommonStyle(t,t.attribute,n,i,l),e.fillStyle=B,r?(bs(e,k.x1,k.y1,k.width(),k.height(),r),e.fill()):e.fillRect(k.x1,k.y1,k.width(),k.height()),e.highPerformanceRestore()}M&&Ds.free(k),C()}};var Hs=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},$s=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Gs=function(t,e){return function(n,i){e(n,i,t)}};let Vs=class extends os{constructor(t){super(),this.textRenderContribitions=t,this.numberType=Er,this.builtinContributions=[js],this.init(t)}drawShape(t,e,n,i,r,s,a,o){var l,u,h;const c=xi(t,null==s?void 0:s.theme).text,{text:d,underline:f=c.underline,lineThrough:p=c.lineThrough,keepDirIn3d:g=c.keepDirIn3d,direction:m=c.direction,fontSize:b=c.fontSize,verticalMode:y=c.verticalMode,x:v=c.x,y:x=c.y}=t.attribute;let{textAlign:_=c.textAlign,textBaseline:A=c.textBaseline}=t.attribute;if(!y&&"vertical"===m){const e=_;_=null!==(l=t.getBaselineMapAlign()[A])&&void 0!==l?l:"left",A=null!==(u=t.getAlignMapBaseline()[e])&&void 0!==u?u:"top"}const S=null!==(h=Fi(t.attribute.lineHeight,b))&&void 0!==h?h:b,w=this.valid(t,c,a,o);if(!w)return;const{fVisible:T,sVisible:B,doFill:C,doStroke:k}=w,M=!g,P=this.z||0;e.beginPath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,c),this.beforeRenderStep(t,e,n,i,C,k,T,B,c,r,a,o),M&&this.transformUseContext2d(t,c,P,e);const E=(r,s,l,u)=>{let h=n+s;const d=i+l;if(u){e.highPerformanceSave(),h+=b;const t=Jr.allocate(1,0,0,1,0,0);t.rotateByCenter(Math.PI/2,h,d),e.transformFromMatrix(t,!0),Jr.free(t)}k&&(o?o(e,t.attribute,c):B&&(e.setStrokeStyle(t,t.attribute,v-n,x-i,c),e.strokeText(r,h,d,P))),C&&(a?a(e,t.attribute,c):T&&(e.setCommonStyle(t,t.attribute,v-n,x-i,c),e.fillText(r,h,d,P),this.drawUnderLine(f,p,t,h,d,P,c,e))),u&&(e.highPerformanceRestore(),e.setTransformForCurrent())};if(t.isMultiLine)if(e.setTextStyleWithoutAlignBaseline(t.attribute,c,P),"horizontal"===m){const{multilineLayout:r}=t;if(!r)return void e.highPerformanceRestore();const{xOffset:s,yOffset:l}=r.bbox;k&&(o?o(e,t.attribute,c):B&&(e.setStrokeStyle(t,t.attribute,v-n,x-i,c),r.lines.forEach((t=>{e.strokeText(t.str,(t.leftOffset||0)+s+n,(t.topOffset||0)+l+i,P)})))),C&&(a?a(e,t.attribute,c):T&&(e.setCommonStyle(t,t.attribute,v-n,x-i,c),r.lines.forEach((r=>{var a,o;e.fillText(r.str,(r.leftOffset||0)+s+n,(r.topOffset||0)+l+i,P),this.drawUnderLine(f,p,t,(r.leftOffset||0)+s+n,(r.topOffset||0)+l+i-(o=b,"top"===(a="bottom")?Math.ceil(.79*o):"middle"===a?Math.round(.3*o):"bottom"===a?Math.round(-.21*o):0)-.05*b,P,c,e,{width:r.width})}))))}else{t.tryUpdateAABBBounds();const n=t.cache,{verticalList:i}=n;e.textAlign="left",e.textBaseline="top";const r=S*i.length;let s=0;i.forEach((t=>{const e=t.reduce(((t,e)=>t+(e.width||0)),0);s=et(e,s)}));let a=0,o=0;"bottom"===A?o=-r:"middle"===A&&(o=-r/2),"center"===_?a-=s/2:"right"===_&&(a-=s),i.forEach(((t,e)=>{const n=t.reduce(((t,e)=>t+(e.width||0)),0),i=s-n;let l=a;"center"===_?l+=i/2:"right"===_&&(l+=i),t.forEach((t=>{const{text:n,width:i,direction:s}=t;E(n,r-(e+1)*S+o,l,s),l+=i}))}))}else if("horizontal"===m){e.setTextStyle(t.attribute,c,P);const n=t.clipedText;let i=0;S!==b&&("top"===A?i=(S-b)/2:"middle"===A||"bottom"===A&&(i=-(S-b)/2)),E(n,0,i,0)}else{t.tryUpdateAABBBounds();const n=t.cache;if(n){e.setTextStyleWithoutAlignBaseline(t.attribute,c,P);const{verticalList:i}=n;let r=0;const s=i[0].reduce(((t,e)=>t+(e.width||0)),0);let a=0;"bottom"===A?a=-S:"middle"===A&&(a=-S/2),"center"===_?r-=s/2:"right"===_&&(r-=s),e.textAlign="left",e.textBaseline="top",i[0].forEach((t=>{const{text:e,width:n,direction:i}=t;E(e,a,r,i),r+=n}))}}M&&this.restoreTransformUseContext2d(t,c,P,e),this.afterRenderStep(t,e,n,i,C,k,T,B,c,r,a,o)}draw(t,e,n,i){const r=xi(t,null==i?void 0:i.theme).text,{keepDirIn3d:s=r.keepDirIn3d}=t.attribute,a=!s;this._draw(t,r,a,n,i)}drawUnderLine(t,e,n,i,r,s,a,o,l){if(e+t<=0)return;const{textAlign:u=a.textAlign,textBaseline:h=a.textBaseline,fontSize:c=a.fontSize,fill:d=a.fill,opacity:f=a.opacity,underlineOffset:g=a.underlineOffset,underlineDash:m=a.underlineDash,fillOpacity:b=a.fillOpacity}=n.attribute,y=!p(l),v=y?l.width:n.clipedWidth,x=y?0:Xr(u,v),_=Yr(y?"alphabetic":h,c,c),A={lineWidth:0,stroke:d,opacity:f,strokeOpacity:b};let S=y?-3:0;if(t){A.lineWidth=t,o.setStrokeStyle(n,A,i,r,a),m&&o.setLineDash(m),o.beginPath();const e=r+_+c+g+S;o.moveTo(i+x,e,s),o.lineTo(i+x+v,e,s),o.stroke()}if(y&&(S=-1),e){A.lineWidth=e,o.setStrokeStyle(n,A,i,r,a),o.beginPath();const t=r+_+c/2+S;o.moveTo(i+x,t,s),o.lineTo(i+x+v,t,s),o.stroke()}}};Vs=Hs([Qt(),Gs(0,Kt(fe)),Gs(0,Zt(Gr)),$s("design:paramtypes",[Object])],Vs);var Xs=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},Ys=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ks=function(t,e){return function(n,i){e(n,i,t)}};const qs=["","repeat-x","repeat-y","repeat"];let Qs=class extends os{constructor(t){super(),this.imageRenderContribitions=t,this.numberType=Cr,this.builtinContributions=[Ts,Bs],this.init(t)}drawShape(t,e,n,i,r,s,a,o){const l=xi(t).image,{width:u=l.width,height:h=l.height,repeatX:c=l.repeatX,repeatY:d=l.repeatY,x:f=l.x,y:p=l.y,cornerRadius:g=l.cornerRadius,image:m}=t.attribute,b=this.valid(t,l,a);if(!b)return;const{fVisible:y,sVisible:v,doFill:_,doStroke:A}=b;if(e.setShadowBlendStyle&&e.setShadowBlendStyle(t,l),this.beforeRenderStep(t,e,n,i,_,!1,y,!1,l,r,a),_)if(a)a(e,t.attribute,l);else if(y){if(!m||!t.resources)return;const r=t.resources.get(m);if("success"!==r.state)return;let s=!1;0===g||x(g)&&g.every((t=>0===t))||(e.beginPath(),bs(e,n,i,u,h,g),e.save(),e.clip(),s=!0),e.setCommonStyle(t,t.attribute,n,i,l);let a=0;if("repeat"===c&&(a|=1),"repeat"===d&&(a|=2),a){const t=e.createPattern(r.data,qs[a]);e.fillStyle=t,e.translate(n,i,!0),e.fillRect(0,0,u,h),e.translate(-n,-i,!0)}else e.drawImage(r.data,n,i,u,h);s&&e.restore()}A&&(o?o(e,t.attribute,l):v&&(e.setStrokeStyle(t,t.attribute,f-n,p-i,l),e.stroke())),this.afterRenderStep(t,e,n,i,_,!1,y,!1,l,r,a)}draw(t,e,n){const{image:i}=t.attribute;if(!i||!t.resources)return;const r=t.resources.get(i);if("loading"===r.state&&v(i))return void qi.improveImageLoading(i);if("success"!==r.state)return;const{context:s}=e.drawParams;if(!s)return;const a=xi(t).image;this._draw(t,a,!1,n)}};Qs=Xs([Qt(),Ks(0,Kt(fe)),Ks(0,Zt(jr)),Ys("design:paramtypes",[Object])],Qs);const Zs=Symbol.for("GraphicRender"),Js=Symbol.for("RectRender"),ta=Symbol.for("SymbolRender"),ea=Symbol.for("TextRender"),na=Symbol.for("RichTextRender"),ia=Symbol.for("ImageRender"),ra=(t,e,n)=>{const{outerBorder:i,shadowBlur:r=e.shadowBlur}=t;if(i){const t=e.outerBorder,{distance:s=t.distance,lineWidth:a=t.lineWidth}=i;n.expand(s+(r+a)/2)}return n};class sa{constructor(t,e,n){this.fontFamily=t,this.textOptions=e,this.textMeasure=n}LayoutBBox(t,e,n){if("left"===e||"start"===e)t.xOffset=0;else if("center"===e)t.xOffset=t.width/-2;else{if("right"!==e&&"end"!==e)throw new Error("非法的textAlign");t.xOffset=-t.width}return t.yOffset="top"===n?0:"middle"===n?t.height/-2:"alphabetic"===n?-.79*t.height:-t.height,t}GetLayout(t,e,n,i,r,s,a,o,l){const u=[],h=[e,n],c=[0,0];for(;t.length>0;){const{str:n}=this.textMeasure.clipTextWithSuffix(t,this.textOptions,e,a,o,l);u.push({str:n,width:this.textMeasure.measureTextWidth(n,this.textOptions)}),t=t.substring(n.length)}"left"===i||"start"===i||("center"===i?c[0]=h[0]/-2:"right"!==i&&"end"!==i||(c[0]=-h[0])),"top"===r||("middle"===r?c[1]=h[1]/-2:"bottom"===r&&(c[1]=-h[1]));const d={xOffset:c[0],yOffset:c[1],width:h[0],height:h[1]};return this.layoutWithBBox(d,u,i,r,s)}GetLayoutByLines(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"end";t=t.map((t=>t.toString()));const l=[],u=[0,0];if("number"==typeof a&&a!==1/0){let e;for(let n=0,i=t.length;n<i;n++)e=Math.min(this.textMeasure.measureTextWidth(t[n],this.textOptions),a),l.push({str:this.textMeasure.clipTextWithSuffix(t[n],this.textOptions,e,r,s,o).str,width:e});u[0]=a}else{let e,n;a=0;for(let i=0,r=t.length;i<r;i++)n=t[i],e=this.textMeasure.measureTextWidth(n,this.textOptions),a=Math.max(a,e),l.push({str:n,width:e});u[0]=a}u[1]=l.length*i,u[0]=l.reduce(((t,e)=>Math.max(t,e.width)),0);const h={xOffset:0,yOffset:0,width:u[0],height:u[1]};return this.LayoutBBox(h,e,n),this.layoutWithBBox(h,l,e,n,i)}layoutWithBBox(t,e,n,i,r){const s=[0,0],a=e.length*r;"top"===i||("middle"===i?s[1]=(t.height-a)/2:"bottom"===i&&(s[1]=t.height-a));for(let a=0;a<e.length;a++)this.lineOffset(t,e[a],n,i,r,s);return{bbox:t,lines:e,fontFamily:this.fontFamily,fontSize:this.textOptions.fontSize,fontWeight:this.textOptions.fontWeight,lineHeight:r,textAlign:n,textBaseline:i}}lineOffset(t,e,n,i,r,s){return"left"===n||"start"===n?e.leftOffset=0:"center"===n?e.leftOffset=(t.width-e.width)/2:"right"!==n&&"end"!==n||(e.leftOffset=t.width-e.width),e.topOffset=(r-this.textOptions.fontSize)/2+.79*this.textOptions.fontSize+s[1],s[1]+=r,e}}const aa=["text","maxLineWidth","textAlign","textBaseline","heightLimit","lineClamp","fontSize","fontFamily","fontWeight","ellipsis","lineHeight","direction","wordBreak","heightLimit","lineClamp",...tr];let oa=class t extends ar{get font(){const t=this.getGraphicTheme();return this._font||(this._font=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;n||(n=1);const{fontStyle:i=e.fontStyle,fontVariant:r=e.fontVariant,fontWeight:s=e.fontWeight,fontSize:a=e.fontSize,fontFamily:o=e.fontFamily}=t;return(i?i+" ":"")+(r?r+" ":"")+(s?s+" ":"")+a*n+"px "+(o||"sans-serif")}(this.attribute,t)),this._font}get clipedText(){var t;const e=this.attribute,n=this.getGraphicTheme();if(!this.isSimplify())return;const{maxLineWidth:i=n.maxLineWidth}=e;return Number.isFinite(i)?(this.tryUpdateAABBBounds(),this.cache.clipedText):(null!==(t=e.text)&&void 0!==t?t:n.text).toString()}get clipedWidth(){if(this.isSimplify())return this.tryUpdateAABBBounds(),this.cache.clipedWidth}get cliped(){const t=this.getGraphicTheme(),e=this.attribute;if(this.isMultiLine)return;const{maxLineWidth:n=t.maxLineWidth}=e;return!!Number.isFinite(n)&&(this.tryUpdateAABBBounds(),"vertical"===e.direction&&this.cache.verticalList&&this.cache.verticalList[0]?this.cache.verticalList[0].map((t=>t.text)).join("")!==e.text.toString():null!=this.clipedText&&this.clipedText!==e.text.toString())}get multilineLayout(){if(this.isMultiLine)return this.tryUpdateAABBBounds(),this.cache.layoutData}isSimplify(){return!this.isMultiLine&&"vertical"!==this.attribute.direction}get isMultiLine(){return Array.isArray(this.attribute.text)||"normal"===this.attribute.whiteSpace}constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{text:"",fontSize:16}),this.type="text",this.numberType=Er,this.cache={}}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{text:t}=this.attribute;return x(t)?!t.every((t=>null==t||""===t)):null!=t&&""!==t}getGraphicTheme(){return xi(this).text}updateAABBBounds(t,e,n){if(!ti.graphicService.validCheck(t,e,n,this))return n;const{text:i=e.text}=this.attribute;Array.isArray(i)?this.updateMultilineAABBBounds(i):this.updateSingallineAABBBounds(i);const{tb1:r}=ti.graphicService.updateTempAABBBounds(n),{scaleX:s=e.scaleX,scaleY:a=e.scaleY,shadowBlur:o=e.shadowBlur,strokeBoundsBuffer:l=e.strokeBoundsBuffer}=t;if(o){br(r,o/Math.abs(s+a),!0,l),n.union(r)}return ti.graphicService.combindShadowAABBBounds(n,this),null==t.forceBoundsHeight&&null==t.forceBoundsWidth||ti.graphicService.updateHTMLTextAABBBounds(t,e,n),ut(n,n,this.transMatrix),n}updateWrapAABBBounds(t){var e,n,i,r;const s=this.getGraphicTheme(),{fontFamily:a=s.fontFamily,textAlign:o=s.textAlign,textBaseline:l=s.textBaseline,fontSize:u=s.fontSize,ellipsis:h=s.ellipsis,maxLineWidth:c,stroke:d=s.stroke,lineWidth:f=s.lineWidth,wordBreak:p=s.wordBreak,fontWeight:g=s.fontWeight,ignoreBuf:m=s.ignoreBuf,suffixPosition:b=s.suffixPosition,heightLimit:y=0,lineClamp:v}=this.attribute,_=null!==(e=Fi(this.attribute.lineHeight,this.attribute.fontSize||s.fontSize))&&void 0!==e?e:this.attribute.fontSize||s.fontSize,A=m?0:2;if(!this.shouldUpdateShape()&&(null===(n=this.cache)||void 0===n?void 0:n.layoutData)){const t=this.cache.layoutData.bbox;return this._AABBBounds.set(t.xOffset,t.yOffset,t.xOffset+t.width,t.yOffset+t.height),d&&this._AABBBounds.expand(f/2),this._AABBBounds}const S=ti.graphicUtil.textMeasure,w=new sa(a,{fontSize:u,fontWeight:g,fontFamily:a},S),T=x(t)?t.map((t=>t.toString())):[t.toString()],B=[],C=[0,0];let k=1/0;if(y>0&&(k=Math.max(Math.floor(y/_),1)),v&&(k=Math.min(k,v)),"number"==typeof c&&c!==1/0){if(c>0)for(let t=0;t<T.length;t++){const e=T[t];let n=!0;if(t===k-1){const n=w.textMeasure.clipTextWithSuffix(e,w.textOptions,c,h,!1,b,t!==T.length-1);B.push({str:n.str,width:n.width});break}const s=w.textMeasure.clipText(e,w.textOptions,c,"break-word"===p);if(""!==e&&""===s.str){if(h){const t=w.textMeasure.clipTextWithSuffix(e,w.textOptions,c,h,!1,b);s.str=null!==(i=t.str)&&void 0!==i?i:"",s.width=null!==(r=t.width)&&void 0!==r?r:0}else s.str="",s.width=0;n=!1}if(B.push({str:s.str,width:s.width}),s.str.length===e.length);else if(n){const n=e.substring(s.str.length);T.splice(t+1,0,n)}}let t=0;B.forEach((e=>{t=Math.max(t,e.width)})),C[0]=t}else{let t,e,n=0;for(let i=0,r=T.length;i<r;i++){if(i===k-1){const t=w.textMeasure.clipTextWithSuffix(T[i],w.textOptions,c,h,!1,b);B.push({str:t.str,width:t.width}),n=Math.max(n,t.width);break}e=T[i],t=w.textMeasure.measureTextWidth(e,w.textOptions,"break-word"===p),n=Math.max(n,t),B.push({str:e,width:t})}C[0]=n}C[1]=B.length*(_+A);const M={xOffset:0,yOffset:0,width:C[0],height:C[1]};w.LayoutBBox(M,o,l);const P=w.layoutWithBBox(M,B,o,l,_);return this.cache.layoutData=P,this.clearUpdateShapeTag(),this._AABBBounds.set(M.xOffset,M.yOffset,M.xOffset+M.width,M.yOffset+M.height),d&&this._AABBBounds.expand(f/2),this._AABBBounds}updateSingallineAABBBounds(t){const e=this.getGraphicTheme(),{direction:n=e.direction,underlineOffset:i=e.underlineOffset}=this.attribute,r="horizontal"===n?this.updateHorizontalSinglelineAABBBounds(t):this.updateVerticalSinglelineAABBBounds(t);return"horizontal"===n&&i&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+i),r}updateMultilineAABBBounds(t){const e=this.getGraphicTheme(),{direction:n=e.direction,underlineOffset:i=e.underlineOffset}=this.attribute,r="horizontal"===n?this.updateHorizontalMultilineAABBBounds(t):this.updateVerticalMultilineAABBBounds(t);return"horizontal"===n&&i&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+i),r}updateHorizontalSinglelineAABBBounds(t){var e,n;const i=this.getGraphicTheme(),{wrap:r=i.wrap}=this.attribute;if(r)return this.updateWrapAABBBounds([t]);const s=ti.graphicUtil.textMeasure;let a,o;const l=this.attribute,{maxLineWidth:u=i.maxLineWidth,ellipsis:h=i.ellipsis,textAlign:c=i.textAlign,textBaseline:d=i.textBaseline,fontFamily:f=i.fontFamily,fontSize:p=i.fontSize,fontWeight:g=i.fontWeight,stroke:m=i.stroke,lineWidth:b=i.lineWidth,ignoreBuf:y=i.ignoreBuf,whiteSpace:v=i.whiteSpace,suffixPosition:x=i.suffixPosition}=l;if("normal"===v)return this.updateWrapAABBBounds(t);const _=y?0:Math.max(2,.075*p),A=l.fontSize||i.fontSize,S=null!==(e=Fi(l.lineHeight,A))&&void 0!==e?e:A+_;if(!this.shouldUpdateShape()&&this.cache){a=null!==(n=this.cache.clipedWidth)&&void 0!==n?n:0;const t=Xr(c,a),e=Yr(d,S,p);return this._AABBBounds.set(t,e,t+a,e+S),m&&this._AABBBounds.expand(b/2),this._AABBBounds}if(Number.isFinite(u)){if(h){const e=!0===h?i.ellipsis:h,n=s.clipTextWithSuffix(t.toString(),{fontSize:p,fontWeight:g,fontFamily:f},u,e,!1,x);o=n.str,a=n.width}else{const e=s.clipText(t.toString(),{fontSize:p,fontWeight:g,fontFamily:f},u,!1);o=e.str,a=e.width}this.cache.clipedText=o,this.cache.clipedWidth=a}else a=s.measureTextWidth(t.toString(),{fontSize:p,fontWeight:g,fontFamily:f}),this.cache.clipedText=t.toString(),this.cache.clipedWidth=a;this.clearUpdateShapeTag();const w=Xr(c,a);let T=S;ti.global&&ti.global.isSafari()&&(T+=.2*p);const B=Yr(d,T,p,_);return this._AABBBounds.set(w,B,w+a,B+T),m&&this._AABBBounds.expand(b/2),this._AABBBounds}getBaselineMapAlign(){return t.baselineMapAlign}getAlignMapBaseline(){return t.alignMapBaseline}updateVerticalSinglelineAABBBounds(e){var n,i,r;const s=this.getGraphicTheme(),a=ti.graphicUtil.textMeasure;let o;const l=this.attribute,{ignoreBuf:u=s.ignoreBuf}=l,h=u?0:2,{maxLineWidth:c=s.maxLineWidth,ellipsis:d=s.ellipsis,fontSize:f=s.fontSize,fontWeight:p=s.fontWeight,fontFamily:g=s.fontFamily,stroke:m=s.stroke,lineWidth:b=s.lineWidth,verticalMode:y=s.verticalMode,suffixPosition:v=s.suffixPosition}=l,x=null!==(n=Fi(l.lineHeight,l.fontSize||s.fontSize))&&void 0!==n?n:(l.fontSize||s.fontSize)+h;let{textAlign:_=s.textAlign,textBaseline:A=s.textBaseline}=l;if(!y){const e=_;_=null!==(i=t.baselineMapAlign[A])&&void 0!==i?i:"left",A=null!==(r=t.alignMapBaseline[e])&&void 0!==r?r:"top"}if(!this.shouldUpdateShape()&&this.cache){o=this.cache.clipedWidth;const t=Xr(_,o),e=Yr(A,x,f);return this._AABBBounds.set(e,t,e+x,t+o),m&&this._AABBBounds.expand(b/2),this._AABBBounds}let S=[_r(e.toString())];if(Number.isFinite(c)){if(d){const t=!0===d?s.ellipsis:d,e=a.clipTextWithSuffixVertical(S[0],{fontSize:f,fontWeight:p,fontFamily:g},c,t,!1,v);S=[e.verticalList],o=e.width}else{const t=a.clipTextVertical(S[0],{fontSize:f,fontWeight:p,fontFamily:g},c,!1);S=[t.verticalList],o=t.width}this.cache.verticalList=S,this.cache.clipedWidth=o}else o=0,S[0].forEach((t=>{const e=t.direction===xr.HORIZONTAL?f:a.measureTextWidth(t.text,{fontSize:f,fontWeight:p,fontFamily:g});o+=e,t.width=e})),this.cache.verticalList=S,this.cache.clipedWidth=o;this.clearUpdateShapeTag();const w=Xr(_,o),T=Yr(A,x,f);return this._AABBBounds.set(T,w,T+x,w+o),m&&this._AABBBounds.expand(b/2),this._AABBBounds}updateHorizontalMultilineAABBBounds(t){var e,n;const i=this.getGraphicTheme(),{wrap:r=i.wrap}=this.attribute;if(r)return this.updateWrapAABBBounds(t);const s=this.attribute,{fontFamily:a=i.fontFamily,textAlign:o=i.textAlign,textBaseline:l=i.textBaseline,fontSize:u=i.fontSize,fontWeight:h=i.fontWeight,ellipsis:c=i.ellipsis,maxLineWidth:d,stroke:f=i.stroke,lineWidth:p=i.lineWidth,whiteSpace:g=i.whiteSpace,suffixPosition:m=i.suffixPosition}=s,b=null!==(e=Fi(s.lineHeight,s.fontSize||i.fontSize))&&void 0!==e?e:s.fontSize||i.fontSize;if("normal"===g)return this.updateWrapAABBBounds(t);if(!this.shouldUpdateShape()&&(null===(n=this.cache)||void 0===n?void 0:n.layoutData)){const t=this.cache.layoutData.bbox;return this._AABBBounds.set(t.xOffset,t.yOffset,t.xOffset+t.width,t.yOffset+t.height),f&&this._AABBBounds.expand(p/2),this._AABBBounds}const y=ti.graphicUtil.textMeasure,v=new sa(a,{fontSize:u,fontWeight:h,fontFamily:a},y).GetLayoutByLines(t,o,l,b,!0===c?i.ellipsis:c||void 0,!1,d,m),{bbox:x}=v;return this.cache.layoutData=v,this.clearUpdateShapeTag(),this._AABBBounds.set(x.xOffset,x.yOffset,x.xOffset+x.width,x.yOffset+x.height),f&&this._AABBBounds.expand(p/2),this._AABBBounds}updateVerticalMultilineAABBBounds(e){var n,i,r;const s=this.getGraphicTheme(),a=ti.graphicUtil.textMeasure;let o;const l=this.attribute,{ignoreBuf:u=s.ignoreBuf}=l,h=u?0:2,{maxLineWidth:c=s.maxLineWidth,ellipsis:d=s.ellipsis,fontFamily:f=s.fontFamily,fontSize:p=s.fontSize,fontWeight:g=s.fontWeight,stroke:m=s.stroke,lineWidth:b=s.lineWidth,verticalMode:y=s.verticalMode,suffixPosition:v=s.suffixPosition}=l,x=null!==(n=Fi(l.lineHeight,l.fontSize||s.fontSize))&&void 0!==n?n:(l.fontSize||s.fontSize)+h;let{textAlign:_=s.textAlign,textBaseline:A=s.textBaseline}=l;if(!y){const e=_;_=null!==(i=t.baselineMapAlign[A])&&void 0!==i?i:"left",A=null!==(r=t.alignMapBaseline[e])&&void 0!==r?r:"top"}if(o=0,!this.shouldUpdateShape()&&this.cache){this.cache.verticalList.forEach((t=>{const e=t.reduce(((t,e)=>t+e.width),0);o=et(e,o)}));const t=Xr(_,o),e=this.cache.verticalList.length*x,n=Yr(A,e,p);return this._AABBBounds.set(n,t,n+e,t+o),m&&this._AABBBounds.expand(b/2),this._AABBBounds}const S=e.map((t=>_r(t.toString())));S.forEach(((t,e)=>{if(Number.isFinite(c))if(d){const n=!0===d?s.ellipsis:d,i=a.clipTextWithSuffixVertical(t,{fontSize:p,fontWeight:g,fontFamily:f},c,n,!1,v);S[e]=i.verticalList,o=i.width}else{const n=a.clipTextVertical(t,{fontSize:p,fontWeight:g,fontFamily:f},c,!1);S[e]=n.verticalList,o=n.width}else o=0,t.forEach((t=>{const e=t.direction===xr.HORIZONTAL?p:a.measureTextWidth(t.text,{fontSize:p,fontWeight:g,fontFamily:f});o+=e,t.width=e}))})),this.cache.verticalList=S,this.clearUpdateShapeTag(),this.cache.verticalList.forEach((t=>{const e=t.reduce(((t,e)=>t+e.width),0);o=et(e,o)}));const w=Xr(_,o),T=this.cache.verticalList.length*x,B=Yr(A,T,p);return this._AABBBounds.set(B,w,B+T,w+o),m&&this._AABBBounds.expand(b/2),this._AABBBounds}needUpdateTags(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aa;return super.needUpdateTags(t,e)}needUpdateTag(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aa;return super.needUpdateTag(t,e)}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function la(t){return new oa(t)}oa.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,direction:1,textAlign:1,textBaseline:1,fontFamily:1,fontWeight:1},sr),oa.baselineMapAlign={top:"left",bottom:"right",middle:"center"},oa.alignMapBaseline={left:"top",right:"bottom",center:"middle"};const ua=["heightLimit","lineClamp"];class ha extends oa{constructor(t){super(Object.assign(Object.assign({},t),{wrap:!0}))}_isValid(){const{text:t}=this.attribute;return x(t)?!t.every((t=>null==t||""===t)):null!=t&&""!==t}updateMultilineAABBBounds(t){var e,n,i,r;const s=this.getGraphicTheme(),{fontFamily:a=s.fontFamily,textAlign:o=s.textAlign,textBaseline:l=s.textBaseline,fontSize:u=s.fontSize,ellipsis:h=s.ellipsis,maxLineWidth:c,stroke:d=s.stroke,lineWidth:f=s.lineWidth,wordBreak:p=s.wordBreak,fontWeight:g=s.fontWeight,ignoreBuf:m=s.ignoreBuf,heightLimit:b=0,suffixPosition:y=s.suffixPosition,lineClamp:v}=this.attribute,x=null!==(e=Fi(this.attribute.lineHeight,this.attribute.fontSize||s.fontSize))&&void 0!==e?e:this.attribute.fontSize||s.fontSize,_=m?0:2;if(!this.shouldUpdateShape()&&(null===(n=this.cache)||void 0===n?void 0:n.layoutData)){const t=this.cache.layoutData.bbox;return this._AABBBounds.set(t.xOffset,t.yOffset,t.xOffset+t.width,t.yOffset+t.height),d&&this._AABBBounds.expand(f/2),this._AABBBounds}const A=ti.graphicUtil.textMeasure,S=new sa(a,{fontSize:u,fontWeight:g,fontFamily:a},A),w=t.map((t=>t.toString())),T=[],B=[0,0];let C=1/0;if(b>0&&(C=Math.max(Math.floor(b/x),1)),v&&(C=Math.min(C,v)),"number"==typeof c&&c!==1/0){if(c>0)for(let t=0;t<w.length;t++){const e=w[t];let n=!0;if(t===C-1){const t=S.textMeasure.clipTextWithSuffix(e,S.textOptions,c,h,!1,y);T.push({str:t.str,width:t.width});break}const s=S.textMeasure.clipText(e,S.textOptions,c,"break-word"===p);if(""!==e&&""===s.str){if(h){const t=S.textMeasure.clipTextWithSuffix(e,S.textOptions,c,h,!1,y);s.str=null!==(i=t.str)&&void 0!==i?i:"",s.width=null!==(r=t.width)&&void 0!==r?r:0}else s.str="",s.width=0;n=!1}if(T.push({str:s.str,width:s.width}),s.str.length===e.length);else if(n){const n=e.substring(s.str.length);w.splice(t+1,0,n)}}let t=0;T.forEach((e=>{t=Math.max(t,e.width)})),B[0]=t}else{let t,e,n=0;for(let i=0,r=w.length;i<r;i++){if(i===C-1){const t=S.textMeasure.clipTextWithSuffix(w[i],S.textOptions,c,h,!1,y);T.push({str:t.str,width:t.width}),n=Math.max(n,t.width);break}e=w[i],t=S.textMeasure.measureTextWidth(e,S.textOptions,"break-word"===p),n=Math.max(n,t),T.push({str:e,width:t})}B[0]=n}B[1]=T.length*(x+_);const k={xOffset:0,yOffset:0,width:B[0],height:B[1]};S.LayoutBBox(k,o,l);const M=S.layoutWithBBox(k,T,o,l,x);return this.cache.layoutData=M,this.clearUpdateShapeTag(),this._AABBBounds.set(k.xOffset,k.yOffset,k.xOffset+k.width,k.yOffset+k.height),d&&this._AABBBounds.expand(f/2),this._AABBBounds}needUpdateTags(t){for(let e=0;e<ua.length;e++){const n=ua[e];if(-1!==t.indexOf(n))return!0}return super.needUpdateTags(t)}needUpdateTag(t){for(let e=0;e<ua.length;e++)if(t===ua[e])return!0;return super.needUpdateTag(t)}getNoWorkAnimateAttr(){return ha.NOWORK_ANIMATE_ATTR}}function ca(t){return new ha(t)}class da{bounds(t,e){if(A(t)){const n=t/2;e.x1=-n,e.x2=n,e.y1=-n,e.y2=n}else e.x1=-t[0]/2,e.x2=t[0]/2,e.y1=-t[1]/2,e.y2=t[1]/2}}function fa(t,e,n,i,r){return r?t.arc(n,i,e,0,q,!1,r):t.arc(n,i,e,0,q),!1}var pa=new class extends da{constructor(){super(...arguments),this.type="circle",this.pathStr="M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0"}draw(t,e,n,i,r){return fa(t,e/2,n,i,r)}drawOffset(t,e,n,i,r,s){return fa(t,e/2+r,n,i,s)}drawToSvgPath(t,e,n,i){const r=t/2;return`M ${e-r}, ${n} a ${r},${r} 0 1,0 ${2*r},0 a ${r},${r} 0 1,0 -${2*r},0`}};var ga=new class extends da{constructor(){super(...arguments),this.type="cross",this.pathStr="M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z"}draw(t,e,n,i,r){return function(t,e,n,i,r){return t.moveTo(-3*e+n,-e+i,r),t.lineTo(-e+n,-e+i,r),t.lineTo(-e+n,-3*e+i,r),t.lineTo(e+n,-3*e+i,r),t.lineTo(e+n,-e+i,r),t.lineTo(3*e+n,-e+i,r),t.lineTo(3*e+n,e+i,r),t.lineTo(e+n,e+i,r),t.lineTo(e+n,3*e+i,r),t.lineTo(-e+n,3*e+i,r),t.lineTo(-e+n,e+i,r),t.lineTo(-3*e+n,e+i,r),t.closePath(),!0}(t,e/6,n,i,r)}drawOffset(t,e,n,i,r,s){return function(t,e,n,i,r,s){return t.moveTo(-3*e+n-r,-e+i-r,s),t.lineTo(-e+n-r,-e+i-r,s),t.lineTo(-e+n-r,-3*e+i-r,s),t.lineTo(e+n+r,-3*e+i-r,s),t.lineTo(e+n+r,-e+i-r,s),t.lineTo(3*e+n+r,-e+i-r,s),t.lineTo(3*e+n+r,e+i+r,s),t.lineTo(e+n+r,e+i+r,s),t.lineTo(e+n+r,3*e+i+r,s),t.lineTo(-e+n-r,3*e+i+r,s),t.lineTo(-e+n-r,e+i+r,s),t.lineTo(-3*e+n-r,e+i+r,s),t.closePath(),!0}(t,e/6,n,i,r,s)}};function ma(t,e,n,i,r){return t.moveTo(n,i-e,r),t.lineTo(e+n,i,r),t.lineTo(n,i+e,r),t.lineTo(n-e,i,r),t.closePath(),!0}var ba=new class extends da{constructor(){super(...arguments),this.type="diamond",this.pathStr="M-0.5,0L0,-0.5L0.5,0L0,0.5Z"}draw(t,e,n,i,r){return ma(t,e/2,n,i,r)}drawFitDir(t,e,n,i,r){return ma(t,e/2,n,i,r)}drawOffset(t,e,n,i,r,s){return ma(t,e/2+r,n,i,s)}};function ya(t,e,n,i){const r=2*e;return t.rect(n-e,i-e,r,r),!1}var va=new class extends da{constructor(){super(...arguments),this.type="square",this.pathStr="M-0.5,-0.5h1v1h-1Z"}draw(t,e,n,i){return ya(t,e/2,n,i)}drawOffset(t,e,n,i,r){return ya(t,e/2+r,n,i)}};function xa(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(n+e+2*r,e+i+r),t.lineTo(n-e-2*r,e+i+r),t.lineTo(n,i-e-2*r),t.closePath(),!0}class _a extends da{constructor(){super(...arguments),this.type="triangleUp",this.pathStr="M0.5,0.5 L-0.5,0.5 L0,-0.5 Z"}draw(t,e,n,i){return xa(t,e/2,n,i)}drawOffset(t,e,n,i,r){return xa(t,e/2,n,i,r)}}var Aa=new _a;var Sa=new class extends _a{constructor(){super(...arguments),this.type="triangle"}};const wa=Math.sin(Math.PI/10)/Math.sin(7*Math.PI/10),Ta=Math.sin(q/10)*wa,Ba=-Math.cos(q/10)*wa;function Ca(t,e,n,i){const r=Ta*e,s=Ba*e;t.moveTo(n,-e+i),t.lineTo(r+n,s+i);for(let a=1;a<5;++a){const o=q*a/5,l=Math.cos(o),u=Math.sin(o);t.lineTo(u*e+n,-l*e+i),t.lineTo(l*r-u*s+n,u*r+l*s+i)}return t.closePath(),!0}var ka=new class extends da{constructor(){super(...arguments),this.type="star",this.pathStr="M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z"}draw(t,e,n,i){return Ca(t,e/2,n,i)}drawOffset(t,e,n,i,r){return Ca(t,e/2+r,n,i)}};const Ma=rt(3);function Pa(t,e,n,i){const r=e,s=r/Ma,a=s/5,o=e;return t.moveTo(0+n,-r+i),t.lineTo(s/2+n,i),t.lineTo(a/2+n,i),t.lineTo(a/2+n,o+i),t.lineTo(-a/2+n,o+i),t.lineTo(-a/2+n,i),t.lineTo(-s/2+n,i),t.closePath(),!0}var Ea=new class extends da{constructor(){super(...arguments),this.type="arrow",this.pathStr="M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z"}draw(t,e,n,i){return Pa(t,e/2,n,i)}drawOffset(t,e,n,i,r){return Pa(t,e/2+r,n,i)}};function Oa(t,e,n,i){const r=2*e;return t.moveTo(n,-e+i),t.lineTo(r/3/2+n,e+i),t.lineTo(-r/3/2+n,e+i),t.closePath(),!0}var La=new class extends da{constructor(){super(...arguments),this.type="wedge",this.pathStr="M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z"}draw(t,e,n,i){return Oa(t,e/2,n,i)}drawOffset(t,e,n,i,r){return Oa(t,e/2+r,n,i)}};function Ra(t,e,n,i){return t.moveTo(-e+n,i),t.lineTo(n,e+i),!1}var Ia=new class extends da{constructor(){super(...arguments),this.type="stroke",this.pathStr=""}draw(t,e,n,i){return Ra(t,e/2,n,i)}drawOffset(t,e,n,i,r){return Ra(t,e/2+r,n,i)}};const Na=-.5,Ua=rt(3)/2,Da=1/rt(12);function za(t,e,n,i){const r=e/2,s=e*Da,a=r,o=e*Da+e,l=-a,u=o;return t.moveTo(r+n,s+i),t.lineTo(a+n,o+i),t.lineTo(l+n,u+i),t.lineTo(Na*r-Ua*s+n,Ua*r+Na*s+i),t.lineTo(Na*a-Ua*o+n,Ua*a+Na*o+i),t.lineTo(Na*l-Ua*u+n,Ua*l+Na*u+i),t.lineTo(Na*r+Ua*s+n,Na*s-Ua*r+i),t.lineTo(Na*a+Ua*o+n,Na*o-Ua*a+i),t.lineTo(Na*l+Ua*u+n,Na*u-Ua*l+i),t.closePath(),!1}var Wa=new class extends da{constructor(){super(...arguments),this.type="wye",this.pathStr="M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z"}draw(t,e,n,i){return za(t,e/2,n,i)}drawOffset(t,e,n,i,r){return za(t,e/2+r,n,i)}};function Fa(t,e,n,i,r){return t.moveTo(-e+n-2*r,i),t.lineTo(e+n+r,e+i+2*r),t.lineTo(e+n+r,i-e-2*r),t.closePath(),!0}var ja=new class extends da{constructor(){super(...arguments),this.type="triangleLeft",this.pathStr="M-0.5,0 L0.5,0.5 L0.5,-0.5 Z"}draw(t,e,n,i){return Fa(t,e/2,n,i,0)}drawOffset(t,e,n,i,r){return Fa(t,e/2,n,i,r)}};function Ha(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(n-e-r,e+i+2*r),t.lineTo(e+n+2*r,i),t.lineTo(n-e-r,i-e-2*r),t.closePath(),!0}var $a=new class extends da{constructor(){super(...arguments),this.type="triangleRight",this.pathStr="M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z"}draw(t,e,n,i){return Ha(t,e/2,n,i)}drawOffset(t,e,n,i,r){return Ha(t,e/2,n,i,r)}};function Ga(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(n-e-2*r,i-e-r),t.lineTo(n+e+2*r,i-e-r),t.lineTo(n,i+e+2*r),t.closePath(),!0}var Va=new class extends da{constructor(){super(...arguments),this.type="triangleDown",this.pathStr="M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z"}draw(t,e,n,i){return Ga(t,e/2,n,i)}drawOffset(t,e,n,i,r){return Ga(t,e/2,n,i,r)}};const Xa=rt(3);function Ya(t,e,n,i){const r=e*Xa;return t.moveTo(n,i+-r/3*2),t.lineTo(e+n,i+r),t.lineTo(n-e,i+r),t.closePath(),!0}var Ka=new class extends da{constructor(){super(...arguments),this.type="thinTriangle",this.pathStr="M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z"}draw(t,e,n,i){return Ya(t,e/2/Xa,n,i)}drawOffset(t,e,n,i,r){return Ya(t,e/2/Xa+r,n,i)}};function qa(t,e,n,i){const r=2*e;return t.moveTo(e+n,i-r),t.lineTo(n-e,i),t.lineTo(e+n,r+i),!0}var Qa=new class extends da{constructor(){super(...arguments),this.type="arrow2Left",this.pathStr="M 0.25 -0.5 L -0.25 0 l 0.25 0.5"}draw(t,e,n,i){return qa(t,e/4,n,i)}drawOffset(t,e,n,i,r){return qa(t,e/4+r,n,i)}};function Za(t,e,n,i){const r=2*e;return t.moveTo(n-e,i-r),t.lineTo(n+e,i),t.lineTo(n-e,r+i),!0}var Ja=new class extends da{constructor(){super(...arguments),this.type="arrow2Right",this.pathStr="M -0.25 -0.5 l 0.25 0 l -0.25 0.5"}draw(t,e,n,i){return Za(t,e/4,n,i)}drawOffset(t,e,n,i,r){return Za(t,e/4+r,n,i)}};function to(t,e,n,i){const r=2*e;return t.moveTo(n-r,i+e),t.lineTo(n,i-e),t.lineTo(n+r,i+e),!0}var eo=new class extends da{constructor(){super(...arguments),this.type="arrow2Up",this.pathStr="M -0.5 0.25 L 0 -0.25 l 0.5 0.25"}draw(t,e,n,i){return to(t,e/4,n,i)}drawOffset(t,e,n,i,r){return to(t,e/4+r,n,i)}};function no(t,e,n,i){const r=2*e;return t.moveTo(n-r,i-e),t.lineTo(n,i+e),t.lineTo(n+r,i-e),!0}var io=new class extends da{constructor(){super(...arguments),this.type="arrow2Down",this.pathStr="M -0.5 -0.25 L 0 0.25 l 0.5 -0.25"}draw(t,e,n,i){return no(t,e/4,n,i)}drawOffset(t,e,n,i,r){return no(t,e/4+r,n,i)}};function ro(t,e,n,i,r){return t.moveTo(n,i-e),t.lineTo(n,i+e),!0}var so=new class extends da{constructor(){super(...arguments),this.type="lineV",this.pathStr="M0,-0.5L0,0.5"}draw(t,e,n,i,r){return ro(t,e/2,n,i)}drawOffset(t,e,n,i,r,s){return ro(t,e/2+r,n,i)}drawToSvgPath(t,e,n,i){const r=t/2;return`M ${e}, ${n-r} L ${e},${n+r}`}};function ao(t,e,n,i,r){return t.moveTo(n-e,i),t.lineTo(n+e,i),!0}var oo=new class extends da{constructor(){super(...arguments),this.type="lineH",this.pathStr="M-0.5,0L0.5,0"}draw(t,e,n,i,r){return ao(t,e/2,n,i)}drawOffset(t,e,n,i,r,s){return ao(t,e/2+r,n,i)}drawToSvgPath(t,e,n,i){const r=t/2;return`M ${e-r}, ${n} L ${e+r},${n}`}};function lo(t,e,n,i,r){return t.moveTo(n-e,i-e),t.lineTo(n+e,i+e),t.moveTo(n+e,i-e),t.lineTo(n-e,i+e),!0}var uo=new class extends da{constructor(){super(...arguments),this.type="close",this.pathStr="M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5"}draw(t,e,n,i,r){return lo(t,e/2,n,i)}drawOffset(t,e,n,i,r,s){return lo(t,e/2+r,n,i)}drawToSvgPath(t,e,n,i){const r=t/2;return`M ${e-r}, ${n-r} L ${e+r},${n+r} M ${e+r}, ${n-r} L ${e-r},${n+r}`}};function ho(t,e,n,i){return t.rect(n-e[0]/2,i-e[1]/2,e[0],e[1]),!1}function co(t,e,n,i){const r=e,s=e/2;return t.rect(n-r/2,i-s/2,r,s),!1}var fo=new class extends da{constructor(){super(...arguments),this.type="rect",this.pathStr="M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z"}draw(t,e,n,i){return A(e)?co(t,e,n,i):ho(t,e,n,i)}drawOffset(t,e,n,i,r){return A(e)?co(t,e+2*r,n,i):ho(t,[e[0]+2*r,e[1]+2*r],n,i)}};const po=new ct;class go{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.pathStr="",this.type=t,x(e)?this.svgCache=e:this.path=e,this.isSvg=n}drawOffset(t,e,n,i,r,s,a){return this.isSvg?!!this.svgCache&&(this.svgCache.forEach((r=>{t.beginPath(),Ze(r.path.commandList,t,n,i,e,e),a&&a(r.path,r.attribute)})),!1):(Ze(this.path.commandList,t,n,i,e+r,e+r),!1)}draw(t,e,n,i,r,s){return this.drawOffset(t,e,n,i,0,r,s)}bounds(t,e){if(this.isSvg){if(!this.svgCache)return;return e.clear(),void this.svgCache.forEach((n=>{let{path:i}=n;po.x1=i.bounds.x1*t,po.y1=i.bounds.y1*t,po.x2=i.bounds.x2*t,po.y2=i.bounds.y2*t,e.union(po)}))}this.path.bounds&&(e.x1=this.path.bounds.x1*t,e.y1=this.path.bounds.y1*t,e.x2=this.path.bounds.x2*t,e.y2=this.path.bounds.y2*t)}}const mo={};[pa,ga,ba,va,Ka,Sa,ka,Ea,La,Ia,Wa,ja,$a,Aa,Va,Qa,Ja,eo,io,fo,so,oo,uo].forEach((t=>{mo[t.type]=t}));const bo={arrowLeft:"M 0.25 -0.5 L -0.25 0 l 0.5 0.5",arrowRight:"M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5",rectRound:"M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",roundLine:"M 1.2392 -0.258 L -1.3432 -0.258 C -1.4784 -0.258 -1.588 -0.1436 -1.588 -0.002 c 0 0.1416 0.1096 0.256 0.2448 0.256 l 2.5824 0 c 0.1352 0 0.2448 -0.1144 0.2448 -0.256 C 1.484 -0.1436 1.3744 -0.258 1.2392 -0.258 z"},yo=new ct,vo=["symbolType","size",...tr];let xo=class t extends ar{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{symbolType:"circle"}),this.type="symbol",this.numberType=Pr}getParsedPath(){return this.shouldUpdateShape()&&(this.doUpdateParsedPath(),this.clearUpdateShapeTag()),this._parsedPath}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{size:t}=this.attribute;return x(t)?2===t.length&&t.every(this._validNumber):this._validNumber(t)}doUpdateParsedPath(){const e=this.getGraphicTheme();let{symbolType:n=e.symbolType}=this.attribute,i=mo[n];if(i)return this._parsedPath=i,i;if(i=t.userSymbolMap[n],i)return this._parsedPath=i,i;if(n=bo[n]||n,!0===((r=n).startsWith("<svg")||r.startsWith("<?xml"))){const e=new mr,{svg:i}=e.parse(n);if(!i)return null;const r=x(i.path)?i.path:[i.path];yo.clear();const s=[];r.forEach((t=>{const e=(new Pn).fromString(t.d),n={};Rr.forEach((e=>{t[e]&&(n[Lr[e]]=t[e])})),s.push({path:e,attribute:n}),yo.union(e.bounds)}));const a=yo.width(),o=yo.height(),l=1/et(a,o);return s.forEach((t=>t.path.transform(0,0,l,l))),this._parsedPath=new go(n,s,!0),t.userSymbolMap[n]=this._parsedPath,this._parsedPath}var r;const s=(new Pn).fromString(n),a=s.bounds.width(),o=s.bounds.height(),l=1/et(a,o);return s.transform(0,0,l,l),this._parsedPath=new go(n,s),t.userSymbolMap[n]=this._parsedPath,this._parsedPath}getGraphicTheme(){return xi(this).symbol}updateAABBBounds(t,e,n,i){if(!ti.graphicService.validCheck(t,e,n,this))return n;this.updatePathProxyAABBBounds(n)||(i?this.updateSymbolAABBBoundsImprecise(t,e,n):this.updateSymbolAABBBoundsAccurate(t,e,n));const{tb1:r,tb2:s}=ti.graphicService.updateTempAABBBounds(n);((t,e,n)=>{const{outerBorder:i,shadowBlur:r=e.shadowBlur,strokeBoundsBuffer:s=e.strokeBoundsBuffer}=t;if(i){const t=e.outerBorder,{distance:a=t.distance,lineWidth:o=t.lineWidth}=i;br(n,a+(r+o)/2,!0,s)}})(t,e,r),n.union(r),r.setValue(s.x1,s.y1,s.x2,s.y2);const{lineJoin:a=e.lineJoin}=t;return ti.graphicService.transformAABBBounds(t,n,e,"miter"===a,this),n}updateSymbolAABBBoundsImprecise(t,e,n){const{size:i=e.size}=t;if(x(i))n.set(-i[0]/2,-i[1]/2,i[0]/2,i[1]/2);else{const t=i/2;n.set(-t,-t,t,t)}return n}updateSymbolAABBBoundsAccurate(t,e,n){const{size:i=e.size}=t;return this.getParsedPath().bounds(i,n),n}needUpdateTags(t){return super.needUpdateTags(t,vo)}needUpdateTag(t){return super.needUpdateTag(t,vo)}toCustomPath(){const t=this.getParsedPath(),e=this.attribute.size,n=x(e)?e:[e,e];return t.path?(new Pn).fromCustomPath2D(t.path,0,0,n[0],n[1]):(new Pn).fromString(t.pathStr,0,0,n[0],n[1])}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function _o(t){return new xo(t)}xo.userSymbolMap={},xo.NOWORK_ANIMATE_ATTR=Object.assign({symbolType:1},sr);const Ao=["width","x1","y1","height","cornerRadius",...tr];let So=class t extends ar{constructor(t){super(t),this.type="rect",this.numberType=kr}isValid(){return super.isValid()&&this._isValid()}_isValid(){return!0}getGraphicTheme(){return xi(this).rect}updateAABBBounds(t,e,n){if(!ti.graphicService.validCheck(t,e,n,this))return n;if(!this.updatePathProxyAABBBounds(n)){let{width:e,height:i}=t;const{x1:r,y1:s,x:a,y:o}=t;e=null!=e?e:r-a,i=null!=i?i:s-o,(isFinite(e)||isFinite(i)||isFinite(a)||isFinite(o))&&n.set(0,0,e||0,i||0)}const{tb1:i,tb2:r}=ti.graphicService.updateTempAABBBounds(n);return ra(t,e,i),n.union(i),i.setValue(r.x1,r.y1,r.x2,r.y2),ti.graphicService.transformAABBBounds(t,n,e,!1,this),n}needUpdateTags(t){return super.needUpdateTags(t,Ao)}needUpdateTag(t){return super.needUpdateTag(t,Ao)}toCustomPath(){const t=this.attribute,{x:e,y:n,width:i,height:r}=(t=>{if(!t)return{x:0,y:0,width:0,height:0};let e=p(t.width)?t.x1-t.x:t.width,n=p(t.height)?t.y1-t.y:t.height,i=0,r=0;return e<0?(i=e,e=-e):Number.isNaN(e)&&(e=0),n<0?(r=n,n=-n):Number.isNaN(n)&&(n=0),{x:i,y:r,width:e,height:n}})(t),s=new Pn;return s.moveTo(e,n),s.rect(e,n,i,r),s}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function wo(t){return new So(t)}So.NOWORK_ANIMATE_ATTR=sr;class To{constructor(t,e,n,i,r,s,a,o,l,u,h,c,d,f){this.left=t,this.top=e,this.width=n,this.height=i,this.actualHeight=0,this.bottom=e+i,this.right=t+n,this.ellipsis=r,this.wordBreak=s,this.verticalDirection=a,this.lines=[],this.globalAlign=o,this.globalBaseline=l,this.layoutDirection=u,this.directionKey=ei[this.layoutDirection],this.isWidthMax=h,this.isHeightMax=c,this.singleLine=d,f?(f.clear(),this.icons=f):this.icons=new Map}draw(t,e){const{width:n,height:i}=this.getActualSize(),r=this.isWidthMax?Math.min(this.width,n):this.width||n||0;let s=this.isHeightMax?Math.min(this.height,i):this.height||i||0;s=Math.min(s,i);let a=0;switch(this.globalBaseline){case"top":a=0;break;case"middle":a=-s/2;break;case"bottom":a=-s}let o=0;"right"===this.globalAlign||"end"===this.globalAlign?o=-r:"center"===this.globalAlign&&(o=-r/2);let l=this[this.directionKey.height];this.singleLine&&(l=this.lines[0].height+1);let u=!1;if("middle"===this.verticalDirection)if(this.actualHeight>=l&&0!==l)for(let n=0;n<this.lines.length;n++){const{top:i,height:r}=this.lines[n];if(i+r<this[this.directionKey.top]||i+r>this[this.directionKey.top]+l)return u;let s=!1;this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+l&&(s=!0,u=!0),this.lines[n].draw(t,s,this.lines[n][this.directionKey.left]+o,this.lines[n][this.directionKey.top]+a,this.ellipsis,e)}else{const n=Math.floor((l-this.actualHeight)/2);"vertical"===this.layoutDirection?o+=n:a+=n;for(let n=0;n<this.lines.length;n++)this.lines[n].draw(t,!1,this.lines[n][this.directionKey.left]+o,this.lines[n][this.directionKey.top]+a,this.ellipsis,e)}else if("bottom"===this.verticalDirection&&"vertical"!==this.layoutDirection)for(let n=0;n<this.lines.length;n++){const{top:i,height:r}=this.lines[n],s=l-this.lines[n].top-this.lines[n].height;if(0===l)this.lines[n].draw(t,!1,o,s+a,this.ellipsis,e);else{if(s+r>this[this.directionKey.top]+l||s<this[this.directionKey.top])return u;{let i=!1;this.ellipsis&&this.lines[n+1]&&s-this.lines[n+1].height<this[this.directionKey.top]&&(i=!0,u=!0),this.lines[n].draw(t,i,o,s+a,this.ellipsis,e)}}}else{"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&this.singleLine&&this.isWidthMax&&(o+=this.lines[0].height+1);for(let n=0;n<this.lines.length;n++){"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&(o-=this.lines[n].height+this.lines[n].top);const{top:i,height:r}=this.lines[n];if(0===l)this.lines[n].draw(t,!1,this.lines[n][this.directionKey.left]+o,this.lines[n][this.directionKey.top]+a,this.ellipsis,e);else{if(i+r<this[this.directionKey.top]||i+r>this[this.directionKey.top]+l)return u;{let i=!1;this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+l&&(i=!0,u=!0),this.lines[n].draw(t,i,this.lines[n][this.directionKey.left]+o,this.lines[n][this.directionKey.top]+a,this.ellipsis,e)}}}}return u}getActualSize(){return this.ellipsis?this.getActualSizeWidthEllipsis():this.getRawActualSize()}getRawActualSize(){let t=0,e=0;for(let n=0;n<this.lines.length;n++){const i=this.lines[n];i.actualWidth>t&&(t=i.actualWidth),e+=i.height}return{width:"vertical"===this.layoutDirection?e:t,height:"vertical"===this.layoutDirection?t:e}}getActualSizeWidthEllipsis(){let t=0,e=0;const{width:n,height:i}=this.getRawActualSize();this.width,this.height;let r=this[this.directionKey.height];if(this.singleLine&&(r=this.lines[0].height+1),"middle"===this.verticalDirection)if(this.actualHeight>=r&&0!==r)for(let n=0;n<this.lines.length;n++){const{top:i,height:s}=this.lines[n];if(i+s<this[this.directionKey.top]||i+s>this[this.directionKey.top]+r);else if(this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+r){const i=!0===this.ellipsis?"...":this.ellipsis||"",r=this.lines[n].getWidthWithEllips(i);r>t&&(t=r),e+=this.lines[n].height}else this.lines[n].actualWidth>t&&(t=this.lines[n].actualWidth),e+=this.lines[n].height}else{Math.floor((r-this.actualHeight)/2);for(let n=0;n<this.lines.length;n++)this.lines[n].actualWidth>t&&(t=this.lines[n].actualWidth),e+=this.lines[n].height}else if("bottom"===this.verticalDirection)for(let n=0;n<this.lines.length;n++){const{top:i,height:s}=this.lines[n],a=r-this.lines[n].top-this.lines[n].height;if(0===r)this.lines[n].actualWidth>t&&(t=this.lines[n].actualWidth),e+=this.lines[n].height;else if(a+s>this[this.directionKey.top]+r||a<this[this.directionKey.top]);else if(this.ellipsis&&this.lines[n+1]&&a-this.lines[n+1].height<this[this.directionKey.top]){const i=!0===this.ellipsis?"...":this.ellipsis||"",r=this.lines[n].getWidthWithEllips(i);r>t&&(t=r),e+=this.lines[n].height}else this.lines[n].actualWidth>t&&(t=this.lines[n].actualWidth),e+=this.lines[n].height}else for(let n=0;n<this.lines.length;n++){const{top:i,height:s}=this.lines[n];if(0===r)this.lines[n].actualWidth>t&&(t=this.lines[n].actualWidth),e+=this.lines[n].height;else if(i+s<this[this.directionKey.top]||i+s>this[this.directionKey.top]+r);else if(this.ellipsis&&this.lines[n+1]&&this.lines[n+1].top+this.lines[n+1].height>this[this.directionKey.top]+r){const i=!0===this.ellipsis?"...":this.ellipsis||"",r=this.lines[n].getWidthWithEllips(i);r>t&&(t=r),e+=this.lines[n].height}else this.lines[n].actualWidth>t&&(t=this.lines[n].actualWidth),e+=this.lines[n].height}return{width:"vertical"===this.layoutDirection?e:t,height:"vertical"===this.layoutDirection?t:e}}}class Bo{constructor(t,e,n){this.fontSize=n.fontSize||16,this.textBaseline=n.textBaseline||"alphabetic";const i=Fi(n.lineHeight,this.fontSize);this.lineHeight="number"==typeof i?i>this.fontSize?i:this.fontSize:Math.floor(1.2*this.fontSize),this.height=this.lineHeight;const{ascent:r,height:s,descent:a,width:o}=ui(t,n);let l=0,u=0,h=0;this.height>s&&(l=(this.height-s)/2,u=Math.ceil(l),h=Math.floor(l)),"top"===this.textBaseline?(this.ascent=l,this.descent=s-l):"bottom"===this.textBaseline?(this.ascent=s-l,this.descent=l):"middle"===this.textBaseline?(this.ascent=this.height/2,this.descent=this.height/2):(this.ascent=r+u,this.descent=a+h),this.length=t.length,this.width=o||0,this.text=t||"",this.newLine=e||!1,this.character=n,this.left=0,this.top=0,this.ellipsis="normal",this.ellipsisWidth=0,this.ellipsisOtherParagraphWidth=0,"vertical"===n.direction&&(this.direction=n.direction,this.widthOrigin=this.width,this.heightOrigin=this.height,this.width=this.heightOrigin,this.height=this.widthOrigin,this.lineHeight=this.height),this.ellipsisStr="..."}updateWidth(){const{width:t}=ui(this.text,this.character);this.width=t,"vertical"===this.direction&&(this.widthOrigin=this.width,this.width=this.heightOrigin,this.height=this.widthOrigin)}draw(t,e,n,i,r){let s=this.text,a=this.left+n;e+=this.top;let o=this.direction;if(this.verticalEllipsis)s=this.ellipsisStr,o="vertical",e-=this.ellipsisWidth/2;else{if("hide"===this.ellipsis)return;if("add"===this.ellipsis)s+=this.ellipsisStr,"right"!==r&&"end"!==r||(a-=this.ellipsisWidth);else if("replace"===this.ellipsis){const t=li(s,("vertical"===o?this.height:this.width)-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,s.length-1);if(s=s.slice(0,t),s+=this.ellipsisStr,"right"===r||"end"===r){const{width:e}=ui(this.text.slice(t),this.character);"vertical"===o||(a-=this.ellipsisWidth-e)}}}switch(this.character.script){case"super":e-=this.ascent*(1/3);break;case"sub":e+=this.descent/2}"vertical"===o&&(t.save(),t.rotateAbout(Math.PI/2,a,e),t.translate(-this.heightOrigin||-this.lineHeight/2,-this.descent/2),t.translate(a,e),a=0,e=0),this.character.stroke&&(function(t,e){const n=e&&e.stroke||ii;if(!n)return void(t.globalAlpha=0);const{strokeOpacity:i=1,opacity:r=1}=e;t.globalAlpha=i*r,t.lineWidth=e&&"number"==typeof e.lineWidth?e.lineWidth:1,t.strokeStyle=n,oi(t,e)}(t,this.character),t.strokeText(s,a,e)),function(t,e){const n=e&&e.fill||ni;if(!n)return void(t.globalAlpha=0);const{fillOpacity:i=1,opacity:r=1}=e;t.globalAlpha=i*r,t.fillStyle=n,oi(t,e)}(t,this.character),this.character.fill&&t.fillText(s,a,e),this.character.fill&&("boolean"==typeof this.character.lineThrough||"boolean"==typeof this.character.underline?(this.character.underline&&t.fillRect(a,1+e,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1),this.character.lineThrough&&t.fillRect(a,1+e-this.ascent/2,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)):"underline"===this.character.textDecoration?t.fillRect(a,1+e,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1):"line-through"===this.character.textDecoration&&t.fillRect(a,1+e-this.ascent/2,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)),"vertical"===o&&t.restore()}getWidthWithEllips(t){let e=this.text;const n="vertical"===t?this.height:this.width;if("hide"===this.ellipsis)return n;if("add"===this.ellipsis)return n+this.ellipsisWidth;if("replace"===this.ellipsis){const t=li(e,n-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,e.length-1);e=e.slice(0,t),e+=this.ellipsisStr;const{width:i}=ui(this.text.slice(t),this.character);return n+this.ellipsisWidth-i}return n}}const Co=["width","height","image",...tr];let ko=class t extends ar{constructor(t){super(t),this.type="image",this.numberType=Cr,this.loadImage(this.attribute.image)}get width(){var t;return null!==(t=this.attribute.width)&&void 0!==t?t:0}set width(t){this.attribute.width===t&&(this.attribute.width=t,this.addUpdateShapeAndBoundsTag())}get height(){var t;return null!==(t=this.attribute.height)&&void 0!==t?t:0}set height(t){this.attribute.height===t&&(this.attribute.height=t,this.addUpdateShapeAndBoundsTag())}get repeatX(){var t;return null!==(t=this.attribute.repeatX)&&void 0!==t?t:"no-repeat"}set repeatX(t){this.attribute.repeatX===t&&(this.attribute.repeatX=t)}get repeatY(){var t;return null!==(t=this.attribute.repeatY)&&void 0!==t?t:"no-repeat"}set repeatY(t){this.attribute.repeatY===t&&(this.attribute.repeatY=t)}get image(){return this.attribute.image}set image(t){t!==this.attribute.image&&(this.attribute.image=t,this.loadImage(this.attribute.image))}imageLoadSuccess(t,e,n){super.imageLoadSuccess(t,e,(()=>{this.successCallback&&this.successCallback()}))}imageLoadFail(t,e){super.imageLoadFail(t,(()=>{this.failCallback&&this.failCallback()}))}setAttributes(t,e,n){return t.image&&this.loadImage(t.image),super.setAttributes(t,e,n)}setAttribute(t,e,n,i){return"image"===t&&this.loadImage(e),super.setAttribute(t,e,n,i)}getGraphicTheme(){return xi(this).image}updateAABBBounds(t,e,n){if(!ti.graphicService.validCheck(t,e,n,this))return n;if(!this.updatePathProxyAABBBounds(n)){const{width:i=e.width,height:r=e.height}=t;n.set(0,0,i,r)}const{tb1:i,tb2:r}=ti.graphicService.updateTempAABBBounds(n);return ra(t,e,i),n.union(i),i.setValue(r.x1,r.y1,r.x2,r.y2),ti.graphicService.transformAABBBounds(t,n,e,!1,this),n}getDefaultAttribute(t){return Zn[t]}needUpdateTags(t){return super.needUpdateTags(t,Co)}needUpdateTag(t){return super.needUpdateTag(t,Co)}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function Mo(t){return new ko(t)}ko.NOWORK_ANIMATE_ATTR=Object.assign({image:1,repeatX:1,repeatY:1},sr);class Po extends ko{constructor(t){if(super(t),this._x=0,this._y=0,this._hovered=!1,this._marginArray=[0,0,0,0],"always"===t.backgroundShowMode&&(this._hovered=!0),t.margin){const e=Ui(t.margin);this._marginArray="number"==typeof e?[e,e,e,e]:e}this.onBeforeAttributeUpdate=(t,e,n)=>{if(x(n)&&-1!==n.indexOf("margin")||"margin"===n)if(e.margin){const t=Ui(e.margin);this._marginArray="number"==typeof t?[t,t,t,t]:t}else this._marginArray=[0,0,0,0]}}get width(){var t;return(null!==(t=this.attribute.width)&&void 0!==t?t:0)+this._marginArray[1]+this._marginArray[3]}get height(){var t;return(null!==(t=this.attribute.height)&&void 0!==t?t:0)+this._marginArray[0]+this._marginArray[2]}tryUpdateAABBBounds(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;this.doUpdateAABBBounds();const{width:t=Zn.width,height:e=Zn.height}=this.attribute,{backgroundWidth:n=t,backgroundHeight:i=e}=this.attribute,r=(n-t)/2,s=(i-e)/2;return this._AABBBounds.expand([0,2*r,2*s,0]),this._AABBBounds}setHoverState(t){"hover"===this.attribute.backgroundShowMode&&this._hovered!==t&&(this._hovered=t)}}class Eo{constructor(t){this.frame=t,this.width=this.frame.width,this.height=this.frame.height,this.lineWidth=0,this.y=this.frame.top,this.maxAscent=0,this.maxDescent=0,this.maxAscentForBlank=0,this.maxDescentForBlank=0,this.lineBuffer=[],this.direction=t.layoutDirection,this.directionKey=ei[this.direction]}store(t){if(t instanceof Po){this.frame.icons.set(t.richtextId,t),this.lineBuffer.push(t),this.lineWidth+=t[this.directionKey.width];let e=0,n=0;"top"===t.attribute.textBaseline?(e=0,n=t.height):"bottom"===t.attribute.textBaseline?(e=t.height,n=0):(e=t.height/2,n=t.height/2),this.maxAscent=Math.max(this.maxAscent,e),this.maxDescent=Math.max(this.maxDescent,n)}else this.lineBuffer.push(t),0!==t.text.length?(this.lineWidth+=t[this.directionKey.width],this.maxAscent=Math.max(this.maxAscent,t.ascent),this.maxDescent=Math.max(this.maxDescent,t.descent)):(this.maxAscentForBlank=Math.max(this.maxAscentForBlank,t.ascent),this.maxDescentForBlank=Math.max(this.maxDescentForBlank,t.descent))}send(){if(0===this.lineBuffer.length)return;const t=0===this.maxAscent?this.maxAscentForBlank:this.maxAscent,e=0===this.maxDescent?this.maxDescentForBlank:this.maxDescent,n=new class{constructor(t,e,n,i,r,s,a,o){this.left=t,this.width=e,this.baseline=n,this.ascent=i,this.descent=r,this.top=n-i,this.paragraphs=s.map((t=>t)),this.textAlign=(this.paragraphs[0]instanceof Po?this.paragraphs[0].attribute.textAlign:this.paragraphs[0].character.textAlign)||"left",this.direction=a,this.directionKey=ei[this.direction],this.actualWidth=0;let l=0;this.paragraphs.forEach(((t,e)=>{if(0===e&&t instanceof Bo){const e=ai.exec(t.text);0!==(null==e?void 0:e.index)&&(t.text=t.text.slice(null==e?void 0:e.index),t.updateWidth())}this.actualWidth+=t[this.directionKey.width],l=Math.max(t[this.directionKey.height],l)})),this.height=l,this.blankWidth=o?0:this.width-this.actualWidth,this.calcOffset(e,o)}calcOffset(t,e){const n=this.directionKey,i=this.height;let r=this.left,s=0;this.actualWidth<t&&!e&&("right"===this.textAlign||"end"===this.textAlign?r=t-this.actualWidth:"center"===this.textAlign?r=(t-this.actualWidth)/2:"justify"===this.textAlign&&(this.paragraphs.length<2?r=(t-this.actualWidth)/2:s=(t-this.actualWidth)/(this.paragraphs.length-1))),this.paragraphs.map((function(t){t instanceof Po?(t["_"+n.x]=r,r+=t[n.width]+s,t["_"+n.y]="top"===t.attribute.textBaseline?0:"bottom"===t.attribute.textBaseline?i-t.height:(i-t.height)/2):(t[n.left]=r,r+=t[n.width]+s)}))}draw(t,e,n,i,r,s){if(r&&(e||this.paragraphs.some((t=>t.overflow)))){let t=0;for(let n=this.paragraphs.length-1;n>=0;n--){const i=this.paragraphs[n];if(i.overflow)continue;if(i instanceof Po)break;if("vertical"===this.direction&&"vertical"!==i.direction){i.verticalEllipsis=!0;break}const s=!0===r?"...":r||"";i.ellipsisStr=s;const{width:a}=ui(s,i.character),o=a||0;if(o<=this.blankWidth+t){e&&(i.ellipsis="add");break}if(o<=this.blankWidth+t+i.width){i.ellipsis="replace",i.ellipsisWidth=o,i.ellipsisOtherParagraphWidth=this.blankWidth+t;break}i.ellipsis="hide",t+=i.width}}this.paragraphs.map(((e,r)=>{if(e instanceof Po)return e.setAttributes({x:n+e._x,y:i+e._y}),void s(e,t,n+e._x,i+e._y,this.ascent);e.draw(t,i+this.ascent,n,0===r,this.textAlign)}))}getWidthWithEllips(t){let e=0;for(let n=this.paragraphs.length-1;n>=0;n--){const i=this.paragraphs[n];if(i instanceof Po)break;const{width:r}=ui(t,i.character),s=r||0;if(s<=this.blankWidth+e){i.ellipsis="add",i.ellipsisWidth=s;break}if(s<=this.blankWidth+e+i.width){i.ellipsis="replace",i.ellipsisWidth=s,i.ellipsisOtherParagraphWidth=this.blankWidth+e;break}i.ellipsis="hide",e+=i.width}let n=0;return this.paragraphs.map(((t,e)=>{n+=t instanceof Po?t.width:t.getWidthWithEllips(this.direction)})),n}}(this.frame.left,this[this.directionKey.width],this.y+t,t,e,this.lineBuffer,this.direction,"horizontal"===this.direction?this.frame.isWidthMax:this.frame.isHeightMax);this.frame.lines.push(n),this.frame.actualHeight+=n.height,this.y+=n.height,this.lineBuffer.length=0,this.lineWidth=this.maxAscent=this.maxDescent=this.maxAscentForBlank=this.maxDescentForBlank=0}deal(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t instanceof Po?"horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+t[this.directionKey.width]<=this[this.directionKey.width]?this.store(t):0===this.lineBuffer.length?(this.store(t),this.send()):(this.send(),this.deal(t)):"number"!=typeof this.width||this.width<0||(t.newLine&&this.send(),0!==t.text.length&&("horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+t[this.directionKey.width]<=this[this.directionKey.width]?this.store(t):this.lineWidth===this[this.directionKey.width]?(this.send(),this.deal(t)):this.cut(t,e)))}cut(t,e){const n=this[this.directionKey.width]-this.lineWidth||0,i=Math.ceil(n/t[this.directionKey.width]*t.length)||0,r=li(t.text,n,t.character,i,"break-word"===this.frame.wordBreak);if(0!==r){const[n,i]=function(t,e){const n=t.text.slice(0,e),i=t.text.slice(e);return[new Bo(n,t.newLine,t.character),new Bo(i,!0,t.character)]}(t,r);this.store(n),e?this.send():this.deal(i)}else 0!==this.lineBuffer.length&&(this.send(),this.deal(t))}}const Oo=["width","height","ellipsis","wordBreak","verticalDirection","maxHeight","maxWidth","textAlign","textBaseline","textConfig","layoutDirection","fill","stroke","fontSize",...tr];let Lo=class t extends ar{constructor(t){super(t),this.type="richtext",this._currentHoverIcon=null,this.numberType=Mr}get width(){var t;return null!==(t=this.attribute.width)&&void 0!==t?t:Qn.width}set width(t){this.attribute.width!==t&&(this.attribute.width=t,this.addUpdateShapeAndBoundsTag())}get height(){var t;return null!==(t=this.attribute.height)&&void 0!==t?t:Qn.height}set height(t){this.attribute.height!==t&&(this.attribute.height=t,this.addUpdateShapeAndBoundsTag())}get maxWidth(){return this.attribute.maxWidth}set maxWidth(t){this.attribute.maxWidth!==t&&(this.attribute.maxWidth=t,this.addUpdateShapeAndBoundsTag())}get maxHeight(){return this.attribute.maxHeight}set maxHeight(t){this.attribute.maxHeight!==t&&(this.attribute.maxHeight=t,this.addUpdateShapeAndBoundsTag())}get ellipsis(){var t;return null!==(t=this.attribute.ellipsis)&&void 0!==t?t:Qn.ellipsis}set ellipsis(t){this.attribute.ellipsis!==t&&(this.attribute.ellipsis=t,this.addUpdateShapeAndBoundsTag())}get wordBreak(){var t;return null!==(t=this.attribute.wordBreak)&&void 0!==t?t:Qn.wordBreak}set wordBreak(t){this.attribute.wordBreak!==t&&(this.attribute.wordBreak=t,this.addUpdateShapeAndBoundsTag())}get verticalDirection(){var t;return null!==(t=this.attribute.verticalDirection)&&void 0!==t?t:Qn.verticalDirection}set verticalDirection(t){this.attribute.verticalDirection!==t&&(this.attribute.verticalDirection=t,this.addUpdateShapeAndBoundsTag())}get textAlign(){var t;return null!==(t=this.attribute.textAlign)&&void 0!==t?t:Qn.textAlign}set textAlign(t){this.attribute.textAlign!==t&&(this.attribute.textAlign=t,this.addUpdateShapeAndBoundsTag())}get textBaseline(){var t;return null!==(t=this.attribute.textBaseline)&&void 0!==t?t:Qn.textBaseline}set textBaseline(t){this.attribute.textBaseline!==t&&(this.attribute.textBaseline=t,this.addUpdateShapeAndBoundsTag())}get textConfig(){var t;return null!==(t=this.attribute.textConfig)&&void 0!==t?t:Qn.textConfig}set textConfig(t){this.attribute.textConfig=t,this.addUpdateShapeAndBoundsTag()}getGraphicTheme(){return xi(this).richtext}updateAABBBounds(t,e,n){if(!ti.graphicService.validCheck(t,e,n,this))return n;const{width:i=e.width,height:r=e.height,maxWidth:s=e.maxWidth,maxHeight:a=e.maxHeight,textAlign:o=e.textAlign,textBaseline:l=e.textBaseline}=t;if(i>0&&r>0)n.set(0,0,i,r);else{const t=this.getFrameCache(),{width:e,height:o}=t.getActualSize();let l=i||e||0,u=r||o||0;u="number"==typeof a&&u>a?a:u||0,l="number"==typeof s&&l>s?s:l||0,n.set(0,0,l,u)}let u=0;switch(l){case"top":u=0;break;case"middle":u=-n.height()/2;break;case"bottom":u=-n.height()}let h=0;switch(o){case"left":h=0;break;case"center":h=-n.width()/2;break;case"right":h=-n.width()}return n.translate(h,u),ti.graphicService.updateTempAABBBounds(n),null==t.forceBoundsHeight&&null==t.forceBoundsWidth||ti.graphicService.updateHTMLTextAABBBounds(t,e,n),ti.graphicService.transformAABBBounds(t,n,e,!1,this),n}needUpdateTags(t){return super.needUpdateTags(t,Oo)}needUpdateTag(t){return super.needUpdateTag(t,Oo)}getFrameCache(){return this.shouldUpdateShape()&&(this.doUpdateFrameCache(),this.clearUpdateShapeTag()),this._frameCache}combinedStyleToCharacter(t){const{fill:e,stroke:n,fontSize:i,fontFamily:r,fontStyle:s,fontWeight:a,lineWidth:o,opacity:l,fillOpacity:u,strokeOpacity:h}=this.attribute;return Object.assign({fill:e,stroke:n,fontSize:i,fontFamily:r,fontStyle:s,fontWeight:a,lineWidth:o,opacity:l,fillOpacity:u,strokeOpacity:h},t)}doUpdateFrameCache(t){var e;const{textConfig:n=[],maxWidth:i,maxHeight:r,width:s,height:a,ellipsis:o,wordBreak:l,verticalDirection:u,textAlign:h,textBaseline:c,layoutDirection:d,singleLine:f,disableAutoWrapLine:p}=this.attribute,g=[],m=null!=t?t:n;for(let t=0;t<m.length;t++)if("image"in m[t]){const e=this.combinedStyleToCharacter(m[t]),n=e.id&&this._frameCache&&this._frameCache.icons&&this._frameCache.icons.get(e.id);if(n)g.push(n);else{const t=new Po(e);t.successCallback=()=>{var t;this.addUpdateBoundTag(),null===(t=this.stage)||void 0===t||t.renderNextFrame()},t.richtextId=e.id,g.push(t)}}else{const e=this.combinedStyleToCharacter(m[t]);if(A(e.text)&&(e.text=`${e.text}`),e.text&&e.text.includes("\n")){const t=e.text.split("\n");for(let n=0;n<t.length;n++)g.push(new Bo(t[n],0!==n,e))}else e.text&&g.push(new Bo(e.text,!1,e))}const b="number"==typeof i&&Number.isFinite(i)&&i>0,y="number"==typeof r&&Number.isFinite(r)&&r>0,v="number"==typeof s&&Number.isFinite(s)&&s>0&&(!b||s<=i),x="number"==typeof a&&Number.isFinite(a)&&a>0&&(!y||a<=r),_=new To(0,0,(v?s:b?i:0)||0,(x?a:y?r:0)||0,o,l,u,h,c,d||"horizontal",!v&&b,!x&&y,f||!1,null===(e=this._frameCache)||void 0===e?void 0:e.icons),S=new Eo(_);if(p){let t=0,e=!1;for(let n=0;n<g.length;n++){const i=g[n];e?(i.overflow=!0,i.left=1/0,i.top=1/0,!i.newLine&&_.lines[_.lines.length-1].paragraphs.push(i)):S.deal(i,!0),_.lines.length!==t&&(t=_.lines.length,S.lineBuffer.length=0,i.overflow=!0,i.left=1e3,i.top=1e3,_.lines[_.lines.length-1].paragraphs.push(i),e=!0),i.newLine&&(e=!1,S.lineWidth=0),S.send()}}else for(let t=0;t<g.length;t++)S.deal(g[t]);if(S.send(),!("horizontal"===_.layoutDirection?v:x)){const t=_.getActualSizeWidthEllipsis();let e="horizontal"===_.layoutDirection?t.width:t.height;("horizontal"===_.layoutDirection?b:y)&&(e=Math.min(e,"horizontal"===_.layoutDirection?i:r)),_.lines.forEach((function(t){t.calcOffset(e,!1)}))}this._frameCache=_}clone(){return new t(Object.assign({},this.attribute))}setStage(t,e){super.setStage(t,e),this.getFrameCache().icons.forEach((n=>{n.setStage(t,e)}))}bindIconEvent(){this.addEventListener("pointermove",(t=>{var e,n,i,r,s;const a=this.pickIcon(t.global);a&&a===this._currentHoverIcon||(a?(null===(e=this._currentHoverIcon)||void 0===e||e.setHoverState(!1),this._currentHoverIcon=a,this._currentHoverIcon.setHoverState(!0),null===(n=this.stage)||void 0===n||n.setCursor(a.attribute.cursor),null===(i=this.stage)||void 0===i||i.renderNextFrame()):!a&&this._currentHoverIcon&&(this._currentHoverIcon.setHoverState(!1),this._currentHoverIcon=null,null===(r=this.stage)||void 0===r||r.setCursor(),null===(s=this.stage)||void 0===s||s.renderNextFrame()))})),this.addEventListener("pointerleave",(t=>{var e,n;this._currentHoverIcon&&(this._currentHoverIcon.setHoverState(!1),this._currentHoverIcon=null,null===(e=this.stage)||void 0===e||e.setCursor(),null===(n=this.stage)||void 0===n||n.renderNextFrame())}))}pickIcon(t){const e=this.getFrameCache(),{e:n,f:i}=this.globalTransMatrix;let r;return e.icons.forEach((e=>{var s,a;const o=e.AABBBounds.clone();o.translate(e._marginArray[3],e._marginArray[0]),o.containsPoint({x:t.x-n,y:t.y-i})&&(r=e,r.globalX=(null!==(s=r.attribute.x)&&void 0!==s?s:0)+n+e._marginArray[3],r.globalY=(null!==(a=r.attribute.y)&&void 0!==a?a:0)+i+e._marginArray[0])})),r}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function Ro(t){return new Lo(t)}Lo.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,verticalDirection:1,textAlign:1,textBaseline:1,textConfig:1,layoutDirection:1},sr);const Io=["innerRadius","outerRadius","startAngle","endAngle","cornerRadius","padAngle","padRadius","cap",...tr];let No,Uo=class t extends ar{constructor(t){super(t),this.type="arc",this.numberType=Tr}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{startAngle:t,endAngle:e,outerRadius:n,innerRadius:i}=this.attribute;return this._validNumber(t)&&this._validNumber(e)&&this._validNumber(n)&&this._validNumber(i)}getParsedCornerRadius(){const t=this.getGraphicTheme(),{cornerRadius:e=t.cornerRadius,innerPadding:n=t.innerPadding,outerPadding:i=t.outerPadding}=this.attribute;let{outerRadius:r=t.outerRadius,innerRadius:s=t.innerRadius}=this.attribute;if(r+=i,s-=n,0===e||"0%"===e)return 0;const a=Math.abs(r-s),o=t=>Math.min(A(t,!0)?t:a*parseFloat(t)/100,a/2);if(x(e)){const t=e.map((t=>o(t)||0));return 0===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:(3===t.length&&t.push(0),t)}return o(e)}getParsedAngle(){const t=this.getGraphicTheme();let{startAngle:e=t.startAngle,endAngle:n=t.endAngle}=this.attribute;const{cap:i=t.cap}=this.attribute,r=n-e>=0?1:-1,s=n-e;if(e=dt(e),n=e+s,i&&Z(s)<Q-X){let s=1,a=1;i.length&&(s=Number(i[0]),a=Number(i[1]));let{outerRadius:o=t.outerRadius,innerRadius:l=t.innerRadius}=this.attribute;const{outerPadding:u=t.outerPadding,innerPadding:h=t.innerPadding}=this.attribute;o+=u,l-=h;const c=Math.abs(o-l)/2,d=c/o;if(c>X&&o>X)return{startAngle:e-r*d*s,endAngle:n+r*d*a,sc:r*d*s,ec:r*d*a}}return{startAngle:e,endAngle:n}}getParsePadAngle(t,e){const n=this.getGraphicTheme(),{innerPadding:i=n.innerPadding,outerPadding:r=n.outerPadding,padAngle:s=n.padAngle}=this.attribute;let{outerRadius:a=n.outerRadius,innerRadius:o=n.innerRadius}=this.attribute;a+=r,o-=i;const{padRadius:l=rt(a*a+o*o)}=this.attribute,u=Z(e-t);let h=t,c=e,d=t,f=e;const p=s/2;let g=u,m=u;if(p>X&&l>X){const n=e>t?1:-1;let i=at(Number(l)/o*it(p)),r=at(Number(l)/a*it(p));return(g-=2*i)>X?(i*=n,d+=i,f-=i):(g=0,d=f=(t+e)/2),(m-=2*r)>X?(r*=n,h+=r,c-=r):(m=0,h=c=(t+e)/2),{outerStartAngle:h,outerEndAngle:c,innerStartAngle:d,innerEndAngle:f,innerDeltaAngle:g,outerDeltaAngle:m}}return{outerStartAngle:h,outerEndAngle:c,innerStartAngle:d,innerEndAngle:f,innerDeltaAngle:g,outerDeltaAngle:m}}getGraphicTheme(){return xi(this).arc}updateAABBBounds(t,e,n,i){if(!ti.graphicService.validCheck(t,e,n,this))return n;this.updatePathProxyAABBBounds(n)||(i?this.updateArcAABBBoundsImprecise(t,e,n):this.updateArcAABBBoundsAccurate(t,e,n));const{tb1:r,tb2:s}=ti.graphicService.updateTempAABBBounds(n);ra(t,e,r),n.union(r),r.setValue(s.x1,s.y1,s.x2,s.y2);const{lineJoin:a=e.lineJoin}=t;return ti.graphicService.transformAABBBounds(t,n,e,"miter"===a,this),n}updateArcAABBBoundsImprecise(t,e,n){let{outerRadius:i=e.outerRadius,innerRadius:r=e.innerRadius}=t;const{outerPadding:s=e.outerPadding,innerPadding:a=e.innerPadding}=t;return i+=s,r-=a,i<r&&(i=r),n.set(-i,-i,i,i),n}updateArcAABBBoundsAccurate(t,e,n){let{outerRadius:i=e.outerRadius,innerRadius:r=e.innerRadius}=t;const{outerPadding:s=e.outerPadding,innerPadding:a=e.innerPadding}=t;if(i+=s,r-=a,i<r){const t=i;i=r,r=t}let{endAngle:o=e.endAngle,startAngle:l=e.startAngle}=t;if(l>o){const t=l;l=o,o=t}return i<=X?n.set(0,0,0,0):Math.abs(o-l)>Q-X?n.set(-i,-i,i,i):(Wi(l,o,i,n),Wi(l,o,r,n)),n}needUpdateTags(t){return super.needUpdateTags(t,Io)}needUpdateTag(t){return super.needUpdateTag(t,Io)}toCustomPath(){const t=this.attribute,{startAngle:e,endAngle:n}=this.getParsedAngle();let i=t.innerRadius-(t.innerPadding||0),r=t.outerRadius-(t.outerPadding||0);const s=Z(n-e),a=n>e;if(r<i){const t=r;r=i,i=t}const o=new Pn;if(r<=X)o.moveTo(0,0);else if(s>=Q-X)o.moveTo(0+r*tt(e),0+r*it(e)),o.arc(0,0,r,e,n,!a),i>X&&(o.moveTo(0+i*tt(n),0+i*it(n)),o.arc(0,0,i,n,e,a));else{const t=r*tt(e),s=r*it(e),l=i*tt(n),u=i*it(n);o.moveTo(0+t,0+s),o.arc(0,0,r,e,n,!a),o.lineTo(0+l,0+u),o.arc(0,0,i,n,e,a),o.closePath()}return o}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function Do(){!function(){if(null==No)try{const t=document.createElement("canvas"),e=t.getContext("2d");No=!!(window&&t.getBoundingClientRect&&requestAnimationFrame&&window.devicePixelRatio&&e&&e.isPointInPath&&e.isPointInStroke),No&&(No=!!document.createElement)}catch(t){No=!1}}();const t=ti.global&&ti.global.env;return t?"browser"===t:No}Uo.NOWORK_ANIMATE_ATTR=Object.assign({cap:1},sr);var zo=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a};let Wo=class{configure(t){t.env===this.type&&t.setActiveEnvContribution(this)}getNativeAABBBounds(t){return new ct}removeDom(t){return!1}createDom(t){return null}updateDom(t,e){return!1}getDynamicCanvasCount(){return 999}getStaticCanvasCount(){return 999}getElementById(t){return document.getElementById(t)}getRootElement(){return document.body}loadJson(t){const e=fetch(t).then((t=>t.json()));return e.then((t=>({data:t,state:"success"}))).catch((()=>({data:null,state:"fail"}))),e}loadArrayBuffer(t){return fetch(t).then((t=>t.arrayBuffer())).then((t=>({data:t,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}loadBlob(t){return fetch(t).then((t=>t.blob())).then((t=>({data:t,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}getElementTop(t,e){return 0}getElementLeft(t,e){return 0}getElementTopLeft(t,e){return{top:0,left:0}}};Wo=zo([Qt()],Wo);let Fo=!1;const jo=new Wt((t=>{Fo||(Fo=!0,t(Ls).toSelf().inSingletonScope(),t(Js).to(Ls).inSingletonScope(),t(Zs).toService(Js),t(_s).toSelf(),t(xs).toSelf(),t(Hr).toService(_s),t(Hr).toService(xs),t(Hr).toService(ps),ge(t,Hr))}));let Ho=!1;const $o=new Wt((t=>{Ho||(Ho=!0,t(Us).toSelf().inSingletonScope(),t(ta).to(Us).inSingletonScope(),t(Zs).toService(ta),t($r).toService(ps),ge(t,$r))}));let Go=!1;const Vo=new Wt((t=>{Go||(Go=!0,t(ea).to(Vs).inSingletonScope(),t(Zs).toService(ea),t(Gr).toService(ps),ge(t,Gr))}));var Xo=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},Yo=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Ko=class extends os{constructor(){super(),this.numberType=Mr,this.builtinContributions=[js],this.init()}drawShape(t,e,n,i,r){const s=xi(t).richtext,{strokeOpacity:a=s.strokeOpacity,opacity:o=s.opacity,fillOpacity:l=s.fillOpacity,visible:u=s.visible}=t.attribute;if(!t.valid||!u)return;const h=Wr(o,l,!0),c=Wr(o,a,!0);h&&(e.translate(n,i),this.beforeRenderStep(t,e,n,i,h,c,h,c,s,r),t.getFrameCache().draw(e,this.drawIcon),this.afterRenderStep(t,e,n,i,h,c,h,c,s,r))}drawIcon(t,e,n,i,r){var s;const a=xi(t).richtextIcon,{width:o=a.width,height:l=a.height,opacity:u=a.opacity,image:h,backgroundFill:c=a.backgroundFill,backgroundFillOpacity:d=a.backgroundFillOpacity,backgroundStroke:f=a.backgroundStroke,backgroundStrokeOpacity:p=a.backgroundStrokeOpacity,backgroundRadius:g=a.backgroundRadius,margin:m}=t.attribute,{backgroundWidth:b=o,backgroundHeight:y=l}=t.attribute;if(m&&(n+=t._marginArray[3],i+=t._marginArray[0]),t._hovered){const t=(b-o)/2,r=(y-l)/2;0===g?(e.beginPath(),e.rect(n-t,i-r,b,y)):(e.beginPath(),bs(e,n-t,i-r,b,y,g)),c&&(e.globalAlpha=d,e.fillStyle=c,e.fill()),f&&(e.globalAlpha=p,e.strokeStyle=f,e.stroke())}const v=h&&(null===(s=null==t?void 0:t.resources)||void 0===s?void 0:s.get(h));v&&"success"===v.state&&(e.globalAlpha=u,e.drawImage(v.data,n,i,o,l))}draw(t,e,n){const i=xi(t).richtext;this._draw(t,i,!1,n)}};Ko=Xo([Qt(),Yo("design:paramtypes",[])],Ko);let qo=!1;const Qo=new Wt((t=>{qo||(qo=!0,t(na).to(Ko).inSingletonScope(),t(Zs).toService(na))}));let Zo=!1;const Jo=new Wt((t=>{Zo||(Zo=!0,t(ia).to(Qs).inSingletonScope(),t(Zs).toService(ia),t(jr).toService(ps),ge(t,jr))}));class tl{constructor(){this.name="HtmlAttributePlugin",this.activeEvent="onRegister",this._uid=zt.GenAutoIncrementId(),this.key=this.name+this._uid,this.htmlMap={},this.renderId=0}activate(t){this.pluginService=t,t.stage.hooks.afterRender.tap(this.key,(e=>{e&&e===this.pluginService.stage&&this.drawHTML(t.stage.renderService)}))}deactivate(t){t.stage.hooks.afterRender.taps=t.stage.hooks.afterRender.taps.filter((t=>t.name!==this.key)),ti.graphicService.hooks.onRemove.unTap(this.key),ti.graphicService.hooks.onRelease.unTap(this.key),this.release()}getWrapContainer(t,e,n){let i;return i=e?"string"==typeof e?ti.global.getElementById(e):e:t.window.getContainer(),{wrapContainer:ti.global.createDom(Object.assign({tagName:"div",parent:i},n)),nativeContainer:i}}parseDefaultStyleFromGraphic(t){return function(t){const e={},n=t=>/^\d+(\.\d+)?$/.test(`${t}`)?`${t}px`:`${t}`;return["textAlign","fontFamily","fontVariant","fontStyle","fontWeight"].forEach((n=>{t[n]&&(e[kt(n)]=t[n])})),["fontSize","lineHeight"].forEach((i=>{const r=kt(i);p(t[i])||(e[r]=n(t[i]))})),g(t.maxLineWidth)&&(e["max-width"]=n(t.maxLineWidth)),t.underline?e["text-decoration"]="underline":t.lineThrough&&(e["text-decoration"]="line-through"),t.fill&&v(t.fill)&&(e.color=t.fill),e}("text"===t.type&&t.attribute?t.attribute:xi(t).text)}getTransformOfText(t){const e=xi(t).text,{textAlign:n=e.textAlign,textBaseline:i=e.textBaseline}=t.attribute,r=t.globalTransMatrix.toTransformAttrs(),{rotateDeg:s,scaleX:a,scaleY:o}=r,l={left:"0",start:"0",end:"-100%",center:"-50%",right:"-100%",top:"0",middle:"-50%",bottom:"-100%",alphabetic:"-79%"},u={left:"0",start:"0",end:"100%",center:"50%",right:"100%",top:"0",middle:"50%",bottom:"100%",alphabetic:"79%"};return{textAlign:n,transform:`translate(${l[n]},${l[i]}) rotate(${s}deg) scaleX(${a}) scaleY(${o})`,transformOrigin:`${u[n]} ${u[i]}`}}updateStyleOfWrapContainer(t,e,n,i,r){const{pointerEvents:s}=r;let a=this.parseDefaultStyleFromGraphic(t);a.display=!1!==t.attribute.visible?"block":"none",a.pointerEvents=!0===s?"all":s||"none",n.style.position||(n.style.position="absolute",i.style.position="relative");let o=0,l=0;const u=t.globalAABBBounds;let h=r.anchorType;if(p(h)&&(h="text"===t.type?"position":"boundsLeftTop"),"boundsLeftTop"===h&&(h="top-left"),"position"===h||u.empty()){const e=t.globalTransMatrix;o=e.e,l=e.f}else{const t=Bt(u,h);o=t.x,l=t.y}const c=ti.global.getElementTopLeft(i,!1),d=e.window.getTopLeft(!1),g=e.viewBox,b=o+d.left-c.left+g.x1,y=l+d.top-c.top+g.y1;if(a.left=`${b}px`,a.top=`${y}px`,"text"===t.type&&"position"===h&&(a=Object.assign(Object.assign({},a),this.getTransformOfText(t))),f(r.style)){const e=r.style({top:y,left:b,width:u.width(),height:u.height()},t,n);e&&(a=Object.assign(Object.assign({},a),e))}else m(r.style)?a=Object.assign(Object.assign({},a),r.style):v(r.style)&&r.style&&(a=Object.assign(Object.assign({},a),Ct(r.style)));ti.global.updateDom(n,{width:r.width,height:r.width,style:a})}clearCacheContainer(){this.htmlMap&&Object.keys(this.htmlMap).forEach((t=>{this.htmlMap[t]&&this.htmlMap[t].renderId!==this.renderId&&this.removeElement(t)})),this.renderId+=1}drawHTML(t){"browser"===ti.global.env&&(t.renderTreeRoots.sort(((t,e)=>{var n,i;return(null!==(n=t.attribute.zIndex)&&void 0!==n?n:zn.zIndex)-(null!==(i=e.attribute.zIndex)&&void 0!==i?i:zn.zIndex)})).forEach((t=>{this.renderGroupHTML(t)})),this.clearCacheContainer())}renderGroupHTML(t){this.renderGraphicHTML(t),t.forEachChildren((t=>{t.isContainer?this.renderGroupHTML(t):this.renderGraphicHTML(t)}))}removeElement(t){if(!this.htmlMap||!this.htmlMap[t])return;const{wrapContainer:e}=this.htmlMap[t];e&&ti.global.removeDom(e),this.htmlMap[t]=null}renderGraphicHTML(t){var e;const{html:n}=t.attribute;if(!n)return;const i=t.stage;if(!i)return;const{dom:r,container:s}=n;if(!r)return;const a=p(n.id)?`${null!==(e=t.id)&&void 0!==e?e:t._uid}_react`:n.id;if(this.htmlMap&&this.htmlMap[a]&&s&&s!==this.htmlMap[a].container&&this.removeElement(a),this.htmlMap&&this.htmlMap[a])"string"==typeof r?this.htmlMap[a].wrapContainer.innerHTML=r:r!==this.htmlMap[a].wrapContainer.firstChild&&(this.htmlMap[a].wrapContainer.removeChild(this.htmlMap[a].wrapContainer.firstChild),this.htmlMap[a].wrapContainer.appendChild(r));else{const{wrapContainer:t,nativeContainer:e}=this.getWrapContainer(i,s);t&&("string"==typeof r?t.innerHTML=r:t.appendChild(r),this.htmlMap||(this.htmlMap={}),this.htmlMap[a]={wrapContainer:t,nativeContainer:e,container:s,renderId:this.renderId})}if(!this.htmlMap||!this.htmlMap[a])return;const{wrapContainer:o,nativeContainer:l}=this.htmlMap[a];this.updateStyleOfWrapContainer(t,i,o,l,n),this.htmlMap[a].renderId=this.renderId}release(){"browser"===ti.global.env&&this.removeAllDom(this.pluginService.stage.defaultLayer)}removeAllDom(t){this.htmlMap&&(Object.keys(this.htmlMap).forEach((t=>{this.removeElement(t)})),this.htmlMap=null)}}class el extends tl{constructor(){super(...arguments),this.name="ReactAttributePlugin",this.activeEvent="onRegister",this._uid=zt.GenAutoIncrementId(),this.key=this.name+this._uid,this.htmlMap={}}removeElement(t){if(!this.htmlMap||!this.htmlMap[t])return;const{root:e,wrapContainer:n,unmount:i}=this.htmlMap[t];e?ti.global.getRequestAnimationFrame()((()=>{e.unmount()})):i&&i(),n&&ti.global.removeDom(n),this.htmlMap[t]=null}renderGraphicHTML(t){var e;const{react:n}=t.attribute;if(!n)return;const i=t.stage;if(!i)return;const r=i.params.ReactDOM,{element:s,container:a}=n;if(!s||!r||!r.createRoot&&!r.render)return;const o=p(n.id)?`${null!==(e=t.id)&&void 0!==e?e:t._uid}_react`:n.id;if(this.htmlMap&&this.htmlMap[o]&&a&&a!==this.htmlMap[o].container&&this.removeElement(o),this.htmlMap&&this.htmlMap[o])r.createRoot?this.htmlMap[o].root.render(s):r.render(s,this.htmlMap[o].wrapContainer);else{const{wrapContainer:t,nativeContainer:e}=this.getWrapContainer(i,a);if(t)if(this.htmlMap||(this.htmlMap={}),r.createRoot){const n=r.createRoot(t);n.render(s),this.htmlMap[o]={root:n,wrapContainer:t,nativeContainer:e,container:a,renderId:this.renderId}}else r.render(s,t),this.htmlMap[o]={wrapContainer:t,nativeContainer:e,container:a,renderId:this.renderId,unmount:()=>{r.unmountComponentAtNode(t)}}}if(!this.htmlMap||!this.htmlMap[o])return;const{wrapContainer:l,nativeContainer:u}=this.htmlMap[o];this.updateStyleOfWrapContainer(t,i,l,u,n),this.htmlMap[o].renderId=this.renderId}}const nl=["x","y","dx","dy","scaleX","scaleY","angle","anchor","postMatrix","visible","clip","pickable","childrenPickable","zIndex","cursor"];class il extends Nr{constructor(t,e){super(t),(null==e?void 0:e.mode)&&(this.mode=e.mode,this.setMode(e.mode)),(null==e?void 0:e.skipDefault)&&(this.skipDefault=!0),this.setTheme({common:{strokeBoundsBuffer:0}}),this.attribute=t,this.onSetStage((()=>{this.render(),this.bindEvents()}))}setAttribute(t,e,n){y(this.attribute[t])&&y(e)&&!f(this.attribute[t])&&!f(e)?N(this.attribute[t],e):this.attribute[t]=e,nl.includes(t)||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!n&&!this.needUpdateTag(t)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}setAttributes(t,e){const n=Object.keys(t);this._mergeAttributes(t,n),n.every((t=>nl.includes(t)))||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!e&&!this.needUpdateTags(n)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}_mergeAttributes(t,e){p(e)&&(e=Object.keys(t));for(let n=0;n<e.length;n++){const i=e[n];!y(this.attribute[i])||f(this.attribute[i])||f(t[i])?this.attribute[i]=t[i]:N(this.attribute[i],t[i])}}bindEvents(){}_getNodeId(t){var e;return`${null!==(e=this.id)&&void 0!==e?e:this._uid}-${this.name}-${t}`}_dispatchEvent(t,e){var n;const i=new wi(t,e);i.manager=null===(n=this.stage)||void 0===n?void 0:n.eventSystem.manager,this.dispatchEvent(i)}}const rl=Symbol.for("MathPickerContribution"),sl=Symbol.for("MathImagePicker"),al=Symbol.for("MathRectPicker"),ol=Symbol.for("MathSymbolPicker"),ll=Symbol.for("MathTextPicker"),ul=Symbol.for("CanvasImagePicker"),hl=Symbol.for("CanvasRectPicker"),cl=Symbol.for("CanvasSymbolPicker"),dl=Symbol.for("CanvasTextPicker"),fl=Symbol.for("CanvasRichTextPicker"),pl=Symbol.for("CanvasPickerContribution"),gl={onPointerDown:"pointerdown",onPointerUp:"pointerup",onPointerUpOutside:"pointerupoutside",onPointerTap:"pointertap",onPointerOver:"pointerover",onPointerMove:"pointermove",onPointerEnter:"pointerenter",onPointerLeave:"pointerleave",onPointerOut:"pointerout",onMouseDown:"mousedown",onMouseUp:"mouseup",onMouseUpOutside:"mouseupoutside",onMouseMove:"mousemove",onMouseOver:"mouseover",onMouseOut:"mouseout",onMouseEnter:"mouseenter",onMouseLeave:"mouseleave",onPinch:"pinch",onPinchStart:"pinchstart",onPinchEnd:"pinchend",onPan:"pan",onPanStart:"panstart",onPanEnd:"panend",onDrag:"drag",onDragStart:"dragstart",onDragEnter:"dragenter",onDragLeave:"dragleave",onDragOver:"dragover",onDragEnd:"dragend",onRightDown:"rightdown",onRightUp:"rightup",onRightUpOutside:"rightupoutside",onTouchStart:"touchstart",onTouchEnd:"touchend",onTouchEndOutside:"touchendoutside",onTouchMove:"touchmove",onTouchCancel:"touchcancel",onPress:"press",onPressUp:"pressup",onPressEnd:"pressend",onSwipe:"swipe",onDrop:"drop",onWeel:"wheel",onClick:"click",onDblClick:"dblclick"};var ml=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},bl=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class yl{get x1(){return this.dom.getBoundingClientRect().left}get x2(){return this.dom.getBoundingClientRect().right}get y1(){return this.dom.getBoundingClientRect().top}get y2(){return this.dom.getBoundingClientRect().bottom}get width(){return this.dom.getBoundingClientRect().width}get height(){return this.dom.getBoundingClientRect().height}constructor(t){this.dom=t}}function vl(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("img");if(n.crossOrigin="anonymous",e){const e=new Blob([t],{type:"image/svg+xml"});t=window.URL.createObjectURL(e)}return n.src=t,n.complete?Promise.resolve(n):new Promise(((t,e)=>{n.onload=()=>{t(n)},n.onerror=()=>{e(new Error("加载失败"))}}))}let xl=class extends Wo{constructor(){super(),this.type="browser",this.supportEvent=!0;try{this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.supportsMouseEvents=!!globalThis.MouseEvent}catch(t){this.supportsTouchEvents=!1,this.supportsPointerEvents=!1,this.supportsPointerEvents=!1}this.applyStyles=!0}mapToCanvasPoint(t,e){var n,i;let r=0,s=0,a=0,o=0;if(t.changedTouches){const e=null!==(n=t.changedTouches[0])&&void 0!==n?n:{};r=e.clientX||0,s=e.clientY||0,a=r,o=s}else r=t.clientX||0,s=t.clientY||0,a=t.offsetX||0,o=t.offsetY||0;if(e){const t=r,n=s,a=e.getBoundingClientRect(),o=null===(i=e.getNativeHandler)||void 0===i?void 0:i.call(e).nativeCanvas;let l,u;return o&&(l=a.width/o.offsetWidth,u=a.height/o.offsetHeight),{x:(t-a.left)/(S(l)?l:1),y:(n-a.top)/(S(u)?u:1)}}return{x:a,y:o}}getNativeAABBBounds(t){let e=t;if("string"==typeof t&&(e=(new DOMParser).parseFromString(t,"text/html").firstChild,e.lastChild&&(e=e.lastChild.firstChild)),e.getBoundingClientRect){const t=e.getBoundingClientRect();return new yl(t)}return new ct}removeDom(t){return t.parentElement.removeChild(t),!0}updateDom(t,e){const{width:n,height:i,style:r}=e;return r&&(v(r)?t.setAttribute("style",r):Object.keys(r).forEach((e=>{t.style[e]=r[e]}))),null!=n&&(t.style.width=`${n}px`),null!=i&&(t.style.height=`${i}px`),!0}createDom(t){const{tagName:e="div",parent:n}=t,i=document.createElement(e);if(this.updateDom(i,t),n){const t=v(n)?this.getElementById(n):n;t&&t.appendChild&&t.appendChild(i)}return i}loadImage(t){return vl(t,!1).then((t=>({data:t,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}loadSvg(t){return vl(t,!0).then((t=>({data:t,loadState:"success"}))).catch((()=>({data:null,loadState:"fail"})))}createCanvas(t){var e,n;const i=document.createElement("canvas");t.id&&(i.id=null!==(e=t.id)&&void 0!==e?e:zt.GenAutoIncrementId().toString());const r=null!==(n=t.dpr)&&void 0!==n?n:window.devicePixelRatio;return t.width&&t.height&&(i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,i.width=t.width*r,i.height=t.height*r),i}createOffscreenCanvas(t){var e;const n=null!==(e=t.dpr)&&void 0!==e?e:window.devicePixelRatio;return new OffscreenCanvas(t.width*n,t.height*n)}releaseCanvas(t){let e;e="string"==typeof t?document.getElementById(t):t,e&&e.parentElement&&e.parentElement.removeChild(e)}getDevicePixelRatio(){return window.devicePixelRatio}getRequestAnimationFrame(){return window.requestAnimationFrame}getCancelAnimationFrame(){return window.cancelAnimationFrame}addEventListener(t,e,n){return document.addEventListener(t,e,n)}removeEventListener(t,e,n){return document.removeEventListener(t,e,n)}dispatchEvent(t){return document.dispatchEvent(t)}getElementById(t){return document.getElementById(t)}getRootElement(){return document.body}getDocument(){return document}release(){}getElementTop(t,e){let n=t.offsetTop,i=t.offsetParent;for(;null!==i;)n+=i.offsetTop,i=i.offsetParent;return n}getElementLeft(t,e){let n=t.offsetLeft,i=t.offsetParent;for(;null!==i;)n+=i.offsetLeft,i=i.offsetParent;return n}getElementTopLeft(t,e){let n=t.offsetTop,i=t.offsetLeft,r=t.offsetParent;for(;null!==r;)n+=r.offsetTop,i+=r.offsetLeft,r=r.offsetParent;return{top:n,left:i}}};xl=ml([Qt(),bl("design:paramtypes",[])],xl);class _l{contains(t,e,n){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;const{pickContext:i}=null!=n?n:{};if(!i)return!1;const r=t.getGraphicTheme();i.highPerformanceSave();let{x:s=r.x,y:a=r.y}=t.attribute;if(t.transMatrix.onlyTranslate()){const e=t.getOffsetXY(r);s+=e.x,a+=e.y,i.setTransformForCurrent()}else s=0,a=0,i.transformFromMatrix(t.transMatrix,!0);let o=!1;return this.canvasRenderer.drawShape(t,i,s,a,{},null,((t,n,i)=>!!o||(o=t.isPointInPath(e.x,e.y),o)),((t,n,r)=>{if(o)return!0;const s=n.lineWidth||r.lineWidth,a=n.pickStrokeBuffer||r.pickStrokeBuffer;return i.lineWidth=ls(i,s+a,i.dpr),o=t.isPointInStroke(e.x,e.y),o})),i.highPerformanceRestore(),o}}var Al=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a};let Sl=class{constructor(){this.type="image",this.numberType=Cr}contains(t,e,n){const{pickContext:i}=null!=n?n:{};return!!i&&!!t.AABBBounds.containsPoint(e)}};Sl=Al([Qt()],Sl);let wl=!1;const Tl=new Wt(((t,e,n,i)=>{wl||(wl=!0,t(sl).to(Sl).inSingletonScope(),t(Sl).toService(sl))})),Bl=new ct;class Cl{constructor(){this.type="rect",this.numberType=kr}contains(t,e,n){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;const{pickContext:i}=null!=n?n:{};if(!i)return!1;const r=t.getGraphicTheme(),{cornerRadius:s=r.cornerRadius}=t.attribute;let{x:a=r.x,y:o=r.y}=t.attribute;i.highPerformanceSave();let l=!0;if(t.transMatrix.onlyTranslate()){const e=t.getOffsetXY(r);a+=e.x,o+=e.y,i.setTransformForCurrent()}else a=0,o=0,l=!1,i.transformFromMatrix(t.transMatrix,!0);let u=!0;if(!l||t.shadowRoot||A(s,!0)&&0!==s||x(s)&&s.some((t=>0!==t)))u=!1,this.canvasRenderer.drawShape(t,i,a,o,{},null,((t,n,i)=>!!u||(u=t.isPointInPath(e.x,e.y),u)),((t,n,r)=>{if(u)return!0;const s=n.lineWidth||r.lineWidth,a=n.pickStrokeBuffer||r.pickStrokeBuffer;return i.lineWidth=ls(i,s+a,i.dpr),u=t.isPointInStroke(e.x,e.y),u}));else{const{fill:n=r.fill,stroke:i=r.stroke,lineWidth:s=r.lineWidth}=t.attribute;if(n)u=!0;else if(i){const n=t.AABBBounds;Bl.setValue(n.x1,n.y1,n.x2,n.y2),Bl.expand(-s/2),u=!Bl.containsPoint(e)}}return i.highPerformanceRestore(),u}}var kl=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},Ml=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Pl=function(t,e){return function(n,i){e(n,i,t)}};let El=class extends Cl{constructor(t){super(),this.canvasRenderer=t}};El=kl([Qt(),Pl(0,Kt(Js)),Ml("design:paramtypes",[Object])],El);let Ol=!1;const Ll=new Wt(((t,e,n,i)=>{Ol||(Ol=!0,t(al).to(El).inSingletonScope(),t(rl).toService(al))}));let Rl=!1;const Il=new Wt(((t,e,n,i)=>{Rl||(Rl=!0,t(sl).to(Sl).inSingletonScope(),t(Sl).toService(sl))}));var Nl=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},Ul=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Dl=function(t,e){return function(n,i){e(n,i,t)}};let zl=class extends _l{constructor(t){super(),this.canvasRenderer=t,this.type="symbol",this.numberType=Pr}};zl=Nl([Qt(),Dl(0,Kt(ta)),Ul("design:paramtypes",[Object])],zl);let Wl=!1;const Fl=new Wt(((t,e,n,i)=>{Wl||(Wl=!0,t(ol).to(zl).inSingletonScope(),t(rl).toService(ol))}));var jl=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a};let Hl=class{constructor(){this.type="text",this.numberType=Er}contains(t,e,n){return!!t.AABBBounds.containsPoint(e)}};Hl=jl([Qt()],Hl);let $l=!1;const Gl=new Wt(((t,e,n,i)=>{$l||($l=!0,t(ll).to(Hl).inSingletonScope(),t(rl).toService(ll))}));var Vl=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},Xl=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yl=function(t,e){return function(n,i){e(n,i,t)}};let Kl=class extends Cl{constructor(t){super(),this.canvasRenderer=t}};Kl=Vl([Qt(),Yl(0,Kt(Js)),Xl("design:paramtypes",[Object])],Kl);let ql=!1;const Ql=new Wt(((t,e,n,i)=>{ql||(ql=!0,t(hl).to(Kl).inSingletonScope(),t(pl).toService(hl))}));class Zl extends os{contains(t,e,n){const{pickContext:i}=null!=n?n:{};if(!i)return!1;const r=t.getGraphicTheme();i.highPerformanceSave();const s=this.transform(t,r,i),{x:a,y:o,z:l,lastModelMatrix:u}=s;let h=e;if(i.camera){h=e.clone();const n=t.parent.globalTransMatrix;h.x=n.a*e.x+n.c*e.y+n.e,h.y=n.b*e.x+n.d*e.y+n.f}this.canvasRenderer.z=l;let c=!1;return this.canvasRenderer.drawShape(t,i,a,o,n,null,((t,e,n)=>!!c||(c=t.isPointInPath(h.x,h.y),c))),this.canvasRenderer.z=0,i.modelMatrix!==u&&ts.free(i.modelMatrix),i.modelMatrix=u,i.highPerformanceRestore(),c}}var Jl=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},tu=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},eu=function(t,e){return function(n,i){e(n,i,t)}};let nu=class extends Zl{constructor(t){super(),this.canvasRenderer=t,this.type="symbol",this.numberType=Pr}contains(t,e,n){const{pickContext:i}=null!=n?n:{};if(!i)return!1;const r=t.getParsedPath();if(!i.camera){if(!t.AABBBounds.containsPoint(e))return!1;if(r.isSvg||"imprecise"===t.attribute.pickMode)return!0}i.highPerformanceSave();const s=t.getGraphicTheme(),a=this.transform(t,s,i),{x:o,y:l,z:u,lastModelMatrix:h}=a;let c=e;if(i.camera){c=e.clone();const n=t.parent.globalTransMatrix;c.x=n.a*e.x+n.c*e.y+n.e,c.y=n.b*e.x+n.d*e.y+n.f}this.canvasRenderer.z=u;let d=!1;return this.canvasRenderer.drawShape(t,i,o,l,{},null,((t,e,n)=>!!d||(d=t.isPointInPath(c.x,c.y),d)),((t,e,n)=>{if(d)return!0;const r=e.lineWidth||n.lineWidth,s=e.pickStrokeBuffer||n.pickStrokeBuffer;return i.lineWidth=ls(i,r+s,i.dpr),d=t.isPointInStroke(c.x,c.y),d})),this.canvasRenderer.z=0,i.modelMatrix!==h&&ts.free(i.modelMatrix),i.modelMatrix=h,i.highPerformanceRestore(),d}};nu=Jl([Qt(),eu(0,Kt(ta)),tu("design:paramtypes",[Object])],nu);let iu=!1;const ru=new Wt(((t,e,n,i)=>{iu||(iu=!0,t(cl).to(nu).inSingletonScope(),t(pl).toService(cl))}));var su=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},au=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ou=function(t,e){return function(n,i){e(n,i,t)}};let lu=class extends Zl{constructor(t){super(),this.canvasRenderer=t,this.type="text",this.numberType=Er}contains(t,e,n){const{pickContext:i}=null!=n?n:{};if(!i)return!1;const r=t.AABBBounds;if(!i.camera)return!!r.containsPoint(e);i.highPerformanceSave();const s=t.getGraphicTheme(),{keepDirIn3d:a=s.keepDirIn3d}=t.attribute,o=!a,l=this.transform(t,s,i,o),{x:u,y:h,z:c,lastModelMatrix:d}=l;this.canvasRenderer.z=c;let f=e;if(i.camera){f=e.clone();const n=t.parent.globalTransMatrix;f.x=n.a*e.x+n.c*e.y+n.e,f.y=n.b*e.x+n.d*e.y+n.f}let p=!1;return this.canvasRenderer.drawShape(t,i,u,h,{},null,((e,n,i)=>{if(p)return!0;const{fontSize:r=s.fontSize,textBaseline:a=s.textBaseline,textAlign:o=s.textAlign}=t.attribute,l=t.AABBBounds,d=l.height(),g=l.width(),m=Yr(a,d,r),b=Xr(o,g);return e.rect(b+u,m+h,g,d,c),p=e.isPointInPath(f.x,f.y),p}),((t,e,n)=>p)),this.canvasRenderer.z=0,i.modelMatrix!==d&&ts.free(i.modelMatrix),i.modelMatrix=d,i.highPerformanceRestore(),p}};lu=su([Qt(),ou(0,Kt(ea)),au("design:paramtypes",[Object])],lu);let uu=!1;const hu=new Wt(((t,e,n,i)=>{uu||(uu=!0,t(dl).to(lu).inSingletonScope(),t(pl).toService(dl))}));var cu=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},du=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},fu=function(t,e){return function(n,i){e(n,i,t)}};let pu=class{constructor(t){this.canvasRenderer=t,this.type="richtext",this.numberType=Mr}contains(t,e,n){return!!t.AABBBounds.containsPoint(e)}};pu=cu([Qt(),fu(0,Kt(na)),du("design:paramtypes",[Object])],pu);let gu=!1;const mu=new Wt(((t,e,n,i)=>{gu||(gu=!0,t(fl).to(pu).inSingletonScope(),t(pl).toService(fl))}));var bu=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a};let yu=class{constructor(){this.type="image",this.numberType=Cr}contains(t,e,n){const{pickContext:i}=null!=n?n:{};return!!i&&!!t.AABBBounds.containsPoint(e)}};yu=bu([Qt()],yu);let vu=!1;const xu=new Wt(((t,e,n,i)=>{vu||(vu=!0,t(ul).to(yu).inSingletonScope(),t(pl).toService(ul))})),_u=Do();function Au(){Au.__loaded||(Au.__loaded=!0,zs.RegisterGraphicCreator("group",Ur))}Au.__loaded=!1;const Su=Au;function wu(){wu.__loaded||(wu.__loaded=!0,zs.RegisterGraphicCreator("image",Mo),hi.load(Jo),hi.load(_u?xu:Tl))}wu.__loaded=!1;const Tu=wu;function Bu(){Bu.__loaded||(Bu.__loaded=!0,zs.RegisterGraphicCreator("rect",wo),hi.load(jo),hi.load(_u?Ql:Ll))}Bu.__loaded=!1;const Cu=Bu;function ku(){ku.__loaded||(ku.__loaded=!0,zs.RegisterGraphicCreator("richtext",Ro),hi.load(Qo),hi.load(_u?mu:Il))}ku.__loaded=!1;const Mu=ku;function Pu(){Pu.__loaded||(Pu.__loaded=!0,zs.RegisterGraphicCreator("symbol",_o),hi.load($o),hi.load(_u?ru:Fl))}Pu.__loaded=!1;const Eu=Pu;function Ou(){Ou.__loaded||(Ou.__loaded=!0,zs.RegisterGraphicCreator("text",la),hi.load(Vo),hi.load(_u?hu:Gl))}Ou.__loaded=!1;const Lu=Ou;function Ru(){Ru.__loaded||(Ru.__loaded=!0,zs.RegisterGraphicCreator("wrapText",ca))}Ru.__loaded=!1;const Iu=Ru,Nu="PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";var Uu;function Du(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return{width:0,height:0};const i=Fs({text:t,fontFamily:e.fontFamily||n.fontFamily||Nu,fontSize:e.fontSize||n.fontSize||12,fontWeight:e.fontWeight||n.fontWeight,textAlign:e.textAlign||"center",textBaseline:e.textBaseline,ellipsis:!!e.ellipsis,maxLineWidth:e.maxLineWidth||1/0,lineHeight:e.fontSize||n.fontSize||12});return{width:i.width(),height:i.height()}}function zu(t){return"rich"===function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type";var n,i;return m(t.text)&&"type"in t.text?null!==(n=t.text.type)&&void 0!==n?n:"text":e in t&&null!==(i=t[e])&&void 0!==i?i:"text"}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type")}!function(t){t.selected="selected",t.selectedReverse="selected_reverse",t.hover="hover",t.hoverReverse="hover_reverse"}(Uu||(Uu={})),Uu.selectedReverse,Uu.selected,Uu.hover,Uu.hoverReverse;var Wu=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n};Su(),Cu(),Eu(),Mu(),Lu();let Fu=class t extends il{getBgRect(){return this._bgRect}getTextShape(){return this._textShape}constructor(e,n){super((null==n?void 0:n.skipDefault)?e:N({},t.defaultAttributes,e)),this.name="tag",this._tagStates=[],this._rectStates=[],this._symbolStates=[],this._textStates=[]}render(){var t,e,n;this.cacheStates();const{text:i="",textStyle:r={},shape:s={},panel:a={},space:o=4,minWidth:l,maxWidth:u,padding:h=4,visible:c,state:f,type:b,textAlwaysCenter:y,containerTextAlign:v}=this.attribute,_=function(t){if(S(t))return[t,t,t,t];if(x(t)){const e=t.length;if(1===e){const e=t[0];return[e,e,e,e]}if(2===e){const[e,n]=t;return[e,n,e,n]}if(3===e){const[e,n,i]=t;return[e,n,i,n]}if(4===e)return t}if(m(t)){const{top:e=0,right:n=0,bottom:i=0,left:r=0}=t;return[e,n,i,r]}return[0,0,0,0]}(h),w=this.createOrUpdateChild("tag-content",{x:0,y:0,zIndex:1},"group");let T,B=_[1]+_[3],C=_[0]+_[2],k=0,M=0;const{visible:E}=s,O=Wu(s,["visible"]);if(d(E)){const t=(null==O?void 0:O.size)||10,e=A(t)?t:Math.max(t[0],t[1]);T=w.createOrUpdateChild("tag-shape",Object.assign(Object.assign({symbolType:"circle",size:t,strokeBoundsBuffer:0},O),{visible:E,x:e/2,y:e/2}),"symbol"),P(null==f?void 0:f.shape)||(T.states=f.shape),E&&(M=e+o)}let L;if(B+=M,k+=M,zu({text:i})||"rich"===b){const t=Object.assign(Object.assign(Object.assign({},function(t){var e,n;return t.width=null!==(e=t.width)&&void 0!==e?e:0,t.height=null!==(n=t.height)&&void 0!==n?n:0,t.maxWidth=t.maxLineWidth,t.textConfig=t.text.text||t.text,t}(Object.assign({type:b,text:i},r))),r),{visible:g(i)&&!1!==c,x:k,y:0});L=w.createOrUpdateChild("tag-text",t,"richtext");const{visible:e}=a,n=Wu(a,["visible"]);if(c&&d(e)){const t=this.createOrUpdateChild("tag-panel",Object.assign(Object.assign({},n),{visible:e&&!!i,x:L.AABBBounds.x1,y:L.AABBBounds.y1,width:L.AABBBounds.width(),height:L.AABBBounds.height()}),"rect");if(P(null==f?void 0:f.panel)||(t.states=f.panel),n.customShape){const e=n.customShape;t.pathProxy=t=>e(L.attribute,t,new Pn)}this._bgRect=t}}else{const o=Object.assign(Object.assign({text:m(i)&&"type"in i&&"text"===i.type?i.text:i,visible:g(i)&&!1!==c,lineHeight:null==r?void 0:r.fontSize},r),{x:k,y:0});p(o.lineHeight)&&(o.lineHeight=r.fontSize),L=w.createOrUpdateChild("tag-text",o,"text"),P(null==f?void 0:f.text)||(L.states=f.text);const h=Du(o.text,r,null===(e=null===(t=this.stage)||void 0===t?void 0:t.getTheme())||void 0===e?void 0:e.text),b=h.width,x=h.height;B+=b;const S=null!==(n=s.size)&&void 0!==n?n:10,E=A(S)?S:Math.max(S[0],S[1]);C+=Math.max(x,s.visible?E:0);const{textAlign:O,textBaseline:R}=r;(g(l)||g(u))&&(g(l)&&B<l&&(B=l),g(u)&&B>u&&(B=u,L.setAttribute("maxLineWidth",u-_[1]-_[2])));let I=0,N=0,U=0;"left"===O||"start"===O?U=1:"right"===O||"end"===O?U=-1:"center"===O&&(U=0),U?U<0?(I-=B,T&&T.setAttribute("x",(T.attribute.x||0)-b),w.setAttribute("x",-_[1]-M)):U>0&&w.setAttribute("x",_[3]):(I-=B/2,T&&T.setAttribute("x",(T.attribute.x||0)-b/2),w.setAttribute("x",-M/2));const D="right"===v||"end"===v,z="left"===v||"start"===v;if((v?"center"===v:y)&&U){const t=B-_[1]-_[3],e=b+M,n=1===U?(t-e)/2+M+b/2:_[0]+M-(B/2+e/2-M)+b/2;if(L.setAttributes({x:n,textAlign:"center"}),T){const t=n-b/2-M+E/2;T.setAttributes({x:t})}}if(z&&1!==U){const t=B-_[1]-_[3],e=0===U?-t/2+M/2:-B+_[3]+_[1]+M,n=e+M;if(L.setAttributes({x:n,textAlign:"left"}),T){const t=e+E/2;T.setAttributes({x:t})}}if(D&&-1!==U){const t=B-_[1]-_[3],e=0===U?t/2+M/2:t;if(L.setAttributes({x:e,textAlign:"right"}),T){const t=e-b-M+E/2;T.setAttributes({x:t})}}"middle"===R?(N-=C/2,T&&T.setAttribute("y",0)):"bottom"===R?(N-=C,T&&T.setAttribute("y",-x/2),w.setAttribute("y",-_[2])):"top"===R&&(w.setAttribute("y",_[0]),T&&T.setAttribute("y",x/2));const{visible:W}=a,F=Wu(a,["visible"]);if(c&&d(W)){const t=this.createOrUpdateChild("tag-panel",Object.assign(Object.assign({},F),{visible:W&&!!i,x:I,y:N,width:B,height:C}),"rect");if(P(null==f?void 0:f.panel)||(t.states=f.panel),F.customShape){const e=F.customShape;t.pathProxy=t=>e(L.attribute,t,new Pn)}this._bgRect=t}}this._textShape=L,this._symbol=T,this.resetStates()}initAttributes(e,n){e=(null==n?void 0:n.skipDefault)?e:N({},t.defaultAttributes,e),super.initAttributes(e),this.render()}addState(t,e,n){super.addState(t,e,n),this._textShape&&this._textShape.addState(t,e,n),this._bgRect&&this._bgRect.addState(t,e,n),this._symbol&&this._symbol.addState(t,e,n)}removeState(t,e){super.removeState(t,e),this._textShape&&this._textShape.removeState(t,e),this._bgRect&&this._bgRect.removeState(t,e),this._symbol&&this._symbol.removeState(t,e)}cacheStates(){var t,e,n,i,r,s,a,o,l,u,h,c,d,f;this._tagStates=null!==(e=null===(t=this.currentStates)||void 0===t?void 0:t.slice())&&void 0!==e?e:[],this._rectStates=null!==(r=null===(i=null===(n=this._bgRect)||void 0===n?void 0:n.currentStates)||void 0===i?void 0:i.slice())&&void 0!==r?r:[],this._symbolStates=null!==(o=null===(a=null===(s=this._symbol)||void 0===s?void 0:s.currentStates)||void 0===a?void 0:a.slice())&&void 0!==o?o:[],this._textStates=null!==(h=null===(u=null===(l=this._textShape)||void 0===l?void 0:l.currentStates)||void 0===u?void 0:u.slice())&&void 0!==h?h:[],this.clearStates(),null===(c=this._bgRect)||void 0===c||c.clearStates(),null===(d=this._symbol)||void 0===d||d.clearStates(),null===(f=this._textShape)||void 0===f||f.clearStates()}resetStates(){var t,e,n;this._tagStates.length&&this.useStates(this._tagStates),this._rectStates.length&&(null===(t=this._bgRect)||void 0===t||t.useStates(this._rectStates)),this._symbolStates.length&&(null===(e=this._symbol)||void 0===e||e.useStates(this._symbolStates)),this._textStates.length&&(null===(n=this._textShape)||void 0===n||n.useStates(this._textStates))}};Fu.defaultAttributes={visible:!0,textStyle:{fontSize:12,fill:"#000",textAlign:"left",textBaseline:"top"},space:4,padding:4,shape:{fill:"#000"}};Su(),Cu(),Lu(),Tu();class ju extends il{constructor(t,e){super((null==e?void 0:e.skipDefault)?t:N({},ju.defaultAttributes,t)),this._handlePointerUp=()=>{this.attribute.disabled||(this.attribute.checked?(this.setAttribute("checked",!1),this.setAttribute("indeterminate",!1)):(this.setAttribute("checked",!0),this.setAttribute("indeterminate",!1)),this._dispatchEvent("checkbox_state_change",{eventType:"checkbox_state_change",checked:this.attribute.checked}),this.stage.renderNextFrame())},this.renderGroup(),this.onBeforeAttributeUpdate=(t,e,n)=>{"interactive"in t&&this.setAttribute("pickable",t.interactive),"disabled"in t&&this.setAttribute("cursor",t.disable?this.attribute.disableCursor:this.attribute.cursor)},this.addEventListener("pointerup",this._handlePointerUp)}render(){this.removeAllChild(!0),this.renderBox(),this.renderIcon(),this.renderText(),this.layout()}renderBox(){this._box=new So(N({},this.attribute.box));const t=this.attribute.checked||this.attribute.indeterminate;t&&this.attribute.disabled?this._box.setAttributes({fill:this.attribute.box.disableCheckedFill,stroke:this.attribute.box.disableCheckedStroke}):t&&this._box.setAttributes({fill:this.attribute.box.checkedFill,stroke:this.attribute.box.checkedStroke}),this.appendChild(this._box)}renderIcon(){this._checkIcon=new ko(N({image:this.attribute.icon.checkIconImage},this.attribute.icon)),this.appendChild(this._checkIcon),this._indeterminateIcon=new ko(N({image:this.attribute.icon.indeterminateIconImage},this.attribute.icon)),this.appendChild(this._indeterminateIcon),this.attribute.checked?(this._checkIcon.setAttribute("visible",!0),this._indeterminateIcon.setAttribute("visible",!1)):this.attribute.indeterminate?(this._checkIcon.setAttribute("visible",!1),this._indeterminateIcon.setAttribute("visible",!0)):(this._checkIcon.setAttribute("visible",!1),this._indeterminateIcon.setAttribute("visible",!1))}renderText(){this._text=new oa(N({wrap:!0},this.attribute.text)),this.attribute.disabled&&this._text.setAttribute("fill",this.attribute.text.disableFill),this.appendChild(this._text)}renderGroup(){this.attribute.interactive||this.setAttribute("pickable",!1),this.attribute.disabled&&this.setAttribute("cursor",this.attribute.disableCursor)}layout(){const t=this.attribute.box.height,e=this.attribute.icon.height,n=this._text.AABBBounds.height(),i=Math.max(t,e,n),r=i/2-t/2,s=i/2-e/2,a=i/2-n/2,o=this.attribute.box.width,l=this.attribute.icon.width,u=Math.max(o,l),h=u/2-o/2,c=u/2-l/2,d=u+this.attribute.spaceBetweenTextAndIcon;this._box.setAttributes({x:h,y:r}),this._checkIcon.setAttributes({x:c,y:s}),this._indeterminateIcon.setAttributes({x:c,y:s}),this._text.setAttributes({x:d,y:a})}initAttributes(t,e){t=(null==e?void 0:e.skipDefault)?t:N({},ju.defaultAttributes,t),super.initAttributes(t),this.renderGroup(),this.render()}}ju.defaultAttributes={interactive:!0,disabled:!1,checked:!1,indeterminate:!1,cursor:"pointer",disableCursor:"not-allowed",spaceBetweenTextAndIcon:8,text:{text:"text",fontSize:14,fill:"#000",disableFill:"rgb(201,205,212)",textBaseline:"top",pickable:!1},icon:{checkIconImage:'<svg width="200" height="200" viewBox="0 0 1024 1024" fill="#fff" xmlns="http://www.w3.org/2000/svg"><path d="M877.44815445 206.10060629a64.72691371 64.72691371 0 0 0-95.14856334 4.01306852L380.73381888 685.46812814 235.22771741 533.48933518a64.72691371 64.72691371 0 0 0-92.43003222-1.03563036l-45.82665557 45.82665443a64.72691371 64.72691371 0 0 0-0.90617629 90.61767965l239.61903446 250.10479331a64.72691371 64.72691371 0 0 0 71.19960405 15.14609778 64.33855261 64.33855261 0 0 0 35.08198741-21.23042702l36.24707186-42.71976334 40.5190474-40.77795556-3.36579926-3.49525333 411.40426297-486.74638962a64.72691371 64.72691371 0 0 0-3.88361443-87.64024149l-45.3088404-45.43829334z"></path></svg>',indeterminateIconImage:'<svg width="200" height="200" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5" d="M5 12h14"/></svg>',width:10,height:10,pickable:!1},box:{width:14,height:14,cornerRadius:2,fill:"#fff",stroke:"rgb(229,230,235)",disableFill:"rgb(242,243,245)",checkedFill:"rgb(22, 93, 255)",checkedStroke:"rgb(22, 93, 255)",disableCheckedFill:"rgb(148, 191, 255)",disableCheckedStroke:"rgb(148, 191, 255)",pickable:!1}},Su(),Cu(),Iu(),Tu();let Hu=class t extends il{constructor(e,n){super((null==n?void 0:n.skipDefault)?e:N({},t.defaultAttributes,e)),this._handlePointerUp=()=>{this.attribute.disabled||this.attribute.checked||(this.setAttribute("checked",!0),this._dispatchEvent("radio_checked",{eventType:"radio_checked",target:this}),this.stage.renderNextFrame())},this.renderGroup(),this.onBeforeAttributeUpdate=(t,e,n)=>{"interactive"in t&&this.setAttribute("pickable",t.interactive),"disabled"in t&&this.setAttribute("cursor",t.disable?this.attribute.disableCursor:this.attribute.cursor)},this.addEventListener("pointerup",this._handlePointerUp)}render(){this.removeAllChild(!0),this.renderCircle(),this.renderText(),this.layout()}renderCircle(){this._circle=new Uo(N({},this.attribute.circle));const t=this.attribute.checked;t&&this.attribute.disabled?this._circle.setAttributes({fill:this.attribute.circle.disableCheckedFill,stroke:this.attribute.circle.disableCheckedStroke}):t&&this._circle.setAttributes({fill:this.attribute.circle.checkedFill,stroke:this.attribute.circle.checkedStroke}),this.appendChild(this._circle)}renderText(){this._text=new ha(N({},this.attribute.text)),this.attribute.disabled&&this._text.setAttribute("fill",this.attribute.text.disableFill),this.appendChild(this._text)}renderGroup(){this.attribute.interactive||this.setAttribute("pickable",!1),this.attribute.disabled&&this.setAttribute("cursor",this.attribute.disableCursor)}layout(){const t=2*(this.attribute.circle.outerRadius+this.attribute.circle.lineWidth),e=this._text.AABBBounds.height(),n=Math.max(t,e),i=n/2-t/2+this.attribute.circle.outerRadius+this.attribute.circle.lineWidth,r=n/2-e/2,s=2*(this.attribute.circle.outerRadius+this.attribute.circle.lineWidth),a=this.attribute.circle.outerRadius+this.attribute.circle.lineWidth,o=s+this.attribute.spaceBetweenTextAndIcon;this._circle.setAttributes({x:a,y:i}),this._text.setAttributes({x:o,y:r})}initAttributes(e,n){e=(null==n?void 0:n.skipDefault)?e:N({},t.defaultAttributes,e),super.initAttributes(e),this.renderGroup(),this.render()}};Hu.defaultAttributes={interactive:!0,disabled:!1,checked:!1,cursor:"pointer",disableCursor:"not-allowed",spaceBetweenTextAndIcon:8,text:{text:"text",fontSize:14,fill:"#000",disableFill:"rgb(201,205,212)",textBaseline:"top",pickable:!1},circle:{outerRadius:7,innerRadius:3,startAngle:0,endAngle:2*Math.PI,lineWidth:1,fill:"#fff",stroke:"rgb(229,230,235)",disableFill:"rgb(242,243,245)",checkedFill:"rgb(22, 93, 255)",checkedStroke:"rgb(22, 93, 255)",disableCheckedFill:"rgb(148, 191, 255)",disableCheckedStroke:"rgb(148, 191, 255)",pickable:!1}};class $u extends el{removeElement(t){super.removeElement(t),delete this.htmlMap[t]}renderGraphicHTML(t){const{react:e}=t.attribute;if(!e)return;const n=t.stage;if(!n)return;const i=n.params.ReactDOM,{element:r,container:s}=e;if(!(r&&i&&i.createRoot))return;const a=p(e.id)?`${t.id??t._uid}_react`:e.id;if(this.htmlMap&&this.htmlMap[a]&&s&&s!==this.htmlMap[a].container&&this.removeElement(a),this.htmlMap&&this.htmlMap[a])this.htmlMap[a].root.render(r);else{const{wrapContainer:t,nativeContainer:e}=this.getWrapContainer(n,s);if(t){const n=i.createRoot(t);n.render(r),this.htmlMap||(this.htmlMap={}),this.htmlMap[a]={root:n,wrapContainer:t,nativeContainer:e,container:s,renderId:this.renderId}}}if(!this.htmlMap||!this.htmlMap[a])return;const{wrapContainer:o,nativeContainer:l}=this.htmlMap[a];this.updateStyleOfWrapContainer(t,n,o,l,e),this.htmlMap[a].renderId=this.renderId}getWrapContainer(t,e,n){let i;return i=e?"string"==typeof e?ti.global.getElementById(e):e:t.window.getContainer(),{wrapContainer:ti.global.createDom({tagName:"div",parent:i,...n}),nativeContainer:i}}updateStyleOfWrapContainer(t,e,n,i,r){const{pointerEvents:s}=r;let a=this.parseDefaultStyleFromGraphic(t);a.display=!1!==t.attribute.visible?"block":"none",a.pointerEvents=!0===s?"all":s||"none",n.style.position||(n.style.position="absolute",i.style.position="relative");let o=0,l=0;const u=t.globalAABBBounds;let h=r.anchorType;if(p(h)&&(h="text"===t.type?"position":"boundsLeftTop"),"boundsLeftTop"===h&&(h="top-left"),"position"===h||u.empty()){const e=t.globalTransMatrix;o=e.e,l=e.f}else{const t=Bt(u,h);o=t.x,l=t.y}const c=ti.global.getElementTopLeft(i,!1),d=e.window.getTopLeft(!1),g=o+d.left-c.left,b=l+d.top-c.top;if(a.left=`${g}px`,a.top=`${b}px`,"text"===t.type&&"position"===h&&(a={...a,...this.getTransformOfText(t)}),f(r.style)){const e=r.style({top:b,left:g,width:u.width(),height:u.height()},t,n);e&&(a={...a,...e})}else m(r.style)?a={...a,...r.style}:v(r.style)&&r.style&&(a={...a,...Ct(r.style)});ti.global.updateDom(n,{width:r.width,height:r.width,style:a,graphic:t})}}const Gu=new Wt(((t,e,n,i)=>{t(Vu).toSelf().inSingletonScope(),n(ye)?i(ye).toService(Vu):t(ye).toService(Vu)}));class Vu extends xl{updateDom(t,n){const i=t.parentElement;if(i){const r=parseInt(n.style.top,10),s=parseInt(n.style.left,10);let a,o;if(t.style.display="none"){const t=e.getTargetCell(n.graphic);a=t.attribute.width??1,o=t.attribute.height??1}else a=t.offsetWidth,o=t.offsetHeight;if(r+o<0||s+a<0||r>i.offsetHeight||s>i.offsetWidth)return t.style.display="none",!1}const{width:r,height:s,style:a}=n;return a&&(v(a)?t.setAttribute("style",a):Object.keys(a).forEach((e=>{t.style[e]=a[e]}))),null!=r&&(t.style.width=`${r}px`),null!=s&&(t.style.height=`${s}px`),!0}}Do()&&hi.load(Gu);const Xu=["children","hooks","ref",...Nt,"skipFunctionDiff","onError","onReady","option","records","container","vtableConstrouctor"],Yu=(t,e)=>`${t&&t.type&&(t.type.displayName||t.type.name)}-${e}`,Ku=o.forwardRef(((t,e)=>{const[n,i]=a.useState(0),r=a.useRef({});a.useImperativeHandle(e,(()=>r.current?.table));const s=!!t.option,u=!!t.records,h=a.useRef(!1),c=a.useRef(U(t,Xu)),d=a.useRef(null),f=a.useRef(t.records),g=o.useRef(null),m=!!t.skipFunctionDiff,b=a.useCallback((t=>s&&t.option?u&&t.records?{...t.option,clearDOM:!1,records:t.records}:{...t.option,clearDOM:!1}:{records:t.records,...c.current,...d.current,clearDOM:!1,customConfig:{createReactContainer:!0}}),[s,u]),y=a.useCallback((t=>{const e=new t.vtableConstrouctor(t.container,b(t));e.scenegraph.stage.reactAttribute=t.ReactDOM,e.scenegraph.stage.pluginService.register(new $u),e.scenegraph.stage.params.ReactDOM=t.ReactDOM,r.current={...r.current,table:e},h.current=!1}),[b]),v=a.useCallback((()=>{if(!h.current){if(!r.current||!r.current.table)return;Dt(r.current.table,t,g.current,It),i(n+1),t.onReady&&t.onReady(r.current.table,0===n)}}),[n,i,t]),x=a.useCallback((()=>{r.current.table&&(r.current.table.render(),v())}),[v]);return a.useEffect((()=>{const e=s?null:(t=>{const e={};return Lt(t.children).map(((t,n)=>{const i=t&&t.type&&t.type.parseOption;if(i&&t.props){const r=i(p(t.props.componentId)?{...t.props,componentId:Yu(t,n)}:t.props);r.isSingle?e[r.optionName]=r.option:(e[r.optionName]||(e[r.optionName]=[]),e[r.optionName].push(r.option))}})),e})(t);if(!r.current?.table)return s||(d.current=e),y(t),x(),void(g.current=t);if(s)return void(W(g.current.option,t.option,{skipFunction:m})?u&&!W(g.current.records,t.records,{skipFunction:m})&&(r.current.table.setRecords(t.records),v(),g.current=t):(r.current.table.updateOption(b(t)),v(),g.current=t));const n=U(t,Xu);W(n,c.current,{skipFunction:m})&&W(e,d.current,{skipFunction:m})?u&&!W(t.records,f.current,{skipFunction:m})&&(f.current=t.records,r.current.table.setRecords(t.records),v(),g.current=t):(c.current=n,d.current=e,r.current.table.updateOption(b(t)),v(),g.current=t)}),[y,s,u,b,v,x,m,t]),a.useEffect((()=>()=>{r&&r.current&&r.current.table&&(r.current.table.release(),r.current=null),g.current=null,h.current=!0}),[]),o.createElement(l.Provider,{value:r.current},Lt(t.children).map(((t,e)=>{if("string"==typeof t)return;const i=Yu(t,e);return o.createElement(o.Fragment,{key:i},o.cloneElement(t,{updateId:n,componentId:i,componentIndex:e}))})))})),qu=(t,e,n)=>{const i=function(t,e="TableContainer",n){const i=o.forwardRef(((e,i)=>{const r=a.useRef(),[s,l]=a.useState(!1),{className:u,style:h,width:c,...d}=e;return a.useLayoutEffect((()=>{l(!0)}),[]),o.createElement("div",{ref:r,className:u,style:{position:"relative",height:e.height||"100%",width:e.width||"100%",...h}},s?o.createElement(t,{ref:i,container:r.current,...n?n(d):d}):o.createElement(o.Fragment,null))}));return i.displayName=e||t.name,i}(Ku,t,(t=>e?Object.assign(t,e):t));return i.displayName=t,i},Qu=qu("ListTable",{type:"list-table",vtableConstrouctor:e.ListTable}),Zu=qu("PivotTable",{type:"pivot-table",vtableConstrouctor:e.PivotTable}),Ju=qu("PivotChart",{type:"pivot-chart",vtableConstrouctor:e.PivotChart});const th=qu("ListTable",{type:"list-table",vtableConstrouctor:e.ListTableSimple}),eh=qu("PivotTable",{type:"pivot-table",vtableConstrouctor:e.PivotTableSimple});var nh,ih,rh,sh,ah={exports:{}},oh={exports:{}},lh={};function uh(){return ih||(ih=1,oh.exports=(nh||(nh=1,function(t){function e(t,e){var n=t.length;t.push(e);t:for(;0<n;){var i=n-1>>>1,s=t[i];if(!(0<r(s,e)))break t;t[i]=e,t[n]=s,n=i}}function n(t){return 0===t.length?null:t[0]}function i(t){if(0===t.length)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var i=0,s=t.length,a=s>>>1;i<a;){var o=2*(i+1)-1,l=t[o],u=o+1,h=t[u];if(0>r(l,n))u<s&&0>r(h,l)?(t[i]=h,t[u]=n,i=u):(t[i]=l,t[o]=n,i=o);else{if(!(u<s&&0>r(h,n)))break t;t[i]=h,t[u]=n,i=u}}}return e}function r(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var l=[],u=[],h=1,c=null,d=3,f=!1,p=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function v(t){for(var r=n(u);null!==r;){if(null===r.callback)i(u);else{if(!(r.startTime<=t))break;i(u),r.sortIndex=r.expirationTime,e(l,r)}r=n(u)}}function x(t){if(g=!1,v(t),!p)if(null!==n(l))p=!0,O(_);else{var e=n(u);null!==e&&L(x,e.startTime-t)}}function _(e,r){p=!1,g&&(g=!1,b(T),T=-1),f=!0;var s=d;try{for(v(r),c=n(l);null!==c&&(!(c.expirationTime>r)||e&&!k());){var a=c.callback;if("function"==typeof a){c.callback=null,d=c.priorityLevel;var o=a(c.expirationTime<=r);r=t.unstable_now(),"function"==typeof o?c.callback=o:c===n(l)&&i(l),v(r)}else i(l);c=n(l)}if(null!==c)var h=!0;else{var m=n(u);null!==m&&L(x,m.startTime-r),h=!1}return h}finally{c=null,d=s,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var A,S=!1,w=null,T=-1,B=5,C=-1;function k(){return!(t.unstable_now()-C<B)}function M(){if(null!==w){var e=t.unstable_now();C=e;var n=!0;try{n=w(!0,e)}finally{n?A():(S=!1,w=null)}}else S=!1}if("function"==typeof y)A=function(){y(M)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,E=P.port2;P.port1.onmessage=M,A=function(){E.postMessage(null)}}else A=function(){m(M,0)};function O(t){w=t,S||(S=!0,A())}function L(e,n){T=m((function(){e(t.unstable_now())}),n)}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(t){t.callback=null},t.unstable_continueExecution=function(){p||f||(p=!0,O(_))},t.unstable_forceFrameRate=function(t){0>t||125<t||(B=0<t?Math.floor(1e3/t):5)},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(t){switch(d){case 1:case 2:case 3:var e=3;break;default:e=d}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_scheduleCallback=function(i,r,s){var a=t.unstable_now();switch(s="object"==typeof s&&null!==s&&"number"==typeof(s=s.delay)&&0<s?a+s:a,i){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return i={id:h++,callback:r,priorityLevel:i,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>a?(i.sortIndex=s,e(u,i),null===n(l)&&i===n(u)&&(g?(b(T),T=-1):g=!0,L(x,s-a))):(i.sortIndex=o,e(l,i),p||f||(p=!0,O(_))),i},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(t){var e=d;return function(){var n=d;d=e;try{return t.apply(this,arguments)}finally{d=n}}}}(lh)),lh)),oh.exports}
|
|
29
2
|
/**
|
|
30
3
|
* @license React
|
|
31
4
|
* react-reconciler.production.min.js
|
|
@@ -34,13 +7,4 @@
|
|
|
34
7
|
*
|
|
35
8
|
* This source code is licensed under the MIT license found in the
|
|
36
9
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var hc,fc={exports:{}};"production"===production?nc.exports=(lc||(lc=1,sc=function(e){var t={},n=l,r=dc(),i=Object.assign;function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s=Symbol.for("react.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),S=Symbol.iterator;function _(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=S&&e[S]||e["@@iterator"])?e:null}function w(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case u:return"Portal";case h:return"Profiler";case d:return"StrictMode";case m:return"Suspense";case y:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return(e.displayName||"Context")+".Consumer";case f:return(e._context.displayName||"Context")+".Provider";case g:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case v:return null!==(t=e.displayName||null)?t:w(e.type)||"Memo";case b:t=e._payload,e=e._init;try{return w(e(t))}catch(e){}}return null}function A(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return w(t);case 8:return t===d?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function k(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function T(e){if(k(e)!==e)throw Error(a(188))}function B(e){var t=e.alternate;if(!t){if(null===(t=k(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return T(i),e;if(o===r)return T(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function C(e){return null!==(e=B(e))?E(e):null}function E(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=E(e);if(null!==t)return t;e=e.sibling}return null}function P(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){if(4!==e.tag){var t=P(e);if(null!==t)return t}e=e.sibling}return null}var R,M=Array.isArray,L=e.getPublicInstance,O=e.getRootHostContext,I=e.getChildHostContext,N=e.prepareForCommit,U=e.resetAfterCommit,D=e.createInstance,z=e.appendInitialChild,j=e.finalizeInitialChildren,F=e.prepareUpdate,W=e.shouldSetTextContent,H=e.createTextInstance,$=e.scheduleTimeout,V=e.cancelTimeout,G=e.noTimeout,Y=e.isPrimaryRenderer,q=e.supportsMutation,Q=e.supportsPersistence,X=e.supportsHydration,K=e.getInstanceFromNode,Z=e.preparePortalMount,J=e.getCurrentEventPriority,ee=e.detachDeletedInstance,te=e.supportsMicrotasks,ne=e.scheduleMicrotask,re=e.supportsTestSelectors,ie=e.findFiberRoot,ae=e.getBoundingRect,oe=e.getTextContent,se=e.isHiddenSubtree,le=e.matchAccessibilityRole,ue=e.setFocusIfFocusable,ce=e.setupIntersectionObserver,de=e.appendChild,he=e.appendChildToContainer,fe=e.commitTextUpdate,pe=e.commitMount,ge=e.commitUpdate,me=e.insertBefore,ye=e.insertInContainerBefore,ve=e.removeChild,be=e.removeChildFromContainer,xe=e.resetTextContent,Se=e.hideInstance,_e=e.hideTextInstance,we=e.unhideInstance,Ae=e.unhideTextInstance,ke=e.clearContainer,Te=e.cloneInstance,Be=e.createContainerChildSet,Ce=e.appendChildToContainerChildSet,Ee=e.finalizeContainerChildren,Pe=e.replaceContainerChildren,Re=e.cloneHiddenInstance,Me=e.cloneHiddenTextInstance,Le=e.canHydrateInstance,Oe=e.canHydrateTextInstance,Ie=e.canHydrateSuspenseInstance,Ne=e.isSuspenseInstancePending,Ue=e.isSuspenseInstanceFallback,De=e.getSuspenseInstanceFallbackErrorDetails,ze=e.registerSuspenseInstanceRetry,je=e.getNextHydratableSibling,Fe=e.getFirstHydratableChild,We=e.getFirstHydratableChildWithinContainer,He=e.getFirstHydratableChildWithinSuspenseInstance,$e=e.hydrateInstance,Ve=e.hydrateTextInstance,Ge=e.hydrateSuspenseInstance,Ye=e.getNextHydratableInstanceAfterSuspenseInstance,qe=e.commitHydratedContainer,Qe=e.commitHydratedSuspenseInstance,Xe=e.clearSuspenseBoundary,Ke=e.clearSuspenseBoundaryFromContainer,Ze=e.shouldDeleteUnhydratedTailInstances,Je=e.didNotMatchHydratedContainerTextInstance,et=e.didNotMatchHydratedTextInstance;function tt(e){if(void 0===R)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||""}return"\n"+R+e}var nt=!1;function rt(e,t){if(!e||nt)return"";nt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{nt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?tt(e):""}var it=Object.prototype.hasOwnProperty,at=[],ot=-1;function st(e){return{current:e}}function lt(e){0>ot||(e.current=at[ot],at[ot]=null,ot--)}function ut(e,t){ot++,at[ot]=e.current,e.current=t}var ct={},dt=st(ct),ht=st(!1),ft=ct;function pt(e,t){var n=e.type.contextTypes;if(!n)return ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function gt(e){return null!=e.childContextTypes}function mt(){lt(ht),lt(dt)}function yt(e,t,n){if(dt.current!==ct)throw Error(a(168));ut(dt,t),ut(ht,n)}function vt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,A(e)||"Unknown",o));return i({},n,r)}function bt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ct,ft=dt.current,ut(dt,e),ut(ht,ht.current),!0}function xt(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=vt(e,t,ft),r.__reactInternalMemoizedMergedChildContext=e,lt(ht),lt(dt),ut(dt,e)):lt(ht),ut(ht,n)}var St=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(_t(e)/wt|0)|0},_t=Math.log,wt=Math.LN2,At=64,kt=4194304;function Tt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=Tt(s):0!=(a&=o)&&(r=Tt(a))}else 0!=(o=n&~i)?r=Tt(o):0!==a&&(r=Tt(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-St(t)),r|=e[n],t&=~i;return r}function Ct(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Et(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Pt(){var e=At;return 0==(4194240&(At<<=1))&&(At=64),e}function Rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-St(t)]=n}function Lt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-St(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ot=0;function It(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Nt=r.unstable_scheduleCallback,Ut=r.unstable_cancelCallback,Dt=r.unstable_shouldYield,zt=r.unstable_requestPaint,jt=r.unstable_now,Ft=r.unstable_ImmediatePriority,Wt=r.unstable_UserBlockingPriority,Ht=r.unstable_NormalPriority,$t=r.unstable_IdlePriority,Vt=null,Gt=null,Yt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},qt=null,Qt=!1,Xt=!1;function Kt(e){null===qt?qt=[e]:qt.push(e)}function Zt(){if(!Xt&&null!==qt){Xt=!0;var e=0,t=Ot;try{var n=qt;for(Ot=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}qt=null,Qt=!1}catch(t){throw null!==qt&&(qt=qt.slice(e+1)),Nt(Ft,Zt),t}finally{Ot=t,Xt=!1}}return null}var Jt=[],en=0,tn=null,nn=0,rn=[],an=0,on=null,sn=1,ln="";function un(e,t){Jt[en++]=nn,Jt[en++]=tn,tn=e,nn=t}function cn(e,t,n){rn[an++]=sn,rn[an++]=ln,rn[an++]=on,on=e;var r=sn;e=ln;var i=32-St(r)-1;r&=~(1<<i),n+=1;var a=32-St(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,sn=1<<32-St(t)+i|n<<i|r,ln=a+e}else sn=1<<a|n<<i|r,ln=e}function dn(e){null!==e.return&&(un(e,1),cn(e,1,0))}function hn(e){for(;e===tn;)tn=Jt[--en],Jt[en]=null,nn=Jt[--en],Jt[en]=null;for(;e===on;)on=rn[--an],rn[an]=null,ln=rn[--an],rn[an]=null,sn=rn[--an],rn[an]=null}var fn=null,pn=null,gn=!1,mn=!1,yn=null;function vn(e,t){var n=as(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function bn(e,t){switch(e.tag){case 5:return null!==(t=Le(t,e.type,e.pendingProps))&&(e.stateNode=t,fn=e,pn=Fe(t),!0);case 6:return null!==(t=Oe(t,e.pendingProps))&&(e.stateNode=t,fn=e,pn=null,!0);case 13:if(null!==(t=Ie(t))){var n=null!==on?{id:sn,overflow:ln}:null;return e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=as(18,null,null,0)).stateNode=t,n.return=e,e.child=n,fn=e,pn=null,!0}return!1;default:return!1}}function xn(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Sn(e){if(gn){var t=pn;if(t){var n=t;if(!bn(e,t)){if(xn(e))throw Error(a(418));t=je(n);var r=fn;t&&bn(e,t)?vn(r,n):(e.flags=-4097&e.flags|2,gn=!1,fn=e)}}else{if(xn(e))throw Error(a(418));e.flags=-4097&e.flags|2,gn=!1,fn=e}}}function _n(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;fn=e}function wn(e){if(!X||e!==fn)return!1;if(!gn)return _n(e),gn=!0,!1;if(3!==e.tag&&(5!==e.tag||Ze(e.type)&&!W(e.type,e.memoizedProps))){var t=pn;if(t){if(xn(e))throw An(),Error(a(418));for(;t;)vn(e,t),t=je(t)}}if(_n(e),13===e.tag){if(!X)throw Error(a(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));pn=Ye(e)}else pn=fn?je(e.stateNode):null;return!0}function An(){for(var e=pn;e;)e=je(e)}function kn(){X&&(pn=fn=null,mn=gn=!1)}function Tn(e){null===yn?yn=[e]:yn.push(e)}var Bn=o.ReactCurrentBatchConfig;function Cn(e,t){if(Yt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!it.call(t,i)||!Yt(e[i],t[i]))return!1}return!0}function En(e){switch(e.tag){case 5:return tt(e.type);case 16:return tt("Lazy");case 13:return tt("Suspense");case 19:return tt("SuspenseList");case 0:case 2:case 15:return rt(e.type,!1);case 11:return rt(e.type.render,!1);case 1:return rt(e.type,!0);default:return""}}function Pn(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Rn(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Mn(e){return(0,e._init)(e._payload)}function Ln(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=ss(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=2),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=ds(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n,r){var a=n.type;return a===c?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===b&&Mn(a)===t.type)?((r=i(t,n.props)).ref=Pn(e,t,n),r.return=e,r):((r=ls(n.type,n.key,n.props,null,e.mode,r)).ref=Pn(e,t,n),r.return=e,r)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=hs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,a){return null===t||7!==t.tag?((t=us(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function g(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=ds(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case s:return(n=ls(t.type,t.key,t.props,null,e.mode,n)).ref=Pn(e,null,t),n.return=e,n;case u:return(t=hs(t,e.mode,n)).return=e,t;case b:return g(e,(0,t._init)(t._payload),n)}if(M(t)||_(t))return(t=us(t,e.mode,n,null)).return=e,t;Rn(e,t)}return null}function m(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case s:return n.key===i?h(e,t,n,r):null;case u:return n.key===i?f(e,t,n,r):null;case b:return m(e,t,(i=n._init)(n._payload),r)}if(M(n)||_(n))return null!==i?null:p(e,t,n,r,null);Rn(e,n)}return null}function y(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return d(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case s:return h(t,e=e.get(null===r.key?n:r.key)||null,r,i);case u:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i);case b:return y(e,t,n,(0,r._init)(r._payload),i)}if(M(r)||_(r))return p(t,e=e.get(n)||null,r,i,null);Rn(t,r)}return null}function v(i,a,s,l){for(var u=null,c=null,d=a,h=a=0,f=null;null!==d&&h<s.length;h++){d.index>h?(f=d,d=null):f=d.sibling;var p=m(i,d,s[h],l);if(null===p){null===d&&(d=f);break}e&&d&&null===p.alternate&&t(i,d),a=o(p,a,h),null===c?u=p:c.sibling=p,c=p,d=f}if(h===s.length)return n(i,d),gn&&un(i,h),u;if(null===d){for(;h<s.length;h++)null!==(d=g(i,s[h],l))&&(a=o(d,a,h),null===c?u=d:c.sibling=d,c=d);return gn&&un(i,h),u}for(d=r(i,d);h<s.length;h++)null!==(f=y(d,i,h,s[h],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?h:f.key),a=o(f,a,h),null===c?u=f:c.sibling=f,c=f);return e&&d.forEach((function(e){return t(i,e)})),gn&&un(i,h),u}function x(i,s,l,u){var c=_(l);if("function"!=typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var d=c=null,h=s,f=s=0,p=null,v=l.next();null!==h&&!v.done;f++,v=l.next()){h.index>f?(p=h,h=null):p=h.sibling;var b=m(i,h,v.value,u);if(null===b){null===h&&(h=p);break}e&&h&&null===b.alternate&&t(i,h),s=o(b,s,f),null===d?c=b:d.sibling=b,d=b,h=p}if(v.done)return n(i,h),gn&&un(i,f),c;if(null===h){for(;!v.done;f++,v=l.next())null!==(v=g(i,v.value,u))&&(s=o(v,s,f),null===d?c=v:d.sibling=v,d=v);return gn&&un(i,f),c}for(h=r(i,h);!v.done;f++,v=l.next())null!==(v=y(h,i,f,v.value,u))&&(e&&null!==v.alternate&&h.delete(null===v.key?f:v.key),s=o(v,s,f),null===d?c=v:d.sibling=v,d=v);return e&&h.forEach((function(e){return t(i,e)})),gn&&un(i,f),c}return function e(r,a,o,d){if("object"==typeof o&&null!==o&&o.type===c&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case s:e:{for(var h=o.key,f=a;null!==f;){if(f.key===h){if((h=o.type)===c){if(7===f.tag){n(r,f.sibling),(a=i(f,o.props.children)).return=r,r=a;break e}}else if(f.elementType===h||"object"==typeof h&&null!==h&&h.$$typeof===b&&Mn(h)===f.type){n(r,f.sibling),(a=i(f,o.props)).ref=Pn(r,f,o),a.return=r,r=a;break e}n(r,f);break}t(r,f),f=f.sibling}o.type===c?((a=us(o.props.children,r.mode,d,o.key)).return=r,r=a):((d=ls(o.type,o.key,o.props,null,r.mode,d)).ref=Pn(r,a,o),d.return=r,r=d)}return l(r);case u:e:{for(f=o.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=hs(o,r.mode,d)).return=r,r=a}return l(r);case b:return e(r,a,(f=o._init)(o._payload),d)}if(M(o))return v(r,a,o,d);if(_(o))return x(r,a,o,d);Rn(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=ds(o,r.mode,d)).return=r,r=a),l(r)):n(r,a)}}var On=Ln(!0),In=Ln(!1),Nn=st(null),Un=null,Dn=null,zn=null;function jn(){zn=Dn=Un=null}function Fn(e,t,n){Y?(ut(Nn,t._currentValue),t._currentValue=n):(ut(Nn,t._currentValue2),t._currentValue2=n)}function Wn(e){var t=Nn.current;lt(Nn),Y?e._currentValue=t:e._currentValue2=t}function Hn(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function $n(e,t){Un=e,zn=Dn=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Mi=!0),e.firstContext=null)}function Vn(e){var t=Y?e._currentValue:e._currentValue2;if(zn!==e)if(e={context:e,memoizedValue:t,next:null},null===Dn){if(null===Un)throw Error(a(308));Dn=e,Un.dependencies={lanes:0,firstContext:e}}else Dn=Dn.next=e;return t}var Gn=null;function Yn(e){null===Gn?Gn=[e]:Gn.push(e)}function qn(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Yn(t)):(n.next=i.next,i.next=n),t.interleaved=n,Qn(e,r)}function Qn(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Xn=!1;function Kn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Jn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function er(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&eo)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Qn(e,n)}return null===(i=r.interleaved)?(t.next=t,Yn(r)):(t.next=i.next,i.next=t),r.interleaved=t,Qn(e,n)}function tr(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Lt(e,n)}}function nr(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function rr(e,t,n,r){var a=e.updateQueue;Xn=!1;var o=a.firstBaseUpdate,s=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var u=l,c=u.next;u.next=null,null===s?o=c:s.next=c,s=u;var d=e.alternate;null!==d&&(l=(d=d.updateQueue).lastBaseUpdate)!==s&&(null===l?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u)}if(null!==o){var h=a.baseState;for(s=0,d=c=u=null,l=o;;){var f=l.lane,p=l.eventTime;if((r&f)===f){null!==d&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,m=l;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(g=m.payload)){h=g.call(p,h,f);break e}h=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=m.payload)?g.call(p,h,f):g))break e;h=i({},h,f);break e;case 2:Xn=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=a.effects)?a.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===d?(c=d=p,u=h):d=d.next=p,s|=f;if(null===(l=l.next)){if(null===(l=a.shared.pending))break;l=(f=l).next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}if(null===d&&(u=h),a.baseState=u,a.firstBaseUpdate=c,a.lastBaseUpdate=d,null!==(t=a.shared.interleaved)){a=t;do{s|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);lo|=s,e.lanes=s,e.memoizedState=h}}function ir(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var ar={},or=st(ar),sr=st(ar),lr=st(ar);function ur(e){if(e===ar)throw Error(a(174));return e}function cr(e,t){ut(lr,t),ut(sr,e),ut(or,ar),e=O(t),lt(or),ut(or,e)}function dr(){lt(or),lt(sr),lt(lr)}function hr(e){var t=ur(lr.current),n=ur(or.current);n!==(t=I(n,e.type,t))&&(ut(sr,e),ut(or,t))}function fr(e){sr.current===e&&(lt(or),lt(sr))}var pr=st(0);function gr(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ne(n)||Ue(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mr=[];function yr(){for(var e=0;e<mr.length;e++){var t=mr[e];Y?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}mr.length=0}var vr=o.ReactCurrentDispatcher,br=o.ReactCurrentBatchConfig,xr=0,Sr=null,_r=null,wr=null,Ar=!1,kr=!1,Tr=0,Br=0;function Cr(){throw Error(a(321))}function Er(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Yt(e[n],t[n]))return!1;return!0}function Pr(e,t,n,r,i,o){if(xr=o,Sr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vr.current=null===e||null===e.memoizedState?fi:pi,e=n(r,i),kr){o=0;do{if(kr=!1,Tr=0,25<=o)throw Error(a(301));o+=1,wr=_r=null,t.updateQueue=null,vr.current=gi,e=n(r,i)}while(kr)}if(vr.current=hi,t=null!==_r&&null!==_r.next,xr=0,wr=_r=Sr=null,Ar=!1,t)throw Error(a(300));return e}function Rr(){var e=0!==Tr;return Tr=0,e}function Mr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===wr?Sr.memoizedState=wr=e:wr=wr.next=e,wr}function Lr(){if(null===_r){var e=Sr.alternate;e=null!==e?e.memoizedState:null}else e=_r.next;var t=null===wr?Sr.memoizedState:wr.next;if(null!==t)wr=t,_r=e;else{if(null===e)throw Error(a(310));e={memoizedState:(_r=e).memoizedState,baseState:_r.baseState,baseQueue:_r.baseQueue,queue:_r.queue,next:null},null===wr?Sr.memoizedState=wr=e:wr=wr.next=e}return wr}function Or(e,t){return"function"==typeof t?t(e):t}function Ir(e){var t=Lr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=_r,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=s=null,u=null,c=o;do{var d=c.lane;if((xr&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=h,s=r):u=u.next=h,Sr.lanes|=d,lo|=d}c=c.next}while(null!==c&&c!==o);null===u?s=r:u.next=l,Yt(r,t.memoizedState)||(Mi=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,Sr.lanes|=o,lo|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nr(e){var t=Lr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Yt(o,t.memoizedState)||(Mi=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ur(){}function Dr(e,t){var n=Sr,r=Lr(),i=t(),o=!Yt(r.memoizedState,i);if(o&&(r.memoizedState=i,Mi=!0),r=r.queue,Xr(Fr.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==wr&&1&wr.memoizedState.tag){if(n.flags|=2048,Vr(9,jr.bind(null,n,r,i,t),void 0,null),null===to)throw Error(a(349));0!=(30&xr)||zr(n,t,i)}return i}function zr(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Sr.updateQueue)?(t={lastEffect:null,stores:null},Sr.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function jr(e,t,n,r){t.value=n,t.getSnapshot=r,Wr(t)&&Hr(e)}function Fr(e,t,n){return n((function(){Wr(t)&&Hr(e)}))}function Wr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yt(e,n)}catch(e){return!0}}function Hr(e){var t=Qn(e,1);null!==t&&Ro(t,e,1,-1)}function $r(e){var t=Mr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:e},t.queue=e,e=e.dispatch=li.bind(null,Sr,e),[t.memoizedState,e]}function Vr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Sr.updateQueue)?(t={lastEffect:null,stores:null},Sr.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Gr(){return Lr().memoizedState}function Yr(e,t,n,r){var i=Mr();Sr.flags|=e,i.memoizedState=Vr(1|t,n,void 0,void 0===r?null:r)}function qr(e,t,n,r){var i=Lr();r=void 0===r?null:r;var a=void 0;if(null!==_r){var o=_r.memoizedState;if(a=o.destroy,null!==r&&Er(r,o.deps))return void(i.memoizedState=Vr(t,n,a,r))}Sr.flags|=e,i.memoizedState=Vr(1|t,n,a,r)}function Qr(e,t){return Yr(8390656,8,e,t)}function Xr(e,t){return qr(2048,8,e,t)}function Kr(e,t){return qr(4,2,e,t)}function Zr(e,t){return qr(4,4,e,t)}function Jr(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ei(e,t,n){return n=null!=n?n.concat([e]):null,qr(4,4,Jr.bind(null,t,e),n)}function ti(){}function ni(e,t){var n=Lr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Er(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ri(e,t){var n=Lr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Er(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ii(e,t,n){return 0==(21&xr)?(e.baseState&&(e.baseState=!1,Mi=!0),e.memoizedState=n):(Yt(n,t)||(n=Pt(),Sr.lanes|=n,lo|=n,e.baseState=!0),t)}function ai(e,t){var n=Ot;Ot=0!==n&&4>n?n:4,e(!0);var r=br.transition;br.transition={};try{e(!1),t()}finally{Ot=n,br.transition=r}}function oi(){return Lr().memoizedState}function si(e,t,n){var r=Po(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ui(e)?ci(t,n):null!==(n=qn(e,t,n,r))&&(Ro(n,e,r,Eo()),di(n,t,r))}function li(e,t,n){var r=Po(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ui(e))ci(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Yt(s,o)){var l=t.interleaved;return null===l?(i.next=i,Yn(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=qn(e,t,i,r))&&(Ro(n,e,r,i=Eo()),di(n,t,r))}}function ui(e){var t=e.alternate;return e===Sr||null!==t&&t===Sr}function ci(e,t){kr=Ar=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function di(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Lt(e,n)}}var hi={readContext:Vn,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useInsertionEffect:Cr,useLayoutEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useMutableSource:Cr,useSyncExternalStore:Cr,useId:Cr,unstable_isNewReconciler:!1},fi={readContext:Vn,useCallback:function(e,t){return Mr().memoizedState=[e,void 0===t?null:t],e},useContext:Vn,useEffect:Qr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Yr(4194308,4,Jr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yr(4,2,e,t)},useMemo:function(e,t){var n=Mr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Mr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=si.bind(null,Sr,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Mr().memoizedState=e},useState:$r,useDebugValue:ti,useDeferredValue:function(e){return Mr().memoizedState=e},useTransition:function(){var e=$r(!1),t=e[0];return e=ai.bind(null,e[1]),Mr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Sr,i=Mr();if(gn){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===to)throw Error(a(349));0!=(30&xr)||zr(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Qr(Fr.bind(null,r,o,e),[e]),r.flags|=2048,Vr(9,jr.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Mr(),t=to.identifierPrefix;if(gn){var n=ln;t=":"+t+"R"+(n=(sn&~(1<<32-St(sn)-1)).toString(32)+n),0<(n=Tr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Br++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pi={readContext:Vn,useCallback:ni,useContext:Vn,useEffect:Xr,useImperativeHandle:ei,useInsertionEffect:Kr,useLayoutEffect:Zr,useMemo:ri,useReducer:Ir,useRef:Gr,useState:function(){return Ir(Or)},useDebugValue:ti,useDeferredValue:function(e){return ii(Lr(),_r.memoizedState,e)},useTransition:function(){return[Ir(Or)[0],Lr().memoizedState]},useMutableSource:Ur,useSyncExternalStore:Dr,useId:oi,unstable_isNewReconciler:!1},gi={readContext:Vn,useCallback:ni,useContext:Vn,useEffect:Xr,useImperativeHandle:ei,useInsertionEffect:Kr,useLayoutEffect:Zr,useMemo:ri,useReducer:Nr,useRef:Gr,useState:function(){return Nr(Or)},useDebugValue:ti,useDeferredValue:function(e){var t=Lr();return null===_r?t.memoizedState=e:ii(t,_r.memoizedState,e)},useTransition:function(){return[Nr(Or)[0],Lr().memoizedState]},useMutableSource:Ur,useSyncExternalStore:Dr,useId:oi,unstable_isNewReconciler:!1};function mi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function yi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var vi={isMounted:function(e){return!!(e=e._reactInternals)&&k(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Eo(),i=Po(e),a=Jn(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=er(e,a,i))&&(Ro(t,e,i,r),tr(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Eo(),i=Po(e),a=Jn(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=er(e,a,i))&&(Ro(t,e,i,r),tr(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Eo(),r=Po(e),i=Jn(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=er(e,i,r))&&(Ro(t,e,r,n),tr(t,e,r))}};function bi(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&Cn(n,r)&&Cn(i,a))}function xi(e,t,n){var r=!1,i=ct,a=t.contextType;return"object"==typeof a&&null!==a?a=Vn(a):(i=gt(t)?ft:dt.current,a=(r=null!=(r=t.contextTypes))?pt(e,i):ct),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Si(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vi.enqueueReplaceState(t,t.state,null)}function _i(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Kn(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Vn(a):(a=gt(t)?ft:dt.current,i.context=pt(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(yi(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&vi.enqueueReplaceState(i,i.state,null),rr(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do{n+=En(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ai(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var ki="function"==typeof WeakMap?WeakMap:Map;function Ti(e,t,n){(n=Jn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bo||(bo=!0,xo=r)},n}function Bi(e,t,n){(n=Jn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===So?So=new Set([this]):So.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Ci(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ki;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Jo.bind(null,e,t,n),t.then(e,e))}function Ei(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Pi(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Jn(-1,1)).tag=2,er(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Ri=o.ReactCurrentOwner,Mi=!1;function Li(e,t,n,r){t.child=null===e?In(t,null,n,r):On(t,e.child,n,r)}function Oi(e,t,n,r,i){n=n.render;var a=t.ref;return $n(t,i),r=Pr(e,t,n,r,a,i),n=Rr(),null===e||Mi?(gn&&n&&dn(t),t.flags|=1,Li(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ra(e,t,i))}function Ii(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||os(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ls(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ni(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:Cn)(o,r)&&e.ref===t.ref)return ra(e,t,i)}return t.flags|=1,(e=ss(a,r)).ref=t.ref,e.return=t,t.child=e}function Ni(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(Cn(a,r)&&e.ref===t.ref){if(Mi=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,ra(e,t,i);0!=(131072&e.flags)&&(Mi=!0)}}return zi(e,t,n,r,i)}function Ui(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(ao,io),io|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ut(ao,io),io|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,ut(ao,io),io|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,ut(ao,io),io|=r;return Li(e,t,i,n),t.child}function Di(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zi(e,t,n,r,i){var a=gt(n)?ft:dt.current;return a=pt(t,a),$n(t,i),n=Pr(e,t,n,r,a,i),r=Rr(),null===e||Mi?(gn&&r&&dn(t),t.flags|=1,Li(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ra(e,t,i))}function ji(e,t,n,r,i){if(gt(n)){var a=!0;bt(t)}else a=!1;if($n(t,i),null===t.stateNode)na(e,t),xi(t,n,r),_i(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=n.contextType;u="object"==typeof u&&null!==u?Vn(u):pt(t,u=gt(n)?ft:dt.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==u)&&Si(t,o,r,u),Xn=!1;var h=t.memoizedState;o.state=h,rr(t,r,o,i),l=t.memoizedState,s!==r||h!==l||ht.current||Xn?("function"==typeof c&&(yi(t,n,c,r),l=t.memoizedState),(s=Xn||bi(t,n,s,r,h,l,u))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Zn(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:mi(t.type,s),o.props=u,d=t.pendingProps,h=o.context,l="object"==typeof(l=n.contextType)&&null!==l?Vn(l):pt(t,l=gt(n)?ft:dt.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||h!==l)&&Si(t,o,r,l),Xn=!1,h=t.memoizedState,o.state=h,rr(t,r,o,i);var p=t.memoizedState;s!==d||h!==p||ht.current||Xn?("function"==typeof f&&(yi(t,n,f,r),p=t.memoizedState),(u=Xn||bi(t,n,u,r,h,p,l)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=u):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Fi(e,t,n,r,a,i)}function Fi(e,t,n,r,i,a){Di(e,t);var o=0!=(128&t.flags);if(!r&&!o)return i&&xt(t,n,!1),ra(e,t,a);r=t.stateNode,Ri.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=On(t,e.child,null,a),t.child=On(t,null,s,a)):Li(e,t,s,a),t.memoizedState=r.state,i&&xt(t,n,!0),t.child}function Wi(e){var t=e.stateNode;t.pendingContext?yt(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yt(0,t.context,!1),cr(e,t.containerInfo)}function Hi(e,t,n,r,i){return kn(),Tn(i),t.flags|=256,Li(e,t,n,r),t.child}var $i,Vi,Gi,Yi,qi={dehydrated:null,treeContext:null,retryLane:0};function Qi(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xi(e,t,n){var r,i=t.pendingProps,o=pr.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),ut(pr,1&o),null===e)return Sn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:Ue(e)?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=cs(l,i,0,null),e=us(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Qi(n),t.memoizedState=qi,e):Ki(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Zi(e,t,s,r=Ai(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=cs({mode:"visible",children:r.children},i,0,null),(o=us(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&On(t,e.child,null,s),t.child.memoizedState=Qi(s),t.memoizedState=qi,o);if(0==(1&t.mode))return Zi(e,t,s,null);if(Ue(i))return r=De(i).digest,Zi(e,t,s,r=Ai(o=Error(a(419)),r,void 0));if(n=0!=(s&e.childLanes),Mi||n){if(null!==(r=to)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Qn(e,i),Ro(r,e,i,-1))}return Ho(),Zi(e,t,s,r=Ai(Error(a(421))))}return Ne(i)?(t.flags|=128,t.child=e.child,t=ts.bind(null,e),ze(i,t),null):(e=o.treeContext,X&&(pn=He(i),fn=t,gn=!0,yn=null,mn=!1,null!==e&&(rn[an++]=sn,rn[an++]=ln,rn[an++]=on,sn=e.id,ln=e.overflow,on=t)),(t=Ki(t,r.children)).flags|=4096,t)}(e,t,l,i,r,o,n);if(s){s=i.fallback,l=t.mode,r=(o=e.child).sibling;var u={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=ss(o,u)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=ss(r,s):(s=us(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Qi(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=qi,i}return e=(s=e.child).sibling,i=ss(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ki(e,t){return(t=cs({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Zi(e,t,n,r){return null!==r&&Tn(r),On(t,e.child,null,n),(e=Ki(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ji(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Hn(e.return,t,n)}function ea(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ta(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Li(e,t,r.children,n),0!=(2&(r=pr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ji(e,n,t);else if(19===e.tag)Ji(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ut(pr,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===gr(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ea(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===gr(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ea(t,!0,n,null,a);break;case"together":ea(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function na(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ra(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),lo|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=ss(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ss(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ia(e){e.flags|=4}function aa(e,t){if(null!==e&&e.child===t.child)return!0;if(0!=(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!=(12854&e.flags)||0!=(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(q)$i=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)z(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Vi=function(){},Gi=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var a=t.stateNode,o=ur(or.current);n=F(a,n,e,r,i,o),(t.updateQueue=n)&&ia(t)}},Yi=function(e,t,n,r){n!==r&&ia(t)};else if(Q){$i=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Re(a,i.type,i.memoizedProps,i)),z(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Me(a,i.memoizedProps,i)),z(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),$i(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var oa=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Re(a,i.type,i.memoizedProps,i)),Ce(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Me(a,i.memoizedProps,i)),Ce(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),oa(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};Vi=function(e,t){var n=t.stateNode;if(!aa(e,t)){e=n.containerInfo;var r=Be(e);oa(r,t,!1,!1),n.pendingChildren=r,ia(t),Ee(e,r)}},Gi=function(e,t,n,r,i){var a=e.stateNode,o=e.memoizedProps;if((e=aa(e,t))&&o===r)t.stateNode=a;else{var s=t.stateNode,l=ur(or.current),u=null;o!==r&&(u=F(s,n,o,r,i,l)),e&&null===u?t.stateNode=a:(a=Te(a,u,n,o,r,t,e,s),j(a,n,r,i,l)&&ia(t),t.stateNode=a,e?ia(t):$i(a,t,!1,!1))}},Yi=function(e,t,n,r){n!==r?(e=ur(lr.current),n=ur(or.current),t.stateNode=H(r,e,n,t),ia(t)):t.stateNode=e.stateNode}}else Vi=function(){},Gi=function(){},Yi=function(){};function sa(e,t){if(!gn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function la(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ua(e,t,n){var r=t.pendingProps;switch(hn(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return la(t),null;case 1:case 17:return gt(t.type)&&mt(),la(t),null;case 3:return n=t.stateNode,dr(),lt(ht),lt(dt),yr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(wn(t)?ia(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==yn&&(Io(yn),yn=null))),Vi(e,t),la(t),null;case 5:fr(t),n=ur(lr.current);var i=t.type;if(null!==e&&null!=t.stateNode)Gi(e,t,i,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return la(t),null}if(e=ur(or.current),wn(t)){if(!X)throw Error(a(175));e=$e(t.stateNode,t.type,t.memoizedProps,n,e,t,!mn),t.updateQueue=e,null!==e&&ia(t)}else{var o=D(i,r,n,e,t);$i(o,t,!1,!1),t.stateNode=o,j(o,i,r,n,e)&&ia(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return la(t),null;case 6:if(e&&null!=t.stateNode)Yi(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=ur(lr.current),n=ur(or.current),wn(t)){if(!X)throw Error(a(176));if(e=t.stateNode,n=t.memoizedProps,(r=Ve(e,n,t,!mn))&&null!==(i=fn))switch(i.tag){case 3:Je(i.stateNode.containerInfo,e,n,0!=(1&i.mode));break;case 5:et(i.type,i.memoizedProps,i.stateNode,e,n,0!=(1&i.mode))}r&&ia(t)}else t.stateNode=H(r,e,n,t)}return la(t),null;case 13:if(lt(pr),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(gn&&null!==pn&&0!=(1&t.mode)&&0==(128&t.flags))An(),kn(),t.flags|=98560,i=!1;else if(i=wn(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!X)throw Error(a(344));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));Ge(i,t)}else kn(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;la(t),i=!1}else null!==yn&&(Io(yn),yn=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((n=null!==r)!=(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&pr.current)?0===oo&&(oo=3):Ho())),null!==t.updateQueue&&(t.flags|=4),la(t),null);case 4:return dr(),Vi(e,t),null===e&&Z(t.stateNode.containerInfo),la(t),null;case 10:return Wn(t.type._context),la(t),null;case 19:if(lt(pr),null===(i=t.memoizedState))return la(t),null;if(r=0!=(128&t.flags),null===(o=i.rendering))if(r)sa(i,!1);else{if(0!==oo||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=gr(e))){for(t.flags|=128,sa(i,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,n=t.child;null!==n;)i=e,(r=n).flags&=14680066,null===(o=r.alternate)?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,i=o.dependencies,r.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),n=n.sibling;return ut(pr,1&pr.current|2),t.child}e=e.sibling}null!==i.tail&&jt()>go&&(t.flags|=128,r=!0,sa(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=gr(o))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),sa(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!gn)return la(t),null}else 2*jt()-i.renderingStartTime>go&&1073741824!==n&&(t.flags|=128,r=!0,sa(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=i.last)?e.sibling=o:t.child=o,i.last=o)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=jt(),t.sibling=null,e=pr.current,ut(pr,r?1&e|2:1&e),t):(la(t),null);case 22:case 23:return zo(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!=(1&t.mode)?0!=(1073741824&io)&&(la(t),q&&6&t.subtreeFlags&&(t.flags|=8192)):la(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function ca(e,t){switch(hn(t),t.tag){case 1:return gt(t.type)&&mt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return dr(),lt(ht),lt(dt),yr(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return fr(t),null;case 13:if(lt(pr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));kn()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return lt(pr),null;case 4:return dr(),null;case 10:return Wn(t.type._context),null;case 22:case 23:return zo(),null;default:return null}}var da=!1,ha=!1,fa="function"==typeof WeakSet?WeakSet:Set,pa=null;function ga(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Zo(e,t,n)}else n.current=null}function ma(e,t,n){try{n()}catch(n){Zo(e,t,n)}}var ya=!1;function va(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&ma(t,n,a)}i=i.next}while(i!==r)}}function ba(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xa(e){var t=e.ref;if(null!==t){var n=e.stateNode;e=5===e.tag?L(n):n,"function"==typeof t?t(e):t.current=e}}function Sa(e){var t=e.alternate;null!==t&&(e.alternate=null,Sa(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&ee(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _a(e){return 5===e.tag||3===e.tag||4===e.tag}function wa(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||_a(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Aa(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ye(n,e,t):he(n,e);else if(4!==r&&null!==(e=e.child))for(Aa(e,t,n),e=e.sibling;null!==e;)Aa(e,t,n),e=e.sibling}function ka(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?me(n,e,t):de(n,e);else if(4!==r&&null!==(e=e.child))for(ka(e,t,n),e=e.sibling;null!==e;)ka(e,t,n),e=e.sibling}var Ta=null,Ba=!1;function Ca(e,t,n){for(n=n.child;null!==n;)Ea(e,t,n),n=n.sibling}function Ea(e,t,n){if(Gt&&"function"==typeof Gt.onCommitFiberUnmount)try{Gt.onCommitFiberUnmount(Vt,n)}catch(e){}switch(n.tag){case 5:ha||ga(n,t);case 6:if(q){var r=Ta,i=Ba;Ta=null,Ca(e,t,n),Ba=i,null!==(Ta=r)&&(Ba?be(Ta,n.stateNode):ve(Ta,n.stateNode))}else Ca(e,t,n);break;case 18:q&&null!==Ta&&(Ba?Ke(Ta,n.stateNode):Xe(Ta,n.stateNode));break;case 4:q?(r=Ta,i=Ba,Ta=n.stateNode.containerInfo,Ba=!0,Ca(e,t,n),Ta=r,Ba=i):(Q&&(r=n.stateNode.containerInfo,i=Be(r),Pe(r,i)),Ca(e,t,n));break;case 0:case 11:case 14:case 15:if(!ha&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!=(2&a)||0!=(4&a))&&ma(n,t,o),i=i.next}while(i!==r)}Ca(e,t,n);break;case 1:if(!ha&&(ga(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Zo(n,t,e)}Ca(e,t,n);break;case 21:Ca(e,t,n);break;case 22:1&n.mode?(ha=(r=ha)||null!==n.memoizedState,Ca(e,t,n),ha=r):Ca(e,t,n);break;default:Ca(e,t,n)}}function Pa(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new fa),t.forEach((function(t){var r=ns.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ra(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t;if(q){var l=s;e:for(;null!==l;){switch(l.tag){case 5:Ta=l.stateNode,Ba=!1;break e;case 3:case 4:Ta=l.stateNode.containerInfo,Ba=!0;break e}l=l.return}if(null===Ta)throw Error(a(160));Ea(o,s,i),Ta=null,Ba=!1}else Ea(o,s,i);var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){Zo(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Ma(t,e),t=t.sibling}function Ma(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ra(t,e),La(e),4&r){try{va(3,e,e.return),ba(3,e)}catch(t){Zo(e,e.return,t)}try{va(5,e,e.return)}catch(t){Zo(e,e.return,t)}}break;case 1:Ra(t,e),La(e),512&r&&null!==n&&ga(n,n.return);break;case 5:if(Ra(t,e),La(e),512&r&&null!==n&&ga(n,n.return),q){if(32&e.flags){var i=e.stateNode;try{xe(i)}catch(t){Zo(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps;if(n=null!==n?n.memoizedProps:o,r=e.type,t=e.updateQueue,e.updateQueue=null,null!==t)try{ge(i,t,r,n,o,e)}catch(t){Zo(e,e.return,t)}}}break;case 6:if(Ra(t,e),La(e),4&r&&q){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps,n=null!==n?n.memoizedProps:o;try{fe(i,n,o)}catch(t){Zo(e,e.return,t)}}break;case 3:if(Ra(t,e),La(e),4&r){if(q&&X&&null!==n&&n.memoizedState.isDehydrated)try{qe(t.containerInfo)}catch(t){Zo(e,e.return,t)}if(Q){i=t.containerInfo,o=t.pendingChildren;try{Pe(i,o)}catch(t){Zo(e,e.return,t)}}}break;case 4:if(Ra(t,e),La(e),4&r&&Q){i=(o=e.stateNode).containerInfo,o=o.pendingChildren;try{Pe(i,o)}catch(t){Zo(e,e.return,t)}}break;case 13:Ra(t,e),La(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(po=jt())),4&r&&Pa(e);break;case 22:var s=null!==n&&null!==n.memoizedState;if(1&e.mode?(ha=(n=ha)||s,Ra(t,e),ha=n):Ra(t,e),La(e),8192&r){if(n=null!==e.memoizedState,(e.stateNode.isHidden=n)&&!s&&0!=(1&e.mode))for(pa=e,r=e.child;null!==r;){for(t=pa=r;null!==pa;){var l=(s=pa).child;switch(s.tag){case 0:case 11:case 14:case 15:va(4,s,s.return);break;case 1:ga(s,s.return);var u=s.stateNode;if("function"==typeof u.componentWillUnmount){var c=s,d=s.return;try{var h=c;u.props=h.memoizedProps,u.state=h.memoizedState,u.componentWillUnmount()}catch(e){Zo(c,d,e)}}break;case 5:ga(s,s.return);break;case 22:if(null!==s.memoizedState){Ua(t);continue}}null!==l?(l.return=s,pa=l):Ua(t)}r=r.sibling}if(q)e:if(r=null,q)for(t=e;;){if(5===t.tag){if(null===r){r=t;try{i=t.stateNode,n?Se(i):we(t.stateNode,t.memoizedProps)}catch(t){Zo(e,e.return,t)}}}else if(6===t.tag){if(null===r)try{o=t.stateNode,n?_e(o):Ae(o,t.memoizedProps)}catch(t){Zo(e,e.return,t)}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}}break;case 19:Ra(t,e),La(e),4&r&&Pa(e);break;case 21:break;default:Ra(t,e),La(e)}}function La(e){var t=e.flags;if(2&t){try{if(q){e:{for(var n=e.return;null!==n;){if(_a(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(xe(i),r.flags&=-33),ka(e,wa(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;Aa(e,wa(e),o);break;default:throw Error(a(161))}}}catch(t){Zo(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Oa(e,t,n){pa=e,Ia(e)}function Ia(e,t,n){for(var r=0!=(1&e.mode);null!==pa;){var i=pa,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||da;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||ha;s=da;var u=ha;if(da=o,(ha=l)&&!u)for(pa=i;null!==pa;)l=(o=pa).child,22===o.tag&&null!==o.memoizedState?Da(i):null!==l?(l.return=o,pa=l):Da(i);for(;null!==a;)pa=a,Ia(a),a=a.sibling;pa=i,da=s,ha=u}Na(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,pa=a):Na(e)}}function Na(e){for(;null!==pa;){var t=pa;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:ha||ba(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!ha)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mi(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&ir(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=L(t.child.stateNode);break;case 1:n=t.child.stateNode}ir(t,s,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&pe(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(X&&null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Qe(d)}}}break;default:throw Error(a(163))}ha||512&t.flags&&xa(t)}catch(e){Zo(t,t.return,e)}}if(t===e){pa=null;break}if(null!==(n=t.sibling)){n.return=t.return,pa=n;break}pa=t.return}}function Ua(e){for(;null!==pa;){var t=pa;if(t===e){pa=null;break}var n=t.sibling;if(null!==n){n.return=t.return,pa=n;break}pa=t.return}}function Da(e){for(;null!==pa;){var t=pa;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ba(4,t)}catch(e){Zo(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Zo(t,i,e)}}var a=t.return;try{xa(t)}catch(e){Zo(t,a,e)}break;case 5:var o=t.return;try{xa(t)}catch(e){Zo(t,o,e)}}}catch(e){Zo(t,t.return,e)}if(t===e){pa=null;break}var s=t.sibling;if(null!==s){s.return=t.return,pa=s;break}pa=t.return}}var za=0,ja=1,Fa=2,Wa=3,Ha=4;if("function"==typeof Symbol&&Symbol.for){var $a=Symbol.for;za=$a("selector.component"),ja=$a("selector.has_pseudo_class"),Fa=$a("selector.role"),Wa=$a("selector.test_id"),Ha=$a("selector.text")}function Va(e){var t=K(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(a(364));return t}if(null===(e=ie(e)))throw Error(a(362));return e.stateNode.current}function Ga(e,t){switch(t.$$typeof){case za:if(e.type===t.value)return!0;break;case ja:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],i=e[n++],o=t[i];if(5!==r.tag||!se(r)){for(;null!=o&&Ga(r,o);)o=t[++i];if(i===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,i),r=r.sibling}}t=!1}return t;case Fa:if(5===e.tag&&le(e.stateNode,t.value))return!0;break;case Ha:if((5===e.tag||6===e.tag)&&null!==(e=oe(e))&&0<=e.indexOf(t.value))return!0;break;case Wa:if(5===e.tag&&"string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase())return!0;break;default:throw Error(a(365))}return!1}function Ya(e){switch(e.$$typeof){case za:return"<"+(w(e.value)||"Unknown")+">";case ja:return":has("+(Ya(e)||"")+")";case Fa:return'[role="'+e.value+'"]';case Ha:return'"'+e.value+'"';case Wa:return'[data-testname="'+e.value+'"]';default:throw Error(a(365))}}function qa(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],a=e[r++],o=t[a];if(5!==i.tag||!se(i)){for(;null!=o&&Ga(i,o);)o=t[++a];if(a===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,a),i=i.sibling}}return n}function Qa(e,t){if(!re)throw Error(a(363));e=qa(e=Va(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)se(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var Xa=Math.ceil,Ka=o.ReactCurrentDispatcher,Za=o.ReactCurrentOwner,Ja=o.ReactCurrentBatchConfig,eo=0,to=null,no=null,ro=0,io=0,ao=st(0),oo=0,so=null,lo=0,uo=0,co=0,ho=null,fo=null,po=0,go=1/0,mo=null;function yo(){go=jt()+500}var vo,bo=!1,xo=null,So=null,_o=!1,wo=null,Ao=0,ko=0,To=null,Bo=-1,Co=0;function Eo(){return 0!=(6&eo)?jt():-1!==Bo?Bo:Bo=jt()}function Po(e){return 0==(1&e.mode)?1:0!=(2&eo)&&0!==ro?ro&-ro:null!==Bn.transition?(0===Co&&(Co=Pt()),Co):0!==(e=Ot)?e:J()}function Ro(e,t,n,r){if(50<ko)throw ko=0,To=null,Error(a(185));Mt(e,n,r),0!=(2&eo)&&e===to||(e===to&&(0==(2&eo)&&(uo|=n),4===oo&&No(e,ro)),Mo(e,r),1===n&&0===eo&&0==(1&t.mode)&&(yo(),Qt&&Zt()))}function Mo(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-St(a),s=1<<o,l=i[o];-1===l?0!=(s&n)&&0==(s&r)||(i[o]=Ct(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=Bt(e,e===to?ro:0);if(0===r)null!==n&&Ut(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ut(n),1===t)0===e.tag?function(e){Qt=!0,Kt(e)}(Uo.bind(null,e)):Kt(Uo.bind(null,e)),te?ne((function(){0==(6&eo)&&Zt()})):Nt(Ft,Zt),n=null;else{switch(It(r)){case 1:n=Ft;break;case 4:n=Wt;break;case 16:default:n=Ht;break;case 536870912:n=$t}n=rs(n,Lo.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Lo(e,t){if(Bo=-1,Co=0,0!=(6&eo))throw Error(a(327));var n=e.callbackNode;if(Xo()&&e.callbackNode!==n)return null;var r=Bt(e,e===to?ro:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=$o(e,r);else{t=r;var i=eo;eo|=2;var o=Wo();for(to===e&&ro===t||(mo=null,yo(),jo(e,t));;)try{Go();break}catch(t){Fo(e,t)}jn(),Ka.current=o,eo=i,null!==no?t=0:(to=null,ro=0,t=oo)}if(0!==t){if(2===t&&0!==(i=Et(e))&&(r=i,t=Oo(e,i)),1===t)throw n=so,jo(e,0),No(e,r),Mo(e,jt()),n;if(6===t)No(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Yt(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=$o(e,r))&&0!==(o=Et(e))&&(r=o,t=Oo(e,o)),1===t))throw n=so,jo(e,0),No(e,r),Mo(e,jt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Qo(e,fo,mo);break;case 3:if(No(e,r),(130023424&r)===r&&10<(t=po+500-jt())){if(0!==Bt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Eo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=$(Qo.bind(null,e,fo,mo),t);break}Qo(e,fo,mo);break;case 4:if(No(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-St(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=jt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xa(r/1960))-r)){e.timeoutHandle=$(Qo.bind(null,e,fo,mo),r);break}Qo(e,fo,mo);break;default:throw Error(a(329))}}}return Mo(e,jt()),e.callbackNode===n?Lo.bind(null,e):null}function Oo(e,t){var n=ho;return e.current.memoizedState.isDehydrated&&(jo(e,t).flags|=256),2!==(e=$o(e,t))&&(t=fo,fo=n,null!==t&&Io(t)),e}function Io(e){null===fo?fo=e:fo.push.apply(fo,e)}function No(e,t){for(t&=~co,t&=~uo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-St(t),r=1<<n;e[n]=-1,t&=~r}}function Uo(e){if(0!=(6&eo))throw Error(a(327));Xo();var t=Bt(e,0);if(0==(1&t))return Mo(e,jt()),null;var n=$o(e,t);if(0!==e.tag&&2===n){var r=Et(e);0!==r&&(t=r,n=Oo(e,r))}if(1===n)throw n=so,jo(e,0),No(e,t),Mo(e,jt()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qo(e,fo,mo),Mo(e,jt()),null}function Do(e){null!==wo&&0===wo.tag&&0==(6&eo)&&Xo();var t=eo;eo|=1;var n=Ja.transition,r=Ot;try{if(Ja.transition=null,Ot=1,e)return e()}finally{Ot=r,Ja.transition=n,0==(6&(eo=t))&&Zt()}}function zo(){io=ao.current,lt(ao)}function jo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==G&&(e.timeoutHandle=G,V(n)),null!==no)for(n=no.return;null!==n;){var r=n;switch(hn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&mt();break;case 3:dr(),lt(ht),lt(dt),yr();break;case 5:fr(r);break;case 4:dr();break;case 13:case 19:lt(pr);break;case 10:Wn(r.type._context);break;case 22:case 23:zo()}n=n.return}if(to=e,no=e=ss(e.current,null),ro=io=t,oo=0,so=null,co=uo=lo=0,fo=ho=null,null!==Gn){for(t=0;t<Gn.length;t++)if(null!==(r=(n=Gn[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Gn=null}return e}function Fo(e,t){for(;;){var n=no;try{if(jn(),vr.current=hi,Ar){for(var r=Sr.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Ar=!1}if(xr=0,wr=_r=Sr=null,kr=!1,Tr=0,Za.current=null,null===n||null===n.return){oo=1,so=t,no=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=ro,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Ei(s);if(null!==p){p.flags&=-257,Pi(p,s,l,0,t),1&p.mode&&Ci(o,c,t),u=c;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(0==(1&t)){Ci(o,c,t),Ho();break e}u=Error(a(426))}else if(gn&&1&l.mode){var y=Ei(s);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),Pi(y,s,l,0,t),Tn(wi(u,l));break e}}o=u=wi(u,l),4!==oo&&(oo=2),null===ho?ho=[o]:ho.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,nr(o,Ti(0,u,t));break e;case 1:l=u;var v=o.type,b=o.stateNode;if(0==(128&o.flags)&&("function"==typeof v.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===So||!So.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,nr(o,Bi(o,l,t));break e}}o=o.return}while(null!==o)}qo(n)}catch(e){t=e,no===n&&null!==n&&(no=n=n.return);continue}break}}function Wo(){var e=Ka.current;return Ka.current=hi,null===e?hi:e}function Ho(){0!==oo&&3!==oo&&2!==oo||(oo=4),null===to||0==(268435455&lo)&&0==(268435455&uo)||No(to,ro)}function $o(e,t){var n=eo;eo|=2;var r=Wo();for(to===e&&ro===t||(mo=null,jo(e,t));;)try{Vo();break}catch(t){Fo(e,t)}if(jn(),eo=n,Ka.current=r,null!==no)throw Error(a(261));return to=null,ro=0,oo}function Vo(){for(;null!==no;)Yo(no)}function Go(){for(;null!==no&&!Dt();)Yo(no)}function Yo(e){var t=vo(e.alternate,e,io);e.memoizedProps=e.pendingProps,null===t?qo(e):no=t,Za.current=null}function qo(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=ua(n,t,io)))return void(no=n)}else{if(null!==(n=ca(n,t)))return n.flags&=32767,void(no=n);if(null===e)return oo=6,void(no=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(no=t);no=t=e}while(null!==t);0===oo&&(oo=5)}function Qo(e,t,n){var r=Ot,i=Ja.transition;try{Ja.transition=null,Ot=1,function(e,t,n,r){do{Xo()}while(null!==wo);if(0!=(6&eo))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-St(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===to&&(no=to=null,ro=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||_o||(_o=!0,rs(Ht,(function(){return Xo(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=Ja.transition,Ja.transition=null;var s=Ot;Ot=1;var l=eo;eo|=4,Za.current=null,function(e,t){for(N(e.containerInfo),pa=t;null!==pa;)if(t=(e=pa).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,pa=t;else for(;null!==pa;){e=pa;try{var n=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,o=e.stateNode,s=o.getSnapshotBeforeUpdate(e.elementType===e.type?r:mi(e.type,r),i);o.__reactInternalSnapshotBeforeUpdate=s}break;case 3:q&&ke(e.stateNode.containerInfo);break;default:throw Error(a(163))}}catch(t){Zo(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,pa=t;break}pa=e.return}n=ya,ya=!1}(e,n),Ma(n,e),U(e.containerInfo),e.current=n,Oa(n),zt(),eo=l,Ot=s,Ja.transition=o}else e.current=n;if(_o&&(_o=!1,wo=e,Ao=i),0===(o=e.pendingLanes)&&(So=null),function(e){if(Gt&&"function"==typeof Gt.onCommitFiberRoot)try{Gt.onCommitFiberRoot(Vt,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),Mo(e,jt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(bo)throw bo=!1,e=xo,xo=null,e;0!=(1&Ao)&&0!==e.tag&&Xo(),0!=(1&(o=e.pendingLanes))?e===To?ko++:(ko=0,To=e):ko=0,Zt()}(e,t,n,r)}finally{Ja.transition=i,Ot=r}return null}function Xo(){if(null!==wo){var e=It(Ao),t=Ja.transition,n=Ot;try{if(Ja.transition=null,Ot=16>e?16:e,null===wo)var r=!1;else{if(e=wo,wo=null,Ao=0,0!=(6&eo))throw Error(a(331));var i=eo;for(eo|=4,pa=e.current;null!==pa;){var o=pa,s=o.child;if(0!=(16&pa.flags)){var l=o.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(pa=c;null!==pa;){var d=pa;switch(d.tag){case 0:case 11:case 15:va(8,d,o)}var h=d.child;if(null!==h)h.return=d,pa=h;else for(;null!==pa;){var f=(d=pa).sibling,p=d.return;if(Sa(d),d===c){pa=null;break}if(null!==f){f.return=p,pa=f;break}pa=p}}}var g=o.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}pa=o}}if(0!=(2064&o.subtreeFlags)&&null!==s)s.return=o,pa=s;else e:for(;null!==pa;){if(0!=(2048&(o=pa).flags))switch(o.tag){case 0:case 11:case 15:va(9,o,o.return)}var v=o.sibling;if(null!==v){v.return=o.return,pa=v;break e}pa=o.return}}var b=e.current;for(pa=b;null!==pa;){var x=(s=pa).child;if(0!=(2064&s.subtreeFlags)&&null!==x)x.return=s,pa=x;else e:for(s=b;null!==pa;){if(0!=(2048&(l=pa).flags))try{switch(l.tag){case 0:case 11:case 15:ba(9,l)}}catch(e){Zo(l,l.return,e)}if(l===s){pa=null;break e}var S=l.sibling;if(null!==S){S.return=l.return,pa=S;break e}pa=l.return}}if(eo=i,Zt(),Gt&&"function"==typeof Gt.onPostCommitFiberRoot)try{Gt.onPostCommitFiberRoot(Vt,e)}catch(e){}r=!0}return r}finally{Ot=n,Ja.transition=t}}return!1}function Ko(e,t,n){e=er(e,t=Ti(0,t=wi(n,t),1),1),t=Eo(),null!==e&&(Mt(e,1,t),Mo(e,t))}function Zo(e,t,n){if(3===e.tag)Ko(e,e,n);else for(;null!==t;){if(3===t.tag){Ko(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===So||!So.has(r))){t=er(t,e=Bi(t,e=wi(n,e),1),1),e=Eo(),null!==t&&(Mt(t,1,e),Mo(t,e));break}}t=t.return}}function Jo(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Eo(),e.pingedLanes|=e.suspendedLanes&n,to===e&&(ro&n)===n&&(4===oo||3===oo&&(130023424&ro)===ro&&500>jt()-po?jo(e,0):co|=n),Mo(e,t)}function es(e,t){0===t&&(0==(1&e.mode)?t=1:(t=kt,0==(130023424&(kt<<=1))&&(kt=4194304)));var n=Eo();null!==(e=Qn(e,t))&&(Mt(e,t,n),Mo(e,n))}function ts(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),es(e,n)}function ns(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),es(e,n)}function rs(e,t){return Nt(e,t)}function is(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function as(e,t,n,r){return new is(e,t,n,r)}function os(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ss(e,t){var n=e.alternate;return null===n?((n=as(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ls(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)os(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case c:return us(n.children,i,o,t);case d:s=8,i|=8;break;case h:return(e=as(12,n,t,2|i)).elementType=h,e.lanes=o,e;case m:return(e=as(13,n,t,i)).elementType=m,e.lanes=o,e;case y:return(e=as(19,n,t,i)).elementType=y,e.lanes=o,e;case x:return cs(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:s=10;break e;case p:s=9;break e;case g:s=11;break e;case v:s=14;break e;case b:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=as(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function us(e,t,n,r){return(e=as(7,e,r,t)).lanes=n,e}function cs(e,t,n,r){return(e=as(22,e,r,t)).elementType=x,e.lanes=n,e.stateNode={isHidden:!1},e}function ds(e,t,n){return(e=as(6,e,null,t)).lanes=n,e}function hs(e,t,n){return(t=as(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fs(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=G,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rt(0),this.expirationTimes=Rt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rt(0),this.identifierPrefix=r,this.onRecoverableError=i,X&&(this.mutableSourceEagerHydrationData=null)}function ps(e,t,n,r,i,a,o,s,l){return e=new fs(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=as(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kn(a),e}function gs(e){if(!e)return ct;e:{if(k(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(gt(n))return vt(e,n,t)}return t}function ms(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=C(t))?null:e.stateNode}function ys(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function vs(e,t){ys(e,t),(e=e.alternate)&&ys(e,t)}function bs(e){return null===(e=C(e))?null:e.stateNode}function xs(){return null}return vo=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ht.current)Mi=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Mi=!1,function(e,t,n){switch(t.tag){case 3:Wi(t),kn();break;case 5:hr(t);break;case 1:gt(t.type)&&bt(t);break;case 4:cr(t,t.stateNode.containerInfo);break;case 10:Fn(0,t.type._context,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(ut(pr,1&pr.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Xi(e,t,n):(ut(pr,1&pr.current),null!==(e=ra(e,t,n))?e.sibling:null);ut(pr,1&pr.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return ta(e,t,n);t.flags|=128}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),ut(pr,pr.current),r)break;return null;case 22:case 23:return t.lanes=0,Ui(e,t,n)}return ra(e,t,n)}(e,t,n);Mi=0!=(131072&e.flags)}else Mi=!1,gn&&0!=(1048576&t.flags)&&cn(t,nn,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;na(e,t),e=t.pendingProps;var i=pt(t,dt.current);$n(t,n),i=Pr(null,t,r,e,i,n);var o=Rr();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gt(r)?(o=!0,bt(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Kn(t),i.updater=vi,t.stateNode=i,i._reactInternals=t,_i(t,r,e,n),t=Fi(null,t,r,!0,o,n)):(t.tag=0,gn&&o&&dn(t),Li(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(na(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return os(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===v)return 14}return 2}(r),e=mi(r,e),i){case 0:t=zi(null,t,r,e,n);break e;case 1:t=ji(null,t,r,e,n);break e;case 11:t=Oi(null,t,r,e,n);break e;case 14:t=Ii(null,t,r,mi(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,zi(e,t,r,i=t.elementType===r?i:mi(r,i),n);case 1:return r=t.type,i=t.pendingProps,ji(e,t,r,i=t.elementType===r?i:mi(r,i),n);case 3:e:{if(Wi(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Zn(e,t),rr(t,r,null,n);var s=t.memoizedState;if(r=s.element,X&&o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Hi(e,t,r,n,i=wi(Error(a(423)),t));break e}if(r!==i){t=Hi(e,t,r,n,i=wi(Error(a(424)),t));break e}for(X&&(pn=We(t.stateNode.containerInfo),fn=t,gn=!0,yn=null,mn=!1),n=In(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(kn(),r===i){t=ra(e,t,n);break e}Li(e,t,r,n)}t=t.child}return t;case 5:return hr(t),null===e&&Sn(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,W(r,i)?s=null:null!==o&&W(r,o)&&(t.flags|=32),Di(e,t),Li(e,t,s,n),t.child;case 6:return null===e&&Sn(t),null;case 13:return Xi(e,t,n);case 4:return cr(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=On(t,null,r,n):Li(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Oi(e,t,r,i=t.elementType===r?i:mi(r,i),n);case 7:return Li(e,t,t.pendingProps,n),t.child;case 8:case 12:return Li(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,Fn(0,r,s=i.value),null!==o)if(Yt(o.value,s)){if(o.children===i.children&&!ht.current){t=ra(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){s=o.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===o.tag){(u=Jn(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),Hn(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Hn(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}Li(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$n(t,n),r=r(i=Vn(i)),t.flags|=1,Li(e,t,r,n),t.child;case 14:return i=mi(r=t.type,t.pendingProps),Ii(e,t,r,i=mi(r.type,i),n);case 15:return Ni(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mi(r,i),na(e,t),t.tag=1,gt(r)?(e=!0,bt(t)):e=!1,$n(t,n),xi(t,r,i),_i(t,r,i,n),Fi(null,t,r,!0,e,n);case 19:return ta(e,t,n);case 22:return Ui(e,t,n)}throw Error(a(156,t.tag))},t.attemptContinuousHydration=function(e){if(13===e.tag){var t=Qn(e,134217728);null!==t&&Ro(t,e,134217728,Eo()),vs(e,134217728)}},t.attemptDiscreteHydration=function(e){if(13===e.tag){var t=Qn(e,1);null!==t&&Ro(t,e,1,Eo()),vs(e,1)}},t.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=Po(e),n=Qn(e,t);null!==n&&Ro(n,e,t,Eo()),vs(e,t)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Tt(t.pendingLanes);0!==n&&(Lt(t,1|n),Mo(t,jt()),0==(6&eo)&&(yo(),Zt()))}break;case 13:Do((function(){var t=Qn(e,1);if(null!==t){var n=Eo();Ro(t,e,1,n)}})),vs(e,1)}},t.batchedUpdates=function(e,t){var n=eo;eo|=1;try{return e(t)}finally{0===(eo=n)&&(yo(),Qt&&Zt())}},t.createComponentSelector=function(e){return{$$typeof:za,value:e}},t.createContainer=function(e,t,n,r,i,a,o){return ps(e,t,!1,null,0,r,0,a,o)},t.createHasPseudoClassSelector=function(e){return{$$typeof:ja,value:e}},t.createHydrationContainer=function(e,t,n,r,i,a,o,s,l){return(e=ps(n,r,!0,e,0,a,0,s,l)).context=gs(null),n=e.current,(a=Jn(r=Eo(),i=Po(n))).callback=null!=t?t:null,er(n,a,i),e.current.lanes=i,Mt(e,i,r),Mo(e,r),e},t.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:u,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:Fa,value:e}},t.createTestNameSelector=function(e){return{$$typeof:Wa,value:e}},t.createTextSelector=function(e){return{$$typeof:Ha,value:e}},t.deferredUpdates=function(e){var t=Ot,n=Ja.transition;try{return Ja.transition=null,Ot=16,e()}finally{Ot=t,Ja.transition=n}},t.discreteUpdates=function(e,t,n,r,i){var a=Ot,o=Ja.transition;try{return Ja.transition=null,Ot=1,e(t,n,r,i)}finally{Ot=a,Ja.transition=o,0===eo&&yo()}},t.findAllNodes=Qa,t.findBoundingRects=function(e,t){if(!re)throw Error(a(363));t=Qa(e,t),e=[];for(var n=0;n<t.length;n++)e.push(ae(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,i=r+n.width,o=n.y,s=o+n.height,l=t-1;0<=l;l--)if(t!==l){var u=e[l],c=u.x,d=c+u.width,h=u.y,f=h+u.height;if(r>=c&&o>=h&&i<=d&&s<=f){e.splice(t,1);break}if(!(r!==c||n.width!==u.width||f<o||h>s)){h>o&&(u.height+=h-o,u.y=o),f<s&&(u.height=s-h),e.splice(t,1);break}if(!(o!==h||n.height!==u.height||d<r||c>i)){c>r&&(u.width+=c-r,u.x=r),d<i&&(u.width=i-c),e.splice(t,1);break}}return e},t.findHostInstance=ms,t.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=B(e))?P(e):null)?null:e.stateNode},t.findHostInstanceWithWarning=function(e){return ms(e)},t.flushControlled=function(e){var t=eo;eo|=1;var n=Ja.transition,r=Ot;try{Ja.transition=null,Ot=1,e()}finally{Ot=r,Ja.transition=n,0===(eo=t)&&(yo(),Zt())}},t.flushPassiveEffects=Xo,t.flushSync=Do,t.focusWithin=function(e,t){if(!re)throw Error(a(363));for(t=qa(e=Va(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!se(n)){if(5===n.tag&&ue(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},t.getCurrentUpdatePriority=function(){return Ot},t.getFindAllNodesFailureDescription=function(e,t){if(!re)throw Error(a(363));var n=0,r=[];e=[Va(e),0];for(var i=0;i<e.length;){var o=e[i++],s=e[i++],l=t[s];if((5!==o.tag||!se(o))&&(Ga(o,l)&&(r.push(Ya(l)),++s>n&&(n=s)),s<t.length))for(o=o.child;null!==o;)e.push(o,s),o=o.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Ya(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?L(e.child.stateNode):e.child.stateNode:null},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:bs,findFiberByHostInstance:e.findFiberByHostInstance||xs,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Vt=t.inject(e),Gt=t}catch(e){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!re)throw Error(a(363));e=Qa(e,t);var i=ce(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=Ot;try{return Ot=e,t()}finally{Ot=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=Eo(),o=Po(i);return n=gs(n),null===t.context?t.context=n:t.pendingContext=n,(t=Jn(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=er(i,t,o))&&(Ro(e,i,o,a),tr(e,i,o)),o},t}),sc):nc.exports=(hc||(hc=1,"production"!==production&&(fc.exports=function(e){var t={},n=l,r=dc(),i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,a=!1;function o(e){if(!a){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];u("warn",e,n)}}function s(e){if(!a){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];u("error",e,n)}}function u(e,t,n){var r=i.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var a=n.map((function(e){return String(e)}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var c=Object.assign;function d(e){return e._reactInternals}var h=!1,f=!1,p=!1,g=!1,m=!0,y=!0,v=!0,b=!0,x=0,S=1,_=2,w=3,A=4,k=5,T=6,B=7,C=8,E=9,P=10,R=11,M=12,L=13,O=14,I=15,N=16,U=17,D=18,z=19,j=21,F=22,W=23,H=24,$=25,V=Symbol.for("react.element"),G=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),K=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),re=(Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode"),Symbol.for("react.offscreen")),ie=(Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker"),Symbol.iterator),ae="@@iterator";function oe(e){if(null===e||"object"!=typeof e)return null;var t=ie&&e[ie]||e[ae];return"function"==typeof t?t:null}function se(e){return e.displayName||"Context"}function le(e){if(null==e)return null;if("number"==typeof e.tag&&s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Y:return"Fragment";case G:return"Portal";case Q:return"Profiler";case q:return"StrictMode";case J:return"Suspense";case ee:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case K:return se(e)+".Consumer";case X:return se(e._context)+".Provider";case Z:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case te:var t=e.displayName||null;return null!==t?t:le(e.type)||"Memo";case ne:var n=e,r=n._payload,i=n._init;try{return le(i(r))}catch(e){return null}}return null}function ue(e){return e.displayName||"Context"}function ce(e){var t,n,r,i,a=e.tag,o=e.type;switch(a){case H:return"Cache";case E:return ue(o)+".Consumer";case P:return ue(o._context)+".Provider";case D:return"DehydratedFragment";case R:return t=o,r="ForwardRef",i=(n=o.render).displayName||n.name||"",t.displayName||(""!==i?r+"("+i+")":r);case B:return"Fragment";case k:return o;case A:return"Portal";case w:return"Root";case T:return"Text";case N:return le(o);case C:return o===q?"StrictMode":"Mode";case F:return"Offscreen";case M:return"Profiler";case j:return"Scope";case L:return"Suspense";case z:return"SuspenseList";case $:return"TracingMarker";case S:case x:case U:case _:case O:case I:if("function"==typeof o)return o.displayName||o.name||null;if("string"==typeof o)return o}return null}var de=0,he=1,fe=2,pe=4,ge=16,me=32,ye=64,ve=128,be=256,xe=512,Se=1024,_e=2048,we=4096,Ae=8192,ke=16384,Te=_e|pe|ye|xe|Se|ke,Be=32767,Ce=32768,Ee=65536,Pe=131072,Re=1048576,Me=2097152,Le=4194304,Oe=8388608,Ie=16777216,Ne=33554432,Ue=pe|Se|0,De=fe|pe|ge|me|xe|we|Ae,ze=pe|ye|xe|Ae,je=_e|ge,Fe=Le|Oe|Me,We=i.ReactCurrentOwner;function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var r=t;do{((t=r).flags&(fe|we))!==de&&(n=t.return),r=t.return}while(r)}return t.tag===w?n:null}function $e(e){if(He(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function Ve(e){var t=e.alternate;if(!t){var n=He(e);if(null===n)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var r=e,i=t;;){var a=r.return;if(null===a)break;var o=a.alternate;if(null===o){var s=a.return;if(null!==s){r=i=s;continue}break}if(a.child===o.child){for(var l=a.child;l;){if(l===r)return $e(a),e;if(l===i)return $e(a),t;l=l.sibling}throw new Error("Unable to find node on an unmounted component.")}if(r.return!==i.return)r=a,i=o;else{for(var u=!1,c=a.child;c;){if(c===r){u=!0,r=a,i=o;break}if(c===i){u=!0,i=a,r=o;break}c=c.sibling}if(!u){for(c=o.child;c;){if(c===r){u=!0,r=o,i=a;break}if(c===i){u=!0,i=o,r=a;break}c=c.sibling}if(!u)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==i)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag!==w)throw new Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?e:t}function Ge(e){var t=Ve(e);return null!==t?Ye(t):null}function Ye(e){if(e.tag===k||e.tag===T)return e;for(var t=e.child;null!==t;){var n=Ye(t);if(null!==n)return n;t=t.sibling}return null}function qe(e){var t=Ve(e);return null!==t?Qe(t):null}function Qe(e){if(e.tag===k||e.tag===T)return e;for(var t=e.child;null!==t;){if(t.tag!==A){var n=Qe(t);if(null!==n)return n}t=t.sibling}return null}var Xe=Array.isArray;function Ke(e){return Xe(e)}var Ze=e.getPublicInstance,Je=e.getRootHostContext,et=e.getChildHostContext,tt=e.prepareForCommit,nt=e.resetAfterCommit,rt=e.createInstance,it=e.appendInitialChild,at=e.finalizeInitialChildren,ot=e.prepareUpdate,st=e.shouldSetTextContent,lt=e.createTextInstance,ut=e.scheduleTimeout,ct=e.cancelTimeout,dt=e.noTimeout,ht=e.isPrimaryRenderer,ft=e.warnsIfNotActing,pt=e.supportsMutation,gt=e.supportsPersistence,mt=e.supportsHydration,yt=e.getInstanceFromNode;e.beforeActiveInstanceBlur,e.afterActiveInstanceBlur;var vt=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var bt,xt,St,_t,wt,At,kt,Tt=e.getCurrentEventPriority,Bt=e.detachDeletedInstance,Ct=e.supportsMicrotasks,Et=e.scheduleMicrotask,Pt=e.supportsTestSelectors,Rt=e.findFiberRoot,Mt=e.getBoundingRect,Lt=e.getTextContent,Ot=e.isHiddenSubtree,It=e.matchAccessibilityRole,Nt=e.setFocusIfFocusable,Ut=e.setupIntersectionObserver,Dt=e.appendChild,zt=e.appendChildToContainer,jt=e.commitTextUpdate,Ft=e.commitMount,Wt=e.commitUpdate,Ht=e.insertBefore,$t=e.insertInContainerBefore,Vt=e.removeChild,Gt=e.removeChildFromContainer,Yt=e.resetTextContent,qt=e.hideInstance,Qt=e.hideTextInstance,Xt=e.unhideInstance,Kt=e.unhideTextInstance,Zt=e.clearContainer,Jt=e.cloneInstance,en=e.createContainerChildSet,tn=e.appendChildToContainerChildSet,nn=e.finalizeContainerChildren,rn=e.replaceContainerChildren,an=e.cloneHiddenInstance,on=e.cloneHiddenTextInstance,sn=e.canHydrateInstance,ln=e.canHydrateTextInstance,un=e.canHydrateSuspenseInstance,cn=e.isSuspenseInstancePending,dn=e.isSuspenseInstanceFallback,hn=e.getSuspenseInstanceFallbackErrorDetails,fn=e.registerSuspenseInstanceRetry,pn=e.getNextHydratableSibling,gn=e.getFirstHydratableChild,mn=e.getFirstHydratableChildWithinContainer,yn=e.getFirstHydratableChildWithinSuspenseInstance,vn=e.hydrateInstance,bn=e.hydrateTextInstance,xn=e.hydrateSuspenseInstance,Sn=e.getNextHydratableInstanceAfterSuspenseInstance,_n=e.commitHydratedContainer,wn=e.commitHydratedSuspenseInstance,An=e.clearSuspenseBoundary,kn=e.clearSuspenseBoundaryFromContainer,Tn=e.shouldDeleteUnhydratedTailInstances,Bn=e.didNotMatchHydratedContainerTextInstance,Cn=e.didNotMatchHydratedTextInstance,En=e.didNotHydrateInstanceWithinContainer,Pn=e.didNotHydrateInstanceWithinSuspenseInstance,Rn=e.didNotHydrateInstance,Mn=e.didNotFindHydratableInstanceWithinContainer,Ln=e.didNotFindHydratableTextInstanceWithinContainer,On=e.didNotFindHydratableSuspenseInstanceWithinContainer,In=e.didNotFindHydratableInstanceWithinSuspenseInstance,Nn=e.didNotFindHydratableTextInstanceWithinSuspenseInstance,Un=e.didNotFindHydratableSuspenseInstanceWithinSuspenseInstance,Dn=e.didNotFindHydratableInstance,zn=e.didNotFindHydratableTextInstance,jn=e.didNotFindHydratableSuspenseInstance,Fn=e.errorHydratingContainer,Wn=0;function Hn(){}Hn.__reactDisabledLog=!0;var $n,Vn=i.ReactCurrentDispatcher;function Gn(e,t,n){if(void 0===$n)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);$n=r&&r[1]||""}return"\n"+$n+e}var Yn,qn=!1,Qn="function"==typeof WeakMap?WeakMap:Map;function Xn(e,t){if(!e||qn)return"";var n,r=Yn.get(e);if(void 0!==r)return r;qn=!0;var i,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Vn.current,Vn.current=null,function(){if(0===Wn){bt=console.log,xt=console.info,St=console.warn,_t=console.error,wt=console.group,At=console.groupCollapsed,kt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Hn,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Wn++}();try{if(t){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(e){n=e}Reflect.construct(e,[],o)}else{try{o.call()}catch(e){n=e}e.call(o.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),u=n.stack.split("\n"),d=l.length-1,h=u.length-1;d>=1&&h>=0&&l[d]!==u[h];)h--;for(;d>=1&&h>=0;d--,h--)if(l[d]!==u[h]){if(1!==d||1!==h)do{if(d--,--h<0||l[d]!==u[h]){var f="\n"+l[d].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&Yn.set(e,f),f}}while(d>=1&&h>=0);break}}}finally{qn=!1,Vn.current=i,function(){if(0==--Wn){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:c({},e,{value:bt}),info:c({},e,{value:xt}),warn:c({},e,{value:St}),error:c({},e,{value:_t}),group:c({},e,{value:wt}),groupCollapsed:c({},e,{value:At}),groupEnd:c({},e,{value:kt})})}Wn<0&&s("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=e?e.displayName||e.name:"",g=p?Gn(p):"";return"function"==typeof e&&Yn.set(e,g),g}function Kn(e,t,n){return Xn(e,!1)}function Zn(e,t,n){if(null==e)return"";if("function"==typeof e)return Xn(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return Gn(e);switch(e){case J:return Gn("Suspense");case ee:return Gn("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case Z:return Kn(e.render);case te:return Zn(e.type,t,n);case ne:var i=e,a=i._payload,o=i._init;try{return Zn(o(a),t,n)}catch(e){}}return""}Yn=new Qn;var Jn=Object.prototype.hasOwnProperty,er={},tr=i.ReactDebugCurrentFrame;function nr(e){if(e){var t=e._owner,n=Zn(e.type,e._source,t?t.type:null);tr.setExtraStackFrame(n)}else tr.setExtraStackFrame(null)}function rr(e,t,n,r,i){var a=Function.call.bind(Jn);for(var o in e)if(a(e,o)){var l=void 0;try{if("function"!=typeof e[o]){var u=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}l=e[o](t,o,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(nr(i),s("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,o,typeof l),nr(null)),l instanceof Error&&!(l.message in er)&&(er[l.message]=!0,nr(i),s("Failed %s type: %s",n,l.message),nr(null))}}var ir,ar=[];ir=[];var or,sr=-1;function lr(e){return{current:e}}function ur(e,t){sr<0?s("Unexpected pop."):(t!==ir[sr]&&s("Unexpected Fiber popped."),e.current=ar[sr],ar[sr]=null,ir[sr]=null,sr--)}function cr(e,t,n){sr++,ar[sr]=e.current,ir[sr]=n,e.current=t}or={};var dr={};Object.freeze(dr);var hr=lr(dr),fr=lr(!1),pr=dr;function gr(e,t,n){return n&&br(t)?pr:hr.current}function mr(e,t,n){var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}function yr(e,t){var n=e.type.contextTypes;if(!n)return dr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={};for(var a in n)i[a]=t[a];return rr(n,i,"context",ce(e)||"Unknown"),r&&mr(e,t,i),i}function vr(){return fr.current}function br(e){return null!=e.childContextTypes}function xr(e){ur(fr,e),ur(hr,e)}function Sr(e){ur(fr,e),ur(hr,e)}function _r(e,t,n){if(hr.current!==dr)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");cr(hr,t,e),cr(fr,n,e)}function wr(e,t,n){var r=e.stateNode,i=t.childContextTypes;if("function"!=typeof r.getChildContext){var a=ce(e)||"Unknown";return or[a]||(or[a]=!0,s("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",a,a)),n}var o=r.getChildContext();for(var l in o)if(!(l in i))throw new Error((ce(e)||"Unknown")+'.getChildContext(): key "'+l+'" is not defined in childContextTypes.');return rr(i,o,"child context",ce(e)||"Unknown"),c({},n,o)}function Ar(e){var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||dr;return pr=hr.current,cr(hr,n,e),cr(fr,fr.current,e),!0}function kr(e,t,n){var r=e.stateNode;if(!r)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(n){var i=wr(e,t,pr);r.__reactInternalMemoizedMergedChildContext=i,ur(fr,e),ur(hr,e),cr(hr,i,e),cr(fr,n,e)}else ur(fr,e),cr(fr,n,e)}function Tr(e){if(!function(e){return He(e)===e}(e)||e.tag!==S)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case w:return t.stateNode.context;case S:if(br(t.type))return t.stateNode.__reactInternalMemoizedMergedChildContext}t=t.return}while(null!==t);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var Br=0,Cr=1,Er=0,Pr=1,Rr=2,Mr=8,Lr=16,Or=Math.clz32?Math.clz32:function(e){var t=e>>>0;return 0===t?32:31-(Ir(t)/Nr|0)|0},Ir=Math.log,Nr=Math.LN2,Ur=31,Dr=0,zr=0,jr=1,Fr=2,Wr=4,Hr=8,$r=16,Vr=32,Gr=4194240,Yr=64,qr=128,Qr=256,Xr=512,Kr=1024,Zr=2048,Jr=4096,ei=8192,ti=16384,ni=32768,ri=65536,ii=131072,ai=262144,oi=524288,si=1048576,li=2097152,ui=130023424,ci=4194304,di=8388608,hi=16777216,fi=33554432,pi=67108864,gi=ci,mi=134217728,yi=268435455,vi=268435456,bi=536870912,xi=1073741824;function Si(e){return e&jr?"Sync":e&Fr?"InputContinuousHydration":e&Wr?"InputContinuous":e&Hr?"DefaultHydration":e&$r?"Default":e&Vr?"TransitionHydration":e&Gr?"Transition":e&ui?"Retry":e&mi?"SelectiveHydration":e&vi?"IdleHydration":e&bi?"Idle":e&xi?"Offscreen":void 0}var _i=-1,wi=Yr,Ai=ci;function ki(e){switch(Oi(e)){case jr:return jr;case Fr:return Fr;case Wr:return Wr;case Hr:return Hr;case $r:return $r;case Vr:return Vr;case Yr:case qr:case Qr:case Xr:case Kr:case Zr:case Jr:case ei:case ti:case ni:case ri:case ii:case ai:case oi:case si:case li:return e&Gr;case ci:case di:case hi:case fi:case pi:return e&ui;case mi:return mi;case vi:return vi;case bi:return bi;case xi:return xi;default:return s("Should have found matching lanes. This is a bug in React."),e}}function Ti(e,t){var n=e.pendingLanes;if(n===Dr)return Dr;var r=Dr,i=e.suspendedLanes,a=e.pingedLanes,o=n&yi;if(o!==Dr){var s=o&~i;if(s!==Dr)r=ki(s);else{var l=o&a;l!==Dr&&(r=ki(l))}}else{var u=n&~i;u!==Dr?r=ki(u):a!==Dr&&(r=ki(a))}if(r===Dr)return Dr;if(t!==Dr&&t!==r&&(t&i)===Dr){var c=Oi(r),d=Oi(t);if(c>=d||c===$r&&(d&Gr)!==Dr)return t}(r&Wr)!==Dr&&(r|=n&$r);var h=e.entangledLanes;if(h!==Dr)for(var f=e.entanglements,p=r&h;p>0;){var g=Ni(p),m=1<<g;r|=f[g],p&=~m}return r}function Bi(e,t){switch(e){case jr:case Fr:case Wr:return t+250;case Hr:case $r:case Vr:case Yr:case qr:case Qr:case Xr:case Kr:case Zr:case Jr:case ei:case ti:case ni:case ri:case ii:case ai:case oi:case si:case li:return t+5e3;case ci:case di:case hi:case fi:case pi:case mi:case vi:case bi:case xi:return _i;default:return s("Should have found matching lanes. This is a bug in React."),_i}}function Ci(e){var t=e.pendingLanes&~xi;return t!==Dr?t:t&xi?xi:Dr}function Ei(e){return(e&yi)!==Dr}function Pi(e){return(e&ui)===e}function Ri(e,t){return(t&(Fr|Wr|Hr|$r))!==Dr}function Mi(e){return(e&Gr)!==Dr}function Li(){var e=wi;return((wi<<=1)&Gr)===Dr&&(wi=Yr),e}function Oi(e){return e&-e}function Ii(e){return Oi(e)}function Ni(e){return 31-Or(e)}function Ui(e){return Ni(e)}function Di(e,t){return(e&t)!==Dr}function zi(e,t){return(e&t)===t}function ji(e,t){return e|t}function Fi(e,t){return e&~t}function Wi(e,t){return e&t}function Hi(e){for(var t=[],n=0;n<Ur;n++)t.push(e);return t}function $i(e,t,n){e.pendingLanes|=t,t!==bi&&(e.suspendedLanes=Dr,e.pingedLanes=Dr),e.eventTimes[Ui(t)]=n}function Vi(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function Gi(e,t){for(var n=e.entangledLanes|=t,r=e.entanglements,i=n;i;){var a=Ni(i),o=1<<a;o&t|r[a]&t&&(r[a]|=t),i&=~o}}function Yi(e,t,n){if(ba)for(var r=e.pendingUpdatersLaneMap;n>0;){var i=Ui(n),a=1<<i;r[i].add(t),n&=~a}}function qi(e,t){if(ba)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;t>0;){var i=Ui(t),a=1<<i,o=n[i];o.size>0&&(o.forEach((function(e){var t=e.alternate;null!==t&&r.has(t)||r.add(e)})),o.clear()),t&=~a}}var Qi=jr,Xi=Wr,Ki=$r,Zi=bi,Ji=zr;function ea(){return Ji}function ta(e){Ji=e}function na(e,t){return 0!==e&&e<t}function ra(e){var t=Oi(e);return na(Qi,t)?na(Xi,t)?Ei(t)?Ki:Zi:Xi:Qi}var ia=r.unstable_scheduleCallback,aa=r.unstable_cancelCallback,oa=r.unstable_shouldYield,sa=r.unstable_requestPaint,la=r.unstable_now,ua=r.unstable_ImmediatePriority,ca=r.unstable_UserBlockingPriority,da=r.unstable_NormalPriority,ha=r.unstable_IdlePriority,fa=r.unstable_yieldValue,pa=r.unstable_setDisableYieldValue,ga=null,ma=null,ya=null,va=!1,ba="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;function xa(e){if("function"==typeof fa&&(pa(e),a=e),ma&&"function"==typeof ma.setStrictMode)try{ma.setStrictMode(ga,e)}catch(e){va||(va=!0,s("React instrumentation encountered an error: %s",e))}}function Sa(e){ya=e}function _a(){for(var e=new Map,t=1,n=0;n<Ur;n++){var r=Si(t);e.set(t,r),t*=2}return e}function wa(){null!==ya&&"function"==typeof ya.markCommitStopped&&ya.markCommitStopped()}function Aa(e){null!==ya&&"function"==typeof ya.markComponentRenderStarted&&ya.markComponentRenderStarted(e)}function ka(){null!==ya&&"function"==typeof ya.markComponentRenderStopped&&ya.markComponentRenderStopped()}function Ta(e){null!==ya&&"function"==typeof ya.markComponentLayoutEffectMountStarted&&ya.markComponentLayoutEffectMountStarted(e)}function Ba(e){null!==ya&&"function"==typeof ya.markComponentLayoutEffectUnmountStarted&&ya.markComponentLayoutEffectUnmountStarted(e)}function Ca(){null!==ya&&"function"==typeof ya.markComponentLayoutEffectUnmountStopped&&ya.markComponentLayoutEffectUnmountStopped()}function Ea(e,t,n){null!==ya&&"function"==typeof ya.markComponentErrored&&ya.markComponentErrored(e,t,n)}function Pa(e,t,n){null!==ya&&"function"==typeof ya.markComponentSuspended&&ya.markComponentSuspended(e,t,n)}function Ra(e){null!==ya&&"function"==typeof ya.markRenderStarted&&ya.markRenderStarted(e)}function Ma(){null!==ya&&"function"==typeof ya.markRenderStopped&&ya.markRenderStopped()}function La(e,t){null!==ya&&"function"==typeof ya.markStateUpdateScheduled&&ya.markStateUpdateScheduled(e,t)}var Oa="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Ia=null,Na=!1,Ua=!1;function Da(e){null===Ia?Ia=[e]:Ia.push(e)}function za(){Na&&ja()}function ja(){if(!Ua&&null!==Ia){Ua=!0;var e=0,t=ea();try{var n=Ia;for(ta(Qi);e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ia=null,Na=!1}catch(t){throw null!==Ia&&(Ia=Ia.slice(e+1)),ia(ua,ja),t}finally{ta(t),Ua=!1}}return null}function Fa(e){return e.current.memoizedState.isDehydrated}var Wa=[],Ha=0,$a=null,Va=0,Ga=[],Ya=0,qa=null,Qa=1,Xa="";function Ka(){var e,t=Xa;return(Qa&(e=Qa,~(1<<to(e)-1))).toString(32)+t}function Za(e,t){ro(),Wa[Ha++]=Va,Wa[Ha++]=$a,$a=e,Va=t}function Ja(e,t,n){ro(),Ga[Ya++]=Qa,Ga[Ya++]=Xa,Ga[Ya++]=qa,qa=e;var r=Qa,i=Xa,a=to(r)-1,o=r&~(1<<a),s=n+1,l=to(t)+a;if(l>30){var u=a-a%5,c=(o&(1<<u)-1).toString(32),d=o>>u,h=a-u,f=to(t)+h;Qa=1<<f|s<<h|d,Xa=c+i}else Qa=1<<l|s<<a|o,Xa=i}function eo(e){ro(),null!==e.return&&(Za(e,1),Ja(e,1,0))}function to(e){return 32-Or(e)}function no(e){for(;e===$a;)$a=Wa[--Ha],Wa[Ha]=null,Va=Wa[--Ha],Wa[Ha]=null;for(;e===qa;)qa=Ga[--Ya],Ga[Ya]=null,Xa=Ga[--Ya],Ga[Ya]=null,Qa=Ga[--Ya],Ga[Ya]=null}function ro(){To()||s("Expected to be hydrating. This is a bug in React. Please file an issue.")}var io=null,ao=null,oo=!1,so=!1,lo=null;function uo(){oo&&s("We should not be hydrating here. This is a bug in React. Please file a bug.")}function co(){so=!0}function ho(e,t,n){return!!mt&&(ao=yn(t),io=e,oo=!0,lo=null,so=!1,null!==n&&function(e,t){ro(),Ga[Ya++]=Qa,Ga[Ya++]=Xa,Ga[Ya++]=qa,Qa=t.id,Xa=t.overflow,qa=e}(e,n),!0)}function fo(e,t){switch(e.tag){case w:En(e.stateNode.containerInfo,t);break;case k:var n=(e.mode&Pr)!==Er;Rn(e.type,e.memoizedProps,e.stateNode,t,n);break;case L:var r=e.memoizedState;null!==r.dehydrated&&Pn(r.dehydrated,t)}}function po(e,t){fo(e,t);var n,r=((n=Xg(k,null,null,Er)).elementType="DELETED",n);r.stateNode=t,r.return=e;var i=e.deletions;null===i?(e.deletions=[r],e.flags|=ge):i.push(r)}function go(e,t){if(!so)switch(e.tag){case w:var n=e.stateNode.containerInfo;switch(t.tag){case k:var r=t.type,i=t.pendingProps;Mn(n,r,i);break;case T:var a=t.pendingProps;Ln(n,a);break;case L:On(n)}break;case k:var o=e.type,s=e.memoizedProps,l=e.stateNode;switch(t.tag){case k:var u=t.type,c=t.pendingProps,d=(e.mode&Pr)!==Er;Dn(o,s,l,u,c,d);break;case T:var h=t.pendingProps,f=(e.mode&Pr)!==Er;zn(o,s,l,h,f);break;case L:jn(o,s,l)}break;case L:var p=e.memoizedState.dehydrated;if(null!==p)switch(t.tag){case k:var g=t.type,m=t.pendingProps;In(p,g,m);break;case T:var y=t.pendingProps;Nn(p,y);break;case L:Un(p)}break;default:return}}function mo(e,t){t.flags=t.flags&~we|fe,go(e,t)}function yo(e,t){switch(e.tag){case k:var n=e.type,r=e.pendingProps,i=sn(t,n,r);return null!==i&&(e.stateNode=i,io=e,ao=gn(i),!0);case T:var a=e.pendingProps,o=ln(t,a);return null!==o&&(e.stateNode=o,io=e,ao=null,!0);case L:var s=un(t);if(null!==s){var l={dehydrated:s,treeContext:(ro(),null!==qa?{id:Qa,overflow:Xa}:null),retryLane:xi};e.memoizedState=l;var u=function(e){var t=Xg(D,null,null,Er);return t.stateNode=e,t}(s);return u.return=e,e.child=u,io=e,ao=null,!0}return!1;default:return!1}}function vo(e){return(e.mode&Pr)!==Er&&(e.flags&ve)===de}function bo(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function xo(e){if(oo){var t=ao;if(!t)return vo(e)&&(go(io,e),bo()),mo(io,e),oo=!1,void(io=e);var n=t;if(!yo(e,t)){vo(e)&&(go(io,e),bo()),t=pn(n);var r=io;if(!t||!yo(e,t))return mo(io,e),oo=!1,void(io=e);po(r,n)}}}function So(e){for(var t=e.return;null!==t&&t.tag!==k&&t.tag!==w&&t.tag!==L;)t=t.return;io=t}function _o(e){if(!mt)return!1;if(e!==io)return!1;if(!oo)return So(e),oo=!0,!1;if(e.tag!==w&&(e.tag!==k||Tn(e.type)&&!st(e.type,e.memoizedProps))){var t=ao;if(t)if(vo(e))wo(e),bo();else for(;t;)po(e,t),t=pn(t)}return So(e),ao=e.tag===L?function(e){if(!mt)throw new Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var t=e.memoizedState,n=null!==t?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return Sn(n)}(e):io?pn(e.stateNode):null,!0}function wo(e){for(var t=ao;t;)fo(e,t),t=pn(t)}function Ao(){mt&&(io=null,ao=null,oo=!1,so=!1)}function ko(){null!==lo&&(Gp(lo),lo=null)}function To(){return oo}function Bo(e){null===lo?lo=[e]:lo.push(e)}var Co=i.ReactCurrentBatchConfig,Eo=null;function Po(e,t){if(Oa(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(!Jn.call(t,a)||!Oa(e[a],t[a]))return!1}return!0}function Ro(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case k:return Gn(e.type);case N:return Gn("Lazy");case L:return Gn("Suspense");case z:return Gn("SuspenseList");case x:case _:case I:return Kn(e.type);case R:return Kn(e.type.render);case S:return Xn(e.type,!0);default:return""}}function Mo(e){try{var t="",n=e;do{t+=Ro(n),n=n.return}while(n);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Lo=i.ReactDebugCurrentFrame,Oo=null,Io=!1;function No(){return null===Oo?"":Mo(Oo)}function Uo(){Lo.getCurrentStack=null,Oo=null,Io=!1}function Do(e){Lo.getCurrentStack=null===e?null:No,Oo=e,Io=!1}function zo(e){Io=e}var jo={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Fo=function(e){var t=[];return e.forEach((function(e){t.push(e)})),t.sort().join(", ")},Wo=[],Ho=[],$o=[],Vo=[],Go=[],Yo=[],qo=new Set;jo.recordUnsafeLifecycleWarnings=function(e,t){qo.has(e.type)||("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning&&Wo.push(e),e.mode&Mr&&"function"==typeof t.UNSAFE_componentWillMount&&Ho.push(e),"function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&$o.push(e),e.mode&Mr&&"function"==typeof t.UNSAFE_componentWillReceiveProps&&Vo.push(e),"function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&Go.push(e),e.mode&Mr&&"function"==typeof t.UNSAFE_componentWillUpdate&&Yo.push(e))},jo.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;Wo.length>0&&(Wo.forEach((function(t){e.add(ce(t)||"Component"),qo.add(t.type)})),Wo=[]);var t=new Set;Ho.length>0&&(Ho.forEach((function(e){t.add(ce(e)||"Component"),qo.add(e.type)})),Ho=[]);var n=new Set;$o.length>0&&($o.forEach((function(e){n.add(ce(e)||"Component"),qo.add(e.type)})),$o=[]);var r=new Set;Vo.length>0&&(Vo.forEach((function(e){r.add(ce(e)||"Component"),qo.add(e.type)})),Vo=[]);var i=new Set;Go.length>0&&(Go.forEach((function(e){i.add(ce(e)||"Component"),qo.add(e.type)})),Go=[]);var a=new Set;Yo.length>0&&(Yo.forEach((function(e){a.add(ce(e)||"Component"),qo.add(e.type)})),Yo=[]),t.size>0&&s("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",Fo(t)),r.size>0&&s("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s",Fo(r)),a.size>0&&s("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",Fo(a)),e.size>0&&o("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Fo(e)),n.size>0&&o("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Fo(n)),i.size>0&&o("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Fo(i))};var Qo,Xo,Ko,Zo,Jo,es,ts=new Map,ns=new Set;function rs(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function is(e){try{return as(e),!1}catch(e){return!0}}function as(e){return""+e}function os(e,t,n){var r,i=n.ref;if(null!==i&&"function"!=typeof i&&"object"!=typeof i){if((e.mode&Mr||m)&&(!n._owner||!n._self||n._owner.stateNode===n._self)&&(!n._owner||n._owner.tag===S)&&("function"!=typeof n.type||(r=n.type).prototype&&r.prototype.isReactComponent)&&n._owner){var a=ce(e)||"Component";Ko[a]||(s('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',a,i),Ko[a]=!0)}if(n._owner){var o,l=n._owner;if(l){var u=l;if(u.tag!==S)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");o=u.stateNode}if(!o)throw new Error("Missing owner for string ref "+i+". This error is likely caused by a bug in React. Please file an issue.");var c=o;!function(e,t){is(e)&&(s("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,rs(e)),as(e))}(i,"ref");var d=""+i;if(null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===d)return t.ref;var h=function(e){var t=c.refs;null===e?delete t[d]:t[d]=e};return h._stringRef=d,h}if("string"!=typeof i)throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!n._owner)throw new Error("Element ref was specified as a string ("+i+") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.")}return i}function ss(e,t){var n=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function ls(e){var t=ce(e)||"Component";Jo[t]||(Jo[t]=!0,s("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."))}function us(e){var t=e._payload;return(0,e._init)(t)}function cs(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=ge):r.push(n)}}function n(n,r){if(!e)return null;for(var i=r;null!==i;)t(n,i),i=i.sibling;return null}function r(e,t){for(var n=new Map,r=t;null!==r;)null!==r.key?n.set(r.key,r):n.set(r.index,r),r=r.sibling;return n}function i(e,t){var n=Zg(e,t);return n.index=0,n.sibling=null,n}function a(t,n,r){if(t.index=r,!e)return t.flags|=Re,n;var i=t.alternate;if(null!==i){var a=i.index;return a<n?(t.flags|=fe,n):a}return t.flags|=fe,n}function o(t){return e&&null===t.alternate&&(t.flags|=fe),t}function l(e,t,n,r){if(null===t||t.tag!==T){var a=im(n,e.mode,r);return a.return=e,a}var o=i(t,n);return o.return=e,o}function u(e,t,n,r){var a=n.type;if(a===Y)return d(e,t,n.props.children,r,n.key);if(null!==t&&(t.elementType===a||Dg(t,n)||"object"==typeof a&&null!==a&&a.$$typeof===ne&&us(a)===t.type)){var o=i(t,n.props);return o.ref=os(e,t,n),o.return=e,o._debugSource=n._source,o._debugOwner=n._owner,o}var s=tm(n,e.mode,r);return s.ref=os(e,t,n),s.return=e,s}function c(e,t,n,r){if(null===t||t.tag!==A||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation){var a=am(n,e.mode,r);return a.return=e,a}var o=i(t,n.children||[]);return o.return=e,o}function d(e,t,n,r,a){if(null===t||t.tag!==B){var o=nm(n,e.mode,r,a);return o.return=e,o}var s=i(t,n);return s.return=e,s}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t){var r=im(""+t,e.mode,n);return r.return=e,r}if("object"==typeof t&&null!==t){switch(t.$$typeof){case V:var i=tm(t,e.mode,n);return i.ref=os(e,null,t),i.return=e,i;case G:var a=am(t,e.mode,n);return a.return=e,a;case ne:var o=t._payload;return h(e,(0,t._init)(o),n)}if(Ke(t)||oe(t)){var s=nm(t,e.mode,n,null);return s.return=e,s}ss(0,t)}return"function"==typeof t&&ls(e),null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case V:return n.key===i?u(e,t,n,r):null;case G:return n.key===i?c(e,t,n,r):null;case ne:var a=n._payload;return f(e,t,(0,n._init)(a),r)}if(Ke(n)||oe(n))return null!==i?null:d(e,t,n,r,null);ss(0,n)}return"function"==typeof n&&ls(e),null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case V:return u(t,e.get(null===r.key?n:r.key)||null,r,i);case G:return c(t,e.get(null===r.key?n:r.key)||null,r,i);case ne:var a=r._payload;return p(e,t,n,(0,r._init)(a),i)}if(Ke(r)||oe(r))return d(t,e.get(n)||null,r,i,null);ss(0,r)}return"function"==typeof r&&ls(t),null}function g(e,t,n){if("object"!=typeof e||null===e)return t;switch(e.$$typeof){case V:case G:es(e,n);var r=e.key;if("string"!=typeof r)break;if(null===t){(t=new Set).add(r);break}if(!t.has(r)){t.add(r);break}s("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",r);break;case ne:var i=e._payload;g((0,e._init)(i),t,n)}return t}return function l(u,c,d,m){if("object"==typeof d&&null!==d&&d.type===Y&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case V:return o(function(e,r,a,o){for(var s=a.key,l=r;null!==l;){if(l.key===s){var u=a.type;if(u===Y){if(l.tag===B){n(e,l.sibling);var c=i(l,a.props.children);return c.return=e,c._debugSource=a._source,c._debugOwner=a._owner,c}}else if(l.elementType===u||Dg(l,a)||"object"==typeof u&&null!==u&&u.$$typeof===ne&&us(u)===l.type){n(e,l.sibling);var d=i(l,a.props);return d.ref=os(e,l,a),d.return=e,d._debugSource=a._source,d._debugOwner=a._owner,d}n(e,l);break}t(e,l),l=l.sibling}if(a.type===Y){var h=nm(a.props.children,e.mode,o,a.key);return h.return=e,h}var f=tm(a,e.mode,o);return f.ref=os(e,r,a),f.return=e,f}(u,c,d,m));case G:return o(function(e,r,a,o){for(var s=a.key,l=r;null!==l;){if(l.key===s){if(l.tag===A&&l.stateNode.containerInfo===a.containerInfo&&l.stateNode.implementation===a.implementation){n(e,l.sibling);var u=i(l,a.children||[]);return u.return=e,u}n(e,l);break}t(e,l),l=l.sibling}var c=am(a,e.mode,o);return c.return=e,c}(u,c,d,m));case ne:var y=d._payload;return l(u,c,(0,d._init)(y),m)}if(Ke(d))return function(i,o,s,l){for(var u=null,c=0;c<s.length;c++)u=g(s[c],u,i);for(var d=null,m=null,y=o,v=0,b=0,x=null;null!==y&&b<s.length;b++){y.index>b?(x=y,y=null):x=y.sibling;var S=f(i,y,s[b],l);if(null===S){null===y&&(y=x);break}e&&y&&null===S.alternate&&t(i,y),v=a(S,v,b),null===m?d=S:m.sibling=S,m=S,y=x}if(b===s.length)return n(i,y),To()&&Za(i,b),d;if(null===y){for(;b<s.length;b++){var _=h(i,s[b],l);null!==_&&(v=a(_,v,b),null===m?d=_:m.sibling=_,m=_)}return To()&&Za(i,b),d}for(var w=r(0,y);b<s.length;b++){var A=p(w,i,b,s[b],l);null!==A&&(e&&null!==A.alternate&&w.delete(null===A.key?b:A.key),v=a(A,v,b),null===m?d=A:m.sibling=A,m=A)}return e&&w.forEach((function(e){return t(i,e)})),To()&&Za(i,b),d}(u,c,d,m);if(oe(d))return function(i,o,l,u){var c=oe(l);if("function"!=typeof c)throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");"function"==typeof Symbol&&"Generator"===l[Symbol.toStringTag]&&(Xo||s("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Xo=!0),l.entries===c&&(Qo||s("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Qo=!0);var d=c.call(l);if(d)for(var m=null,y=d.next();!y.done;y=d.next())m=g(y.value,m,i);var v=c.call(l);if(null==v)throw new Error("An iterable object provided no iterator.");for(var b=null,x=null,S=o,_=0,w=0,A=null,k=v.next();null!==S&&!k.done;w++,k=v.next()){S.index>w?(A=S,S=null):A=S.sibling;var T=f(i,S,k.value,u);if(null===T){null===S&&(S=A);break}e&&S&&null===T.alternate&&t(i,S),_=a(T,_,w),null===x?b=T:x.sibling=T,x=T,S=A}if(k.done)return n(i,S),To()&&Za(i,w),b;if(null===S){for(;!k.done;w++,k=v.next()){var B=h(i,k.value,u);null!==B&&(_=a(B,_,w),null===x?b=B:x.sibling=B,x=B)}return To()&&Za(i,w),b}for(var C=r(0,S);!k.done;w++,k=v.next()){var E=p(C,i,w,k.value,u);null!==E&&(e&&null!==E.alternate&&C.delete(null===E.key?w:E.key),_=a(E,_,w),null===x?b=E:x.sibling=E,x=E)}return e&&C.forEach((function(e){return t(i,e)})),To()&&Za(i,w),b}(u,c,d,m);ss(0,d)}return"string"==typeof d&&""!==d||"number"==typeof d?o(function(e,t,r,a){if(null!==t&&t.tag===T){n(e,t.sibling);var o=i(t,r);return o.return=e,o}n(e,t);var s=im(r,e.mode,a);return s.return=e,s}(u,c,""+d,m)):("function"==typeof d&&ls(u),n(u,c))}}jo.recordLegacyContextWarning=function(e,t){var n=function(e){for(var t=null,n=e;null!==n;)n.mode&Mr&&(t=n),n=n.return;return t}(e);if(null!==n){if(!ns.has(e.type)){var r=ts.get(n);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==t&&"function"==typeof t.getChildContext)&&(void 0===r&&(r=[],ts.set(n,r)),r.push(e))}}else s("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},jo.flushLegacyContextWarning=function(){ts.forEach((function(e,t){if(0!==e.length){var n=e[0],r=new Set;e.forEach((function(e){r.add(ce(e)||"Component"),ns.add(e.type)}));var i=Fo(r);try{Do(n),s("Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",i)}finally{Uo()}}}))},jo.discardPendingWarnings=function(){Wo=[],Ho=[],$o=[],Vo=[],Go=[],Yo=[],ts=new Map},Qo=!1,Xo=!1,Ko={},Zo={},Jo={},es=function(e,t){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){if("object"!=typeof e._store)throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var n=ce(t)||"Component";Zo[n]||(Zo[n]=!0,s('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};var ds=cs(!0),hs=cs(!1);function fs(e,t){for(var n=e.child;null!==n;)Jg(n,t),n=n.sibling}var ps,gs=lr(null);ps={};var ms=null,ys=null,vs=null,bs=!1;function xs(){ms=null,ys=null,vs=null,bs=!1}function Ss(){bs=!0}function _s(){bs=!1}function ws(e,t,n){ht?(cr(gs,t._currentValue,e),t._currentValue=n,void 0!==t._currentRenderer&&null!==t._currentRenderer&&t._currentRenderer!==ps&&s("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=ps):(cr(gs,t._currentValue2,e),t._currentValue2=n,void 0!==t._currentRenderer2&&null!==t._currentRenderer2&&t._currentRenderer2!==ps&&s("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer2=ps)}function As(e,t){var n=gs.current;ur(gs,t),ht?e._currentValue=n:e._currentValue2=n}function ks(e,t,n){for(var r=e;null!==r;){var i=r.alternate;if(zi(r.childLanes,t)?null===i||zi(i.childLanes,t)||(i.childLanes=ji(i.childLanes,t)):(r.childLanes=ji(r.childLanes,t),null!==i&&(i.childLanes=ji(i.childLanes,t))),r===n)break;r=r.return}r!==n&&s("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Ts(e,t,n){!function(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var i=void 0,a=r.dependencies;if(null!==a){i=r.child;for(var o=a.firstContext;null!==o;){if(o.context===t){if(r.tag===S){var s=Ii(n),l=$s(_i,s);l.tag=zs;var u=r.updateQueue;if(null===u);else{var c=u.shared,d=c.pending;null===d?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}r.lanes=ji(r.lanes,n);var h=r.alternate;null!==h&&(h.lanes=ji(h.lanes,n)),ks(r.return,n,e),a.lanes=ji(a.lanes,n);break}o=o.next}}else if(r.tag===P)i=r.type===e.type?null:r.child;else if(r.tag===D){var f=r.return;if(null===f)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");f.lanes=ji(f.lanes,n);var p=f.alternate;null!==p&&(p.lanes=ji(p.lanes,n)),ks(f,n,e),i=r.sibling}else i=r.child;if(null!==i)i.return=r;else for(i=r;null!==i;){if(i===e){i=null;break}var g=i.sibling;if(null!==g){g.return=i.return,i=g;break}i=i.return}r=i}}(e,t,n)}function Bs(e,t){ms=e,ys=null,vs=null;var n=e.dependencies;null!==n&&null!==n.firstContext&&(Di(n.lanes,t)&&qd(),n.firstContext=null)}function Cs(e){bs&&s("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=ht?e._currentValue:e._currentValue2;if(vs===e);else{var n={context:e,memoizedValue:t,next:null};if(null===ys){if(null===ms)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");ys=n,ms.dependencies={lanes:Dr,firstContext:n}}else ys=ys.next=n}return t}var Es=null;function Ps(e){null===Es?Es=[e]:Es.push(e)}function Rs(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ps(t)):(n.next=i.next,i.next=n),t.interleaved=n,Os(e,r)}function Ms(e,t){return Os(e,t)}var Ls=Os;function Os(e,t){e.lanes=ji(e.lanes,t);var n=e.alternate;null!==n&&(n.lanes=ji(n.lanes,t)),null===n&&(e.flags&(fe|we))!==de&&wg(e);for(var r=e,i=e.return;null!==i;)i.childLanes=ji(i.childLanes,t),null!==(n=i.alternate)?n.childLanes=ji(n.childLanes,t):(i.flags&(fe|we))!==de&&wg(e),r=i,i=i.return;return r.tag===w?r.stateNode:null}var Is,Ns,Us=0,Ds=1,zs=2,js=3,Fs=!1;function Ws(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:Dr},effects:null};e.updateQueue=t}function Hs(e,t){var n=t.updateQueue,r=e.updateQueue;if(n===r){var i={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects};t.updateQueue=i}}function $s(e,t){return{eventTime:e,lane:t,tag:Us,payload:null,callback:null,next:null}}function Vs(e,t,n){var r=e.updateQueue;if(null===r)return null;var i=r.shared;if(Ns!==i||Is||(s("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Is=!0),(Jf&$f)!==Wf){var a=i.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),i.pending=t,Ls(e,n)}return function(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ps(t)):(n.next=i.next,i.next=n),t.interleaved=n,Os(e,r)}(e,i,t,n)}function Gs(e,t,n){var r=t.updateQueue;if(null!==r){var i=r.shared;if(Mi(n)){var a=i.lanes,o=ji(a=Wi(a,e.pendingLanes),n);i.lanes=o,Gi(e,o)}}}function Ys(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r){var i=r.updateQueue;if(n===i){var a=null,o=null,s=n.firstBaseUpdate;if(null!==s){var l=s;do{var u={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};null===o?a=o=u:(o.next=u,o=u),l=l.next}while(null!==l);null===o?a=o=t:(o.next=t,o=t)}else a=o=t;return n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}}var c=n.lastBaseUpdate;null===c?n.firstBaseUpdate=t:c.next=t,n.lastBaseUpdate=t}function qs(e,t,n,r,i,a){switch(n.tag){case Ds:var o=n.payload;if("function"==typeof o){Ss();var s=o.call(a,r,i);if(e.mode&Mr){xa(!0);try{o.call(a,r,i)}finally{xa(!1)}}return _s(),s}return o;case js:e.flags=e.flags&~Ee|ve;case Us:var l,u=n.payload;if("function"==typeof u){if(Ss(),l=u.call(a,r,i),e.mode&Mr){xa(!0);try{u.call(a,r,i)}finally{xa(!1)}}_s()}else l=u;return null==l?r:c({},r,l);case zs:return Fs=!0,r}return r}function Qs(e,t,n,r){var i=e.updateQueue;Fs=!1,Ns=i.shared;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===o?a=u:o.next=u,o=l;var c=e.alternate;if(null!==c){var d=c.updateQueue,h=d.lastBaseUpdate;h!==o&&(null===h?d.firstBaseUpdate=u:h.next=u,d.lastBaseUpdate=l)}}if(null!==a){for(var f=i.baseState,p=Dr,g=null,m=null,y=null,v=a;;){var b=v.lane,x=v.eventTime;if(zi(r,b)){if(null!==y){var S={eventTime:x,lane:zr,tag:v.tag,payload:v.payload,callback:v.callback,next:null};y=y.next=S}if(f=qs(e,0,v,f,t,n),null!==v.callback&&v.lane!==zr){e.flags|=ye;var _=i.effects;null===_?i.effects=[v]:_.push(v)}}else{var w={eventTime:x,lane:b,tag:v.tag,payload:v.payload,callback:v.callback,next:null};null===y?(m=y=w,g=f):y=y.next=w,p=ji(p,b)}if(null===(v=v.next)){if(null===(s=i.shared.pending))break;var A=s,k=A.next;A.next=null,v=k,i.lastBaseUpdate=A,i.shared.pending=null}}null===y&&(g=f),i.baseState=g,i.firstBaseUpdate=m,i.lastBaseUpdate=y;var T=i.shared.interleaved;if(null!==T){var B=T;do{p=ji(p,B.lane),B=B.next}while(B!==T)}else null===a&&(i.shared.lanes=Dr);ng(p),e.lanes=p,e.memoizedState=f}Ns=null}function Xs(e,t){if("function"!=typeof e)throw new Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function Ks(){Fs=!1}function Zs(){return Fs}function Js(e,t,n){var r=t.effects;if(t.effects=null,null!==r)for(var i=0;i<r.length;i++){var a=r[i],o=a.callback;null!==o&&(a.callback=null,Xs(o,n))}}Is=!1,Ns=null;var el={},tl=lr(el),nl=lr(el),rl=lr(el);function il(e){if(e===el)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function al(){return il(rl.current)}function ol(e,t){cr(rl,t,e),cr(nl,e,e),cr(tl,el,e);var n=Je(t);ur(tl,e),cr(tl,n,e)}function sl(e){ur(tl,e),ur(nl,e),ur(rl,e)}function ll(){return il(tl.current)}function ul(e){var t=il(rl.current),n=il(tl.current),r=et(n,e.type,t);n!==r&&(cr(nl,e,e),cr(tl,r,e))}function cl(e){nl.current===e&&(ur(tl,e),ur(nl,e))}var dl=1,hl=1,fl=2,pl=lr(0);function gl(e,t){return 0!=(e&t)}function ml(e){return e&dl}function yl(e,t){return e&dl|t}function vl(e,t){cr(pl,t,e)}function bl(e){ur(pl,e)}function xl(e,t){var n=e.memoizedState;return null!==n?null!==n.dehydrated:(e.memoizedProps,!0)}function Sl(e){for(var t=e;null!==t;){if(t.tag===L){var n=t.memoizedState;if(null!==n){var r=n.dehydrated;if(null===r||cn(r)||dn(r))return t}}else if(t.tag===z&&void 0!==t.memoizedProps.revealOrder){if((t.flags&ve)!==de)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _l=0,wl=1,Al=2,kl=4,Tl=8,Bl=[];function Cl(){for(var e=0;e<Bl.length;e++){var t=Bl[e];ht?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}Bl.length=0}var El,Pl,Rl=i.ReactCurrentDispatcher,Ml=i.ReactCurrentBatchConfig;El=new Set;var Ll=Dr,Ol=null,Il=null,Nl=null,Ul=!1,Dl=!1,zl=0,jl=0,Fl=25,Wl=null,Hl=null,$l=-1,Vl=!1;function Gl(){var e=Wl;null===Hl?Hl=[e]:Hl.push(e)}function Yl(){var e=Wl;null!==Hl&&($l++,Hl[$l]!==e&&function(e){var t=ce(Ol);if(!El.has(t)&&(El.add(t),null!==Hl)){for(var n="",r=30,i=0;i<=$l;i++){for(var a=Hl[i],o=i===$l?e:a,l=i+1+". "+a;l.length<r;)l+=" ";n+=l+=o+"\n"}s("React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",t,n)}}(e))}function ql(e){null==e||Ke(e)||s("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Wl,typeof e)}function Ql(){throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.")}function Xl(e,t){if(Vl)return!1;if(null===t)return s("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Wl),!1;e.length!==t.length&&s("The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",Wl,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!Oa(e[n],t[n]))return!1;return!0}function Kl(e,t,n,r,i,a){Ll=a,Ol=t,Hl=null!==e?e._debugHookTypes:null,$l=-1,Vl=null!==e&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=Dr,null!==e&&null!==e.memoizedState?Rl.current=rc:Rl.current=null!==Hl?nc:tc;var o=n(r,i);if(Dl){var l=0;do{if(Dl=!1,zl=0,l>=Fl)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");l+=1,Vl=!1,Il=null,Nl=null,t.updateQueue=null,$l=-1,Rl.current=ic,o=n(r,i)}while(Dl)}Rl.current=ec,t._debugHookTypes=Hl;var u=null!==Il&&null!==Il.next;if(Ll=Dr,Ol=null,Il=null,Nl=null,Wl=null,Hl=null,$l=-1,null!==e&&(e.flags&Fe)!=(t.flags&Fe)&&(e.mode&Pr)!==Er&&s("Internal React error: Expected static flag was missing. Please notify the React team."),Ul=!1,u)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return o}function Zl(){var e=0!==zl;return zl=0,e}function Jl(e,t,n){t.updateQueue=e.updateQueue,(t.mode&Lr)!==Er?t.flags&=~(Ne|Ie|_e|pe):t.flags&=~(_e|pe),e.lanes=Fi(e.lanes,n)}function eu(){if(Rl.current=ec,Ul){for(var e=Ol.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Ul=!1}Ll=Dr,Ol=null,Il=null,Nl=null,Hl=null,$l=-1,Wl=null,Vu=!1,Dl=!1,zl=0}function tu(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Nl?Ol.memoizedState=Nl=e:Nl=Nl.next=e,Nl}function nu(){var e,t;if(null===Il){var n=Ol.alternate;e=null!==n?n.memoizedState:null}else e=Il.next;if(null!==(t=null===Nl?Ol.memoizedState:Nl.next))t=(Nl=t).next,Il=e;else{if(null===e)throw new Error("Rendered more hooks than during the previous render.");var r={memoizedState:(Il=e).memoizedState,baseState:Il.baseState,baseQueue:Il.baseQueue,queue:Il.queue,next:null};null===Nl?Ol.memoizedState=Nl=r:Nl=Nl.next=r}return Nl}function ru(e,t){return"function"==typeof t?t(e):t}function iu(e,t,n){var r,i=tu();r=void 0!==n?n(t):t,i.memoizedState=i.baseState=r;var a={pending:null,interleaved:null,lanes:Dr,dispatch:null,lastRenderedReducer:e,lastRenderedState:r};i.queue=a;var o=a.dispatch=qu.bind(null,Ol,a);return[i.memoizedState,o]}function au(e,t,n){var r=nu(),i=r.queue;if(null===i)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;var a=Il,o=a.baseQueue,l=i.pending;if(null!==l){if(null!==o){var u=o.next,c=l.next;o.next=c,l.next=u}a.baseQueue!==o&&s("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),a.baseQueue=o=l,i.pending=null}if(null!==o){var d=o.next,h=a.baseState,f=null,p=null,g=null,m=d;do{var y=m.lane;if(zi(Ll,y)){if(null!==g){var v={lane:zr,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null};g=g.next=v}h=m.hasEagerState?m.eagerState:e(h,m.action)}else{var b={lane:y,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null};null===g?(p=g=b,f=h):g=g.next=b,Ol.lanes=ji(Ol.lanes,y),ng(y)}m=m.next}while(null!==m&&m!==d);null===g?f=h:g.next=p,Oa(h,r.memoizedState)||qd(),r.memoizedState=h,r.baseState=f,r.baseQueue=g,i.lastRenderedState=h}var x=i.interleaved;if(null!==x){var S=x;do{var _=S.lane;Ol.lanes=ji(Ol.lanes,_),ng(_),S=S.next}while(S!==x)}else null===o&&(i.lanes=Dr);var w=i.dispatch;return[r.memoizedState,w]}function ou(e,t,n){var r=nu(),i=r.queue;if(null===i)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;var a=i.dispatch,o=i.pending,s=r.memoizedState;if(null!==o){i.pending=null;var l=o.next,u=l;do{s=e(s,u.action),u=u.next}while(u!==l);Oa(s,r.memoizedState)||qd(),r.memoizedState=s,null===r.baseQueue&&(r.baseState=s),i.lastRenderedState=s}return[s,a]}function su(e,t,n){var r,i=Ol,a=tu();if(To()){if(void 0===n)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");r=n(),Pl||r!==n()&&(s("The result of getServerSnapshot should be cached to avoid an infinite loop"),Pl=!0)}else{if(r=t(),!Pl){var o=t();Oa(r,o)||(s("The result of getSnapshot should be cached to avoid an infinite loop"),Pl=!0)}if(null===Dp())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ri(0,Ll)||uu(i,t,r)}a.memoizedState=r;var l={value:r,getSnapshot:t};return a.queue=l,_u(du.bind(null,i,l,e),[e]),i.flags|=_e,yu(wl|Tl,cu.bind(null,i,l,r,t),void 0,null),r}function lu(e,t,n){var r=Ol,i=nu(),a=t();if(!Pl){var o=t();Oa(a,o)||(s("The result of getSnapshot should be cached to avoid an infinite loop"),Pl=!0)}var l=i.memoizedState,u=!Oa(l,a);u&&(i.memoizedState=a,qd());var c=i.queue;if(wu(du.bind(null,r,c,e),[e]),c.getSnapshot!==t||u||null!==Nl&&Nl.memoizedState.tag&wl){if(r.flags|=_e,yu(wl|Tl,cu.bind(null,r,c,a,t),void 0,null),null===Dp())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ri(0,Ll)||uu(r,t,a)}return a}function uu(e,t,n){e.flags|=ke;var r={getSnapshot:t,value:n},i=Ol.updateQueue;if(null===i)i={lastEffect:null,stores:null},Ol.updateQueue=i,i.stores=[r];else{var a=i.stores;null===a?i.stores=[r]:a.push(r)}}function cu(e,t,n,r){t.value=n,t.getSnapshot=r,hu(t)&&fu(e)}function du(e,t,n){return n((function(){hu(t)&&fu(e)}))}function hu(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!Oa(n,r)}catch(e){return!0}}function fu(e){var t=Ms(e,jr);null!==t&&Wp(t,e,jr,_i)}function pu(e){var t=tu();"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:Dr,dispatch:null,lastRenderedReducer:ru,lastRenderedState:e};t.queue=n;var r=n.dispatch=Qu.bind(null,Ol,n);return[t.memoizedState,r]}function gu(e){return au(ru)}function mu(e){return ou(ru)}function yu(e,t,n,r){var i={tag:e,create:t,destroy:n,deps:r,next:null},a=Ol.updateQueue;if(null===a)a={lastEffect:null,stores:null},Ol.updateQueue=a,a.lastEffect=i.next=i;else{var o=a.lastEffect;if(null===o)a.lastEffect=i.next=i;else{var s=o.next;o.next=i,i.next=s,a.lastEffect=i}}return i}function vu(e){var t={current:e};return tu().memoizedState=t,t}function bu(e){return nu().memoizedState}function xu(e,t,n,r){var i=tu(),a=void 0===r?null:r;Ol.flags|=e,i.memoizedState=yu(wl|t,n,void 0,a)}function Su(e,t,n,r){var i=nu(),a=void 0===r?null:r,o=void 0;if(null!==Il){var s=Il.memoizedState;if(o=s.destroy,null!==a&&Xl(a,s.deps))return void(i.memoizedState=yu(t,n,o,a))}Ol.flags|=e,i.memoizedState=yu(wl|t,n,o,a)}function _u(e,t){return(Ol.mode&Lr)!==Er?xu(Ne|_e|Oe,Tl,e,t):xu(_e|Oe,Tl,e,t)}function wu(e,t){return Su(_e,Tl,e,t)}function Au(e,t){return xu(pe,Al,e,t)}function ku(e,t){return Su(pe,Al,e,t)}function Tu(e,t){var n=pe;return n|=Le,(Ol.mode&Lr)!==Er&&(n|=Ie),xu(n,kl,e,t)}function Bu(e,t){return Su(pe,kl,e,t)}function Cu(e,t){if("function"==typeof t){var n=t,r=e();return n(r),function(){n(null)}}if(null!=t){var i=t;i.hasOwnProperty("current")||s("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(i).join(", ")+"}");var a=e();return i.current=a,function(){i.current=null}}}function Eu(e,t,n){"function"!=typeof t&&s("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null,i=pe;return i|=Le,(Ol.mode&Lr)!==Er&&(i|=Ie),xu(i,kl,Cu.bind(null,t,e),r)}function Pu(e,t,n){"function"!=typeof t&&s("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null;return Su(pe,kl,Cu.bind(null,t,e),r)}function Ru(e,t){}var Mu=Ru;function Lu(e,t){var n=void 0===t?null:t;return tu().memoizedState=[e,n],e}function Ou(e,t){var n=nu(),r=void 0===t?null:t,i=n.memoizedState;return null!==i&&null!==r&&Xl(r,i[1])?i[0]:(n.memoizedState=[e,r],e)}function Iu(e,t){var n=tu(),r=void 0===t?null:t,i=e();return n.memoizedState=[i,r],i}function Nu(e,t){var n=nu(),r=void 0===t?null:t,i=n.memoizedState;if(null!==i&&null!==r&&Xl(r,i[1]))return i[0];var a=e();return n.memoizedState=[a,r],a}function Uu(e){return tu().memoizedState=e,e}function Du(e){return ju(nu(),Il.memoizedState,e)}function zu(e){var t=nu();return null===Il?(t.memoizedState=e,e):ju(t,Il.memoizedState,e)}function ju(e,t,n){if((Ll&(jr|Wr|$r))!==Dr){if(!Oa(n,t)){var r=Li();Ol.lanes=ji(Ol.lanes,r),ng(r),e.baseState=!0}return t}return e.baseState&&(e.baseState=!1,qd()),e.memoizedState=n,n}function Fu(e,t,n){var r,i,a=ea();ta((i=Xi,0!==(r=a)&&r<i?r:i)),e(!0);var s=Ml.transition;Ml.transition={};var l=Ml.transition;Ml.transition._updatedFibers=new Set;try{e(!1),t()}finally{ta(a),Ml.transition=s,null===s&&l._updatedFibers&&(l._updatedFibers.size>10&&o("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),l._updatedFibers.clear())}}function Wu(){var e=pu(!1),t=e[0],n=e[1],r=Fu.bind(null,n);return tu().memoizedState=r,[t,r]}function Hu(){return[gu()[0],nu().memoizedState]}function $u(){return[mu()[0],nu().memoizedState]}var Vu=!1;function Gu(){var e,t=tu(),n=Dp().identifierPrefix;if(To()){e=":"+n+"R"+Ka();var r=zl++;r>0&&(e+="H"+r.toString(32)),e+=":"}else e=":"+n+"r"+(jl++).toString(32)+":";return t.memoizedState=e,e}function Yu(){return nu().memoizedState}function qu(e,t,n){"function"==typeof arguments[3]&&s("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=jp(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xu(e))Ku(t,i);else{var a=Rs(e,t,i,r);null!==a&&(Wp(a,e,r,zp()),Zu(a,t,r))}Ju(e,r)}function Qu(e,t,n){"function"==typeof arguments[3]&&s("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=jp(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xu(e))Ku(t,i);else{var a=e.alternate;if(e.lanes===Dr&&(null===a||a.lanes===Dr)){var o=t.lastRenderedReducer;if(null!==o){var l;l=Rl.current,Rl.current=oc;try{var u=t.lastRenderedState,c=o(u,n);if(i.hasEagerState=!0,i.eagerState=c,Oa(c,u))return void function(e,t,n,r){var i=t.interleaved;null===i?(n.next=n,Ps(t)):(n.next=i.next,i.next=n),t.interleaved=n}(0,t,i)}catch(e){}finally{Rl.current=l}}}var d=Rs(e,t,i,r);null!==d&&(Wp(d,e,r,zp()),Zu(d,t,r))}Ju(e,r)}function Xu(e){var t=e.alternate;return e===Ol||null!==t&&t===Ol}function Ku(e,t){Dl=Ul=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zu(e,t,n){if(Mi(n)){var r=t.lanes,i=ji(r=Wi(r,e.pendingLanes),n);t.lanes=i,Gi(e,i)}}function Ju(e,t,n){La(e,t)}var ec={readContext:Cs,useCallback:Ql,useContext:Ql,useEffect:Ql,useImperativeHandle:Ql,useInsertionEffect:Ql,useLayoutEffect:Ql,useMemo:Ql,useReducer:Ql,useRef:Ql,useState:Ql,useDebugValue:Ql,useDeferredValue:Ql,useTransition:Ql,useMutableSource:Ql,useSyncExternalStore:Ql,useId:Ql,unstable_isNewReconciler:h},tc=null,nc=null,rc=null,ic=null,ac=null,oc=null,sc=null,lc=function(){s("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},uc=function(){s("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};tc={readContext:function(e){return Cs(e)},useCallback:function(e,t){return Wl="useCallback",Gl(),ql(t),Lu(e,t)},useContext:function(e){return Wl="useContext",Gl(),Cs(e)},useEffect:function(e,t){return Wl="useEffect",Gl(),ql(t),_u(e,t)},useImperativeHandle:function(e,t,n){return Wl="useImperativeHandle",Gl(),ql(n),Eu(e,t,n)},useInsertionEffect:function(e,t){return Wl="useInsertionEffect",Gl(),ql(t),Au(e,t)},useLayoutEffect:function(e,t){return Wl="useLayoutEffect",Gl(),ql(t),Tu(e,t)},useMemo:function(e,t){Wl="useMemo",Gl(),ql(t);var n=Rl.current;Rl.current=ac;try{return Iu(e,t)}finally{Rl.current=n}},useReducer:function(e,t,n){Wl="useReducer",Gl();var r=Rl.current;Rl.current=ac;try{return iu(e,t,n)}finally{Rl.current=r}},useRef:function(e){return Wl="useRef",Gl(),vu(e)},useState:function(e){Wl="useState",Gl();var t=Rl.current;Rl.current=ac;try{return pu(e)}finally{Rl.current=t}},useDebugValue:function(e,t){Wl="useDebugValue",Gl()},useDeferredValue:function(e){return Wl="useDeferredValue",Gl(),Uu(e)},useTransition:function(){return Wl="useTransition",Gl(),Wu()},useMutableSource:function(e,t,n){Wl="useMutableSource",Gl()},useSyncExternalStore:function(e,t,n){return Wl="useSyncExternalStore",Gl(),su(e,t,n)},useId:function(){return Wl="useId",Gl(),Gu()},unstable_isNewReconciler:h},nc={readContext:function(e){return Cs(e)},useCallback:function(e,t){return Wl="useCallback",Yl(),Lu(e,t)},useContext:function(e){return Wl="useContext",Yl(),Cs(e)},useEffect:function(e,t){return Wl="useEffect",Yl(),_u(e,t)},useImperativeHandle:function(e,t,n){return Wl="useImperativeHandle",Yl(),Eu(e,t,n)},useInsertionEffect:function(e,t){return Wl="useInsertionEffect",Yl(),Au(e,t)},useLayoutEffect:function(e,t){return Wl="useLayoutEffect",Yl(),Tu(e,t)},useMemo:function(e,t){Wl="useMemo",Yl();var n=Rl.current;Rl.current=ac;try{return Iu(e,t)}finally{Rl.current=n}},useReducer:function(e,t,n){Wl="useReducer",Yl();var r=Rl.current;Rl.current=ac;try{return iu(e,t,n)}finally{Rl.current=r}},useRef:function(e){return Wl="useRef",Yl(),vu(e)},useState:function(e){Wl="useState",Yl();var t=Rl.current;Rl.current=ac;try{return pu(e)}finally{Rl.current=t}},useDebugValue:function(e,t){Wl="useDebugValue",Yl()},useDeferredValue:function(e){return Wl="useDeferredValue",Yl(),Uu(e)},useTransition:function(){return Wl="useTransition",Yl(),Wu()},useMutableSource:function(e,t,n){Wl="useMutableSource",Yl()},useSyncExternalStore:function(e,t,n){return Wl="useSyncExternalStore",Yl(),su(e,t,n)},useId:function(){return Wl="useId",Yl(),Gu()},unstable_isNewReconciler:h},rc={readContext:function(e){return Cs(e)},useCallback:function(e,t){return Wl="useCallback",Yl(),Ou(e,t)},useContext:function(e){return Wl="useContext",Yl(),Cs(e)},useEffect:function(e,t){return Wl="useEffect",Yl(),wu(e,t)},useImperativeHandle:function(e,t,n){return Wl="useImperativeHandle",Yl(),Pu(e,t,n)},useInsertionEffect:function(e,t){return Wl="useInsertionEffect",Yl(),ku(e,t)},useLayoutEffect:function(e,t){return Wl="useLayoutEffect",Yl(),Bu(e,t)},useMemo:function(e,t){Wl="useMemo",Yl();var n=Rl.current;Rl.current=oc;try{return Nu(e,t)}finally{Rl.current=n}},useReducer:function(e,t,n){Wl="useReducer",Yl();var r=Rl.current;Rl.current=oc;try{return au(e)}finally{Rl.current=r}},useRef:function(e){return Wl="useRef",Yl(),bu()},useState:function(e){Wl="useState",Yl();var t=Rl.current;Rl.current=oc;try{return gu()}finally{Rl.current=t}},useDebugValue:function(e,t){return Wl="useDebugValue",Yl(),Mu()},useDeferredValue:function(e){return Wl="useDeferredValue",Yl(),Du(e)},useTransition:function(){return Wl="useTransition",Yl(),Hu()},useMutableSource:function(e,t,n){Wl="useMutableSource",Yl()},useSyncExternalStore:function(e,t,n){return Wl="useSyncExternalStore",Yl(),lu(e,t)},useId:function(){return Wl="useId",Yl(),Yu()},unstable_isNewReconciler:h},ic={readContext:function(e){return Cs(e)},useCallback:function(e,t){return Wl="useCallback",Yl(),Ou(e,t)},useContext:function(e){return Wl="useContext",Yl(),Cs(e)},useEffect:function(e,t){return Wl="useEffect",Yl(),wu(e,t)},useImperativeHandle:function(e,t,n){return Wl="useImperativeHandle",Yl(),Pu(e,t,n)},useInsertionEffect:function(e,t){return Wl="useInsertionEffect",Yl(),ku(e,t)},useLayoutEffect:function(e,t){return Wl="useLayoutEffect",Yl(),Bu(e,t)},useMemo:function(e,t){Wl="useMemo",Yl();var n=Rl.current;Rl.current=sc;try{return Nu(e,t)}finally{Rl.current=n}},useReducer:function(e,t,n){Wl="useReducer",Yl();var r=Rl.current;Rl.current=sc;try{return ou(e)}finally{Rl.current=r}},useRef:function(e){return Wl="useRef",Yl(),bu()},useState:function(e){Wl="useState",Yl();var t=Rl.current;Rl.current=sc;try{return mu()}finally{Rl.current=t}},useDebugValue:function(e,t){return Wl="useDebugValue",Yl(),Mu()},useDeferredValue:function(e){return Wl="useDeferredValue",Yl(),zu(e)},useTransition:function(){return Wl="useTransition",Yl(),$u()},useMutableSource:function(e,t,n){Wl="useMutableSource",Yl()},useSyncExternalStore:function(e,t,n){return Wl="useSyncExternalStore",Yl(),lu(e,t)},useId:function(){return Wl="useId",Yl(),Yu()},unstable_isNewReconciler:h},ac={readContext:function(e){return lc(),Cs(e)},useCallback:function(e,t){return Wl="useCallback",uc(),Gl(),Lu(e,t)},useContext:function(e){return Wl="useContext",uc(),Gl(),Cs(e)},useEffect:function(e,t){return Wl="useEffect",uc(),Gl(),_u(e,t)},useImperativeHandle:function(e,t,n){return Wl="useImperativeHandle",uc(),Gl(),Eu(e,t,n)},useInsertionEffect:function(e,t){return Wl="useInsertionEffect",uc(),Gl(),Au(e,t)},useLayoutEffect:function(e,t){return Wl="useLayoutEffect",uc(),Gl(),Tu(e,t)},useMemo:function(e,t){Wl="useMemo",uc(),Gl();var n=Rl.current;Rl.current=ac;try{return Iu(e,t)}finally{Rl.current=n}},useReducer:function(e,t,n){Wl="useReducer",uc(),Gl();var r=Rl.current;Rl.current=ac;try{return iu(e,t,n)}finally{Rl.current=r}},useRef:function(e){return Wl="useRef",uc(),Gl(),vu(e)},useState:function(e){Wl="useState",uc(),Gl();var t=Rl.current;Rl.current=ac;try{return pu(e)}finally{Rl.current=t}},useDebugValue:function(e,t){Wl="useDebugValue",uc(),Gl()},useDeferredValue:function(e){return Wl="useDeferredValue",uc(),Gl(),Uu(e)},useTransition:function(){return Wl="useTransition",uc(),Gl(),Wu()},useMutableSource:function(e,t,n){Wl="useMutableSource",uc(),Gl()},useSyncExternalStore:function(e,t,n){return Wl="useSyncExternalStore",uc(),Gl(),su(e,t,n)},useId:function(){return Wl="useId",uc(),Gl(),Gu()},unstable_isNewReconciler:h},oc={readContext:function(e){return lc(),Cs(e)},useCallback:function(e,t){return Wl="useCallback",uc(),Yl(),Ou(e,t)},useContext:function(e){return Wl="useContext",uc(),Yl(),Cs(e)},useEffect:function(e,t){return Wl="useEffect",uc(),Yl(),wu(e,t)},useImperativeHandle:function(e,t,n){return Wl="useImperativeHandle",uc(),Yl(),Pu(e,t,n)},useInsertionEffect:function(e,t){return Wl="useInsertionEffect",uc(),Yl(),ku(e,t)},useLayoutEffect:function(e,t){return Wl="useLayoutEffect",uc(),Yl(),Bu(e,t)},useMemo:function(e,t){Wl="useMemo",uc(),Yl();var n=Rl.current;Rl.current=oc;try{return Nu(e,t)}finally{Rl.current=n}},useReducer:function(e,t,n){Wl="useReducer",uc(),Yl();var r=Rl.current;Rl.current=oc;try{return au(e)}finally{Rl.current=r}},useRef:function(e){return Wl="useRef",uc(),Yl(),bu()},useState:function(e){Wl="useState",uc(),Yl();var t=Rl.current;Rl.current=oc;try{return gu()}finally{Rl.current=t}},useDebugValue:function(e,t){return Wl="useDebugValue",uc(),Yl(),Mu()},useDeferredValue:function(e){return Wl="useDeferredValue",uc(),Yl(),Du(e)},useTransition:function(){return Wl="useTransition",uc(),Yl(),Hu()},useMutableSource:function(e,t,n){Wl="useMutableSource",uc(),Yl()},useSyncExternalStore:function(e,t,n){return Wl="useSyncExternalStore",uc(),Yl(),lu(e,t)},useId:function(){return Wl="useId",uc(),Yl(),Yu()},unstable_isNewReconciler:h},sc={readContext:function(e){return lc(),Cs(e)},useCallback:function(e,t){return Wl="useCallback",uc(),Yl(),Ou(e,t)},useContext:function(e){return Wl="useContext",uc(),Yl(),Cs(e)},useEffect:function(e,t){return Wl="useEffect",uc(),Yl(),wu(e,t)},useImperativeHandle:function(e,t,n){return Wl="useImperativeHandle",uc(),Yl(),Pu(e,t,n)},useInsertionEffect:function(e,t){return Wl="useInsertionEffect",uc(),Yl(),ku(e,t)},useLayoutEffect:function(e,t){return Wl="useLayoutEffect",uc(),Yl(),Bu(e,t)},useMemo:function(e,t){Wl="useMemo",uc(),Yl();var n=Rl.current;Rl.current=oc;try{return Nu(e,t)}finally{Rl.current=n}},useReducer:function(e,t,n){Wl="useReducer",uc(),Yl();var r=Rl.current;Rl.current=oc;try{return ou(e)}finally{Rl.current=r}},useRef:function(e){return Wl="useRef",uc(),Yl(),bu()},useState:function(e){Wl="useState",uc(),Yl();var t=Rl.current;Rl.current=oc;try{return mu()}finally{Rl.current=t}},useDebugValue:function(e,t){return Wl="useDebugValue",uc(),Yl(),Mu()},useDeferredValue:function(e){return Wl="useDeferredValue",uc(),Yl(),zu(e)},useTransition:function(){return Wl="useTransition",uc(),Yl(),$u()},useMutableSource:function(e,t,n){Wl="useMutableSource",uc(),Yl()},useSyncExternalStore:function(e,t,n){return Wl="useSyncExternalStore",uc(),Yl(),lu(e,t)},useId:function(){return Wl="useId",uc(),Yl(),Yu()},unstable_isNewReconciler:h};var cc=r.unstable_now,hc=0,fc=-1,pc=-1,gc=-1,mc=!1,yc=!1;function vc(){return mc}function bc(){return hc}function xc(){hc=cc()}function Sc(e){pc=cc(),e.actualStartTime<0&&(e.actualStartTime=cc())}function _c(e){pc=-1}function wc(e,t){if(pc>=0){var n=cc()-pc;e.actualDuration+=n,t&&(e.selfBaseDuration=n),pc=-1}}function Ac(e){if(fc>=0){var t=cc()-fc;fc=-1;for(var n=e.return;null!==n;){switch(n.tag){case w:case M:return void(n.stateNode.effectDuration+=t)}n=n.return}}}function kc(e){if(gc>=0){var t=cc()-gc;gc=-1;for(var n=e.return;null!==n;){switch(n.tag){case w:var r=n.stateNode;return void(null!==r&&(r.passiveEffectDuration+=t));case M:var i=n.stateNode;return void(null!==i&&(i.passiveEffectDuration+=t))}n=n.return}}}function Tc(){fc=cc()}function Bc(){gc=cc()}function Cc(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Ec(e,t){if(e&&e.defaultProps){var n=c({},t),r=e.defaultProps;for(var i in r)void 0===n[i]&&(n[i]=r[i]);return n}return t}var Pc,Rc,Mc,Lc,Oc,Ic,Nc,Uc,Dc,zc,jc,Fc={};Pc=new Set,Rc=new Set,Mc=new Set,Lc=new Set,Uc=new Set,Oc=new Set,Dc=new Set,zc=new Set,jc=new Set;var Wc=new Set;function Hc(e,t,n,r){var i=e.memoizedState,a=n(r,i);if(e.mode&Mr){xa(!0);try{a=n(r,i)}finally{xa(!1)}}Ic(t,a);var o=null==a?i:c({},i,a);e.memoizedState=o,e.lanes===Dr&&(e.updateQueue.baseState=o)}Nc=function(e,t){if(null!==e&&"function"!=typeof e){var n=t+"_"+e;Wc.has(n)||(Wc.add(n),s("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},Ic=function(e,t){if(void 0===t){var n=le(e)||"Component";Oc.has(n)||(Oc.add(n),s("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Fc,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(Fc);var $c={isMounted:function(e){var t=We.current;if(null!==t&&t.tag===S){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||s("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",ce(n)||"A component"),r._warnedAboutRefsInRender=!0}var i=d(e);return!!i&&He(i)===i},enqueueSetState:function(e,t,n){var r=d(e),i=zp(),a=jp(r),o=$s(i,a);o.payload=t,null!=n&&(Nc(n,"setState"),o.callback=n);var s=Vs(r,o,a);null!==s&&(Wp(s,r,a,i),Gs(s,r,a)),La(r,a)},enqueueReplaceState:function(e,t,n){var r=d(e),i=zp(),a=jp(r),o=$s(i,a);o.tag=Ds,o.payload=t,null!=n&&(Nc(n,"replaceState"),o.callback=n);var s=Vs(r,o,a);null!==s&&(Wp(s,r,a,i),Gs(s,r,a)),La(r,a)},enqueueForceUpdate:function(e,t){var n=d(e),r=zp(),i=jp(n),a=$s(r,i);a.tag=zs,null!=t&&(Nc(t,"forceUpdate"),a.callback=t);var o=Vs(n,a,i);null!==o&&(Wp(o,n,i,r),Gs(o,n,i)),function(e,t){null!==ya&&"function"==typeof ya.markForceUpdateScheduled&&ya.markForceUpdateScheduled(e,t)}(n,i)}};function Vc(e,t,n,r,i,a,o){var l=e.stateNode;if("function"==typeof l.shouldComponentUpdate){var u=l.shouldComponentUpdate(r,a,o);if(e.mode&Mr){xa(!0);try{u=l.shouldComponentUpdate(r,a,o)}finally{xa(!1)}}return void 0===u&&s("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",le(t)||"Component"),u}return!(t.prototype&&t.prototype.isPureReactComponent&&Po(n,r)&&Po(i,a))}function Gc(e,t){t.updater=$c,e.stateNode=t,function(e,t){e._reactInternals=t}(t,e),t._reactInternalInstance=Fc}function Yc(e,t,n){var r=!1,i=dr,a=dr,o=t.contextType;if("contextType"in t&&null!==o&&(void 0===o||o.$$typeof!==K||void 0!==o._context)&&!zc.has(t)){zc.add(t);var l="";l=void 0===o?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":"object"!=typeof o?" However, it is set to a "+typeof o+".":o.$$typeof===X?" Did you accidentally pass the Context.Provider instead?":void 0!==o._context?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(o).join(", ")+"}.",s("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",le(t)||"Component",l)}"object"==typeof o&&null!==o?a=Cs(o):(i=gr(0,t,!0),a=(r=null!=t.contextTypes)?yr(e,i):dr);var u=new t(n,a);if(e.mode&Mr){xa(!0);try{u=new t(n,a)}finally{xa(!1)}}var c=e.memoizedState=null!==u.state&&void 0!==u.state?u.state:null;if(Gc(e,u),"function"==typeof t.getDerivedStateFromProps&&null===c){var d=le(t)||"Component";Rc.has(d)||(Rc.add(d),s("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",d,null===u.state?"null":"undefined",d))}if("function"==typeof t.getDerivedStateFromProps||"function"==typeof u.getSnapshotBeforeUpdate){var h=null,f=null,p=null;if("function"==typeof u.componentWillMount&&!0!==u.componentWillMount.__suppressDeprecationWarning?h="componentWillMount":"function"==typeof u.UNSAFE_componentWillMount&&(h="UNSAFE_componentWillMount"),"function"==typeof u.componentWillReceiveProps&&!0!==u.componentWillReceiveProps.__suppressDeprecationWarning?f="componentWillReceiveProps":"function"==typeof u.UNSAFE_componentWillReceiveProps&&(f="UNSAFE_componentWillReceiveProps"),"function"==typeof u.componentWillUpdate&&!0!==u.componentWillUpdate.__suppressDeprecationWarning?p="componentWillUpdate":"function"==typeof u.UNSAFE_componentWillUpdate&&(p="UNSAFE_componentWillUpdate"),null!==h||null!==f||null!==p){var g=le(t)||"Component",m="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Lc.has(g)||(Lc.add(g),s("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://reactjs.org/link/unsafe-component-lifecycles",g,m,null!==h?"\n "+h:"",null!==f?"\n "+f:"",null!==p?"\n "+p:""))}}return r&&mr(e,i,a),u}function qc(e,t,n,r){var i=t.state;if("function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==i){var a=ce(e)||"Component";Pc.has(a)||(Pc.add(a),s("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",a)),$c.enqueueReplaceState(t,t.state,null)}}function Qc(e,t,n,r){!function(e,t,n){var r=e.stateNode,i=le(t)||"Component";r.render||(t.prototype&&"function"==typeof t.prototype.render?s("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",i):s("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",i)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||s("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",i),r.getDefaultProps&&!r.getDefaultProps.isReactClassApproved&&s("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",i),r.propTypes&&s("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",i),r.contextType&&s("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",i),t.childContextTypes&&!jc.has(t)&&(e.mode&Mr)===Er&&(jc.add(t),s("%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead\n\n.Learn more about this warning here: https://reactjs.org/link/legacy-context",i)),t.contextTypes&&!jc.has(t)&&(e.mode&Mr)===Er&&(jc.add(t),s("%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",i)),r.contextTypes&&s("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",i),t.contextType&&t.contextTypes&&!Dc.has(t)&&(Dc.add(t),s("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",i)),"function"==typeof r.componentShouldUpdate&&s("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",i),t.prototype&&t.prototype.isPureReactComponent&&void 0!==r.shouldComponentUpdate&&s("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",le(t)||"A pure component"),"function"==typeof r.componentDidUnmount&&s("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",i),"function"==typeof r.componentDidReceiveProps&&s("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",i),"function"==typeof r.componentWillRecieveProps&&s("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",i),"function"==typeof r.UNSAFE_componentWillRecieveProps&&s("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",i);var a=r.props!==n;void 0!==r.props&&a&&s("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",i,i),r.defaultProps&&s("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",i,i),"function"!=typeof r.getSnapshotBeforeUpdate||"function"==typeof r.componentDidUpdate||Mc.has(t)||(Mc.add(t),s("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",le(t))),"function"==typeof r.getDerivedStateFromProps&&s("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof r.getDerivedStateFromError&&s("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof t.getSnapshotBeforeUpdate&&s("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",i);var o=r.state;o&&("object"!=typeof o||Ke(o))&&s("%s.state: must be set to an object or null",i),"function"==typeof r.getChildContext&&"object"!=typeof t.childContextTypes&&s("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",i)}(e,t,n);var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ws(e);var a=t.contextType;if("object"==typeof a&&null!==a)i.context=Cs(a);else{var o=gr(0,t,!0);i.context=yr(e,o)}if(i.state===n){var l=le(t)||"Component";Uc.has(l)||(Uc.add(l),s("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",l))}e.mode&Mr&&jo.recordLegacyContextWarning(e,i),jo.recordUnsafeLifecycleWarnings(e,i),i.state=e.memoizedState;var u=t.getDerivedStateFromProps;if("function"==typeof u&&(Hc(e,t,u,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(function(e,t){var n=t.state;"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),n!==t.state&&(s("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ce(e)||"Component"),$c.enqueueReplaceState(t,t.state,null))}(e,i),Qs(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount){var c=pe;c|=Le,(e.mode&Lr)!==Er&&(c|=Ie),e.flags|=c}}function Xc(e,t){return{value:e,source:t,stack:Mo(t),digest:null}}function Kc(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Zc(e,t){try{var n=t.value,r=t.source,i=t.stack,a=null!==i?i:"";if(null!=n&&n._suppressLogging){if(e.tag===S)return;console.error(n)}var o=r?ce(r):null,s=(o?"The above error occurred in the <"+o+"> component:":"The above error occurred in one of your React components:")+"\n"+a+"\n\n"+(e.tag===w?"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.":"React will try to recreate this component tree from scratch using the error boundary you provided, "+(ce(e)||"Anonymous")+".");console.error(s)}catch(e){setTimeout((function(){throw e}))}}var Jc="function"==typeof WeakMap?WeakMap:Map;function ed(e,t,n){var r=$s(_i,n);r.tag=js,r.payload={element:null};var i=t.value;return r.callback=function(){hg(i),Zc(e,t)},r}function td(e,t,n){var r=$s(_i,n);r.tag=js;var i=e.type.getDerivedStateFromError;if("function"==typeof i){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){zg(e),Zc(e,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(r.callback=function(){var n;zg(e),Zc(e,t),"function"!=typeof i&&(n=this,null===Sp?Sp=new Set([n]):Sp.add(n));var r=t.value,a=t.stack;this.componentDidCatch(r,{componentStack:null!==a?a:""}),"function"!=typeof i&&(Di(e.lanes,jr)||s("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",ce(e)||"Unknown"))}),r}function nd(e,t,n){var r,i=e.pingCache;if(null===i?(i=e.pingCache=new Jc,r=new Set,i.set(t,r)):void 0===(r=i.get(t))&&(r=new Set,i.set(t,r)),!r.has(n)){r.add(n);var a=gg.bind(null,e,t,n);ba&&Tg(e,n),t.then(a,a)}}function rd(e){var t=e;do{if(t.tag===L&&xl(t))return t;t=t.return}while(null!==t);return null}function id(e,t,n,r,i){if((e.mode&Pr)===Er){if(e===t)e.flags|=Ee;else{if(e.flags|=ve,n.flags|=Pe,n.flags&=~(Te|Ce),n.tag===S)if(null===n.alternate)n.tag=U;else{var a=$s(_i,jr);a.tag=zs,Vs(n,a,jr)}n.lanes=ji(n.lanes,jr)}return e}return e.flags|=Ee,e.lanes=i,e}function ad(e,t,n,r,i){if(n.flags|=Ce,ba&&Tg(e,i),null!==r&&"object"==typeof r&&"function"==typeof r.then){var a=r;!function(e,t){var n=e.tag;if((e.mode&Pr)===Er&&(n===x||n===R||n===I)){var r=e.alternate;r?(e.updateQueue=r.updateQueue,e.memoizedState=r.memoizedState,e.lanes=r.lanes):(e.updateQueue=null,e.memoizedState=null)}}(n),To()&&n.mode&Pr&&co();var o=rd(t);if(null!==o)return o.flags&=~be,id(o,t,n,0,i),o.mode&Pr&&nd(e,a,i),void function(e,t,n,r){var i=e.updateQueue;if(null===i){var a=new Set;a.add(n),e.updateQueue=a}else i.add(n)}(o,0,a);if((i&jr)===Dr)return nd(e,a,i),void rg();r=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.")}else if(To()&&n.mode&Pr){co();var s=rd(t);if(null!==s)return(s.flags&Ee)===de&&(s.flags|=be),id(s,t,n,0,i),void Bo(Xc(r,n))}!function(e){ap!==Xf&&(ap=qf),null===cp?cp=[e]:cp.push(e)}(r=Xc(r,n));var l=t;do{switch(l.tag){case w:var u=r;l.flags|=Ee;var c=Ii(i);return l.lanes=ji(l.lanes,c),void Ys(l,ed(l,u,c));case S:var d=r,h=l.type,f=l.stateNode;if((l.flags&ve)===de&&("function"==typeof h.getDerivedStateFromError||null!==f&&"function"==typeof f.componentDidCatch&&!dg(f))){l.flags|=Ee;var p=Ii(i);return l.lanes=ji(l.lanes,p),void Ys(l,td(l,d,p))}}l=l.return}while(null!==l)}var od,sd,ld,ud,cd,dd,hd,fd,pd,gd=i.ReactCurrentOwner,md=!1;function yd(e,t,n,r){t.child=null===e?hs(t,null,n,r):ds(t,e.child,n,r)}function vd(e,t,n,r,i){if(t.type!==t.elementType){var a=n.propTypes;a&&rr(a,r,"prop",le(n))}var o,s,l=n.render,u=t.ref;if(Bs(t,i),Aa(t),gd.current=t,zo(!0),o=Kl(e,t,l,r,u,i),s=Zl(),t.mode&Mr){xa(!0);try{o=Kl(e,t,l,r,u,i),s=Zl()}finally{xa(!1)}}return zo(!1),ka(),null===e||md?(To()&&s&&eo(t),t.flags|=he,yd(e,t,o,i),t.child):(Jl(e,t,i),Xd(e,t,i))}function bd(e,t,n,r,i){if(null===e){var a,o=n.type;if(function(e){return"function"==typeof e&&!Kg(e)&&void 0===e.defaultProps}(o)&&null===n.compare&&void 0===n.defaultProps)return a=Ig(o),t.tag=I,t.type=a,Pd(t,o),xd(e,t,a,r,i);var l=o.propTypes;if(l&&rr(l,r,"prop",le(o)),void 0!==n.defaultProps){var u=le(o)||"Unknown";pd[u]||(s("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",u),pd[u]=!0)}var c=em(n.type,null,r,t,t.mode,i);return c.ref=t.ref,c.return=t,t.child=c,c}var d=n.type,h=d.propTypes;h&&rr(h,r,"prop",le(d));var f=e.child;if(!Kd(e,i)){var p=f.memoizedProps,g=n.compare;if((g=null!==g?g:Po)(p,r)&&e.ref===t.ref)return Xd(e,t,i)}t.flags|=he;var m=Zg(f,r);return m.ref=t.ref,m.return=t,t.child=m,m}function xd(e,t,n,r,i){if(t.type!==t.elementType){var a=t.elementType;if(a.$$typeof===ne){var o=a,s=o._payload,l=o._init;try{a=l(s)}catch(e){a=null}var u=a&&a.propTypes;u&&rr(u,r,"prop",le(a))}}if(null!==e){var c=e.memoizedProps;if(Po(c,r)&&e.ref===t.ref&&t.type===e.type){if(md=!1,t.pendingProps=r=c,!Kd(e,i))return t.lanes=e.lanes,Xd(e,t,i);(e.flags&Pe)!==de&&(md=!0)}}return wd(e,t,n,r,i)}function Sd(e,t,n){var r,i=t.pendingProps,a=i.children,o=null!==e?e.memoizedState:null;if("hidden"===i.mode||p)if((t.mode&Pr)===Er){var s={baseLanes:Dr,cachePool:null,transitions:null};t.memoizedState=s,Xp(t,n)}else{if(!Di(n,xi)){var l;l=null!==o?ji(o.baseLanes,n):n,t.lanes=t.childLanes=xi;var u={baseLanes:l,cachePool:null,transitions:null};return t.memoizedState=u,t.updateQueue=null,Xp(t,l),null}var c={baseLanes:Dr,cachePool:null,transitions:null};t.memoizedState=c,Xp(t,null!==o?o.baseLanes:n)}else null!==o?(r=ji(o.baseLanes,n),t.memoizedState=null):r=n,Xp(t,r);return yd(e,t,a,n),t.child}function _d(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=xe,t.flags|=Me)}function wd(e,t,n,r,i){if(t.type!==t.elementType){var a=n.propTypes;a&&rr(a,r,"prop",le(n))}var o,s,l;if(o=yr(t,gr(0,n,!0)),Bs(t,i),Aa(t),gd.current=t,zo(!0),s=Kl(e,t,n,r,o,i),l=Zl(),t.mode&Mr){xa(!0);try{s=Kl(e,t,n,r,o,i),l=Zl()}finally{xa(!1)}}return zo(!1),ka(),null===e||md?(To()&&l&&eo(t),t.flags|=he,yd(e,t,s,i),t.child):(Jl(e,t,i),Xd(e,t,i))}function Ad(e,t,n,r,i){switch(pm(t)){case!1:var a=t.stateNode,o=new(0,t.type)(t.memoizedProps,a.context).state;a.updater.enqueueSetState(a,o,null);break;case!0:t.flags|=ve,t.flags|=Ee;var l=new Error("Simulated error coming from DevTools"),u=Ii(i);t.lanes=ji(t.lanes,u),Ys(t,td(t,Xc(l,t),u))}if(t.type!==t.elementType){var c=n.propTypes;c&&rr(c,r,"prop",le(n))}var d,h;br(n)?(d=!0,Ar(t)):d=!1,Bs(t,i),null===t.stateNode?(Qd(e,t),Yc(t,n,r),Qc(t,n,r,i),h=!0):h=null===e?function(e,t,n,r){var i=e.stateNode,a=e.memoizedProps;i.props=a;var o=i.context,s=t.contextType,l=dr;l="object"==typeof s&&null!==s?Cs(s):yr(e,gr(0,t,!0));var u=t.getDerivedStateFromProps,c="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;c||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||a===n&&o===l||qc(e,i,n,l),Ks();var d=e.memoizedState,h=i.state=d;if(Qs(e,n,i,r),h=e.memoizedState,a===n&&d===h&&!vr()&&!Zs()){if("function"==typeof i.componentDidMount){var f=pe;f|=Le,(e.mode&Lr)!==Er&&(f|=Ie),e.flags|=f}return!1}"function"==typeof u&&(Hc(e,t,u,n),h=e.memoizedState);var p=Zs()||Vc(e,t,a,n,d,h,l);if(p){if(c||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount){var g=pe;g|=Le,(e.mode&Lr)!==Er&&(g|=Ie),e.flags|=g}}else{if("function"==typeof i.componentDidMount){var m=pe;m|=Le,(e.mode&Lr)!==Er&&(m|=Ie),e.flags|=m}e.memoizedProps=n,e.memoizedState=h}return i.props=n,i.state=h,i.context=l,p}(t,n,r,i):function(e,t,n,r,i){var a=t.stateNode;Hs(e,t);var o=t.memoizedProps,s=t.type===t.elementType?o:Ec(t.type,o);a.props=s;var l=t.pendingProps,u=a.context,c=n.contextType,d=dr;d="object"==typeof c&&null!==c?Cs(c):yr(t,gr(0,n,!0));var h=n.getDerivedStateFromProps,p="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate;p||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||o===l&&u===d||qc(t,a,r,d),Ks();var g=t.memoizedState,m=a.state=g;if(Qs(t,r,a,i),m=t.memoizedState,o===l&&g===m&&!vr()&&!Zs()&&!f)return"function"==typeof a.componentDidUpdate&&(o===e.memoizedProps&&g===e.memoizedState||(t.flags|=pe)),"function"==typeof a.getSnapshotBeforeUpdate&&(o===e.memoizedProps&&g===e.memoizedState||(t.flags|=Se)),!1;"function"==typeof h&&(Hc(t,n,h,r),m=t.memoizedState);var y=Zs()||Vc(t,n,s,r,g,m,d)||f;return y?(p||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,m,d),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,m,d)),"function"==typeof a.componentDidUpdate&&(t.flags|=pe),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=Se)):("function"==typeof a.componentDidUpdate&&(o===e.memoizedProps&&g===e.memoizedState||(t.flags|=pe)),"function"==typeof a.getSnapshotBeforeUpdate&&(o===e.memoizedProps&&g===e.memoizedState||(t.flags|=Se)),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=d,y}(e,t,n,r,i);var p=kd(e,t,n,h,d,i),g=t.stateNode;return h&&g.props!==r&&(dd||s("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ce(t)||"a component"),dd=!0),p}function kd(e,t,n,r,i,a){_d(e,t);var o=(t.flags&ve)!==de;if(!r&&!o)return i&&kr(t,n,!1),Xd(e,t,a);var s,l=t.stateNode;if(gd.current=t,o&&"function"!=typeof n.getDerivedStateFromError)s=null,_c();else{if(Aa(t),zo(!0),s=l.render(),t.mode&Mr){xa(!0);try{l.render()}finally{xa(!1)}}zo(!1),ka()}return t.flags|=he,null!==e&&o?function(e,t,n,r){t.child=ds(t,e.child,null,r),t.child=ds(t,null,n,r)}(e,t,s,a):yd(e,t,s,a),t.memoizedState=l.state,i&&kr(t,n,!0),t.child}function Td(e){var t=e.stateNode;t.pendingContext?_r(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_r(e,t.context,!1),ol(e,t.containerInfo)}function Bd(e,t,n){if(Td(t),null===e)throw new Error("Should have a current fiber. This is a bug in React.");var r=t.pendingProps,i=t.memoizedState,a=i.element;Hs(e,t),Qs(t,r,null,n);var o=t.memoizedState;t.stateNode;var s=o.element;if(mt&&i.isDehydrated){var l={element:s,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions};if(t.updateQueue.baseState=l,t.memoizedState=l,t.flags&be)return Cd(e,t,s,n,Xc(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t));if(s!==a)return Cd(e,t,s,n,Xc(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t));!function(e){if(!mt)return!1;var t=e.stateNode.containerInfo;ao=mn(t),io=e,oo=!0,lo=null,so=!1}(t);var u=hs(t,null,s,n);t.child=u;for(var c=u;c;)c.flags=c.flags&~fe|we,c=c.sibling}else{if(Ao(),s===a)return Xd(e,t,n);yd(e,t,s,n)}return t.child}function Cd(e,t,n,r,i){return Ao(),Bo(i),t.flags|=be,yd(e,t,n,r),t.child}function Ed(e,t,n,r){Qd(e,t);var i=t.pendingProps,a=n,o=a._payload,s=(0,a._init)(o);t.type=s;var l=t.tag=function(e){if("function"==typeof e)return Kg(e)?S:x;if(null!=e){var t=e.$$typeof;if(t===Z)return R;if(t===te)return O}return _}(s),u=Ec(s,i);switch(l){case x:return Pd(t,s),t.type=s=Ig(s),wd(null,t,s,u,r);case S:return t.type=s=Ng(s),Ad(null,t,s,u,r);case R:return t.type=s=Ug(s),vd(null,t,s,u,r);case O:if(t.type!==t.elementType){var c=s.propTypes;c&&rr(c,u,"prop",le(s))}return bd(null,t,s,Ec(s.type,u),r)}var d="";throw null!==s&&"object"==typeof s&&s.$$typeof===ne&&(d=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+s+". Lazy element type must resolve to a class or function."+d)}function Pd(e,t){if(t&&t.childContextTypes&&s("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),null!==e.ref){var n="",r=function(){if(null===Oo)return null;var e=Oo._debugOwner;return null!=e?ce(e):null}();r&&(n+="\n\nCheck the render method of `"+r+"`.");var i=r||"",a=e._debugSource;a&&(i=a.fileName+":"+a.lineNumber),cd[i]||(cd[i]=!0,s("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",n))}if(void 0!==t.defaultProps){var o=le(t)||"Unknown";pd[o]||(s("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",o),pd[o]=!0)}if("function"==typeof t.getDerivedStateFromProps){var l=le(t)||"Unknown";ud[l]||(s("%s: Function components do not support getDerivedStateFromProps.",l),ud[l]=!0)}if("object"==typeof t.contextType&&null!==t.contextType){var u=le(t)||"Unknown";ld[u]||(s("%s: Function components do not support contextType.",u),ld[u]=!0)}}od={},sd={},ld={},ud={},cd={},dd=!1,hd={},fd={},pd={};var Rd={dehydrated:null,treeContext:null,retryLane:zr};function Md(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ld(e,t,n){var r=t.pendingProps;mm(t)&&(t.flags|=ve);var i=pl.current,a=!1,o=(t.flags&ve)!==de;if(o||function(e,t,n,r){return(null===t||null!==t.memoizedState)&&gl(e,fl)}(i,e)?(a=!0,t.flags&=~ve):null!==e&&null===e.memoizedState||(i|=hl),vl(t,i=ml(i)),null===e){xo(t);var l=t.memoizedState;if(null!==l){var u=l.dehydrated;if(null!==u)return function(e,t,n){return(e.mode&Pr)===Er?(s("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=jr):dn(t)?e.lanes=Hr:e.lanes=xi,null}(t,u)}var c=r.children,d=r.fallback;if(a){var h=function(e,t,n,r){var i,a,o=e.mode,s=e.child,l={mode:"hidden",children:t};return(o&Pr)===Er&&null!==s?((i=s).childLanes=Dr,i.pendingProps=l,e.mode&Rr&&(i.actualDuration=0,i.actualStartTime=-1,i.selfBaseDuration=0,i.treeBaseDuration=0),a=nm(n,o,r,null)):(i=Id(l,o),a=nm(n,o,r,null)),i.return=e,a.return=e,i.sibling=a,e.child=i,a}(t,c,d,n);return t.child.memoizedState=Md(n),t.memoizedState=Rd,h}return Od(t,c)}var f=e.memoizedState;if(null!==f){var p=f.dehydrated;if(null!==p)return function(e,t,n,r,i,a,o){if(n){if(t.flags&be)return t.flags&=~be,Ud(e,t,o,Kc(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering.")));if(null!==t.memoizedState)return t.child=e.child,t.flags|=ve,null;var s=function(e,t,n,r,i){var a=t.mode,o=Id({mode:"visible",children:n},a),s=nm(r,a,i,null);return s.flags|=fe,o.return=t,s.return=t,o.sibling=s,t.child=o,(t.mode&Pr)!==Er&&ds(t,e.child,null,i),s}(e,t,r.children,r.fallback,o);return t.child.memoizedState=Md(o),t.memoizedState=Rd,s}if(uo(),(t.mode&Pr)===Er)return Ud(e,t,o,null);if(dn(i)){var l,u,c,d=hn(i);return l=d.digest,u=d.message,c=d.stack,Ud(e,t,o,Kc(u?new Error(u):new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),l,c))}var h=Di(o,e.childLanes);if(md||h){var f=Dp();if(null!==f){var p=function(e,t){var n;switch(Oi(t)){case Wr:n=Fr;break;case $r:n=Hr;break;case Yr:case qr:case Qr:case Xr:case Kr:case Zr:case Jr:case ei:case ti:case ni:case ri:case ii:case ai:case oi:case si:case li:case ci:case di:case hi:case fi:case pi:n=Vr;break;case bi:n=vi;break;default:n=zr}return(n&(e.suspendedLanes|t))!==zr?zr:n}(f,o);if(p!==zr&&p!==a.retryLane){a.retryLane=p;var g=_i;Ms(e,p),Wp(f,e,p,g)}}return rg(),Ud(e,t,o,Kc(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.")))}if(cn(i)){t.flags|=ve,t.child=e.child;var m=yg.bind(null,e);return fn(i,m),null}ho(t,i,a.treeContext);var y=Od(t,r.children);return y.flags|=we,y}(e,t,o,r,p,f,n)}if(a){var g=r.fallback,m=function(e,t,n,r,i){var a,o,s=t.mode,l=e.child,u=l.sibling,c={mode:"hidden",children:n};return(s&Pr)===Er&&t.child!==l?((a=t.child).childLanes=Dr,a.pendingProps=c,t.mode&Rr&&(a.actualDuration=0,a.actualStartTime=-1,a.selfBaseDuration=l.selfBaseDuration,a.treeBaseDuration=l.treeBaseDuration),t.deletions=null):(a=Nd(l,c)).subtreeFlags=l.subtreeFlags&Fe,null!==u?o=Zg(u,r):(o=nm(r,s,i,null)).flags|=fe,o.return=t,a.return=t,a.sibling=o,t.child=a,o}(e,t,r.children,g,n),y=t.child,v=e.child.memoizedState;return y.memoizedState=null===v?Md(n):function(e,t){return{baseLanes:ji(e.baseLanes,t),cachePool:null,transitions:e.transitions}}(v,n),y.childLanes=function(e,t){return Fi(e.childLanes,t)}(e,n),t.memoizedState=Rd,m}var b=function(e,t,n,r){var i=e.child,a=i.sibling,o=Nd(i,{mode:"visible",children:n});if((t.mode&Pr)===Er&&(o.lanes=r),o.return=t,o.sibling=null,null!==a){var s=t.deletions;null===s?(t.deletions=[a],t.flags|=ge):s.push(a)}return t.child=o,o}(e,t,r.children,n);return t.memoizedState=null,b}function Od(e,t,n){var r=Id({mode:"visible",children:t},e.mode);return r.return=e,e.child=r,r}function Id(e,t,n){return rm(e,t,Dr,null)}function Nd(e,t){return Zg(e,t)}function Ud(e,t,n,r){null!==r&&Bo(r),ds(t,e.child,null,n);var i=Od(t,t.pendingProps.children);return i.flags|=fe,t.memoizedState=null,i}function Dd(e,t,n){e.lanes=ji(e.lanes,t);var r=e.alternate;null!==r&&(r.lanes=ji(r.lanes,t)),ks(e.return,t,n)}function zd(e,t){var n=Ke(e),r=!n&&"function"==typeof oe(e);if(n||r){var i=n?"array":"iterable";return s("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",i,t,i),!1}return!0}function jd(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Fd(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail,o=r.children;!function(e){if(void 0!==e&&"forwards"!==e&&"backwards"!==e&&"together"!==e&&!hd[e])if(hd[e]=!0,"string"==typeof e)switch(e.toLowerCase()){case"together":case"forwards":case"backwards":s('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break;case"forward":case"backward":s('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break;default:s('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}else s('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}(i),function(e,t){void 0===e||fd[e]||("collapsed"!==e&&"hidden"!==e?(fd[e]=!0,s('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):"forwards"!==t&&"backwards"!==t&&(fd[e]=!0,s('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}(a,i),function(e,t){if(("forwards"===t||"backwards"===t)&&null!=e&&!1!==e)if(Ke(e)){for(var n=0;n<e.length;n++)if(!zd(e[n],n))return}else{var r=oe(e);if("function"==typeof r){var i=r.call(e);if(i)for(var a=i.next(),o=0;!a.done;a=i.next()){if(!zd(a.value,o))return;o++}}else s('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}(o,i),yd(e,t,o,n);var l=pl.current;if(gl(l,fl)?(l=yl(l,fl),t.flags|=ve):(null!==e&&(e.flags&ve)!==de&&function(e,t,n){for(var r=t;null!==r;){if(r.tag===L)null!==r.memoizedState&&Dd(r,n,e);else if(r.tag===z)Dd(r,n,e);else if(null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}(t,t.child,n),l=ml(l)),vl(t,l),(t.mode&Pr)===Er)t.memoizedState=null;else switch(i){case"forwards":var u,c=function(e){for(var t=e,n=null;null!==t;){var r=t.alternate;null!==r&&null===Sl(r)&&(n=t),t=t.sibling}return n}(t.child);null===c?(u=t.child,t.child=null):(u=c.sibling,c.sibling=null),jd(t,!1,u,c,a);break;case"backwards":var d=null,h=t.child;for(t.child=null;null!==h;){var f=h.alternate;if(null!==f&&null===Sl(f)){t.child=h;break}var p=h.sibling;h.sibling=d,d=h,h=p}jd(t,!0,d,null,a);break;case"together":jd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}var Wd,Hd,$d,Vd,Gd=!1,Yd=!1;function qd(){md=!0}function Qd(e,t){(t.mode&Pr)===Er&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=fe)}function Xd(e,t,n){return null!==e&&(t.dependencies=e.dependencies),_c(),ng(t.lanes),Di(n,t.childLanes)?(function(e,t){if(null!==e&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(null!==t.child){var n=t.child,r=Zg(n,n.pendingProps);for(t.child=r,r.return=t;null!==n.sibling;)n=n.sibling,(r=r.sibling=Zg(n,n.pendingProps)).return=t;r.sibling=null}}(e,t),t.child):null}function Kd(e,t){return!!Di(e.lanes,t)}function Zd(e,t,n){if(t._debugNeedsRemount&&null!==e)return function(e,t,n){var r=t.return;if(null===r)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,t===r.child)r.child=n;else{var i=r.child;if(null===i)throw new Error("Expected parent to have a child.");for(;i.sibling!==t;)if(null===(i=i.sibling))throw new Error("Expected to find the previous sibling.");i.sibling=n}var a=r.deletions;return null===a?(r.deletions=[e],r.flags|=ge):a.push(e),n.flags|=fe,n}(e,t,em(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(null!==e)if(e.memoizedProps!==t.pendingProps||vr()||t.type!==e.type)md=!0;else{if(!Kd(e,n)&&(t.flags&ve)===de)return md=!1,function(e,t,n){switch(t.tag){case w:Td(t),t.stateNode,Ao();break;case k:ul(t);break;case S:br(t.type)&&Ar(t);break;case A:ol(t,t.stateNode.containerInfo);break;case P:var r=t.memoizedProps.value;ws(t,t.type._context,r);break;case M:Di(n,t.childLanes)&&(t.flags|=pe);var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0;break;case L:var a=t.memoizedState;if(null!==a){if(null!==a.dehydrated)return vl(t,ml(pl.current)),t.flags|=ve,null;if(Di(n,t.child.childLanes))return Ld(e,t,n);vl(t,ml(pl.current));var o=Xd(e,t,n);return null!==o?o.sibling:null}vl(t,ml(pl.current));break;case z:var s=(e.flags&ve)!==de,l=Di(n,t.childLanes);if(s){if(l)return Fd(e,t,n);t.flags|=ve}var u=t.memoizedState;if(null!==u&&(u.rendering=null,u.tail=null,u.lastEffect=null),vl(t,pl.current),l)break;return null;case F:case W:return t.lanes=Dr,Sd(e,t,n)}return Xd(e,t,n)}(e,t,n);md=(e.flags&Pe)!==de}else if(md=!1,To()&&function(e){return ro(),(e.flags&Re)!==de}(t)){var r=t.index;Ja(t,(ro(),Va),r)}switch(t.lanes=Dr,t.tag){case _:return function(e,t,n,r){Qd(e,t);var i,a,o,l=t.pendingProps;if(i=yr(t,gr(0,n,!1)),Bs(t,r),Aa(t),n.prototype&&"function"==typeof n.prototype.render){var u=le(n)||"Unknown";od[u]||(s("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",u,u),od[u]=!0)}if(t.mode&Mr&&jo.recordLegacyContextWarning(t,null),zo(!0),gd.current=t,a=Kl(null,t,n,l,i,r),o=Zl(),zo(!1),ka(),t.flags|=he,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){var c=le(n)||"Unknown";sd[c]||(s("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",c,c,c),sd[c]=!0)}if("object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){var d=le(n)||"Unknown";sd[d]||(s("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",d,d,d),sd[d]=!0),t.tag=S,t.memoizedState=null,t.updateQueue=null;var h=!1;return br(n)?(h=!0,Ar(t)):h=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,Ws(t),Gc(t,a),Qc(t,n,l,r),kd(null,t,n,!0,h,r)}if(t.tag=x,t.mode&Mr){xa(!0);try{a=Kl(null,t,n,l,i,r),o=Zl()}finally{xa(!1)}}return To()&&o&&eo(t),yd(null,t,a,r),Pd(t,n),t.child}(e,t,t.type,n);case N:return Ed(e,t,t.elementType,n);case x:var i=t.type,a=t.pendingProps;return wd(e,t,i,t.elementType===i?a:Ec(i,a),n);case S:var o=t.type,l=t.pendingProps;return Ad(e,t,o,t.elementType===o?l:Ec(o,l),n);case w:return Bd(e,t,n);case k:return function(e,t,n){ul(t),null===e&&xo(t);var r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children;return st(r,i)?o=null:null!==a&&st(r,a)&&(t.flags|=me),_d(e,t),yd(e,t,o,n),t.child}(e,t,n);case T:return function(e,t){return null===e&&xo(t),null}(e,t);case L:return Ld(e,t,n);case A:return function(e,t,n){ol(t,t.stateNode.containerInfo);var r=t.pendingProps;return null===e?t.child=ds(t,null,r,n):yd(e,t,r,n),t.child}(e,t,n);case R:var u=t.type,c=t.pendingProps;return vd(e,t,u,t.elementType===u?c:Ec(u,c),n);case B:return function(e,t,n){return yd(e,t,t.pendingProps,n),t.child}(e,t,n);case C:return function(e,t,n){return yd(e,t,t.pendingProps.children,n),t.child}(e,t,n);case M:return function(e,t,n){t.flags|=pe;var r=t.stateNode;return r.effectDuration=0,r.passiveEffectDuration=0,yd(e,t,t.pendingProps.children,n),t.child}(e,t,n);case P:return function(e,t,n){var r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value;"value"in i||Gd||(Gd=!0,s("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var l=t.type.propTypes;if(l&&rr(l,i,"prop","Context.Provider"),ws(t,r,o),null!==a){var u=a.value;if(Oa(u,o)){if(a.children===i.children&&!vr())return Xd(e,t,n)}else Ts(t,r,n)}return yd(e,t,i.children,n),t.child}(e,t,n);case E:return function(e,t,n){var r=t.type;void 0===r._context?r!==r.Consumer&&(Yd||(Yd=!0,s("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):r=r._context;var i=t.pendingProps.children;"function"!=typeof i&&s("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Bs(t,n);var a,o=Cs(r);return Aa(t),gd.current=t,zo(!0),a=i(o),zo(!1),ka(),t.flags|=he,yd(e,t,a,n),t.child}(e,t,n);case O:var d=t.type,h=Ec(d,t.pendingProps);if(t.type!==t.elementType){var f=d.propTypes;f&&rr(f,h,"prop",le(d))}return bd(e,t,d,h=Ec(d.type,h),n);case I:return xd(e,t,t.type,t.pendingProps,n);case U:var p=t.type,g=t.pendingProps;return function(e,t,n,r,i){var a;return Qd(e,t),t.tag=S,br(n)?(a=!0,Ar(t)):a=!1,Bs(t,i),Yc(t,n,r),Qc(t,n,r,i),kd(null,t,n,!0,a,i)}(e,t,p,t.elementType===p?g:Ec(p,g),n);case z:return Fd(e,t,n);case j:break;case F:return Sd(e,t,n)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Jd(e){e.flags|=pe}function eh(e){e.flags|=xe,e.flags|=Me}function th(e,t){if(null!==e&&e.child===t.child)return!0;if((t.flags&ge)!==de)return!1;for(var n=t.child;null!==n;){if((n.flags&De)!==de||(n.subtreeFlags&De)!==de)return!1;n=n.sibling}return!0}if(pt)Wd=function(e,t,n,r){for(var i=t.child;null!==i;){if(i.tag===k||i.tag===T)it(e,i.stateNode);else if(i.tag===A);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)return;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},Hd=function(e,t){},$d=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var o=t.stateNode,s=ll(),l=ot(o,n,a,r,i,s);t.updateQueue=l,l&&Jd(t)}},Vd=function(e,t,n,r){n!==r&&Jd(t)};else if(gt){Wd=function(e,t,n,r){for(var i=t.child;null!==i;){if(i.tag===k){var a=i.stateNode;if(n&&r){var o=i.memoizedProps,s=i.type;a=an(a,s,o,i)}it(e,a)}else if(i.tag===T){var l=i.stateNode;if(n&&r){var u=i.memoizedProps;l=on(l,u,i)}it(e,l)}else if(i.tag===A);else if(i.tag===F&&null!==i.memoizedState){var c=i.child;null!==c&&(c.return=i),Wd(e,i,!0,!0)}else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)return;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var nh=function(e,t,n,r){for(var i=t.child;null!==i;){if(i.tag===k){var a=i.stateNode;if(n&&r){var o=i.memoizedProps,s=i.type;a=an(a,s,o,i)}tn(e,a)}else if(i.tag===T){var l=i.stateNode;if(n&&r){var u=i.memoizedProps;l=on(l,u,i)}tn(e,l)}else if(i.tag===A);else if(i.tag===F&&null!==i.memoizedState){var c=i.child;null!==c&&(c.return=i),nh(e,i,!0,!0)}else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)return;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};Hd=function(e,t){var n=t.stateNode;if(th(e,t));else{var r=n.containerInfo,i=en(r);nh(i,t,!1,!1),n.pendingChildren=i,Jd(t),nn(r,i)}},$d=function(e,t,n,r,i){var a=e.stateNode,o=e.memoizedProps,s=th(e,t);if(s&&o===r)t.stateNode=a;else{var l=t.stateNode,u=ll(),c=null;if(o!==r&&(c=ot(l,n,o,r,i,u)),s&&null===c)t.stateNode=a;else{var d=Jt(a,c,n,o,r,t,s,l);at(d,n,r,i,u)&&Jd(t),t.stateNode=d,s?Jd(t):Wd(d,t,!1,!1)}}},Vd=function(e,t,n,r){if(n!==r){var i=al(),a=ll();t.stateNode=lt(r,i,a,t),Jd(t)}else t.stateNode=e.stateNode}}else Hd=function(e,t){},$d=function(e,t,n,r,i){},Vd=function(e,t,n,r){};function rh(e,t){if(!To())switch(e.tailMode){case"hidden":for(var n=e.tail,r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":for(var i=e.tail,a=null;null!==i;)null!==i.alternate&&(a=i),i=i.sibling;null===a?t||null===e.tail?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ih(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=Dr,r=de;if(t){if((e.mode&Rr)!==Er){for(var i=e.selfBaseDuration,a=e.child;null!==a;)n=ji(n,ji(a.lanes,a.childLanes)),r|=a.subtreeFlags&Fe,r|=a.flags&Fe,i+=a.treeBaseDuration,a=a.sibling;e.treeBaseDuration=i}else for(var o=e.child;null!==o;)n=ji(n,ji(o.lanes,o.childLanes)),r|=o.subtreeFlags&Fe,r|=o.flags&Fe,o.return=e,o=o.sibling;e.subtreeFlags|=r}else{if((e.mode&Rr)!==Er){for(var s=e.actualDuration,l=e.selfBaseDuration,u=e.child;null!==u;)n=ji(n,ji(u.lanes,u.childLanes)),r|=u.subtreeFlags,r|=u.flags,s+=u.actualDuration,l+=u.treeBaseDuration,u=u.sibling;e.actualDuration=s,e.treeBaseDuration=l}else for(var c=e.child;null!==c;)n=ji(n,ji(c.lanes,c.childLanes)),r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;e.subtreeFlags|=r}return e.childLanes=n,t}function ah(e,t,n){if(oo&&null!==ao&&(t.mode&Pr)!==Er&&(t.flags&ve)===de)return wo(t),Ao(),t.flags|=be|Ce|Ee,!1;var r=_o(t);if(null!==n&&null!==n.dehydrated){if(null===e){if(!r)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(function(e){if(!mt)throw new Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var t=e.memoizedState,n=null!==t?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");xn(n,e)}(t),ih(t),(t.mode&Rr)!==Er&&null!==n){var i=t.child;null!==i&&(t.treeBaseDuration-=i.treeBaseDuration)}return!1}if(Ao(),(t.flags&ve)===de&&(t.memoizedState=null),t.flags|=pe,ih(t),(t.mode&Rr)!==Er&&null!==n){var a=t.child;null!==a&&(t.treeBaseDuration-=a.treeBaseDuration)}return!1}return ko(),!0}function oh(e,t,n){var r=t.pendingProps;switch(no(t),t.tag){case _:case N:case I:case x:case R:case B:case C:case M:case E:case O:return ih(t),null;case S:return br(t.type)&&xr(t),ih(t),null;case w:var i=t.stateNode;return sl(t),Sr(t),Cl(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(null===e||null===e.child)&&(_o(t)?Jd(t):null!==e&&(e.memoizedState.isDehydrated&&(t.flags&be)===de||(t.flags|=Se,ko()))),Hd(e,t),ih(t),null;case k:cl(t);var a=al(),o=t.type;if(null!==e&&null!=t.stateNode)$d(e,t,o,r,a),e.ref!==t.ref&&eh(t);else{if(!r){if(null===t.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ih(t),null}var s=ll();if(_o(t))(function(e,t,n){if(!mt)throw new Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var r=e.stateNode,i=!so,a=vn(r,e.type,e.memoizedProps,t,n,e,i);return e.updateQueue=a,null!==a})(t,a,s)&&Jd(t);else{var l=rt(o,r,a,s,t);Wd(l,t,!1,!1),t.stateNode=l,at(l,o,r,a,s)&&Jd(t)}null!==t.ref&&eh(t)}return ih(t),null;case T:var u=r;if(e&&null!=t.stateNode){var c=e.memoizedProps;Vd(e,t,c,u)}else{if("string"!=typeof u&&null===t.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var d=al(),h=ll();_o(t)?function(e){if(!mt)throw new Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var t=e.stateNode,n=e.memoizedProps,r=bn(t,n,e,!so);if(r){var i=io;if(null!==i)switch(i.tag){case w:var a=i.stateNode.containerInfo,o=(i.mode&Pr)!==Er;Bn(a,t,n,o);break;case k:var s=i.type,l=i.memoizedProps,u=i.stateNode,c=(i.mode&Pr)!==Er;Cn(s,l,u,t,n,c)}}return r}(t)&&Jd(t):t.stateNode=lt(u,d,h,t)}return ih(t),null;case L:bl(t);var f=t.memoizedState;if((null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated)&&!ah(e,t,f))return t.flags&Ee?t:null;if((t.flags&ve)!==de)return t.lanes=n,(t.mode&Rr)!==Er&&Cc(t),t;var m=null!==f;if(m!==(null!==e&&null!==e.memoizedState)&&m&&(t.child.flags|=Ae,(t.mode&Pr)!==Er&&(null===e&&(!0!==t.memoizedProps.unstable_avoidThisFallback||!g)||gl(pl.current,hl)?ap===Gf&&(ap=Qf):rg())),null!==t.updateQueue&&(t.flags|=pe),ih(t),(t.mode&Rr)!==Er&&m){var y=t.child;null!==y&&(t.treeBaseDuration-=y.treeBaseDuration)}return null;case A:return sl(t),Hd(e,t),null===e&&vt(t.stateNode.containerInfo),ih(t),null;case P:return As(t.type._context,t),ih(t),null;case U:return br(t.type)&&xr(t),ih(t),null;case z:bl(t);var v=t.memoizedState;if(null===v)return ih(t),null;var b=(t.flags&ve)!==de,D=v.rendering;if(null===D)if(b)rh(v,!1);else{if(ap!==Gf||null!==e&&(e.flags&ve)!==de)for(var V=t.child;null!==V;){var G=Sl(V);if(null!==G){b=!0,t.flags|=ve,rh(v,!1);var Y=G.updateQueue;return null!==Y&&(t.updateQueue=Y,t.flags|=pe),t.subtreeFlags=de,fs(t,n),vl(t,yl(pl.current,fl)),t.child}V=V.sibling}null!==v.tail&&la()>vp()&&(t.flags|=ve,b=!0,rh(v,!1),t.lanes=gi)}else{if(!b){var q=Sl(D);if(null!==q){t.flags|=ve,b=!0;var Q=q.updateQueue;if(null!==Q&&(t.updateQueue=Q,t.flags|=pe),rh(v,!0),null===v.tail&&"hidden"===v.tailMode&&!D.alternate&&!To())return ih(t),null}else 2*la()-v.renderingStartTime>vp()&&n!==xi&&(t.flags|=ve,b=!0,rh(v,!1),t.lanes=gi)}if(v.isBackwards)D.sibling=t.child,t.child=D;else{var X=v.last;null!==X?X.sibling=D:t.child=D,v.last=D}}if(null!==v.tail){var K=v.tail;v.rendering=K,v.tail=K.sibling,v.renderingStartTime=la(),K.sibling=null;var Z=pl.current;return vl(t,Z=b?yl(Z,fl):ml(Z)),K}return ih(t),null;case j:break;case F:case W:Kp(t);var J=null!==t.memoizedState;return null!==e&&(null!==e.memoizedState===J||p||(t.flags|=Ae)),J&&(t.mode&Pr)!==Er?Di(rp,xi)&&(ih(t),pt&&t.subtreeFlags&(fe|pe)&&(t.flags|=Ae)):ih(t),null;case H:case $:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function sh(e,t,n){switch(no(t),t.tag){case S:br(t.type)&&xr(t);var r=t.flags;return r&Ee?(t.flags=r&~Ee|ve,(t.mode&Rr)!==Er&&Cc(t),t):null;case w:t.stateNode,sl(t),Sr(t),Cl();var i=t.flags;return(i&Ee)!==de&&(i&ve)===de?(t.flags=i&~Ee|ve,t):null;case k:return cl(t),null;case L:bl(t);var a=t.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===t.alternate)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Ao()}var o=t.flags;return o&Ee?(t.flags=o&~Ee|ve,(t.mode&Rr)!==Er&&Cc(t),t):null;case z:return bl(t),null;case A:return sl(t),null;case P:return As(t.type._context,t),null;case F:case W:return Kp(t),null;default:return null}}function lh(e,t,n){switch(no(t),t.tag){case S:null!=t.type.childContextTypes&&xr(t);break;case w:t.stateNode,sl(t),Sr(t),Cl();break;case k:cl(t);break;case A:sl(t);break;case L:case z:bl(t);break;case P:As(t.type._context,t);break;case F:case W:Kp(t)}}function uh(e,t,n,r,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var ch=uh;if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var dh=document.createElement("react");ch=function(e,t,n,r,i,a,o,s,l){if("undefined"==typeof document||null===document)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var u=document.createEvent("Event"),c=!1,d=!0,h=window.event,f=Object.getOwnPropertyDescriptor(window,"event");function p(){dh.removeEventListener(S,y,!1),void 0!==window.event&&window.hasOwnProperty("event")&&(window.event=h)}var g,m=Array.prototype.slice.call(arguments,3);function y(){c=!0,p(),t.apply(n,m),d=!1}var v=!1,b=!1;function x(e){if(g=e.error,v=!0,null===g&&0===e.colno&&0===e.lineno&&(b=!0),e.defaultPrevented&&null!=g&&"object"==typeof g)try{g._suppressLogging=!0}catch(e){}}var S="react-"+(e||"invokeguardedcallback");if(window.addEventListener("error",x),dh.addEventListener(S,y,!1),u.initEvent(S,!1,!1),dh.dispatchEvent(u),f&&Object.defineProperty(window,"event",f),c&&d&&(v?b&&(g=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):g=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this.onError(g)),window.removeEventListener("error",x),!c)return p(),uh.apply(this,arguments)}}var hh=ch,fh=!1,ph=null,gh={onError:function(e){fh=!0,ph=e}};function mh(e,t,n,r,i,a,o,s,l){fh=!1,ph=null,hh.apply(gh,arguments)}function yh(){if(fh){var e=ph;return fh=!1,ph=null,e}throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var vh=null;vh=new Set;var bh=!1,xh=!1,Sh="function"==typeof WeakSet?WeakSet:Set,_h=null,wh=null,Ah=null,kh=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&Rr)try{Tc(),t.componentWillUnmount()}finally{Ac(e)}else t.componentWillUnmount()};function Th(e,t){try{Nh(kl,e)}catch(n){pg(e,t,n)}}function Bh(e,t,n){try{kh(e,n)}catch(n){pg(e,t,n)}}function Ch(e,t){try{jh(e)}catch(n){pg(e,t,n)}}function Eh(e,t){var n=e.ref;if(null!==n)if("function"==typeof n){var r;try{if(v&&b&&e.mode&Rr)try{Tc(),r=n(null)}finally{Ac(e)}else r=n(null)}catch(n){pg(e,t,n)}"function"==typeof r&&s("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ce(e))}else n.current=null}function Ph(e,t,n){try{n()}catch(n){pg(e,t,n)}}var Rh=!1;function Mh(e,t){tt(e.containerInfo),_h=t,function(){for(;null!==_h;){var e=_h,t=e.child;(e.subtreeFlags&Ue)!==de&&null!==t?(t.return=e,_h=t):Lh()}}();var n=Rh;return Rh=!1,n}function Lh(){for(;null!==_h;){var e=_h;Do(e);try{Oh(e)}catch(t){pg(e,e.return,t)}Uo();var t=e.sibling;if(null!==t)return t.return=e.return,void(_h=t);_h=e.return}}function Oh(e){var t=e.alternate;if((e.flags&Se)!==de){switch(Do(e),e.tag){case x:case R:case I:break;case S:if(null!==t){var n=t.memoizedProps,r=t.memoizedState,i=e.stateNode;e.type!==e.elementType||dd||(i.props!==e.memoizedProps&&s("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ce(e)||"instance"),i.state!==e.memoizedState&&s("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ce(e)||"instance"));var a=i.getSnapshotBeforeUpdate(e.elementType===e.type?n:Ec(e.type,n),r),o=vh;void 0!==a||o.has(e.type)||(o.add(e.type),s("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",ce(e))),i.__reactInternalSnapshotBeforeUpdate=a}break;case w:if(pt){var l=e.stateNode;Zt(l.containerInfo)}break;case k:case T:case A:case U:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Uo()}}function Ih(e,t,n){var r,i=t.updateQueue,a=null!==i?i.lastEffect:null;if(null!==a){var o=a.next,s=o;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,void 0!==l&&((e&Tl)!==_l?(r=t,null!==ya&&"function"==typeof ya.markComponentPassiveEffectUnmountStarted&&ya.markComponentPassiveEffectUnmountStarted(r)):(e&kl)!==_l&&Ba(t),(e&Al)!==_l&&Rg(!0),Ph(t,n,l),(e&Al)!==_l&&Rg(!1),(e&Tl)!==_l?null!==ya&&"function"==typeof ya.markComponentPassiveEffectUnmountStopped&&ya.markComponentPassiveEffectUnmountStopped():(e&kl)!==_l&&Ca())}s=s.next}while(s!==o)}}function Nh(e,t){var n,r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next,o=a;do{if((o.tag&e)===e){(e&Tl)!==_l?(n=t,null!==ya&&"function"==typeof ya.markComponentPassiveEffectMountStarted&&ya.markComponentPassiveEffectMountStarted(n)):(e&kl)!==_l&&Ta(t);var l=o.create;(e&Al)!==_l&&Rg(!0),o.destroy=l(),(e&Al)!==_l&&Rg(!1),(e&Tl)!==_l?null!==ya&&"function"==typeof ya.markComponentPassiveEffectMountStopped&&ya.markComponentPassiveEffectMountStopped():(e&kl)!==_l&&null!==ya&&"function"==typeof ya.markComponentLayoutEffectMountStopped&&ya.markComponentLayoutEffectMountStopped();var u=o.destroy;if(void 0!==u&&"function"!=typeof u){var c=void 0;s("%s must not return anything besides a function, which is used for clean-up.%s",c=(o.tag&kl)!==de?"useLayoutEffect":(o.tag&Al)!==de?"useInsertionEffect":"useEffect",null===u?" You returned null. If your effect does not require clean up, return undefined (or nothing).":"function"==typeof u.then?"\n\nIt looks like you wrote "+c+"(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n"+c+"(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching":" You returned: "+u)}}o=o.next}while(o!==a)}}function Uh(e,t){if((t.flags&pe)!==de&&t.tag===M){var n=t.stateNode.passiveEffectDuration,r=t.memoizedProps,i=r.id,a=r.onPostCommit,o=bc(),s=null===t.alternate?"mount":"update";vc()&&(s="nested-update"),"function"==typeof a&&a(i,s,n,o);var l=t.return;e:for(;null!==l;){switch(l.tag){case w:case M:l.stateNode.passiveEffectDuration+=n;break e}l=l.return}}}function Dh(e,t,n,r){if((n.flags&ze)!==de)switch(n.tag){case x:case R:case I:if(!xh)if(n.mode&Rr)try{Tc(),Nh(kl|wl,n)}finally{Ac(n)}else Nh(kl|wl,n);break;case S:var i=n.stateNode;if(n.flags&pe&&!xh)if(null===t)if(n.type!==n.elementType||dd||(i.props!==n.memoizedProps&&s("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ce(n)||"instance"),i.state!==n.memoizedState&&s("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ce(n)||"instance")),n.mode&Rr)try{Tc(),i.componentDidMount()}finally{Ac(n)}else i.componentDidMount();else{var a=n.elementType===n.type?t.memoizedProps:Ec(n.type,t.memoizedProps),o=t.memoizedState;if(n.type!==n.elementType||dd||(i.props!==n.memoizedProps&&s("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ce(n)||"instance"),i.state!==n.memoizedState&&s("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ce(n)||"instance")),n.mode&Rr)try{Tc(),i.componentDidUpdate(a,o,i.__reactInternalSnapshotBeforeUpdate)}finally{Ac(n)}else i.componentDidUpdate(a,o,i.__reactInternalSnapshotBeforeUpdate)}var l=n.updateQueue;null!==l&&(n.type!==n.elementType||dd||(i.props!==n.memoizedProps&&s("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ce(n)||"instance"),i.state!==n.memoizedState&&s("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ce(n)||"instance")),Js(0,l,i));break;case w:var u=n.updateQueue;if(null!==u){var c=null;if(null!==n.child)switch(n.child.tag){case k:c=Ze(n.child.stateNode);break;case S:c=n.child.stateNode}Js(0,u,c)}break;case k:var d=n.stateNode;if(null===t&&n.flags&pe){var h=n.type,f=n.memoizedProps;Ft(d,h,f,n)}break;case T:case A:break;case M:var p=n.memoizedProps,g=p.onCommit,m=p.onRender,y=n.stateNode.effectDuration,v=bc(),b=null===t?"mount":"update";vc()&&(b="nested-update"),"function"==typeof m&&m(n.memoizedProps.id,b,n.actualDuration,n.treeBaseDuration,n.actualStartTime,v),"function"==typeof g&&g(n.memoizedProps.id,b,y,v),B=n,kp.push(B),_p||(_p=!0,Cg(da,(function(){return cg(),null})));var _=n.return;e:for(;null!==_;){switch(_.tag){case w:case M:_.stateNode.effectDuration+=y;break e}_=_.return}break;case L:!function(e,t){if(mt&&null===t.memoizedState){var n=t.alternate;if(null!==n){var r=n.memoizedState;if(null!==r){var i=r.dehydrated;null!==i&&wn(i)}}}}(0,n);break;case z:case U:case j:case F:case W:case $:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}var B;xh||n.flags&xe&&jh(n)}function zh(e){switch(e.tag){case x:case R:case I:if(e.mode&Rr)try{Tc(),Th(e,e.return)}finally{Ac(e)}else Th(e,e.return);break;case S:var t=e.stateNode;"function"==typeof t.componentDidMount&&function(e,t,n){try{n.componentDidMount()}catch(n){pg(e,t,n)}}(e,e.return,t),Ch(e,e.return);break;case k:Ch(e,e.return)}}function jh(e){var t=e.ref;if(null!==t){var n,r=e.stateNode;if(n=e.tag===k?Ze(r):r,"function"==typeof t){var i;if(e.mode&Rr)try{Tc(),i=t(n)}finally{Ac(e)}else i=t(n);"function"==typeof i&&s("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ce(e))}else t.hasOwnProperty("current")||s("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",ce(e)),t.current=n}}function Fh(e){var t=e.alternate;if(null!==t&&(e.alternate=null,Fh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===k){var n=e.stateNode;null!==n&&Bt(n)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Wh(e){return e.tag===k||e.tag===w||e.tag===A}function Hh(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||Wh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==k&&t.tag!==T&&t.tag!==D;){if(t.flags&fe)continue e;if(null===t.child||t.tag===A)continue e;t.child.return=t,t=t.child}if(!(t.flags&fe))return t.stateNode}}function $h(e){if(pt){var t=function(e){for(var t=e.return;null!==t;){if(Wh(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}(e);switch(t.tag){case k:var n=t.stateNode;t.flags&me&&(Yt(n),t.flags&=~me),Gh(e,Hh(e),n);break;case w:case A:var r=t.stateNode.containerInfo;Vh(e,Hh(e),r);break;default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function Vh(e,t,n){var r=e.tag;if(r===k||r===T){var i=e.stateNode;t?$t(n,i,t):zt(n,i)}else if(r===A);else{var a=e.child;if(null!==a){Vh(a,t,n);for(var o=a.sibling;null!==o;)Vh(o,t,n),o=o.sibling}}}function Gh(e,t,n){var r=e.tag;if(r===k||r===T){var i=e.stateNode;t?Ht(n,i,t):Dt(n,i)}else if(r===A);else{var a=e.child;if(null!==a){Gh(a,t,n);for(var o=a.sibling;null!==o;)Gh(o,t,n),o=o.sibling}}}var Yh=null,qh=!1;function Qh(e,t,n){if(pt){var r=t;e:for(;null!==r;){switch(r.tag){case k:Yh=r.stateNode,qh=!1;break e;case w:case A:Yh=r.stateNode.containerInfo,qh=!0;break e}r=r.return}if(null===Yh)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Kh(e,t,n),Yh=null,qh=!1}else Kh(e,t,n);var i,a;null!==(a=(i=n).alternate)&&(a.return=null),i.return=null}function Xh(e,t,n){for(var r=n.child;null!==r;)Kh(e,t,r),r=r.sibling}function Kh(e,t,n){switch(function(e){if(ma&&"function"==typeof ma.onCommitFiberUnmount)try{ma.onCommitFiberUnmount(ga,e)}catch(e){va||(va=!0,s("React instrumentation encountered an error: %s",e))}}(n),n.tag){case k:xh||Eh(n,t);case T:if(pt){var r=Yh,i=qh;Yh=null,Xh(e,t,n),qh=i,null!==(Yh=r)&&(qh?Gt(Yh,n.stateNode):Vt(Yh,n.stateNode))}else Xh(e,t,n);return;case D:return void(pt&&null!==Yh&&(qh?kn(Yh,n.stateNode):An(Yh,n.stateNode)));case A:if(pt){var a=Yh,o=qh;Yh=n.stateNode.containerInfo,qh=!0,Xh(e,t,n),Yh=a,qh=o}else!function(e){if(gt){var t=e.stateNode.containerInfo,n=en(t);rn(t,n)}}(n),Xh(e,t,n);return;case x:case R:case O:case I:if(!xh){var l=n.updateQueue;if(null!==l){var u=l.lastEffect;if(null!==u){var c=u.next,d=c;do{var h=d,f=h.destroy,p=h.tag;void 0!==f&&((p&Al)!==_l?Ph(n,t,f):(p&kl)!==_l&&(Ba(n),n.mode&Rr?(Tc(),Ph(n,t,f),Ac(n)):Ph(n,t,f),Ca())),d=d.next}while(d!==c)}}}return void Xh(e,t,n);case S:if(!xh){Eh(n,t);var g=n.stateNode;"function"==typeof g.componentWillUnmount&&Bh(n,t,g)}return void Xh(e,t,n);case j:return void Xh(e,t,n);case F:if(n.mode&Pr){var m=xh;xh=m||null!==n.memoizedState,Xh(e,t,n),xh=m}else Xh(e,t,n);break;default:return void Xh(e,t,n)}}function Zh(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Sh),t.forEach((function(t){var r=vg.bind(null,e,t);if(!n.has(t)){if(n.add(t),ba){if(null===wh||null===Ah)throw Error("Expected finished root and lanes to be set. This is a bug in React.");Tg(Ah,wh)}t.then(r,r)}}))}}function Jh(e,t,n){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var a=r[i];try{Qh(e,t,a)}catch(e){pg(a,t,e)}}var o=Oo;if(t.subtreeFlags&De)for(var s=t.child;null!==s;)Do(s),ef(s,e),s=s.sibling;Do(o)}function ef(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case x:case R:case O:case I:if(Jh(t,e),tf(e),i&pe){try{Ih(Al|wl,e,e.return),Nh(Al|wl,e)}catch(t){pg(e,e.return,t)}if(e.mode&Rr){try{Tc(),Ih(kl|wl,e,e.return)}catch(t){pg(e,e.return,t)}Ac(e)}else try{Ih(kl|wl,e,e.return)}catch(t){pg(e,e.return,t)}}return;case S:return Jh(t,e),tf(e),void(i&xe&&null!==r&&Eh(r,r.return));case k:if(Jh(t,e),tf(e),i&xe&&null!==r&&Eh(r,r.return),pt){if(e.flags&me){var a=e.stateNode;try{Yt(a)}catch(t){pg(e,e.return,t)}}if(i&pe){var o=e.stateNode;if(null!=o){var s=e.memoizedProps,l=null!==r?r.memoizedProps:s,u=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{Wt(o,c,u,l,s,e)}catch(t){pg(e,e.return,t)}}}}return;case T:if(Jh(t,e),tf(e),i&pe&&pt){if(null===e.stateNode)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var d=e.stateNode,h=e.memoizedProps,f=null!==r?r.memoizedProps:h;try{jt(d,f,h)}catch(t){pg(e,e.return,t)}}return;case w:if(Jh(t,e),tf(e),i&pe){if(pt&&mt&&null!==r&&r.memoizedState.isDehydrated)try{_n(t.containerInfo)}catch(t){pg(e,e.return,t)}if(gt){var p=t.containerInfo,g=t.pendingChildren;try{rn(p,g)}catch(t){pg(e,e.return,t)}}}return;case A:if(Jh(t,e),tf(e),i&pe&>){var m=e.stateNode,y=m.containerInfo,v=m.pendingChildren;try{rn(y,v)}catch(t){pg(e,e.return,t)}}return;case L:Jh(t,e),tf(e);var b=e.child;if(b.flags&Ae){var _=b.stateNode,B=null!==b.memoizedState;_.isHidden=B,B&&(null!==b.alternate&&null!==b.alternate.memoizedState||(hp=la()))}if(i&pe){try{!function(e){e.memoizedState}(e)}catch(t){pg(e,e.return,t)}Zh(e)}return;case F:var C=null!==r&&null!==r.memoizedState;if(e.mode&Pr){var E=xh;xh=E||C,Jh(t,e),xh=E}else Jh(t,e);if(tf(e),i&Ae){var P=e.stateNode,M=null!==e.memoizedState,N=e;if(P.isHidden=M,M&&!C&&(N.mode&Pr)!==Er){_h=N;for(var U=N.child;null!==U;)_h=U,of(U),U=U.sibling}pt&&function(e,t){var n=null;if(pt)for(var r=e;;){if(r.tag===k){if(null===n){n=r;try{var i=r.stateNode;t?qt(i):Xt(r.stateNode,r.memoizedProps)}catch(t){pg(e,e.return,t)}}}else if(r.tag===T){if(null===n)try{var a=r.stateNode;t?Qt(a):Kt(a,r.memoizedProps)}catch(t){pg(e,e.return,t)}}else if((r.tag!==F&&r.tag!==W||null===r.memoizedState||r===e)&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;n===r&&(n=null),r=r.return}n===r&&(n=null),r.sibling.return=r.return,r=r.sibling}}(N,M)}return;case z:return Jh(t,e),tf(e),void(i&pe&&Zh(e));case j:return;default:return Jh(t,e),void tf(e)}}function tf(e){var t=e.flags;if(t&fe){try{$h(e)}catch(t){pg(e,e.return,t)}e.flags&=~fe}t&we&&(e.flags&=~we)}function nf(e,t,n){wh=n,Ah=t,_h=e,rf(e,t,n),wh=null,Ah=null}function rf(e,t,n){for(var r=(e.mode&Pr)!==Er;null!==_h;){var i=_h,a=i.child;if(i.tag===F&&r){var o=null!==i.memoizedState||bh;if(o){af(e,t,n);continue}var s=i.alternate,l=null!==s&&null!==s.memoizedState,u=bh,c=xh;bh=o,(xh=l||xh)&&!c&&(_h=i,lf(i));for(var d=a;null!==d;)_h=d,rf(d,t,n),d=d.sibling;_h=i,bh=u,xh=c,af(e,t,n)}else(i.subtreeFlags&ze)!==de&&null!==a?(a.return=i,_h=a):af(e,t,n)}}function af(e,t,n){for(;null!==_h;){var r=_h;if((r.flags&ze)!==de){var i=r.alternate;Do(r);try{Dh(0,i,r)}catch(e){pg(r,r.return,e)}Uo()}if(r===e)return void(_h=null);var a=r.sibling;if(null!==a)return a.return=r.return,void(_h=a);_h=r.return}}function of(e){for(;null!==_h;){var t=_h,n=t.child;switch(t.tag){case x:case R:case O:case I:if(t.mode&Rr)try{Tc(),Ih(kl,t,t.return)}finally{Ac(t)}else Ih(kl,t,t.return);break;case S:Eh(t,t.return);var r=t.stateNode;"function"==typeof r.componentWillUnmount&&Bh(t,t.return,r);break;case k:Eh(t,t.return);break;case F:if(null!==t.memoizedState){sf(e);continue}}null!==n?(n.return=t,_h=n):sf(e)}}function sf(e){for(;null!==_h;){var t=_h;if(t===e)return void(_h=null);var n=t.sibling;if(null!==n)return n.return=t.return,void(_h=n);_h=t.return}}function lf(e){for(;null!==_h;){var t=_h,n=t.child;(t.tag!==F||null===t.memoizedState)&&null!==n?(n.return=t,_h=n):uf(e)}}function uf(e){for(;null!==_h;){var t=_h;Do(t);try{zh(t)}catch(e){pg(t,t.return,e)}if(Uo(),t===e)return void(_h=null);var n=t.sibling;if(null!==n)return n.return=t.return,void(_h=n);_h=t.return}}function cf(e,t,n,r){_h=t,function(e,t,n,r){for(;null!==_h;){var i=_h,a=i.child;(i.subtreeFlags&je)!==de&&null!==a?(a.return=i,_h=a):df(e,t,n,r)}}(t,e,n,r)}function df(e,t,n,r){for(;null!==_h;){var i=_h;if((i.flags&_e)!==de){Do(i);try{hf(t,i,n,r)}catch(e){pg(i,i.return,e)}Uo()}if(i===e)return void(_h=null);var a=i.sibling;if(null!==a)return a.return=i.return,void(_h=a);_h=i.return}}function hf(e,t,n,r){switch(t.tag){case x:case R:case I:if(t.mode&Rr){Bc();try{Nh(Tl|wl,t)}finally{kc(t)}}else Nh(Tl|wl,t)}}function ff(e){_h=e,function(){for(;null!==_h;){var e=_h,t=e.child;if((_h.flags&ge)!==de){var n=e.deletions;if(null!==n){for(var r=0;r<n.length;r++){var i=n[r];_h=i,mf(i,e)}var a=e.alternate;if(null!==a){var o=a.child;if(null!==o){a.child=null;do{var s=o.sibling;o.sibling=null,o=s}while(null!==o)}}_h=e}}(e.subtreeFlags&je)!==de&&null!==t?(t.return=e,_h=t):pf()}}()}function pf(){for(;null!==_h;){var e=_h;(e.flags&_e)!==de&&(Do(e),gf(e),Uo());var t=e.sibling;if(null!==t)return t.return=e.return,void(_h=t);_h=e.return}}function gf(e){switch(e.tag){case x:case R:case I:e.mode&Rr?(Bc(),Ih(Tl|wl,e,e.return),kc(e)):Ih(Tl|wl,e,e.return)}}function mf(e,t){for(;null!==_h;){var n=_h;Do(n),vf(n,t),Uo();var r=n.child;null!==r?(r.return=n,_h=r):yf(e)}}function yf(e){for(;null!==_h;){var t=_h,n=t.sibling,r=t.return;if(Fh(t),t===e)return void(_h=null);if(null!==n)return n.return=r,void(_h=n);_h=r}}function vf(e,t){switch(e.tag){case x:case R:case I:e.mode&Rr?(Bc(),Ih(Tl,e,t),kc(e)):Ih(Tl,e,t)}}function bf(e){switch(e.tag){case x:case R:case I:try{Nh(kl|wl,e)}catch(t){pg(e,e.return,t)}break;case S:var t=e.stateNode;try{t.componentDidMount()}catch(t){pg(e,e.return,t)}}}function xf(e){switch(e.tag){case x:case R:case I:try{Nh(Tl|wl,e)}catch(t){pg(e,e.return,t)}}}function Sf(e){switch(e.tag){case x:case R:case I:try{Ih(kl|wl,e,e.return)}catch(t){pg(e,e.return,t)}break;case S:var t=e.stateNode;"function"==typeof t.componentWillUnmount&&Bh(e,e.return,t)}}function _f(e){switch(e.tag){case x:case R:case I:try{Ih(Tl|wl,e,e.return)}catch(t){pg(e,e.return,t)}}}var wf=0,Af=1,kf=2,Tf=3,Bf=4;if("function"==typeof Symbol&&Symbol.for){var Cf=Symbol.for;wf=Cf("selector.component"),Af=Cf("selector.has_pseudo_class"),kf=Cf("selector.role"),Tf=Cf("selector.test_id"),Bf=Cf("selector.text")}function Ef(e){var t=yt(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw new Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return t}var n=Rt(e);if(null===n)throw new Error("Could not find React container within specified host subtree.");return n.stateNode.current}function Pf(e,t){switch(t.$$typeof){case wf:if(e.type===t.value)return!0;break;case Af:return function(e,t){for(var n=[e,0],r=0;r<n.length;){var i=n[r++],a=n[r++],o=t[a];if(i.tag!==k||!Ot(i)){for(;null!=o&&Pf(i,o);)o=t[++a];if(a===t.length)return!0;for(var s=i.child;null!==s;)n.push(s,a),s=s.sibling}}return!1}(e,t.value);case kf:if(e.tag===k){var n=e.stateNode;if(It(n,t.value))return!0}break;case Bf:if(e.tag===k||e.tag===T){var r=Lt(e);if(null!==r&&r.indexOf(t.value)>=0)return!0}break;case Tf:if(e.tag===k){var i=e.memoizedProps["data-testname"];if("string"==typeof i&&i.toLowerCase()===t.value.toLowerCase())return!0}break;default:throw new Error("Invalid selector type specified.")}return!1}function Rf(e){switch(e.$$typeof){case wf:return"<"+(le(e.value)||"Unknown")+">";case Af:return":has("+(Rf(e)||"")+")";case kf:return'[role="'+e.value+'"]';case Bf:return'"'+e.value+'"';case Tf:return'[data-testname="'+e.value+'"]';default:throw new Error("Invalid selector type specified.")}}function Mf(e,t){for(var n=[],r=[e,0],i=0;i<r.length;){var a=r[i++],o=r[i++],s=t[o];if(a.tag!==k||!Ot(a)){for(;null!=s&&Pf(a,s);)s=t[++o];if(o===t.length)n.push(a);else for(var l=a.child;null!==l;)r.push(l,o),l=l.sibling}}return n}function Lf(e,t){if(!Pt)throw new Error("Test selector API is not supported by this renderer.");for(var n=Mf(Ef(e),t),r=[],i=Array.from(n),a=0;a<i.length;){var o=i[a++];if(o.tag===k){if(Ot(o))continue;r.push(o.stateNode)}else for(var s=o.child;null!==s;)i.push(s),s=s.sibling}return r}var Of=[],If=i.ReactCurrentActQueue;function Nf(){var e="undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:void 0;return e||null===If.current||s("The current testing environment is not configured to support act(...)"),e}var Uf=Math.ceil,Df=i.ReactCurrentDispatcher,zf=i.ReactCurrentOwner,jf=i.ReactCurrentBatchConfig,Ff=i.ReactCurrentActQueue,Wf=0,Hf=1,$f=2,Vf=4,Gf=0,Yf=1,qf=2,Qf=3,Xf=4,Kf=5,Zf=6,Jf=Wf,ep=null,tp=null,np=Dr,rp=Dr,ip=lr(Dr),ap=Gf,op=null,sp=Dr,lp=Dr,up=Dr,cp=null,dp=null,hp=0,fp=500,pp=1/0,gp=500,mp=null;function yp(){pp=la()+gp}function vp(){return pp}var bp=!1,xp=null,Sp=null,_p=!1,wp=null,Ap=Dr,kp=[],Tp=null,Bp=50,Cp=0,Ep=null,Pp=!1,Rp=!1,Mp=50,Lp=0,Op=null,Ip=_i,Np=Dr,Up=!1;function Dp(){return ep}function zp(){return(Jf&($f|Vf))!==Wf?la():Ip!==_i?Ip:Ip=la()}function jp(e){if((e.mode&Pr)===Er)return jr;if((Jf&$f)!==Wf&&np!==Dr)return Ii(np);if(Co.transition!==Eo){if(null!==jf.transition){var t=jf.transition;t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e)}return Np===zr&&(Np=Li()),Np}var n=ea();return n!==zr?n:Tt()}function Fp(e){var t;return(e.mode&Pr)===Er?jr:(t=Ai,((Ai<<=1)&ui)===Dr&&(Ai=ci),t)}function Wp(e,t,n,r){!function(){if(Cp>Bp)throw Cp=0,Ep=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Lp>Mp&&(Lp=0,Op=null,s("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}(),Up&&s("useInsertionEffect must not schedule updates."),Pp&&(Rp=!0),$i(e,n,r),(Jf&$f)!==Dr&&e===ep?function(e){if(Io&&!Vu)switch(e.tag){case x:case R:case I:var t=tp&&ce(tp)||"Unknown",n=t;Ag.has(n)||(Ag.add(n),s("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",ce(e)||"Unknown",t,t));break;case S:kg||(s("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),kg=!0)}}(t):(ba&&Yi(e,t,n),function(e){if(e.mode&Pr){if(!Nf())return}else{if(t="undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:void 0,n="undefined"!=typeof jest,!ft||!n||!1===t)return;if(Jf!==Wf)return;if(e.tag!==x&&e.tag!==R&&e.tag!==I)return}var t,n;if(null===Ff.current){var r=Oo;try{Do(e),s("An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",ce(e))}finally{r?Do(e):Uo()}}}(t),e===ep&&((Jf&$f)===Wf&&(lp=ji(lp,n)),ap===Xf&&Yp(e,np)),Hp(e,r),n!==jr||Jf!==Wf||(t.mode&Pr)!==Er||Ff.isBatchingLegacy||(yp(),za()))}function Hp(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.pendingLanes,r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,o=n;o>0;){var s=Ni(o),l=1<<s,u=a[s];u===_i?(l&r)!==Dr&&(l&i)===Dr||(a[s]=Bi(l,t)):u<=t&&(e.expiredLanes|=l),o&=~l}}(e,t);var r=Ti(e,e===ep?np:Dr);if(r===Dr)return null!==n&&Eg(n),e.callbackNode=null,void(e.callbackPriority=zr);var i=Oi(r),a=e.callbackPriority;if(a!==i||null!==Ff.current&&n!==Bg){var o,l;if(null!=n&&Eg(n),i===jr)e.tag===Br?(null!==Ff.isBatchingLegacy&&(Ff.didScheduleLegacyUpdate=!0),l=qp.bind(null,e),Na=!0,Da(l)):Da(qp.bind(null,e)),Ct?null!==Ff.current?Ff.current.push(ja):Et((function(){(Jf&($f|Vf))===Wf&&ja()})):Cg(ua,ja),o=null;else{var u;switch(ra(r)){case Qi:u=ua;break;case Xi:u=ca;break;case Ki:u=da;break;case Zi:u=ha;break;default:u=da}o=Cg(u,$p.bind(null,e))}e.callbackPriority=i,e.callbackNode=o}else null==n&&a!==jr&&s("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.")}function $p(e,t){if(mc=!1,yc=!1,Ip=_i,Np=Dr,(Jf&($f|Vf))!==Wf)throw new Error("Should not already be working.");var n=e.callbackNode;if(cg()&&e.callbackNode!==n)return null;var r=Ti(e,e===ep?np:Dr);if(r===Dr)return null;var i=!Ri(0,r)&&!function(e,t){return(t&e.expiredLanes)!==Dr}(e,r)&&!t,a=i?function(e,t){var n=Jf;Jf|=$f;var r=eg();if(ep!==e||np!==t){if(ba){var i=e.memoizedUpdaters;i.size>0&&(Tg(e,np),i.clear()),qi(e,t)}mp=null,yp(),Zp(e,t)}for(Ra(t);;)try{og();break}catch(t){Jp(e,t)}return xs(),tg(r),Jf=n,null!==tp?(null!==ya&&"function"==typeof ya.markRenderYielded&&ya.markRenderYielded(),Gf):(Ma(),ep=null,np=Dr,ap)}(e,r):ig(e,r);if(a!==Gf){if(a===qf){var o=Ci(e);o!==Dr&&(r=o,a=Vp(e,o))}if(a===Yf){var s=op;throw Zp(e,Dr),Yp(e,r),Hp(e,la()),s}if(a===Zf)Yp(e,r);else{var l=!Ri(0,r),u=e.current.alternate;if(l&&!function(e){for(var t=e;;){if(t.flags&ke){var n=t.updateQueue;if(null!==n){var r=n.stores;if(null!==r)for(var i=0;i<r.length;i++){var a=r[i],o=a.getSnapshot,s=a.value;try{if(!Oa(o(),s))return!1}catch(e){return!1}}}}var l=t.child;if(t.subtreeFlags&ke&&null!==l)l.return=t,t=l;else{if(t===e)return!0;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(u)){if((a=ig(e,r))===qf){var c=Ci(e);c!==Dr&&(r=c,a=Vp(e,c))}if(a===Yf){var d=op;throw Zp(e,Dr),Yp(e,r),Hp(e,la()),d}}e.finishedWork=u,e.finishedLanes=r,function(e,t,n){switch(t){case Gf:case Yf:throw new Error("Root did not complete. This is a bug in React.");case qf:ug(e,dp,mp);break;case Qf:if(Yp(e,n),Pi(n)&&!Pg()){var r=hp+fp-la();if(r>10){if(Ti(e,Dr)!==Dr)break;var i=e.suspendedLanes;if(!zi(i,n)){zp(),Vi(e,i);break}e.timeoutHandle=ut(ug.bind(null,e,dp,mp),r);break}}ug(e,dp,mp);break;case Xf:if(Yp(e,n),function(e){return(e&Gr)===e}(n))break;if(!Pg()){var a=function(e,t){for(var n=e.eventTimes,r=_i;t>0;){var i=Ni(t),a=1<<i,o=n[i];o>r&&(r=o),t&=~a}return r}(e,n),o=a,s=la()-o,l=((u=s)<120?120:u<480?480:u<1080?1080:u<1920?1920:u<3e3?3e3:u<4320?4320:1960*Uf(u/1960))-s;if(l>10){e.timeoutHandle=ut(ug.bind(null,e,dp,mp),l);break}}ug(e,dp,mp);break;case Kf:ug(e,dp,mp);break;default:throw new Error("Unknown root exit status.")}var u}(e,a,r)}}return Hp(e,la()),e.callbackNode===n?$p.bind(null,e):null}function Vp(e,t){var n=cp;Fa(e)&&(Zp(e,t).flags|=be,Fn(e.containerInfo));var r=ig(e,t);if(r!==qf){var i=dp;dp=n,null!==i&&Gp(i)}return r}function Gp(e){null===dp?dp=e:dp.push.apply(dp,e)}function Yp(e,t){t=Fi(t,up),function(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,r=t;r>0;){var i=Ni(r),a=1<<i;n[i]=_i,r&=~a}}(e,t=Fi(t,lp))}function qp(e){if(mc=yc,yc=!1,(Jf&($f|Vf))!==Wf)throw new Error("Should not already be working.");cg();var t=Ti(e,Dr);if(!Di(t,jr))return Hp(e,la()),null;var n=ig(e,t);if(e.tag!==Br&&n===qf){var r=Ci(e);r!==Dr&&(t=r,n=Vp(e,r))}if(n===Yf){var i=op;throw Zp(e,Dr),Yp(e,t),Hp(e,la()),i}if(n===Zf)throw new Error("Root did not complete. This is a bug in React.");var a=e.current.alternate;return e.finishedWork=a,e.finishedLanes=t,ug(e,dp,mp),Hp(e,la()),null}function Qp(e){null!==wp&&wp.tag===Br&&(Jf&($f|Vf))===Wf&&cg();var t=Jf;Jf|=Hf;var n=jf.transition,r=ea();try{return jf.transition=null,ta(Qi),e?e():void 0}finally{ta(r),jf.transition=n,((Jf=t)&($f|Vf))===Wf&&ja()}}function Xp(e,t){cr(ip,rp,e),rp=ji(rp,t)}function Kp(e){rp=ip.current,ur(ip,e)}function Zp(e,t){e.finishedWork=null,e.finishedLanes=Dr;var n=e.timeoutHandle;if(n!==dt&&(e.timeoutHandle=dt,ct(n)),null!==tp)for(var r=tp.return;null!==r;)r.alternate,lh(0,r),r=r.return;ep=e;var i=Zg(e.current,null);return tp=i,np=rp=t,ap=Gf,op=null,sp=Dr,lp=Dr,up=Dr,cp=null,dp=null,function(){if(null!==Es){for(var e=0;e<Es.length;e++){var t=Es[e],n=t.interleaved;if(null!==n){t.interleaved=null;var r=n.next,i=t.pending;if(null!==i){var a=i.next;i.next=r,n.next=a}t.pending=n}}Es=null}}(),jo.discardPendingWarnings(),i}function Jp(e,t){for(;;){var n=tp;try{if(xs(),eu(),Uo(),zf.current=null,null===n||null===n.return)return ap=Yf,op=t,void(tp=null);v&&n.mode&Rr&&wc(n,!0),y&&(ka(),null!==t&&"object"==typeof t&&"function"==typeof t.then?Pa(n,t,np):Ea(n,t,np)),ad(e,n.return,n,t,np),lg(n)}catch(e){t=e,tp===n&&null!==n?(n=n.return,tp=n):n=tp;continue}return}}function eg(){var e=Df.current;return Df.current=ec,null===e?ec:e}function tg(e){Df.current=e}function ng(e){sp=ji(e,sp)}function rg(){ap!==Gf&&ap!==Qf&&ap!==qf||(ap=Xf),null!==ep&&(Ei(sp)||Ei(lp))&&Yp(ep,np)}function ig(e,t){var n=Jf;Jf|=$f;var r=eg();if(ep!==e||np!==t){if(ba){var i=e.memoizedUpdaters;i.size>0&&(Tg(e,np),i.clear()),qi(e,t)}mp=null,Zp(e,t)}for(Ra(t);;)try{ag();break}catch(t){Jp(e,t)}if(xs(),Jf=n,tg(r),null!==tp)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Ma(),ep=null,np=Dr,ap}function ag(){for(;null!==tp;)sg(tp)}function og(){for(;null!==tp&&!oa();)sg(tp)}function sg(e){var t,n=e.alternate;Do(e),(e.mode&Rr)!==Er?(Sc(e),t=Sg(n,e,rp),wc(e,!0)):t=Sg(n,e,rp),Uo(),e.memoizedProps=e.pendingProps,null===t?lg(e):tp=t,zf.current=null}function lg(e){var t=e;do{var n=t.alternate,r=t.return;if((t.flags&Ce)===de){Do(t);var i=void 0;if((t.mode&Rr)===Er?i=oh(n,t,rp):(Sc(t),i=oh(n,t,rp),wc(t,!1)),Uo(),null!==i)return void(tp=i)}else{var a=sh(0,t);if(null!==a)return a.flags&=Be,void(tp=a);if((t.mode&Rr)!==Er){wc(t,!1);for(var o=t.actualDuration,s=t.child;null!==s;)o+=s.actualDuration,s=s.sibling;t.actualDuration=o}if(null===r)return ap=Zf,void(tp=null);r.flags|=Ce,r.subtreeFlags=de,r.deletions=null}var l=t.sibling;if(null!==l)return void(tp=l);tp=t=r}while(null!==t);ap===Gf&&(ap=Kf)}function ug(e,t,n){var r=ea(),i=jf.transition;try{jf.transition=null,ta(Qi),function(e,t,n,r){do{cg()}while(null!==wp);if(jo.flushLegacyContextWarning(),jo.flushPendingUnsafeLifecycleWarnings(),(Jf&($f|Vf))!==Wf)throw new Error("Should not already be working.");var i=e.finishedWork,a=e.finishedLanes;if(function(e){null!==ya&&"function"==typeof ya.markCommitStarted&&ya.markCommitStarted(e)}(a),null===i)return wa(),null;if(a===Dr&&s("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=Dr,i===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=zr;var o=ji(i.lanes,i.childLanes);(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=Dr,e.pingedLanes=Dr,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var r=e.entanglements,i=e.eventTimes,a=e.expirationTimes,o=n;o>0;){var s=Ni(o),l=1<<s;r[s]=Dr,i[s]=_i,a[s]=_i,o&=~l}})(e,o),e===ep&&(ep=null,tp=null,np=Dr),(i.subtreeFlags&je)===de&&(i.flags&je)===de||_p||(_p=!0,Tp=n,Cg(da,(function(){return cg(),null})));var l=(i.subtreeFlags&(Ue|De|ze|je))!==de,u=(i.flags&(Ue|De|ze|je))!==de;if(l||u){var c=jf.transition;jf.transition=null;var d=ea();ta(Qi);var h=Jf;Jf|=Vf,zf.current=null,Mh(e,i),xc(),function(e,t,n){wh=n,Ah=e,Do(t),ef(t,e),Do(t),wh=null,Ah=null}(e,i,a),nt(e.containerInfo),e.current=i,function(e){null!==ya&&"function"==typeof ya.markLayoutEffectsStarted&&ya.markLayoutEffectsStarted(e)}(a),nf(i,e,a),null!==ya&&"function"==typeof ya.markLayoutEffectsStopped&&ya.markLayoutEffectsStopped(),sa(),Jf=h,ta(d),jf.transition=c}else e.current=i,xc();var f=_p;if(_p?(_p=!1,wp=e,Ap=a):(Lp=0,Op=null),(o=e.pendingLanes)===Dr&&(Sp=null),f||bg(e.current,!1),function(e,t){if(ma&&"function"==typeof ma.onCommitFiberRoot)try{var n=(e.current.flags&ve)===ve;if(v){var r;switch(t){case Qi:r=ua;break;case Xi:r=ca;break;case Ki:r=da;break;case Zi:r=ha;break;default:r=da}ma.onCommitFiberRoot(ga,e,r,n)}}catch(e){va||(va=!0,s("React instrumentation encountered an error: %s",e))}}(i.stateNode,r),ba&&e.memoizedUpdaters.clear(),Pt&&Of.forEach((function(e){return e()})),Hp(e,la()),null!==t)for(var p=e.onRecoverableError,g=0;g<t.length;g++){var m=t[g],y=m.stack,b=m.digest;p(m.value,{componentStack:y,digest:b})}if(bp){bp=!1;var x=xp;throw xp=null,x}Di(Ap,jr)&&e.tag!==Br&&cg(),Di(o=e.pendingLanes,jr)?(yc=!0,e===Ep?Cp++:(Cp=0,Ep=e)):Cp=0,ja(),wa()}(e,t,n,r)}finally{jf.transition=i,ta(r)}return null}function cg(){if(null!==wp){var e=(i=ra(Ap),0===(r=Ki)||r>i?r:i),t=jf.transition,n=ea();try{return jf.transition=null,ta(e),function(){if(null===wp)return!1;var e=Tp;Tp=null;var t=wp,n=Ap;if(wp=null,Ap=Dr,(Jf&($f|Vf))!==Wf)throw new Error("Cannot flush passive effects while already rendering.");Pp=!0,Rp=!1,function(e){null!==ya&&"function"==typeof ya.markPassiveEffectsStarted&&ya.markPassiveEffectsStarted(e)}(n);var r=Jf;Jf|=Vf,ff(t.current),cf(t,t.current,n,e);var i=kp;kp=[];for(var a=0;a<i.length;a++)Uh(0,i[a]);null!==ya&&"function"==typeof ya.markPassiveEffectsStopped&&ya.markPassiveEffectsStopped(),bg(t.current,!0),Jf=r,ja(),Rp?t===Op?Lp++:(Lp=0,Op=t):Lp=0,Pp=!1,Rp=!1,function(e){if(ma&&"function"==typeof ma.onPostCommitFiberRoot)try{ma.onPostCommitFiberRoot(ga,e)}catch(e){va||(va=!0,s("React instrumentation encountered an error: %s",e))}}(t);var o=t.current.stateNode;return o.effectDuration=0,o.passiveEffectDuration=0,!0}()}finally{ta(n),jf.transition=t}}var r,i;return!1}function dg(e){return null!==Sp&&Sp.has(e)}var hg=function(e){bp||(bp=!0,xp=e)};function fg(e,t,n){var r=Vs(e,ed(e,Xc(n,t),jr),jr),i=zp();null!==r&&($i(r,jr,i),Hp(r,i))}function pg(e,t,n){if(function(e){mh(null,(function(){throw e})),yh()}(n),Rg(!1),e.tag!==w){var r=null;for(r=t;null!==r;){if(r.tag===w)return void fg(r,e,n);if(r.tag===S){var i=r.type,a=r.stateNode;if("function"==typeof i.getDerivedStateFromError||"function"==typeof a.componentDidCatch&&!dg(a)){var o=Vs(r,td(r,Xc(n,e),jr),jr),l=zp();return void(null!==o&&($i(o,jr,l),Hp(o,l)))}}r=r.return}s("Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",n)}else fg(e,e,n)}function gg(e,t,n){var r=e.pingCache;null!==r&&r.delete(t);var i=zp();Vi(e,n),function(e){e.tag!==Br&&Nf()&&null===Ff.current&&s("A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act")}(e),ep===e&&zi(np,n)&&(ap===Xf||ap===Qf&&Pi(np)&&la()-hp<fp?Zp(e,Dr):up=ji(up,n)),Hp(e,i)}function mg(e,t){t===zr&&(t=Fp(e));var n=zp(),r=Ms(e,t);null!==r&&($i(r,t,n),Hp(r,n))}function yg(e){var t=e.memoizedState,n=zr;null!==t&&(n=t.retryLane),mg(e,n)}function vg(e,t){var n,r=zr;switch(e.tag){case L:n=e.stateNode;var i=e.memoizedState;null!==i&&(r=i.retryLane);break;case z:n=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}null!==n&&n.delete(t),mg(e,r)}function bg(e,t){Do(e),xg(e,Ie,Sf),t&&xg(e,Ne,_f),xg(e,Ie,bf),t&&xg(e,Ne,xf),Uo()}function xg(e,t,n){for(var r=e,i=null;null!==r;){var a=r.subtreeFlags&t;r!==i&&null!==r.child&&a!==de?r=r.child:((r.flags&t)!==de&&n(r),r=null!==r.sibling?r.sibling:i=r.return)}}var Sg,_g=null;function wg(e){if((Jf&$f)===Wf&&e.mode&Pr){var t=e.tag;if(t===_||t===w||t===S||t===x||t===R||t===O||t===I){var n=ce(e)||"ReactComponent";if(null!==_g){if(_g.has(n))return;_g.add(n)}else _g=new Set([n]);var r=Oo;try{Do(e),s("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{r?Do(e):Uo()}}}}Sg=function(e,t,n){var r=om(null,t);try{return Zd(e,t,n)}catch(a){if(so||null!==a&&"object"==typeof a&&"function"==typeof a.then)throw a;if(xs(),eu(),lh(0,t),om(t,r),t.mode&Rr&&Sc(t),mh(null,Zd,null,e,t,n),fh){var i=yh();"object"==typeof i&&null!==i&&i._suppressLogging&&"object"==typeof a&&null!==a&&!a._suppressLogging&&(a._suppressLogging=!0)}throw a}};var Ag,kg=!1;function Tg(e,t){ba&&e.memoizedUpdaters.forEach((function(n){Yi(e,n,t)}))}Ag=new Set;var Bg={};function Cg(e,t){var n=Ff.current;return null!==n?(n.push(t),Bg):ia(e,t)}function Eg(e){if(e!==Bg)return aa(e)}function Pg(){return null!==Ff.current}function Rg(e){Up=e}var Mg=null,Lg=null,Og=function(e){Mg=e};function Ig(e){if(null===Mg)return e;var t=Mg(e);return void 0===t?e:t.current}function Ng(e){return Ig(e)}function Ug(e){if(null===Mg)return e;var t=Mg(e);if(void 0===t){if(null!=e&&"function"==typeof e.render){var n=Ig(e.render);if(e.render!==n){var r={$$typeof:Z,render:n};return void 0!==e.displayName&&(r.displayName=e.displayName),r}}return e}return t.current}function Dg(e,t){if(null===Mg)return!1;var n=e.elementType,r=t.type,i=!1,a="object"==typeof r&&null!==r?r.$$typeof:null;switch(e.tag){case S:"function"==typeof r&&(i=!0);break;case x:("function"==typeof r||a===ne)&&(i=!0);break;case R:(a===Z||a===ne)&&(i=!0);break;case O:case I:(a===te||a===ne)&&(i=!0);break;default:return!1}if(i){var o=Mg(n);if(void 0!==o&&o===Mg(r))return!0}return!1}function zg(e){null!==Mg&&"function"==typeof WeakSet&&(null===Lg&&(Lg=new WeakSet),Lg.add(e))}var jg=function(e,t){if(null!==Mg){var n=t.staleFamilies,r=t.updatedFamilies;cg(),Qp((function(){Wg(e.current,r,n)}))}},Fg=function(e,t){e.context===dr&&(cg(),Qp((function(){cm(t,e,null,null)})))};function Wg(e,t,n){var r=e.alternate,i=e.child,a=e.sibling,o=e.tag,s=e.type,l=null;switch(o){case x:case I:case S:l=s;break;case R:l=s.render}if(null===Mg)throw new Error("Expected resolveFamily to be set during hot reload.");var u=!1,c=!1;if(null!==l){var d=Mg(l);void 0!==d&&(n.has(d)?c=!0:t.has(d)&&(o===S?c=!0:u=!0))}if(null!==Lg&&(Lg.has(e)||null!==r&&Lg.has(r))&&(c=!0),c&&(e._debugNeedsRemount=!0),c||u){var h=Ms(e,jr);null!==h&&Wp(h,e,jr,_i)}null===i||c||Wg(i,t,n),null!==a&&Wg(a,t,n)}var Hg,$g=function(e,t){var n=new Set,r=new Set(t.map((function(e){return e.current})));return Vg(e.current,r,n),n};function Vg(e,t,n){var r=e.child,i=e.sibling,a=e.tag,o=e.type,s=null;switch(a){case x:case I:case S:s=o;break;case R:s=o.render}var l=!1;null!==s&&t.has(s)&&(l=!0),l?function(e,t){var n=function(e,t){for(var n=e,r=!1;;){if(n.tag===k)r=!0,t.add(n.stateNode);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)return r;for(;null===n.sibling;){if(null===n.return||n.return===e)return r;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}(e,t);if(!n)for(var r=e;;){switch(r.tag){case k:return void t.add(r.stateNode);case A:case w:return void t.add(r.stateNode.containerInfo)}if(null===r.return)throw new Error("Expected to reach root first.");r=r.return}}(e,n):null!==r&&Vg(r,t,n),null!==i&&Vg(i,t,n)}Hg=!1;try{var Gg=Object.preventExtensions({});new Map([[Gg,null]]),new Set([Gg])}catch(e){Hg=!0}function Yg(e,t,n,r){this.tag=e,this.key=n,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=r,this.flags=de,this.subtreeFlags=de,this.deletions=null,this.lanes=Dr,this.childLanes=Dr,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,Hg||"function"!=typeof Object.preventExtensions||Object.preventExtensions(this)}var qg,Qg,Xg=function(e,t,n,r){return new Yg(e,t,n,r)};function Kg(e){var t=e.prototype;return!(!t||!t.isReactComponent)}function Zg(e,t){var n=e.alternate;null===n?((n=Xg(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugSource=e._debugSource,n._debugOwner=e._debugOwner,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=de,n.subtreeFlags=de,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&Fe,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue;var r=e.dependencies;switch(n.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case _:case x:case I:n.type=Ig(e.type);break;case S:n.type=Ng(e.type);break;case R:n.type=Ug(e.type)}return n}function Jg(e,t){e.flags&=Fe|fe;var n=e.alternate;if(null===n)e.childLanes=Dr,e.lanes=t,e.child=null,e.subtreeFlags=de,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=de,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var r=n.dependencies;e.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function em(e,t,n,r,i,a){var o=_,l=e;if("function"==typeof e)Kg(e)?(o=S,l=Ng(l)):l=Ig(l);else if("string"==typeof e)o=k;else e:switch(e){case Y:return nm(n.children,i,a,t);case q:o=C,((i|=Mr)&Pr)!==Er&&(i|=Lr);break;case Q:return function(e,t,n,r){"string"!=typeof e.id&&s('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var i=Xg(M,e,r,t|Rr);return i.elementType=Q,i.lanes=n,i.stateNode={effectDuration:0,passiveEffectDuration:0},i}(n,i,a,t);case J:return function(e,t,n,r){var i=Xg(L,e,r,t);return i.elementType=J,i.lanes=n,i}(n,i,a,t);case ee:return function(e,t,n,r){var i=Xg(z,e,r,t);return i.elementType=ee,i.lanes=n,i}(n,i,a,t);case re:return rm(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case X:o=P;break e;case K:o=E;break e;case Z:o=R,l=Ug(l);break e;case te:o=O;break e;case ne:o=N,l=null;break e}var u="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var c=r?ce(r):null;throw c&&(u+="\n\nCheck the render method of `"+c+"`."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(null==e?e:typeof e)+"."+u)}var d=Xg(o,n,t,i);return d.elementType=e,d.type=l,d.lanes=a,d._debugOwner=r,d}function tm(e,t,n){var r;r=e._owner;var i=em(e.type,e.key,e.props,r,t,n);return i._debugSource=e._source,i._debugOwner=e._owner,i}function nm(e,t,n,r){var i=Xg(B,e,r,t);return i.lanes=n,i}function rm(e,t,n,r){var i=Xg(F,e,r,t);return i.elementType=re,i.lanes=n,i.stateNode={isHidden:!1},i}function im(e,t,n){var r=Xg(T,e,null,t);return r.lanes=n,r}function am(e,t,n){var r=null!==e.children?e.children:[],i=Xg(A,r,e.key,t);return i.lanes=n,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}function om(e,t){return null===e&&(e=Xg(_,null,null,Er)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function sm(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=dt,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=zr,this.eventTimes=Hi(Dr),this.expirationTimes=Hi(_i),this.pendingLanes=Dr,this.suspendedLanes=Dr,this.pingedLanes=Dr,this.expiredLanes=Dr,this.mutableReadLanes=Dr,this.finishedLanes=Dr,this.entangledLanes=Dr,this.entanglements=Hi(Dr),this.identifierPrefix=r,this.onRecoverableError=i,mt&&(this.mutableSourceEagerHydrationData=null),this.effectDuration=0,this.passiveEffectDuration=0,this.memoizedUpdaters=new Set;for(var a=this.pendingUpdatersLaneMap=[],o=0;o<Ur;o++)a.push(new Set);switch(t){case Cr:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case Br:this._debugRootType=n?"hydrate()":"render()"}}function lm(e,t,n,r,i,a,o,s,l,u){var c=new sm(e,t,n,s,l),d=function(e,t,n){var r;return e===Cr?(r=Pr,!0===t&&(r|=Mr,r|=Lr)):r=Er,ba&&(r|=Rr),Xg(w,null,null,r)}(t,a);c.current=d,d.stateNode=c;var h={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};return d.memoizedState=h,Ws(d),c}function um(e){if(!e)return dr;var t=d(e),n=Tr(t);if(t.tag===S){var r=t.type;if(br(r))return wr(t,r,n)}return n}function cm(e,t,n,r){!function(e,t){if(ma&&"function"==typeof ma.onScheduleFiberRoot)try{ma.onScheduleFiberRoot(ga,e,t)}catch(e){va||(va=!0,s("React instrumentation encountered an error: %s",e))}}(t,e);var i=t.current,a=zp(),o=jp(i);!function(e){null!==ya&&"function"==typeof ya.markRenderScheduled&&ya.markRenderScheduled(e)}(o);var l=um(n);null===t.context?t.context=l:t.pendingContext=l,Io&&null!==Oo&&!qg&&(qg=!0,s("Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",ce(Oo)||"Unknown"));var u=$s(a,o);u.payload={element:e},null!==(r=void 0===r?null:r)&&("function"!=typeof r&&s("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),u.callback=r);var c=Vs(i,u,o);return null!==c&&(Wp(c,i,o,a),Gs(c,i,o)),o}function dm(e,t){var n,r,i=e.memoizedState;null!==i&&null!==i.dehydrated&&(i.retryLane=(r=t,(n=i.retryLane)!==zr&&n<r?n:r))}function hm(e,t){dm(e,t);var n=e.alternate;n&&dm(n,t)}qg=!1,Qg={};var fm=function(e){return null};function pm(e){return fm(e)}var gm=function(e){return!1};function mm(e){return gm(e)}var ym,vm,bm,xm,Sm,_m,wm,Am,km,Tm=function(e,t,n){var r=t[n],i=Ke(e)?e.slice():c({},e);return n+1===t.length?(Ke(i)?i.splice(r,1):delete i[r],i):(i[r]=Tm(e[r],t,n+1),i)},Bm=function(e,t){return Tm(e,t,0)},Cm=function(e,t,n,r){var i=t[r],a=Ke(e)?e.slice():c({},e);return r+1===t.length?(a[n[r]]=a[i],Ke(a)?a.splice(i,1):delete a[i]):a[i]=Cm(e[i],t,n,r+1),a},Em=function(e,t,n){if(t.length===n.length){for(var r=0;r<n.length-1;r++)if(t[r]!==n[r])return void o("copyWithRename() expects paths to be the same except for the deepest key");return Cm(e,t,n,0)}o("copyWithRename() expects paths of the same length")},Pm=function(e,t,n,r){if(n>=t.length)return r;var i=t[n],a=Ke(e)?e.slice():c({},e);return a[i]=Pm(e[i],t,n+1,r),a},Rm=function(e,t,n){return Pm(e,t,0,n)},Mm=function(e,t){for(var n=e.memoizedState;null!==n&&t>0;)n=n.next,t--;return n};function Lm(e){var t=Ge(e);return null===t?null:t.stateNode}function Om(e){return null}function Im(){return Oo}return ym=function(e,t,n,r){var i=Mm(e,t);if(null!==i){var a=Rm(i.memoizedState,n,r);i.memoizedState=a,i.baseState=a,e.memoizedProps=c({},e.memoizedProps);var o=Ms(e,jr);null!==o&&Wp(o,e,jr,_i)}},vm=function(e,t,n){var r=Mm(e,t);if(null!==r){var i=Bm(r.memoizedState,n);r.memoizedState=i,r.baseState=i,e.memoizedProps=c({},e.memoizedProps);var a=Ms(e,jr);null!==a&&Wp(a,e,jr,_i)}},bm=function(e,t,n,r){var i=Mm(e,t);if(null!==i){var a=Em(i.memoizedState,n,r);i.memoizedState=a,i.baseState=a,e.memoizedProps=c({},e.memoizedProps);var o=Ms(e,jr);null!==o&&Wp(o,e,jr,_i)}},xm=function(e,t,n){e.pendingProps=Rm(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=Ms(e,jr);null!==r&&Wp(r,e,jr,_i)},Sm=function(e,t){e.pendingProps=Bm(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=Ms(e,jr);null!==n&&Wp(n,e,jr,_i)},_m=function(e,t,n){e.pendingProps=Em(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=Ms(e,jr);null!==r&&Wp(r,e,jr,_i)},wm=function(e){var t=Ms(e,jr);null!==t&&Wp(t,e,jr,_i)},Am=function(e){fm=e},km=function(e){gm=e},t.attemptContinuousHydration=function(e){if(e.tag===L){var t=mi,n=Ms(e,t);null!==n&&Wp(n,e,t,zp()),hm(e,t)}},t.attemptDiscreteHydration=function(e){if(e.tag===L){var t=jr,n=Ms(e,t);null!==n&&Wp(n,e,t,zp()),hm(e,t)}},t.attemptHydrationAtCurrentPriority=function(e){if(e.tag===L){var t=jp(e),n=Ms(e,t);null!==n&&Wp(n,e,t,zp()),hm(e,t)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case w:var t=e.stateNode;if(Fa(t)){var n=function(e){return ki(e.pendingLanes)}(t);!function(e,t){t!==Dr&&(Gi(e,ji(t,jr)),Hp(e,la()),(Jf&($f|Vf))===Wf&&(yp(),ja()))}(t,n)}break;case L:Qp((function(){var t=Ms(e,jr);if(null!==t){var n=zp();Wp(t,e,jr,n)}})),hm(e,jr)}},t.batchedUpdates=function(e,t){var n=Jf;Jf|=Hf;try{return e(t)}finally{(Jf=n)!==Wf||Ff.isBatchingLegacy||(yp(),za())}},t.createComponentSelector=function(e){return{$$typeof:wf,value:e}},t.createContainer=function(e,t,n,r,i,a,o,s){return lm(e,t,!1,null,0,r,0,a,o)},t.createHasPseudoClassSelector=function(e){return{$$typeof:Af,value:e}},t.createHydrationContainer=function(e,t,n,r,i,a,o,s,l,u){var c=lm(n,r,!0,e,0,a,0,s,l);c.context=um(null);var d=c.current,h=zp(),f=jp(d),p=$s(h,f);return p.callback=null!=t?t:null,Vs(d,p,f),function(e,t,n){e.current.lanes=t,$i(e,t,n),Hp(e,n)}(c,f,h),c},t.createPortal=function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return is(r=i)&&(s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rs(r)),as(r)),{$$typeof:G,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:kf,value:e}},t.createTestNameSelector=function(e){return{$$typeof:Tf,value:e}},t.createTextSelector=function(e){return{$$typeof:Bf,value:e}},t.deferredUpdates=function(e){var t=ea(),n=jf.transition;try{return jf.transition=null,ta(Ki),e()}finally{ta(t),jf.transition=n}},t.discreteUpdates=function(e,t,n,r,i){var a=ea(),o=jf.transition;try{return jf.transition=null,ta(Qi),e(t,n,r,i)}finally{ta(a),jf.transition=o,Jf===Wf&&yp()}},t.findAllNodes=Lf,t.findBoundingRects=function(e,t){if(!Pt)throw new Error("Test selector API is not supported by this renderer.");for(var n=Lf(e,t),r=[],i=0;i<n.length;i++)r.push(Mt(n[i]));for(var a=r.length-1;a>0;a--)for(var o=r[a],s=o.x,l=s+o.width,u=o.y,c=u+o.height,d=a-1;d>=0;d--)if(a!==d){var h=r[d],f=h.x,p=f+h.width,g=h.y,m=g+h.height;if(s>=f&&u>=g&&l<=p&&c<=m){r.splice(a,1);break}if(!(s!==f||o.width!==h.width||m<u||g>c)){g>u&&(h.height+=g-u,h.y=u),m<c&&(h.height=c-g),r.splice(a,1);break}if(!(u!==g||o.height!==h.height||p<s||f>l)){f>s&&(h.width+=f-s,h.x=s),p<l&&(h.width=l-f),r.splice(a,1);break}}return r},t.findHostInstance=function(e){var t=d(e);if(void 0===t){if("function"==typeof e.render)throw new Error("Unable to find node on an unmounted component.");var n=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+n)}var r=Ge(t);return null===r?null:r.stateNode},t.findHostInstanceWithNoPortals=function(e){var t=qe(e);return null===t?null:t.stateNode},t.findHostInstanceWithWarning=function(e,t){var n=d(e);if(void 0===n){if("function"==typeof e.render)throw new Error("Unable to find node on an unmounted component.");var r=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+r)}var i=Ge(n);if(null===i)return null;if(i.mode&Mr){var a=ce(n)||"Component";if(!Qg[a]){Qg[a]=!0;var o=Oo;try{Do(i),n.mode&Mr?s("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,a):s("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,a)}finally{o?Do(o):Uo()}}}return i.stateNode},t.flushControlled=function(e){var t=Jf;Jf|=Hf;var n=jf.transition,r=ea();try{jf.transition=null,ta(Qi),e()}finally{ta(r),jf.transition=n,(Jf=t)===Wf&&(yp(),ja())}},t.flushPassiveEffects=cg,t.flushSync=Qp,t.focusWithin=function(e,t){if(!Pt)throw new Error("Test selector API is not supported by this renderer.");for(var n=Mf(Ef(e),t),r=Array.from(n),i=0;i<r.length;){var a=r[i++];if(!Ot(a)){if(a.tag===k){var o=a.stateNode;if(Nt(o))return!0}for(var s=a.child;null!==s;)r.push(s),s=s.sibling}}return!1},t.getCurrentUpdatePriority=ea,t.getFindAllNodesFailureDescription=function(e,t){if(!Pt)throw new Error("Test selector API is not supported by this renderer.");for(var n=0,r=[],i=[Ef(e),0],a=0;a<i.length;){var o=i[a++],s=i[a++],l=t[s];if((o.tag!==k||!Ot(o))&&(Pf(o,l)&&(r.push(Rf(l)),++s>n&&(n=s)),s<t.length))for(var u=o.child;null!==u;)i.push(u,s),u=u.sibling}if(n<t.length){for(var c=[],d=n;d<t.length;d++)c.push(Rf(t[d]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+c.join(" > ")}return null},t.getPublicRootInstance=function(e){var t=e.current;return t.child?t.child.tag===k?Ze(t.child.stateNode):t.child.stateNode:null},t.injectIntoDevTools=function(e){var t=e.findFiberByHostInstance,n=i.ReactCurrentDispatcher;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return s("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{y&&(e=c({},e,{getLaneLabelMap:_a,injectProfilingHooks:Sa})),ga=t.inject(e),ma=t}catch(e){s("React instrumentation encountered an error: %s.",e)}return!!t.checkDCE}({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:ym,overrideHookStateDeletePath:vm,overrideHookStateRenamePath:bm,overrideProps:xm,overridePropsDeletePath:Sm,overridePropsRenamePath:_m,setErrorHandler:Am,setSuspenseHandler:km,scheduleUpdate:wm,currentDispatcherRef:n,findHostInstanceByFiber:Lm,findFiberByHostInstance:t||Om,findHostInstancesForRefresh:$g,scheduleRefresh:jg,scheduleRoot:Fg,setRefreshHandler:Og,getCurrentFiber:Im,reconcilerVersion:"18.3.1"})},t.isAlreadyRendering=function(){return(Jf&($f|Vf))!==Wf},t.observeVisibleRects=function(e,t,n,r){if(!Pt)throw new Error("Test selector API is not supported by this renderer.");var i=Lf(e,t),a=Ut(i,n,r),o=a.disconnect,s=a.observe,l=a.unobserve,u=function(){var n=Lf(e,t);i.forEach((function(e){n.indexOf(e)<0&&l(e)})),n.forEach((function(e){i.indexOf(e)<0&&s(e)}))};return Of.push(u),{disconnect:function(){var e=Of.indexOf(u);e>=0&&Of.splice(e,1),o()}}},t.registerMutableSourceForHydration=function(e,t){var n=(0,t._getVersion)(t._source);null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=Ji;try{return Ji=e,t()}finally{Ji=n}},t.shouldError=pm,t.shouldSuspend=mm,t.updateContainer=cm,t})),fc.exports);var pc,gc=n(nc.exports),mc={exports:{}},yc={};var vc,bc={};
|
|
38
|
-
/**
|
|
39
|
-
* @license React
|
|
40
|
-
* react-reconciler-constants.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/"production"===production?mc.exports=(pc||(pc=1,yc.ConcurrentRoot=1,yc.ContinuousEventPriority=4,yc.DefaultEventPriority=16,yc.DiscreteEventPriority=1,yc.IdleEventPriority=536870912,yc.LegacyRoot=0),yc):mc.exports=(vc||(vc=1,"production"!==production&&(bc.ConcurrentRoot=1,bc.ContinuousEventPriority=4,bc.DefaultEventPriority=16,bc.DiscreteEventPriority=1,bc.IdleEventPriority=536870912,bc.LegacyRoot=0)),bc);var xc=mc.exports;const Sc=gc({supportsMutation:!0,supportsPersistence:!1,createInstance:(e,t,n)=>{const r=function(e,t){const n=function(e,t){if("tag"===e)return new ju(t.attribute?t.attribute:t);if("radio"===e)return new Wu(t.attribute?t.attribute:t);if("checkbox"===e)return new Fu(t.attribute?t.attribute:t)}(e,t);if(n)return n;if(!ir.graphicService.creator[e])return;const r=ir.graphicService.creator[e](t.attribute);return r}(e,t);if(r)return function(e,t){for(const n in t)_c(n,t)&&pl[n]&&e.addEventListener(pl[n],t[n])}(r,t),r},createTextInstance:(e,t)=>{},appendInitialChild:(e,t)=>{e.add(t)},finalizeInitialChildren:()=>!1,prepareUpdate:()=>!0,shouldSetTextContent:()=>!1,getRootHostContext:()=>null,getChildHostContext:()=>null,getPublicInstance:e=>e,prepareForCommit:()=>null,resetAfterCommit:()=>{},preparePortalMount:()=>null,scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,isPrimaryRenderer:!1,getCurrentEventPriority:()=>xc.DefaultEventPriority,getInstanceFromNode:e=>null,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},prepareScopeUpdate:()=>{},getInstanceFromScope:()=>{},detachDeletedInstance:()=>{},supportsHydration:!1,appendChild:(e,t)=>{e.add(t)},appendChildToContainer:(e,t)=>{e.add(t)},insertBefore:(e,t,n)=>{e.insertBefore(t,n)},insertInContainerBefore:(e,t,n)=>{e.insertBefore(t,n)},removeChild:(e,t)=>{t.delete()},removeChildFromContainer:(e,t)=>{t.delete()},commitUpdate:(e,t,n,r,i)=>{!function(e,t,n){for(const r in n)_c(r,n)&&n[r]!==t[r]&&e.removeEventListener(pl[r],n[r]);for(const r in t)_c(r,t)&&n[r]!==t[r]&&e.addEventListener(pl[r],t[r]);const r=t.attribute??D({},t);e.initAttributes(r),"image"===e.type&&e.loadImage(r.image)}(e,i,r)},hideInstance:e=>{e.setAttribute("visible",!1)},unhideInstance:(e,t)=>{e.setAttribute("visible",!0)},clearContainer:e=>{e.removeAllChild()},commitTextUpdate:(e,t,n)=>{}});function _c(e,t){return e.startsWith("on")&&g(t[e])}Sc.injectIntoDevTools({bundleType:"production"!==production?1:0,version:u.version,rendererPackageName:"react-vtable"});const wc=(e,t)=>{const{componentId:n,children:r}=e;if(!l.isValidElement(r))return null;const i=l.useContext(c),{table:a}=i,o="header-custom-layout"===r.props.role,s=l.useRef(new Map),u=l.useCallback((e=>{const t=`${e.col}-${e.row}`;let n;if(s.current.has(t)){const i=s.current.get(t);Ac(r,i,e),n=i.containerInfo}else{n=new zi({});const i=Sc.createContainer(n,xc.LegacyRoot,null,null,null,"custom",null,null);s.current.set(t,i),Ac(r,i,e)}return{rootContainer:n,renderDefault:!!r.props.renderDefault}}),[r]),d=l.useCallback(((e,t)=>{const n=`${e}-${t}`;if(s.current.has(n)){const e=s.current.get(n);Sc.updateContainer(null,e,null),s.current.delete(n)}}),[]),h=l.useCallback((()=>{s.current.forEach(((e,t)=>{const n=e;Sc.updateContainer(null,n,null)})),s.current.clear()}),[]);return l.useLayoutEffect((()=>(console.log("init",e,a),()=>{console.log("release",e,a)})),[]),l.useLayoutEffect((()=>{console.log("update props",e,a),a?.checkReactCustomLayout(h),a&&!a.reactCustomLayout?.hasReactCreateGraphic(n,o)?(a.reactCustomLayout?.setReactCreateGraphic(n,u,o),a.reactCustomLayout?.setReactRemoveGraphic(n,d,o),a.reactCustomLayout?.updateCustomCell(n,o)):a&&s.current.forEach(((e,t)=>{const[n,i]=t.split("-").map(Number),{width:o,height:s}=function(e,t,n){const r=n.getCellRange(e,t),i=n.getCellsRect(r.start.col,r.start.row,r.end.col,r.end.row);return i}(n,i,a),l=e,u={col:n,row:i,dataValue:a.getCellOriginValue(n,i),value:a.getCellValue(n,i)||"",rect:{left:0,top:0,right:o,bottom:s,width:o,height:s},table:a};l.containerInfo,Ac(r,l,u),a.scenegraph.updateNextFrame()}))})),null};function Ac(e,t,n){Sc.updateContainer(u.cloneElement(e,{...n}),t,null)}const kc=(e,t,n,r)=>{const i=["id","updateId","componentIndex","children"],a=n?Object.keys(n).concat(i):i,o=e=>{const t=l.useContext(c),r=u.useRef(null),i=u.useRef(e.updateId);if(e.updateId!==i.current){i.current=e.updateId;!!n&&We(t.table,e,r.current,n)&&(r.current=e)}return l.useEffect((()=>()=>{n&&We(t.table,null,r.current,n)}),[]),Bc(e.children,e.componentId)};return o.displayName=e,o.parseOption=e=>{const n=z(e,a);if(e.children){const{children:t}=e;u.Children.map(t,((t,r)=>{Tc(t,e,n,a,e.componentId+"-"+r)}))}return{option:n,optionName:t,isSingle:r}},o};function Tc(e,t,n,r,i){if("custom-layout"===e.props.role&&(n.customLayout="react-custom-layout",n.customLayoutComponentId=i),"header-custom-layout"===e.props.role&&(n.headerCustomLayout="react-custom-layout",n.headerCustomLayoutComponentId=i),"ListColumn"===e.type.displayName){n.columns||(n.columns=[]);const a=z(e.props,r);n.columns.push(a),a.componentId=i,e.props.children&&u.Children.map(e.props.children,((e,n)=>{Tc(e,t,a,r,i+"-"+n)}))}}function Bc(e,t){return(n=e)&&n.$$typeof===Symbol.for("react.element")||Array.isArray(e)?u.Children.map(e,((e,n)=>e.props.children?Bc(e.props.children,t+"-"+n):"custom-layout"===e.props.role||"header-custom-layout"===e.props.role?u.createElement(wc,{componentId:t},e):null)):null;var n}const Cc=kc("ListColumn","columns"),Ec=kc("PivotColumnDimension","columns"),Pc=kc("PivotRowDimension","rows"),Rc=kc("PivotIndicator","indicators"),Mc=kc("PivotColumnHeaderTitle","columnHeaderTitle",void 0,!0),Lc=kc("PivotRowHeaderTitle","rowHeaderTitle",void 0,!0),Oc=kc("PivotCorner","corner",void 0,!0),Ic=kc("Menu","menu",void 0,!0),Nc=kc("Tooltip","tooltip",void 0,!0),Uc=kc("EmptyTip","emptyTip",void 0,!0),Dc=kc("Title","title",void 0,!0);function zc(e,t){return A(e)?e:"string"==typeof e&&e.endsWith("%")?Number(e.slice(0,-1))/100*t:0}const jc="group",Fc="text",Wc="tag",Hc={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"#FFF"},panelStyle:{visible:!0,fill:"rgb(22, 93, 255)",lineWidth:1,cornerRadius:2},padding:10,state:{panelStyle:{hover:{fill:"rgb(64, 128, 255)"},disabled:{fill:"rgb(148, 191, 255)"}}}};const $c=u.forwardRef((function(e,t){const n=D({},Hc,e),{disabled:r,onClick:i}=n;let a=u.useRef(null);a=t||a;const o=u.useCallback((e=>{r?"function"==typeof e?.preventDefault&&e.preventDefault():i&&i(e)}),[r,i]),s=function(e){const{textStyle:t,padding:n,panelStyle:r,minWidth:i,maxWidth:a,visible:o,cursor:s,disabled:l,state:u,children:c}=e,d={text:c,textStyle:t,padding:n,panel:r,minWidth:i,maxWidth:a,visible:o,cursor:s??l?"not-allowed":"pointer",childrenPickable:!1,state:{text:{hover:u?.textStyle?.hover,disabled:u?.textStyle?.disabled},panel:{hover:u?.panelStyle?.hover,disabled:u?.panelStyle?.disabled}}};return d}(n);return l.useEffect((()=>{a.current.addEventListener("mouseenter",(()=>{r||(a.current.addState("hover",!0,!1),a.current.stage.renderNextFrame())})),a.current.addEventListener("mouseleave",(()=>{r||(a.current.removeState("hover",!1),a.current.stage.renderNextFrame())}))})),l.useEffect((()=>{r?(a.current.removeState("disabled",!1),a.current.addState("disabled",!0,!1)):a.current.removeState("disabled",!1),a.current.stage.renderNextFrame()})),u.createElement(Wc,{ref:a,attribute:s,onClick:o})}));$c.displayName="Button";const Vc={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"rgb(64, 128, 255)"},panelStyle:{visible:!0,opacity:0,fill:"rgba(242, 243, 245, 0.5)",lineWidth:1,cornerRadius:2},padding:4,space:6,state:{textStyle:{disabled:{fill:"rgb(148, 191, 255)"}},panelStyle:{hover:{opacity:1}}}};const Gc=u.forwardRef((function(e,t){const n=D({},Vc,e),{disabled:r,href:i,onClick:a}=n;let o=u.useRef(null);o=t||o;const s=u.useCallback((e=>{r?"function"==typeof e?.preventDefault&&e.preventDefault():(a&&a(e),i&&window.open(i))}),[r,i,a]),c=function(e){const{textStyle:t,padding:n,space:r,panelStyle:i,minWidth:a,maxWidth:o,visible:s,cursor:l,disabled:u,icon:c,state:d,children:h}=e,f={text:h,textStyle:t,padding:n,panel:i,minWidth:a,maxWidth:o,visible:s,cursor:l??u?"not-allowed":"pointer",childrenPickable:!1,state:{text:{hover:d?.textStyle?.hover,disabled:d?.textStyle?.disabled},panel:{hover:d?.panelStyle?.hover,disabled:d?.panelStyle?.disabled}},space:r,shape:{visible:!!c,fill:!1,stroke:t.fill,symbolType:"M -0.2927 -15.4348 L -15.142 -0.5855 C -18.6567 2.9292 -18.6567 8.6277 -15.142 12.1424 V 12.1424 C -11.6273 15.6571 -5.9288 15.6571 -2.4141 12.1424 L 15.2636 -5.5353 C 17.6067 -7.8784 17.6067 -11.6774 15.2636 -14.0206 V -14.0206 C 12.9205 -16.3637 9.1215 -16.3637 6.7783 -14.0206 L -10.8993 3.6571 C -12.0709 4.8287 -12.0709 6.7282 -10.8993 7.8997 V 7.8997 C -9.7278 9.0713 -7.8283 9.0713 -6.6567 7.8997 L 8.1925 -6.9495"}};return f}(n);return l.useEffect((()=>{o.current.addEventListener("mouseenter",(()=>{r||(o.current.addState("hover",!0,!1),o.current.stage.renderNextFrame())})),o.current.addEventListener("mouseleave",(()=>{r||(o.current.removeState("hover",!1),o.current.stage.renderNextFrame())}))}),[]),l.useEffect((()=>{r?(o.current.removeState("disabled",!1),o.current.addState("disabled",!0,!1)):o.current.removeState("disabled",!1),o.current.stage.renderNextFrame()})),u.createElement(Wc,{ref:o,attribute:c,onClick:s})}));Gc.displayName="Link";const Yc={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"#FFF"},panelStyle:{visible:!0,fill:"rgb(201, 205, 212)",lineWidth:1,cornerRadius:2},size:40,shape:"circle",autoFixFontSize:!0};const qc=u.forwardRef((function(e,t){const n=D({},Yc,e),{size:r,children:i,onClick:a}=n;let o=u.useRef(null);o=t||o;const s=u.useCallback((e=>{a&&a(e)}),[a]),l=function(e){const{panelStyle:t,size:n,shape:r}=e,i={...t,width:n,height:n,clip:!0,cornerRadius:"circle"===r?n/2:t.cornerRadius??2,display:"flex",alignItems:"center",justifyContent:"center",visibleAll:!0,path:void 0};return i}(n);if(S(i)){const e=function(e){const{textStyle:t,size:n,children:r,autoFixFontSize:i}=e,a={text:r,...t};i&&function(e,t){const n=Uu(t.text,t).width,r=e/(n+8),i=Math.max(Math.floor(t.fontSize*r),6);t.fontSize=i}(n,a);return a}(n);return u.createElement(jc,{ref:o,attribute:l,onClick:s},u.createElement(Fc,{attribute:e}))}return"image"===i.type&&(i.props.attribute.width=r,i.props.attribute.height=r),u.createElement(jc,{ref:o,attribute:l,onClick:s},i)}));qc.displayName="Avatar";const Qc={defaultPopupVisible:!1,position:"top"},Xc={backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 4px 10px rgba(0, 0, 0, .1)",fontSize:"14px",borderRadius:"4px",lineHeight:"1.5715",boxSizing:"border-box",color:"rgb(78, 89, 105)",border:"1px solid rgb(229, 230, 235)",padding:"12px 16px"},Kc=e=>{const t={content:"",height:"8px",width:"8px",position:"absolute",display:"block",boxSizing:"border-box",transform:"rotate(45deg)",transformOrigin:"50% 50% 0",backgroundColor:"rgb(255, 255, 255)",border:"1px solid rgb(229, 230, 235)",...Zc(e.position)};return e.visible?u.createElement(u.Fragment,null,u.createElement("div",{style:Xc},e.content),u.createElement("div",{style:t})):u.createElement(u.Fragment,null)};function Zc(e){switch(e){case"top":return{top:"calc(100% - 5px)",left:"calc(50% - 5px)",borderTop:"none",borderLeft:"none"};case"tl":return{top:"calc(100% - 4px)",left:"14px",borderTop:"none",borderLeft:"none"};case"tr":return{top:"calc(100% - 4px)",left:"calc(100% - 24px)",borderTop:"none",borderLeft:"none"};case"bottom":return{top:"-4px",left:"calc(50% - 4px)",borderRight:"none",borderBottom:"none"};case"bl":return{top:"-4px",left:"14px",borderRight:"none",borderBottom:"none"};case"br":return{top:"-4px",left:"calc(100% - 24px)",borderRight:"none",borderBottom:"none"};case"left":return{top:"calc(50% - 4px)",left:"calc(100% - 5px)",borderLeft:"none",borderBottom:"none"};case"lt":return{top:"14px",left:"calc(100% - 5px)",borderLeft:"none",borderBottom:"none"};case"lb":return{top:"calc(100% - 24px)",left:"calc(100% - 5px)",borderLeft:"none",borderBottom:"none"};case"right":return{top:"calc(50% - 4px)",left:"-4px",borderRight:"none",borderTop:"none"};case"rt":return{top:"14px",left:"-4px",borderRight:"none",borderTop:"none"};case"rb":return{top:"calc(100% - 24px)",left:"-4px",borderRight:"none",borderTop:"none"}}}const Jc=u.forwardRef((function(e,t){const n=D({},Qc,e),{content:r,position:i,popupVisible:a,defaultPopupVisible:o,children:s}=n;let c=u.useRef(null);c=t||c;const[d,h]=l.useState(!1);l.useEffect((()=>{h(!!a),c.current.stage.renderNextFrame()}),[a]),l.useEffect((()=>{h(a??o??!1)}),[]);const{transform:f,anchorType:p}=function(e){switch(e){case"top":return{anchorType:"top",transform:"translate(-50%, calc(-100% - 10px))"};case"tl":return{anchorType:"top-left",transform:"translate(0, calc(-100% - 10px))"};case"tr":return{anchorType:"top-right",transform:"translate(-100%, calc(-100% - 10px))"};case"bottom":return{anchorType:"bottom",transform:"translate(-50%, 10px)"};case"bl":return{anchorType:"bottom-left",transform:"translate(0, 10px)"};case"br":return{anchorType:"bottom-right",transform:"translate(-100%, 10px)"};case"left":return{anchorType:"left",transform:"translate(calc(-100% - 10px), -50%)"};case"lt":return{anchorType:"top-left",transform:"translate(calc(-100% - 10px), 0)"};case"lb":return{anchorType:"bottom-left",transform:"translate(calc(-100% - 10px), -100%)"};case"right":return{anchorType:"right",transform:"translate(10px, -50%)"};case"rt":return{anchorType:"top-right",transform:"translate(10px, 0)"};case"rb":return{anchorType:"bottom-right",transform:"translate(10px, -100%)"}}}(i),g={react:{style:{transform:f},element:u.createElement(Kc,{visible:d,content:r,position:i}),container:null,visible:!0,pointerEvents:!1,anchorType:p}},m=l.useCallback((e=>{y(a)||(h(!0),e.currentTarget.stage.renderNextFrame())}),[]),v=l.useCallback((e=>{y(a)||(h(!1),e.currentTarget.stage.renderNextFrame())}),[]);return u.createElement(jc,{ref:c,attribute:g,onMouseEnter:m,onMouseLeave:v},s)}));Jc.displayName="Popover";const ed={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"rgb(51, 101, 238)"},panelStyle:{visible:!0,fill:"#e6fffb",lineWidth:1,cornerRadius:4}};const td=u.forwardRef((function(e,t){const n=D({},ed,e),{attribute:r,panelStyle:i,children:a,...o}=n;let s=u.useRef(null);return s=t||s,u.createElement(Wc,{ref:s,attribute:r??{text:a,panel:i,...o}})}));td.displayName="Tag";const nd={};const rd=u.forwardRef((function(e,t){const n=D({},nd,e),{textStyle:r,circleStyle:i,children:a,...o}=n;let s=u.useRef(null);s=t||s;const c=l.useCallback((e=>{n.onChange&&n.onChange(e.target.attribute.checked)}),[]);return l.useEffect((()=>(s.current.addEventListener("radio_checked",c),()=>{s.current.removeEventListener("radio_checked",c)})),[]),u.createElement("radio",{ref:s,attribute:{text:{...r,text:a},circle:i,...o}})}));rd.displayName="Radio";const id={};const ad=u.forwardRef((function(e,t){const n=D({},id,e),{textStyle:r,boxStyle:i,iconStyle:a,children:o,...s}=n;let c=u.useRef(null);c=t||c;const d=l.useCallback((e=>{n.onChange&&n.onChange(e.target.attribute.checked)}),[]);return l.useEffect((()=>(c.current?.addEventListener("checkbox_state_change",d),()=>{c.current?.removeEventListener("checkbox_state_change",d)})),[]),u.createElement("checkbox",{ref:c,attribute:{text:{...r,text:o},box:i,icon:a,...s}})}));ad.displayName="Checkbox";Object.defineProperty(e,"register",{enumerable:!0,get:function(){return t.register}}),e.Arc="arc",e.Avatar=qc,e.Button=$c,e.Checkbox=ad,e.Circle="circle",e.CustomComponent=e=>{const t=l.useContext(c),{table:n}=t,r=function(e,t){const n=l.useMemo((()=>({...t})),[t]),r=l.useMemo((()=>{const t=D({},e);for(const e in n)void 0===t[e]&&(t[e]=n[e]);return t}),[e,n]);return r}(e,{style:{left:0,top:0},className:"vtable-custom-component",displayMode:"position",x:0,y:0,width:0,height:0,row:0,col:0,anchor:"top-left",dx:0,dy:0}),{displayMode:i,x:a,y:o,width:s,height:d,row:h,col:f,anchor:p,dx:g,dy:m,className:y,children:v,style:b}=r;let x,S,_,w;if("position"===i)x=a+g+"px",S=o+m+"px",_=s+"px",w=d+"px";else if("cell"===i){const e=n&&f>=0&&h>=0?n?.getCellRelativeRect(f,h):{width:0,height:0,left:-9999,top:-9999};_=zc(s,e.width)+"px",w=zc(d,e.height)+"px","top-left"===p?(x=e.left+zc(g,e.width)+"px",S=e.top+zc(m,e.height)+"px"):"top-right"===p?(x=e.left+zc(g,e.width)+e.width+"px",S=e.top+zc(m,e.height)+"px"):"bottom-left"===p?(x=e.left+zc(g,e.width)+"px",S=e.top+zc(m,e.height)+e.height+"px"):"bottom-right"===p&&(x=e.left+zc(g,e.width)+e.width+"px",S=e.top+zc(m,e.height)+e.height+"px")}const A=D({},b,{position:"absolute",zIndex:1e3,width:_,height:w,left:x,top:S});return u.createElement("div",{className:y,style:A},u.Children.map(v,(e=>e?u.cloneElement(e,{}):e)))},e.CustomLayout=wc,e.EmptyTip=Uc,e.Group=jc,e.Image="image",e.Line="line",e.Link=Gc,e.ListColumn=Cc,e.ListTable=Xu,e.ListTableSimple=Ju,e.Menu=Ic,e.Path="path",e.PivotChart=Zu,e.PivotColumnDimension=Ec,e.PivotColumnHeaderTitle=Mc,e.PivotCorner=Oc,e.PivotIndicator=Rc,e.PivotRowDimension=Pc,e.PivotRowHeaderTitle=Lc,e.PivotTable=Ku,e.PivotTableSimple=ec,e.Polygon="polygon",e.Popover=Jc,e.Radio=rd,e.Rect="rect",e.RichText="richtext",e.Symbol="symbol",e.Tag=td,e.Text=Fc,e.Title=Dc,e.Tooltip=Nc,e.registerChartModule=function(e,n){t.register.chartModule(e,n)},e.version="1.7.0-alpha.8"}));
|
|
10
|
+
*/ah.exports=(sh||(sh=1,rh=function(t){var e={},n=a,i=uh(),r=Object.assign;function s(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 o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),_=Symbol.iterator;function A(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=_&&t[_]||t["@@iterator"])?t:null}function S(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case h:return"Fragment";case u:return"Portal";case d:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case b:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case p:return(t.displayName||"Context")+".Consumer";case f:return(t._context.displayName||"Context")+".Provider";case g:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case y:return null!==(e=t.displayName||null)?e:S(t.type)||"Memo";case v:e=t._payload,t=t._init;try{return S(t(e))}catch(t){}}return null}function w(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=(t=e.render).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 S(e);case 8:return e===c?"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("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}function T(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!=(4098&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function B(t){if(T(t)!==t)throw Error(s(188))}function C(t){var e=t.alternate;if(!e){if(null===(e=T(t)))throw Error(s(188));return e!==t?null:t}for(var n=t,i=e;;){var r=n.return;if(null===r)break;var a=r.alternate;if(null===a){if(null!==(i=r.return)){n=i;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===n)return B(r),t;if(a===i)return B(r),e;a=a.sibling}throw Error(s(188))}if(n.return!==i.return)n=r,i=a;else{for(var o=!1,l=r.child;l;){if(l===n){o=!0,n=r,i=a;break}if(l===i){o=!0,i=r,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,i=r;break}if(l===i){o=!0,i=a,n=r;break}l=l.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==i)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?t:e}function k(t){return null!==(t=C(t))?M(t):null}function M(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=M(t);if(null!==e)return e;t=t.sibling}return null}function P(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){if(4!==t.tag){var e=P(t);if(null!==e)return e}t=t.sibling}return null}var E,O=Array.isArray,L=t.getPublicInstance,R=t.getRootHostContext,I=t.getChildHostContext,N=t.prepareForCommit,U=t.resetAfterCommit,D=t.createInstance,z=t.appendInitialChild,W=t.finalizeInitialChildren,F=t.prepareUpdate,j=t.shouldSetTextContent,H=t.createTextInstance,$=t.scheduleTimeout,G=t.cancelTimeout,V=t.noTimeout,X=t.isPrimaryRenderer,Y=t.supportsMutation,K=t.supportsPersistence,q=t.supportsHydration,Q=t.getInstanceFromNode,Z=t.preparePortalMount,J=t.getCurrentEventPriority,tt=t.detachDeletedInstance,et=t.supportsMicrotasks,nt=t.scheduleMicrotask,it=t.supportsTestSelectors,rt=t.findFiberRoot,st=t.getBoundingRect,at=t.getTextContent,ot=t.isHiddenSubtree,lt=t.matchAccessibilityRole,ut=t.setFocusIfFocusable,ht=t.setupIntersectionObserver,ct=t.appendChild,dt=t.appendChildToContainer,ft=t.commitTextUpdate,pt=t.commitMount,gt=t.commitUpdate,mt=t.insertBefore,bt=t.insertInContainerBefore,yt=t.removeChild,vt=t.removeChildFromContainer,xt=t.resetTextContent,_t=t.hideInstance,At=t.hideTextInstance,St=t.unhideInstance,wt=t.unhideTextInstance,Tt=t.clearContainer,Bt=t.cloneInstance,Ct=t.createContainerChildSet,kt=t.appendChildToContainerChildSet,Mt=t.finalizeContainerChildren,Pt=t.replaceContainerChildren,Et=t.cloneHiddenInstance,Ot=t.cloneHiddenTextInstance,Lt=t.canHydrateInstance,Rt=t.canHydrateTextInstance,It=t.canHydrateSuspenseInstance,Nt=t.isSuspenseInstancePending,Ut=t.isSuspenseInstanceFallback,Dt=t.getSuspenseInstanceFallbackErrorDetails,zt=t.registerSuspenseInstanceRetry,Wt=t.getNextHydratableSibling,Ft=t.getFirstHydratableChild,jt=t.getFirstHydratableChildWithinContainer,Ht=t.getFirstHydratableChildWithinSuspenseInstance,$t=t.hydrateInstance,Gt=t.hydrateTextInstance,Vt=t.hydrateSuspenseInstance,Xt=t.getNextHydratableInstanceAfterSuspenseInstance,Yt=t.commitHydratedContainer,Kt=t.commitHydratedSuspenseInstance,qt=t.clearSuspenseBoundary,Qt=t.clearSuspenseBoundaryFromContainer,Zt=t.shouldDeleteUnhydratedTailInstances,Jt=t.didNotMatchHydratedContainerTextInstance,te=t.didNotMatchHydratedTextInstance;function ee(t){if(void 0===E)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);E=e&&e[1]||""}return"\n"+E+t}var ne=!1;function ie(t,e){if(!t||ne)return"";ne=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var i=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){i=t}t.call(e.prototype)}else{try{throw Error()}catch(t){i=t}t()}}catch(e){if(e&&i&&"string"==typeof e.stack){for(var r=e.stack.split("\n"),s=i.stack.split("\n"),a=r.length-1,o=s.length-1;1<=a&&0<=o&&r[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(r[a]!==s[o]){if(1!==a||1!==o)do{if(a--,0>--o||r[a]!==s[o]){var l="\n"+r[a].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}}while(1<=a&&0<=o);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ee(t):""}var re=Object.prototype.hasOwnProperty,se=[],ae=-1;function oe(t){return{current:t}}function le(t){0>ae||(t.current=se[ae],se[ae]=null,ae--)}function ue(t,e){ae++,se[ae]=t.current,t.current=e}var he={},ce=oe(he),de=oe(!1),fe=he;function pe(t,e){var n=t.type.contextTypes;if(!n)return he;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r,s={};for(r in n)s[r]=e[r];return i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function ge(t){return null!=t.childContextTypes}function me(){le(de),le(ce)}function be(t,e,n){if(ce.current!==he)throw Error(s(168));ue(ce,e),ue(de,n)}function ye(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var a in i=i.getChildContext())if(!(a in e))throw Error(s(108,w(t)||"Unknown",a));return r({},n,i)}function ve(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||he,fe=ce.current,ue(ce,t),ue(de,de.current),!0}function xe(t,e,n){var i=t.stateNode;if(!i)throw Error(s(169));n?(t=ye(t,e,fe),i.__reactInternalMemoizedMergedChildContext=t,le(de),le(ce),ue(ce,t)):le(de),ue(de,n)}var _e=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(Ae(t)/Se|0)|0},Ae=Math.log,Se=Math.LN2,we=64,Te=4194304;function Be(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 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Ce(t,e){var n=t.pendingLanes;if(0===n)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,a=268435455&n;if(0!==a){var o=a&~r;0!==o?i=Be(o):0!=(s&=a)&&(i=Be(s))}else 0!=(a=n&~r)?i=Be(a):0!==s&&(i=Be(s));if(0===i)return 0;if(0!==e&&e!==i&&0==(e&r)&&((r=i&-i)>=(s=e&-e)||16===r&&0!=(4194240&s)))return e;if(0!=(4&i)&&(i|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=i;0<e;)r=1<<(n=31-_e(e)),i|=t[n],e&=~r;return i}function ke(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;default:return-1}}function Me(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function Pe(){var t=we;return 0==(4194240&(we<<=1))&&(we=64),t}function Ee(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Oe(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-_e(e)]=n}function Le(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-_e(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var Re=0;function Ie(t){return 1<(t&=-t)?4<t?0!=(268435455&t)?16:536870912:4:1}var Ne=i.unstable_scheduleCallback,Ue=i.unstable_cancelCallback,De=i.unstable_shouldYield,ze=i.unstable_requestPaint,We=i.unstable_now,Fe=i.unstable_ImmediatePriority,je=i.unstable_UserBlockingPriority,He=i.unstable_NormalPriority,$e=i.unstable_IdlePriority,Ge=null,Ve=null,Xe="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},Ye=null,Ke=!1,qe=!1;function Qe(t){null===Ye?Ye=[t]:Ye.push(t)}function Ze(){if(!qe&&null!==Ye){qe=!0;var t=0,e=Re;try{var n=Ye;for(Re=1;t<n.length;t++){var i=n[t];do{i=i(!0)}while(null!==i)}Ye=null,Ke=!1}catch(e){throw null!==Ye&&(Ye=Ye.slice(t+1)),Ne(Fe,Ze),e}finally{Re=e,qe=!1}}return null}var Je=[],tn=0,en=null,nn=0,rn=[],sn=0,an=null,on=1,ln="";function un(t,e){Je[tn++]=nn,Je[tn++]=en,en=t,nn=e}function hn(t,e,n){rn[sn++]=on,rn[sn++]=ln,rn[sn++]=an,an=t;var i=on;t=ln;var r=32-_e(i)-1;i&=~(1<<r),n+=1;var s=32-_e(e)+r;if(30<s){var a=r-r%5;s=(i&(1<<a)-1).toString(32),i>>=a,r-=a,on=1<<32-_e(e)+r|n<<r|i,ln=s+t}else on=1<<s|n<<r|i,ln=t}function cn(t){null!==t.return&&(un(t,1),hn(t,1,0))}function dn(t){for(;t===en;)en=Je[--tn],Je[tn]=null,nn=Je[--tn],Je[tn]=null;for(;t===an;)an=rn[--sn],rn[sn]=null,ln=rn[--sn],rn[sn]=null,on=rn[--sn],rn[sn]=null}var fn=null,pn=null,gn=!1,mn=!1,bn=null;function yn(t,e){var n=ro(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,null===(e=t.deletions)?(t.deletions=[n],t.flags|=16):e.push(n)}function vn(t,e){switch(t.tag){case 5:return null!==(e=Lt(e,t.type,t.pendingProps))&&(t.stateNode=e,fn=t,pn=Ft(e),!0);case 6:return null!==(e=Rt(e,t.pendingProps))&&(t.stateNode=e,fn=t,pn=null,!0);case 13:if(null!==(e=It(e))){var n=null!==an?{id:on,overflow:ln}:null;return t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=ro(18,null,null,0)).stateNode=e,n.return=t,t.child=n,fn=t,pn=null,!0}return!1;default:return!1}}function xn(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function _n(t){if(gn){var e=pn;if(e){var n=e;if(!vn(t,e)){if(xn(t))throw Error(s(418));e=Wt(n);var i=fn;e&&vn(t,e)?yn(i,n):(t.flags=-4097&t.flags|2,gn=!1,fn=t)}}else{if(xn(t))throw Error(s(418));t.flags=-4097&t.flags|2,gn=!1,fn=t}}}function An(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;fn=t}function Sn(t){if(!q||t!==fn)return!1;if(!gn)return An(t),gn=!0,!1;if(3!==t.tag&&(5!==t.tag||Zt(t.type)&&!j(t.type,t.memoizedProps))){var e=pn;if(e){if(xn(t))throw wn(),Error(s(418));for(;e;)yn(t,e),e=Wt(e)}}if(An(t),13===t.tag){if(!q)throw Error(s(316));if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(s(317));pn=Xt(t)}else pn=fn?Wt(t.stateNode):null;return!0}function wn(){for(var t=pn;t;)t=Wt(t)}function Tn(){q&&(pn=fn=null,mn=gn=!1)}function Bn(t){null===bn?bn=[t]:bn.push(t)}var Cn=o.ReactCurrentBatchConfig;function kn(t,e){if(Xe(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!re.call(e,r)||!Xe(t[r],e[r]))return!1}return!0}function Mn(t){switch(t.tag){case 5:return ee(t.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return ie(t.type,!1);case 11:return ie(t.type.render,!1);case 1:return ie(t.type,!0);default:return""}}function Pn(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var i=n.stateNode}if(!i)throw Error(s(147,t));var r=i,a=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===a?e.ref:(e=function(t){var e=r.refs;null===t?delete e[a]:e[a]=t},e._stringRef=a,e)}if("string"!=typeof t)throw Error(s(284));if(!n._owner)throw Error(s(290,t))}return t}function En(t,e){throw t=Object.prototype.toString.call(e),Error(s(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function On(t){return(0,t._init)(t._payload)}function Ln(t){function e(e,n){if(t){var i=e.deletions;null===i?(e.deletions=[n],e.flags|=16):i.push(n)}}function n(n,i){if(!t)return null;for(;null!==i;)e(n,i),i=i.sibling;return null}function i(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function r(t,e){return(t=ao(t,e)).index=0,t.sibling=null,t}function a(e,n,i){return e.index=i,t?null!==(i=e.alternate)?(i=i.index)<n?(e.flags|=2,n):i:(e.flags|=2,n):(e.flags|=1048576,n)}function o(e){return t&&null===e.alternate&&(e.flags|=2),e}function c(t,e,n,i){return null===e||6!==e.tag?((e=ho(n,t.mode,i)).return=t,e):((e=r(e,n)).return=t,e)}function d(t,e,n,i){var s=n.type;return s===h?p(t,e,n.props.children,i,n.key):null!==e&&(e.elementType===s||"object"==typeof s&&null!==s&&s.$$typeof===v&&On(s)===e.type)?((i=r(e,n.props)).ref=Pn(t,e,n),i.return=t,i):((i=oo(n.type,n.key,n.props,null,t.mode,i)).ref=Pn(t,e,n),i.return=t,i)}function f(t,e,n,i){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=co(n,t.mode,i)).return=t,e):((e=r(e,n.children||[])).return=t,e)}function p(t,e,n,i,s){return null===e||7!==e.tag?((e=lo(n,t.mode,i,s)).return=t,e):((e=r(e,n)).return=t,e)}function g(t,e,n){if("string"==typeof e&&""!==e||"number"==typeof e)return(e=ho(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case l:return(n=oo(e.type,e.key,e.props,null,t.mode,n)).ref=Pn(t,null,e),n.return=t,n;case u:return(e=co(e,t.mode,n)).return=t,e;case v:return g(t,(0,e._init)(e._payload),n)}if(O(e)||A(e))return(e=lo(e,t.mode,n,null)).return=t,e;En(t,e)}return null}function m(t,e,n,i){var r=null!==e?e.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==r?null:c(t,e,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===r?d(t,e,n,i):null;case u:return n.key===r?f(t,e,n,i):null;case v:return m(t,e,(r=n._init)(n._payload),i)}if(O(n)||A(n))return null!==r?null:p(t,e,n,i,null);En(t,n)}return null}function b(t,e,n,i,r){if("string"==typeof i&&""!==i||"number"==typeof i)return c(e,t=t.get(n)||null,""+i,r);if("object"==typeof i&&null!==i){switch(i.$$typeof){case l:return d(e,t=t.get(null===i.key?n:i.key)||null,i,r);case u:return f(e,t=t.get(null===i.key?n:i.key)||null,i,r);case v:return b(t,e,n,(0,i._init)(i._payload),r)}if(O(i)||A(i))return p(e,t=t.get(n)||null,i,r,null);En(e,i)}return null}function y(r,s,o,l){for(var u=null,h=null,c=s,d=s=0,f=null;null!==c&&d<o.length;d++){c.index>d?(f=c,c=null):f=c.sibling;var p=m(r,c,o[d],l);if(null===p){null===c&&(c=f);break}t&&c&&null===p.alternate&&e(r,c),s=a(p,s,d),null===h?u=p:h.sibling=p,h=p,c=f}if(d===o.length)return n(r,c),gn&&un(r,d),u;if(null===c){for(;d<o.length;d++)null!==(c=g(r,o[d],l))&&(s=a(c,s,d),null===h?u=c:h.sibling=c,h=c);return gn&&un(r,d),u}for(c=i(r,c);d<o.length;d++)null!==(f=b(c,r,d,o[d],l))&&(t&&null!==f.alternate&&c.delete(null===f.key?d:f.key),s=a(f,s,d),null===h?u=f:h.sibling=f,h=f);return t&&c.forEach((function(t){return e(r,t)})),gn&&un(r,d),u}function x(r,o,l,u){var h=A(l);if("function"!=typeof h)throw Error(s(150));if(null==(l=h.call(l)))throw Error(s(151));for(var c=h=null,d=o,f=o=0,p=null,y=l.next();null!==d&&!y.done;f++,y=l.next()){d.index>f?(p=d,d=null):p=d.sibling;var v=m(r,d,y.value,u);if(null===v){null===d&&(d=p);break}t&&d&&null===v.alternate&&e(r,d),o=a(v,o,f),null===c?h=v:c.sibling=v,c=v,d=p}if(y.done)return n(r,d),gn&&un(r,f),h;if(null===d){for(;!y.done;f++,y=l.next())null!==(y=g(r,y.value,u))&&(o=a(y,o,f),null===c?h=y:c.sibling=y,c=y);return gn&&un(r,f),h}for(d=i(r,d);!y.done;f++,y=l.next())null!==(y=b(d,r,f,y.value,u))&&(t&&null!==y.alternate&&d.delete(null===y.key?f:y.key),o=a(y,o,f),null===c?h=y:c.sibling=y,c=y);return t&&d.forEach((function(t){return e(r,t)})),gn&&un(r,f),h}return function t(i,s,a,c){if("object"==typeof a&&null!==a&&a.type===h&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case l:t:{for(var d=a.key,f=s;null!==f;){if(f.key===d){if((d=a.type)===h){if(7===f.tag){n(i,f.sibling),(s=r(f,a.props.children)).return=i,i=s;break t}}else if(f.elementType===d||"object"==typeof d&&null!==d&&d.$$typeof===v&&On(d)===f.type){n(i,f.sibling),(s=r(f,a.props)).ref=Pn(i,f,a),s.return=i,i=s;break t}n(i,f);break}e(i,f),f=f.sibling}a.type===h?((s=lo(a.props.children,i.mode,c,a.key)).return=i,i=s):((c=oo(a.type,a.key,a.props,null,i.mode,c)).ref=Pn(i,s,a),c.return=i,i=c)}return o(i);case u:t:{for(f=a.key;null!==s;){if(s.key===f){if(4===s.tag&&s.stateNode.containerInfo===a.containerInfo&&s.stateNode.implementation===a.implementation){n(i,s.sibling),(s=r(s,a.children||[])).return=i,i=s;break t}n(i,s);break}e(i,s),s=s.sibling}(s=co(a,i.mode,c)).return=i,i=s}return o(i);case v:return t(i,s,(f=a._init)(a._payload),c)}if(O(a))return y(i,s,a,c);if(A(a))return x(i,s,a,c);En(i,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==s&&6===s.tag?(n(i,s.sibling),(s=r(s,a)).return=i,i=s):(n(i,s),(s=ho(a,i.mode,c)).return=i,i=s),o(i)):n(i,s)}}var Rn=Ln(!0),In=Ln(!1),Nn=oe(null),Un=null,Dn=null,zn=null;function Wn(){zn=Dn=Un=null}function Fn(t,e,n){X?(ue(Nn,e._currentValue),e._currentValue=n):(ue(Nn,e._currentValue2),e._currentValue2=n)}function jn(t){var e=Nn.current;le(Nn),X?t._currentValue=e:t._currentValue2=e}function Hn(t,e,n){for(;null!==t;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==i&&(i.childLanes|=e)):null!==i&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function $n(t,e){Un=t,zn=Dn=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(Or=!0),t.firstContext=null)}function Gn(t){var e=X?t._currentValue:t._currentValue2;if(zn!==t)if(t={context:t,memoizedValue:e,next:null},null===Dn){if(null===Un)throw Error(s(308));Dn=t,Un.dependencies={lanes:0,firstContext:t}}else Dn=Dn.next=t;return e}var Vn=null;function Xn(t){null===Vn?Vn=[t]:Vn.push(t)}function Yn(t,e,n,i){var r=e.interleaved;return null===r?(n.next=n,Xn(e)):(n.next=r.next,r.next=n),e.interleaved=n,Kn(t,i)}function Kn(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}var qn=!1;function Qn(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zn(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 Jn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ti(t,e,n){var i=t.updateQueue;if(null===i)return null;if(i=i.shared,0!=(2&ta)){var r=i.pending;return null===r?e.next=e:(e.next=r.next,r.next=e),i.pending=e,Kn(t,n)}return null===(r=i.interleaved)?(e.next=e,Xn(i)):(e.next=r.next,r.next=e),i.interleaved=e,Kn(t,n)}function ei(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!=(4194240&n))){var i=e.lanes;n|=i&=t.pendingLanes,e.lanes=n,Le(t,n)}}function ni(t,e){var n=t.updateQueue,i=t.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===s?r=s=a:s=s.next=a,n=n.next}while(null!==n);null===s?r=s=e:s=s.next=e}else r=s=e;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function ii(t,e,n,i){var s=t.updateQueue;qn=!1;var a=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(null!==l){s.shared.pending=null;var u=l,h=u.next;u.next=null,null===o?a=h:o.next=h,o=u;var c=t.alternate;null!==c&&(l=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===l?c.firstBaseUpdate=h:l.next=h,c.lastBaseUpdate=u)}if(null!==a){var d=s.baseState;for(o=0,c=h=u=null,l=a;;){var f=l.lane,p=l.eventTime;if((i&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});t:{var g=t,m=l;switch(f=e,p=n,m.tag){case 1:if("function"==typeof(g=m.payload)){d=g.call(p,d,f);break t}d=g;break t;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=m.payload)?g.call(p,d,f):g))break t;d=r({},d,f);break t;case 2:qn=!0}}null!==l.callback&&0!==l.lane&&(t.flags|=64,null===(f=s.effects)?s.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(h=c=p,u=d):c=c.next=p,o|=f;if(null===(l=l.next)){if(null===(l=s.shared.pending))break;l=(f=l).next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}if(null===c&&(u=d),s.baseState=u,s.firstBaseUpdate=h,s.lastBaseUpdate=c,null!==(e=s.shared.interleaved)){s=e;do{o|=s.lane,s=s.next}while(s!==e)}else null===a&&(s.shared.lanes=0);la|=o,t.lanes=o,t.memoizedState=d}}function ri(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var i=t[e],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!=typeof r)throw Error(s(191,r));r.call(i)}}}var si={},ai=oe(si),oi=oe(si),li=oe(si);function ui(t){if(t===si)throw Error(s(174));return t}function hi(t,e){ue(li,e),ue(oi,t),ue(ai,si),t=R(e),le(ai),ue(ai,t)}function ci(){le(ai),le(oi),le(li)}function di(t){var e=ui(li.current),n=ui(ai.current);n!==(e=I(n,t.type,e))&&(ue(oi,t),ue(ai,e))}function fi(t){oi.current===t&&(le(ai),le(oi))}var pi=oe(0);function gi(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Nt(n)||Ut(n)))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var mi=[];function bi(){for(var t=0;t<mi.length;t++){var e=mi[t];X?e._workInProgressVersionPrimary=null:e._workInProgressVersionSecondary=null}mi.length=0}var yi=o.ReactCurrentDispatcher,vi=o.ReactCurrentBatchConfig,xi=0,_i=null,Ai=null,Si=null,wi=!1,Ti=!1,Bi=0,Ci=0;function ki(){throw Error(s(321))}function Mi(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Xe(t[n],e[n]))return!1;return!0}function Pi(t,e,n,i,r,a){if(xi=a,_i=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,yi.current=null===t||null===t.memoizedState?fr:pr,t=n(i,r),Ti){a=0;do{if(Ti=!1,Bi=0,25<=a)throw Error(s(301));a+=1,Si=Ai=null,e.updateQueue=null,yi.current=gr,t=n(i,r)}while(Ti)}if(yi.current=dr,e=null!==Ai&&null!==Ai.next,xi=0,Si=Ai=_i=null,wi=!1,e)throw Error(s(300));return t}function Ei(){var t=0!==Bi;return Bi=0,t}function Oi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Si?_i.memoizedState=Si=t:Si=Si.next=t,Si}function Li(){if(null===Ai){var t=_i.alternate;t=null!==t?t.memoizedState:null}else t=Ai.next;var e=null===Si?_i.memoizedState:Si.next;if(null!==e)Si=e,Ai=t;else{if(null===t)throw Error(s(310));t={memoizedState:(Ai=t).memoizedState,baseState:Ai.baseState,baseQueue:Ai.baseQueue,queue:Ai.queue,next:null},null===Si?_i.memoizedState=Si=t:Si=Si.next=t}return Si}function Ri(t,e){return"function"==typeof e?e(t):e}function Ii(t){var e=Li(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var i=Ai,r=i.baseQueue,a=n.pending;if(null!==a){if(null!==r){var o=r.next;r.next=a.next,a.next=o}i.baseQueue=r=a,n.pending=null}if(null!==r){a=r.next,i=i.baseState;var l=o=null,u=null,h=a;do{var c=h.lane;if((xi&c)===c)null!==u&&(u=u.next={lane:0,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),i=h.hasEagerState?h.eagerState:t(i,h.action);else{var d={lane:c,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null};null===u?(l=u=d,o=i):u=u.next=d,_i.lanes|=c,la|=c}h=h.next}while(null!==h&&h!==a);null===u?o=i:u.next=l,Xe(i,e.memoizedState)||(Or=!0),e.memoizedState=i,e.baseState=o,e.baseQueue=u,n.lastRenderedState=i}if(null!==(t=n.interleaved)){r=t;do{a=r.lane,_i.lanes|=a,la|=a,r=r.next}while(r!==t)}else null===r&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Ni(t){var e=Li(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var i=n.dispatch,r=n.pending,a=e.memoizedState;if(null!==r){n.pending=null;var o=r=r.next;do{a=t(a,o.action),o=o.next}while(o!==r);Xe(a,e.memoizedState)||(Or=!0),e.memoizedState=a,null===e.baseQueue&&(e.baseState=a),n.lastRenderedState=a}return[a,i]}function Ui(){}function Di(t,e){var n=_i,i=Li(),r=e(),a=!Xe(i.memoizedState,r);if(a&&(i.memoizedState=r,Or=!0),i=i.queue,qi(Fi.bind(null,n,i,t),[t]),i.getSnapshot!==e||a||null!==Si&&1&Si.memoizedState.tag){if(n.flags|=2048,Gi(9,Wi.bind(null,n,i,r,e),void 0,null),null===ea)throw Error(s(349));0!=(30&xi)||zi(n,e,r)}return r}function zi(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=_i.updateQueue)?(e={lastEffect:null,stores:null},_i.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function Wi(t,e,n,i){e.value=n,e.getSnapshot=i,ji(e)&&Hi(t)}function Fi(t,e,n){return n((function(){ji(e)&&Hi(t)}))}function ji(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Xe(t,n)}catch(t){return!0}}function Hi(t){var e=Kn(t,1);null!==e&&Pa(e,t,1,-1)}function $i(t){var e=Oi();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:t},e.queue=t,t=t.dispatch=lr.bind(null,_i,t),[e.memoizedState,t]}function Gi(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},null===(e=_i.updateQueue)?(e={lastEffect:null,stores:null},_i.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t),t}function Vi(){return Li().memoizedState}function Xi(t,e,n,i){var r=Oi();_i.flags|=t,r.memoizedState=Gi(1|e,n,void 0,void 0===i?null:i)}function Yi(t,e,n,i){var r=Li();i=void 0===i?null:i;var s=void 0;if(null!==Ai){var a=Ai.memoizedState;if(s=a.destroy,null!==i&&Mi(i,a.deps))return void(r.memoizedState=Gi(e,n,s,i))}_i.flags|=t,r.memoizedState=Gi(1|e,n,s,i)}function Ki(t,e){return Xi(8390656,8,t,e)}function qi(t,e){return Yi(2048,8,t,e)}function Qi(t,e){return Yi(4,2,t,e)}function Zi(t,e){return Yi(4,4,t,e)}function Ji(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function tr(t,e,n){return n=null!=n?n.concat([t]):null,Yi(4,4,Ji.bind(null,e,t),n)}function er(){}function nr(t,e){var n=Li();e=void 0===e?null:e;var i=n.memoizedState;return null!==i&&null!==e&&Mi(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function ir(t,e){var n=Li();e=void 0===e?null:e;var i=n.memoizedState;return null!==i&&null!==e&&Mi(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function rr(t,e,n){return 0==(21&xi)?(t.baseState&&(t.baseState=!1,Or=!0),t.memoizedState=n):(Xe(n,e)||(n=Pe(),_i.lanes|=n,la|=n,t.baseState=!0),e)}function sr(t,e){var n=Re;Re=0!==n&&4>n?n:4,t(!0);var i=vi.transition;vi.transition={};try{t(!1),e()}finally{Re=n,vi.transition=i}}function ar(){return Li().memoizedState}function or(t,e,n){var i=Ma(t);n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},ur(t)?hr(e,n):null!==(n=Yn(t,e,n,i))&&(Pa(n,t,i,ka()),cr(n,e,i))}function lr(t,e,n){var i=Ma(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(ur(t))hr(e,r);else{var s=t.alternate;if(0===t.lanes&&(null===s||0===s.lanes)&&null!==(s=e.lastRenderedReducer))try{var a=e.lastRenderedState,o=s(a,n);if(r.hasEagerState=!0,r.eagerState=o,Xe(o,a)){var l=e.interleaved;return null===l?(r.next=r,Xn(e)):(r.next=l.next,l.next=r),void(e.interleaved=r)}}catch(t){}null!==(n=Yn(t,e,r,i))&&(Pa(n,t,i,r=ka()),cr(n,e,i))}}function ur(t){var e=t.alternate;return t===_i||null!==e&&e===_i}function hr(t,e){Ti=wi=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function cr(t,e,n){if(0!=(4194240&n)){var i=e.lanes;n|=i&=t.pendingLanes,e.lanes=n,Le(t,n)}}var dr={readContext:Gn,useCallback:ki,useContext:ki,useEffect:ki,useImperativeHandle:ki,useInsertionEffect:ki,useLayoutEffect:ki,useMemo:ki,useReducer:ki,useRef:ki,useState:ki,useDebugValue:ki,useDeferredValue:ki,useTransition:ki,useMutableSource:ki,useSyncExternalStore:ki,useId:ki,unstable_isNewReconciler:!1},fr={readContext:Gn,useCallback:function(t,e){return Oi().memoizedState=[t,void 0===e?null:e],t},useContext:Gn,useEffect:Ki,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,Xi(4194308,4,Ji.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Xi(4194308,4,t,e)},useInsertionEffect:function(t,e){return Xi(4,2,t,e)},useMemo:function(t,e){var n=Oi();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=Oi();return e=void 0!==n?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=or.bind(null,_i,t),[i.memoizedState,t]},useRef:function(t){return t={current:t},Oi().memoizedState=t},useState:$i,useDebugValue:er,useDeferredValue:function(t){return Oi().memoizedState=t},useTransition:function(){var t=$i(!1),e=t[0];return t=sr.bind(null,t[1]),Oi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=_i,r=Oi();if(gn){if(void 0===n)throw Error(s(407));n=n()}else{if(n=e(),null===ea)throw Error(s(349));0!=(30&xi)||zi(i,e,n)}r.memoizedState=n;var a={value:n,getSnapshot:e};return r.queue=a,Ki(Fi.bind(null,i,a,t),[t]),i.flags|=2048,Gi(9,Wi.bind(null,i,a,n,e),void 0,null),n},useId:function(){var t=Oi(),e=ea.identifierPrefix;if(gn){var n=ln;e=":"+e+"R"+(n=(on&~(1<<32-_e(on)-1)).toString(32)+n),0<(n=Bi++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=Ci++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},pr={readContext:Gn,useCallback:nr,useContext:Gn,useEffect:qi,useImperativeHandle:tr,useInsertionEffect:Qi,useLayoutEffect:Zi,useMemo:ir,useReducer:Ii,useRef:Vi,useState:function(){return Ii(Ri)},useDebugValue:er,useDeferredValue:function(t){return rr(Li(),Ai.memoizedState,t)},useTransition:function(){return[Ii(Ri)[0],Li().memoizedState]},useMutableSource:Ui,useSyncExternalStore:Di,useId:ar,unstable_isNewReconciler:!1},gr={readContext:Gn,useCallback:nr,useContext:Gn,useEffect:qi,useImperativeHandle:tr,useInsertionEffect:Qi,useLayoutEffect:Zi,useMemo:ir,useReducer:Ni,useRef:Vi,useState:function(){return Ni(Ri)},useDebugValue:er,useDeferredValue:function(t){var e=Li();return null===Ai?e.memoizedState=t:rr(e,Ai.memoizedState,t)},useTransition:function(){return[Ni(Ri)[0],Li().memoizedState]},useMutableSource:Ui,useSyncExternalStore:Di,useId:ar,unstable_isNewReconciler:!1};function mr(t,e){if(t&&t.defaultProps){for(var n in e=r({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}function br(t,e,n,i){n=null==(n=n(i,e=t.memoizedState))?e:r({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var yr={isMounted:function(t){return!!(t=t._reactInternals)&&T(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=ka(),r=Ma(t),s=Jn(i,r);s.payload=e,null!=n&&(s.callback=n),null!==(e=ti(t,s,r))&&(Pa(e,t,r,i),ei(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=ka(),r=Ma(t),s=Jn(i,r);s.tag=1,s.payload=e,null!=n&&(s.callback=n),null!==(e=ti(t,s,r))&&(Pa(e,t,r,i),ei(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=ka(),i=Ma(t),r=Jn(n,i);r.tag=2,null!=e&&(r.callback=e),null!==(e=ti(t,r,i))&&(Pa(e,t,i,n),ei(e,t,i))}};function vr(t,e,n,i,r,s,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(i,s,a):!(e.prototype&&e.prototype.isPureReactComponent&&kn(n,i)&&kn(r,s))}function xr(t,e,n){var i=!1,r=he,s=e.contextType;return"object"==typeof s&&null!==s?s=Gn(s):(r=ge(e)?fe:ce.current,s=(i=null!=(i=e.contextTypes))?pe(t,r):he),e=new e(n,s),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=yr,t.stateNode=e,e._reactInternals=t,i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function _r(t,e,n,i){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,i),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&yr.enqueueReplaceState(e,e.state,null)}function Ar(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},Qn(t);var s=e.contextType;"object"==typeof s&&null!==s?r.context=Gn(s):(s=ge(e)?fe:ce.current,r.context=pe(t,s)),r.state=t.memoizedState,"function"==typeof(s=e.getDerivedStateFromProps)&&(br(t,e,s,n),r.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(e=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),e!==r.state&&yr.enqueueReplaceState(r,r.state,null),ii(t,n,r,i),r.state=t.memoizedState),"function"==typeof r.componentDidMount&&(t.flags|=4194308)}function Sr(t,e){try{var n="",i=e;do{n+=Mn(i),i=i.return}while(i);var r=n}catch(t){r="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:r,digest:null}}function wr(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}var Tr="function"==typeof WeakMap?WeakMap:Map;function Br(t,e,n){(n=Jn(-1,n)).tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){ya||(ya=!0,va=i)},n}function Cr(t,e,n){(n=Jn(-1,n)).tag=3;var i=t.type.getDerivedStateFromError;if("function"==typeof i){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){}}var s=t.stateNode;return null!==s&&"function"==typeof s.componentDidCatch&&(n.callback=function(){"function"!=typeof i&&(null===xa?xa=new Set([this]):xa.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function kr(t,e,n){var i=t.pingCache;if(null===i){i=t.pingCache=new Tr;var r=new Set;i.set(e,r)}else void 0===(r=i.get(e))&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=Za.bind(null,t,e,n),e.then(t,t))}function Mr(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function Pr(t,e,n,i,r){return 0==(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=Jn(-1,1)).tag=2,ti(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=r,t)}var Er=o.ReactCurrentOwner,Or=!1;function Lr(t,e,n,i){e.child=null===t?In(e,null,n,i):Rn(e,t.child,n,i)}function Rr(t,e,n,i,r){n=n.render;var s=e.ref;return $n(e,r),i=Pi(t,e,n,i,s,r),n=Ei(),null===t||Or?(gn&&n&&cn(e),e.flags|=1,Lr(t,e,i,r),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,is(t,e,r))}function Ir(t,e,n,i,r){if(null===t){var s=n.type;return"function"!=typeof s||so(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=oo(n.type,null,i,e,e.mode,r)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=s,Nr(t,e,s,i,r))}if(s=t.child,0==(t.lanes&r)){var a=s.memoizedProps;if((n=null!==(n=n.compare)?n:kn)(a,i)&&t.ref===e.ref)return is(t,e,r)}return e.flags|=1,(t=ao(s,i)).ref=e.ref,t.return=e,e.child=t}function Nr(t,e,n,i,r){if(null!==t){var s=t.memoizedProps;if(kn(s,i)&&t.ref===e.ref){if(Or=!1,e.pendingProps=i=s,0==(t.lanes&r))return e.lanes=t.lanes,is(t,e,r);0!=(131072&t.flags)&&(Or=!0)}}return zr(t,e,n,i,r)}function Ur(t,e,n){var i=e.pendingProps,r=i.children,s=null!==t?t.memoizedState:null;if("hidden"===i.mode)if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(sa,ra),ra|=n;else{if(0==(1073741824&n))return t=null!==s?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ue(sa,ra),ra|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==s?s.baseLanes:n,ue(sa,ra),ra|=i}else null!==s?(i=s.baseLanes|n,e.memoizedState=null):i=n,ue(sa,ra),ra|=i;return Lr(t,e,r,n),e.child}function Dr(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function zr(t,e,n,i,r){var s=ge(n)?fe:ce.current;return s=pe(e,s),$n(e,r),n=Pi(t,e,n,i,s,r),i=Ei(),null===t||Or?(gn&&i&&cn(e),e.flags|=1,Lr(t,e,n,r),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,is(t,e,r))}function Wr(t,e,n,i,r){if(ge(n)){var s=!0;ve(e)}else s=!1;if($n(e,r),null===e.stateNode)ns(t,e),xr(e,n,i),Ar(e,n,i,r),i=!0;else if(null===t){var a=e.stateNode,o=e.memoizedProps;a.props=o;var l=a.context,u=n.contextType;u="object"==typeof u&&null!==u?Gn(u):pe(e,u=ge(n)?fe:ce.current);var h=n.getDerivedStateFromProps,c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate;c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==i||l!==u)&&_r(e,a,i,u),qn=!1;var d=e.memoizedState;a.state=d,ii(e,i,a,r),l=e.memoizedState,o!==i||d!==l||de.current||qn?("function"==typeof h&&(br(e,n,h,i),l=e.memoizedState),(o=qn||vr(e,n,o,i,d,l,u))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(e.flags|=4194308)):("function"==typeof a.componentDidMount&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),a.props=i,a.state=l,a.context=u,i=o):("function"==typeof a.componentDidMount&&(e.flags|=4194308),i=!1)}else{a=e.stateNode,Zn(t,e),o=e.memoizedProps,u=e.type===e.elementType?o:mr(e.type,o),a.props=u,c=e.pendingProps,d=a.context,l="object"==typeof(l=n.contextType)&&null!==l?Gn(l):pe(e,l=ge(n)?fe:ce.current);var f=n.getDerivedStateFromProps;(h="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==c||d!==l)&&_r(e,a,i,l),qn=!1,d=e.memoizedState,a.state=d,ii(e,i,a,r);var p=e.memoizedState;o!==c||d!==p||de.current||qn?("function"==typeof f&&(br(e,n,f,i),p=e.memoizedState),(u=qn||vr(e,n,u,i,d,p,l)||!1)?(h||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(i,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(i,p,l)),"function"==typeof a.componentDidUpdate&&(e.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=p),a.props=i,a.state=p,a.context=l,i=u):("function"!=typeof a.componentDidUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),i=!1)}return Fr(t,e,n,i,s,r)}function Fr(t,e,n,i,r,s){Dr(t,e);var a=0!=(128&e.flags);if(!i&&!a)return r&&xe(e,n,!1),is(t,e,s);i=e.stateNode,Er.current=e;var o=a&&"function"!=typeof n.getDerivedStateFromError?null:i.render();return e.flags|=1,null!==t&&a?(e.child=Rn(e,t.child,null,s),e.child=Rn(e,null,o,s)):Lr(t,e,o,s),e.memoizedState=i.state,r&&xe(e,n,!0),e.child}function jr(t){var e=t.stateNode;e.pendingContext?be(0,e.pendingContext,e.pendingContext!==e.context):e.context&&be(0,e.context,!1),hi(t,e.containerInfo)}function Hr(t,e,n,i,r){return Tn(),Bn(r),e.flags|=256,Lr(t,e,n,i),e.child}var $r,Gr,Vr,Xr,Yr={dehydrated:null,treeContext:null,retryLane:0};function Kr(t){return{baseLanes:t,cachePool:null,transitions:null}}function qr(t,e,n){var i,r=e.pendingProps,a=pi.current,o=!1,l=0!=(128&e.flags);if((i=l)||(i=(null===t||null!==t.memoizedState)&&0!=(2&a)),i?(o=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(a|=1),ue(pi,1&a),null===t)return _n(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0==(1&e.mode)?e.lanes=1:Ut(t)?e.lanes=8:e.lanes=1073741824,null):(l=r.children,t=r.fallback,o?(r=e.mode,o=e.child,l={mode:"hidden",children:l},0==(1&r)&&null!==o?(o.childLanes=0,o.pendingProps=l):o=uo(l,r,0,null),t=lo(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Kr(n),e.memoizedState=Yr,t):Qr(e,l));if(null!==(a=t.memoizedState)&&null!==(i=a.dehydrated))return function(t,e,n,i,r,a,o){if(n)return 256&e.flags?(e.flags&=-257,Zr(t,e,o,i=wr(Error(s(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(a=i.fallback,r=e.mode,i=uo({mode:"visible",children:i.children},r,0,null),(a=lo(a,r,o,null)).flags|=2,i.return=e,a.return=e,i.sibling=a,e.child=i,0!=(1&e.mode)&&Rn(e,t.child,null,o),e.child.memoizedState=Kr(o),e.memoizedState=Yr,a);if(0==(1&e.mode))return Zr(t,e,o,null);if(Ut(r))return i=Dt(r).digest,Zr(t,e,o,i=wr(a=Error(s(419)),i,void 0));if(n=0!=(o&t.childLanes),Or||n){if(null!==(i=ea)){switch(o&-o){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!=(r&(i.suspendedLanes|o))?0:r)&&r!==a.retryLane&&(a.retryLane=r,Kn(t,r),Pa(i,t,r,-1))}return ja(),Zr(t,e,o,i=wr(Error(s(421))))}return Nt(r)?(e.flags|=128,e.child=t.child,e=to.bind(null,t),zt(r,e),null):(t=a.treeContext,q&&(pn=Ht(r),fn=e,gn=!0,bn=null,mn=!1,null!==t&&(rn[sn++]=on,rn[sn++]=ln,rn[sn++]=an,on=t.id,ln=t.overflow,an=e)),(e=Qr(e,i.children)).flags|=4096,e)}(t,e,l,r,i,a,n);if(o){o=r.fallback,l=e.mode,i=(a=t.child).sibling;var u={mode:"hidden",children:r.children};return 0==(1&l)&&e.child!==a?((r=e.child).childLanes=0,r.pendingProps=u,e.deletions=null):(r=ao(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==i?o=ao(i,o):(o=lo(o,l,n,null)).flags|=2,o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,l=null===(l=t.child.memoizedState)?Kr(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=t.childLanes&~n,e.memoizedState=Yr,r}return t=(o=t.child).sibling,r=ao(o,{mode:"visible",children:r.children}),0==(1&e.mode)&&(r.lanes=n),r.return=e,r.sibling=null,null!==t&&(null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Qr(t,e){return(e=uo({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function Zr(t,e,n,i){return null!==i&&Bn(i),Rn(e,t.child,null,n),(t=Qr(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function Jr(t,e,n){t.lanes|=e;var i=t.alternate;null!==i&&(i.lanes|=e),Hn(t.return,e,n)}function ts(t,e,n,i,r){var s=t.memoizedState;null===s?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function es(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(Lr(t,e,i.children,n),0!=(2&(i=pi.current)))i=1&i|2,e.flags|=128;else{if(null!==t&&0!=(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Jr(t,n,e);else if(19===t.tag)Jr(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(ue(pi,i),0==(1&e.mode))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;null!==n;)null!==(t=n.alternate)&&null===gi(t)&&(r=n),n=n.sibling;null===(n=r)?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),ts(e,!1,r,n,s);break;case"backwards":for(n=null,r=e.child,e.child=null;null!==r;){if(null!==(t=r.alternate)&&null===gi(t)){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}ts(e,!0,n,null,s);break;case"together":ts(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ns(t,e){0==(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function is(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),la|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(s(153));if(null!==e.child){for(n=ao(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=ao(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function rs(t){t.flags|=4}function ss(t,e){if(null!==t&&t.child===e.child)return!0;if(0!=(16&e.flags))return!1;for(t=e.child;null!==t;){if(0!=(12854&t.flags)||0!=(12854&t.subtreeFlags))return!1;t=t.sibling}return!0}if(Y)$r=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)z(t,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Gr=function(){},Vr=function(t,e,n,i,r){if((t=t.memoizedProps)!==i){var s=e.stateNode,a=ui(ai.current);n=F(s,n,t,i,r,a),(e.updateQueue=n)&&rs(e)}},Xr=function(t,e,n,i){n!==i&&rs(e)};else if(K){$r=function(t,e,n,i){for(var r=e.child;null!==r;){if(5===r.tag){var s=r.stateNode;n&&i&&(s=Et(s,r.type,r.memoizedProps,r)),z(t,s)}else if(6===r.tag)s=r.stateNode,n&&i&&(s=Ot(s,r.memoizedProps,r)),z(t,s);else if(4!==r.tag)if(22===r.tag&&null!==r.memoizedState)null!==(s=r.child)&&(s.return=r),$r(t,r,!0,!0);else if(null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};var as=function(t,e,n,i){for(var r=e.child;null!==r;){if(5===r.tag){var s=r.stateNode;n&&i&&(s=Et(s,r.type,r.memoizedProps,r)),kt(t,s)}else if(6===r.tag)s=r.stateNode,n&&i&&(s=Ot(s,r.memoizedProps,r)),kt(t,s);else if(4!==r.tag)if(22===r.tag&&null!==r.memoizedState)null!==(s=r.child)&&(s.return=r),as(t,r,!0,!0);else if(null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Gr=function(t,e){var n=e.stateNode;if(!ss(t,e)){t=n.containerInfo;var i=Ct(t);as(i,e,!1,!1),n.pendingChildren=i,rs(e),Mt(t,i)}},Vr=function(t,e,n,i,r){var s=t.stateNode,a=t.memoizedProps;if((t=ss(t,e))&&a===i)e.stateNode=s;else{var o=e.stateNode,l=ui(ai.current),u=null;a!==i&&(u=F(o,n,a,i,r,l)),t&&null===u?e.stateNode=s:(s=Bt(s,u,n,a,i,e,t,o),W(s,n,i,r,l)&&rs(e),e.stateNode=s,t?rs(e):$r(s,e,!1,!1))}},Xr=function(t,e,n,i){n!==i?(t=ui(li.current),n=ui(ai.current),e.stateNode=H(i,t,n,e),rs(e)):e.stateNode=t.stateNode}}else Gr=function(){},Vr=function(){},Xr=function(){};function os(t,e){if(!gn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?e||null===t.tail?t.tail=null:t.tail.sibling=null:i.sibling=null}}function ls(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=t,r=r.sibling;else for(r=t.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function us(t,e,n){var i=e.pendingProps;switch(dn(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ls(e),null;case 1:case 17:return ge(e.type)&&me(),ls(e),null;case 3:return n=e.stateNode,ci(),le(de),le(ce),bi(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||(Sn(e)?rs(e):null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==bn&&(Ra(bn),bn=null))),Gr(t,e),ls(e),null;case 5:fi(e),n=ui(li.current);var r=e.type;if(null!==t&&null!=e.stateNode)Vr(t,e,r,i,n),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(null===e.stateNode)throw Error(s(166));return ls(e),null}if(t=ui(ai.current),Sn(e)){if(!q)throw Error(s(175));t=$t(e.stateNode,e.type,e.memoizedProps,n,t,e,!mn),e.updateQueue=t,null!==t&&rs(e)}else{var a=D(r,i,n,t,e);$r(a,e,!1,!1),e.stateNode=a,W(a,r,i,n,t)&&rs(e)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return ls(e),null;case 6:if(t&&null!=e.stateNode)Xr(t,e,t.memoizedProps,i);else{if("string"!=typeof i&&null===e.stateNode)throw Error(s(166));if(t=ui(li.current),n=ui(ai.current),Sn(e)){if(!q)throw Error(s(176));if(t=e.stateNode,n=e.memoizedProps,(i=Gt(t,n,e,!mn))&&null!==(r=fn))switch(r.tag){case 3:Jt(r.stateNode.containerInfo,t,n,0!=(1&r.mode));break;case 5:te(r.type,r.memoizedProps,r.stateNode,t,n,0!=(1&r.mode))}i&&rs(e)}else e.stateNode=H(i,t,n,e)}return ls(e),null;case 13:if(le(pi),i=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(gn&&null!==pn&&0!=(1&e.mode)&&0==(128&e.flags))wn(),Tn(),e.flags|=98560,r=!1;else if(r=Sn(e),null!==i&&null!==i.dehydrated){if(null===t){if(!r)throw Error(s(318));if(!q)throw Error(s(344));if(!(r=null!==(r=e.memoizedState)?r.dehydrated:null))throw Error(s(317));Vt(r,e)}else Tn(),0==(128&e.flags)&&(e.memoizedState=null),e.flags|=4;ls(e),r=!1}else null!==bn&&(Ra(bn),bn=null),r=!0;if(!r)return 65536&e.flags?e:null}return 0!=(128&e.flags)?(e.lanes=n,e):((n=null!==i)!=(null!==t&&null!==t.memoizedState)&&n&&(e.child.flags|=8192,0!=(1&e.mode)&&(null===t||0!=(1&pi.current)?0===aa&&(aa=3):ja())),null!==e.updateQueue&&(e.flags|=4),ls(e),null);case 4:return ci(),Gr(t,e),null===t&&Z(e.stateNode.containerInfo),ls(e),null;case 10:return jn(e.type._context),ls(e),null;case 19:if(le(pi),null===(r=e.memoizedState))return ls(e),null;if(i=0!=(128&e.flags),null===(a=r.rendering))if(i)os(r,!1);else{if(0!==aa||null!==t&&0!=(128&t.flags))for(t=e.child;null!==t;){if(null!==(a=gi(t))){for(e.flags|=128,os(r,!1),null!==(t=a.updateQueue)&&(e.updateQueue=t,e.flags|=4),e.subtreeFlags=0,t=n,n=e.child;null!==n;)r=t,(i=n).flags&=14680066,null===(a=i.alternate)?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,r=a.dependencies,i.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext}),n=n.sibling;return ue(pi,1&pi.current|2),e.child}t=t.sibling}null!==r.tail&&We()>pa&&(e.flags|=128,i=!0,os(r,!1),e.lanes=4194304)}else{if(!i)if(null!==(t=gi(a))){if(e.flags|=128,i=!0,null!==(t=t.updateQueue)&&(e.updateQueue=t,e.flags|=4),os(r,!0),null===r.tail&&"hidden"===r.tailMode&&!a.alternate&&!gn)return ls(e),null}else 2*We()-r.renderingStartTime>pa&&1073741824!==n&&(e.flags|=128,i=!0,os(r,!1),e.lanes=4194304);r.isBackwards?(a.sibling=e.child,e.child=a):(null!==(t=r.last)?t.sibling=a:e.child=a,r.last=a)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=We(),e.sibling=null,t=pi.current,ue(pi,i?1&t|2:1&t),e):(ls(e),null);case 22:case 23:return Da(),n=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==n&&(e.flags|=8192),n&&0!=(1&e.mode)?0!=(1073741824&ra)&&(ls(e),Y&&6&e.subtreeFlags&&(e.flags|=8192)):ls(e),null;case 24:case 25:return null}throw Error(s(156,e.tag))}function hs(t,e){switch(dn(e),e.tag){case 1:return ge(e.type)&&me(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return ci(),le(de),le(ce),bi(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return fi(e),null;case 13:if(le(pi),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(s(340));Tn()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return le(pi),null;case 4:return ci(),null;case 10:return jn(e.type._context),null;case 22:case 23:return Da(),null;default:return null}}var cs=!1,ds=!1,fs="function"==typeof WeakSet?WeakSet:Set,ps=null;function gs(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Qa(t,e,n)}else n.current=null}function ms(t,e,n){try{n()}catch(n){Qa(t,e,n)}}var bs=!1;function ys(t,e,n){var i=e.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,void 0!==s&&ms(e,n,s)}r=r.next}while(r!==i)}}function vs(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function xs(t){var e=t.ref;if(null!==e){var n=t.stateNode;t=5===t.tag?L(n):n,"function"==typeof e?e(t):e.current=t}}function _s(t){var e=t.alternate;null!==e&&(t.alternate=null,_s(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(e=t.stateNode)&&tt(e),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 As(t){return 5===t.tag||3===t.tag||4===t.tag}function Ss(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||As(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function ws(t,e,n){var i=t.tag;if(5===i||6===i)t=t.stateNode,e?bt(n,t,e):dt(n,t);else if(4!==i&&null!==(t=t.child))for(ws(t,e,n),t=t.sibling;null!==t;)ws(t,e,n),t=t.sibling}function Ts(t,e,n){var i=t.tag;if(5===i||6===i)t=t.stateNode,e?mt(n,t,e):ct(n,t);else if(4!==i&&null!==(t=t.child))for(Ts(t,e,n),t=t.sibling;null!==t;)Ts(t,e,n),t=t.sibling}var Bs=null,Cs=!1;function ks(t,e,n){for(n=n.child;null!==n;)Ms(t,e,n),n=n.sibling}function Ms(t,e,n){if(Ve&&"function"==typeof Ve.onCommitFiberUnmount)try{Ve.onCommitFiberUnmount(Ge,n)}catch(t){}switch(n.tag){case 5:ds||gs(n,e);case 6:if(Y){var i=Bs,r=Cs;Bs=null,ks(t,e,n),Cs=r,null!==(Bs=i)&&(Cs?vt(Bs,n.stateNode):yt(Bs,n.stateNode))}else ks(t,e,n);break;case 18:Y&&null!==Bs&&(Cs?Qt(Bs,n.stateNode):qt(Bs,n.stateNode));break;case 4:Y?(i=Bs,r=Cs,Bs=n.stateNode.containerInfo,Cs=!0,ks(t,e,n),Bs=i,Cs=r):(K&&(i=n.stateNode.containerInfo,r=Ct(i),Pt(i,r)),ks(t,e,n));break;case 0:case 11:case 14:case 15:if(!ds&&null!==(i=n.updateQueue)&&null!==(i=i.lastEffect)){r=i=i.next;do{var s=r,a=s.destroy;s=s.tag,void 0!==a&&(0!=(2&s)||0!=(4&s))&&ms(n,e,a),r=r.next}while(r!==i)}ks(t,e,n);break;case 1:if(!ds&&(gs(n,e),"function"==typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(t){Qa(n,e,t)}ks(t,e,n);break;case 21:ks(t,e,n);break;case 22:1&n.mode?(ds=(i=ds)||null!==n.memoizedState,ks(t,e,n),ds=i):ks(t,e,n);break;default:ks(t,e,n)}}function Ps(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new fs),e.forEach((function(e){var i=eo.bind(null,t,e);n.has(e)||(n.add(e),e.then(i,i))}))}}function Es(t,e){var n=e.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var a=t,o=e;if(Y){var l=o;t:for(;null!==l;){switch(l.tag){case 5:Bs=l.stateNode,Cs=!1;break t;case 3:case 4:Bs=l.stateNode.containerInfo,Cs=!0;break t}l=l.return}if(null===Bs)throw Error(s(160));Ms(a,o,r),Bs=null,Cs=!1}else Ms(a,o,r);var u=r.alternate;null!==u&&(u.return=null),r.return=null}catch(t){Qa(r,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)Os(e,t),e=e.sibling}function Os(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Es(e,t),Ls(t),4&i){try{ys(3,t,t.return),vs(3,t)}catch(e){Qa(t,t.return,e)}try{ys(5,t,t.return)}catch(e){Qa(t,t.return,e)}}break;case 1:Es(e,t),Ls(t),512&i&&null!==n&&gs(n,n.return);break;case 5:if(Es(e,t),Ls(t),512&i&&null!==n&&gs(n,n.return),Y){if(32&t.flags){var r=t.stateNode;try{xt(r)}catch(e){Qa(t,t.return,e)}}if(4&i&&null!=(r=t.stateNode)){var a=t.memoizedProps;if(n=null!==n?n.memoizedProps:a,i=t.type,e=t.updateQueue,t.updateQueue=null,null!==e)try{gt(r,e,i,n,a,t)}catch(e){Qa(t,t.return,e)}}}break;case 6:if(Es(e,t),Ls(t),4&i&&Y){if(null===t.stateNode)throw Error(s(162));r=t.stateNode,a=t.memoizedProps,n=null!==n?n.memoizedProps:a;try{ft(r,n,a)}catch(e){Qa(t,t.return,e)}}break;case 3:if(Es(e,t),Ls(t),4&i){if(Y&&q&&null!==n&&n.memoizedState.isDehydrated)try{Yt(e.containerInfo)}catch(e){Qa(t,t.return,e)}if(K){r=e.containerInfo,a=e.pendingChildren;try{Pt(r,a)}catch(e){Qa(t,t.return,e)}}}break;case 4:if(Es(e,t),Ls(t),4&i&&K){r=(a=t.stateNode).containerInfo,a=a.pendingChildren;try{Pt(r,a)}catch(e){Qa(t,t.return,e)}}break;case 13:Es(e,t),Ls(t),8192&(r=t.child).flags&&(a=null!==r.memoizedState,r.stateNode.isHidden=a,!a||null!==r.alternate&&null!==r.alternate.memoizedState||(fa=We())),4&i&&Ps(t);break;case 22:var o=null!==n&&null!==n.memoizedState;if(1&t.mode?(ds=(n=ds)||o,Es(e,t),ds=n):Es(e,t),Ls(t),8192&i){if(n=null!==t.memoizedState,(t.stateNode.isHidden=n)&&!o&&0!=(1&t.mode))for(ps=t,i=t.child;null!==i;){for(e=ps=i;null!==ps;){var l=(o=ps).child;switch(o.tag){case 0:case 11:case 14:case 15:ys(4,o,o.return);break;case 1:gs(o,o.return);var u=o.stateNode;if("function"==typeof u.componentWillUnmount){var h=o,c=o.return;try{var d=h;u.props=d.memoizedProps,u.state=d.memoizedState,u.componentWillUnmount()}catch(t){Qa(h,c,t)}}break;case 5:gs(o,o.return);break;case 22:if(null!==o.memoizedState){Us(e);continue}}null!==l?(l.return=o,ps=l):Us(e)}i=i.sibling}if(Y)t:if(i=null,Y)for(e=t;;){if(5===e.tag){if(null===i){i=e;try{r=e.stateNode,n?_t(r):St(e.stateNode,e.memoizedProps)}catch(e){Qa(t,t.return,e)}}}else if(6===e.tag){if(null===i)try{a=e.stateNode,n?At(a):wt(a,e.memoizedProps)}catch(e){Qa(t,t.return,e)}}else if((22!==e.tag&&23!==e.tag||null===e.memoizedState||e===t)&&null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;null===e.sibling;){if(null===e.return||e.return===t)break t;i===e&&(i=null),e=e.return}i===e&&(i=null),e.sibling.return=e.return,e=e.sibling}}break;case 19:Es(e,t),Ls(t),4&i&&Ps(t);break;case 21:break;default:Es(e,t),Ls(t)}}function Ls(t){var e=t.flags;if(2&e){try{if(Y){t:{for(var n=t.return;null!==n;){if(As(n)){var i=n;break t}n=n.return}throw Error(s(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(xt(r),i.flags&=-33),Ts(t,Ss(t),r);break;case 3:case 4:var a=i.stateNode.containerInfo;ws(t,Ss(t),a);break;default:throw Error(s(161))}}}catch(e){Qa(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function Rs(t,e,n){ps=t,Is(t)}function Is(t,e,n){for(var i=0!=(1&t.mode);null!==ps;){var r=ps,s=r.child;if(22===r.tag&&i){var a=null!==r.memoizedState||cs;if(!a){var o=r.alternate,l=null!==o&&null!==o.memoizedState||ds;o=cs;var u=ds;if(cs=a,(ds=l)&&!u)for(ps=r;null!==ps;)l=(a=ps).child,22===a.tag&&null!==a.memoizedState?Ds(r):null!==l?(l.return=a,ps=l):Ds(r);for(;null!==s;)ps=s,Is(s),s=s.sibling;ps=r,cs=o,ds=u}Ns(t)}else 0!=(8772&r.subtreeFlags)&&null!==s?(s.return=r,ps=s):Ns(t)}}function Ns(t){for(;null!==ps;){var e=ps;if(0!=(8772&e.flags)){var n=e.alternate;try{if(0!=(8772&e.flags))switch(e.tag){case 0:case 11:case 15:ds||vs(5,e);break;case 1:var i=e.stateNode;if(4&e.flags&&!ds)if(null===n)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:mr(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var a=e.updateQueue;null!==a&&ri(e,a,i);break;case 3:var o=e.updateQueue;if(null!==o){if(n=null,null!==e.child)switch(e.child.tag){case 5:n=L(e.child.stateNode);break;case 1:n=e.child.stateNode}ri(e,o,n)}break;case 5:var l=e.stateNode;null===n&&4&e.flags&&pt(l,e.type,e.memoizedProps,e);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(q&&null===e.memoizedState){var u=e.alternate;if(null!==u){var h=u.memoizedState;if(null!==h){var c=h.dehydrated;null!==c&&Kt(c)}}}break;default:throw Error(s(163))}ds||512&e.flags&&xs(e)}catch(t){Qa(e,e.return,t)}}if(e===t){ps=null;break}if(null!==(n=e.sibling)){n.return=e.return,ps=n;break}ps=e.return}}function Us(t){for(;null!==ps;){var e=ps;if(e===t){ps=null;break}var n=e.sibling;if(null!==n){n.return=e.return,ps=n;break}ps=e.return}}function Ds(t){for(;null!==ps;){var e=ps;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{vs(4,e)}catch(t){Qa(e,n,t)}break;case 1:var i=e.stateNode;if("function"==typeof i.componentDidMount){var r=e.return;try{i.componentDidMount()}catch(t){Qa(e,r,t)}}var s=e.return;try{xs(e)}catch(t){Qa(e,s,t)}break;case 5:var a=e.return;try{xs(e)}catch(t){Qa(e,a,t)}}}catch(t){Qa(e,e.return,t)}if(e===t){ps=null;break}var o=e.sibling;if(null!==o){o.return=e.return,ps=o;break}ps=e.return}}var zs=0,Ws=1,Fs=2,js=3,Hs=4;if("function"==typeof Symbol&&Symbol.for){var $s=Symbol.for;zs=$s("selector.component"),Ws=$s("selector.has_pseudo_class"),Fs=$s("selector.role"),js=$s("selector.test_id"),Hs=$s("selector.text")}function Gs(t){var e=Q(t);if(null!=e){if("string"!=typeof e.memoizedProps["data-testname"])throw Error(s(364));return e}if(null===(t=rt(t)))throw Error(s(362));return t.stateNode.current}function Vs(t,e){switch(e.$$typeof){case zs:if(t.type===e.value)return!0;break;case Ws:t:{e=e.value,t=[t,0];for(var n=0;n<t.length;){var i=t[n++],r=t[n++],a=e[r];if(5!==i.tag||!ot(i)){for(;null!=a&&Vs(i,a);)a=e[++r];if(r===e.length){e=!0;break t}for(i=i.child;null!==i;)t.push(i,r),i=i.sibling}}e=!1}return e;case Fs:if(5===t.tag&<(t.stateNode,e.value))return!0;break;case Hs:if((5===t.tag||6===t.tag)&&null!==(t=at(t))&&0<=t.indexOf(e.value))return!0;break;case js:if(5===t.tag&&"string"==typeof(t=t.memoizedProps["data-testname"])&&t.toLowerCase()===e.value.toLowerCase())return!0;break;default:throw Error(s(365))}return!1}function Xs(t){switch(t.$$typeof){case zs:return"<"+(S(t.value)||"Unknown")+">";case Ws:return":has("+(Xs(t)||"")+")";case Fs:return'[role="'+t.value+'"]';case Hs:return'"'+t.value+'"';case js:return'[data-testname="'+t.value+'"]';default:throw Error(s(365))}}function Ys(t,e){var n=[];t=[t,0];for(var i=0;i<t.length;){var r=t[i++],s=t[i++],a=e[s];if(5!==r.tag||!ot(r)){for(;null!=a&&Vs(r,a);)a=e[++s];if(s===e.length)n.push(r);else for(r=r.child;null!==r;)t.push(r,s),r=r.sibling}}return n}function Ks(t,e){if(!it)throw Error(s(363));t=Ys(t=Gs(t),e),e=[],t=Array.from(t);for(var n=0;n<t.length;){var i=t[n++];if(5===i.tag)ot(i)||e.push(i.stateNode);else for(i=i.child;null!==i;)t.push(i),i=i.sibling}return e}var qs=Math.ceil,Qs=o.ReactCurrentDispatcher,Zs=o.ReactCurrentOwner,Js=o.ReactCurrentBatchConfig,ta=0,ea=null,na=null,ia=0,ra=0,sa=oe(0),aa=0,oa=null,la=0,ua=0,ha=0,ca=null,da=null,fa=0,pa=1/0,ga=null;function ma(){pa=We()+500}var ba,ya=!1,va=null,xa=null,_a=!1,Aa=null,Sa=0,wa=0,Ta=null,Ba=-1,Ca=0;function ka(){return 0!=(6&ta)?We():-1!==Ba?Ba:Ba=We()}function Ma(t){return 0==(1&t.mode)?1:0!=(2&ta)&&0!==ia?ia&-ia:null!==Cn.transition?(0===Ca&&(Ca=Pe()),Ca):0!==(t=Re)?t:J()}function Pa(t,e,n,i){if(50<wa)throw wa=0,Ta=null,Error(s(185));Oe(t,n,i),0!=(2&ta)&&t===ea||(t===ea&&(0==(2&ta)&&(ua|=n),4===aa&&Ia(t,ia)),Ea(t,i),1===n&&0===ta&&0==(1&e.mode)&&(ma(),Ke&&Ze()))}function Ea(t,e){var n=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var a=31-_e(s),o=1<<a,l=r[a];-1===l?0!=(o&n)&&0==(o&i)||(r[a]=ke(o,e)):l<=e&&(t.expiredLanes|=o),s&=~o}}(t,e);var i=Ce(t,t===ea?ia:0);if(0===i)null!==n&&Ue(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(null!=n&&Ue(n),1===e)0===t.tag?function(t){Ke=!0,Qe(t)}(Na.bind(null,t)):Qe(Na.bind(null,t)),et?nt((function(){0==(6&ta)&&Ze()})):Ne(Fe,Ze),n=null;else{switch(Ie(i)){case 1:n=Fe;break;case 4:n=je;break;case 16:default:n=He;break;case 536870912:n=$e}n=no(n,Oa.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Oa(t,e){if(Ba=-1,Ca=0,0!=(6&ta))throw Error(s(327));var n=t.callbackNode;if(Ka()&&t.callbackNode!==n)return null;var i=Ce(t,t===ea?ia:0);if(0===i)return null;if(0!=(30&i)||0!=(i&t.expiredLanes)||e)e=Ha(t,i);else{e=i;var r=ta;ta|=2;var a=Fa();for(ea===t&&ia===e||(ga=null,ma(),za(t,e));;)try{Ga();break}catch(e){Wa(t,e)}Wn(),Qs.current=a,ta=r,null!==na?e=0:(ea=null,ia=0,e=aa)}if(0!==e){if(2===e&&0!==(r=Me(t))&&(i=r,e=La(t,r)),1===e)throw n=oa,za(t,0),Ia(t,i),Ea(t,We()),n;if(6===e)Ia(t,i);else{if(r=t.current.alternate,0==(30&i)&&!function(t){for(var e=t;;){if(16384&e.flags){var n=e.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!Xe(s(),r))return!1}catch(t){return!1}}}if(n=e.child,16384&e.subtreeFlags&&null!==n)n.return=e,e=n;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(r)&&(2===(e=Ha(t,i))&&0!==(a=Me(t))&&(i=a,e=La(t,a)),1===e))throw n=oa,za(t,0),Ia(t,i),Ea(t,We()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(s(345));case 2:case 5:Ya(t,da,ga);break;case 3:if(Ia(t,i),(130023424&i)===i&&10<(e=fa+500-We())){if(0!==Ce(t,0))break;if(((r=t.suspendedLanes)&i)!==i){ka(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=$(Ya.bind(null,t,da,ga),e);break}Ya(t,da,ga);break;case 4:if(Ia(t,i),(4194240&i)===i)break;for(e=t.eventTimes,r=-1;0<i;){var o=31-_e(i);a=1<<o,(o=e[o])>r&&(r=o),i&=~a}if(i=r,10<(i=(120>(i=We()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*qs(i/1960))-i)){t.timeoutHandle=$(Ya.bind(null,t,da,ga),i);break}Ya(t,da,ga);break;default:throw Error(s(329))}}}return Ea(t,We()),t.callbackNode===n?Oa.bind(null,t):null}function La(t,e){var n=ca;return t.current.memoizedState.isDehydrated&&(za(t,e).flags|=256),2!==(t=Ha(t,e))&&(e=da,da=n,null!==e&&Ra(e)),t}function Ra(t){null===da?da=t:da.push.apply(da,t)}function Ia(t,e){for(e&=~ha,e&=~ua,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-_e(e),i=1<<n;t[n]=-1,e&=~i}}function Na(t){if(0!=(6&ta))throw Error(s(327));Ka();var e=Ce(t,0);if(0==(1&e))return Ea(t,We()),null;var n=Ha(t,e);if(0!==t.tag&&2===n){var i=Me(t);0!==i&&(e=i,n=La(t,i))}if(1===n)throw n=oa,za(t,0),Ia(t,e),Ea(t,We()),n;if(6===n)throw Error(s(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ya(t,da,ga),Ea(t,We()),null}function Ua(t){null!==Aa&&0===Aa.tag&&0==(6&ta)&&Ka();var e=ta;ta|=1;var n=Js.transition,i=Re;try{if(Js.transition=null,Re=1,t)return t()}finally{Re=i,Js.transition=n,0==(6&(ta=e))&&Ze()}}function Da(){ra=sa.current,le(sa)}function za(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==V&&(t.timeoutHandle=V,G(n)),null!==na)for(n=na.return;null!==n;){var i=n;switch(dn(i),i.tag){case 1:null!=(i=i.type.childContextTypes)&&me();break;case 3:ci(),le(de),le(ce),bi();break;case 5:fi(i);break;case 4:ci();break;case 13:case 19:le(pi);break;case 10:jn(i.type._context);break;case 22:case 23:Da()}n=n.return}if(ea=t,na=t=ao(t.current,null),ia=ra=e,aa=0,oa=null,ha=ua=la=0,da=ca=null,null!==Vn){for(e=0;e<Vn.length;e++)if(null!==(i=(n=Vn[e]).interleaved)){n.interleaved=null;var r=i.next,s=n.pending;if(null!==s){var a=s.next;s.next=r,i.next=a}n.pending=i}Vn=null}return t}function Wa(t,e){for(;;){var n=na;try{if(Wn(),yi.current=dr,wi){for(var i=_i.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}wi=!1}if(xi=0,Si=Ai=_i=null,Ti=!1,Bi=0,Zs.current=null,null===n||null===n.return){aa=1,oa=e,na=null;break}t:{var a=t,o=n.return,l=n,u=e;if(e=ia,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var h=u,c=l,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Mr(o);if(null!==p){p.flags&=-257,Pr(p,o,l,0,e),1&p.mode&&kr(a,h,e),u=h;var g=(e=p).updateQueue;if(null===g){var m=new Set;m.add(u),e.updateQueue=m}else g.add(u);break t}if(0==(1&e)){kr(a,h,e),ja();break t}u=Error(s(426))}else if(gn&&1&l.mode){var b=Mr(o);if(null!==b){0==(65536&b.flags)&&(b.flags|=256),Pr(b,o,l,0,e),Bn(Sr(u,l));break t}}a=u=Sr(u,l),4!==aa&&(aa=2),null===ca?ca=[a]:ca.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,e&=-e,a.lanes|=e,ni(a,Br(0,u,e));break t;case 1:l=u;var y=a.type,v=a.stateNode;if(0==(128&a.flags)&&("function"==typeof y.getDerivedStateFromError||null!==v&&"function"==typeof v.componentDidCatch&&(null===xa||!xa.has(v)))){a.flags|=65536,e&=-e,a.lanes|=e,ni(a,Cr(a,l,e));break t}}a=a.return}while(null!==a)}Xa(n)}catch(t){e=t,na===n&&null!==n&&(na=n=n.return);continue}break}}function Fa(){var t=Qs.current;return Qs.current=dr,null===t?dr:t}function ja(){0!==aa&&3!==aa&&2!==aa||(aa=4),null===ea||0==(268435455&la)&&0==(268435455&ua)||Ia(ea,ia)}function Ha(t,e){var n=ta;ta|=2;var i=Fa();for(ea===t&&ia===e||(ga=null,za(t,e));;)try{$a();break}catch(e){Wa(t,e)}if(Wn(),ta=n,Qs.current=i,null!==na)throw Error(s(261));return ea=null,ia=0,aa}function $a(){for(;null!==na;)Va(na)}function Ga(){for(;null!==na&&!De();)Va(na)}function Va(t){var e=ba(t.alternate,t,ra);t.memoizedProps=t.pendingProps,null===e?Xa(t):na=e,Zs.current=null}function Xa(t){var e=t;do{var n=e.alternate;if(t=e.return,0==(32768&e.flags)){if(null!==(n=us(n,e,ra)))return void(na=n)}else{if(null!==(n=hs(n,e)))return n.flags&=32767,void(na=n);if(null===t)return aa=6,void(na=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(e=e.sibling))return void(na=e);na=e=t}while(null!==e);0===aa&&(aa=5)}function Ya(t,e,n){var i=Re,r=Js.transition;try{Js.transition=null,Re=1,function(t,e,n,i){do{Ka()}while(null!==Aa);if(0!=(6&ta))throw Error(s(327));n=t.finishedWork;var r=t.finishedLanes;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(s(177));t.callbackNode=null,t.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(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 i=t.eventTimes;for(t=t.expirationTimes;0<n;){var r=31-_e(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}(t,a),t===ea&&(na=ea=null,ia=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||_a||(_a=!0,no(He,(function(){return Ka(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=Js.transition,Js.transition=null;var o=Re;Re=1;var l=ta;ta|=4,Zs.current=null,function(t,e){for(N(t.containerInfo),ps=e;null!==ps;)if(e=(t=ps).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,ps=e;else for(;null!==ps;){t=ps;try{var n=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var i=n.memoizedProps,r=n.memoizedState,a=t.stateNode,o=a.getSnapshotBeforeUpdate(t.elementType===t.type?i:mr(t.type,i),r);a.__reactInternalSnapshotBeforeUpdate=o}break;case 3:Y&&Tt(t.stateNode.containerInfo);break;default:throw Error(s(163))}}catch(e){Qa(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,ps=e;break}ps=t.return}n=bs,bs=!1}(t,n),Os(n,t),U(t.containerInfo),t.current=n,Rs(n),ze(),ta=l,Re=o,Js.transition=a}else t.current=n;if(_a&&(_a=!1,Aa=t,Sa=r),0===(a=t.pendingLanes)&&(xa=null),function(t){if(Ve&&"function"==typeof Ve.onCommitFiberRoot)try{Ve.onCommitFiberRoot(Ge,t,void 0,128==(128&t.current.flags))}catch(t){}}(n.stateNode),Ea(t,We()),null!==e)for(i=t.onRecoverableError,n=0;n<e.length;n++)i((r=e[n]).value,{componentStack:r.stack,digest:r.digest});if(ya)throw ya=!1,t=va,va=null,t;0!=(1&Sa)&&0!==t.tag&&Ka(),0!=(1&(a=t.pendingLanes))?t===Ta?wa++:(wa=0,Ta=t):wa=0,Ze()}(t,e,n,i)}finally{Js.transition=r,Re=i}return null}function Ka(){if(null!==Aa){var t=Ie(Sa),e=Js.transition,n=Re;try{if(Js.transition=null,Re=16>t?16:t,null===Aa)var i=!1;else{if(t=Aa,Aa=null,Sa=0,0!=(6&ta))throw Error(s(331));var r=ta;for(ta|=4,ps=t.current;null!==ps;){var a=ps,o=a.child;if(0!=(16&ps.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var h=l[u];for(ps=h;null!==ps;){var c=ps;switch(c.tag){case 0:case 11:case 15:ys(8,c,a)}var d=c.child;if(null!==d)d.return=c,ps=d;else for(;null!==ps;){var f=(c=ps).sibling,p=c.return;if(_s(c),c===h){ps=null;break}if(null!==f){f.return=p,ps=f;break}ps=p}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(null!==m)}}ps=a}}if(0!=(2064&a.subtreeFlags)&&null!==o)o.return=a,ps=o;else t:for(;null!==ps;){if(0!=(2048&(a=ps).flags))switch(a.tag){case 0:case 11:case 15:ys(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,ps=y;break t}ps=a.return}}var v=t.current;for(ps=v;null!==ps;){var x=(o=ps).child;if(0!=(2064&o.subtreeFlags)&&null!==x)x.return=o,ps=x;else t:for(o=v;null!==ps;){if(0!=(2048&(l=ps).flags))try{switch(l.tag){case 0:case 11:case 15:vs(9,l)}}catch(t){Qa(l,l.return,t)}if(l===o){ps=null;break t}var _=l.sibling;if(null!==_){_.return=l.return,ps=_;break t}ps=l.return}}if(ta=r,Ze(),Ve&&"function"==typeof Ve.onPostCommitFiberRoot)try{Ve.onPostCommitFiberRoot(Ge,t)}catch(t){}i=!0}return i}finally{Re=n,Js.transition=e}}return!1}function qa(t,e,n){t=ti(t,e=Br(0,e=Sr(n,e),1),1),e=ka(),null!==t&&(Oe(t,1,e),Ea(t,e))}function Qa(t,e,n){if(3===t.tag)qa(t,t,n);else for(;null!==e;){if(3===e.tag){qa(e,t,n);break}if(1===e.tag){var i=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===xa||!xa.has(i))){e=ti(e,t=Cr(e,t=Sr(n,t),1),1),t=ka(),null!==e&&(Oe(e,1,t),Ea(e,t));break}}e=e.return}}function Za(t,e,n){var i=t.pingCache;null!==i&&i.delete(e),e=ka(),t.pingedLanes|=t.suspendedLanes&n,ea===t&&(ia&n)===n&&(4===aa||3===aa&&(130023424&ia)===ia&&500>We()-fa?za(t,0):ha|=n),Ea(t,e)}function Ja(t,e){0===e&&(0==(1&t.mode)?e=1:(e=Te,0==(130023424&(Te<<=1))&&(Te=4194304)));var n=ka();null!==(t=Kn(t,e))&&(Oe(t,e,n),Ea(t,n))}function to(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),Ja(t,n)}function eo(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(s(314))}null!==i&&i.delete(e),Ja(t,n)}function no(t,e){return Ne(t,e)}function io(t,e,n,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ro(t,e,n,i){return new io(t,e,n,i)}function so(t){return!(!(t=t.prototype)||!t.isReactComponent)}function ao(t,e){var n=t.alternate;return null===n?((n=ro(t.tag,e,t.key,t.mode)).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=14680064&t.flags,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=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function oo(t,e,n,i,r,a){var o=2;if(i=t,"function"==typeof t)so(t)&&(o=1);else if("string"==typeof t)o=5;else t:switch(t){case h:return lo(n.children,r,a,e);case c:o=8,r|=8;break;case d:return(t=ro(12,n,e,2|r)).elementType=d,t.lanes=a,t;case m:return(t=ro(13,n,e,r)).elementType=m,t.lanes=a,t;case b:return(t=ro(19,n,e,r)).elementType=b,t.lanes=a,t;case x:return uo(n,r,a,e);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case f:o=10;break t;case p:o=9;break t;case g:o=11;break t;case y:o=14;break t;case v:o=16,i=null;break t}throw Error(s(130,null==t?t:typeof t,""))}return(e=ro(o,n,e,r)).elementType=t,e.type=i,e.lanes=a,e}function lo(t,e,n,i){return(t=ro(7,t,i,e)).lanes=n,t}function uo(t,e,n,i){return(t=ro(22,t,i,e)).elementType=x,t.lanes=n,t.stateNode={isHidden:!1},t}function ho(t,e,n){return(t=ro(6,t,null,e)).lanes=n,t}function co(t,e,n){return(e=ro(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function fo(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=V,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ee(0),this.expirationTimes=Ee(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ee(0),this.identifierPrefix=i,this.onRecoverableError=r,q&&(this.mutableSourceEagerHydrationData=null)}function po(t,e,n,i,r,s,a,o,l){return t=new fo(t,e,n,o,l),1===e?(e=1,!0===s&&(e|=8)):e=0,s=ro(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qn(s),t}function go(t){if(!t)return he;t:{if(T(t=t._reactInternals)!==t||1!==t.tag)throw Error(s(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(ge(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(s(171))}if(1===t.tag){var n=t.type;if(ge(n))return ye(t,n,e)}return e}function mo(t){var e=t._reactInternals;if(void 0===e){if("function"==typeof t.render)throw Error(s(188));throw t=Object.keys(t).join(","),Error(s(268,t))}return null===(t=k(e))?null:t.stateNode}function bo(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function yo(t,e){bo(t,e),(t=t.alternate)&&bo(t,e)}function vo(t){return null===(t=k(t))?null:t.stateNode}function xo(){return null}return ba=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||de.current)Or=!0;else{if(0==(t.lanes&n)&&0==(128&e.flags))return Or=!1,function(t,e,n){switch(e.tag){case 3:jr(e),Tn();break;case 5:di(e);break;case 1:ge(e.type)&&ve(e);break;case 4:hi(e,e.stateNode.containerInfo);break;case 10:Fn(0,e.type._context,e.memoizedProps.value);break;case 13:var i=e.memoizedState;if(null!==i)return null!==i.dehydrated?(ue(pi,1&pi.current),e.flags|=128,null):0!=(n&e.child.childLanes)?qr(t,e,n):(ue(pi,1&pi.current),null!==(t=is(t,e,n))?t.sibling:null);ue(pi,1&pi.current);break;case 19:if(i=0!=(n&e.childLanes),0!=(128&t.flags)){if(i)return es(t,e,n);e.flags|=128}var r=e.memoizedState;if(null!==r&&(r.rendering=null,r.tail=null,r.lastEffect=null),ue(pi,pi.current),i)break;return null;case 22:case 23:return e.lanes=0,Ur(t,e,n)}return is(t,e,n)}(t,e,n);Or=0!=(131072&t.flags)}else Or=!1,gn&&0!=(1048576&e.flags)&&hn(e,nn,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;ns(t,e),t=e.pendingProps;var r=pe(e,ce.current);$n(e,n),r=Pi(null,e,i,t,r,n);var a=Ei();return e.flags|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ge(i)?(a=!0,ve(e)):a=!1,e.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,Qn(e),r.updater=yr,e.stateNode=r,r._reactInternals=e,Ar(e,i,t,n),e=Fr(null,e,i,!0,a,n)):(e.tag=0,gn&&a&&cn(e),Lr(null,e,r,n),e=e.child),e;case 16:i=e.elementType;t:{switch(ns(t,e),t=e.pendingProps,i=(r=i._init)(i._payload),e.type=i,r=e.tag=function(t){if("function"==typeof t)return so(t)?1:0;if(null!=t){if((t=t.$$typeof)===g)return 11;if(t===y)return 14}return 2}(i),t=mr(i,t),r){case 0:e=zr(null,e,i,t,n);break t;case 1:e=Wr(null,e,i,t,n);break t;case 11:e=Rr(null,e,i,t,n);break t;case 14:e=Ir(null,e,i,mr(i.type,t),n);break t}throw Error(s(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,zr(t,e,i,r=e.elementType===i?r:mr(i,r),n);case 1:return i=e.type,r=e.pendingProps,Wr(t,e,i,r=e.elementType===i?r:mr(i,r),n);case 3:t:{if(jr(e),null===t)throw Error(s(387));i=e.pendingProps,r=(a=e.memoizedState).element,Zn(t,e),ii(e,i,null,n);var o=e.memoizedState;if(i=o.element,q&&a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,256&e.flags){e=Hr(t,e,i,n,r=Sr(Error(s(423)),e));break t}if(i!==r){e=Hr(t,e,i,n,r=Sr(Error(s(424)),e));break t}for(q&&(pn=jt(e.stateNode.containerInfo),fn=e,gn=!0,bn=null,mn=!1),n=In(e,null,i,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Tn(),i===r){e=is(t,e,n);break t}Lr(t,e,i,n)}e=e.child}return e;case 5:return di(e),null===t&&_n(e),i=e.type,r=e.pendingProps,a=null!==t?t.memoizedProps:null,o=r.children,j(i,r)?o=null:null!==a&&j(i,a)&&(e.flags|=32),Dr(t,e),Lr(t,e,o,n),e.child;case 6:return null===t&&_n(e),null;case 13:return qr(t,e,n);case 4:return hi(e,e.stateNode.containerInfo),i=e.pendingProps,null===t?e.child=Rn(e,null,i,n):Lr(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,Rr(t,e,i,r=e.elementType===i?r:mr(i,r),n);case 7:return Lr(t,e,e.pendingProps,n),e.child;case 8:case 12:return Lr(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(i=e.type._context,r=e.pendingProps,a=e.memoizedProps,Fn(0,i,o=r.value),null!==a)if(Xe(a.value,o)){if(a.children===r.children&&!de.current){e=is(t,e,n);break t}}else for(null!==(a=e.child)&&(a.return=e);null!==a;){var l=a.dependencies;if(null!==l){o=a.child;for(var u=l.firstContext;null!==u;){if(u.context===i){if(1===a.tag){(u=Jn(-1,n&-n)).tag=2;var h=a.updateQueue;if(null!==h){var c=(h=h.shared).pending;null===c?u.next=u:(u.next=c.next,c.next=u),h.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Hn(a.return,n,e),l.lanes|=n;break}u=u.next}}else if(10===a.tag)o=a.type===e.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(s(341));o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Hn(o,n,e),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===e){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}Lr(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,$n(e,n),i=i(r=Gn(r)),e.flags|=1,Lr(t,e,i,n),e.child;case 14:return r=mr(i=e.type,e.pendingProps),Ir(t,e,i,r=mr(i.type,r),n);case 15:return Nr(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:mr(i,r),ns(t,e),e.tag=1,ge(i)?(t=!0,ve(e)):t=!1,$n(e,n),xr(e,i,r),Ar(e,i,r,n),Fr(null,e,i,!0,t,n);case 19:return es(t,e,n);case 22:return Ur(t,e,n)}throw Error(s(156,e.tag))},e.attemptContinuousHydration=function(t){if(13===t.tag){var e=Kn(t,134217728);null!==e&&Pa(e,t,134217728,ka()),yo(t,134217728)}},e.attemptDiscreteHydration=function(t){if(13===t.tag){var e=Kn(t,1);null!==e&&Pa(e,t,1,ka()),yo(t,1)}},e.attemptHydrationAtCurrentPriority=function(t){if(13===t.tag){var e=Ma(t),n=Kn(t,e);null!==n&&Pa(n,t,e,ka()),yo(t,e)}},e.attemptSynchronousHydration=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Be(e.pendingLanes);0!==n&&(Le(e,1|n),Ea(e,We()),0==(6&ta)&&(ma(),Ze()))}break;case 13:Ua((function(){var e=Kn(t,1);if(null!==e){var n=ka();Pa(e,t,1,n)}})),yo(t,1)}},e.batchedUpdates=function(t,e){var n=ta;ta|=1;try{return t(e)}finally{0===(ta=n)&&(ma(),Ke&&Ze())}},e.createComponentSelector=function(t){return{$$typeof:zs,value:t}},e.createContainer=function(t,e,n,i,r,s,a){return po(t,e,!1,null,0,i,0,s,a)},e.createHasPseudoClassSelector=function(t){return{$$typeof:Ws,value:t}},e.createHydrationContainer=function(t,e,n,i,r,s,a,o,l){return(t=po(n,i,!0,t,0,s,0,o,l)).context=go(null),n=t.current,(s=Jn(i=ka(),r=Ma(n))).callback=null!=e?e:null,ti(n,s,r),t.current.lanes=r,Oe(t,r,i),Ea(t,i),t},e.createPortal=function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:u,key:null==i?null:""+i,children:t,containerInfo:e,implementation:n}},e.createRoleSelector=function(t){return{$$typeof:Fs,value:t}},e.createTestNameSelector=function(t){return{$$typeof:js,value:t}},e.createTextSelector=function(t){return{$$typeof:Hs,value:t}},e.deferredUpdates=function(t){var e=Re,n=Js.transition;try{return Js.transition=null,Re=16,t()}finally{Re=e,Js.transition=n}},e.discreteUpdates=function(t,e,n,i,r){var s=Re,a=Js.transition;try{return Js.transition=null,Re=1,t(e,n,i,r)}finally{Re=s,Js.transition=a,0===ta&&ma()}},e.findAllNodes=Ks,e.findBoundingRects=function(t,e){if(!it)throw Error(s(363));e=Ks(t,e),t=[];for(var n=0;n<e.length;n++)t.push(st(e[n]));for(e=t.length-1;0<e;e--)for(var i=(n=t[e]).x,r=i+n.width,a=n.y,o=a+n.height,l=e-1;0<=l;l--)if(e!==l){var u=t[l],h=u.x,c=h+u.width,d=u.y,f=d+u.height;if(i>=h&&a>=d&&r<=c&&o<=f){t.splice(e,1);break}if(!(i!==h||n.width!==u.width||f<a||d>o)){d>a&&(u.height+=d-a,u.y=a),f<o&&(u.height=o-d),t.splice(e,1);break}if(!(a!==d||n.height!==u.height||c<i||h>r)){h>i&&(u.width+=h-i,u.x=i),c<r&&(u.width=r-h),t.splice(e,1);break}}return t},e.findHostInstance=mo,e.findHostInstanceWithNoPortals=function(t){return null===(t=null!==(t=C(t))?P(t):null)?null:t.stateNode},e.findHostInstanceWithWarning=function(t){return mo(t)},e.flushControlled=function(t){var e=ta;ta|=1;var n=Js.transition,i=Re;try{Js.transition=null,Re=1,t()}finally{Re=i,Js.transition=n,0===(ta=e)&&(ma(),Ze())}},e.flushPassiveEffects=Ka,e.flushSync=Ua,e.focusWithin=function(t,e){if(!it)throw Error(s(363));for(e=Ys(t=Gs(t),e),e=Array.from(e),t=0;t<e.length;){var n=e[t++];if(!ot(n)){if(5===n.tag&&ut(n.stateNode))return!0;for(n=n.child;null!==n;)e.push(n),n=n.sibling}}return!1},e.getCurrentUpdatePriority=function(){return Re},e.getFindAllNodesFailureDescription=function(t,e){if(!it)throw Error(s(363));var n=0,i=[];t=[Gs(t),0];for(var r=0;r<t.length;){var a=t[r++],o=t[r++],l=e[o];if((5!==a.tag||!ot(a))&&(Vs(a,l)&&(i.push(Xs(l)),++o>n&&(n=o)),o<e.length))for(a=a.child;null!==a;)t.push(a,o),a=a.sibling}if(n<e.length){for(t=[];n<e.length;n++)t.push(Xs(e[n]));return"findAllNodes was able to match part of the selector:\n "+i.join(" > ")+"\n\nNo matching component was found for:\n "+t.join(" > ")}return null},e.getPublicRootInstance=function(t){return(t=t.current).child?5===t.child.tag?L(t.child.stateNode):t.child.stateNode:null},e.injectIntoDevTools=function(t){if(t={bundleType:t.bundleType,version:t.version,rendererPackageName:t.rendererPackageName,rendererConfig:t.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:vo,findFiberByHostInstance:t.findFiberByHostInstance||xo,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)t=!1;else{var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)t=!0;else{try{Ge=e.inject(t),Ve=e}catch(t){}t=!!e.checkDCE}}return t},e.isAlreadyRendering=function(){return!1},e.observeVisibleRects=function(t,e,n,i){if(!it)throw Error(s(363));t=Ks(t,e);var r=ht(t,n,i).disconnect;return{disconnect:function(){r()}}},e.registerMutableSourceForHydration=function(t,e){var n=e._getVersion;n=n(e._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[e,n]:t.mutableSourceEagerHydrationData.push(e,n)},e.runWithPriority=function(t,e){var n=Re;try{return Re=t,e()}finally{Re=n}},e.shouldError=function(){return null},e.shouldSuspend=function(){return!1},e.updateContainer=function(t,e,n,i){var r=e.current,s=ka(),a=Ma(r);return n=go(n),null===e.context?e.context=n:e.pendingContext=n,(e=Jn(s,a)).payload={element:t},null!==(i=void 0===i?null:i)&&(e.callback=i),null!==(t=ti(r,e,a))&&(Pa(t,r,a,s),ei(t,r,a)),a},e}),rh);var hh,ch=n(ah.exports),dh={exports:{}},fh={};dh.exports=(hh||(hh=1,fh.ConcurrentRoot=1,fh.ContinuousEventPriority=4,fh.DefaultEventPriority=16,fh.DiscreteEventPriority=1,fh.IdleEventPriority=536870912,fh.LegacyRoot=0),fh);var ph=dh.exports;const gh=ch({supportsMutation:!0,supportsPersistence:!1,createInstance:(t,e,n)=>{const i=function(t,e){const n=function(t,e){if("tag"===t)return new Fu(e.attribute?e.attribute:e);if("radio"===t)return new Hu(e.attribute?e.attribute:e);if("checkbox"===t)return new ju(e.attribute?e.attribute:e)}(t,e);if(n)return n;if(!ti.graphicService.creator[t])return;const i=ti.graphicService.creator[t](e.attribute);return i}(t,e);if(i)return function(t,e){for(const n in e)mh(n,e)&&gl[n]&&t.addEventListener(gl[n],e[n])}(i,e),i},createTextInstance:(t,e)=>{},appendInitialChild:(t,e)=>{t.add(e)},finalizeInitialChildren:()=>!1,prepareUpdate:()=>!0,shouldSetTextContent:()=>!1,getRootHostContext:()=>null,getChildHostContext:()=>null,getPublicInstance:t=>t,prepareForCommit:()=>null,resetAfterCommit:()=>{},preparePortalMount:()=>null,scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,isPrimaryRenderer:!1,getCurrentEventPriority:()=>ph.DefaultEventPriority,getInstanceFromNode:t=>null,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},prepareScopeUpdate:()=>{},getInstanceFromScope:()=>{},detachDeletedInstance:()=>{},supportsHydration:!1,appendChild:(t,e)=>{t.add(e)},appendChildToContainer:(t,e)=>{t.add(e)},insertBefore:(t,e,n)=>{t.insertBefore(e,n)},insertInContainerBefore:(t,e,n)=>{t.insertBefore(e,n)},removeChild:(t,e)=>{e.delete()},removeChildFromContainer:(t,e)=>{e.delete()},commitUpdate:(t,e,n,i,r)=>{!function(t,e,n){for(const i in n)mh(i,n)&&n[i]!==e[i]&&t.removeEventListener(gl[i],n[i]);for(const i in e)mh(i,e)&&n[i]!==e[i]&&t.addEventListener(gl[i],e[i]);const i=e.attribute??N({},e);t.initAttributes(i),"image"===t.type&&t.loadImage(i.image)}(t,r,i)},hideInstance:t=>{t.setAttribute("visible",!1)},unhideInstance:(t,e)=>{t.setAttribute("visible",!0)},clearContainer:t=>{t.removeAllChild()},commitTextUpdate:(t,e,n)=>{}});function mh(t,e){return t.startsWith("on")&&f(e[t])}gh.injectIntoDevTools({bundleType:0,version:o.version,rendererPackageName:"react-vtable"});const bh=(t,e)=>{const{componentId:n,children:i}=t;if(!a.isValidElement(i))return null;const r=a.useContext(l),{table:s}=r,o="header-custom-layout"===i.props.role,u=a.useRef(new Map),h=a.useCallback((t=>{const e=`${t.col}-${t.row}`;let n;if(u.current.has(e)){const r=u.current.get(e);yh(i,r,t),n=r.containerInfo}else{n=new Nr({});const r=gh.createContainer(n,ph.LegacyRoot,null,null,null,"custom",null,null);u.current.set(e,r),yh(i,r,t)}return{rootContainer:n,renderDefault:!!i.props.renderDefault}}),[i]),c=a.useCallback(((t,e)=>{const n=`${t}-${e}`;if(u.current.has(n)){const t=u.current.get(n);gh.updateContainer(null,t,null),u.current.delete(n)}}),[]),d=a.useCallback((()=>{u.current.forEach(((t,e)=>{const n=t;gh.updateContainer(null,n,null)})),u.current.clear()}),[]);return a.useLayoutEffect((()=>(console.log("init",t,s),()=>{console.log("release",t,s)})),[]),a.useLayoutEffect((()=>{console.log("update props",t,s),s?.checkReactCustomLayout(d),s&&!s.reactCustomLayout?.hasReactCreateGraphic(n,o)?(s.reactCustomLayout?.setReactCreateGraphic(n,h,o),s.reactCustomLayout?.setReactRemoveGraphic(n,c,o),s.reactCustomLayout?.updateCustomCell(n,o)):s&&u.current.forEach(((t,e)=>{const[n,r]=e.split("-").map(Number),{width:a,height:o}=function(t,e,n){const i=n.getCellRange(t,e),r=n.getCellsRect(i.start.col,i.start.row,i.end.col,i.end.row);return r}(n,r,s),l=t,u={col:n,row:r,dataValue:s.getCellOriginValue(n,r),value:s.getCellValue(n,r)||"",rect:{left:0,top:0,right:a,bottom:o,width:a,height:o},table:s};l.containerInfo,yh(i,l,u),s.scenegraph.updateNextFrame()}))})),null};function yh(t,e,n){gh.updateContainer(o.cloneElement(t,{...n}),e,null)}const vh=(t,e,n,i)=>{const r=["id","updateId","componentIndex","children"],s=n?Object.keys(n).concat(r):r,u=t=>{const e=a.useContext(l),i=o.useRef(null),r=o.useRef(t.updateId);if(t.updateId!==r.current){r.current=t.updateId;!!n&&Dt(e.table,t,i.current,n)&&(i.current=t)}return a.useEffect((()=>()=>{n&&Dt(e.table,null,i.current,n)}),[]),_h(t.children,t.componentId)};return u.displayName=t,u.parseOption=t=>{const n=U(t,s);if(t.children){const{children:e}=t;o.Children.map(e,((e,i)=>{xh(e,t,n,s,t.componentId+"-"+i)}))}return{option:n,optionName:e,isSingle:i}},u};function xh(t,e,n,i,r){if("custom-layout"===t.props.role&&(n.customLayout="react-custom-layout",n.customLayoutComponentId=r),"header-custom-layout"===t.props.role&&(n.headerCustomLayout="react-custom-layout",n.headerCustomLayoutComponentId=r),"ListColumn"===t.type.displayName){n.columns||(n.columns=[]);const s=U(t.props,i);n.columns.push(s),s.componentId=r,t.props.children&&o.Children.map(t.props.children,((t,n)=>{xh(t,e,s,i,r+"-"+n)}))}}function _h(t,e){return(n=t)&&n.$$typeof===Symbol.for("react.element")||Array.isArray(t)?o.Children.map(t,((t,n)=>t.props.children?_h(t.props.children,e+"-"+n):"custom-layout"===t.props.role||"header-custom-layout"===t.props.role?o.createElement(bh,{componentId:e},t):null)):null;var n}const Ah=vh("ListColumn","columns"),Sh=vh("PivotColumnDimension","columns"),wh=vh("PivotRowDimension","rows"),Th=vh("PivotIndicator","indicators"),Bh=vh("PivotColumnHeaderTitle","columnHeaderTitle",void 0,!0),Ch=vh("PivotRowHeaderTitle","rowHeaderTitle",void 0,!0),kh=vh("PivotCorner","corner",void 0,!0),Mh=vh("Menu","menu",void 0,!0),Ph=vh("Tooltip","tooltip",void 0,!0),Eh=vh("EmptyTip","emptyTip",void 0,!0),Oh=vh("Title","title",void 0,!0);function Lh(t,e){return A(t)?t:"string"==typeof t&&t.endsWith("%")?Number(t.slice(0,-1))/100*e:0}const Rh="group",Ih="text",Nh="tag",Uh={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"#FFF"},panelStyle:{visible:!0,fill:"rgb(22, 93, 255)",lineWidth:1,cornerRadius:2},padding:10,state:{panelStyle:{hover:{fill:"rgb(64, 128, 255)"},disabled:{fill:"rgb(148, 191, 255)"}}}};const Dh=o.forwardRef((function(t,e){const n=N({},Uh,t),{disabled:i,onClick:r}=n;let s=o.useRef(null);s=e||s;const l=o.useCallback((t=>{i?"function"==typeof t?.preventDefault&&t.preventDefault():r&&r(t)}),[i,r]),u=function(t){const{textStyle:e,padding:n,panelStyle:i,minWidth:r,maxWidth:s,visible:a,cursor:o,disabled:l,state:u,children:h}=t,c={text:h,textStyle:e,padding:n,panel:i,minWidth:r,maxWidth:s,visible:a,cursor:o??l?"not-allowed":"pointer",childrenPickable:!1,state:{text:{hover:u?.textStyle?.hover,disabled:u?.textStyle?.disabled},panel:{hover:u?.panelStyle?.hover,disabled:u?.panelStyle?.disabled}}};return c}(n);return a.useEffect((()=>{s.current.addEventListener("mouseenter",(()=>{i||(s.current.addState("hover",!0,!1),s.current.stage.renderNextFrame())})),s.current.addEventListener("mouseleave",(()=>{i||(s.current.removeState("hover",!1),s.current.stage.renderNextFrame())}))})),a.useEffect((()=>{i?(s.current.removeState("disabled",!1),s.current.addState("disabled",!0,!1)):s.current.removeState("disabled",!1),s.current.stage.renderNextFrame()})),o.createElement(Nh,{ref:s,attribute:u,onClick:l})}));Dh.displayName="Button";const zh={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"rgb(64, 128, 255)"},panelStyle:{visible:!0,opacity:0,fill:"rgba(242, 243, 245, 0.5)",lineWidth:1,cornerRadius:2},padding:4,space:6,state:{textStyle:{disabled:{fill:"rgb(148, 191, 255)"}},panelStyle:{hover:{opacity:1}}}};const Wh=o.forwardRef((function(t,e){const n=N({},zh,t),{disabled:i,href:r,onClick:s}=n;let l=o.useRef(null);l=e||l;const u=o.useCallback((t=>{i?"function"==typeof t?.preventDefault&&t.preventDefault():(s&&s(t),r&&window.open(r))}),[i,r,s]),h=function(t){const{textStyle:e,padding:n,space:i,panelStyle:r,minWidth:s,maxWidth:a,visible:o,cursor:l,disabled:u,icon:h,state:c,children:d}=t,f={text:d,textStyle:e,padding:n,panel:r,minWidth:s,maxWidth:a,visible:o,cursor:l??u?"not-allowed":"pointer",childrenPickable:!1,state:{text:{hover:c?.textStyle?.hover,disabled:c?.textStyle?.disabled},panel:{hover:c?.panelStyle?.hover,disabled:c?.panelStyle?.disabled}},space:i,shape:{visible:!!h,fill:!1,stroke:e.fill,symbolType:"M -0.2927 -15.4348 L -15.142 -0.5855 C -18.6567 2.9292 -18.6567 8.6277 -15.142 12.1424 V 12.1424 C -11.6273 15.6571 -5.9288 15.6571 -2.4141 12.1424 L 15.2636 -5.5353 C 17.6067 -7.8784 17.6067 -11.6774 15.2636 -14.0206 V -14.0206 C 12.9205 -16.3637 9.1215 -16.3637 6.7783 -14.0206 L -10.8993 3.6571 C -12.0709 4.8287 -12.0709 6.7282 -10.8993 7.8997 V 7.8997 C -9.7278 9.0713 -7.8283 9.0713 -6.6567 7.8997 L 8.1925 -6.9495"}};return f}(n);return a.useEffect((()=>{l.current.addEventListener("mouseenter",(()=>{i||(l.current.addState("hover",!0,!1),l.current.stage.renderNextFrame())})),l.current.addEventListener("mouseleave",(()=>{i||(l.current.removeState("hover",!1),l.current.stage.renderNextFrame())}))}),[]),a.useEffect((()=>{i?(l.current.removeState("disabled",!1),l.current.addState("disabled",!0,!1)):l.current.removeState("disabled",!1),l.current.stage.renderNextFrame()})),o.createElement(Nh,{ref:l,attribute:h,onClick:u})}));Wh.displayName="Link";const Fh={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"#FFF"},panelStyle:{visible:!0,fill:"rgb(201, 205, 212)",lineWidth:1,cornerRadius:2},size:40,shape:"circle",autoFixFontSize:!0};const jh=o.forwardRef((function(t,e){const n=N({},Fh,t),{size:i,children:r,onClick:s}=n;let a=o.useRef(null);a=e||a;const l=o.useCallback((t=>{s&&s(t)}),[s]),u=function(t){const{panelStyle:e,size:n,shape:i}=t,r={...e,width:n,height:n,clip:!0,cornerRadius:"circle"===i?n/2:e.cornerRadius??2,display:"flex",alignItems:"center",justifyContent:"center",visibleAll:!0,path:void 0};return r}(n);if(v(r)){const t=function(t){const{textStyle:e,size:n,children:i,autoFixFontSize:r}=t,s={text:i,...e};r&&function(t,e){const n=Du(e.text,e).width,i=t/(n+8),r=Math.max(Math.floor(e.fontSize*i),6);e.fontSize=r}(n,s);return s}(n);return o.createElement(Rh,{ref:a,attribute:u,onClick:l},o.createElement(Ih,{attribute:t}))}return"image"===r.type&&(r.props.attribute.width=i,r.props.attribute.height=i),o.createElement(Rh,{ref:a,attribute:u,onClick:l},r)}));jh.displayName="Avatar";const Hh={defaultPopupVisible:!1,position:"top"},$h={backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 4px 10px rgba(0, 0, 0, .1)",fontSize:"14px",borderRadius:"4px",lineHeight:"1.5715",boxSizing:"border-box",color:"rgb(78, 89, 105)",border:"1px solid rgb(229, 230, 235)",padding:"12px 16px"},Gh=t=>{const e={content:"",height:"8px",width:"8px",position:"absolute",display:"block",boxSizing:"border-box",transform:"rotate(45deg)",transformOrigin:"50% 50% 0",backgroundColor:"rgb(255, 255, 255)",border:"1px solid rgb(229, 230, 235)",...Vh(t.position)};return t.visible?o.createElement(o.Fragment,null,o.createElement("div",{style:$h},t.content),o.createElement("div",{style:e})):o.createElement(o.Fragment,null)};function Vh(t){switch(t){case"top":return{top:"calc(100% - 5px)",left:"calc(50% - 5px)",borderTop:"none",borderLeft:"none"};case"tl":return{top:"calc(100% - 4px)",left:"14px",borderTop:"none",borderLeft:"none"};case"tr":return{top:"calc(100% - 4px)",left:"calc(100% - 24px)",borderTop:"none",borderLeft:"none"};case"bottom":return{top:"-4px",left:"calc(50% - 4px)",borderRight:"none",borderBottom:"none"};case"bl":return{top:"-4px",left:"14px",borderRight:"none",borderBottom:"none"};case"br":return{top:"-4px",left:"calc(100% - 24px)",borderRight:"none",borderBottom:"none"};case"left":return{top:"calc(50% - 4px)",left:"calc(100% - 5px)",borderLeft:"none",borderBottom:"none"};case"lt":return{top:"14px",left:"calc(100% - 5px)",borderLeft:"none",borderBottom:"none"};case"lb":return{top:"calc(100% - 24px)",left:"calc(100% - 5px)",borderLeft:"none",borderBottom:"none"};case"right":return{top:"calc(50% - 4px)",left:"-4px",borderRight:"none",borderTop:"none"};case"rt":return{top:"14px",left:"-4px",borderRight:"none",borderTop:"none"};case"rb":return{top:"calc(100% - 24px)",left:"-4px",borderRight:"none",borderTop:"none"}}}const Xh=o.forwardRef((function(t,e){const n=N({},Hh,t),{content:i,position:r,popupVisible:s,defaultPopupVisible:l,children:u}=n;let h=o.useRef(null);h=e||h;const[c,d]=a.useState(!1);a.useEffect((()=>{d(!!s),h.current.stage.renderNextFrame()}),[s]),a.useEffect((()=>{d(s??l??!1)}),[]);const{transform:f,anchorType:p}=function(t){switch(t){case"top":return{anchorType:"top",transform:"translate(-50%, calc(-100% - 10px))"};case"tl":return{anchorType:"top-left",transform:"translate(0, calc(-100% - 10px))"};case"tr":return{anchorType:"top-right",transform:"translate(-100%, calc(-100% - 10px))"};case"bottom":return{anchorType:"bottom",transform:"translate(-50%, 10px)"};case"bl":return{anchorType:"bottom-left",transform:"translate(0, 10px)"};case"br":return{anchorType:"bottom-right",transform:"translate(-100%, 10px)"};case"left":return{anchorType:"left",transform:"translate(calc(-100% - 10px), -50%)"};case"lt":return{anchorType:"top-left",transform:"translate(calc(-100% - 10px), 0)"};case"lb":return{anchorType:"bottom-left",transform:"translate(calc(-100% - 10px), -100%)"};case"right":return{anchorType:"right",transform:"translate(10px, -50%)"};case"rt":return{anchorType:"top-right",transform:"translate(10px, 0)"};case"rb":return{anchorType:"bottom-right",transform:"translate(10px, -100%)"}}}(r),m={react:{style:{transform:f},element:o.createElement(Gh,{visible:c,content:i,position:r}),container:null,visible:!0,pointerEvents:!1,anchorType:p}},b=a.useCallback((t=>{g(s)||(d(!0),t.currentTarget.stage.renderNextFrame())}),[]),y=a.useCallback((t=>{g(s)||(d(!1),t.currentTarget.stage.renderNextFrame())}),[]);return o.createElement(Rh,{ref:h,attribute:m,onMouseEnter:b,onMouseLeave:y},u)}));Xh.displayName="Popover";const Yh={textStyle:{fontSize:14,fontFamily:"sans-serif",fill:"rgb(51, 101, 238)"},panelStyle:{visible:!0,fill:"#e6fffb",lineWidth:1,cornerRadius:4}};const Kh=o.forwardRef((function(t,e){const n=N({},Yh,t),{attribute:i,panelStyle:r,children:s,...a}=n;let l=o.useRef(null);return l=e||l,o.createElement(Nh,{ref:l,attribute:i??{text:s,panel:r,...a}})}));Kh.displayName="Tag";const qh={};const Qh=o.forwardRef((function(t,e){const n=N({},qh,t),{textStyle:i,circleStyle:r,children:s,...l}=n;let u=o.useRef(null);u=e||u;const h=a.useCallback((t=>{n.onChange&&n.onChange(t.target.attribute.checked)}),[]);return a.useEffect((()=>(u.current.addEventListener("radio_checked",h),()=>{u.current.removeEventListener("radio_checked",h)})),[]),o.createElement("radio",{ref:u,attribute:{text:{...i,text:s},circle:r,...l}})}));Qh.displayName="Radio";const Zh={};const Jh=o.forwardRef((function(t,e){const n=N({},Zh,t),{textStyle:i,boxStyle:r,iconStyle:s,children:l,...u}=n;let h=o.useRef(null);h=e||h;const c=a.useCallback((t=>{n.onChange&&n.onChange(t.target.attribute.checked)}),[]);return a.useEffect((()=>(h.current?.addEventListener("checkbox_state_change",c),()=>{h.current?.removeEventListener("checkbox_state_change",c)})),[]),o.createElement("checkbox",{ref:h,attribute:{text:{...i,text:l},box:r,icon:s,...u}})}));Jh.displayName="Checkbox";Object.defineProperty(t,"register",{enumerable:!0,get:function(){return e.register}}),t.Arc="arc",t.Avatar=jh,t.Button=Dh,t.Checkbox=Jh,t.Circle="circle",t.CustomComponent=t=>{const e=a.useContext(l),{table:n}=e,i=function(t,e){const n=a.useMemo((()=>({...e})),[e]),i=a.useMemo((()=>{const e=N({},t);for(const t in n)void 0===e[t]&&(e[t]=n[t]);return e}),[t,n]);return i}(t,{style:{left:0,top:0},className:"vtable-custom-component",displayMode:"position",x:0,y:0,width:0,height:0,row:0,col:0,anchor:"top-left",dx:0,dy:0}),{displayMode:r,x:s,y:u,width:h,height:c,row:d,col:f,anchor:p,dx:g,dy:m,className:b,children:y,style:v}=i;let x,_,A,S;if("position"===r)x=s+g+"px",_=u+m+"px",A=h+"px",S=c+"px";else if("cell"===r){const t=n&&f>=0&&d>=0?n?.getCellRelativeRect(f,d):{width:0,height:0,left:-9999,top:-9999};A=Lh(h,t.width)+"px",S=Lh(c,t.height)+"px","top-left"===p?(x=t.left+Lh(g,t.width)+"px",_=t.top+Lh(m,t.height)+"px"):"top-right"===p?(x=t.left+Lh(g,t.width)+t.width+"px",_=t.top+Lh(m,t.height)+"px"):"bottom-left"===p?(x=t.left+Lh(g,t.width)+"px",_=t.top+Lh(m,t.height)+t.height+"px"):"bottom-right"===p&&(x=t.left+Lh(g,t.width)+t.width+"px",_=t.top+Lh(m,t.height)+t.height+"px")}const w=N({},v,{position:"absolute",zIndex:1e3,width:A,height:S,left:x,top:_});return o.createElement("div",{className:b,style:w},o.Children.map(y,(t=>t?o.cloneElement(t,{}):t)))},t.CustomLayout=bh,t.EmptyTip=Eh,t.Group=Rh,t.Image="image",t.Line="line",t.Link=Wh,t.ListColumn=Ah,t.ListTable=Qu,t.ListTableSimple=th,t.Menu=Mh,t.Path="path",t.PivotChart=Ju,t.PivotColumnDimension=Sh,t.PivotColumnHeaderTitle=Bh,t.PivotCorner=kh,t.PivotIndicator=Th,t.PivotRowDimension=wh,t.PivotRowHeaderTitle=Ch,t.PivotTable=Zu,t.PivotTableSimple=eh,t.Polygon="polygon",t.Popover=Xh,t.Radio=Qh,t.Rect="rect",t.RichText="richtext",t.Symbol="symbol",t.Tag=Kh,t.Text=Ih,t.Title=Oh,t.Tooltip=Ph,t.registerChartModule=function(t,n){e.register.chartModule(t,n)},t.version="1.7.1"}));
|