@antv/g 5.8.11 → 5.9.0

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.
@@ -12,6 +12,6 @@
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */()}},n.exports),n.exports}!function(t){!function(e){var r="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(t);function o(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===r.Reflect?r.Reflect=t:i=o(r.Reflect,i),function(t){var e=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",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return rt(Object.create(null))}:a?function(){return rt({__proto__:null})}:function(){return rt({})},has:s?function(t,n){return e.call(t,n)}:function(t,e){return e in t},get:s?function(t,n){return e.call(t,n)?t[n]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,f=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?et():Set,d=new(l||"function"!=typeof WeakMap?nt():WeakMap);function p(t,e,n,r){if(L(n)){if(!z(t))throw new TypeError;if(!Y(e))throw new TypeError;return S(t,e)}if(!z(t))throw new TypeError;if(!B(e))throw new TypeError;if(!B(r)&&!L(r)&&!D(r))throw new TypeError;return D(r)&&(r=void 0),k(t,e,n=H(n),r)}function v(t,e){function n(n,r){if(!B(n))throw new TypeError;if(!L(r)&&!q(r))throw new TypeError;C(t,e,n,r)}return n}function y(t,e,n,r){if(!B(n))throw new TypeError;return L(r)||(r=H(r)),C(t,e,n,r)}function g(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),P(t,e,n)}function m(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),_(t,e,n)}function b(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),M(t,e,n)}function T(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),A(t,e,n)}function E(t,e){if(!B(t))throw new TypeError;return L(e)||(e=H(e)),O(t,e)}function x(t,e){if(!B(t))throw new TypeError;return L(e)||(e=H(e)),I(t,e)}function w(t,e,n){if(!B(e))throw new TypeError;L(n)||(n=H(n));var r=N(e,n,!1);if(L(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}function S(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!L(r)&&!D(r)){if(!Y(r))throw new TypeError;e=r}}return e}function k(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!L(o)&&!D(o)){if(!B(o))throw new TypeError;r=o}}return r}function N(t,e,n){var r=d.get(t);if(L(r)){if(!n)return;r=new h,d.set(t,r)}var i=r.get(e);if(L(i)){if(!n)return;i=new h,r.set(e,i)}return i}function P(t,e,n){if(_(t,e,n))return!0;var r=$(e);return!D(r)&&P(t,r,n)}function _(t,e,n){var r=N(e,n,!1);return!L(r)&&j(r.has(t))}function M(t,e,n){if(_(t,e,n))return A(t,e,n);var r=$(e);return D(r)?void 0:M(t,r,n)}function A(t,e,n){var r=N(e,n,!1);if(!L(r))return r.get(t)}function C(t,e,n,r){N(n,r,!0).set(t,e)}function O(t,e){var n=I(t,e),r=$(t);if(null===r)return n;var i=O(r,e);if(0>=i.length)return n;if(0>=n.length)return i;for(var o=new f,a=[],s=0,u=n;u.length>s;s++){o.has(h=u[s])||(o.add(h),a.push(h))}for(var c=0,l=i;l.length>c;c++){var h;o.has(h=l[c])||(o.add(h),a.push(h))}return a}function I(t,e){var n=[],r=N(t,e,!1);if(L(r))return n;for(var i=K(r.keys()),o=0;;){var a=J(i);if(!a)return n.length=o,n;var s=Z(a);try{n[o]=s}catch(t){try{Q(i)}finally{throw t}}o++}}function R(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}}function L(t){return void 0===t}function D(t){return null===t}function F(t){return"symbol"==typeof t}function B(t){return"object"==typeof t?null!==t:"function"==typeof t}function G(t,e){switch(R(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",i=X(t,r);if(void 0!==i){var o=i.call(t,n);if(B(o))throw new TypeError;return o}return U(t,"default"===n?"number":n)}function U(t,e){if("string"===e){var n=t.toString;if(W(n))if(!B(i=n.call(t)))return i;if(W(r=t.valueOf))if(!B(i=r.call(t)))return i}else{var r;if(W(r=t.valueOf))if(!B(i=r.call(t)))return i;var i,o=t.toString;if(W(o))if(!B(i=o.call(t)))return i}throw new TypeError}function j(t){return!!t}function V(t){return""+t}function H(t){var e=G(t,3);return F(e)?e:V(e)}function z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function W(t){return"function"==typeof t}function Y(t){return"function"==typeof t}function q(t){switch(R(t)){case 3:case 4:return!0;default:return!1}}function X(t,e){var n=t[e];if(null!=n){if(!W(n))throw new TypeError;return n}}function K(t){var e=X(t,i);if(!W(e))throw new TypeError;var n=e.call(t);if(!B(n))throw new TypeError;return n}function Z(t){return t.value}function J(t){var e=t.next();return!e.done&&e}function Q(t){var e=t.return;e&&e.call(t)}function $(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function tt(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[i]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&this._keys.length>t){var n=this._selector(this._keys[t],this._values[t]);return this._keys.length>t+1?this._index++:(this._index=-1,this._keys=e,this._values=e),{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw 0>this._index||(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return 0>this._index||(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return 0>e?void 0:this._values[e]},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var r=this._keys.length,i=n+1;r>i;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,o)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[i]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),0>this._cacheIndex&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}function et(){return function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[i]=function(){return this.keys()},t}()}function nt(){var t=16,n=u.create(),r=i();return function(){function t(){this._key=i()}return t.prototype.has=function(t){var e=o(t,!1);return void 0!==e&&u.has(e,this._key)},t.prototype.get=function(t){var e=o(t,!1);return void 0!==e?u.get(e,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=o(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=i()},t}();function i(){var t;do{t="@@WeakMap@@"+c()}while(u.has(n,t));return n[t]=!0,t}function o(t,n){if(!e.call(t,r)){if(!n)return;Object.defineProperty(t,r,{value:u.create()})}return t[r]}function a(t,e){for(var n=0;e>n;++n)t[n]=255*Math.random()|0;return t}function s(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):a(new Uint8Array(t),t):a(new Array(t),t)}function c(){var e=s(t);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;t>r;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),16>i&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function rt(t){return t.__=void 0,delete t.__,t}t("decorate",p),t("metadata",v),t("defineMetadata",y),t("hasMetadata",g),t("hasOwnMetadata",m),t("getMetadata",b),t("getOwnMetadata",T),t("getMetadataKeys",E),t("getOwnMetadataKeys",x),t("deleteMetadata",w)}(i)}()}(e||(e={}));var i,o=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.NON_CUSTOM_TAG_KEYS=e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct",e.NON_CUSTOM_TAG_KEYS=[e.INJECT_TAG,e.MULTI_INJECT_TAG,e.NAME_TAG,e.UNMANAGED_TAG,e.NAMED_TAG,e.OPTIONAL_TAG]})),a=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=void 0;e.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};e.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};e.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}})),s=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var n=0;e.id=function(){return n++}})),u=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var n=function(){function t(t,e){this.id=s.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=a.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===a.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=n})),c=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]};e.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},e.STACK_OVERFLOW="Maximum call stack size exceeded"})),l=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var n=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(o.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(o.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(o.TAGGED_PROP,t)||[]},t}();e.MetadataReader=n})),h=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}})),f=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0,e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===c.STACK_OVERFLOW}})),d=r((function(t,e){function n(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function r(t,e){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===e||r(t.parentRequest,e))}function i(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}Object.defineProperty(e,"__esModule",{value:!0}),e.circularDependencyToException=e.listMetadataForTarget=e.listRegisteredBindingsForServiceIdentifier=e.getServiceIdentifierAsString=e.getFunctionName=void 0,e.getServiceIdentifierAsString=n,e.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="",o=n(t,e);return 0!==o.length&&(r="\nRegistered bindings:",o.forEach((function(t){var e="Object";null!==t.implementationType&&(e=i(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)}))),r},e.circularDependencyToException=function t(e){e.childRequests.forEach((function(e){if(r(e,e.serviceIdentifier)){var i=function(t){return function t(e,r){void 0===r&&(r=[]);var i=n(e.serviceIdentifier);return r.push(i),null!==e.parentRequest?t(e.parentRequest,r):r}(t).reverse().join(" --\x3e ")}(e);throw new Error(c.CIRCULAR_DEPENDENCY+" "+i)}t(e)}))},e.listMetadataForTarget=function(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(t){n+=t.toString()+"\n"}))," "+t+"\n "+t+" - "+n}return" "+t},e.getFunctionName=i})),p=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var n=function(){function t(t){this.id=s.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=n})),v=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.toString=function(){return this.key===o.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},t}();e.Metadata=n})),y=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0,e.Plan=function(t,e){this.parentContext=t,this.rootRequest=e}})),g=r((function(t,e){function n(t,e,n,r,i){var o={},a="number"==typeof i,s=void 0!==i&&a?i.toString():n;if(a&&void 0!==n)throw new Error(c.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(t,e)&&(o=Reflect.getMetadata(t,e));var u=o[s];if(Array.isArray(u))for(var l=0,h=u;h.length>l;l++){var f=h[l];if(f.key===r.key)throw new Error(c.DUPLICATED_METADATA+" "+f.key.toString())}else u=[];u.push(r),o[s]=u,Reflect.defineMetadata(t,o,e)}function r(t,e){Reflect.decorate(t,e)}function i(t,e){return function(n,r){e(n,r,t)}}Object.defineProperty(e,"__esModule",{value:!0}),e.tagProperty=e.tagParameter=e.decorate=void 0,e.tagParameter=function(t,e,r,i){n(o.TAGGED,t,e,i,r)},e.tagProperty=function(t,e,r){n(o.TAGGED_PROP,t.constructor,e,r)},e.decorate=function(t,e,n){"number"==typeof n?r([i(n,t)],e):"string"==typeof n?Reflect.decorate([t],e,n):r([t],e)}})),m=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var n=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=n,e.inject=function(t){return function(e,n,r){if(void 0===t)throw new Error(c.UNDEFINED_INJECT_ANNOTATION(e.name));var i=new v.Metadata(o.INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),b=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var n=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=n})),T=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var n=function(){function t(t,e,n,r){this.id=s.id(),this.type=t,this.serviceIdentifier=n,this.name=new b.QueryableString(e||""),this.metadata=new Array;var i=null;"string"==typeof r?i=new v.Metadata(o.NAMED_TAG,r):r instanceof v.Metadata&&(i=r),null!==i&&this.metadata.push(i)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;n.length>e;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(o.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(o.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(o.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return o.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(o.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===o.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return o.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(o.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;i.length>r;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=n})),E=r((function(t,e){var r=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};function i(t,e,n,i){var o=t.getConstructorMetadata(n),a=o.compilerGeneratedMetadata;if(void 0===a)throw new Error(c.MISSING_INJECTABLE_ANNOTATION+" "+e+".");var l=o.userGeneratedMetadata,h=Object.keys(l),f=function(t,e,n,r,i){for(var o=[],a=0;i>a;a++){var u=s(a,t,e,n,r);null!==u&&o.push(u)}return o}(i,e,a,l,0===n.length&&h.length>0||h.length>n.length?h.length:n.length),d=u(t,n);return r(r([],f),d)}function s(t,e,n,r,i){var o=i[t.toString()]||[],s=l(o),u=!0!==s.unmanaged,h=r[t],f=s.inject||s.multiInject;if((h=f||h)instanceof m.LazyServiceIdentifer&&(h=h.unwrap()),u){if(!e&&(h===Object||h===Function||void 0===h))throw new Error(c.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".");var d=new T.Target(a.TargetTypeEnum.ConstructorArgument,s.targetName,h);return d.metadata=o,d}return null}function u(t,e){for(var n=t.getPropertiesMetadata(e),i=[],o=0,s=Object.keys(n);s.length>o;o++){var c=s[o],h=n[c],f=l(n[c]),d=new T.Target(a.TargetTypeEnum.ClassProperty,f.targetName||c,f.inject||f.multiInject);d.metadata=h,i.push(d)}var p=Object.getPrototypeOf(e.prototype).constructor;if(p!==Object){var v=u(t,p);i=r(r([],i),v)}return i}function l(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[o.INJECT_TAG],multiInject:e[o.MULTI_INJECT_TAG],targetName:e[o.NAME_TAG],unmanaged:e[o.UNMANAGED_TAG]}}Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0,Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return d.getFunctionName}}),e.getDependencies=function(t,e){return i(t,d.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var a=i(e,d.getFunctionName(r),r,!0),s=a.map((function(t){return t.metadata.filter((function(t){return t.key===o.UNMANAGED_TAG}))})),u=[].concat.apply([],s).length,c=a.length-u;return c>0?c:t(e,r)}return 0}})),x=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var n=function(){function t(t,e,n,r,i){this.id=s.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=n})),w=r((function(t,e){function n(t){return t._bindingDictionary}function r(t,e,n,r,i,a){var s=new v.Metadata(t?o.MULTI_INJECT_TAG:o.INJECT_TAG,n),u=new T.Target(e,r,n,s);if(void 0!==i){var c=new v.Metadata(i,a);u.metadata.push(c)}return u}function i(t,e,n,r,i){var o=u(n.container,i.serviceIdentifier),a=[];return o.length===h.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&t.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=u(n.container,i.serviceIdentifier)),a=e?o:o.filter((function(t){var e=new x.Request(t.serviceIdentifier,n,r,t,i);return t.constraint(e)})),function(t,e,n,r){switch(e.length){case h.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var i=d.getServiceIdentifierAsString(t),o=c.NOT_REGISTERED;throw o+=d.listMetadataForTarget(i,n),o+=d.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o);case h.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;default:if(n.isArray())return e;i=d.getServiceIdentifierAsString(t),o=c.AMBIGUOUS_MATCH+" "+i;throw o+=d.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function s(t,e,n,r,o,u){var l,h;if(null===o){l=i(t,e,r,null,u),h=new x.Request(n,r,null,l,u);var f=new y.Plan(r,h);r.addPlan(f)}else l=i(t,e,r,o,u),h=o.addChildRequest(u.serviceIdentifier,l,u);l.forEach((function(e){var n=null;if(u.isArray())n=h.addChildRequest(e.serviceIdentifier,e,u);else{if(e.cache)return;n=h}if(e.type===a.BindingTypeEnum.Instance&&null!==e.implementationType){var i=E.getDependencies(t,e.implementationType);if(!r.container.options.skipBaseClassChecks)if(E.getBaseClassDependencyCount(t,e.implementationType)>i.length){var o=c.ARGUMENTS_LENGTH_MISMATCH(E.getFunctionName(e.implementationType));throw new Error(o)}i.forEach((function(e){s(t,!1,e.serviceIdentifier,r,n,e)}))}}))}function u(t,e){var r=[],i=n(t);return i.hasKey(e)?r=i.get(e):null!==t.parent&&(r=u(t.parent,e)),r}Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0,e.getBindingDictionary=n,e.plan=function(t,e,n,i,o,a,u,c){void 0===c&&(c=!1);var l=new p.Context(e),h=r(n,i,o,"",a,u);try{return s(t,c,o,l,null,h),l}catch(t){throw f.isStackOverflowExeption(t)&&l.plan&&d.circularDependencyToException(l.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new T.Target(a.TargetTypeEnum.Variable,"",e,new v.Metadata(n,r)),o=new p.Context(t);return new x.Request(e,o,null,[],i)}})),S=r((function(t,e){var r=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0,e.resolveInstance=function(t,e,n){var i,s=null;if(e.length>0){var u=e.filter((function(t){return null!==t.target&&t.target.type===a.TargetTypeEnum.ConstructorArgument})).map(n);s=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===a.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value(),t[r]=i[n]})),t}(s=new((i=t).bind.apply(i,r([void 0],u))),e,n)}else s=new t;return function(t,e){if(Reflect.hasMetadata(o.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(o.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(c.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,s),s}})),k=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var n=function(t,e,n){try{return n()}catch(n){throw f.isStackOverflowExeption(n)?new Error(c.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},r=function(t){return function(e){e.parentContext.setCurrentRequest(e);var i=e.bindings,o=e.childRequests,s=e.target&&e.target.isArray(),u=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(s&&u)return o.map((function(e){return r(t)(e)}));var l=null;if(!e.target.isOptional()||0!==i.length){var h=i[0],f=h.scope===a.BindingScopeEnum.Singleton,p=h.scope===a.BindingScopeEnum.Request;if(f&&h.activated)return h.cache;if(p&&null!==t&&t.has(h.id))return t.get(h.id);if(h.type===a.BindingTypeEnum.ConstantValue)l=h.cache,h.activated=!0;else if(h.type===a.BindingTypeEnum.Function)l=h.cache,h.activated=!0;else if(h.type===a.BindingTypeEnum.Constructor)l=h.implementationType;else if(h.type===a.BindingTypeEnum.DynamicValue&&null!==h.dynamicValue)l=n("toDynamicValue",h.serviceIdentifier,(function(){return h.dynamicValue(e.parentContext)}));else if(h.type===a.BindingTypeEnum.Factory&&null!==h.factory)l=n("toFactory",h.serviceIdentifier,(function(){return h.factory(e.parentContext)}));else if(h.type===a.BindingTypeEnum.Provider&&null!==h.provider)l=n("toProvider",h.serviceIdentifier,(function(){return h.provider(e.parentContext)}));else{if(h.type!==a.BindingTypeEnum.Instance||null===h.implementationType){var v=d.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(c.INVALID_BINDING_TYPE+" "+v)}l=S.resolveInstance(h.implementationType,o,r(t))}return"function"==typeof h.onActivation&&(l=h.onActivation(e.parentContext,l)),f&&(h.cache=l,h.activated=!0),p&&null!==t&&!t.has(h.id)&&t.set(h.id,l),l}}};e.resolve=function(t){return r(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}})),N=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var n=function(t,e){var r=t.parentRequest;return null!==r&&(!!e(r)||n(r,e))};e.traverseAncerstors=n;var r=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new v.Metadata(t,e),n}};e.taggedConstraint=r;var i=r(o.NAMED_TAG);e.namedConstraint=i;e.typeConstraint=function(t){return function(e){return null!==e&&("string"==typeof t?e.bindings[0].serviceIdentifier===t:t===e.bindings[0].implementationType)}}})),P=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.when=function(t){return this._binding.constraint=t,new _.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=N.namedConstraint(t),new _.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new _.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=N.taggedConstraint(t)(e),new _.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return N.typeConstraint(t)(e.parentRequest)},new _.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return N.namedConstraint(t)(e.parentRequest)},new _.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return N.taggedConstraint(t)(e)(n.parentRequest)},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.typeConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.typeConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.namedConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.namedConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,t)},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,t)},new _.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=n})),_=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingOnSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.onActivation=function(t){return this._binding.onActivation=t,new P.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=n})),M=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new P.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new _.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=n})),A=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=a.BindingScopeEnum.Request,new M.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=a.BindingScopeEnum.Transient,new M.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=n})),C=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new P.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new _.BindingOnSyntax(this._binding),this._bindingInSyntax=new A.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=n})),O=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=a.BindingTypeEnum.Instance,this._binding.implementationType=t,new C.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+c.INVALID_TO_SELF_VALUE);return this.to(this._binding.serviceIdentifier)},t.prototype.toConstantValue=function(t){return this._binding.type=a.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=a.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new C.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=a.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=a.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(c.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=a.BindingTypeEnum.Function,this._binding.scope=a.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=a.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=a.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=n})),I=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var n=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=n})),R=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var n=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(c.NULL_ARGUMENT);if(null==e)throw new Error(c.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(c.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(c.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=n})),L=r((function(t,e){var r=n&&n.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=n&&n.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&i[3]>o[1])){a.label=o[1];break}if(6===o[0]&&i[1]>a.label){a.label=i[1],i=o;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},h=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var f=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+c.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=a.BindingScopeEnum.Transient;else if(e.defaultScope!==a.BindingScopeEnum.Singleton&&e.defaultScope!==a.BindingScopeEnum.Transient&&e.defaultScope!==a.BindingScopeEnum.Request)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=s.id(),this._bindingDictionary=new R.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;arguments.length>i;i++)r[i-2]=arguments[i];var o=new t,a=h([e,n],r).map((function(t){return w.getBindingDictionary(t)})),s=w.getBindingDictionary(o);function u(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return a.forEach((function(t){u(t,s)})),o},t.prototype.load=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;i.length>r;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return r.length>n?(a=e((o=r[n]).id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;arguments.length>n;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=new u.Binding(t,this.options.defaultScope||a.BindingScopeEnum.Transient);return this._bindingDictionary.add(t,e),new O.BindingToSyntax(e)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(c.CANNOT_UNBIND+" "+d.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new R.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,o.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=w.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(I.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(c.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,a.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,a.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,o.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,a.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,a.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,o.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,s={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(s)))throw new Error(c.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(s);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=w.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),k.resolve(n)}},t}();e.Container=f})),D=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0,e.ContainerModule=function(t){this.id=s.id(),this.registry=t},e.AsyncContainerModule=function(t){this.id=s.id(),this.registry=t}})),F=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0,e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(o.PARAM_TYPES,t))throw new Error(c.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(o.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(o.PARAM_TYPES,e,t),t}}})),B=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0,e.tagged=function(t,e){return function(n,r,i){var o=new v.Metadata(t,e);"number"==typeof i?g.tagParameter(n,r,i,o):g.tagProperty(n,r,o)}}})),G=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0,e.named=function(t){return function(e,n,r){var i=new v.Metadata(o.NAMED_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),U=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0,e.optional=function(){return function(t,e,n){var r=new v.Metadata(o.OPTIONAL_TAG,!0);"number"==typeof n?g.tagParameter(t,e,n,r):g.tagProperty(t,e,r)}}})),j=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0,e.unmanaged=function(){return function(t,e,n){var r=new v.Metadata(o.UNMANAGED_TAG,!0);g.tagParameter(t,e,n,r)}}})),V=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0,e.multiInject=function(t){return function(e,n,r){var i=new v.Metadata(o.MULTI_INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),H=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0,e.targetName=function(t){return function(e,n,r){var i=new v.Metadata(o.NAME_TAG,t);g.tagParameter(e,n,r,i)}}})),z=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0,e.postConstruct=function(){return function(t,e,n){var r=new v.Metadata(o.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(o.POST_CONSTRUCT,t.constructor))throw new Error(c.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(o.POST_CONSTRUCT,r,t.constructor)}}})),W=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;arguments.length>r;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}})),Y=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0,e.METADATA_KEY=o,Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return L.Container}}),Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return a.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return a.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return a.TargetTypeEnum}}),Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return D.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return D.ContainerModule}}),Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return F.injectable}}),Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return B.tagged}}),Object.defineProperty(e,"named",{enumerable:!0,get:function(){return G.named}}),Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return m.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return m.LazyServiceIdentifer}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return U.optional}}),Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return j.unmanaged}}),Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return V.multiInject}}),Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return H.targetName}}),Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return z.postConstruct}}),Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return l.MetadataReader}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return s.id}}),Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return g.decorate}}),Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return N.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return N.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return N.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return N.typeConstraint}}),Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return d.getServiceIdentifierAsString}}),Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return W.multiBindToService}})}));function q(t){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function X(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(t,e,n){return e&&X(t.prototype,e),n&&X(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function Q(e,n){return n.lifecycle===t.Syringe.Lifecycle.singleton?function(t){return t.inSingletonScope()}(e):function(t){return t.inTransientScope()}(e)}function $(t,e){t.whenTargetNamed(nt(e))}function tt(t,e){return e.bind(rt(t))}function et(t,e){if(e.isBound(rt(t)))try{return e.rebind(rt(t))}catch(n){return e.bind(rt(t))}return e.bind(rt(t))}function nt(t){return i.isDefinedToken(t)?t.symbol:t}function rt(t){return i.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=K((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Z(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===q(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(t.Syringe||(t.Syringe={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===q(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==q(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===q(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(i||(i={}));var it=new Y.Container;function ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function at(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(n),!0).forEach((function(e){st(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Y.injectable();return function(r){Reflect.defineMetadata(t.Syringe.ClassOptionSymbol,at(at({},e),{},{target:r}),r),n(r)}}function ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(at(at({},e),{},{lifecycle:t.Syringe.Lifecycle.singleton}))}function lt(t){return Y.inject(rt(t))}var ht=Symbol("SyringeOptionSymbol");function ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(n),!0).forEach((function(e){pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function pt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yt=function(){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=t,this.token=n,this.option=r,this.rawToken=i.isNamedToken(n)?n.token:n,this.named=i.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||i.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var n,r,o;return n=e,r=[{key:"resolve",value:function(){var t=this,e=this.register;(function(t){return t&&"object"===J(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(e)&&(this.mutiple?this.resolveMutilple(e):(this.resolveMono(e),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(n){i.isMultipleEnabled(n)?tt(n,e).toService(t.generalToken):et(n,e).toService(t.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return et(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return Q(et(this.generalToken,t).toDynamicValue((function(t){var n=Rt.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return et(this.generalToken,t).toFactory((function(t){var e=Rt.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return Q(et(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return Q(tt(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return Q(tt(e.generalToken,t).toDynamicValue((function(t){var e=Rt.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return tt(e.generalToken,t).toFactory((function(t){var e=Rt.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?tt(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&$(t,e.named)})),r.forEach((function(t){return e.named&&$(t,e.named)})),i.forEach((function(t){return e.named&&$(t,e.named)})),o&&$(o,this.named))}}],o=[{key:"resolveTarget",value:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var a=Reflect.getMetadata(ht,r);a&&e.resolveOption(n,a)}catch(t){}if(i.isClass(r))if(o.useClass){var s=i.toArray(o.useClass);s.unshift(r),o.useClass=s}else o.useClass=[r];var u;try{u=Reflect.getMetadata(t.Syringe.ClassOptionSymbol,r)}catch(t){}if((u=dt(dt({},u||{}),o)).token){var c=i.toArray(u.token);c.unshift(r),u.token=c}else u.token=[r];e.resolveOption(n,u)}catch(t){}}},{key:"resolveOption",value:function(n,r){var o=function(e){var n=i.toArray(e.token),r=i.toArray(e.useClass),o=i.toArray(e.useDynamic),a=i.toArray(e.useFactory),s=i.toArray(e.contrib),u={token:n,useClass:r,lifecycle:s.length>0?t.Syringe.Lifecycle.singleton:e.lifecycle||t.Syringe.Lifecycle.transient,contrib:s,useDynamic:o,useFactory:a};return"useValue"in e&&(u.useValue=e.useValue),u}(dt(dt({},e.globalConfig),r));(0!==o.useClass.length||0!==o.useDynamic.length||0!==o.useFactory.length||"useValue"in o)&&o.token.forEach((function(t){new e(n,t,dt({},o)).resolve()}))}}],r&&vt(n.prototype,r),o&&vt(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();yt.globalConfig=t.Syringe.DefaultOption;var gt=t.Syringe.defineToken("ContributionProvider");function mt(t){return function(t){if(Array.isArray(t))return bt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);e>n;n++)r[n]=t[n];return r}function Tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Et(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Tt(Object(n),!0).forEach((function(e){xt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var St=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=Et(Et({},this.option),r))}var e,n,r;return e=t,n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,mt(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Et(Et({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}],n&&wt(e.prototype,n),r&&wt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kt(e,n){return{token:{token:gt,named:e},useDynamic:function(t){return new St(e,t.container,n)},lifecycle:t.Syringe.Lifecycle.singleton}}function Nt(e,n,r){e({token:{token:gt,named:n},useDynamic:function(t){return new St(n,t.container,r)},lifecycle:t.Syringe.Lifecycle.singleton})}function Pt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var _t=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,r,o){var a={bind:t,unbind:e,isBound:r,rebind:o},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.isInjectOption(t)?yt.resolveOption(a,t):yt.resolveTarget(a,t,e)};n.baseRegistry&&n.baseRegistry(s),n.optionCollection&&n.optionCollection.forEach((function(t){return s(t)}))},this.baseRegistry=e,this.inversifyModule=new Y.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,r;return e=t,n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(kt(e))})),this}}],n&&Pt(e.prototype,n),r&&Pt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Mt(t){return t&&"inversifyModule"in t}function At(t){return new _t(t)}function Ct(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ot,It=new Map,Rt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new Y.Container,t.setContainer(this.container,this)}var e,n,r;return e=t,n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Mt(t)?this.container.load(t.inversifyModule):console.warn("Unsupported module.",t),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):{dispose:function(){}}}},{key:"unload",value:function(t){Mt(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(rt(t))}},{key:"get",value:function(t){return this.container.get(rt(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(rt(t),nt(e))}},{key:"getAll",value:function(t){return this.container.getAll(rt(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(rt(t),nt(e))}},{key:"isBound",value:function(t){return this.container.isBound(rt(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(rt(t),nt(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.isInjectOption(t)?yt.resolveOption(this.container,t):yt.resolveTarget(this.container,t,e)}}],r=[{key:"setContainer",value:function(t,e){return It.set(t.id,e)}},{key:"getContainer",value:function(e){var n=It.get(e.id);if(!n){var r=new t(e);return t.setContainer(e,r),r}return n}},{key:"config",value:function(t){yt.globalConfig=t}}],n&&Ct(e.prototype,n),r&&Ct(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Lt=new Rt(it),Dt=(Lt.register.bind(Lt),function(t){return function(e,n,r){Y.named(nt(t))(e,n,r),lt(gt)(e,n,r)}});function Ft(t,e,n,r,i){Bt(t,e,n||0,r||t.length-1,i||Ut)}function Bt(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=e-n+1,s=Math.log(o),u=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*u*(o-u)/o)*(0>a-o/2?-1:1);Bt(t,e,Math.max(n,Math.floor(e-a*u/o+c)),Math.min(r,Math.floor(e+(o-a)*u/o+c)),i)}var l=t[e],h=n,f=r;for(Gt(t,n,e),i(t[r],l)>0&&Gt(t,n,r);f>h;){for(Gt(t,h,f),h++,f--;0>i(t[h],l);)h++;for(;i(t[f],l)>0;)f--}0===i(t[n],l)?Gt(t,n,f):Gt(t,++f,r),f>e||(n=f+1),e>f||(r=f-1)}}function Gt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Ut(t,e){return e>t?-1:t>e?1:0}!function(t){t.Provider=gt,t.register=Nt}(Ot||(Ot={}));class jt{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!Qt(t,e))return n;const r=this.toBBox,i=[];for(;e;){for(let o=0;e.children.length>o;o++){const a=e.children[o],s=e.leaf?r(a):a;Qt(t,s)&&(e.leaf?n.push(a):Jt(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n}collides(t){let e=this.data;if(!Qt(t,e))return!1;const n=[];for(;e;){for(let r=0;e.children.length>r;r++){const i=e.children[r],o=e.leaf?this.toBBox(i):i;if(Qt(t,o)){if(e.leaf||Jt(t,o))return!0;n.push(i)}}e=n.pop()}return!1}load(t){if(!t||!t.length)return this;if(this._minEntries>t.length){for(let e=0;t.length>e;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(e.height>this.data.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=$t([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),i=[],o=[];let a,s,u;for(;n||i.length;){if(n||(n=i.pop(),s=i[i.length-1],a=o.pop(),u=!0),n.leaf){const r=Vt(t,n.children,e);if(-1!==r)return n.children.splice(r,1),i.push(n),this._condense(i),this}u||n.leaf||!Jt(n,r)?s?(a++,n=s.children[a],u=!1):n=null:(i.push(n),o.push(a),a=0,s=n,n=n.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const i=n-e+1;let o,a=this._maxEntries;if(a>=i)return o=$t(t.slice(e,n+1)),Ht(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=$t([]),o.leaf=!1,o.height=r;const s=Math.ceil(i/a),u=s*Math.ceil(Math.sqrt(a));te(t,e,n,u,this.compareMinX);for(let i=e;n>=i;i+=u){const e=Math.min(i+u-1,n);te(t,i,e,s,this.compareMinY);for(let n=i;e>=n;n+=s){const i=Math.min(n+s-1,e);o.children.push(this._build(t,n,i,r-1))}}return Ht(o,this.toBBox),o}_chooseSubtree(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){let n,r=1/0,a=1/0;for(let s=0;e.children.length>s;s++){const u=e.children[s],c=Xt(u),l=(i=t,o=u,(Math.max(o.maxX,i.maxX)-Math.min(o.minX,i.minX))*(Math.max(o.maxY,i.maxY)-Math.min(o.minY,i.minY))-c);a>l?(a=l,r=r>c?c:r,n=u):l===a&&r>c&&(r=c,n=u)}e=n||e.children[0]}var i,o;return e}_insert(t,e,n){const r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),Wt(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)}_split(t,e){const n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r),a=$t(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Ht(n,this.toBBox),Ht(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=$t([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Ht(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,i=1/0,o=1/0;for(let a=e;n-e>=a;a++){const e=zt(t,0,a,this.toBBox),s=zt(t,a,n,this.toBBox),u=Zt(e,s),c=Xt(e)+Xt(s);i>u?(i=u,r=a,o=o>c?c:o):u===i&&o>c&&(o=c,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:Yt,i=t.leaf?this.compareMinY:qt,o=this._allDistMargin(t,e,n,r);this._allDistMargin(t,e,n,i)>o&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const i=this.toBBox,o=zt(t,0,e,i),a=zt(t,n-e,n,i);let s=Kt(o)+Kt(a);for(let r=e;n-e>r;r++){const e=t.children[r];Wt(o,t.leaf?i(e):e),s+=Kt(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];Wt(a,t.leaf?i(e):e),s+=Kt(a)}return s}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)Wt(e[r],t)}_condense(t){for(let e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():Ht(t[n],this.toBBox)}}function Vt(t,e,n){if(!n)return e.indexOf(t);for(let r=0;e.length>r;r++)if(n(t,e[r]))return r;return-1}function Ht(t,e){zt(t,0,t.children.length,e,t)}function zt(t,e,n,r,i){i||(i=$t(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=e;n>o;o++){const e=t.children[o];Wt(i,t.leaf?r(e):e)}return i}function Wt(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function Yt(t,e){return t.minX-e.minX}function qt(t,e){return t.minY-e.minY}function Xt(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Kt(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Zt(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function Jt(t,e){return!(t.minX>e.minX||t.minY>e.minY||e.maxX>t.maxX||e.maxY>t.maxY)}function Qt(t,e){return!(e.minX>t.maxX||e.minY>t.maxY||t.minX>e.maxX||t.minY>e.maxY)}function $t(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function te(t,e,n,r,i){const o=[e,n];for(;o.length;){if(r>=(n=o.pop())-(e=o.pop()))continue;const a=e+Math.ceil((n-e)/r/2)*r;Ft(t,a,e,n,i),o.push(e,a,a,n)}}var ee=1e-6,ne="undefined"!=typeof Float32Array?Float32Array:Array;function re(){var t=new ne(9);return ne!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function ie(){var t=new ne(16);return ne!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],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}function ae(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=v,t[15]=y,t}function se(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 ue(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function ce(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,E=r*u-i*s,x=r*c-o*s,w=i*c-o*u,S=l*v-h*p,k=l*y-f*p,N=l*g-d*p,P=h*y-f*v,_=h*g-d*v,M=f*g-d*y,A=m*M-b*_+T*P+E*N-x*k+w*S;return A?(t[0]=(s*M-u*_+c*P)*(A=1/A),t[1]=(i*_-r*M-o*P)*A,t[2]=(v*w-y*x+g*E)*A,t[3]=(f*x-h*w-d*E)*A,t[4]=(u*N-a*M-c*k)*A,t[5]=(n*M-i*N+o*k)*A,t[6]=(y*T-p*w-g*b)*A,t[7]=(l*w-f*T+d*b)*A,t[8]=(a*_-s*N+c*S)*A,t[9]=(r*N-n*_-o*S)*A,t[10]=(p*x-v*T+g*m)*A,t[11]=(h*T-l*x-d*m)*A,t[12]=(s*k-a*P-u*S)*A,t[13]=(n*P-r*k+i*S)*A,t[14]=(v*b-p*E-y*m)*A,t[15]=(l*E-h*b+f*m)*A,t):null}function le(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*p)+(e*u-i*o)*(l*v-h*p)+(n*s-r*a)*(c*y-f*d)-(n*u-i*a)*(c*v-h*d)+(r*u-i*s)*(c*p-l*d)}function he(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],b=n[0],T=n[1],E=n[2],x=n[3];return t[0]=b*r+T*s+E*h+x*v,t[1]=b*i+T*u+E*f+x*y,t[2]=b*o+T*c+E*d+x*g,t[3]=b*a+T*l+E*p+x*m,t[4]=(b=n[4])*r+(T=n[5])*s+(E=n[6])*h+(x=n[7])*v,t[5]=b*i+T*u+E*f+x*y,t[6]=b*o+T*c+E*d+x*g,t[7]=b*a+T*l+E*p+x*m,t[8]=(b=n[8])*r+(T=n[9])*s+(E=n[10])*h+(x=n[11])*v,t[9]=b*i+T*u+E*f+x*y,t[10]=b*o+T*c+E*d+x*g,t[11]=b*a+T*l+E*p+x*m,t[12]=(b=n[12])*r+(T=n[13])*s+(E=n[14])*h+(x=n[15])*v,t[13]=b*i+T*u+E*f+x*y,t[14]=b*o+T*c+E*d+x*g,t[15]=b*a+T*l+E*p+x*m,t}function fe(t,e,n){var r,i,o,a,s,u,c,l,h,f,d,p,v=n[0],y=n[1],g=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*v+s*y+h*g+e[12],t[13]=i*v+u*y+f*g+e[13],t[14]=o*v+c*y+d*g+e[14],t[15]=a*v+l*y+p*g+e[15]),t}function de(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function pe(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return 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]=o*i+c*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function ve(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return 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]=o*i-c*r,t[1]=a*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function ye(t,e){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]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ge(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,d=i*u,p=i*c,v=o*c,y=a*s,g=a*u,m=a*c;return t[0]=1-(d+v),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+v),t[6]=p+y,t[7]=0,t[8]=f+g,t[9]=p-y,t[10]=1-(l+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function me(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function be(t,e){var n=e[4],r=e[5],i=e[6],o=e[8],a=e[9],s=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(n,r,i),t[2]=Math.hypot(o,a,s),t}function Te(t,e){var n=new ne(3);be(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,d=e[9]*i,p=e[10]*o,v=a+l+p,y=0;return v>0?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(h-d)/y,t[1]=(f-u)/y,t[2]=(s-c)/y):a>l&&a>p?(y=2*Math.sqrt(1+a-l-p),t[3]=(h-d)/y,t[0]=.25*y,t[1]=(s+c)/y,t[2]=(f+u)/y):l>p?(y=2*Math.sqrt(1+l-a-p),t[3]=(f-u)/y,t[0]=(s+c)/y,t[1]=.25*y,t[2]=(h+d)/y):(y=2*Math.sqrt(1+p-a-l),t[3]=(s-c)/y,t[0]=(f+u)/y,t[1]=(h+d)/y,t[2]=.25*y),t}function Ee(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,d=o*l,p=o*h,v=a*l,y=a*h,g=s*h,m=u*c,b=u*l,T=u*h,E=r[0],x=r[1],w=r[2],S=i[0],k=i[1],N=i[2],P=(1-(v+g))*E,_=(d+T)*E,M=(p-b)*E,A=(d-T)*x,C=(1-(f+g))*x,O=(y+m)*x,I=(p+b)*w,R=(y-m)*w,L=(1-(f+v))*w;return t[0]=P,t[1]=_,t[2]=M,t[3]=0,t[4]=A,t[5]=C,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=L,t[11]=0,t[12]=n[0]+S-(P*S+A*k+I*N),t[13]=n[1]+k-(_*S+C*k+R*N),t[14]=n[2]+N-(M*S+O*k+L*N),t[15]=1,t}function xe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,d=i*s,p=i*u,v=o*a,y=o*s,g=o*u;return t[0]=1-h-p,t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-c-p,t[6]=d+v,t[7]=0,t[8]=f+y,t[9]=d-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function we(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(o=1/(r-i)),t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function Se(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ke=Se;function Ne(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p=e[0],v=e[1],y=e[2],g=r[0],m=r[1],b=r[2],T=n[0],E=n[1],x=n[2];return Math.abs(p-T)<ee&&Math.abs(v-E)<ee&&Math.abs(y-x)<ee?se(t):(l=p-T,h=v-E,f=y-x,i=m*(f*=d=1/Math.hypot(l,h,f))-b*(h*=d),o=b*(l*=d)-g*f,a=g*h-m*l,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(d=Math.hypot(s,u,c))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*v+a*y),t[13]=-(s*p+u*v+c*y),t[14]=-(l*p+h*v+f*y),t[15]=1,t)}function Pe(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var _e=Object.freeze({__proto__:null,create:ie,clone:function(t){var e=new ne(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],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},copy:oe,fromValues:function(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v){var y=new ne(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=s,y[8]=u,y[9]=c,y[10]=l,y[11]=h,y[12]=f,y[13]=d,y[14]=p,y[15]=v,y},set:ae,identity:se,transpose:ue,invert:ce,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15];return t[0]=s*(f*g-d*y)-h*(u*g-c*y)+v*(u*d-c*f),t[1]=-(r*(f*g-d*y)-h*(i*g-o*y)+v*(i*d-o*f)),t[2]=r*(u*g-c*y)-s*(i*g-o*y)+v*(i*c-o*u),t[3]=-(r*(u*d-c*f)-s*(i*d-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-d*y)-l*(u*g-c*y)+p*(u*d-c*f)),t[5]=n*(f*g-d*y)-l*(i*g-o*y)+p*(i*d-o*f),t[6]=-(n*(u*g-c*y)-a*(i*g-o*y)+p*(i*c-o*u)),t[7]=n*(u*d-c*f)-a*(i*d-o*f)+l*(i*c-o*u),t[8]=a*(h*g-d*v)-l*(s*g-c*v)+p*(s*d-c*h),t[9]=-(n*(h*g-d*v)-l*(r*g-o*v)+p*(r*d-o*h)),t[10]=n*(s*g-c*v)-a*(r*g-o*v)+p*(r*c-o*s),t[11]=-(n*(s*d-c*h)-a*(r*d-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*y-f*v)-l*(s*y-u*v)+p*(s*f-u*h)),t[13]=n*(h*y-f*v)-l*(r*y-i*v)+p*(r*f-i*h),t[14]=-(n*(s*y-u*v)-a*(r*y-i*v)+p*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t},determinant:le,multiply:he,translate:fe,scale:de,rotate:function(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p,v,y,g,m,b,T,E,x,w,S,k,N,P,_=r[0],M=r[1],A=r[2],C=Math.hypot(_,M,A);return ee>C?null:(_*=C=1/C,M*=C,A*=C,i=Math.sin(n),o=Math.cos(n),u=e[1],c=e[2],l=e[3],f=e[5],d=e[6],p=e[7],y=e[9],g=e[10],m=e[11],x=_*M*(a=1-o)-A*i,w=M*M*a+o,S=A*M*a+_*i,k=_*A*a+M*i,N=M*A*a-_*i,P=A*A*a+o,t[0]=(s=e[0])*(b=_*_*a+o)+(h=e[4])*(T=M*_*a+A*i)+(v=e[8])*(E=A*_*a-M*i),t[1]=u*b+f*T+y*E,t[2]=c*b+d*T+g*E,t[3]=l*b+p*T+m*E,t[4]=s*x+h*w+v*S,t[5]=u*x+f*w+y*S,t[6]=c*x+d*w+g*S,t[7]=l*x+p*w+m*S,t[8]=s*k+h*N+v*P,t[9]=u*k+f*N+y*P,t[10]=c*k+d*N+g*P,t[11]=l*k+p*N+m*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:pe,rotateY:ve,rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return 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]=o*i+c*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t},fromTranslation:ye,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return ee>c?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),i=Math.cos(e),t[0]=a*a*(o=1-i)+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,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},fromRotationTranslation:ge,fromQuat2:function(t,e){var n=new ne(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+l*r+u*o-c*i)/h,n[1]=2*(u*a+l*i+c*r-s*o)/h,n[2]=2*(c*a+l*o+s*i-u*r)/h):(n[0]=2*(s*a+l*r+u*o-c*i),n[1]=2*(u*a+l*i+c*r-s*o),n[2]=2*(c*a+l*o+s*i-u*r)),ge(t,e,n),t},getTranslation:me,getScaling:be,getRotation:Te,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,d=i*l,p=o*c,v=o*l,y=a*l,g=s*u,m=s*c,b=s*l,T=r[0],E=r[1],x=r[2];return t[0]=(1-(p+y))*T,t[1]=(f+b)*T,t[2]=(d-m)*T,t[3]=0,t[4]=(f-b)*E,t[5]=(1-(h+y))*E,t[6]=(v+g)*E,t[7]=0,t[8]=(d+m)*x,t[9]=(v-g)*x,t[10]=(1-(h+p))*x,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Ee,fromQuat:xe,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t},perspectiveNO:we,perspective:we,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(o=1/(r-i)),t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Se,ortho:ke,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t},lookAt:Ne,targetTo:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],d=l*l+h*h+f*f;d>0&&(l*=d=1/Math.sqrt(d),h*=d,f*=d);var p=u*f-c*h,v=c*l-s*f,y=s*h-u*l;return(d=p*p+v*v+y*y)>0&&(p*=d=1/Math.sqrt(d),v*=d,y*=d),t[0]=p,t[1]=v,t[2]=y,t[3]=0,t[4]=h*y-f*v,t[5]=f*p-l*y,t[6]=l*v-h*p,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Pe,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&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]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],d=t[11],p=t[12],v=t[13],y=t[14],g=t[15],m=e[0],b=e[1],T=e[2],E=e[3],x=e[4],w=e[5],S=e[6],k=e[7],N=e[8],P=e[9],_=e[10],M=e[11],A=e[12],C=e[13],O=e[14],I=e[15];return!(Math.abs(n-m)>ee*Math.max(1,Math.abs(n),Math.abs(m))||Math.abs(r-b)>ee*Math.max(1,Math.abs(r),Math.abs(b))||Math.abs(i-T)>ee*Math.max(1,Math.abs(i),Math.abs(T))||Math.abs(o-E)>ee*Math.max(1,Math.abs(o),Math.abs(E))||Math.abs(a-x)>ee*Math.max(1,Math.abs(a),Math.abs(x))||Math.abs(s-w)>ee*Math.max(1,Math.abs(s),Math.abs(w))||Math.abs(u-S)>ee*Math.max(1,Math.abs(u),Math.abs(S))||Math.abs(c-k)>ee*Math.max(1,Math.abs(c),Math.abs(k))||Math.abs(l-N)>ee*Math.max(1,Math.abs(l),Math.abs(N))||Math.abs(h-P)>ee*Math.max(1,Math.abs(h),Math.abs(P))||Math.abs(f-_)>ee*Math.max(1,Math.abs(f),Math.abs(_))||Math.abs(d-M)>ee*Math.max(1,Math.abs(d),Math.abs(M))||Math.abs(p-A)>ee*Math.max(1,Math.abs(p),Math.abs(A))||Math.abs(v-C)>ee*Math.max(1,Math.abs(v),Math.abs(C))||Math.abs(y-O)>ee*Math.max(1,Math.abs(y),Math.abs(O))||Math.abs(g-I)>ee*Math.max(1,Math.abs(g),Math.abs(I)))},mul:he,sub:Pe});function Me(){var t=new ne(3);return ne!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ae(t){return Math.hypot(t[0],t[1],t[2])}function Ce(t,e,n){var r=new ne(3);return r[0]=t,r[1]=e,r[2]=n,r}function Oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ie(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Re(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Le(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function De(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Fe(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Be(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ge(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Ue(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function je(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=ee*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=ee*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=ee*Math.max(1,Math.abs(i),Math.abs(s))}var Ve,He=Le,ze=Ae;Ve=Me();function We(){var t=new ne(4);return ne!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Ye(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}!function(){var t=We()}();function qe(){var t=new ne(4);return ne!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Xe(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Ke(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function Ze(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],d=n[0],p=n[1],v=n[2],y=n[3];return 0>(o=c*d+l*p+h*v+f*y)&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>ee?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*d,t[1]=s*l+u*p,t[2]=s*h+u*v,t[3]=s*f+u*y,t}function Je(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function Qe(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}var $e,tn,en,nn,rn,on,an=function(t,e,n,r){var i=new ne(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},sn=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},un=Ke,cn=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};$e=Me(),tn=Ce(1,0,0),en=Ce(0,1,0),nn=qe(),rn=qe(),on=re();function ln(t,e){var n=new ne(2);return n[0]=t,n[1]=e,n}!function(){var t,e=(t=new ne(2),ne!=Float32Array&&(t[0]=0,t[1]=0),t)}();function hn(t){return t.map((function(t){return Array.isArray(t)?[].concat(t):t}))}var fn=function(){return fn=Object.assign||function(t){for(var e,n=1,r=arguments.length;r>n;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},fn.apply(this,arguments)};function dn(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function pn(t,e){return function(n,r){e(n,r,t)}}var vn={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function yn(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var gn={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function mn(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return gn[e]===t.length-1&&"achlmqstvz".includes(e)}))}function bn(t){return mn(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function Tn(t){return bn(t)&&t.every((function(t){return"ACLMQZ".includes(t[0])}))}function En(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=gn[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,gn[n]))),gn[n]););}function xn(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);return 48===r?(t.param=0,void(t.index+=1)):49===r?(t.param=1,void(t.index+=1)):void(t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e)}function wn(t){return t>=48&&57>=t||43===t||45===t||46===t}function Sn(t){return t>=48&&57>=t}function kn(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,s=!1,u=!1,c=!1;if(n>o)if(43!==(e=r.charCodeAt(o))&&45!==e||(e=r.charCodeAt(o+=1)),Sn(e)||46===e){if(46!==e){if(a=48===e,e=r.charCodeAt(o+=1),a&&n>o&&e&&Sn(e))return void(t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number');for(;n>o&&Sn(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(c=!0,o+=1;Sn(r.charCodeAt(o));)o+=1,u=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(c&&!s&&!u)return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent');if(43!==(e=r.charCodeAt(o+=1))&&45!==e||(o+=1),o>=n||!Sn(r.charCodeAt(o)))return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent');for(;n>o&&Sn(r.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(i,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';else t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param'}function Nn(t){for(var e,n=t.pathValue,r=t.max;r>t.index&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Pn(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=gn[n[r].toLowerCase()];if(t.segmentStart=r,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(t.index+=1,Nn(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?kn(t):xn(t),t.err.length)return;t.data.push(t.param),Nn(t),e>t.index&&44===n.charCodeAt(t.index)&&(t.index+=1,Nn(t))}if(t.index>=t.max)break;if(!wn(n.charCodeAt(t.index)))break}En(t)}else En(t);else t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command'}var _n=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Mn(t){if(bn(t))return hn(t);var e=function(t){if(mn(t))return hn(t);var e=new _n(t);for(Nn(e);e.max>e.index&&!e.err.length;)Pn(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map((function(t){var e,a=t.slice(1).map(Number),s=t[0],u=s.toUpperCase();if("M"===s)return i=n=a[0],o=r=a[1],["M",n,r];if(s!==u)switch(u){case"A":e=[u,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[u,a[0]+r];break;case"H":e=[u,a[0]+n];break;default:var c=a.map((function(t,e){return t+(e%2?r:n)}));e=[u].concat(c)}else e=[u].concat(a);var l=e.length;switch(u){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[l-2],r=e[l-1],"M"===u&&(i=n,o=r)}return e}))}function An(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,s=t.slice(1).map(Number),u=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)u=["L",t[1],i];else if("V"===n)u=["L",r,t[1]];else if("S"===n){var c=2*r-o,l=2*i-a;e.x1=c,e.y1=l,u=["C",c,l].concat(s)}else if("T"===n){var h=2*r-e.qx,f=2*i-e.qy;e.qx=h,e.qy=f,u=["Q",h,f].concat(s)}else if("Q"===n){var d=s[1];e.qx=s[0],e.qy=d}return u}function Cn(t){if(Tn(t))return hn(t);for(var e=Mn(t),n=fn({},vn),r=0;e.length>r;r+=1){e[r]=An(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function On(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function In(t,e,n,r,i,o,a,s,u,c){var l,h,f,d,p,v=t,y=e,g=n,m=r,b=s,T=u,E=120*Math.PI/180,x=Math.PI/180*(+i||0),w=[];if(c)h=c[0],f=c[1],d=c[2],p=c[3];else{y=(l=On(v,y,-x)).y;var S=((v=l.x)-(b=(l=On(b,T,-x)).x))/2,k=(y-(T=l.y))/2,N=S*S/(g*g)+k*k/(m*m);N>1&&(g*=N=Math.sqrt(N),m*=N);var P=g*g,_=m*m,M=(o===a?-1:1)*Math.sqrt(Math.abs((P*_-P*k*k-_*S*S)/(P*k*k+_*S*S)));d=M*g*k/m+(v+b)/2,p=M*-m*S/g+(y+T)/2,h=Math.asin(((y-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),f=Math.asin(((T-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),h=d>v?Math.PI-h:h,f=d>b?Math.PI-f:f,0>h&&(h=2*Math.PI+h),0>f&&(f=2*Math.PI+f),a&&h>f&&(h-=2*Math.PI),!a&&f>h&&(f-=2*Math.PI)}var A=f-h;if(Math.abs(A)>E){var C=f,O=b,I=T;f=h+E*(a&&f>h?1:-1),w=In(b=d+g*Math.cos(f),T=p+m*Math.sin(f),g,m,i,0,a,O,I,[f,C,d,p])}A=f-h;var R=Math.cos(h),L=Math.sin(h),D=Math.cos(f),F=Math.sin(f),B=Math.tan(A/4),G=4/3*g*B,U=4/3*m*B,j=[v,y],V=[v+G*L,y-U*R],H=[b+G*F,T-U*D],z=[b,T];if(V[0]=2*j[0]-V[0],V[1]=2*j[1]-V[1],c)return V.concat(H,z,w);for(var W=[],Y=0,q=(w=V.concat(H,z,w)).length;q>Y;Y+=1)W[Y]=Y%2?On(w[Y-1],w[Y],x).y:On(w[Y],w[Y+1],x).x;return W}function Rn(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function Ln(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Dn(t,e,n,r,i){var o=Ln([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(0<i)if(i<o){var s=Rn([t,e],[n,r],i/o);a={x:s[0],y:s[1]}}else a={x:n,y:r};else a={x:t,y:e};return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Fn(t,e,n,r){var i=.5,o=[t,e],a=[n,r],s=Rn(o,a,i),u=Rn(a,s,i),c=Rn(s,u,i),l=Rn(u,c,i),h=Rn(c,l,i),f=Dn(o[0],o[1],s[0],s[1],c[0]).point,d=Dn(h[0],h[1],l[0],l[1],u[0]).point;return[f.x,f.y,d.x,d.y,n,r]}function Bn(t,e){var n,r,i,o,a,s,u,c=t[0],l=t.slice(1).map(Number),h=l[0],f=l[1],d=e.x1,p=e.y1,v=e.x,y=e.y;switch("TQ".includes(c)||(e.qx=null,e.qy=null),c){case"M":return e.x=h,e.y=f,t;case"A":return n=[d,p].concat(l),["C"].concat(In(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return e.qx=h,e.qy=f,n=[d,p].concat(l),["C"].concat([(s=1/3)*n[0]+(u=2/3)*(r=n[2]),s*n[1]+u*(i=n[3]),s*(o=n[4])+u*r,s*(a=n[5])+u*i,o,a]);case"L":return["C"].concat(Fn(d,p,h,f));case"Z":return d===v&&p===y?["C",d,p,v,y,v,y]:["C"].concat(Fn(d,p,v,y))}return t}function Gn(t,e){if(void 0===e&&(e=!1),function(t){return Tn(t)&&t.every((function(t){return"MC".includes(t[0])}))}(t)){var n=hn(t);return e?[n,[]]:n}for(var r,i,o=Cn(t),a=fn({},vn),s=[],u="",c=o.length,l=[],h=0;c>h;h+=1){o[h]&&(u=o[h][0]),s[h]=u;var f=Bn(o[h],a);o[h]=f,yn(o,s,h),c=o.length,"Z"===u&&l.push(h),a.x1=+(r=o[h])[(i=r.length)-2],a.y1=+r[i-1],a.x2=+r[i-4]||a.x1,a.y2=+r[i-3]||a.y1}return e?[o,l]:o}function Un(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=n*i+r*o,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(0>n*o-r*i?-1:1)*Math.acos(a/s)}function jn(t,e,n,r,i,o,a,s,u,c){var l=Math.abs,h=Math.sin,f=Math.cos,d=Math.sqrt,p=Math.PI,v=l(n),y=l(r),g=(i%360+360)%360*(p/180);if(t===s&&e===u)return{x:t,y:e};if(0===v||0===y)return Dn(t,e,s,u,c).point;var m=(t-s)/2,b=(e-u)/2,T={x:f(g)*m+h(g)*b,y:-h(g)*m+f(g)*b},E=Math.pow(T.x,2)/Math.pow(v,2)+Math.pow(T.y,2)/Math.pow(y,2);E>1&&(v*=d(E),y*=d(E));var x=(Math.pow(v,2)*Math.pow(y,2)-Math.pow(v,2)*Math.pow(T.y,2)-Math.pow(y,2)*Math.pow(T.x,2))/(Math.pow(v,2)*Math.pow(T.y,2)+Math.pow(y,2)*Math.pow(T.x,2)),w=(o!==a?1:-1)*d(x=0>x?0:x),S=w*(v*T.y/y),k=w*(-y*T.x/v),N=f(g)*S-h(g)*k+(t+s)/2,P=h(g)*S+f(g)*k+(e+u)/2,_={x:(T.x-S)/v,y:(T.y-k)/y},M=Un({x:1,y:0},_),A=Un(_,{x:(-T.x-S)/v,y:(-T.y-k)/y});!a&&A>0?A-=2*p:a&&0>A&&(A+=2*p);var C=M+(A%=2*p)*c,O=v*f(C),I=y*h(C);return{x:f(g)*O-h(g)*I+N,y:h(g)*O+f(g)*I+P}}function Vn(t,e,n,r,i,o,a,s,u,c,l){var h,f=l.bbox,d=void 0===f||f,p=l.length,v=void 0===p||p,y=l.sampleSize,g=void 0===y?30:y,m="number"==typeof c,b=t,T=e,E=0,x=[b,T,E],w=[b,T],S={x:0,y:0},k=[{x:b,y:T}];m&&0>=c&&(S={x:b,y:T});for(var N=0;g>=N;N+=1){if(b=(h=jn(t,e,n,r,i,o,a,s,u,N/g)).x,T=h.y,d&&k.push({x:b,y:T}),v&&(E+=Ln(w,[b,T])),w=[b,T],m&&E>=c&&c>x[2]){var P=(E-c)/(E-x[2]);S={x:w[0]*(1-P)+x[0]*P,y:w[1]*(1-P)+x[1]*P}}x=[b,T,E]}return m&&c>=E&&(S={x:s,y:u}),{length:E,point:S,min:{x:Math.min.apply(null,k.map((function(t){return t.x}))),y:Math.min.apply(null,k.map((function(t){return t.y})))},max:{x:Math.max.apply(null,k.map((function(t){return t.x}))),y:Math.max.apply(null,k.map((function(t){return t.y})))}}}function Hn(t,e,n,r,i,o,a,s,u){var c=1-u;return{x:Math.pow(c,3)*t+3*Math.pow(c,2)*u*n+3*c*Math.pow(u,2)*i+Math.pow(u,3)*a,y:Math.pow(c,3)*e+3*Math.pow(c,2)*u*r+3*c*Math.pow(u,2)*o+Math.pow(u,3)*s}}function zn(t,e,n,r,i,o,a,s,u,c){var l,h=c.bbox,f=void 0===h||h,d=c.length,p=void 0===d||d,v=c.sampleSize,y=void 0===v?10:v,g="number"==typeof u,m=t,b=e,T=0,E=[m,b,T],x=[m,b],w={x:0,y:0},S=[{x:m,y:b}];g&&0>=u&&(w={x:m,y:b});for(var k=0;y>=k;k+=1){if(m=(l=Hn(t,e,n,r,i,o,a,s,k/y)).x,b=l.y,f&&S.push({x:m,y:b}),p&&(T+=Ln(x,[m,b])),x=[m,b],g&&T>=u&&u>E[2]){var N=(T-u)/(T-E[2]);w={x:x[0]*(1-N)+E[0]*N,y:x[1]*(1-N)+E[1]*N}}E=[m,b,T]}return g&&u>=T&&(w={x:a,y:s}),{length:T,point:w,min:{x:Math.min.apply(null,S.map((function(t){return t.x}))),y:Math.min.apply(null,S.map((function(t){return t.y})))},max:{x:Math.max.apply(null,S.map((function(t){return t.x}))),y:Math.max.apply(null,S.map((function(t){return t.y})))}}}function Wn(t,e,n,r,i,o,a){var s=1-a;return{x:Math.pow(s,2)*t+2*s*a*n+Math.pow(a,2)*i,y:Math.pow(s,2)*e+2*s*a*r+Math.pow(a,2)*o}}function Yn(t,e,n,r,i,o,a,s){var u,c=s.bbox,l=void 0===c||c,h=s.length,f=void 0===h||h,d=s.sampleSize,p=void 0===d?10:d,v="number"==typeof a,y=t,g=e,m=0,b=[y,g,m],T=[y,g],E={x:0,y:0},x=[{x:y,y:g}];v&&0>=a&&(E={x:y,y:g});for(var w=0;p>=w;w+=1){if(y=(u=Wn(t,e,n,r,i,o,w/p)).x,g=u.y,l&&x.push({x:y,y:g}),f&&(m+=Ln(T,[y,g])),T=[y,g],v&&m>=a&&a>b[2]){var S=(m-a)/(m-b[2]);E={x:T[0]*(1-S)+b[0]*S,y:T[1]*(1-S)+b[1]*S}}b=[y,g,m]}return v&&a>=m&&(E={x:i,y:o}),{length:m,point:E,min:{x:Math.min.apply(null,x.map((function(t){return t.x}))),y:Math.min.apply(null,x.map((function(t){return t.y})))},max:{x:Math.max.apply(null,x.map((function(t){return t.x}))),y:Math.max.apply(null,x.map((function(t){return t.y})))}}}function qn(t,e,n){for(var r,i,o,a,s,u,c,l,h,f=Cn(t),d="number"==typeof e,p=[],v=0,y=0,g=0,m=0,b=[],T=[],E=0,x={x:0,y:0},w=x,S=x,k=x,N=0,P=0,_=f.length;_>P;P+=1)p=(c="M"===(l=(h=f[P])[0]))?p:[v,y].concat(h.slice(1)),c?(w=x={x:g=h[1],y:m=h[2]},E=0,d&&.001>e&&(k=x)):"L"===l?(E=(r=Dn(p[0],p[1],p[2],p[3],(e||0)-N)).length,x=r.min,w=r.max,S=r.point):"A"===l?(E=(i=Vn(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],(e||0)-N,n||{})).length,x=i.min,w=i.max,S=i.point):"C"===l?(E=(o=zn(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],(e||0)-N,n||{})).length,x=o.min,w=o.max,S=o.point):"Q"===l?(E=(a=Yn(p[0],p[1],p[2],p[3],p[4],p[5],(e||0)-N,n||{})).length,x=a.min,w=a.max,S=a.point):"Z"===l&&(E=(s=Dn((p=[v,y,g,m])[0],p[1],p[2],p[3],(e||0)-N)).length,x=s.min,w=s.max,S=s.point),d&&e>N&&N+E>=e&&(k=S),T.push(w),b.push(x),N+=E,v=(u="Z"!==l?h.slice(-2):[g,m])[0],y=u[1];return d&&e>=N&&(k={x:v,y:y}),{length:N,point:k,min:{x:Math.min.apply(null,b.map((function(t){return t.x}))),y:Math.min.apply(null,b.map((function(t){return t.y})))},max:{x:Math.max.apply(null,T.map((function(t){return t.x}))),y:Math.max.apply(null,T.map((function(t){return t.y})))}}}function Xn(t){return function(t){var e=0,n=0,r=0;return Gn(t).map((function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var o,a,s,u,c,l,h,f,d=t.slice(1);return r=3*(((f=d[5])-(a=n))*((s=d[0])+(c=d[2]))-((h=d[4])-(o=e))*((u=d[1])+(l=d[3]))+u*(o-c)-s*(a-l)+f*(c+o/3)-h*(l+a/3))/20,i=t.slice(-2),e=i[0],n=i[1],r})).reduce((function(t,e){return t+e}),0)}(t)>=0}function Kn(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?zn(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=Rn(n,r,e),s=Rn(r,i,e),u=Rn(i,o,e),c=Rn(a,s,e),l=Rn(s,u,e),h=Rn(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function Zn(t,e,n){var r=Kn(t),i=Kn(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),f=[c,l],d=[h-o,h-a],p=0,v=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d[e]-=(p=n&&d[e]&&t.l>=f[e])?1:0,p?t.ss:[t.s]})).flat()}));return v[0].length===v[1].length?v:Zn(v[0],v[1],h)}var Jn={}.toString,Qn=function(t,e){return Jn.call(t)==="[object "+e+"]"},$n=function(t){return null==t},tr=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},er=function(t){return Qn(t,"String")},nr=function(t,e,n){return e>t?e:t>n?n:t},rr=function(t){return Qn(t,"Number")},ir=function(t){return Qn(t,"Boolean")},or=function(t){return void 0===t},ar=function(t,e){if(!Qn(t,"Function"))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};return n.cache=new Map,n};function sr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ur(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cr(){}var lr=.7,hr=1/lr,fr="\\s*([+-]?\\d+)\\s*",dr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",pr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vr=/^#([0-9a-f]{3,8})$/,yr=new RegExp("^rgb\\("+[fr,fr,fr]+"\\)$"),gr=new RegExp("^rgb\\("+[pr,pr,pr]+"\\)$"),mr=new RegExp("^rgba\\("+[fr,fr,fr,dr]+"\\)$"),br=new RegExp("^rgba\\("+[pr,pr,pr,dr]+"\\)$"),Tr=new RegExp("^hsl\\("+[dr,pr,pr]+"\\)$"),Er=new RegExp("^hsla\\("+[dr,pr,pr,dr]+"\\)$"),xr={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 wr(){return this.rgb().formatHex()}function Sr(){return this.rgb().formatRgb()}function kr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=vr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Nr(e):3===n?new Mr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Pr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Pr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yr.exec(t))?new Mr(e[1],e[2],e[3],1):(e=gr.exec(t))?new Mr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=mr.exec(t))?Pr(e[1],e[2],e[3],e[4]):(e=br.exec(t))?Pr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Tr.exec(t))?Ir(e[1],e[2]/100,e[3]/100,1):(e=Er.exec(t))?Ir(e[1],e[2]/100,e[3]/100,e[4]):xr.hasOwnProperty(t)?Nr(xr[t]):"transparent"===t?new Mr(NaN,NaN,NaN,0):null}function Nr(t){return new Mr(t>>16&255,t>>8&255,255&t,1)}function Pr(t,e,n,r){return r>0||(t=e=n=NaN),new Mr(t,e,n,r)}function _r(t){return t instanceof cr||(t=kr(t)),t?new Mr((t=t.rgb()).r,t.g,t.b,t.opacity):new Mr}function Mr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ar(){return"#"+Or(this.r)+Or(this.g)+Or(this.b)}function Cr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Or(t){return(16>(t=Math.max(0,Math.min(255,Math.round(t)||0)))?"0":"")+t.toString(16)}function Ir(t,e,n,r){return r>0?n>0&&1>n?e>0||(t=NaN):t=e=NaN:t=e=n=NaN,new Lr(t,e,n,r)}function Rr(t){if(t instanceof Lr)return new Lr(t.h,t.s,t.l,t.opacity);if(t instanceof cr||(t=kr(t)),!t)return new Lr;if(t instanceof Lr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(r>n):n===o?(r-e)/s+2:(e-n)/s+4,s/=.5>u?o+i:2-o-i,a*=60):s=u>0&&1>u?0:a,new Lr(a,s,u,t.opacity)}function Lr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Dr(t,e,n){return 255*(60>t?e+(n-e)*t/60:180>t?n:240>t?e+(n-e)*(240-t)/60:e)}function Fr(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Br(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}sr(cr,kr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:wr,formatHex:wr,formatHsl:function(){return Rr(this).formatHsl()},formatRgb:Sr,toString:Sr}),sr(Mr,(function(t,e,n,r){return 1===arguments.length?_r(t):new Mr(t,e,n,null==r?1:r)}),ur(cr,{brighter:function(t){return t=null==t?hr:Math.pow(hr,t),new Mr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?lr:Math.pow(lr,t),new Mr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return this.r>=-.5&&255.5>this.r&&this.g>=-.5&&255.5>this.g&&this.b>=-.5&&255.5>this.b&&this.opacity>=0&&1>=this.opacity},hex:Ar,formatHex:Ar,formatRgb:Cr,toString:Cr})),sr(Lr,(function(t,e,n,r){return 1===arguments.length?Rr(t):new Lr(t,e,n,null==r?1:r)}),ur(cr,{brighter:function(t){return t=null==t?hr:Math.pow(hr,t),new Lr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?lr:Math.pow(lr,t),new Lr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(0>this.h),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(.5>n?n:1-n)*e,i=2*n-r;return new Mr(Dr(240>t?t+120:t-240,i,r),Dr(t,i,r),Dr(120>t?t+240:t-120,i,r),this.opacity)},displayable:function(){return(this.s>=0&&1>=this.s||isNaN(this.s))&&this.l>=0&&1>=this.l&&this.opacity>=0&&1>=this.opacity},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Gr={box:function(t,e,n,r){return Br([t,n],[e,r])},length:function(t,e,n,r){return Fr(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return 0>a?Fr(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Fr(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];return function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i}(s,s),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([i-t,o-e],s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};var Ur=function(t){return function(t){if(2>t.length)return 0;for(var e=0,n=0;t.length-1>n;n++){var r=t[n],i=t[n+1];e+=Fr(r[0],r[1],i[0],i[1])}return e}(t)},jr=r((function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}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 t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var r=0,i=e.length,o=new Array(i);i>r;r++)o[r]=e[r].fn;return o},s.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,o),!0;case 6:return l.fn.call(l.context,e,r,i,o,a),!0}for(c=1,u=new Array(h-1);h>c;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,d=l.length;for(c=0;d>c;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,i);break;default:if(!u)for(f=1,u=new Array(h-1);h>f;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;l>u;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&a(this,e):(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,t.exports=s}));let Vr=1;const Hr="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},zr=Date.now();let Wr={},Yr=Date.now();const qr=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-Yr,r=n>16?0:16-n,i=Vr++;return Wr[i]=t,Object.keys(Wr).length>1||setTimeout((()=>{Yr=e;const t=Wr;Wr={},Object.keys(t).forEach((e=>t[e](Hr.performance&&"function"==typeof Hr.performance.now?Hr.performance.now():Date.now()-zr)))}),r),i},Xr=t=>{delete Wr[t]},Kr=t=>"string"!=typeof t?qr:""===t?Hr.requestAnimationFrame:Hr[t+"RequestAnimationFrame"],Zr=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],(t=>!!Kr(t))),Jr=Kr(Zr),Qr="string"!=typeof($r=Zr)?Xr:""===$r?Hr.cancelAnimationFrame:Hr[$r+"CancelAnimationFrame"]||Hr[$r+"CancelRequestAnimationFrame"];var $r,ti,ei,ni,ri,ii;function oi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */oi=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new w(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(p=y);var g=d.prototype=h.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function T(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,T(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function ai(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function si(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ai(o,r,i,a,s,"next",t)}function s(t){ai(o,r,i,a,s,"throw",t)}a(void 0)}))}}function ui(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ci(t,e,n){return e&&ui(t.prototype,e),n&&ui(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function li(){return li=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},li.apply(this,arguments)}function hi(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,fi(t,e)}function fi(t,e){return fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fi(t,e)}function di(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&(i[n]=t[n]);return i}function pi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);e>n;n++)r[n]=t[n];return r}function yi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return vi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return t.length>r?{done:!1,value:t[r++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Hr.requestAnimationFrame=Jr,Hr.cancelAnimationFrame=Qr,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Jr,cancelAnimationFrame:Qr}),(ti=t.UnitType||(t.UnitType={}))[ti.kUnknown=0]="kUnknown",ti[ti.kNumber=1]="kNumber",ti[ti.kPercentage=2]="kPercentage",ti[ti.kEms=3]="kEms",ti[ti.kPixels=4]="kPixels",ti[ti.kRems=5]="kRems",ti[ti.kDegrees=6]="kDegrees",ti[ti.kRadians=7]="kRadians",ti[ti.kGradians=8]="kGradians",ti[ti.kTurns=9]="kTurns",ti[ti.kMilliseconds=10]="kMilliseconds",ti[ti.kSeconds=11]="kSeconds",ti[ti.kInteger=12]="kInteger",function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUOther=5]="kUOther"}(ei||(ei={})),function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"}(ni||(ni={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(ri||(ri={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(ii||(ii={}));var gi,mi=[{name:"em",unit_type:t.UnitType.kEms},{name:"px",unit_type:t.UnitType.kPixels},{name:"deg",unit_type:t.UnitType.kDegrees},{name:"rad",unit_type:t.UnitType.kRadians},{name:"grad",unit_type:t.UnitType.kGradians},{name:"ms",unit_type:t.UnitType.kMilliseconds},{name:"s",unit_type:t.UnitType.kSeconds},{name:"rem",unit_type:t.UnitType.kRems},{name:"turn",unit_type:t.UnitType.kTurns}];!function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"}(gi||(gi={}));var bi,Ti=function(e){return e?"number"===e?t.UnitType.kNumber:"percent"===e||"%"===e?t.UnitType.kPercentage:function(t){return mi.find((function(e){return e.name===t})).unit_type}(e):t.UnitType.kUnknown},Ei=function(e){var n=1;switch(e){case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kSeconds:break;case t.UnitType.kMilliseconds:n=.001;break;case t.UnitType.kRadians:n=180/Math.PI;break;case t.UnitType.kGradians:n=.9;break;case t.UnitType.kTurns:n=360}return n},xi=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return"";case t.UnitType.kPercentage:return"%";case t.UnitType.kEms:return"em";case t.UnitType.kRems:return"rem";case t.UnitType.kPixels:return"px";case t.UnitType.kDegrees:return"deg";case t.UnitType.kRadians:return"rad";case t.UnitType.kGradians:return"grad";case t.UnitType.kMilliseconds:return"ms";case t.UnitType.kSeconds:return"s";case t.UnitType.kTurns:return"turn"}return""},wi=function(){function e(){}e.isAngle=function(e){return e===t.UnitType.kDegrees||e===t.UnitType.kRadians||e===t.UnitType.kGradians||e===t.UnitType.kTurns},e.isLength=function(e){return e>=t.UnitType.kEms&&t.UnitType.kDegrees>e},e.isRelativeUnit=function(e){return e===t.UnitType.kPercentage||e===t.UnitType.kEms||e===t.UnitType.kRems},e.isTime=function(e){return e===t.UnitType.kSeconds||e===t.UnitType.kMilliseconds};var n=e.prototype;return n.toString=function(){return this.buildCSSText(ri.kNo,ii.kNo,"")},n.isNumericValue=function(){return this.getType()>=gi.kUnitType&&this.getType()<=gi.kClampType},e}(),Si=function(t){function e(e){var n;return(n=t.call(this)||this).colorSpace=void 0,n.colorSpace=e,n}hi(e,t);var n=e.prototype;return n.getType=function(){return gi.kColorType},n.to=function(t){return this},e}(wi);(bi=t.GradientType||(t.GradientType={}))[bi.Constant=0]="Constant",bi[bi.LinearGradient=1]="LinearGradient",bi[bi.RadialGradient=2]="RadialGradient";var ki=function(t){function e(e,n){var r;return(r=t.call(this)||this).type=void 0,r.value=void 0,r.type=e,r.value=n,r}hi(e,t);var n=e.prototype;return n.clone=function(){return new e(this.type,this.value)},n.buildCSSText=function(t,e,n){return n},n.getType=function(){return gi.kColorType},e}(wi),Ni=function(t){function e(e){var n;return(n=t.call(this)||this).value=void 0,n.value=e,n}hi(e,t);var n=e.prototype;return n.clone=function(){return new e(this.value)},n.getType=function(){return gi.kKeywordType},n.buildCSSText=function(t,e,n){return n+this.value},e}(wi),Pi=ar((function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}));function _i(t){if(!t)throw new Error}function Mi(t,e){if(t===e)throw new Error}function Ai(t){return"function"==typeof t}var Ci,Oi,Ii={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},Ri=ar((function(t){var e=Pi(t),n=Ii[e];return[e=(null==n?void 0:n.alias)||e,n]}));function Li(t,e){var n,r=Ri(t),i=r[1];return[r[0],er(e)&&(null==i||null===(n=i.values)||void 0===n?void 0:n[e])||e]}!function(t){t.kAdd="+",t.kSubtract="-",t.kMultiply="*",t.kDivide="/",t.kMin="min",t.kMax="max",t.kClamp="clamp",t.kInvalid=""}(Ci||(Ci={})),function(t){t[t.kLength=0]="kLength",t[t.kAngle=1]="kAngle",t[t.kTime=2]="kTime",t[t.kFrequency=3]="kFrequency",t[t.kResolution=4]="kResolution",t[t.kFlex=5]="kFlex",t[t.kPercent=6]="kPercent",t[t.kNumBaseTypes=7]="kNumBaseTypes"}(Oi||(Oi={}));var Di=function(){function e(e,n){void 0===e&&(e=t.UnitType.kNumber),void 0===n&&(n=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=Oi.kPercent,this.hasPercentHint=!1,this.exponents=new Array(Oi.kNumBaseTypes).fill(0),e!==t.UnitType.kNumber&&this.setExponent(function(e){switch(Mi(e,t.UnitType.kNumber),e){case t.UnitType.kEms:case t.UnitType.kPixels:case t.UnitType.kRems:return Oi.kLength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return Oi.kTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return Oi.kAngle;case t.UnitType.kPercentage:return Oi.kPercent;default:return Oi.kLength}}(e),n)}var n=e.prototype;return n.applyPercentHint=function(t){Mi(t,Oi.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(Oi.kPercent)),this.setExponent(Oi.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},n.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},n.isOnlyNonZeroEntry=function(t,e){return Mi(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},n.exponent=function(t){return this.exponents[t]},n.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},e.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},n.matchesBaseType=function(t){return Mi(t,Oi.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},n.matchesPercentage=function(){return this.isOnlyNonZeroEntry(Oi.kPercent,1)},n.matchesBaseTypePercentage=function(t){return Mi(t,Oi.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(Oi.kPercent,1)},n.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},n.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(Oi.kPercent,1)},e.add=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint),function(t,e){if(t!==e)throw new Error}(t.percentHint,e.percentHint);for(var r=0;Oi.kNumBaseTypes>r;++r){var i=r;if(t.exponents[r]!==e.exponents[r]&&(i!==Oi.kPercent&&(t.applyPercentHint(i),e.applyPercentHint(i)),t.exponents[r]!==e.exponents[r]))return t}return t},e.multiply=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;Oi.kNumBaseTypes>r;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}return t},e}(),Fi=function(e){return"number"==typeof e?new Wi(e,t.UnitType.kNumber):e},Bi=function(e){function n(t){var n;return(n=e.call(this)||this).type_=void 0,n.type_=t,n}hi(n,e);var r=n.prototype;return r.getType=function(){return gi.kUnknownType},r.equals=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Gi(n);return i.every((function(e){return t.equals(e)}))},r.add=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kSumType,r,this);var i=Vi(r,Ci.kAdd);return i||to.create(r)},r.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);r=r.map((function(t){return t.negate()})),Ui(gi.kSumType,r,this);var i=Vi(r,Ci.kAdd);return i||to.create(r)},r.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kProductType,r,this);var i=Hi(r);return i||eo.create(r)},r.div=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);r=r.map((function(t){return t.invert()})),Ui(gi.kProductType,r,this);var i=Hi(r);return i||eo.create(r)},r.min=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kMinType,r,this);var i=Vi(r,Ci.kMin);return i||Qi.create(r)},r.max=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kMaxType,r,this);var i=Vi(r,Ci.kMax);return i||$i.create(r)},r.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=ji(e[0]);return r?(n="string"==typeof t?Ti(t):t,r.convertTo(n)):null},r.toSum=function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i=0,o=e;o.length>i;i++){var a=o[i];if(!n.isValidUnit(Ti(a)))return null}var s=this.sumValue();if(!s.length)return null;for(var u,c=[],l=yi(s);!(u=l()).done;){var h=u.value,f=ji(h);if(!f)return null;c.push(f)}if(0===e.length){c.sort((function(t,e){return t.unit-e.unit}));var d=to.create(c);return _i(!!d),d}for(var p=[],v=function(){var t=Ti(g[y]);_i(n.isValidUnit(t));var e=c.reduce((function(e,n,r){if(n){var i=n.convertTo(t);i&&(e+=i.value,c[r]=null)}return e}),0);p.push(new Wi(e,t))},y=0,g=e;g.length>y;y++)v();if(c.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return to.create(p)},r.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(Oi.kLength);return e&&(t.length=e),(e=this.type_.exponent(Oi.kAngle))&&(t.angle=e),(e=this.type_.exponent(Oi.kTime))&&(t.time=e),(e=this.type_.exponent(Oi.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(Oi.kResolution))&&(t.resolution=e),(e=this.type_.exponent(Oi.kFlex))&&(t.flex=e),(e=this.type_.exponent(Oi.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case Oi.kLength:return"length";case Oi.kAngle:return"angle";case Oi.kTime:return"time";case Oi.kFrequency:return"frequency";case Oi.kResolution:return"resolution";case Oi.kFlex:return"flex";case Oi.kPercent:return"percent"}return""}(this.type_.percentHint)),t},n.isValidUnit=function(e){return!!(e===t.UnitType.kNumber||e==t.UnitType.kPercentage||this.isLength(e)||this.isAngle(e)||this.isTime(e))},r.negate=function(){return Xi.create(this)},r.invert=function(){return qi.create(this)},n}(wi);function Gi(t){return t.map(Fi)}function Ui(t,e,n){_i(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function ji(t){return 0===Object.keys(t.units).length?new Wi(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Wi(t.value,Number(Object.keys(t.units)[0])):null}function Vi(t,e){_i(!!t.length);var n=t[0]instanceof Wi?t[0]:null;if(!n)return null;for(var r=n.value,i=1;t.length>i;i++){var o=t[i]instanceof Wi?t[i]:null;if(!o||o.unit!==n.unit)return null;e===Ci.kAdd?r+=o.value:e===Ci.kMax?r=Math.max(r,o.value):e===Ci.kMin&&(r=Math.min(r,o.value))}return new Wi(r,n.unit)}function Hi(e){_i(!!e.length);for(var n=t.UnitType.kNumber,r=1,i=0;e.length>i;i++){var o=e[i]instanceof Wi?e[i]:null;if(!o)return null;if(o.unit!==t.UnitType.kNumber){if(n!==t.UnitType.kNumber)return null;n=o.unit}r*=o.value}return new Wi(r,n)}var zi=function(e){return function(e){switch(e){case ei.kUNumber:return t.UnitType.kNumber;case ei.kULength:return t.UnitType.kPixels;case ei.kUPercent:return t.UnitType.kPercentage;case ei.kUTime:return t.UnitType.kSeconds;case ei.kUAngle:return t.UnitType.kDegrees;default:return t.UnitType.kUnknown}}(function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return ei.kUNumber;case t.UnitType.kPercentage:return ei.kUPercent;case t.UnitType.kPixels:return ei.kULength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return ei.kUTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return ei.kUAngle;default:return ei.kUOther}}(e))},Wi=function(e){function n(n,r){var i,o;return void 0===r&&(r=t.UnitType.kNumber),o="string"==typeof r?Ti(r):r,(i=e.call(this,new Di(o))||this).unit=void 0,i.value=void 0,i.unit=o,i.value=n,i}hi(n,e);var r=n.prototype;return r.clone=function(){return new n(this.value,this.unit)},r.convertTo=function(e){if(this.unit===e)return new n(this.value,this.unit);var r=zi(this.unit);if(r!==zi(e)||r===t.UnitType.kUnknown)return null;var i=Ei(this.unit)/Ei(e);return new n(this.value*i,e)},r.equals=function(t){return this.value===t.value&&this.unit===t.unit},r.getType=function(){return gi.kUnitType},r.sumValue=function(){var e,n,r=[],i={};return this.unit!==t.UnitType.kNumber&&(i[(e=this.unit,n=zi(e),n===t.UnitType.kUnknown?e:n)]=1),r.push({value:this.value*Ei(this.unit),units:i}),r},r.negate=function(){return new n(-this.value,this.unit)},r.invert=function(){return this.unit===t.UnitType.kNumber?0===this.value?null:new n(1/this.value,this.unit):qi.create(this)},r.buildCSSText=function(e,n,r){var i;switch(this.unit){case t.UnitType.kUnknown:break;case t.UnitType.kInteger:i=Number(this.value).toFixed(0);break;case t.UnitType.kNumber:case t.UnitType.kPercentage:case t.UnitType.kEms:case t.UnitType.kRems:case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:case t.UnitType.kTurns:var o=this.value,a=xi(this.unit);if(-999999>o||o>999999){var s=xi(this.unit);i=!Number.isFinite(o)||Number.isNaN(o)?function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(_i(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e}(o,s):o+(s||"")}else i=""+o+a}return r+=i},n}(Bi),Yi=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.isUnitValue=function(){return!1},e}(Bi),qi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).value=void 0,r.operator="invert",r.value=e,r}hi(e,t),e.create=function(t){return new e(t,Di.negateExponents(t.type_))};var n=e.prototype;return n.clone=function(){return new e(this.value,this.type_)},n.getType=function(){return gi.kInvertType},n.equals=function(t){return t.getType()===gi.kInvertType&&this.value.equals(t.value)},n.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},n.buildCSSText=function(t,e,n){return e==ii.kNo&&(n+=t===ri.kYes?"(":"calc("),n=this.value.buildCSSText(ri.kYes,ii.kNo,n+="1 / "),e===ii.kNo&&(n+=")"),n},e}(Yi),Xi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).value=void 0,r.operator="negate",r.value=e,r}hi(e,t),e.create=function(t){return new e(t,t.type_)};var n=e.prototype;return n.clone=function(){return new e(this.value,this.type_)},n.getType=function(){return gi.kNegateType},n.equals=function(t){return t.getType()===gi.kNegateType&&this.value.equals(t.value)},n.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},n.buildCSSText=function(t,e,n){return e==ii.kNo&&(n+=t===ri.kYes?"(":"calc("),n=this.value.buildCSSText(ri.kYes,ii.kNo,n+="-"),e===ii.kNo&&(n+=")"),n},e}(Yi);function Ki(t,e,n){for(var r=t[0].type_,i=1;t.length>i;i++)r=e(r,t[i].type_,false);return r}var Zi,Ji=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).values=void 0,r.values=e,r}hi(e,t);var n=e.prototype;return n.numericValues=function(){return this.values},n.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Yi),Qi=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="min",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.add))};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kMinType},n.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=yi(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},n.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,o=yi(this.numericValues());!(r=o()).done;){i||(n+=", "),i=!1,n=r.value.buildCSSText(ri.kYes,ii.kYes,n)}return n+=")"},e}(Ji),$i=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="max",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.add))};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kMaxType},n.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=yi(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},n.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,o=yi(this.numericValues());!(r=o()).done;){i||(n+=", "),i=!1,n=r.value.buildCSSText(ri.kYes,ii.kYes,n)}return n+=")"},e}(Ji),to=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="sum",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.add))},e.numericTypeFromUnitMap=function(t){var e=new Di;return Object.keys(t).forEach((function(n){var r=t[n];e=Di.multiply(e,new Di(Number(n),r),false),_i(!0)})),e},e.canCreateNumericTypeFromSumValue=function(t){var e=this;_i(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return Di.add(n,e.numericTypeFromUnitMap(t.units),false),!0}))};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kSumType},n.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(li({},e)):t[n].value+=e.value}))})),e.canCreateNumericTypeFromSumValue(t)?t:null},n.buildCSSText=function(t,e,n){e==ii.kNo&&(n+=t===ri.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ri.kYes,ii.kNo,n);for(var i=1;r.length>i;i++){var o=r[i];n=o.getType()===gi.kNegateType?o.value.buildCSSText(ri.kYes,ii.kNo,n+=" - "):o.buildCSSText(ri.kYes,ii.kNo,n+=" + ")}return e===ii.kNo&&(n+=")"),n},e}(Ji),eo=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="product",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.multiply))},e.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Mi(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kProductType},n.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(n){var r=n.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(n){i.push({value:t.value*n.value,units:e.multiplyUnitMaps(t.units,n.units)})}))})),t=i})),t},n.buildCSSText=function(t,e,n){e==ii.kNo&&(n+=t===ri.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ri.kYes,ii.kNo,n);for(var i=1;r.length>i;i++){var o=r[i];n=o.getType()===gi.kInvertType?o.value.buildCSSText(ri.kYes,ii.kNo,n+=" / "):o.buildCSSText(ri.kYes,ii.kNo,n+=" * ")}return e===ii.kNo&&(n+=")"),n},e}(Ji),no=new Wi(0,"px"),ro=new Wi(0,"deg"),io=function(t){function e(e,n,r,i,o){var a;return void 0===i&&(i=1),void 0===o&&(o=!1),(a=t.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}hi(e,t);var n=e.prototype;return n.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},n.buildCSSText=function(t,e,n){return n+"rgba("+this.r+","+this.g+","+this.b+","+this.alpha+")"},e}(Si);(Zi=t.PropertySyntax||(t.PropertySyntax={})).COORDINATE="<coordinate>",Zi.COLOR="<color>",Zi.PAINT="<paint>",Zi.NUMBER="<number>",Zi.ANGLE="<angle>",Zi.OPACITY_VALUE="<opacity-value>",Zi.SHADOW_BLUR="<shadow-blur>",Zi.LENGTH="<length>",Zi.PERCENTAGE="<percentage>",Zi.LENGTH_PERCENTAGE="<length> | <percentage>",Zi.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",Zi.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",Zi.LIST_OF_POINTS="<list-of-points>",Zi.PATH="<path>",Zi.FILTER="<filter>",Zi.Z_INDEX="<z-index>",Zi.OFFSET_PATH="<offset-path>",Zi.OFFSET_DISTANCE="<offset-distance>",Zi.CLIP_PATH="<clip-path>",Zi.MARKER="<marker>",Zi.TRANSFORM="<transform>",Zi.TRANSFORM_ORIGIN="<transform-origin>",Zi.TEXT="<text>",Zi.TEXT_TRANSFORM="<text-transform>";var oo=t.Syringe.defineToken(""),ao=t.Syringe.defineToken(""),so={number:function(t){return new Wi(t)},percent:function(t){return new Wi(t,"%")},px:function(t){return new Wi(t,"px")},em:function(t){return new Wi(t,"em")},rem:function(t){return new Wi(t,"rem")},deg:function(t){return new Wi(t,"deg")},grad:function(t){return new Wi(t,"grad")},rad:function(t){return new Wi(t,"rad")},turn:function(t){return new Wi(t,"turn")},s:function(t){return new Wi(t,"s")},ms:function(t){return new Wi(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;Lt.get(oo).registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},registerLayout:function(t,e){Lt.get(ao).registerLayout(t,e)}},uo=t.Syringe.defineToken(""),co=t.Syringe.defineToken(""),lo=new Ni("unset"),ho=new Ni("initial"),fo=new Ni("inherit"),po={"":lo,unset:lo,initial:ho,inherit:fo},vo=function(t){return po[t]||(po[t]=new Ni(t)),po[t]},yo=new io(0,0,0,0,!0),go=new io(0,0,0,0),mo=ar((function(t,e,n,r){return new io(t,e,n,r)}),(function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"})),bo=ar((function(e,n){return void 0===n&&(n=t.UnitType.kNumber),new Wi(e,n)}),(function(e,n){return void 0===n&&(n=t.UnitType.kNumber),""+e+n})),To={},Eo=0;var xo="undefined"!=typeof window&&void 0!==window.document;function wo(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function So(t){var e=t;do{var n;if(null===(n=e.style)||void 0===n?void 0:n.clipPath)return e;e=e.parentElement}while(null!==e);return null}function ko(t,e){if(xo)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var No="Method not implemented.",Po="Use document.documentElement instead.",_o={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Mo(t){var e=t.type,n=t.value;return"hex"===e?"#"+n:"literal"===e?n:"rgb"===e?"rgb("+n.join(",")+")":"rgba("+n.join(",")+")"}var Ao=function(){var t=/^(linear\-gradient)/i,e=/^(repeating\-linear\-gradient)/i,n=/^(radial\-gradient)/i,r=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,a=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,s=/^(left|center|right|top|bottom)/i,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,h=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,f=/^\(/,d=/^\)/,p=/^,/,v=/^\#([0-9a-fA-F]+)/,y=/^([a-zA-Z]+)/,g=/^rgb/i,m=/^rgba/i,b=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,T="";function E(t){throw new Error(T+": "+t)}function x(){var t=O(w);return T.length>0&&E("Invalid input not EOF"),t}function w(){return S("linear-gradient",t,N)||S("repeating-linear-gradient",e,N)||S("radial-gradient",n,P)||S("repeating-radial-gradient",r,P)||S("conic-gradient",i,P)}function S(t,e,n){return k(e,(function(e){var r=n();return r&&(B(p)||E("Missing comma before color stops")),{type:t,orientation:r,colorStops:O(I)}}))}function k(t,e){var n=B(t);if(n){B(f)||E("Missing (");var r=e(n);return B(d)||E("Missing )"),r}}function N(){return F("directional",o,1)||F("angular",h,1)}function P(){var t,e,n=_();return n&&((t=[]).push(n),e=T,B(p)&&((n=_())?t.push(n):T=e)),t}function _(){var t=function(){var t=F("shape",/^(circle)/i,0);t&&(t.style=D()||M());return t}()||function(){var t=F("shape",/^(ellipse)/i,0);t&&(t.style=L()||M());return t}();if(t)t.at=A();else{var e=M();if(e){t=e;var n=A();n&&(t.at=n)}else{var r=C();r&&(t={type:"default-radial",at:r})}}return t}function M(){return F("extent-keyword",a,1)}function A(){if(F("position",/^at/,0)){var t=C();return t||E("Missing positioning value"),t}}function C(){var t={x:L(),y:L()};if(t.x||t.y)return{type:"position",value:t}}function O(t){var e=t(),n=[];if(e)for(n.push(e);B(p);)(e=t())?n.push(e):E("One extra comma");return n}function I(){var t=F("hex",v,1)||k(m,(function(){return{type:"rgba",value:O(R)}}))||k(g,(function(){return{type:"rgb",value:O(R)}}))||F("literal",y,0);return t||E("Expected color definition"),t.length=L(),t}function R(){return B(b)[1]}function L(){return F("%",c,1)||F("position-keyword",s,1)||D()}function D(){return F("px",u,1)||F("em",l,1)}function F(t,e,n){var r=B(e);if(r)return{type:t,value:r[n]}}function B(t){var e=/^[\n\r\t\s]+/.exec(T);e&&G(e[0].length);var n=t.exec(T);return n&&G(n[0].length),n}function G(t){T=T.substring(t)}return function(t){return T=t,x()}}();function Co(t){return void 0===t?0:t>360||-360>t?t%360:t}function Oo(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),rr(t)?Ce(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new ne(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):Ce(t[0],t[1]||e,t[2]||n);var r,i}function Io(t){return t*(Math.PI/180)}function Ro(t){return t*(180/Math.PI)}function Lo(t){return 360*t}function Do(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,o=be(Me(),e),a=o[0],s=o[1],u=o[2],c=Math.asin(-e[2]/a);return i>c?c>-i?(n=Math.atan2(e[6]/s,e[10]/u),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/s,e[5]/s)):(r=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=c,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,u=o*o,c=n*n+a+s+u,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):-.499995*c>l?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+u)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function Fo(t,e,n,r,i){var o,a,s,u,c,l,h,f,d,p,v=Math.cos(t),y=Math.sin(t);return o=r*v,a=i*y,s=0,u=-r*y,c=i*v,l=0,h=e,f=n,d=1,(p=new ne(9))[0]=o,p[1]=a,p[2]=s,p[3]=u,p[4]=c,p[5]=l,p[6]=h,p[7]=f,p[8]=d,p}function Bo(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);0>e*i-n*r&&(i>e?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var s=Ro(Math.atan2(n,e));return[t[6],t[7],o,a,s]}var Go,Uo=ie(),jo=ie(),Vo=We(),Ho=[Me(),Me(),Me()],zo=Me();function Wo(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}(Go=t.Shape||(t.Shape={})).GROUP="g",Go.CIRCLE="circle",Go.ELLIPSE="ellipse",Go.IMAGE="image",Go.RECT="rect",Go.LINE="line",Go.POLYLINE="polyline",Go.POLYGON="polygon",Go.TEXT="text",Go.PATH="path",Go.HTML="html",Go.MESH="mesh";var Yo=t.Syringe.defineToken(""),qo=t.Syringe.defineToken(""),Xo=t.Syringe.defineToken("");function Ko(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=qn(t.parsedStyle.path.absolutePath,void 0,fn(fn({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function Zo(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,u=n+t,c=r-e,l=r+e;return[["M",s,r],["C",s,r-a,n-o,c,n,c],["C",n+o,c,u,r-a,u,r],["C",u,r+a,n+o,l,n,l],["C",n-o,l,s,r+a,s,r],["Z"]]}var Jo=function(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)},Qo=function(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)},$o=function(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)},ta=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=Jo,this.call=Jo,this._callAsync=Qo,this.callAsync=Qo,this._promise=$o,this.promise=$o,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e,n=yi(this.interceptors);!(e=n()).done;){var r=e.value;if(r.register){var i=r.register(t);void 0!==i&&(t=i)}}return t},e.withOptions=function(t){var e=this,n=function(e){return Object.assign({},t,"string"==typeof e?{name:e}:e)};return{name:this.name,tap:function(t,r){return e.tap(n(t),r)},tapAsync:function(t,r){return e.tapAsync(n(t),r)},tapPromise:function(t,r){return e.tapPromise(n(t),r)},isUsed:function(){return e.isUsed()},withOptions:function(t){return e.withOptions(n(t))}}},e.isUsed=function(){return this.taps.length>0||this.interceptors.length>0},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){var e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));var n=0;"number"==typeof t.stage&&(n=t.stage);for(var r=this.taps.length;r>0;){r--;var i=this.taps[r];this.taps[r+1]=i;var o=i.stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(e.size>0)continue}if(n>=o){r++;break}}this.taps[r]=t},t}(),ea=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="";i+='"use strict";\n',i+=this.header(),i+="return new Promise((function(_resolve, _reject) {\n",n&&(i+="var _sync = true;\n",i+="function _error(_err) {\n",i+="if(_sync)\n",i+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",i+="else\n",i+="_reject(_err);\n",i+="};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map((function(t){return t.fn}))},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var e=this;if(this.options.interceptors.length>0){for(var n=t.onError,r=t.onResult,i=t.onDone,o="",a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.call&&(o+=this.getInterceptor(a)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.content(Object.assign(t,{onError:n&&function(t){for(var r="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].error&&(r+=e.getInterceptor(i)+".error("+t+");\n")}return r+=n(t)},onResult:r&&function(t){for(var n="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].result&&(n+=e.getInterceptor(i)+".result("+t+");\n")}return n+=r(t)},onDone:i&&function(){for(var t="",n=0;e.options.interceptors.length>n;n++){e.options.interceptors[n].done&&(t+=e.getInterceptor(n)+".done();\n")}return t+=i()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=yi(this.options.taps);!(t=e()).done;){if(t.value.context)return!0}return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,o=e.rethrowIfPossible,a="",s=!1,u=0;this.options.interceptors.length>u;u++){var c=this.options.interceptors[u];c.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(u)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var l=this.options.taps[t];switch(l.type){case"sync":o||(a+="var _hasError"+t+" = false;\n",a+="try {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",o||(a+="} catch(_err) {\n",a+="_hasError"+t+" = true;\n",a+=n("_err"),a+="}\n",a+="if(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h="";h+=r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n",h+="if(_err"+t+") {\n",h+=n("_err"+t),h+="} else {\n",r&&(h+=r("_result"+t)),i&&(h+=i()),h+="}\n",a+="_fn"+t+"("+this.args({before:l.context?"_context":void 0,after:h+="})"})+");\n";break;case"promise":a+="var _hasResult"+t+" = false;\n",a+="var _promise"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",a+="if (!_promise"+t+" || !_promise"+t+".then)\n",a+=" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n",a+="_promise"+t+".then((function(_result"+t+") {\n",a+="_hasResult"+t+" = true;\n",r&&(a+=r("_result"+t)),i&&(a+=i()),a+="}), function(_err"+t+") {\n",a+="if(_hasResult"+t+") throw _err"+t+";\n",a+=n("_err"+t),a+="});\n"}return a},e.callTapsSeries=function(t){var e=this,n=t.onError,r=t.onResult,i=t.resultReturns,o=t.onDone,a=t.doneReturns,s=t.rethrowIfPossible;if(0===this.options.taps.length)return o();for(var u=this.options.taps.findIndex((function(t){return"sync"!==t.type})),c=i||a,l="",h=o,f=0,d=function(t){var i=t;h!==o&&("sync"!==e.options.taps[i].type||f++>20)&&(f=0,l+="function _next"+i+"() {\n",l+=h(),l+="}\n",h=function(){return(c?"return ":"")+"_next"+i+"();\n"});var a=h,d=function(t){return t?"":o()},p=e.callTap(i,{onError:function(t){return n(i,t,a,d)},onResult:r&&function(t){return r(i,t,a,d)},onDone:!r&&a,rethrowIfPossible:s&&(0>u||u>i)});h=function(){return p}},p=this.options.taps.length-1;p>=0;p--)d(p);return l+=h()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,r=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var i=this.options.taps.every((function(t){return"sync"===t.type})),o="";i||(o+="var _looper = (function() {\n",o+="var _loopAsync = false;\n"),o+="var _loop;\n",o+="do {\n",o+="_loop = false;\n";for(var a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.loop&&(o+=this.getInterceptor(a)+".loop("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var o="";return o+="if("+e+" !== undefined) {\n",o+="_loop = true;\n",i||(o+="if(_loopAsync) _looper();\n"),o+=r(!0),o+="} else {\n",o+=n(),o+="}\n"},onDone:n&&function(){var t="";return t+="if(!_loop) {\n",t+=n(),t+="}\n"},rethrowIfPossible:r&&i}),o+="} while(_loop);\n",i||(o+="_loopAsync = true;\n",o+="});\n",o+="_looper();\n"),o},e.callTapsParallel=function(t){var e=this,n=t.onError,r=t.onResult,i=t.onDone,o=t.rethrowIfPossible,a=t.onTap,s=void 0===a?function(t,e){return e()}:a;if(1>=this.options.taps.length)return this.callTapsSeries({onError:n,onResult:r,onDone:i,rethrowIfPossible:o});var u="";u+="do {\n",u+="var _counter = "+this.options.taps.length+";\n",i&&(u+="var _done = (function() {\n",u+=i(),u+="});\n");for(var c=function(t){var a=function(){return i?"if(--_counter === 0) _done();\n":"--_counter;"},c=function(t){return t||!i?"_counter = 0;\n":"_counter = 0;\n_done();\n"};u+="if(_counter <= 0) break;\n",u+=s(t,(function(){return e.callTap(t,{onError:function(e){var r="";return r+="if(_counter > 0) {\n",r+=n(t,e,a,c),r+="}\n"},onResult:r&&function(e){var n="";return n+="if(_counter > 0) {\n",n+=r(t,e,a,c),n+="}\n"},onDone:!r&&function(){return a()},rethrowIfPossible:o})}),a,c)},l=0;this.options.taps.length>l;l++)c(l);return u+="} while(false);\n"},e.args=function(t){var e=void 0===t?{}:t,n=e.before,r=e.after,i=this._args;return n&&(i=[n].concat(i)),r&&(i=i.concat(r)),0===i.length?"":i.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),na=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsParallel({onError:function(t,n,r,i){return e(n)+i(!0)},onDone:t.onDone})},e}(ea),ra=new na,ia=function(t){return ra.setup(this,t),ra.create(t)},oa=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=ia,r._call=void 0,r.call=void 0,r}return hi(e,t),e}(ta),aa=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e,r,i){return n(e)+i(!0)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])}})},e}(ea),sa=new aa,ua=function(t){return sa.setup(this,t),sa.create(t)},ca=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=ua,r._call=void 0,r.call=void 0,r}return hi(e,t),e}(ta),la=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsSeries({onError:function(t,n){return e(n)},onDone:t.onDone,rethrowIfPossible:t.rethrowIfPossible})},e}(ea),ha=new la,fa=function(){throw new Error("tapAsync is not supported on a SyncHook")},da=function(){throw new Error("tapPromise is not supported on a SyncHook")},pa=function(t){return ha.setup(this,t),ha.create(t)},va=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=fa,r.tapPromise=da,r.compile=pa,r}return hi(e,t),e}(ta),ya=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])},doneReturns:t.resultReturns,rethrowIfPossible:t.rethrowIfPossible})},e}(ea),ga=new ya,ma=function(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")},ba=function(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")},Ta=function(t){return ga.setup(this,t),ga.create(t)},Ea=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=ma,r.tapPromise=ba,r.compile=Ta,r}return hi(e,t),e}(va),xa=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];var wa=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Sa=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ka=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Na=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Pa={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},_a=ar((function(t){return"angular"===t.type?Number(t.value):Pa[t.value]||0})),Ma=ar((function(t){var e=.5,n=.5;if("position"===(null==t?void 0:t.type)){var r=t.value,i=r.x,o=r.y;"position-keyword"===(null==i?void 0:i.type)&&("left"===i.value?e=0:"center"===i.value?e=.5:"right"===i.value?e=1:"top"===i.value?n=0:"bottom"===i.value&&(n=1)),"position-keyword"===(null==o?void 0:o.type)&&("left"===o.value?e=0:"center"===o.value?n=.5:"right"===o.value?e=1:"top"===o.value?n=0:"bottom"===o.value&&(n=1)),"%"===(null==i?void 0:i.type)&&(e=Number(i.value)/100),"%"===(null==o?void 0:o.type)&&(n=Number(i.value)/100)}return{cx:e,cy:n}})),Aa=ar((function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return Ao(e).map((function(n){var r=n.type,i=n.orientation,o=n.colorStops;!function(t){var e,n,r=t.length;t[r-1].length=null!==(e=t[r-1].length)&&void 0!==e?e:{type:"%",value:"100"},r>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var i=0,o=Number(t[0].length.value),a=1;r>a;a++){var s,u=null===(s=t[a].length)||void 0===s?void 0:s.value;if(!$n(u)&&!$n(o)){for(var c=1;a-i>c;c++)t[i+c].length={type:"%",value:""+(o+(Number(u)-o)*c/(a-i))};i=a,o=Number(u)}}}(o);var a=o.map((function(t){return[Number(t.length.value)/100,Mo(t)]}));if("linear-gradient"===r)return new ki(t.GradientType.LinearGradient,{angle:i?_a(i):0,steps:a,hash:e});if("radial-gradient"===r&&(i||(i=[{type:"shape",value:"circle"}]),"shape"===i[0].type&&"circle"===i[0].value)){var s=Ma(i[0].at);return new ki(t.GradientType.RadialGradient,{cx:s.cx,cy:s.cy,steps:a,hash:e})}}));var n=e[0];if("("===e[1]||"("===e[2])if("l"===n){var r=wa.exec(e);if(r){var i,o=(null===(i=r[2].match(Na))||void 0===i?void 0:i.map((function(t){return t.split(":")})))||[];return[new ki(t.GradientType.LinearGradient,{angle:parseFloat(r[1]),steps:o.map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:e})]}}else if("r"===n){var a=function(t){var e=Sa.exec(t);if(e){var n;return{cx:.5,cy:.5,steps:((null===(n=e[4].match(Na))||void 0===n?void 0:n.map((function(t){return t.split(":")})))||[]).map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:t}}return null}(e);if(a){if(!er(a))return[new ki(t.GradientType.RadialGradient,a)];e=a}}else if("p"===n)return function(t){var e=ka.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(e)}));function Ca(t){return tr(t)&&!!t.image}var Oa=ar((function(t){if(Ca(t))return li({repetition:"repeat"},t);if($n(t)&&(t=""),"transparent"===t)return go;"currentColor"===t&&(t="black");var e=Aa(t);if(e)return e;var n=kr(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),mo.apply(void 0,r)}));function Ia(t,e){if(t instanceof io&&e instanceof io)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;3>n;n++)e[n]=Math.round(nr(e[n],0,255));return e[3]=nr(e[3],0,1),"rgba("+e.join(",")+")"}]}var Ra,La=function(){function t(t,e){this.center=Me(),this.halfExtents=Me(),this.min=Me(),this.max=Me(),this.update(t,e)}t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var e=t.prototype;return e.update=function(t,e){t&&Oe(this.center,t),e&&Oe(this.halfExtents,e||Ce(0,0,0)),this.min=He(this.min,this.center,this.halfExtents),this.max=Re(this.max,this.center,this.halfExtents)},e.setMinMax=function(t,e){Re(this.center,e,t),De(this.center,this.center,.5),He(this.halfExtents,e,t),De(this.halfExtents,this.halfExtents,.5),Oe(this.min,t),Oe(this.max,e)},e.getMin=function(){return this.min},e.getMax=function(){return this.max},e.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=r-s,h=r+s,f=i-u,d=i+u,p=o-c,v=o+c,y=e.center,g=y[0],m=y[1],b=y[2],T=e.halfExtents,E=T[0],x=T[1],w=T[2],S=g-E,k=g+E,N=m-x,P=m+x,_=b-w,M=b+w;l>S&&(l=S),k>h&&(h=k),f>N&&(f=N),P>d&&(d=P),p>_&&(p=_),M>v&&(v=M),n[0]=.5*(l+h),n[1]=.5*(f+d),n[2]=.5*(p+v),a[0]=.5*(h-l),a[1]=.5*(d-f),a[2]=.5*(v-p),this.min[0]=l,this.min[1]=f,this.min[2]=p,this.max[0]=h,this.max[1]=d,this.max[2]=v}},e.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],s=e[4],u=e[8],c=e[1],l=e[5],h=e[9],f=e[2],d=e[6],p=e[10],v=Math.abs(a),y=Math.abs(s),g=Math.abs(u),m=Math.abs(c),b=Math.abs(l),T=Math.abs(h),E=Math.abs(f),x=Math.abs(d),w=Math.abs(p);Ie(n,e[12]+a*i[0]+s*i[1]+u*i[2],e[13]+c*i[0]+l*i[1]+h*i[2],e[14]+f*i[0]+d*i[1]+p*i[2]),Ie(r,v*o[0]+y*o[1]+g*o[2],m*o[0]+b*o[1]+T*o[2],E*o[0]+x*o[1]+w*o[2]),this.min=He(this.min,n,r),this.max=Re(this.max,n,r)},e.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return!(n[0]>r[0]||i[0]>e[0]||n[1]>r[1]||i[1]>e[1]||n[2]>r[2]||i[2]>e[2])},e.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o=new t,a=(n=Me(),r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),s=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}(Me(),this.getMax(),e.getMax());return o.setMinMax(a,s),o},e.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(e[0]>t[0]||t[0]>n[0]||e[1]>t[1]||t[1]>n[1]||e[2]>t[2]||t[2]>n[2])},e.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Oe(Me(),this.min):272===t.pnVertexFlag?Ce(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.max[2]):Ce(this.max[0],this.max[1],1===t.pnVertexFlag?this.min[2]:this.max[2])},e.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Oe(Me(),this.max):272===t.pnVertexFlag?Ce(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.min[2]):Ce(this.min[0],this.min[1],1===t.pnVertexFlag?this.max[2]:this.min[2])},t}(),Da=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Ce(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},e.distanceToPoint=function(t){return Be(t,this.normal)-this.distance},e.normalize=function(){var t=1/ze(this.normal);De(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&1>=i;return o&&n&&function(t,e,n,r){var i=e[0],o=e[1],a=e[2];t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a)}(n,t,e,i),o},t}();(Ra=t.Mask||(t.Mask={}))[Ra.OUTSIDE=4294967295]="OUTSIDE",Ra[Ra.INSIDE=0]="INSIDE",Ra[Ra.INDETERMINATE=2147483647]="INDETERMINATE";var Fa=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;6>e;e++)this.planes.push(new Da)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];Ie(this.planes[0].normal,i-e,u-o,f-c),this.planes[0].distance=y-d,Ie(this.planes[1].normal,i+e,u+o,f+c),this.planes[1].distance=y+d,Ie(this.planes[2].normal,i+n,u+a,f+l),this.planes[2].distance=y+p,Ie(this.planes[3].normal,i-n,u-a,f-l),this.planes[3].distance=y-p,Ie(this.planes[4].normal,i-r,u-s,f-h),this.planes[4].distance=y-v,Ie(this.planes[5].normal,i+r,u+s,f+h),this.planes[5].distance=y+v,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),Ba=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Ga=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}();function Ua(t,e){if($n(e))return bo(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return bo(Number(e),"px");if("deg".search(t)>=0)return bo(Number(e),"deg")}var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return bo(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var ja=ar((function(t){return Ua(new RegExp("px","g"),t)})),Va=(ar((function(t){return Ua(new RegExp("%","g"),t)})),ar((function(t){return rr(t)||isFinite(Number(t))?bo(Number(t),"px"):Ua(new RegExp("px|%|em|rem","g"),t)}))),Ha=ar((function(t){return Ua(new RegExp("deg|rad|grad|turn","g"),t)}));function za(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,u=zi(t.unit),c=t.convertTo(u),l=e.convertTo(u);return c&&l?(a=c.value,s=l.value,o=xi(t.unit)):(Wi.isLength(t.unit)||Wi.isLength(e.unit))&&(a=qa(t,i,n),s=qa(e,i,n),o="px"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Wa(e){var n=0;return e.unit===t.UnitType.kDegrees?n=e.value:e.unit===t.UnitType.kRadians?n=Ro(Number(e.value)):e.unit===t.UnitType.kTurns&&(n=Lo(Number(e.value))),n}function Ya(t){return er(t)?t.split(" ").map((function(t){return Va(t)})):t.map((function(t){return Va(t.toString())}))}function qa(e,n,r){if(e.unit===t.UnitType.kPixels)return Number(e.value);if(e.unit===t.UnitType.kPercentage&&r){var i=r.nodeName===t.Shape.GROUP?r.getLocalBounds():r.getGeometryBounds(),o=0;return La.isEmpty(i)||(o=2*i.halfExtents[n]),Number(e.value)/100*o}return 0}var Xa=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ka(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,Xa.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return Ua(/deg|rad|grad|turn|px|%/g,t)||Oa(t)}))}),n.lastIndex===t.length)return r}return[]}function Za(t){return t.toString()}var Ja=ar((function(t){return"number"==typeof t?bo(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?bo(Number(t)):bo(0)}));ar((function(t){return er(t)?t.split(" ").map(Ja):t.map(Ja)}));function Qa(t,e){return[t,e,Za]}function $a(t,e){return function(n,r){return[n,r,function(n){return Za(nr(n,t,e))}]}}function ts(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}var es=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:{x:0,y:0,width:0,height:0}};var e;try{e=Cn(t)}catch(n){e=Cn(""),console.error("[g]: Invalid SVG Path definition: "+t)}var n=function(t){for(var e=!1,n=t.length,r=0;n>r;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;t.length>i;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=Gn(e,!0),s=a[0],u=a[1],c=function(t){for(var e,n,r=[],i=null,o=null,a=0,s=t.length,u=0;s>u;u++){var c=t[u];o=t[u+1];var l=c[0],h={command:l,prePoint:i,params:c,startTangent:null,endTangent:null};"M"===l&&(a=u);var f=c.length;h.currentPoint=i=[c[f-2],c[f-1]],r[a]&&(e=i)[0]===(n=r[a].currentPoint)[0]&&e[1]===n[1]&&(r[a].prePoint=h.prePoint),h.nextPoint=o?[o[o.length-2],o[o.length-1]]:null;var d=h.prePoint;if("C"===l){var p=[c[1],c[2]],v=[c[3],c[4]];h.startTangent=[d[0]-p[0],d[1]-p[1]],h.endTangent=[i[0]-v[0],i[1]-v[1]],0===h.startTangent[0]&&0===h.startTangent[1]&&(h.startTangent=[p[0]-v[0],p[1]-v[1]]),0===h.endTangent[0]&&0===h.endTangent[1]&&(h.endTangent=[v[0]-p[0],v[1]-p[1]])}r.push(h)}return r}(s),l=function(t,e){if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var n=qn(t,void 0,fn(fn({},e),{length:!1})),r=n.min,i=r.x,o=r.y,a=n.max,s=a.x,u=a.y,c=s-i,l=u-o;return{width:c,height:l,x:i,y:o,x2:s,y2:u,cx:i+c/2,cy:o+l/2,cz:Math.max(c,l)+Math.min(c,l)/2}}(e),h=l.x,f=l.y,d=l.width,p=l.height;return{absolutePath:e,hasArc:n,segments:c,polygons:i,polylines:o,curve:s,totalLength:0,zCommandIndexes:u,rect:{x:Number.isFinite(h)?h:0,y:Number.isFinite(f)?f:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(p)?p:0}}},ns=ar(es);function rs(t,e){var n=er(t)?ns(t):es(t);return e&&(e.parsedStyle.defX=n.rect.x,e.parsedStyle.defY=n.rect.y),n}function is(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=Zn(r,i));var a,s,u,c,l,h,f,d,p=Xn(o[0])!==Xn(o[1])?(s=(a=o[0]).slice(1).map((function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):a[0].slice(1).concat(t.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse(),[["M"].concat(s[0].slice(0,2))].concat(s.map((function(t){return["C"].concat(t.slice(2))})))):hn(o[0]);return[p,(u=o[1],c=p,l=u.length-1,h=[],f=0,d=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a=i+o;return 0===o||t[a]&&"M"===t[a][0]?["M"].concat(t[a].slice(-2)):(e>a||(a-=n),t[a])}))}))}(u),d.forEach((function(t,e){u.slice(1).forEach((function(t,n){f+=Ln(u[(e+n)%l].slice(-2),c[n%l].slice(-2))})),h[e]=f,f=0})),d[h.indexOf(Math.min.apply(null,h))]),function(t){return t}]}function os(t,e){var n;n=er(t)?t.split(" ").map((function(t){var e=t.split(","),n=e[1];return[Number(e[0]),Number(n)]})):t;var r,i,o=[],a=0,s=Ur(n);n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=Gr.length(t[0],t[1],n[e+1][0],n[e+1][1]),r[1]=(a+=i)/s,o.push(r))}));var u=Math.min.apply(Math,n.map((function(t){return t[0]}))),c=Math.min.apply(Math,n.map((function(t){return t[1]})));return e&&(e.parsedStyle.defX=u,e.parsedStyle.defY=c),{points:n,totalLength:s,segments:o}}var as=null;function ss(t){return function(e){var n=0;return t.map((function(t){return t===as?e[n++]:t}))}}function us(t){return t}var cs={matrix:["NNNNNN",[as,as,0,0,as,as,0,0,0,0,1,0,as,as,0,1],us],matrix3d:["NNNNNNNNNNNNNNNN",us],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ss([as,as,so.number(1)]),us],scalex:["N",ss([as,so.number(1),so.number(1)]),ss([as,so.number(1)])],scaley:["N",ss([so.number(1),as,so.number(1)]),ss([so.number(1),as])],scalez:["N",ss([so.number(1),so.number(1),as])],scale3d:["NNN",us],skew:["Aa",null,us],skewx:["A",null,ss([as,ro])],skewy:["A",null,ss([ro,as])],translate:["Tt",ss([as,as,no]),us],translatex:["T",ss([as,no,no]),ss([as,no])],translatey:["T",ss([no,as,no]),ss([no,as])],translatez:["L",ss([no,no,as])],translate3d:["TTL",us]};function ls(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=cs[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(s.length>u.length)return[];for(var c=[],l=0;u.length>l;l++){var h=s[l],f=u[l],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?ro:Ha(t)},N:Ja,T:Va,L:ja}[f.toUpperCase()](h):{a:ro,n:c[0],t:no}[f]))return[];c.push(d)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function hs(t){var e,n,r,i;switch(t.t){case"rotatex":return i=Io(Wa(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Io(Wa(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Io(Wa(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Io(Wa(t.d[3]));var o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var s=Math.sin(i/2),u=s*Math.cos(i/2),c=s*s;return[1-2*(n*n+r*r)*c,2*(e*n*c+r*u),2*(e*r*c-n*u),0,2*(e*n*c-r*u),1-2*(e*e+r*r)*c,2*(n*r*c+e*u),0,2*(e*r*c+n*u),2*(n*r*c-e*u),1-2*(e*e+n*n)*c,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var l=Io(Wa(t.d[0])),h=Io(Wa(t.d[1]));return[1,Math.tan(h),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Io(Wa(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Io(Wa(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=qa(t.d[0],0,null)||0,n=qa(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=qa(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=qa(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=qa(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=qa(t.d[0],0,null)||0,n=qa(t.d[1],0,null)||0,r=qa(t.d[2],0,null)||0,1];case"perspective":var f=qa(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map((function(t){return t.value}))}}function fs(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function ds(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;16>i;i++)t[i]=e[i]*r;return!0}(Uo,t))return!1;if(oe(jo,Uo),jo[3]=0,jo[7]=0,jo[11]=0,jo[15]=1,1e-8>Math.abs(le(jo)))return!1;var a,s,u=Uo[3],c=Uo[7],l=Uo[11],h=Uo[12],f=Uo[13],d=Uo[14],p=Uo[15];if(0!==u||0!==c||0!==l){if(Vo[0]=u,Vo[1]=c,Vo[2]=l,Vo[3]=p,!ce(jo,jo))return!1;ue(jo,jo),Ye(i,Vo,jo)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=h,e[1]=f,e[2]=d,(a=Ho)[0][0]=(s=Uo)[0],a[0][1]=s[1],a[0][2]=s[2],a[1][0]=s[4],a[1][1]=s[5],a[1][2]=s[6],a[2][0]=s[8],a[2][1]=s[9],a[2][2]=s[10],n[0]=Ae(Ho[0]),Fe(Ho[0],Ho[0]),r[0]=Be(Ho[0],Ho[1]),Wo(Ho[1],Ho[1],Ho[0],1,-r[0]),n[1]=Ae(Ho[1]),Fe(Ho[1],Ho[1]),r[0]/=n[1],r[1]=Be(Ho[0],Ho[2]),Wo(Ho[2],Ho[2],Ho[0],1,-r[1]),r[2]=Be(Ho[1],Ho[2]),Wo(Ho[2],Ho[2],Ho[1],1,-r[2]),n[2]=Ae(Ho[2]),Fe(Ho[2],Ho[2]),r[1]/=n[2],r[2]/=n[2],Ge(zo,Ho[1],Ho[2]),0>Be(Ho[0],zo))for(var v=0;3>v;v++)n[v]*=-1,Ho[v][0]*=-1,Ho[v][1]*=-1,Ho[v][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+Ho[0][0]-Ho[1][1]-Ho[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-Ho[0][0]+Ho[1][1]-Ho[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-Ho[0][0]-Ho[1][1]+Ho[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+Ho[0][0]+Ho[1][1]+Ho[2][2],0)),Ho[2][1]>Ho[1][2]&&(o[0]=-o[0]),Ho[0][2]>Ho[2][0]&&(o[1]=-o[1]),Ho[1][0]>Ho[0][1]&&(o[2]=-o[2])}(function(t){return 0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(hs).reduce(fs)}(t),e,n,r,i,o),[[e,n,r,o,i]]}var ps=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;4>r;r++)for(var i=0;4>i;i++)for(var o=0;4>o;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;4>s;s++)a[s][3]=o[s];for(var u=0;3>u;u++)for(var c=0;3>c;c++)a[3][u]+=e[c]*a[c][u];var l=i[0],h=i[1],f=i[2],d=i[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(h*h+f*f),p[0][1]=2*(l*h-f*d),p[0][2]=2*(l*f+h*d),p[1][0]=2*(l*h+f*d),p[1][1]=1-2*(l*l+f*f),p[1][2]=2*(h*f-l*d),p[2][0]=2*(l*f-h*d),p[2][1]=2*(h*f+l*d),p[2][2]=1-2*(l*l+h*h),a=t(a,p);var v,y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],a=t(a,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],a=t(a,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],a=t(a,y));for(var g=0;3>g;g++)for(var m=0;3>m;m++)a[g][m]*=n[g];return 0==(v=a)[0][2]&&0==v[0][3]&&0==v[1][2]&&0==v[1][3]&&0==v[2][0]&&0==v[2][1]&&1==v[2][2]&&0==v[2][3]&&0==v[3][2]&&1==v[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])}}();function vs(t){return t.toFixed(6).replace(".000000","")}function ys(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=ds(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=ds(e)),null===n[0]||null===r[0]?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;t.length>r;r++)n+=t[r]*e[r];return n}(t,e);r=nr(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),s=0;4>s;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(n[0][3],r[0][3],t[5]);return ps(t[0],t[1],t[2],e,t[4]).map(vs).join(",")}])}function gs(t){return t.replace(/[xy]/,"")}function ms(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function bs(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?bo(a):bo(a,t.unit)}))})},o=0;t.length>o;o++)i(o)}var a,s,u=[],c=[],l=[];if(t.length!==e.length){var h=ys(t,e);u=[h[0]],c=[h[1]],l=[["matrix",[h[2]]]]}else for(var f=0;t.length>f;f++){var d=t[f].t,p=e[f].t,v=t[f].d,y=e[f].d,g=cs[d],m=cs[p],b=void 0;if(s=p,"perspective"===(a=d)&&"perspective"===s||!("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){var T=ys([t[f]],[e[f]]);u.push(T[0]),c.push(T[1]),l.push(["matrix",[T[2]]])}else{if(d===p)b=d;else if(g[2]&&m[2]&&gs(d)===gs(p))b=gs(d),v=g[2](v),y=m[2](y);else{if(!g[1]||!m[1]||ms(d)!==ms(p)){var E=ys(t,e);u=[E[0]],c=[E[1]],l=[["matrix",[E[2]]]];break}b=ms(d),v=g[1](v),y=m[1](y)}for(var x=[],w=[],S=[],k=0;v.length>k;k++){var N=za(v[k],y[k],n,!1,k);x[k]=N[0],w[k]=N[1],S.push(N[2])}u.push(x),c.push(w),l.push([b,S])}}if(r){var P=u;u=c,c=P}return[u,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"})).join(" ")}]}var Ts=ar((function(t){if(er(t)){if("text-anchor"===t)return[bo(0,"px"),bo(0,"px")];var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Va(Es(e[0])),Va(Es(e[1]))]}return[bo(t[0]||0,"px"),bo(t[1]||0,"px")]}));function Es(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var xs=function(){function t(){this.parser=Ha,this.mixer=Qa}return t.prototype.calculator=function(t,e,n,r){return Wa(n)},t}();xs=dn([ct({token:{token:co,named:t.PropertySyntax.ANGLE}})],xs);var ws=t.Syringe.defineToken(""),Ss=t.Syringe.defineToken("");t.CircleUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),t.CircleUpdater=dn([ct({token:{token:Ss,named:t.Shape.CIRCLE}})],t.CircleUpdater),t.EllipseUpdater=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),t.EllipseUpdater=dn([ct({token:{token:Ss,named:t.Shape.ELLIPSE}})],t.EllipseUpdater),t.LineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),s=Math.min(n,i);return{width:a-o,height:Math.max(n,i)-s}},t}(),t.LineUpdater=dn([ct({token:{token:Ss,named:t.Shape.LINE}})],t.LineUpdater),t.PathUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),t.PathUpdater=dn([ct({token:{token:Ss,named:t.Shape.PATH}})],t.PathUpdater),t.PolylineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,e.map((function(t){return t[0]}))),r=Math.max.apply(Math,e.map((function(t){return t[0]}))),i=Math.min.apply(Math,e.map((function(t){return t[1]})));return{width:r-n,height:Math.max.apply(Math,e.map((function(t){return t[1]})))-i}},t}(),t.PolylineUpdater=dn([ct({token:[{token:Ss,named:t.Shape.POLYLINE},{token:Ss,named:t.Shape.POLYGON}]})],t.PolylineUpdater),t.RectUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!er(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),t.RectUpdater=dn([ct({token:[{token:Ss,named:t.Shape.RECT},{token:Ss,named:t.Shape.IMAGE},{token:Ss,named:t.Shape.GROUP}]})],t.RectUpdater),t.OffscreenCanvasCreator=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),t.OffscreenCanvasCreator=dn([ct()],t.OffscreenCanvasCreator);var ks={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Ns=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Ps=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),_s=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source);t.TextService=function(){function t(t){var e=this;this.offscreenCanvas=void 0,this.cache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!(!t||!_s.exec(n)&&!Ps.exec(t))},this.trimByKinsokuShorui=function(t){var e=[].concat(t),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e},this.offscreenCanvas=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=ks.MetricsString+ks.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(ks.BaselineSymbol).width),u=ks.HeightMultiplier*s;s=s*ks.BaselineMultiplier|0,r.width=a,r.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var c=i.getImageData(0,0,a||1,u||1).data,l=c.length,h=4*a,f=0,d=0,p=!1;for(f=0;s>f;++f){for(var v=0;h>v;v+=4)if(255!==c[d+v]){p=!0;break}if(p)break;d+=h}for(n.ascent=s-f,d=l-h,p=!1,f=u;f>s;--f){for(var y=0;h>y;y+=4)if(255!==c[d+y]){p=!0;break}if(p)break;d-=h}return n.descent=f-s,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,u=e.textAlign,c=e.letterSpacing,l=e.leading,h=void 0===l?0:l,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=rr(e)&&e+"px"||"16px",s=er(n)?n.split(","):[n],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&0>xa.indexOf(c)&&(c='"'+c+'"'),s[u]=c}return r+" "+i+" "+o+" "+a+" "+s.join(",")}(e),d=this.measureFont(f,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var p=this.offscreenCanvas.getOrCreateContext(n);p.font=f;for(var v=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(v.length),g=0,m=0;v.length>m;m++){var b=p.measureText(v[m]).width+(v[m].length-1)*c;y[m]=b,g=Math.max(g,b)}var T=g+a,E=o||d.fontSize+a,x=Math.max(E,d.fontSize+a)+(v.length-1)*(E+h),w=0;return"middle"===s?w=-x/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-x:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:T,height:x,lines:v,lineWidths:y,lineHeight:E+=h,maxLineWidth:g,fontProperties:d,lineMetrics:y.map((function(t,e){var n=0;return"center"===u?n-=t/2:"right"!==u&&"end"!==u||(n-=t),new Ga(n-a/2,w+e*E,t+a,E)}))}},e.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,s=this.offscreenCanvas.getOrCreateContext(n),u=o+a,c=[],l=0,h=0,f={},d=function(t){return r.getFromCache(t,a,f,s)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=d(e);if(r.isNewline(e))return l++,h=0,void(c[l]="");if(h>0&&h+a>u){if(l++,h=0,c[l]="",r.isBreakingSpace(e))return;r.canBreakInLastChar(e)||(c=r.trimToBreakable(c),h=r.sumTextWidthByCache(c[l]||"",f)),r.shouldBreakByKinsokuShorui(e,o)&&(c=r.trimByKinsokuShorui(c),h+=d(i||""))}h+=a,c[l]=(c[l]||"")+e})),c.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&ks.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.isNewline=function(t){return"string"==typeof t&&ks.Newlines.indexOf(t.charCodeAt(0))>=0},e.trimToBreakable=function(t){var e=[].concat(t),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,o),e},e.canBreakInLastChar=function(t){return!t||!Ns.test(t)},e.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},e.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!Ns.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),t.TextService=dn([ct(),pn(0,lt(t.OffscreenCanvasCreator))],t.TextService),t.TextUpdater=function(){function t(t){this.textService=void 0,this.textService=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){return t.text&&t.fontSize&&t.fontStyle&&t.fontWeight&&t.fontVariant&&t.textAlign&&t.textBaseline&&!$n(t.lineWidth)},e.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,u=t.dx,c=t.dy,l=((null==e||null===(n=e.ownerDocument)||void 0===n||null===(r=n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var h=this.textService.measureText(i,t,l);t.metrics=h;var f=[h.width/2,h.height/2,0],d=[0,1],p=0;"center"===o?(p=a/2,d=[.5,1]):"right"!==o&&"end"!==o||(p=a,d=[1,1]);var v=0;return"middle"===s?v=f[1]:"top"===s||"hanging"===s?v=2*f[1]:"alphabetic"===s?v=h.lineHeight-h.fontProperties.ascent:"bottom"!==s&&"ideographic"!==s||(v=0),u&&(p+=u),c&&(v+=c),t.anchor=[d[0],d[1],0],{width:2*f[0],height:2*f[1],offsetX:p,offsetY:v}},t}(),t.TextUpdater=dn([ct({token:{token:Ss,named:t.Shape.TEXT}}),pn(0,lt(t.TextService))],t.TextUpdater);var Ms=t.Syringe.defineToken("",{multiple:!1}),As=function(){function e(){this.registry={},this.define(t.Shape.CIRCLE,ru),this.define(t.Shape.ELLIPSE,su),this.define(t.Shape.RECT,wu),this.define(t.Shape.IMAGE,du),this.define(t.Shape.LINE,vu),this.define(t.Shape.GROUP,cu),this.define(t.Shape.PATH,gu),this.define(t.Shape.POLYGON,bu),this.define(t.Shape.POLYLINE,Eu),this.define(t.Shape.TEXT,ku),this.define(t.Shape.HTML,hu)}var n=e.prototype;return n.define=function(t,e){this.registry[t]=e},n.get=function(t){return this.registry[t]},e}(),Cs=function(){function t(e){this.type=void 0,this.eventPhase=t.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Ba,this.page=new Ba,this.canvas=new Ba,this.viewport=new Ba,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}var e=t.prototype;return e.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},e.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},e.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},e.stopPropagation=function(){this.propagationStopped=!0},e.initEvent=function(){},e.initUIEvent=function(){},e.clone=function(){throw new Error(No)},ci(t,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),t}(),Os=function(t){function e(e,n){var r;return(r=t.call(this,null)||this).type=e,r.detail=n,Object.assign(pi(r),n),r}return hi(e,t),e}(Cs),Is=function(){function t(){this.emitter=new jr.EventEmitter}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r=ir(n)&&n||tr(n)&&n.capture,i=tr(n)&&n.once,o=Ai(e)?void 0:e,a=!1,s="";if(t.indexOf(":")>-1){var u=t.split(":");t=u[1],s=u[0],a=!0}if(t=r?t+"capture":t,e=Ai(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];(null===(t=n[0].target)||void 0===t?void 0:t.name)===s&&c.apply(void 0,n)}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,i=ir(n)&&n||tr(n)&&n.capture,o=Ai(e)?void 0:e;return t=i?t+"capture":t,e=Ai(e)?e:null===(r=e)||void 0===r?void 0:r.handleEvent,this.emitter.off(t,e,o),this},e.emit=function(t,e){this.dispatchEvent(new Os(t,e))},e.dispatchEvent=function(t){if(!(t instanceof Cs))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e;if(this.document)e=this;else if(this.defaultView)e=this.defaultView;else{var n;e=null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView}if(e){var r;if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],t.target=this,null===(r=t.manager)||void 0===r||r.dispatchEvent(t)}return!t.defaultPrevented},t}(),Rs=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}hi(n,e),n.isNode=function(t){return!!t.childNodes};var r=n.prototype;return r.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},r.hasChildNodes=function(){return this.childNodes.length>0},r.isDefaultNamespace=function(t){throw new Error(No)},r.lookupNamespaceURI=function(t){throw new Error(No)},r.lookupPrefix=function(t){throw new Error(No)},r.normalize=function(){throw new Error(No)},r.isEqualNode=function(t){return this===t},r.isSameNode=function(t){return this.isEqualNode(t)},r.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof n))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=t,r=this,i=[e],o=[r];null!==(a=e.parentNode)&&void 0!==a?a:r.parentNode;){var a;e=e.parentNode?(i.push(e.parentNode),e.parentNode):e,r=r.parentNode?(o.push(r.parentNode),r.parentNode):r}if(e!==r)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var s=i.length>o.length?i:o,u=s===i?o:i;if(s[s.length-u.length]===u[0])return s===i?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],f=s[c+l];if(f!==h){var d=h.parentNode.childNodes;return d.indexOf(h)<d.indexOf(f)?u===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:s===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING},r.contain=function(t){return this.contains(t)},r.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},r.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},r.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},ci(n,[{key:"textContent",get:function(){var e="";this.nodeName===t.Shape.TEXT&&(e+=this.style.text);for(var n,r=yi(this.childNodes);!(n=r()).done;){var i=n.value;e+=i.nodeName===t.Shape.TEXT?i.nodeValue:i.textContent}return e},set:function(e){var n=this;this.childNodes.slice().forEach((function(t){n.removeChild(t)})),this.nodeName===t.Shape.TEXT&&(this.style.text=""+e)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}}]),n}(Is);Rs.DOCUMENT_POSITION_DISCONNECTED=1,Rs.DOCUMENT_POSITION_PRECEDING=2,Rs.DOCUMENT_POSITION_FOLLOWING=4,Rs.DOCUMENT_POSITION_CONTAINS=8,Rs.DOCUMENT_POSITION_CONTAINED_BY=16,Rs.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var Ls,Ds=function(e){function n(){var n;(n=e.call(this)||this).defaultView=null,n.documentElement=void 0,n.timeline=void 0,n.ownerDocument=null,n.nodeName="document";try{n.timeline=Lt.get(qo),n.timeline.attach(pi(n))}catch(t){}var r={};return oc.forEach((function(e){var n=e.d;e.inh&&n&&(r[e.n]=Ai(n)?n(t.Shape.GROUP):n)})),n.documentElement=new cu({id:"g-root",style:r}),n.documentElement.ownerDocument=pi(n),n.documentElement.parentNode=pi(n),n.childNodes=[n.documentElement],n}hi(n,e);var r=n.prototype;return r.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?ku:cu);var r=new n(e);return r.ownerDocument=this,r},r.createElementNS=function(t,e,n){return this.createElement(e,n)},r.cloneNode=function(t){throw new Error(No)},r.destroy=function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}},r.elementsFromBBox=function(e,n,r,i){var o=this.defaultView.getRBushRoot().search({minX:e,minY:n,maxX:r,maxY:i}),a=Lt.get(t.DisplayObjectPool),s=[];return o.forEach((function(t){var e=a.getByEntity(t.id),n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&s.push(e)})),s.sort((function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder})),s},r.elementFromPoint=function(){var t=si(oi().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",null);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return t.abrupt("return",(f=t.sent.picked)&&f[0]||this.documentElement);case 10:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.elementsFromPoint=function(){var t=si(oi().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",[]);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return(f=t.sent.picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),t.abrupt("return",f);case 11:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.appendChild=function(t,e){throw new Error(Po)},r.insertBefore=function(t,e){throw new Error(Po)},r.removeChild=function(t,e){throw new Error(Po)},r.replaceChild=function(t,e,n){throw new Error(Po)},r.append=function(){throw new Error(Po)},r.prepend=function(){throw new Error(Po)},r.getElementById=function(t){return this.documentElement.getElementById(t)},r.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},r.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},r.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},r.querySelector=function(t){return this.documentElement.querySelector(t)},r.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},r.find=function(t){return this.documentElement.find(t)},r.findAll=function(t){return this.documentElement.findAll(t)},ci(n,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),n}(Rs);(Ls=t.Strategy||(t.Strategy={}))[Ls.Standard=0]="Standard";var Fs,Bs=t.Syringe.defineToken(""),Gs=t.Syringe.defineToken("");(Fs=t.ElementEvent||(t.ElementEvent={})).DESTROY="destroy",Fs.ATTR_MODIFIED="DOMAttrModified",Fs.INSERTED="DOMNodeInserted",Fs.CHILD_INSERTED="child-inserted",Fs.REMOVED="removed",Fs.CHILD_REMOVED="child-removed",Fs.MOUNTED="DOMNodeInsertedIntoDocument",Fs.UNMOUNTED="DOMNodeRemovedFromDocument",Fs.BOUNDS_CHANGED="bounds-changed",Fs.RENDER_ORDER_CHANGED="render-order-changed",Fs.CULLED="culled";var Us=function(t){function e(e,n,r,i,o,a,s,u){var c;return(c=t.call(this,null)||this).relatedNode=void 0,c.prevValue=void 0,c.newValue=void 0,c.attrName=void 0,c.attrChange=void 0,c.prevParsedValue=void 0,c.newParsedValue=void 0,c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return hi(e,t),e}(Cs);Us.ADDITION=2,Us.MODIFICATION=1,Us.REMOVAL=3;var js,Vs=0,Hs=new Os(t.ElementEvent.CHILD_INSERTED,{child:null}),zs=new Us(t.ElementEvent.INSERTED,null,"","","",0,"",""),Ws=new Us(t.ElementEvent.REMOVED,null,"","","",0,"",""),Ys=new Os(t.ElementEvent.DESTROY),qs=new Os(t.ElementEvent.CHILD_REMOVED,{child:null}),Xs=function(e){function n(){for(var n,r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];return(n=e.call.apply(e,[this].concat(i))||this).sceneGraphService=Lt.get(Gs),n.entity=Vs++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},n.cullable={strategy:t.Strategy.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},n.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:Ce(0,0,0),localRotation:an(0,0,0,1),localScale:Ce(1,1,1),localTransform:ie(),localSkew:ln(0,0),position:Ce(0,0,0),rotation:an(0,0,0,1),scaling:Ce(1,1,1),worldTransform:ie(),origin:Ce(0,0,0)},n.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},n.geometry={contentBounds:void 0,renderBounds:void 0},n.rBushNode={aabb:void 0},n.id=void 0,n.name=void 0,n.namespaceURI="g",n.scrollLeft=0,n.scrollTop=0,n.clientTop=0,n.clientLeft=0,n.destroyed=!1,n.style={},n.computedStyle={anchor:lo,opacity:lo,fillOpacity:lo,strokeOpacity:lo,fill:lo,stroke:lo,transform:lo,transformOrigin:lo,visibility:lo,pointerEvents:lo,lineWidth:lo,lineCap:lo,lineJoin:lo,increasedLineWidthForHitTesting:lo,fontSize:lo,fontFamily:lo,fontStyle:lo,fontWeight:lo,fontVariant:lo,textAlign:lo,textBaseline:lo,textTransform:lo,zIndex:lo,filter:lo,shadowType:lo},n.parsedStyle={},n.attributes={},n}hi(n,e),n.isElement=function(t){return!!t.getAttribute};var r=n.prototype;return r.cloneNode=function(t){throw new Error(No)},r.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),Hs.detail.child=t,this.dispatchEvent(Hs),zs.relatedNode=this,t.dispatchEvent(zs),t},r.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},r.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},r.removeChild=function(t){return Ws.relatedNode=this,t.dispatchEvent(Ws),qs.detail.child=t,this.dispatchEvent(qs),this.sceneGraphService.detach(t),t},r.removeChildren=function(){var t=this;this.childNodes.slice().forEach((function(e){t.removeChild(e),e.destroy()}))},r.matches=function(t){return this.sceneGraphService.matches(t,this)},r.getElementById=function(t){return this.sceneGraphService.querySelector("#"+t,this)},r.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},r.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll("."+t,this)},r.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},r.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},r.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},r.closest=function(t){var e=this;do{if(this.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},r.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},r.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},r.after=function(){var t=this;if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];r.forEach((function(n,r){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(n,e+r+1)}))}},r.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},r.replaceWith=function(){this.after.apply(this,arguments),this.remove()},r.append=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e){return t.appendChild(e)}))},r.prepend=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e,n){return t.appendChild(e,n)}))},r.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},r.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},r.destroy=function(){this.dispatchEvent(Ys),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},r.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},r.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},r.getBounds=function(){return this.sceneGraphService.getBounds(this)},r.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},r.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},r.getClientRects=function(){return[this.getBoundingClientRect()]},r.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},r.getAttributeNames=function(){return Object.keys(this.attributes)},r.getAttribute=function(t){var e=this.attributes[t];if(void 0===e){var n=Li(t.toString(),"");e=this.attributes[n[0]]}return $n(e)?null:e},r.hasAttribute=function(t){return this.getAttributeNames().includes(t)},r.hasAttributes=function(){return!!this.getAttributeNames().length},r.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},r.setAttribute=function(t,e,n){this.attributes[t]=e},r.getAttributeNS=function(t,e){throw new Error(No)},r.getAttributeNode=function(t){throw new Error(No)},r.getAttributeNodeNS=function(t,e){throw new Error(No)},r.hasAttributeNS=function(t,e){throw new Error(No)},r.removeAttributeNS=function(t,e){throw new Error(No)},r.removeAttributeNode=function(t){throw new Error(No)},r.setAttributeNS=function(t,e,n){throw new Error(No)},r.setAttributeNode=function(t){throw new Error(No)},r.setAttributeNodeNS=function(t){throw new Error(No)},r.toggleAttribute=function(t,e){throw new Error(No)},ci(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter((function(t){return""!==t}))}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}}]),n}(Rs),Ks=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).altKey=void 0,e.button=void 0,e.buttons=void 0,e.ctrlKey=void 0,e.metaKey=void 0,e.relatedTarget=void 0,e.shiftKey=void 0,e.client=new Ba,e.movement=new Ba,e.offset=new Ba,e.global=new Ba,e.screen=new Ba,e}hi(e,t);var n=e.prototype;return n.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},n.initMouseEvent=function(){throw new Error(No)},ci(e,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),e}(Cs),Zs=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).pointerId=void 0,e.width=0,e.height=0,e.isPrimary=!1,e.pointerType=void 0,e.pressure=void 0,e.tangentialPressure=void 0,e.tiltX=void 0,e.tiltY=void 0,e.twist=void 0,e}hi(e,t);var n=e.prototype;return n.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},n.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},n.clone=function(){return this.manager.clonePointerEvent(this)},e}(Ks),Js=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).deltaMode=void 0,e.deltaX=void 0,e.deltaY=void 0,e.deltaZ=void 0,e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return hi(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(Ks),Qs={},$s=[];t.DisplayObjectPool=function(){function e(){}var n=e.prototype;return n.getByEntity=function(t){return Qs[t]},n.getAll=function(){return Object.keys(Qs).map((function(t){return Qs[t]}))},n.add=function(e,n){Qs[e]=n,n.nodeName===t.Shape.HTML&&$s.push(n)},n.remove=function(e){var n=Qs[e];if(n&&(delete Qs[e],n.nodeName===t.Shape.HTML)){var r=$s.indexOf(n);$s.splice(r,1)}},n.getHTMLs=function(){return $s},e}(),t.DisplayObjectPool=dn([ct()],t.DisplayObjectPool);var tu,eu=function(e){function n(n){var r,i;return(i=e.call(this)||this).config=void 0,i.isCustomElement=!1,i.activeAnimations=[],i.displayObjectPool=Lt.get(t.DisplayObjectPool),i.styleValueRegistry=Lt.get(oo),i.config=n,i.config.interactive=null!==(r=i.config.capture)&&void 0!==r?r:i.config.interactive,i.id=i.config.id||"",i.name=i.config.name||"",(i.config.className||i.config.class)&&(i.className=i.config.className||i.config.class),i.nodeName=i.config.type||t.Shape.GROUP,i.config.style=li({},i.config.style,i.config.attrs),null!=i.config.visible&&(i.config.style.visibility=!1===i.config.visible?"hidden":"visible"),null!=i.config.interactive&&(i.config.style.pointerEvents=!1===i.config.interactive?"none":"auto"),Object.assign(i.parsedStyle,{anchor:[0,0],fill:yo,stroke:yo,transform:[],zIndex:0,filter:[],shadowType:"outer"},i.config.initialParsedStyle),Object.assign(i.attributes,{anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""}),i.initAttributes(i.config.style),i.style=new Proxy({setProperty:function(t,e){i.setAttribute(t,e)},getPropertyValue:function(t){return i.getAttribute(t)},removeProperty:function(t){i.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:i.getAttribute(e)},set:function(t,e,n){return i.setAttribute(e,n),!0}}),i.displayObjectPool.add(i.entity,pi(i)),i}hi(n,e);var r=n.prototype;return r.destroy=function(){e.prototype.destroy.call(this),this.displayObjectPool.remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},r.cloneNode=function(t,e){var r=li({},this.attributes);for(var i in r){var o=r[i];o instanceof n&&(r[i]=o.cloneNode(t)),e&&(r[i]=e(i,o))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach((function(e){if(!e.style.isMarker){var n=e.cloneNode(t);a.appendChild(n)}})),a},r.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t,{forceUpdateGeometry:!0,usedAttributes:["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]}),e.dirty=!0},r.setAttribute=function(t,n,r){void 0===r&&(r=!1);var i=Li(t,n),o=i[0],a=i[1];or(n)||(r||a!==this.attributes[o])&&(this.internalSetAttribute(o,a),e.prototype.setAttribute.call(this,o,a))},r.internalSetAttribute=function(e,n,r){var i,o=this;void 0===r&&(r={});var a=this.renderable,s=this.attributes[e],u=this.parsedStyle[e];this.styleValueRegistry.processProperties(this,((i={})[e]=n,i),r),this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&this.parsedStyle.clipPathTargets.forEach((function(e){o.sceneGraphService.dirtifyToRoot(e),e.dispatchEvent(new Us(t.ElementEvent.ATTR_MODIFIED,e,o,o,"clipPath",Us.MODIFICATION,o,o)),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback("clipPath",o,o)})),a.dirty=!0;var c=this.parsedStyle[e];this.isConnected&&(js||(js=new Us(t.ElementEvent.ATTR_MODIFIED,null,null,null,null,Us.MODIFICATION,null,null)),js.relatedNode=this,js.prevValue=s,js.newValue=n,js.attrName=e,js.prevParsedValue=u,js.newParsedValue=c,this.dispatchEvent(js)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(e,s,n,u,c)},r.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],r=e[1],i=t.getMax();return new Ga(n,r,i[0]-n,i[1]-r)},r.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,Oo(t,e,n)),this},r.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},r.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,Oo(t,e,n)),this},r.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,Oo(t,e,n)),this},r.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,Oo(t,e,n)),this},r.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,Oo(t,e,n)),this},r.getPosition=function(){return this.sceneGraphService.getPosition(this)},r.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},r.scale=function(t,e,n){return this.scaleLocal(t,e,n)},r.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Oo(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},r.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Oo(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},r.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},r.getScale=function(){return this.sceneGraphService.getScale(this)},r.getEulerAngles=function(){var t=Do(Me(),this.sceneGraphService.getWorldTransform(this));return Ro(t[2])},r.getLocalEulerAngles=function(){var t=Do(Me(),this.sceneGraphService.getLocalRotation(this));return Ro(t[2])},r.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},r.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},r.rotateLocal=function(t,e,n){return $n(e)&&$n(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},r.rotate=function(t,e,n){return $n(e)&&$n(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},r.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},r.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},r.setLocalSkew=function(t,e){return this.sceneGraphService.setLocalSkew(this,t,e),this},r.getRotation=function(){return this.sceneGraphService.getRotation(this)},r.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},r.getLocalSkew=function(){return this.sceneGraphService.getLocalSkew(this)},r.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},r.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},r.setLocalTransform=function(t){return this.sceneGraphService.setLocalTransform(this,t),this},r.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},r.getAnimations=function(){return this.activeAnimations},r.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&(i=null===(r=this.parsedStyle.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return i?i.play(this,t,e):null},r.isVisible=function(){var t;return"visible"===(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)},r.isInteractive=function(){var t;return"none"!==(null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)},r.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},r.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))+1),this},r.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))-1),this},r.getConfig=function(){return this.config},r.attr=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n[1];return i?tr(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},r.getMatrix=function(t){var e=t||this.getWorldTransform(),n=me(Me(),e),r=n[0],i=n[1],o=be(Me(),e),a=o[0],s=o[1],u=Te(qe(),e),c=Do(Me(),u);return Fo(c[0]||c[2],r,i,a,s)},r.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},r.setMatrix=function(t){var e=Bo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setEulerAngles(e[4]).setPosition(n,r).setLocalScale(i,o)},r.setLocalMatrix=function(t){var e=Bo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setLocalEulerAngles(e[4]).setLocalPosition(n,r).setLocalScale(i,o)},r.show=function(){this.style.visibility="visible"},r.hide=function(){this.style.visibility="hidden"},ci(n,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),n}(Xs),nu=["style"],ru=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,nu);return e.call(this,li({type:t.Shape.CIRCLE,style:li({cx:"",cy:"",r:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return hi(n,e),n}(eu),iu=["style"],ou=function(t){function e(e){var n,r=void 0===e?{}:e,i=r.style,o=di(r,iu);return(n=t.call(this,li({style:li({x:"",y:""},i)},o))||this).isCustomElement=!0,n}return hi(e,t),e}(eu),au=["style"],su=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,au);return e.call(this,li({type:t.Shape.ELLIPSE,style:li({cx:"",cy:"",rx:"",ry:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return hi(n,e),n}(eu),uu=["style"],cu=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,uu);return e.call(this,li({type:t.Shape.GROUP,style:li({x:"",y:"",width:"",height:""},i)},o))||this}return hi(n,e),n}(eu),lu=["style"],hu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,lu);return(r=e.call(this,li({type:t.Shape.HTML,style:li({x:"",y:"",width:"auto",height:"auto",innerHTML:""},o)},a))||this).cullable.enable=!1,r}hi(n,e);var r=n.prototype;return r.getDomElement=function(){return this.parsedStyle.$el},r.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},r.getClientRects=function(){return[this.getBoundingClientRect()]},r.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(t=this.ownerDocument)||void 0===t||null===(e=t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,a=new La;return a.setMinMax(Ce(i,o,0),Ce(i+n.width,o+n.height,0)),a}return null},r.getLocalBounds=function(){if(this.parentNode){var t=ce(ie(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!La.isEmpty(e)){var n=new La;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},n}(eu),fu=["style"],du=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,fu);return e.call(this,li({type:t.Shape.IMAGE,style:li({x:"",y:"",img:"",width:"",height:""},i)},o))||this}return hi(n,e),n}(eu),pu=["style"],vu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,pu);(r=e.call(this,li({type:t.Shape.LINE,style:li({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0;var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd;return u&&u instanceof eu&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),c&&c instanceof eu&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}hi(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof eu&&(this.markerStartAngle=0,r.remove()),i&&i instanceof eu&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof eu&&(this.markerEndAngle=0,r.remove()),i&&i instanceof eu&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},r.transformMarker=function(t){var e=this.parsedStyle,n=e.x1,r=e.x2,i=e.y1,o=e.y2,a=e.defX,s=e.defY,u=t?e.markerStart:e.markerEnd;if(u&&u instanceof eu){var c,l,h,f,d,p,v;t?(f=n-a,d=i-s,l=r-n,h=o-i,p=e.markerStartOffset||0,v=this.markerStartAngle):(f=r-a,d=o-s,l=n-r,h=i-o,p=e.markerEndOffset||0,v=this.markerEndAngle),c=Math.atan2(h,l),u.setLocalEulerAngles(180*c/Math.PI+v),u.setLocalPosition(f+Math.cos(c)*p,d+Math.sin(c)*p)}},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=Gr.pointAt(e.x1,e.y1,e.x2,e.y2,t),o=i.x,a=i.y,s=Ue(Me(),Ce(o-n,a-r,0),this.getLocalTransform());return new Ba(s[0],s[1])},r.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},r.getTotalLength=function(){var t=this.parsedStyle;return Gr.length(t.x1,t.y1,t.x2,t.y2)},n}(eu),yu=["style"],gu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,yu);(r=e.call(this,li({type:t.Shape.PATH,style:li({path:"",miterLimit:""},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof eu&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof eu&&r.placeMarkerMid(l),c&&c instanceof eu&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}hi(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof eu&&(this.markerStartAngle=0,r.remove()),i&&i instanceof eu&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof eu&&(this.markerEndAngle=0,r.remove()),i&&i instanceof eu&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.markerStartOffset,r=e.markerEndOffset,i=e.defX,o=e.defY,a=t?e.markerStart:e.markerEnd;if(a&&a instanceof eu){var s,u,c,l,h,f,d;if(t){var p=this.getStartTangent(),v=p[0],y=p[1];l=y[0]-i,h=y[1]-o,u=v[0]-y[0],c=v[1]-y[1],f=n||0,d=this.markerStartAngle}else{var g=this.getEndTangent(),m=g[0],b=g[1];l=b[0]-i,h=b[1]-o,u=m[0]-b[0],c=m[1]-b[1],f=r||0,d=this.markerEndAngle}s=Math.atan2(c,u),a.setLocalEulerAngles(180*s/Math.PI+d),a.setLocalPosition(l+Math.cos(s)*f,h+Math.sin(s)*f)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),t&&t instanceof eu)for(var o=1;n.length-1>o;o++){var a=n[o].currentPoint,s=a[0],u=a[1],c=1===o?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s-r,u-i)}},r.getTotalLength=function(){return Ko(this)},r.getPointAtLength=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=function(t,e,n){return qn(t,e,fn(fn({},n),{bbox:!1,length:!0})).point}(e.path.absolutePath,t),o=i.x,a=i.y,s=Ue(Me(),Ce(o-n,a-r,0),this.getLocalTransform());return new Ba(s[0],s[1])},r.getPoint=function(t){return this.getPointAtLength(t*Ko(this))},r.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},r.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},n}(eu),mu=["style"],bu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,mu);(r=e.call(this,li({type:t.Shape.POLYGON,style:li({points:"",miterLimit:"",isClosed:!0},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof eu&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof eu&&r.placeMarkerMid(l),c&&c instanceof eu&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}hi(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof eu&&(this.markerStartAngle=0,r.remove()),i&&i instanceof eu&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof eu&&(this.markerEndAngle=0,r.remove()),i&&i instanceof eu&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY,o=t?e.markerStart:e.markerEnd;if(o&&o instanceof eu){var a,s,u,c,l,h,f;if(c=n[0][0]-r,l=n[0][1]-i,t)s=n[1][0]-n[0][0],u=n[1][1]-n[0][1],h=e.markerStartOffset||0,f=this.markerStartAngle;else{var d=n.length;this.style.isClosed?(s=n[d-1][0]-n[0][0],u=n[d-1][1]-n[0][1]):(c=n[d-1][0]-r,l=n[d-1][1]-i,s=n[d-2][0]-n[d-1][0],u=n[d-2][1]-n[d-1][1]),h=e.markerEndOffset||0,f=this.markerEndAngle}a=Math.atan2(u,s),o.setLocalEulerAngles(180*a/Math.PI+f),o.setLocalPosition(c+Math.cos(a)*h,l+Math.sin(a)*h)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),this.markerMidList=[],t&&t instanceof eu)for(var o=1;(this.style.isClosed?n.length:n.length-1)>o;o++){var a=n[o][0]-r,s=n[o][1]-i,u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(a,s)}},n}(eu),Tu=["style"],Eu=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,Tu);return e.call(this,li({type:t.Shape.POLYLINE,style:li({points:"",miterLimit:"",isClosed:!1},i)},o))||this}hi(n,e);var r=n.prototype;return r.getTotalLength=function(){return this.parsedStyle.points.totalLength},r.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=e.points,o=i.points,a=0,s=0;i.segments.forEach((function(e,n){e[0]>t||t>e[1]||(a=(t-e[0])/(e[1]-e[0]),s=n)}));var u=Gr.pointAt(o[s][0],o[s][1],o[s+1][0],o[s+1][1],a),c=u.x,l=u.y,h=Ue(Me(),Ce(c-n,l-r,0),this.getLocalTransform());return new Ba(h[0],h[1])},r.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},r.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},n}(bu),xu=["style"],wu=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,xu);return e.call(this,li({type:t.Shape.RECT,style:li({x:"",y:"",width:"",height:"",radius:""},i)},o))||this}return hi(n,e),n}(eu),Su=["style"],ku=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,Su);return e.call(this,li({type:t.Shape.TEXT,style:li({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},i)},o))||this}hi(n,e);var r=n.prototype;return r.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},r.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},n}(eu);(tu=t.RenderReason||(t.RenderReason={}))[tu.CAMERA_CHANGED=0]="CAMERA_CHANGED",tu[tu.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",tu[tu.NONE=2]="NONE";var Nu=t.Syringe.defineToken("");t.EventService=function(){function t(t,e,n,r){var i=this;this.renderingContext=void 0,this.contextService=void 0,this.canvasConfig=void 0,this.displayObjectPool=void 0,this.rootTarget=void 0,this.emitter=new jr.EventEmitter,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ie(),this.tmpVec3=Me(),this.onPointerDown=function(){var t=si(oi().mark((function t(e){var n;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,i.createPointerEvent(e);case 4:i.dispatchEvent(n=t.sent,"pointerdown"),"touch"===n.pointerType?i.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||i.dispatchEvent(n,2===n.button?"rightdown":"mousedown"),i.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),i.freeEvent(n);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerUp=function(){var t=si(oi().mark((function t(e){var n,r,o,a,s,u,c,l,h;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,i.createPointerEvent(e);case 5:if(i.dispatchEvent(r=t.sent,"pointerup"),"touch"===r.pointerType?i.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||i.dispatchEvent(r,2===r.button?"rightup":"mouseup"),o=i.trackingData(e.pointerId),a=i.findMountedTarget(o.pressTargetsByButton[e.button]),s=a,a&&!r.composedPath().includes(a)){for(u=a;u&&!r.composedPath().includes(u);)r.currentTarget=u,i.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?i.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||i.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),Rs.isNode(u)&&(u=u.parentNode);delete o.pressTargetsByButton[e.button],s=u}s&&((l=i.clonePointerEvent(r,"click")).target=s,l.path=[],o.clicksByButton[e.button]||(o.clicksByButton[e.button]={clickCount:0,target:l.target,timeStamp:n}),(h=o.clicksByButton[e.button]).target===l.target&&200>n-h.timeStamp?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=n,l.detail=h.clickCount,(null===(c=r.detail)||void 0===c?void 0:c.preventClick)||("mouse"!==l.pointerType&&"touch"!==l.pointerType||i.dispatchEvent(l,"click"),i.dispatchEvent(l,"pointertap")),i.freeEvent(l)),i.freeEvent(r);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerMove=function(){var t=si(oi().mark((function t(e){var n,r,o,a,s,u,c,l,h,f;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,i.createPointerEvent(e);case 4:if(r="mouse"===(n=t.sent).pointerType||"pen"===n.pointerType,o=i.trackingData(e.pointerId),a=i.findMountedTarget(o.overTargets),!o.overTargets||a===n.target){t.next=23;break}return s="mousemove"===e.type?"mouseout":"pointerout",t.next=12,i.createPointerEvent(e,s,a||void 0);case 12:if(i.dispatchEvent(u=t.sent,"pointerout"),r&&i.dispatchEvent(u,"mouseout"),n.composedPath().includes(a)){t.next=22;break}return t.next=18,i.createPointerEvent(e,"pointerleave",a||void 0);case 18:for((c=t.sent).eventPhase=c.AT_TARGET;c.target&&!n.composedPath().includes(c.target);)c.currentTarget=c.target,i.notifyTarget(c),r&&i.notifyTarget(c,"mouseleave"),Rs.isNode(c.target)&&(c.target=c.target.parentNode);i.freeEvent(c);case 22:i.freeEvent(u);case 23:if(a===n.target){t.next=38;break}l=i.clonePointerEvent(n,"mousemove"===e.type?"mouseover":"pointerover"),i.dispatchEvent(l,"pointerover"),r&&i.dispatchEvent(l,"mouseover"),h=a&&Rs.isNode(a)&&a.parentNode;case 29:if(!h||h===(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode)){t.next=35;break}if(h!==n.target){t.next=32;break}return t.abrupt("break",35);case 32:h=h.parentNode,t.next=29;break;case 35:if(!h||h===(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode)){for((f=i.clonePointerEvent(n,"pointerenter")).eventPhase=f.AT_TARGET;f.target&&f.target!==a&&f.target!==(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode);)f.currentTarget=f.target,i.notifyTarget(f),r&&i.notifyTarget(f,"mouseenter"),Rs.isNode(f.target)&&(f.target=f.target.parentNode);i.freeEvent(f)}i.freeEvent(l);case 38:i.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&i.dispatchEvent(n,"touchmove"),r&&(i.dispatchEvent(n,"mousemove"),i.cursor=i.getCursor(n.target)),o.overTargets=n.composedPath(),i.freeEvent(n);case 43:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerOut=function(){var t=si(oi().mark((function t(e){var n,r,o,a,s;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:if(!(n=i.trackingData(e.pointerId)).overTargets){t.next=19;break}return r="mouse"===e.pointerType||"pen"===e.pointerType,o=i.findMountedTarget(n.overTargets),t.next=8,i.createPointerEvent(e,"pointerout",o||void 0);case 8:return i.dispatchEvent(a=t.sent),r&&i.dispatchEvent(a,"mouseout"),t.next=13,i.createPointerEvent(e,"pointerleave",o||void 0);case 13:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&s.target!==(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode);)s.currentTarget=s.target,i.notifyTarget(s),r&&i.notifyTarget(s,"mouseleave"),Rs.isNode(s.target)&&(s.target=s.target.parentNode);n.overTargets=null,i.freeEvent(a),i.freeEvent(s);case 19:i.cursor=null;case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerOver=function(){var t=si(oi().mark((function t(e){var n,r,o,a;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return n=i.trackingData(e.pointerId),t.next=5,i.createPointerEvent(e);case 5:for(o="mouse"===(r=t.sent).pointerType||"pen"===r.pointerType,i.dispatchEvent(r,"pointerover"),o&&i.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(i.cursor=i.getCursor(r.target)),(a=i.clonePointerEvent(r,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode);)a.currentTarget=a.target,i.notifyTarget(a),o&&i.notifyTarget(a,"mouseenter"),Rs.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=r.composedPath(),i.freeEvent(r),i.freeEvent(a);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var t=si(oi().mark((function t(e){var n,r,o,a;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return n=i.trackingData(e.pointerId),r=i.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,i.createPointerEvent(e);case 6:if(o=t.sent,r){for(a=r;a;)o.currentTarget=a,i.notifyTarget(o,"pointerupoutside"),"touch"===o.pointerType||"mouse"!==o.pointerType&&"pen"!==o.pointerType||i.notifyTarget(o,2===o.button?"rightupoutside":"mouseupoutside"),Rs.isNode(a)&&(a=a.parentNode);delete n.pressTargetsByButton[e.button]}i.freeEvent(o);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onWheel=function(){var t=si(oi().mark((function t(e){var n;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Js){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,i.createWheelEvent(e);case 4:i.dispatchEvent(n=t.sent),i.freeEvent(n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.renderingContext=t,this.contextService=e,this.canvasConfig=n,this.displayObjectPool=r}var e=t.prototype;return e.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Ba(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Ba(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,o=i.width,a=i.height,s=r.getPerspectiveInverse(),u=r.getWorldTransform(),c=he(this.tmpMatrix,u,s),l=Ie(this.tmpVec3,e/o*2-1,2*(1-n/a)-1,0);return Ue(l,l,c),new Ba(l[0],l[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=he(this.tmpMatrix,n,r),o=Ie(this.tmpVec3,t.x,t.y,0);Ue(this.tmpVec3,this.tmpVec3,i);var a=this.canvasConfig;return new Ba((o[0]+1)/2*a.width,(1-(o[1]+1)/2)*a.height)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;r>n;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;n.length>o;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;2048>r&&t!==this.rootTarget;r++)Rs.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.hitTest=function(){var t=si(oi().mark((function t(e){var n,r,i,o,a;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.viewportY,o=(i=this.canvasConfig).width,a=i.height,!(0>(n=e.viewportX)||0>r||n>o||r>a)){t.next=4;break}return t.abrupt("return",null);case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e,n=yi(this.displayObjectPool.getHTMLs());!(e=n()).done;){var r=e.value;if(t.nativeEvent.composedPath().indexOf(r)>-1)return r}return null},e.pickTarget=function(){var t=si(oi().mark((function t(e){return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.createPointerEvent=function(){var t=si(oi().mark((function t(e,n,r){var i,o;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.allocateEvent(Zs),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r){t.next=11;break}t.t0=r,t.next=20;break;case 11:if(t.t1=o,t.t1){t.next=19;break}if(t.t2=this.isNativeEventFromCanvas(i),!t.t2){t.next=18;break}return t.next=17,this.pickTarget(i);case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),e.createWheelEvent=function(){var t=si(oi().mark((function t(e){var n,r;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Js),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0){t.next=15;break}if(t.t1=this.isNativeEventFromCanvas(n),!t.t1){t.next=14;break}return t.next=13,this.pickTarget(n);case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(Js);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=e.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(Zs);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof Zs&&e instanceof Zs&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof Ks&&e instanceof Ks&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){var n;e=null!==(n=e)&&void 0!==n?n:t.type,this.notifyListeners(t,t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;r.length>i&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||Rs.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Xs.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Rs.isNode(e)&&e.parentNode}},t}(),t.EventService=dn([ct(),pn(0,lt(Nu)),pn(1,lt(Ms)),pn(2,lt(Yo)),pn(3,lt(t.DisplayObjectPool))],t.EventService);var Pu,_u,Mu,Au=t.Syringe.defineToken(""),Cu=t.Syringe.defineToken("",{multiple:!1});(Pu=t.CameraType||(t.CameraType={}))[Pu.ORBITING=0]="ORBITING",Pu[Pu.EXPLORING=1]="EXPLORING",Pu[Pu.TRACKING=2]="TRACKING",(_u=t.CameraTrackingMode||(t.CameraTrackingMode={}))[_u.DEFAULT=0]="DEFAULT",_u[_u.ROTATIONAL=1]="ROTATIONAL",_u[_u.TRANSLATIONAL=2]="TRANSLATIONAL",_u[_u.CINEMATIC=3]="CINEMATIC",(Mu=t.CameraProjectionMode||(t.CameraProjectionMode={}))[Mu.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Mu[Mu.PERSPECTIVE=1]="PERSPECTIVE";var Ou={UPDATED:"updated"},Iu=2e-4;t.Camera=function(){function e(){this.canvas=void 0,this.eventEmitter=new jr.EventEmitter,this.matrix=ie(),this.right=Ce(1,0,0),this.up=Ce(0,1,0),this.forward=Ce(0,0,1),this.position=Ce(0,0,1),this.focalPoint=Ce(0,0,0),this.distanceVector=Ce(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ie(),this.projectionMatrixInverse=ie(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=t.CameraType.EXPLORING,this.trackingMode=t.CameraTrackingMode.DEFAULT,this.projectionMode=t.CameraProjectionMode.PERSPECTIVE,this.frustum=new Fa,this.orthoMatrix=ie()}var n=e.prototype;return n.isOrtho=function(){return this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC},n.getProjectionMode=function(){return this.projectionMode},n.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},n.getPerspectiveInverse=function(){return this.projectionMatrixInverse},n.getFrustum=function(){return this.frustum},n.getPosition=function(){return this.position},n.getFocalPoint=function(){return this.focalPoint},n.getDollyingStep=function(){return this.dollyingStep},n.getNear=function(){return this.near},n.getFar=function(){return this.far},n.getZoom=function(){return this.zoom},n.getOrthoMatrix=function(){return this.orthoMatrix},n.getView=function(){return this.view},n.setEnableUpdate=function(t){this.enableUpdate=t},n.setType=function(e,n){return this.type=e,this.setWorldRotation(this.type===t.CameraType.EXPLORING),this._getAngles(),this.type===t.CameraType.TRACKING&&void 0!==n&&this.setTrackingMode(n),this},n.setProjectionMode=function(t){return this.projectionMode=t,this},n.setTrackingMode=function(e){if(this.type!==t.CameraType.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this},n.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},n.getViewTransform=function(){return ce(ie(),this.matrix)},n.getWorldTransform=function(){return this.matrix},n.jitterProjectionMatrix=function(t,e){var n=ye(ie(),[t,e,0]);this.jitteredProjectionMatrix=he(ie(),n,this.projectionMatrix)},n.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},n.setMatrix=function(t){return this.matrix=t,this._update(),this},n.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},n.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},n.setNear=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this},n.setFar=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this},n.setViewOffset=function(e,n,r,i,o,a){return this.aspect=e/n,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},n.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},n.setZoom=function(e){return this.zoom=e,this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===t.CameraProjectionMode.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},n.setPerspective=function(e,n,r,i){var o;this.projectionMode=t.CameraProjectionMode.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var a=this.near*Math.tan(Io(.5*this.fov))/this.zoom,s=2*a,u=this.aspect*s,c=-.5*u;if(null===(o=this.view)||void 0===o?void 0:o.enabled){var l=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/l,a-=this.view.offsetY*s/h,u*=this.view.width/l,s*=this.view.height/h}return function(t,e,n,r,i,o,a){var s=2*o/(r-i),u=(n+e)/(n-e),c=(r+i)/(r-i),l=-(a+o)/(a-o),h=-2*a*o/(a-o);t[0]=2*o/(n-e),t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=l,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0}(this.projectionMatrix,c,c+u,a,a-s,e,this.far),de(this.projectionMatrix,this.projectionMatrix,Ce(1,-1,1)),ce(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},n.setOrthographic=function(e,n,r,i,o,a){var s;this.projectionMode=t.CameraProjectionMode.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=r,this.bottom=i,this.near=o,this.far=a;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=l-u,d=l+u,p=h+c,v=h-c;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(f+=y*this.view.offsetX)+y*this.view.width,v=(p-=g*this.view.offsetY)-g*this.view.height}return ke(this.projectionMatrix,f,d,v,p,o,a),de(this.projectionMatrix,this.projectionMatrix,Ce(1,-1,1)),ce(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},n.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=Oo(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},n.setFocalPoint=function(e,n,r){void 0===n&&(n=this.focalPoint[1]),void 0===r&&(r=this.focalPoint[2]);var i=Ce(0,1,0);if(this.focalPoint=Oo(e,n,r),this.trackingMode===t.CameraTrackingMode.CINEMATIC){var o=Le(Me(),this.focalPoint,this.position);e=o[0],n=o[1],r=o[2];var a=Ae(o),s=Ro(Math.asin(n/a)),u=90+Ro(Math.atan2(r,e)),c=ie();ve(c,c,Io(u)),pe(c,c,Io(s)),i=Ue(Me(),[0,1,0],c)}return ce(this.matrix,Ne(ie(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},n.getDistance=function(){return this.distance},n.getDistanceVector=function(){return this.distanceVector},n.setDistance=function(t){if(this.distance===t||0>t)return this;this.distance=t,Iu>this.distance&&(this.distance=Iu),this.dollyingStep=this.distance/100;var e=Me(),n=this.forward,r=this.focalPoint;return e[0]=(t=this.distance)*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},n.setMaxDistance=function(t){return this.maxDistance=t,this},n.setMinDistance=function(t){return this.minDistance=t,this},n.setAzimuth=function(e){return this.azimuth=Co(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},n.getAzimuth=function(){return this.azimuth},n.setElevation=function(e){return this.elevation=Co(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},n.getElevation=function(){return this.elevation},n.setRoll=function(e){return this.roll=Co(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},n.getRoll=function(){return this.roll},n._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},n.computeMatrix=function(){var e=Xe(qe(),[0,0,1],Io(this.roll));se(this.matrix);var n=Xe(qe(),[1,0,0],Io((this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.elevation)),r=Xe(qe(),[0,1,0],Io((this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.azimuth)),i=Ke(qe(),r,n);i=Ke(qe(),i,e);var o=xe(ie(),i);this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?(fe(this.matrix,this.matrix,this.focalPoint),he(this.matrix,this.matrix,o),fe(this.matrix,this.matrix,[0,0,this.distance])):this.type===t.CameraType.TRACKING&&(fe(this.matrix,this.matrix,this.position),he(this.matrix,this.matrix,o))},n._setPosition=function(t,e,n){this.position=Oo(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},n._getAxes=function(){Oe(this.right,Oo(Ye(We(),[1,0,0,0],this.matrix))),Oe(this.up,Oo(Ye(We(),[0,1,0,0],this.matrix))),Oe(this.forward,Oo(Ye(We(),[0,0,1,0],this.matrix))),Fe(this.right,this.right),Fe(this.up,this.up),Fe(this.forward,this.forward)},n._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=Ae(this.distanceVector);if(0===i)return this.elevation=0,void(this.azimuth=0);this.type===t.CameraType.TRACKING||this.rotateWorld?(this.elevation=Ro(Math.asin(n/i)),this.azimuth=Ro(Math.atan2(-e,-r))):(this.elevation=-Ro(Math.asin(n/i)),this.azimuth=-Ro(Math.atan2(-e,-r)))},n._getPosition=function(){Oe(this.position,Oo(Ye(We(),[0,0,0,1],this.matrix))),this._getDistance()},n._getFocalPoint=function(){var t,e;!function(t,e,n){var r=e[0],i=e[1],o=e[2];t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8]}(this.distanceVector,[0,0,-this.distance],(t=re(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Re(this.focalPoint,this.position,this.distanceVector),this._getDistance()},n._getDistance=function(){this.distanceVector=Le(Me(),this.focalPoint,this.position),this.distance=Ae(this.distanceVector),this.dollyingStep=this.distance/100},n._getOrthoMatrix=function(){if(this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC){var e=this.position,n=Xe(qe(),[0,0,1],-this.roll*Math.PI/180);Ee(this.orthoMatrix,n,Ce((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),Ce(this.zoom,this.zoom,1),e)}},n.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=he(ie(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(Ou.UPDATED)}},n.rotate=function(t,e,n){throw new Error(No)},n.pan=function(t,e){throw new Error(No)},n.dolly=function(t){throw new Error(No)},n.createLandmark=function(t,e){throw new Error(No)},n.gotoLandmark=function(t,e){throw new Error(No)},e}(),t.Camera=dn([ut({token:Cu})],t.Camera);var Ru=t.Syringe.defineToken("");t.RenderingService=function(){function e(e,n,r,i,o,a){this.renderingPluginProvider=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.sceneGraphService=void 0,this.styleValueRegistry=void 0,this.camera=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new Os(t.ElementEvent.RENDER_ORDER_CHANGED),this.hooks={init:new oa,dirtycheck:new Ea(["object"]),cull:new Ea(["object","camera"]),beginFrame:new va([]),beforeRender:new va(["objectToRender"]),render:new va(["objectToRender"]),afterRender:new va(["objectToRender"]),endFrame:new va([]),destroy:new va([]),pick:new ca(["result"]),pointerDown:new va(["event"]),pointerUp:new va(["event"]),pointerMove:new va(["event"]),pointerOut:new va(["event"]),pointerOver:new va(["event"]),pointerWheel:new va(["event"]),pointerCancel:new va(["event"])},this.renderingPluginProvider=e,this.canvasConfig=n,this.renderingContext=r,this.sceneGraphService=i,this.styleValueRegistry=o,this.camera=a}var n=e.prototype;return n.init=function(){var t=si(oi().mark((function t(){var e=this;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(t){t.apply(e)})),t.next=3,this.hooks.init.promise();case 3:this.inited=!0;case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getStats=function(){return this.stats},n.disableDirtyRectangleRendering=function(){return!this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering||this.renderingContext.renderReasons.has(t.RenderReason.CAMERA_CHANGED)},n.render=function(t){var e=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.sceneGraphService.triggerPendingEvents(),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root,t),this.hooks.beginFrame.call(),this.renderingContext.renderListCurrentFrame.forEach((function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)})),this.hooks.endFrame.call(),this.renderingContext.renderListCurrentFrame=[],this.renderingContext.renderReasons.clear())},n.renderDisplayObject=function(t,e){var n=this,r=e.renderer.getConfig(),i=r.enableDirtyCheck,o=r.enableCulling;this.styleValueRegistry.recalc(t);var a=i?this.hooks.dirtycheck.call(t):t;if(a){var s=o?this.hooks.cull.call(a,this.camera):a;s&&(this.stats.rendered++,this.renderingContext.renderListCurrentFrame.push(s))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var u=t.sortable,c=!1;u.dirty&&(u.sorted=t.childNodes.slice().sort(wo),c=!0,u.dirty=!1),(u.sorted||t.childNodes).forEach((function(t){n.renderDisplayObject(t,e)})),c&&t.forEach((function(t){n.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.dispatchEvent(n.renderOrderChangedEvent)}))},n.destroy=function(){this.inited=!1,this.hooks.destroy.call()},n.dirtify=function(){this.renderingContext.renderReasons.add(t.RenderReason.DISPLAY_OBJECT_CHANGED)},e}(),t.RenderingService=dn([ct(),pn(0,Dt(Ru)),pn(1,lt(Yo)),pn(2,lt(Nu)),pn(3,lt(Gs)),pn(4,lt(oo)),pn(5,lt(Au))],t.RenderingService);var Lu=t.Syringe.defineToken(""),Du=t.Syringe.defineToken("",{multiple:!1}),Fu=/\[\s*(.*)=(.*)\s*\]/;t.DefaultSceneGraphSelector=function(){function t(){}var e=t.prototype;return e.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find((function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.find((function(e){return e.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):null}return e.find((function(n){return e!==n&&n.nodeName===t}))},e.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll((function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.findAll((function(r){return e!==r&&r.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},e.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(t.startsWith("[")){var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}return e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var e=t.match(Fu),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},e.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return $n(n)?"":n.toString?n.toString():""},t}(),t.DefaultSceneGraphSelector=dn([ct({token:Du})],t.DefaultSceneGraphSelector),t.DefaultSceneGraphService=function(){function e(e){var n,r,i,o,a,s,u,c,l=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Os(t.ElementEvent.BOUNDS_CHANGED),this.rotate=(n=qe(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=Ce(e,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=qe();Qe(a,e[0],e[1],e[2]);var s=l.getRotation(t),u=l.getRotation(t.parentNode);sn(n,u),Je(n,n),Ke(a,n,a),Ke(o.localRotation,a,s),cn(o.localRotation,o.localRotation),l.dirtifyLocal(t,o)}else l.rotateLocal(t,e)}),this.rotateLocal=(r=qe(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=Ce(e,n,i));var o=t.transformable;Qe(r,e[0],e[1],e[2]),un(o.localRotation,o.localRotation,r),l.dirtifyLocal(t,o)}),this.setEulerAngles=(i=qe(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){Qe(o.localRotation,e[0],e[1],e[2]);var a=l.getRotation(t.parentNode);sn(i,Je(qe(),a)),un(o.localRotation,o.localRotation,i),l.dirtifyLocal(t,o)}else l.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var i=t.transformable;je(e,Me())||(function(t,e,n){var r=n[0],i=n[1],o=n[2],a=e[0],s=e[1],u=e[2],c=i*u-o*s,l=o*a-r*u,h=r*s-i*a,f=i*h-o*l,d=o*c-r*h,p=r*l-i*c,v=2*n[3];l*=v,h*=v,d*=2,p*=2,t[0]=a+(c*=v)+(f*=2),t[1]=s+l+d,t[2]=u+h+p}(e,e,i.localRotation),Re(i.localPosition,i.localPosition,e),l.dirtifyLocal(t,i))},this.setPosition=(o=ie(),a=Me(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,je(l.getPosition(t),a)||(Oe(n.position,a),null!==t.parentNode&&t.parentNode.transformable?(oe(o,t.parentNode.transformable.worldTransform),ce(o,o),Ue(n.localPosition,a,o)):Oe(n.localPosition,a),l.dirtifyLocal(t,n))}),this.setLocalPosition=function(){var t=Me();return function(e,n){var r=e.transformable;t[0]=n[0],t[1]=n[1],t[2]=n[2]||0,je(r.localPosition,t)||(Oe(r.localPosition,t),l.dirtifyLocal(e,r))}}(),this.translate=(s=Me(),u=Me(),c=Me(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ie(u,e,n,r)),je(e,s)||(Re(c,l.getPosition(t),e),l.setPosition(t,c))}),this.setRotation=function(){var t=qe();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=an(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var s=l.getRotation(e.parentNode);sn(t,s),Je(t,t),Ke(a.localRotation,t,n),cn(a.localRotation,a.localRotation),l.dirtifyLocal(e,a)}else l.setLocalRotation(e,n)}},this.calcLocalTransform=function(){var t=ie(),e=Me(),n=an(0,0,0,1);return function(r){if(0!==r.localSkew[0]||0!==r.localSkew[1]){if(Ee(r.localTransform,r.localRotation,r.localPosition,Ce(1,1,1),r.origin),0!==r.localSkew[0]||0!==r.localSkew[1]){var i=se(t);i[4]=Math.tan(r.localSkew[0]),i[1]=Math.tan(r.localSkew[1]),he(r.localTransform,r.localTransform,i)}var o=Ee(t,n,e,r.localScale,r.origin);he(r.localTransform,r.localTransform,o)}else Ee(r.localTransform,r.localRotation,r.localPosition,r.localScale,r.origin)}}(),this.sceneGraphSelectorFactory=e}var n=e.prototype;return n.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},n.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},n.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},n.attach=function(t,e,n){var r,i;t.parentNode&&this.detach(t),t.parentNode=e,$n(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var o=e.sortable;((null==o||null===(r=o.sorted)||void 0===r?void 0:r.length)||(null===(i=t.style)||void 0===i?void 0:i.zIndex))&&(o.dirty=!0);var a=t.transformable;a&&this.dirtifyWorld(t,a),a.frozen&&this.unfreezeParentToRoot(t)},n.detach=function(t){if(t.parentNode){var e,n,r=t.transformable,i=t.parentNode.sortable;((null==i||null===(e=i.sorted)||void 0===e?void 0:e.length)||(null===(n=t.style)||void 0===n?void 0:n.zIndex))&&(i.dirty=!0);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},n.getOrigin=function(t){return t.transformable.origin},n.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var i=t.transformable;if(!je(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},n.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var i=t.transformable;Qe(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},n.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=Ce(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},n.setLocalScale=function(t,e){var n=t.transformable,r=Ce(e[0],e[1],e[2]||n.localScale[2]);je(r,n.localScale)||(Oe(n.localScale,r),this.dirtifyLocal(t,n))},n.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=an(e,n,r,i));var o=t.transformable;sn(o.localRotation,e),this.dirtifyLocal(t,o)},n.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=ln(e,n));var r,i,o=t.transformable;(r=o.localSkew)[0]=(i=e)[0],r[1]=i[1],this.dirtifyLocal(t,o)},n.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},n.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},n.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){e.has(n.entity)||(t.boundsChangedEvent.detail=r,n.dispatchEvent(t.boundsChangedEvent),e.add(n.entity))};this.pendingEvents.forEach((function(t){var e=t[0],r=t[1];r.affectChildren?e.forEach((function(t){n(t,r)})):n(e,r)})),this.pendingEvents=[]},n.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.pendingEvents.push([t,{affectChildren:e}])},n.getPosition=function(t){var e=t.transformable;return me(e.position,this.getWorldTransform(t,e))},n.getRotation=function(t){var e=t.transformable;return Te(e.rotation,this.getWorldTransform(t,e))},n.getScale=function(t){var e=t.transformable;return be(e.scaling,this.getWorldTransform(t,e))},n.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},n.getLocalPosition=function(t){return t.transformable.localPosition},n.getLocalRotation=function(t){return t.transformable.localRotation},n.getLocalScale=function(t){return t.transformable.localScale},n.getLocalSkew=function(t){return t.transformable.localSkew},n.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},n.setLocalTransform=function(t,e){var n=me(Me(),e),r=Te(qe(),e),i=be(Me(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},n.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},n.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(La.isEmpty(r))return null;var i=n||new La;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},n.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new La},n.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new La).update(r.center,r.halfExtents))}));var a=So(t);if(a){var s,u=this.getTransformedGeometryBounds(a.style.clipPath,!0);u&&(s=new La).setFromTransformedAABB(u,this.getWorldTransform(a)),o?s&&(o=s.intersection(o)):o=s}return o||(o=new La),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},n.getLocalBounds=function(t){if(t.parentNode){var e=ie();t.parentNode.transformable&&(e=ce(ie(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!La.isEmpty(n)){var r=new La;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},n.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);La.isEmpty(i)||(r=new La).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(e=t.ownerDocument)||void 0===e||null===(n=e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=r.getMin(),s=a[0],u=a[1],c=r.getMax();return new Ga(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),c[0]-s,c[1]-u)}return new Ga((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},n.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},n.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;n.length>r;r++)this.syncHierarchy(n[r])}},n.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?he(e.worldTransform,r.worldTransform,e.localTransform):oe(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},n.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},e}(),t.DefaultSceneGraphService=dn([ct({token:Gs}),pn(0,lt(Lu))],t.DefaultSceneGraphService);var Bu=function(){function t(t){this.sceneGraphService=void 0,this.sceneGraphService=t}return t.prototype.calculator=function(t,e,n,r){var i=this;if(n instanceof Ni&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets){var o=e.parsedStyle.clipPathTargets.indexOf(r);e.parsedStyle.clipPathTargets.splice(o,1)}return n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),r.forEach((function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)})),n},t}();Bu=dn([ct({token:{token:co,named:t.PropertySyntax.CLIP_PATH}}),pn(0,lt(Gs))],Bu);var Gu=function(){function t(){this.parser=Oa,this.mixer=Ia}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ni?"none"===n.value?yo:go:n},t}();Gu=dn([ct({token:[{token:co,named:t.PropertySyntax.PAINT},{token:co,named:t.PropertySyntax.COLOR}]})],Gu);var Uu=function(){function t(){this.parser=Ka}return t.prototype.calculator=function(t,e,n){return n instanceof Ni?[]:n},t}();function ju(t){var e=t.parsedStyle.fontSize;return $n(e)?null:e}Uu=dn([ct({token:{token:co,named:t.PropertySyntax.FILTER}})],Uu);var Vu=function(){function e(){this.parser=Va,this.mixer=Qa}return e.prototype.calculator=function(e,n,r,i,o){if(!Wi.isRelativeUnit(r.unit))return r.value;if(r.unit===t.UnitType.kPercentage)return 0;if(r.unit===t.UnitType.kEms){if(i.parentNode){var a=ju(i.parentNode);if(a)return a*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}if(r.unit===t.UnitType.kRems){var s;if(null==i||null===(s=i.ownerDocument)||void 0===s?void 0:s.documentElement){var u=ju(i.ownerDocument.documentElement);if(u)return u*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}},e}();Vu=dn([ct({token:[{token:co,named:t.PropertySyntax.LENGTH_PERCENTAGE},{token:co,named:t.PropertySyntax.LENGTH}]})],Vu);var Hu=function(){function t(){this.mixer=ts}var e=t.prototype;return e.parser=function(t){var e=Ya(rr(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}();Hu=dn([ct({token:{token:co,named:t.PropertySyntax.LENGTH_PERCENTAGE_12}})],Hu);var zu=function(){function t(){this.mixer=ts}var e=t.prototype;return e.parser=function(t){var e=Ya(rr(t)?[t]:t);return 1===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[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}();zu=dn([ct({token:{token:co,named:t.PropertySyntax.LENGTH_PERCENTAGE_14}})],zu);var Wu=function(e){function n(){return e.apply(this,arguments)||this}return hi(n,e),n.prototype.postProcessor=function(e){var n,r,i;switch(e.nodeName){case t.Shape.CIRCLE:case t.Shape.ELLIPSE:var o=e.parsedStyle,a=o.cx,s=o.cy;$n(a)||(n=a),$n(s)||(r=s);break;case t.Shape.LINE:var u=e.parsedStyle,c=u.y1,l=u.y2;n=Math.min(u.x1,u.x2),r=Math.min(c,l),i=0;break;case t.Shape.RECT:case t.Shape.IMAGE:case t.Shape.GROUP:case t.Shape.HTML:case t.Shape.TEXT:case t.Shape.MESH:$n(e.parsedStyle.x)||(n=e.parsedStyle.x),$n(e.parsedStyle.y)||(r=e.parsedStyle.y)}if(e.nodeName!==t.Shape.PATH&&e.nodeName!==t.Shape.POLYLINE&&e.nodeName!==t.Shape.POLYGON&&(e.parsedStyle.defX=n||0,e.parsedStyle.defY=r||0),!$n(n)||!$n(r)||!$n(i)){var h=e.getLocalPosition(),f=h[0],d=h[1],p=h[2];e.setLocalPosition($n(n)?f:n,$n(r)?d:r,$n(i)?p:i)}},n}(Vu);Wu=dn([ct({token:{token:co,named:t.PropertySyntax.COORDINATE}})],Wu);var Yu=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i;n instanceof Ni&&(n=null);var o=null===(i=n)||void 0===i?void 0:i.cloneNode(!0);return o&&(o.style.isMarker=!0),o},t}();Yu=dn([ct({token:{token:co,named:t.PropertySyntax.MARKER}})],Yu);var qu=function(){function t(){this.mixer=Qa,this.parser=Ja}return t.prototype.calculator=function(t,e,n){return n.value},t}();qu=dn([ct({token:{token:co,named:t.PropertySyntax.NUMBER}})],qu);var Xu=function(){function e(){this.parser=Ja,this.mixer=$a(0,1)}var n=e.prototype;return n.calculator=function(t,e,n){return n.value},n.postProcessor=function(e){if(e.attributes.offsetPath){var n=e.attributes.offsetPath.nodeName;if(n===t.Shape.LINE||n===t.Shape.PATH||n===t.Shape.POLYLINE){var r=e.attributes.offsetPath.getPoint(e.parsedStyle.offsetDistance);r&&e.setLocalPosition(r.x,r.y)}}},e}();Xu=dn([ct({token:{token:co,named:t.PropertySyntax.OFFSET_DISTANCE}})],Xu);var Ku=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t}();Ku=dn([ct({token:{token:co,named:t.PropertySyntax.OFFSET_PATH}})],Ku);var Zu=function(){function t(){this.parser=Ja,this.mixer=$a(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}();Zu=dn([ct({token:{token:co,named:t.PropertySyntax.OPACITY_VALUE}})],Zu);var Ju=function(){function e(){this.parser=rs,this.mixer=is}var n=e.prototype;return n.calculator=function(t,e,n){return n instanceof Ni&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new Ga(0,0,0,0)}:n},n.postProcessor=function(e){if(e.nodeName===t.Shape.PATH){var n=e.parsedStyle,r=n.defX,i=n.defY;e.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},e}();Ju=dn([ct({token:{token:co,named:t.PropertySyntax.PATH}})],Ju);var Qu=function(){function e(){this.parser=os}return e.prototype.postProcessor=function(e){if(e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.POLYLINE){var n=e.parsedStyle;e.setLocalPosition(n.defX,n.defY)}},e}();Qu=dn([ct({token:{token:co,named:t.PropertySyntax.LIST_OF_POINTS}})],Qu);var $u=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).mixer=$a(0,1/0),e}return hi(e,t),e}(Vu);$u=dn([ct({token:{token:co,named:t.PropertySyntax.SHADOW_BLUR}})],$u);var tc=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ni?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}();tc=dn([ct({token:{token:co,named:t.PropertySyntax.TEXT}})],tc);var ec=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}();ec=dn([ct({token:{token:co,named:t.PropertySyntax.TEXT_TRANSFORM}})],ec);var nc=function(){function t(){this.tmpMat4=ie(),this.parser=ls,this.mixer=bs}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ni?[]:n},e.postProcessor=function(t){var e=this,n=t.parsedStyle,r=n.transform,i=n.defX,o=n.defY;r&&r.length&&(t.resetLocalTransform(),t.setLocalPosition(i,o),r.forEach((function(n){var r=n.t,a=n.d;if("scale"===r){var s=(null==a?void 0:a.map((function(t){return t.value})))||[1,1];t.scaleLocal(s[0],s[1],1)}else if("scalex"===r){var u=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(u[0],1,1)}else if("scaley"===r){var c=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,c[0],1)}else if("scalez"===r){var l=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,1,l[0])}else if("scale3d"===r){var h=(null==a?void 0:a.map((function(t){return t.value})))||[1,1,1];t.scaleLocal(h[0],h[1],h[2])}else if("translate"===r){var f=a||[no,no];t.translateLocal(f[0].value,f[1].value,0)}else if("translatex"===r){t.translateLocal((a||[no])[0].value,0,0)}else if("translatey"===r){t.translateLocal(0,(a||[no])[0].value,0)}else if("translatez"===r){t.translateLocal(0,0,(a||[no])[0].value)}else if("translate3d"===r){var d=a||[no,no,no];t.translateLocal(d[0].value,d[1].value,d[2].value)}else if("rotate"===r){t.rotateLocal(0,0,(a||[ro])[0].value)}else if("rotatex"===r){t.rotateLocal((a||[ro])[0].value,0,0)}else if("rotatey"===r){t.rotateLocal(0,(a||[ro])[0].value,0)}else if("rotatez"===r){t.rotateLocal(0,0,(a||[ro])[0].value)}else if("rotate3d"===r);else if("skew"===r){var p=(null==a?void 0:a.map((function(t){return t.value})))||[0,0];t.setLocalSkew(Io(p[0]),Io(p[1]))}else if("skewx"===r){var v=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(Io(v[0]),t.getLocalSkew()[1])}else if("skewy"===r){var y=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(t.getLocalSkew()[0],Io(y[0]))}else if("matrix"===r){var g=a.map((function(t){return t.value}));t.setLocalTransform(ae(e.tmpMat4,g[0],g[1],0,0,g[2],g[3],0,0,0,0,1,0,g[4]+i,g[5]+o,0,1))}else"matrix3d"===r&&(ae.apply(_e,[e.tmpMat4].concat(a.map((function(t){return t.value})))),e.tmpMat4[12]+=i,e.tmpMat4[13]+=o,t.setLocalTransform(e.tmpMat4))})))},t}();nc=dn([ct({token:{token:co,named:t.PropertySyntax.TRANSFORM}})],nc);var rc=function(){this.parser=Ts};rc=dn([ct({token:{token:co,named:t.PropertySyntax.TRANSFORM_ORIGIN}})],rc);var ic=function(){function t(){this.parser=Ja}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t}();ic=dn([ct({token:{token:co,named:t.PropertySyntax.Z_INDEX}})],ic);var oc=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:t.PropertySyntax.PAINT},{n:"stroke",int:!0,k:["none"],d:"none",syntax:t.PropertySyntax.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:t.PropertySyntax.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:t.PropertySyntax.OFFSET_PATH},{n:"offsetDistance",int:!0,syntax:t.PropertySyntax.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:t.PropertySyntax.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:t.PropertySyntax.FILTER},{n:"clipPath",syntax:t.PropertySyntax.CLIP_PATH},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:t.PropertySyntax.TRANSFORM},{n:"transformOrigin",p:100,d:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"center":e===t.Shape.TEXT?"text-anchor":"left top"},l:!0,syntax:t.PropertySyntax.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"cy",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"y",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"z",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"y1",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"z1",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"x2",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"y2",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"z2",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:t.PropertySyntax.PATH,p:50},{n:"points",l:!0,syntax:t.PropertySyntax.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:t.PropertySyntax.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:t.PropertySyntax.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:t.PropertySyntax.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:t.PropertySyntax.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:t.PropertySyntax.NUMBER,d:function(e){return e===t.Shape.PATH||e===t.Shape.POLYGON||e===t.Shape.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","end","left","right"],d:"start"},{n:"markerStart",syntax:t.PropertySyntax.MARKER},{n:"markerEnd",syntax:t.PropertySyntax.MARKER},{n:"markerMid",syntax:t.PropertySyntax.MARKER},{n:"markerStartOffset",syntax:t.PropertySyntax.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:t.PropertySyntax.LENGTH,l:!0,int:!0,d:"0"}],ac={},sc={},uc={},cc=ar((function(t){return t.sort((function(t,e){return uc[t]-uc[e]}))})),lc=Me(),hc=Me(),fc=Me(),dc=function(){function e(t,e,n){var r=this;this.sceneGraphService=void 0,this.propertySyntaxFactory=void 0,this.geometryUpdaterFactory=void 0,this.sceneGraphService=t,this.propertySyntaxFactory=e,this.geometryUpdaterFactory=n,oc.forEach((function(t){r.registerMetadata(t)}))}var n=e.prototype;return n.registerMetadata=function(t){[t.n].concat(t.a||[]).forEach((function(e){ac[e]=t,uc[e]=t.p||0}))},n.unregisterMetadata=function(t){delete ac[t]},n.getPropertySyntax=function(t){return this.propertySyntaxFactory(t)},n.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]});var i=n.skipUpdateAttribute,o=n.skipParse,a=n.usedAttributes,s=n.forceUpdateGeometry,u=Object.keys(e);u.forEach((function(n){var r,o=Li(n,e[n]),a=o[0];i||(t.attributes[a]=o[1]),!s&&(null===(r=ac[a])||void 0===r?void 0:r.l)&&(s=!0)})),o||u.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t)})),(u=cc((null==a?void 0:a.length)?Array.from(new Set(u.concat(a))):u)).forEach((function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t))})),s&&this.updateGeometry(t),u.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),t.children.length&&u.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))}))},n.parseProperty=function(t,e,n){var r=ac[t],i=e;if((""===e||$n(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)i=vo(e);else if(r){var o=r.k,a=r.syntax,s=a&&this.getPropertySyntax(a);o&&o.indexOf(e)>-1?i=vo(e):s&&s.parser&&(i=s.parser(e,n))}return i},n.computeProperty=function(t,e,n){var r=ac[t],i=e;if(r){var o=r.syntax,a=r.d;if(e instanceof Ni){var s=e.value;if("unset"===s&&(s=r.inh&&!("g-root"===n.id)?"inherit":"initial"),"initial"===s)$n(a)||(e=this.parseProperty(t,Ai(a)?a(n.nodeName):a,n));else if("inherit"===s){var u=this.tryToResolveProperty(n,t,{inherited:!0});return $n(u)?void this.addUnresolveProperty(n,t):u}}var c=o&&this.getPropertySyntax(o);if(c&&c.calculator)i=c.calculator(t,n.parsedStyle[t],e,n,this);else i=e instanceof Ni?e.value:e}return i},n.postProcessProperty=function(t,e){var n=ac[t];if(n&&n.syntax){var r=n.syntax&&this.getPropertySyntax(n.syntax);r&&r.postProcessor&&r.postProcessor(e)}},n.addUnresolveProperty=function(t,e){sc[t.entity]||(sc[t.entity]=[]),-1===sc[t.entity].indexOf(e)&&sc[t.entity].push(e)},n.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&function(t,e){return!sc[t.entity]||0===sc[t.entity].length||sc[t.entity].includes(e)}(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"===r||"initial"===r||"inherit"===r)return;return r}},n.recalc=function(t){var e=sc[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete sc[t.entity]}},n.updateGeometry=function(e){var n=this.geometryUpdaterFactory(e.nodeName);if(n){var r=e.geometry;r.contentBounds||(r.contentBounds=new La),r.renderBounds||(r.renderBounds=new La);var i=e.parsedStyle,o=n.update(i,e),a=o.width,s=o.height,u=o.depth,c=void 0===u?0:u,l=o.offsetX,h=void 0===l?0:l,f=o.offsetY,d=void 0===f?0:f,p=o.offsetZ,v=void 0===p?0:p,y=0>a,g=0>s,m=Ie(lc,Math.abs(a)/2,Math.abs(s)/2,c/2),b=i.stroke,T=i.lineWidth,E=i.increasedLineWidthForHitTesting,x=i.shadowType,w=i.shadowColor,S=i.filter,k=void 0===S?[]:S,N=i.transformOrigin,P=i.anchor;e.nodeName===t.Shape.TEXT&&delete i.anchor;var _=Ie(hc,(1-2*(P&&P[0]||0))*a/2+h,(1-2*(P&&P[1]||0))*s/2+d,(1-2*(P&&P[2]||0))*m[2]+v);r.contentBounds.update(_,m);var M=e.nodeName===t.Shape.POLYLINE||e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.PATH?Math.SQRT2:.5;if(b&&!b.isNone){var A=((T||0)+(E||0))*M;Re(m,m,Ie(fc,A,A,0))}if(r.renderBounds.update(_,m),w&&x&&"inner"!==x){var C=r.renderBounds,O=C.min,I=C.max,R=i.shadowBlur||0,L=i.shadowOffsetX||0,D=i.shadowOffsetY||0,F=I[0]+R+L,B=O[1]-R+D,G=I[1]+R+D;O[0]=Math.min(O[0],O[0]-R+L),I[0]=Math.max(I[0],F),O[1]=Math.min(O[1],B),I[1]=Math.max(I[1],G),r.renderBounds.setMinMax(O,I)}k.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,Re(r.renderBounds.halfExtents,r.renderBounds.halfExtents,Ce(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,u=r.renderBounds,c=u.min,l=u.max,h=l[0]+s+o,f=c[1]-s+a,d=l[1]+s+a;c[0]=Math.min(c[0],c[0]-s+o),l[0]=Math.max(l[0],h),c[1]=Math.min(c[1],f),l[1]=Math.max(l[1],d),r.renderBounds.setMinMax(c,l)}})),P=i.anchor;var U=(y?-1:1)*qa(N[0],0,e),j=(g?-1:1)*qa(N[1],1,e);e.setOrigin(U-=(y?-1:1)*(P&&P[0]||0)*r.contentBounds.halfExtents[0]*2,j-=(g?-1:1)*(P&&P[1]||0)*r.contentBounds.halfExtents[1]*2),this.sceneGraphService.dirtifyToRoot(e)}},n.isPropertyInheritable=function(t){var e=ac[t];return!!e&&e.inh},e}();dc=dn([ct({token:oo}),pn(0,lt(Gs)),pn(1,lt(uo)),pn(2,lt(ws))],dc);var pc,vc,yc,gc,mc=At((function(e){e(t.DisplayObjectPool),e(t.Camera),e(t.DefaultSceneGraphSelector),e({token:Lu,useFactory:function(t){return function(){return t.container.get(Du)}}}),e(t.DefaultSceneGraphService),e(t.OffscreenCanvasCreator),e(t.TextService),e(t.CircleUpdater),e(t.EllipseUpdater),e(t.RectUpdater),e(t.TextUpdater),e(t.LineUpdater),e(t.PolylineUpdater),e(t.PathUpdater),e({token:ws,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Ss,n)&&(e[n]=t.container.getNamed(Ss,n)),e[n]}}}),e(qu),e(xs),e(Bu),e(Gu),e(Uu),e(Vu),e(Hu),e(zu),e(Wu),e(Xu),e(Ku),e(Zu),e(Ju),e(Qu),e($u),e(tc),e(ec),e(nc),e(rc),e(ic),e(Yu),e({token:uo,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(co,n)&&(e[n]=t.container.getNamed(co,n)),e[n]}}}),e(dc)})),bc=function(){function t(t){this.plugins=[],this.config=void 0,this.config=li({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(t){-1===this.plugins.findIndex((function(e){return e===t}))&&this.plugins.push(t)},e.unregisterPlugin=function(t){var e=this.plugins.findIndex((function(e){return e===t}));e>-1&&this.plugins.splice(e,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(t){return this.plugins.find((function(e){return e.name===t}))},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),Tc=t.Syringe.defineToken(""),Ec=(pc=function(){function e(t,e){this.strategyProvider=void 0,this.renderingContext=void 0,this.strategyProvider=t,this.renderingContext=e}return e.prototype.apply=function(e){var n=this,r=this.strategyProvider.getContributions();e.hooks.cull.tap(vc.tag,(function(e){if(e){var i=e.cullable;return i.visible=0===r.length?n.renderingContext.unculledEntities.indexOf(e.entity)>-1:r.every((function(t){return t.isVisible(e)})),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new Os(t.ElementEvent.CULLED)),null)}return e})),e.hooks.afterRender.tap(vc.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},e}(),pc.tag="Culling",vc=pc);Ec=vc=dn([ct({contrib:Ru}),pn(0,Dt(Tc)),pn(1,lt(Nu))],Ec);var xc,wc,Sc=(yc=function(){function t(){}return t.prototype.apply=function(t){t.hooks.dirtycheck.tap(gc.tag,(function(e){return e?e.renderable.dirty||t.disableDirtyRectangleRendering()?e:null:e}))},t}(),yc.tag="DirtyCheck",gc=yc);Sc=gc=dn([ct({contrib:Ru})],Sc);var kc=(xc=function(){function t(t,e,n,r,i){var o=this;this.canvasConfig=void 0,this.contextService=void 0,this.renderingService=void 0,this.renderingContext=void 0,this.eventService=void 0,this.autoPreventDefault=!1,this.rootPointerEvent=new Zs(null),this.rootWheelEvent=new Js(null),this.onPointerMove=function(t){var e,n,r=null===(e=o.renderingContext.root)||void 0===e||null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r.supportsTouchEvents||"touch"!==t.pointerType){for(var i,a=yi(o.normalizeToPointerEvent(t,r));!(i=a()).done;){var s=o.bootstrapEvent(o.rootPointerEvent,i.value,r);o.eventService.mapEvent(s)}o.setCursor(o.eventService.cursor)}},this.canvasConfig=t,this.contextService=e,this.renderingService=n,this.renderingContext=r,this.eventService=i}var e=t.prototype;return e.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var t=si(oi().mark((function t(n){return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.renderingService.hooks.pick.promise({position:n,picked:[],topmost:!0});case 2:return t.abrupt("return",t.sent.picked[0]||null);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(wc.tag,(function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap(wc.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var i,o=yi(r);!(i=o()).done;){var a=e.bootstrapEvent(e.rootPointerEvent,i.value,n);e.eventService.mapEvent(a)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerUp.tap(wc.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r,i=e.contextService.getDomElement(),o=i&&t.target&&t.target!==i&&i.contains&&!i.contains(t.target)?"outside":"",a=yi(e.normalizeToPointerEvent(t,n));!(r=a()).done;){var s=e.bootstrapEvent(e.rootPointerEvent,r.value,n);s.type+=o,e.eventService.mapEvent(s)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerMove.tap(wc.tag,this.onPointerMove),t.hooks.pointerOver.tap(wc.tag,this.onPointerMove),t.hooks.pointerOut.tap(wc.tag,this.onPointerMove)},e.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var r=this.eventService.client2Viewport(new Ba(e.clientX,e.clientY)),i=r.y;t.viewport.x=r.x,t.viewport.y=i;var o=this.eventService.viewport2Canvas(t.viewport),a=o.y;return t.canvas.x=o.x,t.canvas.y=a,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=_o[t.type]||t.type),t},e.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new Ba(t.clientX,t.clientY)),r=n.y;e.viewport.x=n.x,e.viewport.y=r;var i=this.eventService.viewport2Canvas(e.viewport),o=i.y;return e.canvas.x=i.x,e.canvas.y=o,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},e.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},e.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},e.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;t.changedTouches.length>r;r++){var i=t.changedTouches[r];or(i.button)&&(i.button=0),or(i.buttons)&&(i.buttons=1),or(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),or(i.width)&&(i.width=i.radiusX||1),or(i.height)&&(i.height=i.radiusY||1),or(i.tiltX)&&(i.tiltX=0),or(i.tiltY)&&(i.tiltY=0),or(i.pointerType)&&(i.pointerType="touch"),or(i.pointerId)&&(i.pointerId=i.identifier||0),or(i.pressure)&&(i.pressure=i.force||.5),or(i.twist)&&(i.twist=0),or(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;or(o.isPrimary)&&(o.isPrimary=!0),or(o.width)&&(o.width=1),or(o.height)&&(o.height=1),or(o.tiltX)&&(o.tiltX=0),or(o.tiltY)&&(o.tiltY=0),or(o.pointerType)&&(o.pointerType="mouse"),or(o.pointerId)&&(o.pointerId=1),or(o.pressure)&&(o.pressure=.5),or(o.twist)&&(o.twist=0),or(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t}(),xc.tag="Event",wc=xc);kc=wc=dn([ct({contrib:Ru}),pn(0,lt(Yo)),pn(1,lt(Ms)),pn(2,lt(t.RenderingService)),pn(3,lt(Nu)),pn(4,lt(t.EventService))],kc);var Nc,Pc,_c=[t.Shape.CIRCLE,t.Shape.ELLIPSE,t.Shape.IMAGE,t.Shape.RECT,t.Shape.LINE,t.Shape.POLYLINE,t.Shape.POLYGON,t.Shape.TEXT,t.Shape.PATH,t.Shape.HTML],Mc=function(){function e(t){this.camera=void 0,this.camera=t}var n=e.prototype;return n.isVisible=function(e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(La.isEmpty(o))return!1;var a=this.camera.getFrustum(),s=null===(n=e.parentNode)||void 0===n||null===(r=n.cullable)||void 0===r?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,s||t.Mask.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==t.Mask.OUTSIDE,i.visible},n.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===t.Mask.OUTSIDE||r===t.Mask.INSIDE)return r;for(var o=t.Mask.INSIDE,a=_c.indexOf(e.nodeName)>-1,s=0,u=i.length;u>s;++s){var c=1<<s;if(0!=(r&c)&&(!a||4!==s&&5!==s)){var l=i[s],h=l.normal,f=l.distance;if(0>Be(h,n.getPositiveFarPoint(i[s]))+f)return t.Mask.OUTSIDE;0>Be(h,n.getNegativeFarPoint(i[s]))+f&&(o|=c)}}return o},e}();Mc=dn([ct({contrib:Tc}),pn(0,lt(Au))],Mc);var Ac=(Nc=function(){function e(t,e,n,r){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set,this.renderingContext=t,this.styleValueRegistry=e,this.sceneGraphService=n,this.rBush=r}var n=e.prototype;return n.pushToSync=function(t){var e=this;t.forEach((function(t){e.toSync.add(t)}))},n.apply=function(e){var n=this,r=function(t){t.target.renderable.dirty=!0,e.dirtify()},i=function(t){t.detail.affectChildren&&t.target.forEach((function(t){n.pushToSync([t])})),n.pushToSync(t.composedPath().slice(0,-2)),e.dirtify()},o=function(t){var r=t.target;n.pushToSync(t.composedPath().slice(0,-2)),n.styleValueRegistry.recalc(r),n.sceneGraphService.dirtifyToRoot(r),e.dirtify()},a=function(t){var r=t.target,i=r.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(r),n.sceneGraphService.dirtifyToRoot(t.target),e.dirtify()};e.hooks.init.tapPromise(Pc.tag,si(oi().mark((function e(){return oi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.renderingContext.root.addEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.addEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.addEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.addEventListener(t.ElementEvent.BOUNDS_CHANGED,i);case 4:case"end":return e.stop()}}),e)})))),e.hooks.destroy.tap(Pc.tag,(function(){n.renderingContext.root.removeEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.removeEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.removeEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.removeEventListener(t.ElementEvent.BOUNDS_CHANGED,i)})),e.hooks.endFrame.tap(Pc.tag,(function(){n.syncRTree()}))},n.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter((function(t){return t.isConnected})).forEach((function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=i.getMin(),a=o[0],s=o[1],u=i.getMax(),c=u[0],l=u[1];r.aabb||(r.aabb={}),r.aabb.id=n.entity,r.aabb.minX=a,r.aabb.minY=s,r.aabb.maxX=c,r.aabb.maxY=l}r.aabb&&(isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb))})),this.rBush.load(e),e.length=0,this.toSync.clear()},e}(),Nc.tag="Prepare",Pc=Nc);Ac=Pc=dn([ct({contrib:Ru}),pn(0,lt(Nu)),pn(1,lt(oo)),pn(2,lt(Gs)),pn(3,lt(Bs))],Ac);var Cc,Oc=At((function(e){Ot.register(e,Ru,{cache:!1}),Ot.register(e,Tc,{cache:!1}),e({token:Bs,useValue:new jt}),e(t.RenderingService),e(t.EventService),e(kc),e(Ac),e(Sc),e(Ec),e(Mc)}));(Cc=t.CanvasEvent||(t.CanvasEvent={})).READY="ready",Cc.BEFORE_RENDER="beforerender",Cc.AFTER_RENDER="afterrender",Cc.BEFORE_DESTROY="beforedestroy",Cc.AFTER_DESTROY="afterdestroy",Cc.RESIZE="resize",Cc.DIRTY_RECTANGLE="dirtyrectangle";var Ic=function(e){function n(n){var r;(r=e.call(this)||this).container=Lt.createChild(),r.document=void 0,r.customElements=void 0,r.requestAnimationFrame=void 0,r.cancelAnimationFrame=void 0,r.devicePixelRatio=void 0,r.supportsPointerEvents=void 0,r.supportsTouchEvents=void 0,r.isTouchEvent=void 0,r.isMouseEvent=void 0,r.Element=eu,r.frameId=void 0,r.eventService=void 0,r.renderingService=void 0,r.inited=!1,r.readyPromise=void 0,r.resolveReadyPromise=void 0,r.mountEvent=new Os(t.ElementEvent.MOUNTED),r.unmountEvent=new Os(t.ElementEvent.UNMOUNTED),r.beforeRenderEvent=new Os(t.CanvasEvent.BEFORE_RENDER),r.afterRenderEvent=new Os(t.CanvasEvent.AFTER_RENDER),r.document=new Ds,r.document.defaultView=pi(r),r.customElements=new As;var i=n.container,o=n.canvas,a=n.offscreenCanvas,s=n.width,u=n.height,c=n.devicePixelRatio,l=n.renderer,h=n.background,f=n.cursor,d=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,y=n.createImage,g=n.supportsPointerEvents,m=n.supportsTouchEvents,b=n.isTouchEvent,T=n.isMouseEvent;!function(t,e){if(t){var n="string"==typeof t?t:t.id||Eo++;To[n]&&To[n].destroy(),To[n]=e}}(i,pi(r));var E=s,x=u,w=c;return o&&(w=1>(w=c||xo&&window.devicePixelRatio||1)?1:Math.ceil(w),E=s||function(t){var e=ko(t,"width");return"auto"===e?t.offsetWidth:parseFloat(e)}(o)||o.width/w,x=u||function(t){var e=ko(t,"height");return"auto"===e?t.offsetHeight:parseFloat(e)}(o)||o.height/w),r.devicePixelRatio=w,r.requestAnimationFrame=null!=p?p:Jr.bind(globalThis),r.cancelAnimationFrame=null!=v?v:Qr.bind(globalThis),r.supportsTouchEvents=null!=m?m:"ontouchstart"in globalThis,r.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,r.isTouchEvent=null!=b?b:function(t){return r.supportsTouchEvents&&t instanceof globalThis.TouchEvent},r.isMouseEvent=null!=T?T:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!r.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:o,width:E,height:x,renderer:l,offscreenCanvas:a,devicePixelRatio:w,cursor:f||"default",background:h||"transparent",createImage:y,document:d}),r.initDefaultCamera(E,x),si(oi().mark((function e(){return oi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.initRenderer(l);case 2:r.dispatchEvent(new Os(t.CanvasEvent.READY)),r.readyPromise&&r.resolveReadyPromise();case 4:case"end":return e.stop()}}),e)})))(),r}hi(n,e);var r=n.prototype;return r.initRenderingContext=function(e){var n=this;this.container.register({token:Yo,useValue:e}),this.container.register({token:Nu,useValue:{root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_INSERTED,(function(t){n.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_REMOVED,(function(t){n.unmountChildren(t.detail.child)}))},r.initDefaultCamera=function(e,n){var r=Lt.get(Cu);r.setType(t.CameraType.EXPLORING,t.CameraTrackingMode.DEFAULT).setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0).setOrthographic(e/-2,e/2,n/2,n/-2,.1,1e3),r.canvas=this;var i=this.container.get(Nu);r.eventEmitter.on(Ou.UPDATED,(function(){i.renderReasons.add(t.RenderReason.CAMERA_CHANGED)})),this.container.register({token:Au,useValue:r})},r.getConfig=function(){return this.container.get(Yo)},r.getContainer=function(){return this.container},r.getRoot=function(){return this.document.documentElement},r.getCamera=function(){return this.container.get(Au)},r.getContextService=function(){return this.container.get(Ms)},r.getEventService=function(){return this.eventService},r.getRenderingService=function(){return this.renderingService},r.getRenderingContext=function(){return this.container.get(Nu)},r.getRBushRoot=function(){return this.container.get(Bs)},r.getStats=function(){return this.getRenderingService().getStats()},r.destroy=function(e,n){(void 0===e&&(e=!0),void 0===n&&(n=!1),n||this.dispatchEvent(new Os(t.CanvasEvent.BEFORE_DESTROY)),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var r=this.getRoot();this.unmountChildren(r),e&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),n||this.dispatchEvent(new Os(t.CanvasEvent.AFTER_DESTROY))},r.changeSize=function(t,e){this.resize(t,e)},r.resize=function(e,n){var r=this.container.get(Yo);r.width=e,r.height=n,this.getContextService().resize(e,n);var i=this.container.get(Au),o=i.getProjectionMode();i.setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0),o===t.CameraProjectionMode.ORTHOGRAPHIC?i.setOrthographic(e/-2,e/2,n/2,n/-2,i.getNear(),i.getFar()):i.setAspect(e/n),this.dispatchEvent(new Os(t.CanvasEvent.RESIZE,{width:e,height:n}))},r.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},r.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},r.removeChild=function(t){return this.document.documentElement.removeChild(t)},r.removeChildren=function(){this.document.documentElement.removeChildren()},r.render=function(){(this.dispatchEvent(this.beforeRenderEvent),this.container.isBound(t.RenderingService))&&this.container.get(t.RenderingService).render(this.getConfig());this.dispatchEvent(this.afterRenderEvent)},r.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},r.initRenderer=function(){var e=si(oi().mark((function e(n){var r;return oi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(n),r=this.container.get(Ms),this.renderingService=this.container.get(t.RenderingService),this.eventService=this.container.get(t.EventService),this.eventService.init(),e.next=12,r.init();case 12:return e.next=14,this.renderingService.init();case 14:this.inited=!0,this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot()),n.getConfig().enableAutoRendering&&this.run();case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.loadCommonContainerModule=function(){this.container.unload(Oc),this.container.load(Oc,!0)},r.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.container=e.container,t.init()}))},r.setRenderer=function(){var t=si(oi().mark((function t(e){var n,r;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer!==e){t.next=3;break}return t.abrupt("return");case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach((function(t){t.destroy()})),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.setCursor=function(t){this.container.get(Yo).cursor=t,this.getContextService().applyCursorStyle(t)},r.unmountChildren=function(t){var e=this;if(this.inited){var n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t instanceof ou&&t.disconnectedCallback&&t.disconnectedCallback(),t.dispatchEvent(e.unmountEvent),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))}},r.mountChildren=function(t){var e=this;this.inited?t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.dispatchEvent(e.mountEvent),t instanceof ou&&t.connectedCallback&&t.connectedCallback())})):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName)},r.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},r.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},r.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},r.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},r.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},r.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},ci(n,[{key:"ready",get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),n}(Is);Lt.load(mc);var Rc=Lt.get(oo);function Lc(t,e){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lc(t,e)}var Dc={}.toString,Fc=function(t,e){return Dc.call(t)==="[object "+e+"]"},Bc=function(t){return Fc(t,"Function")};function Gc(t,e){var n;if(t)if(n=t,Array.isArray?Array.isArray(n):Fc(n,"Array"))for(var r=0,i=t.length;i>r&&!1!==e(t[r],r);r++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}var Uc,jc=function(t){return Fc(t,"String")},Vc=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return Gc(t,(function(n,r){Bc(t)&&"prototype"===r||e.push(n)})),e};!function(t,e){if(!Bc(t))throw new TypeError("Expected a function");var n=function n(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};n.cache=new Map}((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return Uc||(Uc=document.createElement("canvas").getContext("2d")),Uc.font=[o,a,i,n+"px",r].join(" "),Uc.measureText(jc(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;n>e;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;n>e;e++)for(var o=arguments[e],a=0,s=o.length;s>a;a++,i++)r[i]=o[a];return r}([t],Vc(e)).join("")}));var Hc="undefined"!=typeof Float32Array?Float32Array:Array;function zc(t,e,n){var r,i,o,a,s,u,c,l,h,f,d,p,v=n[0],y=n[1],g=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*v+s*y+h*g+e[12],t[13]=i*v+u*y+f*g+e[13],t[14]=o*v+c*y+d*g+e[14],t[15]=a*v+l*y+p*g+e[15]),t}function Wc(){var t=new Hc(3);return Hc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Yc(t){var e=new Hc(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function qc(t,e,n){var r=new Hc(3);return r[0]=t,r[1]=e,r[2]=n,r}function Xc(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Kc(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Zc(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Jc(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Qc(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var $c=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},tl=function(t){return Math.hypot(t[0],t[1],t[2])};!function(){var t=Wc()}();!function(){var t,e=(t=new Hc(4),Hc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function el(){var t=new Hc(4);return Hc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function nl(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function rl(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function il(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],d=n[0],p=n[1],v=n[2],y=n[3];return 0>(o=c*d+l*p+h*v+f*y)&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*d,t[1]=s*l+u*p,t[2]=s*h+u*v,t[3]=s*f+u*y,t}var ol=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};(function(){var t=Wc(),e=qc(1,0,0),n=qc(0,1,0)})(),function(){var t=el(),e=el()}(),function(){var t,e=(t=new Hc(9),Hc!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t)}();function al(){
15
+ ***************************************************************************** */()}},n.exports),n.exports}!function(t){!function(e){var r="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(t);function o(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===r.Reflect?r.Reflect=t:i=o(r.Reflect,i),function(t){var e=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",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return rt(Object.create(null))}:a?function(){return rt({__proto__:null})}:function(){return rt({})},has:s?function(t,n){return e.call(t,n)}:function(t,e){return e in t},get:s?function(t,n){return e.call(t,n)?t[n]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,f=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?et():Set,d=new(l||"function"!=typeof WeakMap?nt():WeakMap);function p(t,e,n,r){if(L(n)){if(!z(t))throw new TypeError;if(!Y(e))throw new TypeError;return S(t,e)}if(!z(t))throw new TypeError;if(!B(e))throw new TypeError;if(!B(r)&&!L(r)&&!D(r))throw new TypeError;return D(r)&&(r=void 0),k(t,e,n=H(n),r)}function v(t,e){function n(n,r){if(!B(n))throw new TypeError;if(!L(r)&&!q(r))throw new TypeError;C(t,e,n,r)}return n}function y(t,e,n,r){if(!B(n))throw new TypeError;return L(r)||(r=H(r)),C(t,e,n,r)}function g(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),P(t,e,n)}function m(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),_(t,e,n)}function b(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),M(t,e,n)}function T(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),A(t,e,n)}function E(t,e){if(!B(t))throw new TypeError;return L(e)||(e=H(e)),O(t,e)}function x(t,e){if(!B(t))throw new TypeError;return L(e)||(e=H(e)),I(t,e)}function w(t,e,n){if(!B(e))throw new TypeError;L(n)||(n=H(n));var r=N(e,n,!1);if(L(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}function S(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!L(r)&&!D(r)){if(!Y(r))throw new TypeError;e=r}}return e}function k(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!L(o)&&!D(o)){if(!B(o))throw new TypeError;r=o}}return r}function N(t,e,n){var r=d.get(t);if(L(r)){if(!n)return;r=new h,d.set(t,r)}var i=r.get(e);if(L(i)){if(!n)return;i=new h,r.set(e,i)}return i}function P(t,e,n){if(_(t,e,n))return!0;var r=$(e);return!D(r)&&P(t,r,n)}function _(t,e,n){var r=N(e,n,!1);return!L(r)&&j(r.has(t))}function M(t,e,n){if(_(t,e,n))return A(t,e,n);var r=$(e);return D(r)?void 0:M(t,r,n)}function A(t,e,n){var r=N(e,n,!1);if(!L(r))return r.get(t)}function C(t,e,n,r){N(n,r,!0).set(t,e)}function O(t,e){var n=I(t,e),r=$(t);if(null===r)return n;var i=O(r,e);if(0>=i.length)return n;if(0>=n.length)return i;for(var o=new f,a=[],s=0,u=n;u.length>s;s++){o.has(h=u[s])||(o.add(h),a.push(h))}for(var c=0,l=i;l.length>c;c++){var h;o.has(h=l[c])||(o.add(h),a.push(h))}return a}function I(t,e){var n=[],r=N(t,e,!1);if(L(r))return n;for(var i=K(r.keys()),o=0;;){var a=J(i);if(!a)return n.length=o,n;var s=Z(a);try{n[o]=s}catch(t){try{Q(i)}finally{throw t}}o++}}function R(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}}function L(t){return void 0===t}function D(t){return null===t}function F(t){return"symbol"==typeof t}function B(t){return"object"==typeof t?null!==t:"function"==typeof t}function G(t,e){switch(R(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",i=X(t,r);if(void 0!==i){var o=i.call(t,n);if(B(o))throw new TypeError;return o}return U(t,"default"===n?"number":n)}function U(t,e){if("string"===e){var n=t.toString;if(W(n))if(!B(i=n.call(t)))return i;if(W(r=t.valueOf))if(!B(i=r.call(t)))return i}else{var r;if(W(r=t.valueOf))if(!B(i=r.call(t)))return i;var i,o=t.toString;if(W(o))if(!B(i=o.call(t)))return i}throw new TypeError}function j(t){return!!t}function V(t){return""+t}function H(t){var e=G(t,3);return F(e)?e:V(e)}function z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function W(t){return"function"==typeof t}function Y(t){return"function"==typeof t}function q(t){switch(R(t)){case 3:case 4:return!0;default:return!1}}function X(t,e){var n=t[e];if(null!=n){if(!W(n))throw new TypeError;return n}}function K(t){var e=X(t,i);if(!W(e))throw new TypeError;var n=e.call(t);if(!B(n))throw new TypeError;return n}function Z(t){return t.value}function J(t){var e=t.next();return!e.done&&e}function Q(t){var e=t.return;e&&e.call(t)}function $(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function tt(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[i]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&this._keys.length>t){var n=this._selector(this._keys[t],this._values[t]);return this._keys.length>t+1?this._index++:(this._index=-1,this._keys=e,this._values=e),{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw 0>this._index||(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return 0>this._index||(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return 0>e?void 0:this._values[e]},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var r=this._keys.length,i=n+1;r>i;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,o)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[i]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),0>this._cacheIndex&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}function et(){return function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[i]=function(){return this.keys()},t}()}function nt(){var t=16,n=u.create(),r=i();return function(){function t(){this._key=i()}return t.prototype.has=function(t){var e=o(t,!1);return void 0!==e&&u.has(e,this._key)},t.prototype.get=function(t){var e=o(t,!1);return void 0!==e?u.get(e,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=o(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=i()},t}();function i(){var t;do{t="@@WeakMap@@"+c()}while(u.has(n,t));return n[t]=!0,t}function o(t,n){if(!e.call(t,r)){if(!n)return;Object.defineProperty(t,r,{value:u.create()})}return t[r]}function a(t,e){for(var n=0;e>n;++n)t[n]=255*Math.random()|0;return t}function s(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):a(new Uint8Array(t),t):a(new Array(t),t)}function c(){var e=s(t);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;t>r;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),16>i&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function rt(t){return t.__=void 0,delete t.__,t}t("decorate",p),t("metadata",v),t("defineMetadata",y),t("hasMetadata",g),t("hasOwnMetadata",m),t("getMetadata",b),t("getOwnMetadata",T),t("getMetadataKeys",E),t("getOwnMetadataKeys",x),t("deleteMetadata",w)}(i)}()}(e||(e={}));var i,o=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.NON_CUSTOM_TAG_KEYS=e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct",e.NON_CUSTOM_TAG_KEYS=[e.INJECT_TAG,e.MULTI_INJECT_TAG,e.NAME_TAG,e.UNMANAGED_TAG,e.NAMED_TAG,e.OPTIONAL_TAG]})),a=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=void 0;e.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};e.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};e.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}})),s=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var n=0;e.id=function(){return n++}})),u=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var n=function(){function t(t,e){this.id=s.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=a.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===a.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=n})),c=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]};e.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},e.STACK_OVERFLOW="Maximum call stack size exceeded"})),l=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var n=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(o.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(o.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(o.TAGGED_PROP,t)||[]},t}();e.MetadataReader=n})),h=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}})),f=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0,e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===c.STACK_OVERFLOW}})),d=r((function(t,e){function n(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function r(t,e){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===e||r(t.parentRequest,e))}function i(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}Object.defineProperty(e,"__esModule",{value:!0}),e.circularDependencyToException=e.listMetadataForTarget=e.listRegisteredBindingsForServiceIdentifier=e.getServiceIdentifierAsString=e.getFunctionName=void 0,e.getServiceIdentifierAsString=n,e.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="",o=n(t,e);return 0!==o.length&&(r="\nRegistered bindings:",o.forEach((function(t){var e="Object";null!==t.implementationType&&(e=i(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)}))),r},e.circularDependencyToException=function t(e){e.childRequests.forEach((function(e){if(r(e,e.serviceIdentifier)){var i=function(t){return function t(e,r){void 0===r&&(r=[]);var i=n(e.serviceIdentifier);return r.push(i),null!==e.parentRequest?t(e.parentRequest,r):r}(t).reverse().join(" --\x3e ")}(e);throw new Error(c.CIRCULAR_DEPENDENCY+" "+i)}t(e)}))},e.listMetadataForTarget=function(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(t){n+=t.toString()+"\n"}))," "+t+"\n "+t+" - "+n}return" "+t},e.getFunctionName=i})),p=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var n=function(){function t(t){this.id=s.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=n})),v=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.toString=function(){return this.key===o.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},t}();e.Metadata=n})),y=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0,e.Plan=function(t,e){this.parentContext=t,this.rootRequest=e}})),g=r((function(t,e){function n(t,e,n,r,i){var o={},a="number"==typeof i,s=void 0!==i&&a?i.toString():n;if(a&&void 0!==n)throw new Error(c.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(t,e)&&(o=Reflect.getMetadata(t,e));var u=o[s];if(Array.isArray(u))for(var l=0,h=u;h.length>l;l++){var f=h[l];if(f.key===r.key)throw new Error(c.DUPLICATED_METADATA+" "+f.key.toString())}else u=[];u.push(r),o[s]=u,Reflect.defineMetadata(t,o,e)}function r(t,e){Reflect.decorate(t,e)}function i(t,e){return function(n,r){e(n,r,t)}}Object.defineProperty(e,"__esModule",{value:!0}),e.tagProperty=e.tagParameter=e.decorate=void 0,e.tagParameter=function(t,e,r,i){n(o.TAGGED,t,e,i,r)},e.tagProperty=function(t,e,r){n(o.TAGGED_PROP,t.constructor,e,r)},e.decorate=function(t,e,n){"number"==typeof n?r([i(n,t)],e):"string"==typeof n?Reflect.decorate([t],e,n):r([t],e)}})),m=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var n=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=n,e.inject=function(t){return function(e,n,r){if(void 0===t)throw new Error(c.UNDEFINED_INJECT_ANNOTATION(e.name));var i=new v.Metadata(o.INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),b=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var n=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=n})),T=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var n=function(){function t(t,e,n,r){this.id=s.id(),this.type=t,this.serviceIdentifier=n,this.name=new b.QueryableString(e||""),this.metadata=new Array;var i=null;"string"==typeof r?i=new v.Metadata(o.NAMED_TAG,r):r instanceof v.Metadata&&(i=r),null!==i&&this.metadata.push(i)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;n.length>e;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(o.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(o.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(o.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return o.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(o.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===o.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return o.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(o.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;i.length>r;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=n})),E=r((function(t,e){var r=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};function i(t,e,n,i){var o=t.getConstructorMetadata(n),a=o.compilerGeneratedMetadata;if(void 0===a)throw new Error(c.MISSING_INJECTABLE_ANNOTATION+" "+e+".");var l=o.userGeneratedMetadata,h=Object.keys(l),f=function(t,e,n,r,i){for(var o=[],a=0;i>a;a++){var u=s(a,t,e,n,r);null!==u&&o.push(u)}return o}(i,e,a,l,0===n.length&&h.length>0||h.length>n.length?h.length:n.length),d=u(t,n);return r(r([],f),d)}function s(t,e,n,r,i){var o=i[t.toString()]||[],s=l(o),u=!0!==s.unmanaged,h=r[t],f=s.inject||s.multiInject;if((h=f||h)instanceof m.LazyServiceIdentifer&&(h=h.unwrap()),u){if(!e&&(h===Object||h===Function||void 0===h))throw new Error(c.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".");var d=new T.Target(a.TargetTypeEnum.ConstructorArgument,s.targetName,h);return d.metadata=o,d}return null}function u(t,e){for(var n=t.getPropertiesMetadata(e),i=[],o=0,s=Object.keys(n);s.length>o;o++){var c=s[o],h=n[c],f=l(n[c]),d=new T.Target(a.TargetTypeEnum.ClassProperty,f.targetName||c,f.inject||f.multiInject);d.metadata=h,i.push(d)}var p=Object.getPrototypeOf(e.prototype).constructor;if(p!==Object){var v=u(t,p);i=r(r([],i),v)}return i}function l(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[o.INJECT_TAG],multiInject:e[o.MULTI_INJECT_TAG],targetName:e[o.NAME_TAG],unmanaged:e[o.UNMANAGED_TAG]}}Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0,Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return d.getFunctionName}}),e.getDependencies=function(t,e){return i(t,d.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var a=i(e,d.getFunctionName(r),r,!0),s=a.map((function(t){return t.metadata.filter((function(t){return t.key===o.UNMANAGED_TAG}))})),u=[].concat.apply([],s).length,c=a.length-u;return c>0?c:t(e,r)}return 0}})),x=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var n=function(){function t(t,e,n,r,i){this.id=s.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=n})),w=r((function(t,e){function n(t){return t._bindingDictionary}function r(t,e,n,r,i,a){var s=new v.Metadata(t?o.MULTI_INJECT_TAG:o.INJECT_TAG,n),u=new T.Target(e,r,n,s);if(void 0!==i){var c=new v.Metadata(i,a);u.metadata.push(c)}return u}function i(t,e,n,r,i){var o=u(n.container,i.serviceIdentifier),a=[];return o.length===h.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&t.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=u(n.container,i.serviceIdentifier)),a=e?o:o.filter((function(t){var e=new x.Request(t.serviceIdentifier,n,r,t,i);return t.constraint(e)})),function(t,e,n,r){switch(e.length){case h.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var i=d.getServiceIdentifierAsString(t),o=c.NOT_REGISTERED;throw o+=d.listMetadataForTarget(i,n),o+=d.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o);case h.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;default:if(n.isArray())return e;i=d.getServiceIdentifierAsString(t),o=c.AMBIGUOUS_MATCH+" "+i;throw o+=d.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function s(t,e,n,r,o,u){var l,h;if(null===o){l=i(t,e,r,null,u),h=new x.Request(n,r,null,l,u);var f=new y.Plan(r,h);r.addPlan(f)}else l=i(t,e,r,o,u),h=o.addChildRequest(u.serviceIdentifier,l,u);l.forEach((function(e){var n=null;if(u.isArray())n=h.addChildRequest(e.serviceIdentifier,e,u);else{if(e.cache)return;n=h}if(e.type===a.BindingTypeEnum.Instance&&null!==e.implementationType){var i=E.getDependencies(t,e.implementationType);if(!r.container.options.skipBaseClassChecks)if(E.getBaseClassDependencyCount(t,e.implementationType)>i.length){var o=c.ARGUMENTS_LENGTH_MISMATCH(E.getFunctionName(e.implementationType));throw new Error(o)}i.forEach((function(e){s(t,!1,e.serviceIdentifier,r,n,e)}))}}))}function u(t,e){var r=[],i=n(t);return i.hasKey(e)?r=i.get(e):null!==t.parent&&(r=u(t.parent,e)),r}Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0,e.getBindingDictionary=n,e.plan=function(t,e,n,i,o,a,u,c){void 0===c&&(c=!1);var l=new p.Context(e),h=r(n,i,o,"",a,u);try{return s(t,c,o,l,null,h),l}catch(t){throw f.isStackOverflowExeption(t)&&l.plan&&d.circularDependencyToException(l.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new T.Target(a.TargetTypeEnum.Variable,"",e,new v.Metadata(n,r)),o=new p.Context(t);return new x.Request(e,o,null,[],i)}})),S=r((function(t,e){var r=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0,e.resolveInstance=function(t,e,n){var i,s=null;if(e.length>0){var u=e.filter((function(t){return null!==t.target&&t.target.type===a.TargetTypeEnum.ConstructorArgument})).map(n);s=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===a.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value(),t[r]=i[n]})),t}(s=new((i=t).bind.apply(i,r([void 0],u))),e,n)}else s=new t;return function(t,e){if(Reflect.hasMetadata(o.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(o.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(c.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,s),s}})),k=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var n=function(t,e,n){try{return n()}catch(n){throw f.isStackOverflowExeption(n)?new Error(c.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},r=function(t){return function(e){e.parentContext.setCurrentRequest(e);var i=e.bindings,o=e.childRequests,s=e.target&&e.target.isArray(),u=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(s&&u)return o.map((function(e){return r(t)(e)}));var l=null;if(!e.target.isOptional()||0!==i.length){var h=i[0],f=h.scope===a.BindingScopeEnum.Singleton,p=h.scope===a.BindingScopeEnum.Request;if(f&&h.activated)return h.cache;if(p&&null!==t&&t.has(h.id))return t.get(h.id);if(h.type===a.BindingTypeEnum.ConstantValue)l=h.cache,h.activated=!0;else if(h.type===a.BindingTypeEnum.Function)l=h.cache,h.activated=!0;else if(h.type===a.BindingTypeEnum.Constructor)l=h.implementationType;else if(h.type===a.BindingTypeEnum.DynamicValue&&null!==h.dynamicValue)l=n("toDynamicValue",h.serviceIdentifier,(function(){return h.dynamicValue(e.parentContext)}));else if(h.type===a.BindingTypeEnum.Factory&&null!==h.factory)l=n("toFactory",h.serviceIdentifier,(function(){return h.factory(e.parentContext)}));else if(h.type===a.BindingTypeEnum.Provider&&null!==h.provider)l=n("toProvider",h.serviceIdentifier,(function(){return h.provider(e.parentContext)}));else{if(h.type!==a.BindingTypeEnum.Instance||null===h.implementationType){var v=d.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(c.INVALID_BINDING_TYPE+" "+v)}l=S.resolveInstance(h.implementationType,o,r(t))}return"function"==typeof h.onActivation&&(l=h.onActivation(e.parentContext,l)),f&&(h.cache=l,h.activated=!0),p&&null!==t&&!t.has(h.id)&&t.set(h.id,l),l}}};e.resolve=function(t){return r(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}})),N=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var n=function(t,e){var r=t.parentRequest;return null!==r&&(!!e(r)||n(r,e))};e.traverseAncerstors=n;var r=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new v.Metadata(t,e),n}};e.taggedConstraint=r;var i=r(o.NAMED_TAG);e.namedConstraint=i;e.typeConstraint=function(t){return function(e){return null!==e&&("string"==typeof t?e.bindings[0].serviceIdentifier===t:t===e.bindings[0].implementationType)}}})),P=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.when=function(t){return this._binding.constraint=t,new _.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=N.namedConstraint(t),new _.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new _.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=N.taggedConstraint(t)(e),new _.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return N.typeConstraint(t)(e.parentRequest)},new _.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return N.namedConstraint(t)(e.parentRequest)},new _.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return N.taggedConstraint(t)(e)(n.parentRequest)},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.typeConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.typeConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.namedConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.namedConstraint(t))},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new _.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,t)},new _.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,t)},new _.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=n})),_=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingOnSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.onActivation=function(t){return this._binding.onActivation=t,new P.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=n})),M=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new P.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new _.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=n})),A=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=a.BindingScopeEnum.Request,new M.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=a.BindingScopeEnum.Transient,new M.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=n})),C=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new P.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new _.BindingOnSyntax(this._binding),this._bindingInSyntax=new A.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=n})),O=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=a.BindingTypeEnum.Instance,this._binding.implementationType=t,new C.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+c.INVALID_TO_SELF_VALUE);return this.to(this._binding.serviceIdentifier)},t.prototype.toConstantValue=function(t){return this._binding.type=a.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=a.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new C.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=a.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=a.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(c.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=a.BindingTypeEnum.Function,this._binding.scope=a.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=a.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=a.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=n})),I=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var n=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=n})),R=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var n=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(c.NULL_ARGUMENT);if(null==e)throw new Error(c.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(c.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(c.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=n})),L=r((function(t,e){var r=n&&n.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=n&&n.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&i[3]>o[1])){a.label=o[1];break}if(6===o[0]&&i[1]>a.label){a.label=i[1],i=o;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},h=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var f=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+c.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=a.BindingScopeEnum.Transient;else if(e.defaultScope!==a.BindingScopeEnum.Singleton&&e.defaultScope!==a.BindingScopeEnum.Transient&&e.defaultScope!==a.BindingScopeEnum.Request)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=s.id(),this._bindingDictionary=new R.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;arguments.length>i;i++)r[i-2]=arguments[i];var o=new t,a=h([e,n],r).map((function(t){return w.getBindingDictionary(t)})),s=w.getBindingDictionary(o);function u(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return a.forEach((function(t){u(t,s)})),o},t.prototype.load=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;i.length>r;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return r.length>n?(a=e((o=r[n]).id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;arguments.length>n;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=new u.Binding(t,this.options.defaultScope||a.BindingScopeEnum.Transient);return this._bindingDictionary.add(t,e),new O.BindingToSyntax(e)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(c.CANNOT_UNBIND+" "+d.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new R.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,o.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=w.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(I.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(c.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,a.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,a.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,o.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,a.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,a.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,o.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,s={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(s)))throw new Error(c.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(s);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=w.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),k.resolve(n)}},t}();e.Container=f})),D=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0,e.ContainerModule=function(t){this.id=s.id(),this.registry=t},e.AsyncContainerModule=function(t){this.id=s.id(),this.registry=t}})),F=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0,e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(o.PARAM_TYPES,t))throw new Error(c.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(o.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(o.PARAM_TYPES,e,t),t}}})),B=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0,e.tagged=function(t,e){return function(n,r,i){var o=new v.Metadata(t,e);"number"==typeof i?g.tagParameter(n,r,i,o):g.tagProperty(n,r,o)}}})),G=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0,e.named=function(t){return function(e,n,r){var i=new v.Metadata(o.NAMED_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),U=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0,e.optional=function(){return function(t,e,n){var r=new v.Metadata(o.OPTIONAL_TAG,!0);"number"==typeof n?g.tagParameter(t,e,n,r):g.tagProperty(t,e,r)}}})),j=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0,e.unmanaged=function(){return function(t,e,n){var r=new v.Metadata(o.UNMANAGED_TAG,!0);g.tagParameter(t,e,n,r)}}})),V=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0,e.multiInject=function(t){return function(e,n,r){var i=new v.Metadata(o.MULTI_INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),H=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0,e.targetName=function(t){return function(e,n,r){var i=new v.Metadata(o.NAME_TAG,t);g.tagParameter(e,n,r,i)}}})),z=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0,e.postConstruct=function(){return function(t,e,n){var r=new v.Metadata(o.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(o.POST_CONSTRUCT,t.constructor))throw new Error(c.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(o.POST_CONSTRUCT,r,t.constructor)}}})),W=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;arguments.length>r;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}})),Y=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0,e.METADATA_KEY=o,Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return L.Container}}),Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return a.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return a.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return a.TargetTypeEnum}}),Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return D.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return D.ContainerModule}}),Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return F.injectable}}),Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return B.tagged}}),Object.defineProperty(e,"named",{enumerable:!0,get:function(){return G.named}}),Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return m.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return m.LazyServiceIdentifer}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return U.optional}}),Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return j.unmanaged}}),Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return V.multiInject}}),Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return H.targetName}}),Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return z.postConstruct}}),Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return l.MetadataReader}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return s.id}}),Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return g.decorate}}),Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return N.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return N.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return N.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return N.typeConstraint}}),Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return d.getServiceIdentifierAsString}}),Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return W.multiBindToService}})}));function q(t){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function X(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(t,e,n){return e&&X(t.prototype,e),n&&X(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function Q(e,n){return n.lifecycle===t.Syringe.Lifecycle.singleton?function(t){return t.inSingletonScope()}(e):function(t){return t.inTransientScope()}(e)}function $(t,e){t.whenTargetNamed(nt(e))}function tt(t,e){return e.bind(rt(t))}function et(t,e){if(e.isBound(rt(t)))try{return e.rebind(rt(t))}catch(n){return e.bind(rt(t))}return e.bind(rt(t))}function nt(t){return i.isDefinedToken(t)?t.symbol:t}function rt(t){return i.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=K((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Z(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===q(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(t.Syringe||(t.Syringe={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===q(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==q(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===q(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(i||(i={}));var it=new Y.Container;function ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function at(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(n),!0).forEach((function(e){st(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Y.injectable();return function(r){Reflect.defineMetadata(t.Syringe.ClassOptionSymbol,at(at({},e),{},{target:r}),r),n(r)}}function ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(at(at({},e),{},{lifecycle:t.Syringe.Lifecycle.singleton}))}function lt(t){return Y.inject(rt(t))}var ht=Symbol("SyringeOptionSymbol");function ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(n),!0).forEach((function(e){pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function pt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yt=function(){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=t,this.token=n,this.option=r,this.rawToken=i.isNamedToken(n)?n.token:n,this.named=i.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||i.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var n,r,o;return n=e,r=[{key:"resolve",value:function(){var t=this,e=this.register;(function(t){return t&&"object"===J(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(e)&&(this.mutiple?this.resolveMutilple(e):(this.resolveMono(e),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(n){i.isMultipleEnabled(n)?tt(n,e).toService(t.generalToken):et(n,e).toService(t.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return et(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return Q(et(this.generalToken,t).toDynamicValue((function(t){var n=Rt.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return et(this.generalToken,t).toFactory((function(t){var e=Rt.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return Q(et(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return Q(tt(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return Q(tt(e.generalToken,t).toDynamicValue((function(t){var e=Rt.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return tt(e.generalToken,t).toFactory((function(t){var e=Rt.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?tt(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&$(t,e.named)})),r.forEach((function(t){return e.named&&$(t,e.named)})),i.forEach((function(t){return e.named&&$(t,e.named)})),o&&$(o,this.named))}}],o=[{key:"resolveTarget",value:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var a=Reflect.getMetadata(ht,r);a&&e.resolveOption(n,a)}catch(t){}if(i.isClass(r))if(o.useClass){var s=i.toArray(o.useClass);s.unshift(r),o.useClass=s}else o.useClass=[r];var u;try{u=Reflect.getMetadata(t.Syringe.ClassOptionSymbol,r)}catch(t){}if((u=dt(dt({},u||{}),o)).token){var c=i.toArray(u.token);c.unshift(r),u.token=c}else u.token=[r];e.resolveOption(n,u)}catch(t){}}},{key:"resolveOption",value:function(n,r){var o=function(e){var n=i.toArray(e.token),r=i.toArray(e.useClass),o=i.toArray(e.useDynamic),a=i.toArray(e.useFactory),s=i.toArray(e.contrib),u={token:n,useClass:r,lifecycle:s.length>0?t.Syringe.Lifecycle.singleton:e.lifecycle||t.Syringe.Lifecycle.transient,contrib:s,useDynamic:o,useFactory:a};return"useValue"in e&&(u.useValue=e.useValue),u}(dt(dt({},e.globalConfig),r));(0!==o.useClass.length||0!==o.useDynamic.length||0!==o.useFactory.length||"useValue"in o)&&o.token.forEach((function(t){new e(n,t,dt({},o)).resolve()}))}}],r&&vt(n.prototype,r),o&&vt(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();yt.globalConfig=t.Syringe.DefaultOption;var gt=t.Syringe.defineToken("ContributionProvider");function mt(t){return function(t){if(Array.isArray(t))return bt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);e>n;n++)r[n]=t[n];return r}function Tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Et(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Tt(Object(n),!0).forEach((function(e){xt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var St=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=Et(Et({},this.option),r))}var e,n,r;return e=t,n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,mt(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Et(Et({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}],n&&wt(e.prototype,n),r&&wt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kt(e,n){return{token:{token:gt,named:e},useDynamic:function(t){return new St(e,t.container,n)},lifecycle:t.Syringe.Lifecycle.singleton}}function Nt(e,n,r){e({token:{token:gt,named:n},useDynamic:function(t){return new St(n,t.container,r)},lifecycle:t.Syringe.Lifecycle.singleton})}function Pt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var _t=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,r,o){var a={bind:t,unbind:e,isBound:r,rebind:o},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.isInjectOption(t)?yt.resolveOption(a,t):yt.resolveTarget(a,t,e)};n.baseRegistry&&n.baseRegistry(s),n.optionCollection&&n.optionCollection.forEach((function(t){return s(t)}))},this.baseRegistry=e,this.inversifyModule=new Y.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,r;return e=t,n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(kt(e))})),this}}],n&&Pt(e.prototype,n),r&&Pt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Mt(t){return t&&"inversifyModule"in t}function At(t){return new _t(t)}function Ct(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ot,It=new Map,Rt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new Y.Container,t.setContainer(this.container,this)}var e,n,r;return e=t,n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Mt(t)?this.container.load(t.inversifyModule):console.warn("Unsupported module.",t),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):{dispose:function(){}}}},{key:"unload",value:function(t){Mt(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(rt(t))}},{key:"get",value:function(t){return this.container.get(rt(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(rt(t),nt(e))}},{key:"getAll",value:function(t){return this.container.getAll(rt(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(rt(t),nt(e))}},{key:"isBound",value:function(t){return this.container.isBound(rt(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(rt(t),nt(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.isInjectOption(t)?yt.resolveOption(this.container,t):yt.resolveTarget(this.container,t,e)}}],r=[{key:"setContainer",value:function(t,e){return It.set(t.id,e)}},{key:"getContainer",value:function(e){var n=It.get(e.id);if(!n){var r=new t(e);return t.setContainer(e,r),r}return n}},{key:"config",value:function(t){yt.globalConfig=t}}],n&&Ct(e.prototype,n),r&&Ct(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Lt=new Rt(it),Dt=(Lt.register.bind(Lt),function(t){return function(e,n,r){Y.named(nt(t))(e,n,r),lt(gt)(e,n,r)}});function Ft(t,e,n,r,i){Bt(t,e,n||0,r||t.length-1,i||Ut)}function Bt(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=e-n+1,s=Math.log(o),u=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*u*(o-u)/o)*(0>a-o/2?-1:1);Bt(t,e,Math.max(n,Math.floor(e-a*u/o+c)),Math.min(r,Math.floor(e+(o-a)*u/o+c)),i)}var l=t[e],h=n,f=r;for(Gt(t,n,e),i(t[r],l)>0&&Gt(t,n,r);f>h;){for(Gt(t,h,f),h++,f--;0>i(t[h],l);)h++;for(;i(t[f],l)>0;)f--}0===i(t[n],l)?Gt(t,n,f):Gt(t,++f,r),f>e||(n=f+1),e>f||(r=f-1)}}function Gt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Ut(t,e){return e>t?-1:t>e?1:0}!function(t){t.Provider=gt,t.register=Nt}(Ot||(Ot={}));class jt{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!Qt(t,e))return n;const r=this.toBBox,i=[];for(;e;){for(let o=0;e.children.length>o;o++){const a=e.children[o],s=e.leaf?r(a):a;Qt(t,s)&&(e.leaf?n.push(a):Jt(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n}collides(t){let e=this.data;if(!Qt(t,e))return!1;const n=[];for(;e;){for(let r=0;e.children.length>r;r++){const i=e.children[r],o=e.leaf?this.toBBox(i):i;if(Qt(t,o)){if(e.leaf||Jt(t,o))return!0;n.push(i)}}e=n.pop()}return!1}load(t){if(!t||!t.length)return this;if(this._minEntries>t.length){for(let e=0;t.length>e;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(e.height>this.data.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=$t([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),i=[],o=[];let a,s,u;for(;n||i.length;){if(n||(n=i.pop(),s=i[i.length-1],a=o.pop(),u=!0),n.leaf){const r=Vt(t,n.children,e);if(-1!==r)return n.children.splice(r,1),i.push(n),this._condense(i),this}u||n.leaf||!Jt(n,r)?s?(a++,n=s.children[a],u=!1):n=null:(i.push(n),o.push(a),a=0,s=n,n=n.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const i=n-e+1;let o,a=this._maxEntries;if(a>=i)return o=$t(t.slice(e,n+1)),Ht(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=$t([]),o.leaf=!1,o.height=r;const s=Math.ceil(i/a),u=s*Math.ceil(Math.sqrt(a));te(t,e,n,u,this.compareMinX);for(let i=e;n>=i;i+=u){const e=Math.min(i+u-1,n);te(t,i,e,s,this.compareMinY);for(let n=i;e>=n;n+=s){const i=Math.min(n+s-1,e);o.children.push(this._build(t,n,i,r-1))}}return Ht(o,this.toBBox),o}_chooseSubtree(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){let n,r=1/0,a=1/0;for(let s=0;e.children.length>s;s++){const u=e.children[s],c=Xt(u),l=(i=t,o=u,(Math.max(o.maxX,i.maxX)-Math.min(o.minX,i.minX))*(Math.max(o.maxY,i.maxY)-Math.min(o.minY,i.minY))-c);a>l?(a=l,r=r>c?c:r,n=u):l===a&&r>c&&(r=c,n=u)}e=n||e.children[0]}var i,o;return e}_insert(t,e,n){const r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),Wt(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)}_split(t,e){const n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r),a=$t(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Ht(n,this.toBBox),Ht(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=$t([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Ht(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,i=1/0,o=1/0;for(let a=e;n-e>=a;a++){const e=zt(t,0,a,this.toBBox),s=zt(t,a,n,this.toBBox),u=Zt(e,s),c=Xt(e)+Xt(s);i>u?(i=u,r=a,o=o>c?c:o):u===i&&o>c&&(o=c,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:Yt,i=t.leaf?this.compareMinY:qt,o=this._allDistMargin(t,e,n,r);this._allDistMargin(t,e,n,i)>o&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const i=this.toBBox,o=zt(t,0,e,i),a=zt(t,n-e,n,i);let s=Kt(o)+Kt(a);for(let r=e;n-e>r;r++){const e=t.children[r];Wt(o,t.leaf?i(e):e),s+=Kt(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];Wt(a,t.leaf?i(e):e),s+=Kt(a)}return s}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)Wt(e[r],t)}_condense(t){for(let e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():Ht(t[n],this.toBBox)}}function Vt(t,e,n){if(!n)return e.indexOf(t);for(let r=0;e.length>r;r++)if(n(t,e[r]))return r;return-1}function Ht(t,e){zt(t,0,t.children.length,e,t)}function zt(t,e,n,r,i){i||(i=$t(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=e;n>o;o++){const e=t.children[o];Wt(i,t.leaf?r(e):e)}return i}function Wt(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function Yt(t,e){return t.minX-e.minX}function qt(t,e){return t.minY-e.minY}function Xt(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Kt(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Zt(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function Jt(t,e){return!(t.minX>e.minX||t.minY>e.minY||e.maxX>t.maxX||e.maxY>t.maxY)}function Qt(t,e){return!(e.minX>t.maxX||e.minY>t.maxY||t.minX>e.maxX||t.minY>e.maxY)}function $t(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function te(t,e,n,r,i){const o=[e,n];for(;o.length;){if(r>=(n=o.pop())-(e=o.pop()))continue;const a=e+Math.ceil((n-e)/r/2)*r;Ft(t,a,e,n,i),o.push(e,a,a,n)}}var ee=1e-6,ne="undefined"!=typeof Float32Array?Float32Array:Array;function re(){var t=new ne(9);return ne!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function ie(){var t=new ne(16);return ne!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],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}function ae(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=v,t[15]=y,t}function se(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 ue(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function ce(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,E=r*u-i*s,x=r*c-o*s,w=i*c-o*u,S=l*v-h*p,k=l*y-f*p,N=l*g-d*p,P=h*y-f*v,_=h*g-d*v,M=f*g-d*y,A=m*M-b*_+T*P+E*N-x*k+w*S;return A?(t[0]=(s*M-u*_+c*P)*(A=1/A),t[1]=(i*_-r*M-o*P)*A,t[2]=(v*w-y*x+g*E)*A,t[3]=(f*x-h*w-d*E)*A,t[4]=(u*N-a*M-c*k)*A,t[5]=(n*M-i*N+o*k)*A,t[6]=(y*T-p*w-g*b)*A,t[7]=(l*w-f*T+d*b)*A,t[8]=(a*_-s*N+c*S)*A,t[9]=(r*N-n*_-o*S)*A,t[10]=(p*x-v*T+g*m)*A,t[11]=(h*T-l*x-d*m)*A,t[12]=(s*k-a*P-u*S)*A,t[13]=(n*P-r*k+i*S)*A,t[14]=(v*b-p*E-y*m)*A,t[15]=(l*E-h*b+f*m)*A,t):null}function le(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*p)+(e*u-i*o)*(l*v-h*p)+(n*s-r*a)*(c*y-f*d)-(n*u-i*a)*(c*v-h*d)+(r*u-i*s)*(c*p-l*d)}function he(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],b=n[0],T=n[1],E=n[2],x=n[3];return t[0]=b*r+T*s+E*h+x*v,t[1]=b*i+T*u+E*f+x*y,t[2]=b*o+T*c+E*d+x*g,t[3]=b*a+T*l+E*p+x*m,t[4]=(b=n[4])*r+(T=n[5])*s+(E=n[6])*h+(x=n[7])*v,t[5]=b*i+T*u+E*f+x*y,t[6]=b*o+T*c+E*d+x*g,t[7]=b*a+T*l+E*p+x*m,t[8]=(b=n[8])*r+(T=n[9])*s+(E=n[10])*h+(x=n[11])*v,t[9]=b*i+T*u+E*f+x*y,t[10]=b*o+T*c+E*d+x*g,t[11]=b*a+T*l+E*p+x*m,t[12]=(b=n[12])*r+(T=n[13])*s+(E=n[14])*h+(x=n[15])*v,t[13]=b*i+T*u+E*f+x*y,t[14]=b*o+T*c+E*d+x*g,t[15]=b*a+T*l+E*p+x*m,t}function fe(t,e,n){var r,i,o,a,s,u,c,l,h,f,d,p,v=n[0],y=n[1],g=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*v+s*y+h*g+e[12],t[13]=i*v+u*y+f*g+e[13],t[14]=o*v+c*y+d*g+e[14],t[15]=a*v+l*y+p*g+e[15]),t}function de(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function pe(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return 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]=o*i+c*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function ve(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return 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]=o*i-c*r,t[1]=a*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function ye(t,e){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]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ge(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,d=i*u,p=i*c,v=o*c,y=a*s,g=a*u,m=a*c;return t[0]=1-(d+v),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+v),t[6]=p+y,t[7]=0,t[8]=f+g,t[9]=p-y,t[10]=1-(l+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function me(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function be(t,e){var n=e[4],r=e[5],i=e[6],o=e[8],a=e[9],s=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(n,r,i),t[2]=Math.hypot(o,a,s),t}function Te(t,e){var n=new ne(3);be(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,d=e[9]*i,p=e[10]*o,v=a+l+p,y=0;return v>0?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(h-d)/y,t[1]=(f-u)/y,t[2]=(s-c)/y):a>l&&a>p?(y=2*Math.sqrt(1+a-l-p),t[3]=(h-d)/y,t[0]=.25*y,t[1]=(s+c)/y,t[2]=(f+u)/y):l>p?(y=2*Math.sqrt(1+l-a-p),t[3]=(f-u)/y,t[0]=(s+c)/y,t[1]=.25*y,t[2]=(h+d)/y):(y=2*Math.sqrt(1+p-a-l),t[3]=(s-c)/y,t[0]=(f+u)/y,t[1]=(h+d)/y,t[2]=.25*y),t}function Ee(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,d=o*l,p=o*h,v=a*l,y=a*h,g=s*h,m=u*c,b=u*l,T=u*h,E=r[0],x=r[1],w=r[2],S=i[0],k=i[1],N=i[2],P=(1-(v+g))*E,_=(d+T)*E,M=(p-b)*E,A=(d-T)*x,C=(1-(f+g))*x,O=(y+m)*x,I=(p+b)*w,R=(y-m)*w,L=(1-(f+v))*w;return t[0]=P,t[1]=_,t[2]=M,t[3]=0,t[4]=A,t[5]=C,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=L,t[11]=0,t[12]=n[0]+S-(P*S+A*k+I*N),t[13]=n[1]+k-(_*S+C*k+R*N),t[14]=n[2]+N-(M*S+O*k+L*N),t[15]=1,t}function xe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,d=i*s,p=i*u,v=o*a,y=o*s,g=o*u;return t[0]=1-h-p,t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-c-p,t[6]=d+v,t[7]=0,t[8]=f+y,t[9]=d-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function we(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(o=1/(r-i)),t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function Se(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ke=Se;function Ne(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p=e[0],v=e[1],y=e[2],g=r[0],m=r[1],b=r[2],T=n[0],E=n[1],x=n[2];return Math.abs(p-T)<ee&&Math.abs(v-E)<ee&&Math.abs(y-x)<ee?se(t):(l=p-T,h=v-E,f=y-x,i=m*(f*=d=1/Math.hypot(l,h,f))-b*(h*=d),o=b*(l*=d)-g*f,a=g*h-m*l,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(d=Math.hypot(s,u,c))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*v+a*y),t[13]=-(s*p+u*v+c*y),t[14]=-(l*p+h*v+f*y),t[15]=1,t)}function Pe(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var _e=Object.freeze({__proto__:null,create:ie,clone:function(t){var e=new ne(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],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},copy:oe,fromValues:function(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v){var y=new ne(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=s,y[8]=u,y[9]=c,y[10]=l,y[11]=h,y[12]=f,y[13]=d,y[14]=p,y[15]=v,y},set:ae,identity:se,transpose:ue,invert:ce,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15];return t[0]=s*(f*g-d*y)-h*(u*g-c*y)+v*(u*d-c*f),t[1]=-(r*(f*g-d*y)-h*(i*g-o*y)+v*(i*d-o*f)),t[2]=r*(u*g-c*y)-s*(i*g-o*y)+v*(i*c-o*u),t[3]=-(r*(u*d-c*f)-s*(i*d-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-d*y)-l*(u*g-c*y)+p*(u*d-c*f)),t[5]=n*(f*g-d*y)-l*(i*g-o*y)+p*(i*d-o*f),t[6]=-(n*(u*g-c*y)-a*(i*g-o*y)+p*(i*c-o*u)),t[7]=n*(u*d-c*f)-a*(i*d-o*f)+l*(i*c-o*u),t[8]=a*(h*g-d*v)-l*(s*g-c*v)+p*(s*d-c*h),t[9]=-(n*(h*g-d*v)-l*(r*g-o*v)+p*(r*d-o*h)),t[10]=n*(s*g-c*v)-a*(r*g-o*v)+p*(r*c-o*s),t[11]=-(n*(s*d-c*h)-a*(r*d-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*y-f*v)-l*(s*y-u*v)+p*(s*f-u*h)),t[13]=n*(h*y-f*v)-l*(r*y-i*v)+p*(r*f-i*h),t[14]=-(n*(s*y-u*v)-a*(r*y-i*v)+p*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t},determinant:le,multiply:he,translate:fe,scale:de,rotate:function(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p,v,y,g,m,b,T,E,x,w,S,k,N,P,_=r[0],M=r[1],A=r[2],C=Math.hypot(_,M,A);return ee>C?null:(_*=C=1/C,M*=C,A*=C,i=Math.sin(n),o=Math.cos(n),u=e[1],c=e[2],l=e[3],f=e[5],d=e[6],p=e[7],y=e[9],g=e[10],m=e[11],x=_*M*(a=1-o)-A*i,w=M*M*a+o,S=A*M*a+_*i,k=_*A*a+M*i,N=M*A*a-_*i,P=A*A*a+o,t[0]=(s=e[0])*(b=_*_*a+o)+(h=e[4])*(T=M*_*a+A*i)+(v=e[8])*(E=A*_*a-M*i),t[1]=u*b+f*T+y*E,t[2]=c*b+d*T+g*E,t[3]=l*b+p*T+m*E,t[4]=s*x+h*w+v*S,t[5]=u*x+f*w+y*S,t[6]=c*x+d*w+g*S,t[7]=l*x+p*w+m*S,t[8]=s*k+h*N+v*P,t[9]=u*k+f*N+y*P,t[10]=c*k+d*N+g*P,t[11]=l*k+p*N+m*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:pe,rotateY:ve,rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return 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]=o*i+c*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t},fromTranslation:ye,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return ee>c?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),i=Math.cos(e),t[0]=a*a*(o=1-i)+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,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},fromRotationTranslation:ge,fromQuat2:function(t,e){var n=new ne(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+l*r+u*o-c*i)/h,n[1]=2*(u*a+l*i+c*r-s*o)/h,n[2]=2*(c*a+l*o+s*i-u*r)/h):(n[0]=2*(s*a+l*r+u*o-c*i),n[1]=2*(u*a+l*i+c*r-s*o),n[2]=2*(c*a+l*o+s*i-u*r)),ge(t,e,n),t},getTranslation:me,getScaling:be,getRotation:Te,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,d=i*l,p=o*c,v=o*l,y=a*l,g=s*u,m=s*c,b=s*l,T=r[0],E=r[1],x=r[2];return t[0]=(1-(p+y))*T,t[1]=(f+b)*T,t[2]=(d-m)*T,t[3]=0,t[4]=(f-b)*E,t[5]=(1-(h+y))*E,t[6]=(v+g)*E,t[7]=0,t[8]=(d+m)*x,t[9]=(v-g)*x,t[10]=(1-(h+p))*x,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Ee,fromQuat:xe,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t},perspectiveNO:we,perspective:we,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(o=1/(r-i)),t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Se,ortho:ke,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t},lookAt:Ne,targetTo:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],d=l*l+h*h+f*f;d>0&&(l*=d=1/Math.sqrt(d),h*=d,f*=d);var p=u*f-c*h,v=c*l-s*f,y=s*h-u*l;return(d=p*p+v*v+y*y)>0&&(p*=d=1/Math.sqrt(d),v*=d,y*=d),t[0]=p,t[1]=v,t[2]=y,t[3]=0,t[4]=h*y-f*v,t[5]=f*p-l*y,t[6]=l*v-h*p,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Pe,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&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]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],d=t[11],p=t[12],v=t[13],y=t[14],g=t[15],m=e[0],b=e[1],T=e[2],E=e[3],x=e[4],w=e[5],S=e[6],k=e[7],N=e[8],P=e[9],_=e[10],M=e[11],A=e[12],C=e[13],O=e[14],I=e[15];return!(Math.abs(n-m)>ee*Math.max(1,Math.abs(n),Math.abs(m))||Math.abs(r-b)>ee*Math.max(1,Math.abs(r),Math.abs(b))||Math.abs(i-T)>ee*Math.max(1,Math.abs(i),Math.abs(T))||Math.abs(o-E)>ee*Math.max(1,Math.abs(o),Math.abs(E))||Math.abs(a-x)>ee*Math.max(1,Math.abs(a),Math.abs(x))||Math.abs(s-w)>ee*Math.max(1,Math.abs(s),Math.abs(w))||Math.abs(u-S)>ee*Math.max(1,Math.abs(u),Math.abs(S))||Math.abs(c-k)>ee*Math.max(1,Math.abs(c),Math.abs(k))||Math.abs(l-N)>ee*Math.max(1,Math.abs(l),Math.abs(N))||Math.abs(h-P)>ee*Math.max(1,Math.abs(h),Math.abs(P))||Math.abs(f-_)>ee*Math.max(1,Math.abs(f),Math.abs(_))||Math.abs(d-M)>ee*Math.max(1,Math.abs(d),Math.abs(M))||Math.abs(p-A)>ee*Math.max(1,Math.abs(p),Math.abs(A))||Math.abs(v-C)>ee*Math.max(1,Math.abs(v),Math.abs(C))||Math.abs(y-O)>ee*Math.max(1,Math.abs(y),Math.abs(O))||Math.abs(g-I)>ee*Math.max(1,Math.abs(g),Math.abs(I)))},mul:he,sub:Pe});function Me(){var t=new ne(3);return ne!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ae(t){return Math.hypot(t[0],t[1],t[2])}function Ce(t,e,n){var r=new ne(3);return r[0]=t,r[1]=e,r[2]=n,r}function Oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ie(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Re(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Le(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function De(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Fe(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Be(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ge(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Ue(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function je(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=ee*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=ee*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=ee*Math.max(1,Math.abs(i),Math.abs(s))}var Ve,He=Le,ze=Ae;Ve=Me();function We(){var t=new ne(4);return ne!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Ye(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}!function(){var t=We()}();function qe(){var t=new ne(4);return ne!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Xe(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Ke(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function Ze(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],d=n[0],p=n[1],v=n[2],y=n[3];return 0>(o=c*d+l*p+h*v+f*y)&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>ee?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*d,t[1]=s*l+u*p,t[2]=s*h+u*v,t[3]=s*f+u*y,t}function Je(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function Qe(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}var $e,tn,en,nn,rn,on,an=function(t,e,n,r){var i=new ne(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},sn=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},un=Ke,cn=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};$e=Me(),tn=Ce(1,0,0),en=Ce(0,1,0),nn=qe(),rn=qe(),on=re();function ln(t,e){var n=new ne(2);return n[0]=t,n[1]=e,n}!function(){var t,e=(t=new ne(2),ne!=Float32Array&&(t[0]=0,t[1]=0),t)}();function hn(t){return t.map((function(t){return Array.isArray(t)?[].concat(t):t}))}var fn=function(){return fn=Object.assign||function(t){for(var e,n=1,r=arguments.length;r>n;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},fn.apply(this,arguments)};function dn(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function pn(t,e){return function(n,r){e(n,r,t)}}var vn={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function yn(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var gn={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function mn(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return gn[e]===t.length-1&&"achlmqstvz".includes(e)}))}function bn(t){return mn(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function Tn(t){return bn(t)&&t.every((function(t){return"ACLMQZ".includes(t[0])}))}function En(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=gn[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,gn[n]))),gn[n]););}function xn(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);return 48===r?(t.param=0,void(t.index+=1)):49===r?(t.param=1,void(t.index+=1)):void(t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e)}function wn(t){return t>=48&&57>=t||43===t||45===t||46===t}function Sn(t){return t>=48&&57>=t}function kn(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,s=!1,u=!1,c=!1;if(n>o)if(43!==(e=r.charCodeAt(o))&&45!==e||(e=r.charCodeAt(o+=1)),Sn(e)||46===e){if(46!==e){if(a=48===e,e=r.charCodeAt(o+=1),a&&n>o&&e&&Sn(e))return void(t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number');for(;n>o&&Sn(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(c=!0,o+=1;Sn(r.charCodeAt(o));)o+=1,u=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(c&&!s&&!u)return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent');if(43!==(e=r.charCodeAt(o+=1))&&45!==e||(o+=1),o>=n||!Sn(r.charCodeAt(o)))return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent');for(;n>o&&Sn(r.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(i,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';else t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param'}function Nn(t){for(var e,n=t.pathValue,r=t.max;r>t.index&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Pn(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=gn[n[r].toLowerCase()];if(t.segmentStart=r,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(t.index+=1,Nn(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?kn(t):xn(t),t.err.length)return;t.data.push(t.param),Nn(t),e>t.index&&44===n.charCodeAt(t.index)&&(t.index+=1,Nn(t))}if(t.index>=t.max)break;if(!wn(n.charCodeAt(t.index)))break}En(t)}else En(t);else t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command'}var _n=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Mn(t){if(bn(t))return hn(t);var e=function(t){if(mn(t))return hn(t);var e=new _n(t);for(Nn(e);e.max>e.index&&!e.err.length;)Pn(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map((function(t){var e,a=t.slice(1).map(Number),s=t[0],u=s.toUpperCase();if("M"===s)return i=n=a[0],o=r=a[1],["M",n,r];if(s!==u)switch(u){case"A":e=[u,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[u,a[0]+r];break;case"H":e=[u,a[0]+n];break;default:var c=a.map((function(t,e){return t+(e%2?r:n)}));e=[u].concat(c)}else e=[u].concat(a);var l=e.length;switch(u){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[l-2],r=e[l-1],"M"===u&&(i=n,o=r)}return e}))}function An(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,s=t.slice(1).map(Number),u=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)u=["L",t[1],i];else if("V"===n)u=["L",r,t[1]];else if("S"===n){var c=2*r-o,l=2*i-a;e.x1=c,e.y1=l,u=["C",c,l].concat(s)}else if("T"===n){var h=2*r-e.qx,f=2*i-e.qy;e.qx=h,e.qy=f,u=["Q",h,f].concat(s)}else if("Q"===n){var d=s[1];e.qx=s[0],e.qy=d}return u}function Cn(t){if(Tn(t))return hn(t);for(var e=Mn(t),n=fn({},vn),r=0;e.length>r;r+=1){e[r]=An(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function On(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function In(t,e,n,r,i,o,a,s,u,c){var l,h,f,d,p,v=t,y=e,g=n,m=r,b=s,T=u,E=120*Math.PI/180,x=Math.PI/180*(+i||0),w=[];if(c)h=c[0],f=c[1],d=c[2],p=c[3];else{y=(l=On(v,y,-x)).y;var S=((v=l.x)-(b=(l=On(b,T,-x)).x))/2,k=(y-(T=l.y))/2,N=S*S/(g*g)+k*k/(m*m);N>1&&(g*=N=Math.sqrt(N),m*=N);var P=g*g,_=m*m,M=(o===a?-1:1)*Math.sqrt(Math.abs((P*_-P*k*k-_*S*S)/(P*k*k+_*S*S)));d=M*g*k/m+(v+b)/2,p=M*-m*S/g+(y+T)/2,h=Math.asin(((y-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),f=Math.asin(((T-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),h=d>v?Math.PI-h:h,f=d>b?Math.PI-f:f,0>h&&(h=2*Math.PI+h),0>f&&(f=2*Math.PI+f),a&&h>f&&(h-=2*Math.PI),!a&&f>h&&(f-=2*Math.PI)}var A=f-h;if(Math.abs(A)>E){var C=f,O=b,I=T;f=h+E*(a&&f>h?1:-1),w=In(b=d+g*Math.cos(f),T=p+m*Math.sin(f),g,m,i,0,a,O,I,[f,C,d,p])}A=f-h;var R=Math.cos(h),L=Math.sin(h),D=Math.cos(f),F=Math.sin(f),B=Math.tan(A/4),G=4/3*g*B,U=4/3*m*B,j=[v,y],V=[v+G*L,y-U*R],H=[b+G*F,T-U*D],z=[b,T];if(V[0]=2*j[0]-V[0],V[1]=2*j[1]-V[1],c)return V.concat(H,z,w);for(var W=[],Y=0,q=(w=V.concat(H,z,w)).length;q>Y;Y+=1)W[Y]=Y%2?On(w[Y-1],w[Y],x).y:On(w[Y],w[Y+1],x).x;return W}function Rn(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function Ln(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Dn(t,e,n,r,i){var o=Ln([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(0<i)if(i<o){var s=Rn([t,e],[n,r],i/o);a={x:s[0],y:s[1]}}else a={x:n,y:r};else a={x:t,y:e};return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Fn(t,e,n,r){var i=.5,o=[t,e],a=[n,r],s=Rn(o,a,i),u=Rn(a,s,i),c=Rn(s,u,i),l=Rn(u,c,i),h=Rn(c,l,i),f=Dn(o[0],o[1],s[0],s[1],c[0]).point,d=Dn(h[0],h[1],l[0],l[1],u[0]).point;return[f.x,f.y,d.x,d.y,n,r]}function Bn(t,e){var n,r,i,o,a,s,u,c=t[0],l=t.slice(1).map(Number),h=l[0],f=l[1],d=e.x1,p=e.y1,v=e.x,y=e.y;switch("TQ".includes(c)||(e.qx=null,e.qy=null),c){case"M":return e.x=h,e.y=f,t;case"A":return n=[d,p].concat(l),["C"].concat(In(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return e.qx=h,e.qy=f,n=[d,p].concat(l),["C"].concat([(s=1/3)*n[0]+(u=2/3)*(r=n[2]),s*n[1]+u*(i=n[3]),s*(o=n[4])+u*r,s*(a=n[5])+u*i,o,a]);case"L":return["C"].concat(Fn(d,p,h,f));case"Z":return d===v&&p===y?["C",d,p,v,y,v,y]:["C"].concat(Fn(d,p,v,y))}return t}function Gn(t,e){if(void 0===e&&(e=!1),function(t){return Tn(t)&&t.every((function(t){return"MC".includes(t[0])}))}(t)){var n=hn(t);return e?[n,[]]:n}for(var r,i,o=Cn(t),a=fn({},vn),s=[],u="",c=o.length,l=[],h=0;c>h;h+=1){o[h]&&(u=o[h][0]),s[h]=u;var f=Bn(o[h],a);o[h]=f,yn(o,s,h),c=o.length,"Z"===u&&l.push(h),a.x1=+(r=o[h])[(i=r.length)-2],a.y1=+r[i-1],a.x2=+r[i-4]||a.x1,a.y2=+r[i-3]||a.y1}return e?[o,l]:o}function Un(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=n*i+r*o,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(0>n*o-r*i?-1:1)*Math.acos(a/s)}function jn(t,e,n,r,i,o,a,s,u,c){var l=Math.abs,h=Math.sin,f=Math.cos,d=Math.sqrt,p=Math.PI,v=l(n),y=l(r),g=(i%360+360)%360*(p/180);if(t===s&&e===u)return{x:t,y:e};if(0===v||0===y)return Dn(t,e,s,u,c).point;var m=(t-s)/2,b=(e-u)/2,T={x:f(g)*m+h(g)*b,y:-h(g)*m+f(g)*b},E=Math.pow(T.x,2)/Math.pow(v,2)+Math.pow(T.y,2)/Math.pow(y,2);E>1&&(v*=d(E),y*=d(E));var x=(Math.pow(v,2)*Math.pow(y,2)-Math.pow(v,2)*Math.pow(T.y,2)-Math.pow(y,2)*Math.pow(T.x,2))/(Math.pow(v,2)*Math.pow(T.y,2)+Math.pow(y,2)*Math.pow(T.x,2)),w=(o!==a?1:-1)*d(x=0>x?0:x),S=w*(v*T.y/y),k=w*(-y*T.x/v),N=f(g)*S-h(g)*k+(t+s)/2,P=h(g)*S+f(g)*k+(e+u)/2,_={x:(T.x-S)/v,y:(T.y-k)/y},M=Un({x:1,y:0},_),A=Un(_,{x:(-T.x-S)/v,y:(-T.y-k)/y});!a&&A>0?A-=2*p:a&&0>A&&(A+=2*p);var C=M+(A%=2*p)*c,O=v*f(C),I=y*h(C);return{x:f(g)*O-h(g)*I+N,y:h(g)*O+f(g)*I+P}}function Vn(t,e,n,r,i,o,a,s,u,c,l){var h,f=l.bbox,d=void 0===f||f,p=l.length,v=void 0===p||p,y=l.sampleSize,g=void 0===y?30:y,m="number"==typeof c,b=t,T=e,E=0,x=[b,T,E],w=[b,T],S={x:0,y:0},k=[{x:b,y:T}];m&&0>=c&&(S={x:b,y:T});for(var N=0;g>=N;N+=1){if(b=(h=jn(t,e,n,r,i,o,a,s,u,N/g)).x,T=h.y,d&&k.push({x:b,y:T}),v&&(E+=Ln(w,[b,T])),w=[b,T],m&&E>=c&&c>x[2]){var P=(E-c)/(E-x[2]);S={x:w[0]*(1-P)+x[0]*P,y:w[1]*(1-P)+x[1]*P}}x=[b,T,E]}return m&&c>=E&&(S={x:s,y:u}),{length:E,point:S,min:{x:Math.min.apply(null,k.map((function(t){return t.x}))),y:Math.min.apply(null,k.map((function(t){return t.y})))},max:{x:Math.max.apply(null,k.map((function(t){return t.x}))),y:Math.max.apply(null,k.map((function(t){return t.y})))}}}function Hn(t,e,n,r,i,o,a,s,u){var c=1-u;return{x:Math.pow(c,3)*t+3*Math.pow(c,2)*u*n+3*c*Math.pow(u,2)*i+Math.pow(u,3)*a,y:Math.pow(c,3)*e+3*Math.pow(c,2)*u*r+3*c*Math.pow(u,2)*o+Math.pow(u,3)*s}}function zn(t,e,n,r,i,o,a,s,u,c){var l,h=c.bbox,f=void 0===h||h,d=c.length,p=void 0===d||d,v=c.sampleSize,y=void 0===v?10:v,g="number"==typeof u,m=t,b=e,T=0,E=[m,b,T],x=[m,b],w={x:0,y:0},S=[{x:m,y:b}];g&&0>=u&&(w={x:m,y:b});for(var k=0;y>=k;k+=1){if(m=(l=Hn(t,e,n,r,i,o,a,s,k/y)).x,b=l.y,f&&S.push({x:m,y:b}),p&&(T+=Ln(x,[m,b])),x=[m,b],g&&T>=u&&u>E[2]){var N=(T-u)/(T-E[2]);w={x:x[0]*(1-N)+E[0]*N,y:x[1]*(1-N)+E[1]*N}}E=[m,b,T]}return g&&u>=T&&(w={x:a,y:s}),{length:T,point:w,min:{x:Math.min.apply(null,S.map((function(t){return t.x}))),y:Math.min.apply(null,S.map((function(t){return t.y})))},max:{x:Math.max.apply(null,S.map((function(t){return t.x}))),y:Math.max.apply(null,S.map((function(t){return t.y})))}}}function Wn(t,e,n,r,i,o,a){var s=1-a;return{x:Math.pow(s,2)*t+2*s*a*n+Math.pow(a,2)*i,y:Math.pow(s,2)*e+2*s*a*r+Math.pow(a,2)*o}}function Yn(t,e,n,r,i,o,a,s){var u,c=s.bbox,l=void 0===c||c,h=s.length,f=void 0===h||h,d=s.sampleSize,p=void 0===d?10:d,v="number"==typeof a,y=t,g=e,m=0,b=[y,g,m],T=[y,g],E={x:0,y:0},x=[{x:y,y:g}];v&&0>=a&&(E={x:y,y:g});for(var w=0;p>=w;w+=1){if(y=(u=Wn(t,e,n,r,i,o,w/p)).x,g=u.y,l&&x.push({x:y,y:g}),f&&(m+=Ln(T,[y,g])),T=[y,g],v&&m>=a&&a>b[2]){var S=(m-a)/(m-b[2]);E={x:T[0]*(1-S)+b[0]*S,y:T[1]*(1-S)+b[1]*S}}b=[y,g,m]}return v&&a>=m&&(E={x:i,y:o}),{length:m,point:E,min:{x:Math.min.apply(null,x.map((function(t){return t.x}))),y:Math.min.apply(null,x.map((function(t){return t.y})))},max:{x:Math.max.apply(null,x.map((function(t){return t.x}))),y:Math.max.apply(null,x.map((function(t){return t.y})))}}}function qn(t,e,n){for(var r,i,o,a,s,u,c,l,h,f=Cn(t),d="number"==typeof e,p=[],v=0,y=0,g=0,m=0,b=[],T=[],E=0,x={x:0,y:0},w=x,S=x,k=x,N=0,P=0,_=f.length;_>P;P+=1)p=(c="M"===(l=(h=f[P])[0]))?p:[v,y].concat(h.slice(1)),c?(w=x={x:g=h[1],y:m=h[2]},E=0,d&&.001>e&&(k=x)):"L"===l?(E=(r=Dn(p[0],p[1],p[2],p[3],(e||0)-N)).length,x=r.min,w=r.max,S=r.point):"A"===l?(E=(i=Vn(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],(e||0)-N,n||{})).length,x=i.min,w=i.max,S=i.point):"C"===l?(E=(o=zn(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],(e||0)-N,n||{})).length,x=o.min,w=o.max,S=o.point):"Q"===l?(E=(a=Yn(p[0],p[1],p[2],p[3],p[4],p[5],(e||0)-N,n||{})).length,x=a.min,w=a.max,S=a.point):"Z"===l&&(E=(s=Dn((p=[v,y,g,m])[0],p[1],p[2],p[3],(e||0)-N)).length,x=s.min,w=s.max,S=s.point),d&&e>N&&N+E>=e&&(k=S),T.push(w),b.push(x),N+=E,v=(u="Z"!==l?h.slice(-2):[g,m])[0],y=u[1];return d&&e>=N&&(k={x:v,y:y}),{length:N,point:k,min:{x:Math.min.apply(null,b.map((function(t){return t.x}))),y:Math.min.apply(null,b.map((function(t){return t.y})))},max:{x:Math.max.apply(null,T.map((function(t){return t.x}))),y:Math.max.apply(null,T.map((function(t){return t.y})))}}}function Xn(t){return function(t){var e=0,n=0,r=0;return Gn(t).map((function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var o,a,s,u,c,l,h,f,d=t.slice(1);return r=3*(((f=d[5])-(a=n))*((s=d[0])+(c=d[2]))-((h=d[4])-(o=e))*((u=d[1])+(l=d[3]))+u*(o-c)-s*(a-l)+f*(c+o/3)-h*(l+a/3))/20,i=t.slice(-2),e=i[0],n=i[1],r})).reduce((function(t,e){return t+e}),0)}(t)>=0}function Kn(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?zn(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=Rn(n,r,e),s=Rn(r,i,e),u=Rn(i,o,e),c=Rn(a,s,e),l=Rn(s,u,e),h=Rn(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function Zn(t,e,n){var r=Kn(t),i=Kn(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),f=[c,l],d=[h-o,h-a],p=0,v=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d[e]-=(p=n&&d[e]&&t.l>=f[e])?1:0,p?t.ss:[t.s]})).flat()}));return v[0].length===v[1].length?v:Zn(v[0],v[1],h)}var Jn={}.toString,Qn=function(t,e){return Jn.call(t)==="[object "+e+"]"},$n=function(t){return null==t},tr=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},er=function(t){return Qn(t,"String")},nr=function(t,e,n){return e>t?e:t>n?n:t},rr=function(t){return Qn(t,"Number")},ir=function(t){return Qn(t,"Boolean")},or=function(t){return void 0===t},ar=function(t,e){if(!Qn(t,"Function"))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};return n.cache=new Map,n};function sr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ur(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cr(){}var lr=.7,hr=1/lr,fr="\\s*([+-]?\\d+)\\s*",dr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",pr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vr=/^#([0-9a-f]{3,8})$/,yr=new RegExp("^rgb\\("+[fr,fr,fr]+"\\)$"),gr=new RegExp("^rgb\\("+[pr,pr,pr]+"\\)$"),mr=new RegExp("^rgba\\("+[fr,fr,fr,dr]+"\\)$"),br=new RegExp("^rgba\\("+[pr,pr,pr,dr]+"\\)$"),Tr=new RegExp("^hsl\\("+[dr,pr,pr]+"\\)$"),Er=new RegExp("^hsla\\("+[dr,pr,pr,dr]+"\\)$"),xr={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 wr(){return this.rgb().formatHex()}function Sr(){return this.rgb().formatRgb()}function kr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=vr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Nr(e):3===n?new Mr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Pr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Pr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yr.exec(t))?new Mr(e[1],e[2],e[3],1):(e=gr.exec(t))?new Mr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=mr.exec(t))?Pr(e[1],e[2],e[3],e[4]):(e=br.exec(t))?Pr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Tr.exec(t))?Ir(e[1],e[2]/100,e[3]/100,1):(e=Er.exec(t))?Ir(e[1],e[2]/100,e[3]/100,e[4]):xr.hasOwnProperty(t)?Nr(xr[t]):"transparent"===t?new Mr(NaN,NaN,NaN,0):null}function Nr(t){return new Mr(t>>16&255,t>>8&255,255&t,1)}function Pr(t,e,n,r){return r>0||(t=e=n=NaN),new Mr(t,e,n,r)}function _r(t){return t instanceof cr||(t=kr(t)),t?new Mr((t=t.rgb()).r,t.g,t.b,t.opacity):new Mr}function Mr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ar(){return"#"+Or(this.r)+Or(this.g)+Or(this.b)}function Cr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Or(t){return(16>(t=Math.max(0,Math.min(255,Math.round(t)||0)))?"0":"")+t.toString(16)}function Ir(t,e,n,r){return r>0?n>0&&1>n?e>0||(t=NaN):t=e=NaN:t=e=n=NaN,new Lr(t,e,n,r)}function Rr(t){if(t instanceof Lr)return new Lr(t.h,t.s,t.l,t.opacity);if(t instanceof cr||(t=kr(t)),!t)return new Lr;if(t instanceof Lr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(r>n):n===o?(r-e)/s+2:(e-n)/s+4,s/=.5>u?o+i:2-o-i,a*=60):s=u>0&&1>u?0:a,new Lr(a,s,u,t.opacity)}function Lr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Dr(t,e,n){return 255*(60>t?e+(n-e)*t/60:180>t?n:240>t?e+(n-e)*(240-t)/60:e)}function Fr(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Br(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}sr(cr,kr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:wr,formatHex:wr,formatHsl:function(){return Rr(this).formatHsl()},formatRgb:Sr,toString:Sr}),sr(Mr,(function(t,e,n,r){return 1===arguments.length?_r(t):new Mr(t,e,n,null==r?1:r)}),ur(cr,{brighter:function(t){return t=null==t?hr:Math.pow(hr,t),new Mr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?lr:Math.pow(lr,t),new Mr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return this.r>=-.5&&255.5>this.r&&this.g>=-.5&&255.5>this.g&&this.b>=-.5&&255.5>this.b&&this.opacity>=0&&1>=this.opacity},hex:Ar,formatHex:Ar,formatRgb:Cr,toString:Cr})),sr(Lr,(function(t,e,n,r){return 1===arguments.length?Rr(t):new Lr(t,e,n,null==r?1:r)}),ur(cr,{brighter:function(t){return t=null==t?hr:Math.pow(hr,t),new Lr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?lr:Math.pow(lr,t),new Lr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(0>this.h),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(.5>n?n:1-n)*e,i=2*n-r;return new Mr(Dr(240>t?t+120:t-240,i,r),Dr(t,i,r),Dr(120>t?t+240:t-120,i,r),this.opacity)},displayable:function(){return(this.s>=0&&1>=this.s||isNaN(this.s))&&this.l>=0&&1>=this.l&&this.opacity>=0&&1>=this.opacity},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Gr={box:function(t,e,n,r){return Br([t,n],[e,r])},length:function(t,e,n,r){return Fr(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return 0>a?Fr(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Fr(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];return function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i}(s,s),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([i-t,o-e],s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};var Ur=function(t){return function(t){if(2>t.length)return 0;for(var e=0,n=0;t.length-1>n;n++){var r=t[n],i=t[n+1];e+=Fr(r[0],r[1],i[0],i[1])}return e}(t)},jr=r((function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}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 t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var r=0,i=e.length,o=new Array(i);i>r;r++)o[r]=e[r].fn;return o},s.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,o),!0;case 6:return l.fn.call(l.context,e,r,i,o,a),!0}for(c=1,u=new Array(h-1);h>c;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,d=l.length;for(c=0;d>c;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,i);break;default:if(!u)for(f=1,u=new Array(h-1);h>f;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;l>u;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&a(this,e):(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,t.exports=s}));let Vr=1;const Hr="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},zr=Date.now();let Wr={},Yr=Date.now();const qr=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-Yr,r=n>16?0:16-n,i=Vr++;return Wr[i]=t,Object.keys(Wr).length>1||setTimeout((()=>{Yr=e;const t=Wr;Wr={},Object.keys(t).forEach((e=>t[e](Hr.performance&&"function"==typeof Hr.performance.now?Hr.performance.now():Date.now()-zr)))}),r),i},Xr=t=>{delete Wr[t]},Kr=t=>"string"!=typeof t?qr:""===t?Hr.requestAnimationFrame:Hr[t+"RequestAnimationFrame"],Zr=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],(t=>!!Kr(t))),Jr=Kr(Zr),Qr="string"!=typeof($r=Zr)?Xr:""===$r?Hr.cancelAnimationFrame:Hr[$r+"CancelAnimationFrame"]||Hr[$r+"CancelRequestAnimationFrame"];var $r,ti,ei,ni,ri,ii;function oi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */oi=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new w(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(p=y);var g=d.prototype=h.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function T(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,T(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function ai(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function si(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ai(o,r,i,a,s,"next",t)}function s(t){ai(o,r,i,a,s,"throw",t)}a(void 0)}))}}function ui(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ci(t,e,n){return e&&ui(t.prototype,e),n&&ui(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function li(){return li=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},li.apply(this,arguments)}function hi(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,fi(t,e)}function fi(t,e){return fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fi(t,e)}function di(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&(i[n]=t[n]);return i}function pi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);e>n;n++)r[n]=t[n];return r}function yi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return vi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return t.length>r?{done:!1,value:t[r++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Hr.requestAnimationFrame=Jr,Hr.cancelAnimationFrame=Qr,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Jr,cancelAnimationFrame:Qr}),(ti=t.UnitType||(t.UnitType={}))[ti.kUnknown=0]="kUnknown",ti[ti.kNumber=1]="kNumber",ti[ti.kPercentage=2]="kPercentage",ti[ti.kEms=3]="kEms",ti[ti.kPixels=4]="kPixels",ti[ti.kRems=5]="kRems",ti[ti.kDegrees=6]="kDegrees",ti[ti.kRadians=7]="kRadians",ti[ti.kGradians=8]="kGradians",ti[ti.kTurns=9]="kTurns",ti[ti.kMilliseconds=10]="kMilliseconds",ti[ti.kSeconds=11]="kSeconds",ti[ti.kInteger=12]="kInteger",function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUOther=5]="kUOther"}(ei||(ei={})),function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"}(ni||(ni={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(ri||(ri={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(ii||(ii={}));var gi,mi=[{name:"em",unit_type:t.UnitType.kEms},{name:"px",unit_type:t.UnitType.kPixels},{name:"deg",unit_type:t.UnitType.kDegrees},{name:"rad",unit_type:t.UnitType.kRadians},{name:"grad",unit_type:t.UnitType.kGradians},{name:"ms",unit_type:t.UnitType.kMilliseconds},{name:"s",unit_type:t.UnitType.kSeconds},{name:"rem",unit_type:t.UnitType.kRems},{name:"turn",unit_type:t.UnitType.kTurns}];!function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"}(gi||(gi={}));var bi,Ti=function(e){return e?"number"===e?t.UnitType.kNumber:"percent"===e||"%"===e?t.UnitType.kPercentage:function(t){return mi.find((function(e){return e.name===t})).unit_type}(e):t.UnitType.kUnknown},Ei=function(e){var n=1;switch(e){case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kSeconds:break;case t.UnitType.kMilliseconds:n=.001;break;case t.UnitType.kRadians:n=180/Math.PI;break;case t.UnitType.kGradians:n=.9;break;case t.UnitType.kTurns:n=360}return n},xi=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return"";case t.UnitType.kPercentage:return"%";case t.UnitType.kEms:return"em";case t.UnitType.kRems:return"rem";case t.UnitType.kPixels:return"px";case t.UnitType.kDegrees:return"deg";case t.UnitType.kRadians:return"rad";case t.UnitType.kGradians:return"grad";case t.UnitType.kMilliseconds:return"ms";case t.UnitType.kSeconds:return"s";case t.UnitType.kTurns:return"turn"}return""},wi=function(){function e(){}e.isAngle=function(e){return e===t.UnitType.kDegrees||e===t.UnitType.kRadians||e===t.UnitType.kGradians||e===t.UnitType.kTurns},e.isLength=function(e){return e>=t.UnitType.kEms&&t.UnitType.kDegrees>e},e.isRelativeUnit=function(e){return e===t.UnitType.kPercentage||e===t.UnitType.kEms||e===t.UnitType.kRems},e.isTime=function(e){return e===t.UnitType.kSeconds||e===t.UnitType.kMilliseconds};var n=e.prototype;return n.toString=function(){return this.buildCSSText(ri.kNo,ii.kNo,"")},n.isNumericValue=function(){return this.getType()>=gi.kUnitType&&this.getType()<=gi.kClampType},e}(),Si=function(t){function e(e){var n;return(n=t.call(this)||this).colorSpace=void 0,n.colorSpace=e,n}hi(e,t);var n=e.prototype;return n.getType=function(){return gi.kColorType},n.to=function(t){return this},e}(wi);(bi=t.GradientType||(t.GradientType={}))[bi.Constant=0]="Constant",bi[bi.LinearGradient=1]="LinearGradient",bi[bi.RadialGradient=2]="RadialGradient";var ki=function(t){function e(e,n){var r;return(r=t.call(this)||this).type=void 0,r.value=void 0,r.type=e,r.value=n,r}hi(e,t);var n=e.prototype;return n.clone=function(){return new e(this.type,this.value)},n.buildCSSText=function(t,e,n){return n},n.getType=function(){return gi.kColorType},e}(wi),Ni=function(t){function e(e){var n;return(n=t.call(this)||this).value=void 0,n.value=e,n}hi(e,t);var n=e.prototype;return n.clone=function(){return new e(this.value)},n.getType=function(){return gi.kKeywordType},n.buildCSSText=function(t,e,n){return n+this.value},e}(wi),Pi=ar((function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}));function _i(t){if(!t)throw new Error}function Mi(t,e){if(t===e)throw new Error}function Ai(t){return"function"==typeof t}var Ci,Oi,Ii={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},Ri=ar((function(t){var e=Pi(t),n=Ii[e];return[e=(null==n?void 0:n.alias)||e,n]}));function Li(t,e){var n,r=Ri(t),i=r[1];return[r[0],er(e)&&(null==i||null===(n=i.values)||void 0===n?void 0:n[e])||e]}!function(t){t.kAdd="+",t.kSubtract="-",t.kMultiply="*",t.kDivide="/",t.kMin="min",t.kMax="max",t.kClamp="clamp",t.kInvalid=""}(Ci||(Ci={})),function(t){t[t.kLength=0]="kLength",t[t.kAngle=1]="kAngle",t[t.kTime=2]="kTime",t[t.kFrequency=3]="kFrequency",t[t.kResolution=4]="kResolution",t[t.kFlex=5]="kFlex",t[t.kPercent=6]="kPercent",t[t.kNumBaseTypes=7]="kNumBaseTypes"}(Oi||(Oi={}));var Di=function(){function e(e,n){void 0===e&&(e=t.UnitType.kNumber),void 0===n&&(n=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=Oi.kPercent,this.hasPercentHint=!1,this.exponents=new Array(Oi.kNumBaseTypes).fill(0),e!==t.UnitType.kNumber&&this.setExponent(function(e){switch(Mi(e,t.UnitType.kNumber),e){case t.UnitType.kEms:case t.UnitType.kPixels:case t.UnitType.kRems:return Oi.kLength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return Oi.kTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return Oi.kAngle;case t.UnitType.kPercentage:return Oi.kPercent;default:return Oi.kLength}}(e),n)}var n=e.prototype;return n.applyPercentHint=function(t){Mi(t,Oi.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(Oi.kPercent)),this.setExponent(Oi.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},n.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},n.isOnlyNonZeroEntry=function(t,e){return Mi(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},n.exponent=function(t){return this.exponents[t]},n.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},e.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},n.matchesBaseType=function(t){return Mi(t,Oi.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},n.matchesPercentage=function(){return this.isOnlyNonZeroEntry(Oi.kPercent,1)},n.matchesBaseTypePercentage=function(t){return Mi(t,Oi.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(Oi.kPercent,1)},n.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},n.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(Oi.kPercent,1)},e.add=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint),function(t,e){if(t!==e)throw new Error}(t.percentHint,e.percentHint);for(var r=0;Oi.kNumBaseTypes>r;++r){var i=r;if(t.exponents[r]!==e.exponents[r]&&(i!==Oi.kPercent&&(t.applyPercentHint(i),e.applyPercentHint(i)),t.exponents[r]!==e.exponents[r]))return t}return t},e.multiply=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;Oi.kNumBaseTypes>r;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}return t},e}(),Fi=function(e){return"number"==typeof e?new Wi(e,t.UnitType.kNumber):e},Bi=function(e){function n(t){var n;return(n=e.call(this)||this).type_=void 0,n.type_=t,n}hi(n,e);var r=n.prototype;return r.getType=function(){return gi.kUnknownType},r.equals=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Gi(n);return i.every((function(e){return t.equals(e)}))},r.add=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kSumType,r,this);var i=Vi(r,Ci.kAdd);return i||to.create(r)},r.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);r=r.map((function(t){return t.negate()})),Ui(gi.kSumType,r,this);var i=Vi(r,Ci.kAdd);return i||to.create(r)},r.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kProductType,r,this);var i=Hi(r);return i||eo.create(r)},r.div=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);r=r.map((function(t){return t.invert()})),Ui(gi.kProductType,r,this);var i=Hi(r);return i||eo.create(r)},r.min=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kMinType,r,this);var i=Vi(r,Ci.kMin);return i||Qi.create(r)},r.max=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Gi(e);Ui(gi.kMaxType,r,this);var i=Vi(r,Ci.kMax);return i||$i.create(r)},r.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=ji(e[0]);return r?(n="string"==typeof t?Ti(t):t,r.convertTo(n)):null},r.toSum=function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i=0,o=e;o.length>i;i++){var a=o[i];if(!n.isValidUnit(Ti(a)))return null}var s=this.sumValue();if(!s.length)return null;for(var u,c=[],l=yi(s);!(u=l()).done;){var h=u.value,f=ji(h);if(!f)return null;c.push(f)}if(0===e.length){c.sort((function(t,e){return t.unit-e.unit}));var d=to.create(c);return _i(!!d),d}for(var p=[],v=function(){var t=Ti(g[y]);_i(n.isValidUnit(t));var e=c.reduce((function(e,n,r){if(n){var i=n.convertTo(t);i&&(e+=i.value,c[r]=null)}return e}),0);p.push(new Wi(e,t))},y=0,g=e;g.length>y;y++)v();if(c.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return to.create(p)},r.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(Oi.kLength);return e&&(t.length=e),(e=this.type_.exponent(Oi.kAngle))&&(t.angle=e),(e=this.type_.exponent(Oi.kTime))&&(t.time=e),(e=this.type_.exponent(Oi.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(Oi.kResolution))&&(t.resolution=e),(e=this.type_.exponent(Oi.kFlex))&&(t.flex=e),(e=this.type_.exponent(Oi.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case Oi.kLength:return"length";case Oi.kAngle:return"angle";case Oi.kTime:return"time";case Oi.kFrequency:return"frequency";case Oi.kResolution:return"resolution";case Oi.kFlex:return"flex";case Oi.kPercent:return"percent"}return""}(this.type_.percentHint)),t},n.isValidUnit=function(e){return!!(e===t.UnitType.kNumber||e==t.UnitType.kPercentage||this.isLength(e)||this.isAngle(e)||this.isTime(e))},r.negate=function(){return Xi.create(this)},r.invert=function(){return qi.create(this)},n}(wi);function Gi(t){return t.map(Fi)}function Ui(t,e,n){_i(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function ji(t){return 0===Object.keys(t.units).length?new Wi(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Wi(t.value,Number(Object.keys(t.units)[0])):null}function Vi(t,e){_i(!!t.length);var n=t[0]instanceof Wi?t[0]:null;if(!n)return null;for(var r=n.value,i=1;t.length>i;i++){var o=t[i]instanceof Wi?t[i]:null;if(!o||o.unit!==n.unit)return null;e===Ci.kAdd?r+=o.value:e===Ci.kMax?r=Math.max(r,o.value):e===Ci.kMin&&(r=Math.min(r,o.value))}return new Wi(r,n.unit)}function Hi(e){_i(!!e.length);for(var n=t.UnitType.kNumber,r=1,i=0;e.length>i;i++){var o=e[i]instanceof Wi?e[i]:null;if(!o)return null;if(o.unit!==t.UnitType.kNumber){if(n!==t.UnitType.kNumber)return null;n=o.unit}r*=o.value}return new Wi(r,n)}var zi=function(e){return function(e){switch(e){case ei.kUNumber:return t.UnitType.kNumber;case ei.kULength:return t.UnitType.kPixels;case ei.kUPercent:return t.UnitType.kPercentage;case ei.kUTime:return t.UnitType.kSeconds;case ei.kUAngle:return t.UnitType.kDegrees;default:return t.UnitType.kUnknown}}(function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return ei.kUNumber;case t.UnitType.kPercentage:return ei.kUPercent;case t.UnitType.kPixels:return ei.kULength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return ei.kUTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return ei.kUAngle;default:return ei.kUOther}}(e))},Wi=function(e){function n(n,r){var i,o;return void 0===r&&(r=t.UnitType.kNumber),o="string"==typeof r?Ti(r):r,(i=e.call(this,new Di(o))||this).unit=void 0,i.value=void 0,i.unit=o,i.value=n,i}hi(n,e);var r=n.prototype;return r.clone=function(){return new n(this.value,this.unit)},r.convertTo=function(e){if(this.unit===e)return new n(this.value,this.unit);var r=zi(this.unit);if(r!==zi(e)||r===t.UnitType.kUnknown)return null;var i=Ei(this.unit)/Ei(e);return new n(this.value*i,e)},r.equals=function(t){return this.value===t.value&&this.unit===t.unit},r.getType=function(){return gi.kUnitType},r.sumValue=function(){var e,n,r=[],i={};return this.unit!==t.UnitType.kNumber&&(i[(e=this.unit,n=zi(e),n===t.UnitType.kUnknown?e:n)]=1),r.push({value:this.value*Ei(this.unit),units:i}),r},r.negate=function(){return new n(-this.value,this.unit)},r.invert=function(){return this.unit===t.UnitType.kNumber?0===this.value?null:new n(1/this.value,this.unit):qi.create(this)},r.buildCSSText=function(e,n,r){var i;switch(this.unit){case t.UnitType.kUnknown:break;case t.UnitType.kInteger:i=Number(this.value).toFixed(0);break;case t.UnitType.kNumber:case t.UnitType.kPercentage:case t.UnitType.kEms:case t.UnitType.kRems:case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:case t.UnitType.kTurns:var o=this.value,a=xi(this.unit);if(-999999>o||o>999999){var s=xi(this.unit);i=!Number.isFinite(o)||Number.isNaN(o)?function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(_i(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e}(o,s):o+(s||"")}else i=""+o+a}return r+=i},n}(Bi),Yi=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.isUnitValue=function(){return!1},e}(Bi),qi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).value=void 0,r.operator="invert",r.value=e,r}hi(e,t),e.create=function(t){return new e(t,Di.negateExponents(t.type_))};var n=e.prototype;return n.clone=function(){return new e(this.value,this.type_)},n.getType=function(){return gi.kInvertType},n.equals=function(t){return t.getType()===gi.kInvertType&&this.value.equals(t.value)},n.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},n.buildCSSText=function(t,e,n){return e==ii.kNo&&(n+=t===ri.kYes?"(":"calc("),n=this.value.buildCSSText(ri.kYes,ii.kNo,n+="1 / "),e===ii.kNo&&(n+=")"),n},e}(Yi),Xi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).value=void 0,r.operator="negate",r.value=e,r}hi(e,t),e.create=function(t){return new e(t,t.type_)};var n=e.prototype;return n.clone=function(){return new e(this.value,this.type_)},n.getType=function(){return gi.kNegateType},n.equals=function(t){return t.getType()===gi.kNegateType&&this.value.equals(t.value)},n.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},n.buildCSSText=function(t,e,n){return e==ii.kNo&&(n+=t===ri.kYes?"(":"calc("),n=this.value.buildCSSText(ri.kYes,ii.kNo,n+="-"),e===ii.kNo&&(n+=")"),n},e}(Yi);function Ki(t,e,n){for(var r=t[0].type_,i=1;t.length>i;i++)r=e(r,t[i].type_,false);return r}var Zi,Ji=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).values=void 0,r.values=e,r}hi(e,t);var n=e.prototype;return n.numericValues=function(){return this.values},n.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Yi),Qi=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="min",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.add))};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kMinType},n.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=yi(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},n.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,o=yi(this.numericValues());!(r=o()).done;){i||(n+=", "),i=!1,n=r.value.buildCSSText(ri.kYes,ii.kYes,n)}return n+=")"},e}(Ji),$i=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="max",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.add))};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kMaxType},n.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=yi(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},n.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,o=yi(this.numericValues());!(r=o()).done;){i||(n+=", "),i=!1,n=r.value.buildCSSText(ri.kYes,ii.kYes,n)}return n+=")"},e}(Ji),to=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="sum",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.add))},e.numericTypeFromUnitMap=function(t){var e=new Di;return Object.keys(t).forEach((function(n){var r=t[n];e=Di.multiply(e,new Di(Number(n),r),false),_i(!0)})),e},e.canCreateNumericTypeFromSumValue=function(t){var e=this;_i(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return Di.add(n,e.numericTypeFromUnitMap(t.units),false),!0}))};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kSumType},n.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(li({},e)):t[n].value+=e.value}))})),e.canCreateNumericTypeFromSumValue(t)?t:null},n.buildCSSText=function(t,e,n){e==ii.kNo&&(n+=t===ri.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ri.kYes,ii.kNo,n);for(var i=1;r.length>i;i++){var o=r[i];n=o.getType()===gi.kNegateType?o.value.buildCSSText(ri.kYes,ii.kNo,n+=" - "):o.buildCSSText(ri.kYes,ii.kNo,n+=" + ")}return e===ii.kNo&&(n+=")"),n},e}(Ji),eo=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).operator="product",e}hi(e,t),e.create=function(t){return new e(t,Ki(t,Di.multiply))},e.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Mi(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t};var n=e.prototype;return n.clone=function(){return new e(this.values,this.type_)},n.getType=function(){return gi.kProductType},n.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(n){var r=n.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(n){i.push({value:t.value*n.value,units:e.multiplyUnitMaps(t.units,n.units)})}))})),t=i})),t},n.buildCSSText=function(t,e,n){e==ii.kNo&&(n+=t===ri.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ri.kYes,ii.kNo,n);for(var i=1;r.length>i;i++){var o=r[i];n=o.getType()===gi.kInvertType?o.value.buildCSSText(ri.kYes,ii.kNo,n+=" / "):o.buildCSSText(ri.kYes,ii.kNo,n+=" * ")}return e===ii.kNo&&(n+=")"),n},e}(Ji),no=new Wi(0,"px"),ro=new Wi(0,"deg"),io=function(t){function e(e,n,r,i,o){var a;return void 0===i&&(i=1),void 0===o&&(o=!1),(a=t.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}hi(e,t);var n=e.prototype;return n.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},n.buildCSSText=function(t,e,n){return n+"rgba("+this.r+","+this.g+","+this.b+","+this.alpha+")"},e}(Si);(Zi=t.PropertySyntax||(t.PropertySyntax={})).COORDINATE="<coordinate>",Zi.COLOR="<color>",Zi.PAINT="<paint>",Zi.NUMBER="<number>",Zi.ANGLE="<angle>",Zi.OPACITY_VALUE="<opacity-value>",Zi.SHADOW_BLUR="<shadow-blur>",Zi.LENGTH="<length>",Zi.PERCENTAGE="<percentage>",Zi.LENGTH_PERCENTAGE="<length> | <percentage>",Zi.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",Zi.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",Zi.LIST_OF_POINTS="<list-of-points>",Zi.PATH="<path>",Zi.FILTER="<filter>",Zi.Z_INDEX="<z-index>",Zi.OFFSET_PATH="<offset-path>",Zi.OFFSET_DISTANCE="<offset-distance>",Zi.CLIP_PATH="<clip-path>",Zi.MARKER="<marker>",Zi.TRANSFORM="<transform>",Zi.TRANSFORM_ORIGIN="<transform-origin>",Zi.TEXT="<text>",Zi.TEXT_TRANSFORM="<text-transform>";var oo=t.Syringe.defineToken(""),ao=t.Syringe.defineToken(""),so={number:function(t){return new Wi(t)},percent:function(t){return new Wi(t,"%")},px:function(t){return new Wi(t,"px")},em:function(t){return new Wi(t,"em")},rem:function(t){return new Wi(t,"rem")},deg:function(t){return new Wi(t,"deg")},grad:function(t){return new Wi(t,"grad")},rad:function(t){return new Wi(t,"rad")},turn:function(t){return new Wi(t,"turn")},s:function(t){return new Wi(t,"s")},ms:function(t){return new Wi(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;Lt.get(oo).registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},registerLayout:function(t,e){Lt.get(ao).registerLayout(t,e)}},uo=t.Syringe.defineToken(""),co=t.Syringe.defineToken(""),lo=new Ni("unset"),ho=new Ni("initial"),fo=new Ni("inherit"),po={"":lo,unset:lo,initial:ho,inherit:fo},vo=function(t){return po[t]||(po[t]=new Ni(t)),po[t]},yo=new io(0,0,0,0,!0),go=new io(0,0,0,0),mo=ar((function(t,e,n,r){return new io(t,e,n,r)}),(function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"})),bo=ar((function(e,n){return void 0===n&&(n=t.UnitType.kNumber),new Wi(e,n)}),(function(e,n){return void 0===n&&(n=t.UnitType.kNumber),""+e+n})),To={},Eo=0;var xo="undefined"!=typeof window&&void 0!==window.document;function wo(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function So(t){var e=t;do{var n;if(null===(n=e.style)||void 0===n?void 0:n.clipPath)return e;e=e.parentElement}while(null!==e);return null}function ko(t,e){if(xo)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var No="Method not implemented.",Po="Use document.documentElement instead.",_o={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Mo(t){var e=t.type,n=t.value;return"hex"===e?"#"+n:"literal"===e?n:"rgb"===e?"rgb("+n.join(",")+")":"rgba("+n.join(",")+")"}var Ao=function(){var t=/^(linear\-gradient)/i,e=/^(repeating\-linear\-gradient)/i,n=/^(radial\-gradient)/i,r=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,a=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,s=/^(left|center|right|top|bottom)/i,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,h=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,f=/^\(/,d=/^\)/,p=/^,/,v=/^\#([0-9a-fA-F]+)/,y=/^([a-zA-Z]+)/,g=/^rgb/i,m=/^rgba/i,b=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,T="";function E(t){throw new Error(T+": "+t)}function x(){var t=O(w);return T.length>0&&E("Invalid input not EOF"),t}function w(){return S("linear-gradient",t,N)||S("repeating-linear-gradient",e,N)||S("radial-gradient",n,P)||S("repeating-radial-gradient",r,P)||S("conic-gradient",i,P)}function S(t,e,n){return k(e,(function(e){var r=n();return r&&(B(p)||E("Missing comma before color stops")),{type:t,orientation:r,colorStops:O(I)}}))}function k(t,e){var n=B(t);if(n){B(f)||E("Missing (");var r=e(n);return B(d)||E("Missing )"),r}}function N(){return F("directional",o,1)||F("angular",h,1)}function P(){var t,e,n=_();return n&&((t=[]).push(n),e=T,B(p)&&((n=_())?t.push(n):T=e)),t}function _(){var t=function(){var t=F("shape",/^(circle)/i,0);t&&(t.style=D()||M());return t}()||function(){var t=F("shape",/^(ellipse)/i,0);t&&(t.style=L()||M());return t}();if(t)t.at=A();else{var e=M();if(e){t=e;var n=A();n&&(t.at=n)}else{var r=C();r&&(t={type:"default-radial",at:r})}}return t}function M(){return F("extent-keyword",a,1)}function A(){if(F("position",/^at/,0)){var t=C();return t||E("Missing positioning value"),t}}function C(){var t={x:L(),y:L()};if(t.x||t.y)return{type:"position",value:t}}function O(t){var e=t(),n=[];if(e)for(n.push(e);B(p);)(e=t())?n.push(e):E("One extra comma");return n}function I(){var t=F("hex",v,1)||k(m,(function(){return{type:"rgba",value:O(R)}}))||k(g,(function(){return{type:"rgb",value:O(R)}}))||F("literal",y,0);return t||E("Expected color definition"),t.length=L(),t}function R(){return B(b)[1]}function L(){return F("%",c,1)||F("position-keyword",s,1)||D()}function D(){return F("px",u,1)||F("em",l,1)}function F(t,e,n){var r=B(e);if(r)return{type:t,value:r[n]}}function B(t){var e=/^[\n\r\t\s]+/.exec(T);e&&G(e[0].length);var n=t.exec(T);return n&&G(n[0].length),n}function G(t){T=T.substring(t)}return function(t){return T=t,x()}}();function Co(t){return void 0===t?0:t>360||-360>t?t%360:t}function Oo(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),rr(t)?Ce(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new ne(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):Ce(t[0],t[1]||e,t[2]||n);var r,i}function Io(t){return t*(Math.PI/180)}function Ro(t){return t*(180/Math.PI)}function Lo(t){return 360*t}function Do(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,o=be(Me(),e),a=o[0],s=o[1],u=o[2],c=Math.asin(-e[2]/a);return i>c?c>-i?(n=Math.atan2(e[6]/s,e[10]/u),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/s,e[5]/s)):(r=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=c,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,u=o*o,c=n*n+a+s+u,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):-.499995*c>l?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+u)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function Fo(t,e,n,r,i){var o,a,s,u,c,l,h,f,d,p,v=Math.cos(t),y=Math.sin(t);return o=r*v,a=i*y,s=0,u=-r*y,c=i*v,l=0,h=e,f=n,d=1,(p=new ne(9))[0]=o,p[1]=a,p[2]=s,p[3]=u,p[4]=c,p[5]=l,p[6]=h,p[7]=f,p[8]=d,p}function Bo(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);0>e*i-n*r&&(i>e?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var s=Ro(Math.atan2(n,e));return[t[6],t[7],o,a,s]}var Go,Uo=ie(),jo=ie(),Vo=We(),Ho=[Me(),Me(),Me()],zo=Me();function Wo(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}(Go=t.Shape||(t.Shape={})).GROUP="g",Go.CIRCLE="circle",Go.ELLIPSE="ellipse",Go.IMAGE="image",Go.RECT="rect",Go.LINE="line",Go.POLYLINE="polyline",Go.POLYGON="polygon",Go.TEXT="text",Go.PATH="path",Go.HTML="html",Go.MESH="mesh";var Yo=t.Syringe.defineToken(""),qo=t.Syringe.defineToken(""),Xo=t.Syringe.defineToken("");function Ko(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=qn(t.parsedStyle.path.absolutePath,void 0,fn(fn({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function Zo(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,u=n+t,c=r-e,l=r+e;return[["M",s,r],["C",s,r-a,n-o,c,n,c],["C",n+o,c,u,r-a,u,r],["C",u,r+a,n+o,l,n,l],["C",n-o,l,s,r+a,s,r],["Z"]]}var Jo=function(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)},Qo=function(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)},$o=function(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)},ta=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=Jo,this.call=Jo,this._callAsync=Qo,this.callAsync=Qo,this._promise=$o,this.promise=$o,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e,n=yi(this.interceptors);!(e=n()).done;){var r=e.value;if(r.register){var i=r.register(t);void 0!==i&&(t=i)}}return t},e.withOptions=function(t){var e=this,n=function(e){return Object.assign({},t,"string"==typeof e?{name:e}:e)};return{name:this.name,tap:function(t,r){return e.tap(n(t),r)},tapAsync:function(t,r){return e.tapAsync(n(t),r)},tapPromise:function(t,r){return e.tapPromise(n(t),r)},isUsed:function(){return e.isUsed()},withOptions:function(t){return e.withOptions(n(t))}}},e.isUsed=function(){return this.taps.length>0||this.interceptors.length>0},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){var e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));var n=0;"number"==typeof t.stage&&(n=t.stage);for(var r=this.taps.length;r>0;){r--;var i=this.taps[r];this.taps[r+1]=i;var o=i.stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(e.size>0)continue}if(n>=o){r++;break}}this.taps[r]=t},t}(),ea=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="";i+='"use strict";\n',i+=this.header(),i+="return new Promise((function(_resolve, _reject) {\n",n&&(i+="var _sync = true;\n",i+="function _error(_err) {\n",i+="if(_sync)\n",i+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",i+="else\n",i+="_reject(_err);\n",i+="};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map((function(t){return t.fn}))},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var e=this;if(this.options.interceptors.length>0){for(var n=t.onError,r=t.onResult,i=t.onDone,o="",a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.call&&(o+=this.getInterceptor(a)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.content(Object.assign(t,{onError:n&&function(t){for(var r="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].error&&(r+=e.getInterceptor(i)+".error("+t+");\n")}return r+=n(t)},onResult:r&&function(t){for(var n="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].result&&(n+=e.getInterceptor(i)+".result("+t+");\n")}return n+=r(t)},onDone:i&&function(){for(var t="",n=0;e.options.interceptors.length>n;n++){e.options.interceptors[n].done&&(t+=e.getInterceptor(n)+".done();\n")}return t+=i()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=yi(this.options.taps);!(t=e()).done;){if(t.value.context)return!0}return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,o=e.rethrowIfPossible,a="",s=!1,u=0;this.options.interceptors.length>u;u++){var c=this.options.interceptors[u];c.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(u)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var l=this.options.taps[t];switch(l.type){case"sync":o||(a+="var _hasError"+t+" = false;\n",a+="try {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",o||(a+="} catch(_err) {\n",a+="_hasError"+t+" = true;\n",a+=n("_err"),a+="}\n",a+="if(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h="";h+=r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n",h+="if(_err"+t+") {\n",h+=n("_err"+t),h+="} else {\n",r&&(h+=r("_result"+t)),i&&(h+=i()),h+="}\n",a+="_fn"+t+"("+this.args({before:l.context?"_context":void 0,after:h+="})"})+");\n";break;case"promise":a+="var _hasResult"+t+" = false;\n",a+="var _promise"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",a+="if (!_promise"+t+" || !_promise"+t+".then)\n",a+=" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n",a+="_promise"+t+".then((function(_result"+t+") {\n",a+="_hasResult"+t+" = true;\n",r&&(a+=r("_result"+t)),i&&(a+=i()),a+="}), function(_err"+t+") {\n",a+="if(_hasResult"+t+") throw _err"+t+";\n",a+=n("_err"+t),a+="});\n"}return a},e.callTapsSeries=function(t){var e=this,n=t.onError,r=t.onResult,i=t.resultReturns,o=t.onDone,a=t.doneReturns,s=t.rethrowIfPossible;if(0===this.options.taps.length)return o();for(var u=this.options.taps.findIndex((function(t){return"sync"!==t.type})),c=i||a,l="",h=o,f=0,d=function(t){var i=t;h!==o&&("sync"!==e.options.taps[i].type||f++>20)&&(f=0,l+="function _next"+i+"() {\n",l+=h(),l+="}\n",h=function(){return(c?"return ":"")+"_next"+i+"();\n"});var a=h,d=function(t){return t?"":o()},p=e.callTap(i,{onError:function(t){return n(i,t,a,d)},onResult:r&&function(t){return r(i,t,a,d)},onDone:!r&&a,rethrowIfPossible:s&&(0>u||u>i)});h=function(){return p}},p=this.options.taps.length-1;p>=0;p--)d(p);return l+=h()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,r=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var i=this.options.taps.every((function(t){return"sync"===t.type})),o="";i||(o+="var _looper = (function() {\n",o+="var _loopAsync = false;\n"),o+="var _loop;\n",o+="do {\n",o+="_loop = false;\n";for(var a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.loop&&(o+=this.getInterceptor(a)+".loop("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var o="";return o+="if("+e+" !== undefined) {\n",o+="_loop = true;\n",i||(o+="if(_loopAsync) _looper();\n"),o+=r(!0),o+="} else {\n",o+=n(),o+="}\n"},onDone:n&&function(){var t="";return t+="if(!_loop) {\n",t+=n(),t+="}\n"},rethrowIfPossible:r&&i}),o+="} while(_loop);\n",i||(o+="_loopAsync = true;\n",o+="});\n",o+="_looper();\n"),o},e.callTapsParallel=function(t){var e=this,n=t.onError,r=t.onResult,i=t.onDone,o=t.rethrowIfPossible,a=t.onTap,s=void 0===a?function(t,e){return e()}:a;if(1>=this.options.taps.length)return this.callTapsSeries({onError:n,onResult:r,onDone:i,rethrowIfPossible:o});var u="";u+="do {\n",u+="var _counter = "+this.options.taps.length+";\n",i&&(u+="var _done = (function() {\n",u+=i(),u+="});\n");for(var c=function(t){var a=function(){return i?"if(--_counter === 0) _done();\n":"--_counter;"},c=function(t){return t||!i?"_counter = 0;\n":"_counter = 0;\n_done();\n"};u+="if(_counter <= 0) break;\n",u+=s(t,(function(){return e.callTap(t,{onError:function(e){var r="";return r+="if(_counter > 0) {\n",r+=n(t,e,a,c),r+="}\n"},onResult:r&&function(e){var n="";return n+="if(_counter > 0) {\n",n+=r(t,e,a,c),n+="}\n"},onDone:!r&&function(){return a()},rethrowIfPossible:o})}),a,c)},l=0;this.options.taps.length>l;l++)c(l);return u+="} while(false);\n"},e.args=function(t){var e=void 0===t?{}:t,n=e.before,r=e.after,i=this._args;return n&&(i=[n].concat(i)),r&&(i=i.concat(r)),0===i.length?"":i.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),na=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsParallel({onError:function(t,n,r,i){return e(n)+i(!0)},onDone:t.onDone})},e}(ea),ra=new na,ia=function(t){return ra.setup(this,t),ra.create(t)},oa=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=ia,r._call=void 0,r.call=void 0,r}return hi(e,t),e}(ta),aa=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e,r,i){return n(e)+i(!0)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])}})},e}(ea),sa=new aa,ua=function(t){return sa.setup(this,t),sa.create(t)},ca=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=ua,r._call=void 0,r.call=void 0,r}return hi(e,t),e}(ta),la=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsSeries({onError:function(t,n){return e(n)},onDone:t.onDone,rethrowIfPossible:t.rethrowIfPossible})},e}(ea),ha=new la,fa=function(){throw new Error("tapAsync is not supported on a SyncHook")},da=function(){throw new Error("tapPromise is not supported on a SyncHook")},pa=function(t){return ha.setup(this,t),ha.create(t)},va=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=fa,r.tapPromise=da,r.compile=pa,r}return hi(e,t),e}(ta),ya=function(t){function e(){return t.apply(this,arguments)||this}return hi(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])},doneReturns:t.resultReturns,rethrowIfPossible:t.rethrowIfPossible})},e}(ea),ga=new ya,ma=function(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")},ba=function(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")},Ta=function(t){return ga.setup(this,t),ga.create(t)},Ea=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=ma,r.tapPromise=ba,r.compile=Ta,r}return hi(e,t),e}(va),xa=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];var wa=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Sa=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ka=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Na=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Pa={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},_a=ar((function(t){return"angular"===t.type?Number(t.value):Pa[t.value]||0})),Ma=ar((function(t){var e=.5,n=.5;if("position"===(null==t?void 0:t.type)){var r=t.value,i=r.x,o=r.y;"position-keyword"===(null==i?void 0:i.type)&&("left"===i.value?e=0:"center"===i.value?e=.5:"right"===i.value?e=1:"top"===i.value?n=0:"bottom"===i.value&&(n=1)),"position-keyword"===(null==o?void 0:o.type)&&("left"===o.value?e=0:"center"===o.value?n=.5:"right"===o.value?e=1:"top"===o.value?n=0:"bottom"===o.value&&(n=1)),"%"===(null==i?void 0:i.type)&&(e=Number(i.value)/100),"%"===(null==o?void 0:o.type)&&(n=Number(i.value)/100)}return{cx:e,cy:n}})),Aa=ar((function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return Ao(e).map((function(n){var r=n.type,i=n.orientation,o=n.colorStops;!function(t){var e,n,r=t.length;t[r-1].length=null!==(e=t[r-1].length)&&void 0!==e?e:{type:"%",value:"100"},r>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var i=0,o=Number(t[0].length.value),a=1;r>a;a++){var s,u=null===(s=t[a].length)||void 0===s?void 0:s.value;if(!$n(u)&&!$n(o)){for(var c=1;a-i>c;c++)t[i+c].length={type:"%",value:""+(o+(Number(u)-o)*c/(a-i))};i=a,o=Number(u)}}}(o);var a=o.map((function(t){return[Number(t.length.value)/100,Mo(t)]}));if("linear-gradient"===r)return new ki(t.GradientType.LinearGradient,{angle:i?_a(i):0,steps:a,hash:e});if("radial-gradient"===r&&(i||(i=[{type:"shape",value:"circle"}]),"shape"===i[0].type&&"circle"===i[0].value)){var s=Ma(i[0].at);return new ki(t.GradientType.RadialGradient,{cx:s.cx,cy:s.cy,steps:a,hash:e})}}));var n=e[0];if("("===e[1]||"("===e[2])if("l"===n){var r=wa.exec(e);if(r){var i,o=(null===(i=r[2].match(Na))||void 0===i?void 0:i.map((function(t){return t.split(":")})))||[];return[new ki(t.GradientType.LinearGradient,{angle:parseFloat(r[1]),steps:o.map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:e})]}}else if("r"===n){var a=function(t){var e=Sa.exec(t);if(e){var n;return{cx:.5,cy:.5,steps:((null===(n=e[4].match(Na))||void 0===n?void 0:n.map((function(t){return t.split(":")})))||[]).map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:t}}return null}(e);if(a){if(!er(a))return[new ki(t.GradientType.RadialGradient,a)];e=a}}else if("p"===n)return function(t){var e=ka.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(e)}));function Ca(t){return tr(t)&&!!t.image}var Oa=ar((function(t){if(Ca(t))return li({repetition:"repeat"},t);if($n(t)&&(t=""),"transparent"===t)return go;"currentColor"===t&&(t="black");var e=Aa(t);if(e)return e;var n=kr(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),mo.apply(void 0,r)}));function Ia(t,e){if(t instanceof io&&e instanceof io)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;3>n;n++)e[n]=Math.round(nr(e[n],0,255));return e[3]=nr(e[3],0,1),"rgba("+e.join(",")+")"}]}var Ra,La=function(){function t(t,e){this.center=Me(),this.halfExtents=Me(),this.min=Me(),this.max=Me(),this.update(t,e)}t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var e=t.prototype;return e.update=function(t,e){t&&Oe(this.center,t),e&&Oe(this.halfExtents,e||Ce(0,0,0)),this.min=He(this.min,this.center,this.halfExtents),this.max=Re(this.max,this.center,this.halfExtents)},e.setMinMax=function(t,e){Re(this.center,e,t),De(this.center,this.center,.5),He(this.halfExtents,e,t),De(this.halfExtents,this.halfExtents,.5),Oe(this.min,t),Oe(this.max,e)},e.getMin=function(){return this.min},e.getMax=function(){return this.max},e.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=r-s,h=r+s,f=i-u,d=i+u,p=o-c,v=o+c,y=e.center,g=y[0],m=y[1],b=y[2],T=e.halfExtents,E=T[0],x=T[1],w=T[2],S=g-E,k=g+E,N=m-x,P=m+x,_=b-w,M=b+w;l>S&&(l=S),k>h&&(h=k),f>N&&(f=N),P>d&&(d=P),p>_&&(p=_),M>v&&(v=M),n[0]=.5*(l+h),n[1]=.5*(f+d),n[2]=.5*(p+v),a[0]=.5*(h-l),a[1]=.5*(d-f),a[2]=.5*(v-p),this.min[0]=l,this.min[1]=f,this.min[2]=p,this.max[0]=h,this.max[1]=d,this.max[2]=v}},e.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],s=e[4],u=e[8],c=e[1],l=e[5],h=e[9],f=e[2],d=e[6],p=e[10],v=Math.abs(a),y=Math.abs(s),g=Math.abs(u),m=Math.abs(c),b=Math.abs(l),T=Math.abs(h),E=Math.abs(f),x=Math.abs(d),w=Math.abs(p);Ie(n,e[12]+a*i[0]+s*i[1]+u*i[2],e[13]+c*i[0]+l*i[1]+h*i[2],e[14]+f*i[0]+d*i[1]+p*i[2]),Ie(r,v*o[0]+y*o[1]+g*o[2],m*o[0]+b*o[1]+T*o[2],E*o[0]+x*o[1]+w*o[2]),this.min=He(this.min,n,r),this.max=Re(this.max,n,r)},e.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return!(n[0]>r[0]||i[0]>e[0]||n[1]>r[1]||i[1]>e[1]||n[2]>r[2]||i[2]>e[2])},e.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o=new t,a=(n=Me(),r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),s=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}(Me(),this.getMax(),e.getMax());return o.setMinMax(a,s),o},e.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(e[0]>t[0]||t[0]>n[0]||e[1]>t[1]||t[1]>n[1]||e[2]>t[2]||t[2]>n[2])},e.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Oe(Me(),this.min):272===t.pnVertexFlag?Ce(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.max[2]):Ce(this.max[0],this.max[1],1===t.pnVertexFlag?this.min[2]:this.max[2])},e.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Oe(Me(),this.max):272===t.pnVertexFlag?Ce(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?Ce(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?Ce(this.min[0],this.max[1],this.min[2]):Ce(this.min[0],this.min[1],1===t.pnVertexFlag?this.max[2]:this.min[2])},t}(),Da=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Ce(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},e.distanceToPoint=function(t){return Be(t,this.normal)-this.distance},e.normalize=function(){var t=1/ze(this.normal);De(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&1>=i;return o&&n&&function(t,e,n,r){var i=e[0],o=e[1],a=e[2];t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a)}(n,t,e,i),o},t}();(Ra=t.Mask||(t.Mask={}))[Ra.OUTSIDE=4294967295]="OUTSIDE",Ra[Ra.INSIDE=0]="INSIDE",Ra[Ra.INDETERMINATE=2147483647]="INDETERMINATE";var Fa=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;6>e;e++)this.planes.push(new Da)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];Ie(this.planes[0].normal,i-e,u-o,f-c),this.planes[0].distance=y-d,Ie(this.planes[1].normal,i+e,u+o,f+c),this.planes[1].distance=y+d,Ie(this.planes[2].normal,i+n,u+a,f+l),this.planes[2].distance=y+p,Ie(this.planes[3].normal,i-n,u-a,f-l),this.planes[3].distance=y-p,Ie(this.planes[4].normal,i-r,u-s,f-h),this.planes[4].distance=y-v,Ie(this.planes[5].normal,i+r,u+s,f+h),this.planes[5].distance=y+v,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),Ba=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Ga=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}();function Ua(t,e){if($n(e))return bo(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return bo(Number(e),"px");if("deg".search(t)>=0)return bo(Number(e),"deg")}var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return bo(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var ja=ar((function(t){return Ua(new RegExp("px","g"),t)})),Va=(ar((function(t){return Ua(new RegExp("%","g"),t)})),ar((function(t){return rr(t)||isFinite(Number(t))?bo(Number(t),"px"):Ua(new RegExp("px|%|em|rem","g"),t)}))),Ha=ar((function(t){return Ua(new RegExp("deg|rad|grad|turn","g"),t)}));function za(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,u=zi(t.unit),c=t.convertTo(u),l=e.convertTo(u);return c&&l?(a=c.value,s=l.value,o=xi(t.unit)):(Wi.isLength(t.unit)||Wi.isLength(e.unit))&&(a=qa(t,i,n),s=qa(e,i,n),o="px"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Wa(e){var n=0;return e.unit===t.UnitType.kDegrees?n=e.value:e.unit===t.UnitType.kRadians?n=Ro(Number(e.value)):e.unit===t.UnitType.kTurns&&(n=Lo(Number(e.value))),n}function Ya(t){return er(t)?t.split(" ").map((function(t){return Va(t)})):t.map((function(t){return Va(t.toString())}))}function qa(e,n,r){if(e.unit===t.UnitType.kPixels)return Number(e.value);if(e.unit===t.UnitType.kPercentage&&r){var i=r.nodeName===t.Shape.GROUP?r.getLocalBounds():r.getGeometryBounds(),o=0;return La.isEmpty(i)||(o=2*i.halfExtents[n]),Number(e.value)/100*o}return 0}var Xa=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ka(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,Xa.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return Ua(/deg|rad|grad|turn|px|%/g,t)||Oa(t)}))}),n.lastIndex===t.length)return r}return[]}function Za(t){return t.toString()}var Ja=ar((function(t){return"number"==typeof t?bo(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?bo(Number(t)):bo(0)}));ar((function(t){return er(t)?t.split(" ").map(Ja):t.map(Ja)}));function Qa(t,e){return[t,e,Za]}function $a(t,e){return function(n,r){return[n,r,function(n){return Za(nr(n,t,e))}]}}function ts(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}var es=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:{x:0,y:0,width:0,height:0}};var e;try{e=Cn(t)}catch(n){e=Cn(""),console.error("[g]: Invalid SVG Path definition: "+t)}var n=function(t){for(var e=!1,n=t.length,r=0;n>r;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;t.length>i;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=Gn(e,!0),s=a[0],u=a[1],c=function(t){for(var e,n,r=[],i=null,o=null,a=0,s=t.length,u=0;s>u;u++){var c=t[u];o=t[u+1];var l=c[0],h={command:l,prePoint:i,params:c,startTangent:null,endTangent:null};"M"===l&&(a=u);var f=c.length;h.currentPoint=i=[c[f-2],c[f-1]],r[a]&&(e=i)[0]===(n=r[a].currentPoint)[0]&&e[1]===n[1]&&(r[a].prePoint=h.prePoint),h.nextPoint=o?[o[o.length-2],o[o.length-1]]:null;var d=h.prePoint;if("C"===l){var p=[c[1],c[2]],v=[c[3],c[4]];h.startTangent=[d[0]-p[0],d[1]-p[1]],h.endTangent=[i[0]-v[0],i[1]-v[1]],0===h.startTangent[0]&&0===h.startTangent[1]&&(h.startTangent=[p[0]-v[0],p[1]-v[1]]),0===h.endTangent[0]&&0===h.endTangent[1]&&(h.endTangent=[v[0]-p[0],v[1]-p[1]])}r.push(h)}return r}(s),l=function(t,e){if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var n=qn(t,void 0,fn(fn({},e),{length:!1})),r=n.min,i=r.x,o=r.y,a=n.max,s=a.x,u=a.y,c=s-i,l=u-o;return{width:c,height:l,x:i,y:o,x2:s,y2:u,cx:i+c/2,cy:o+l/2,cz:Math.max(c,l)+Math.min(c,l)/2}}(e),h=l.x,f=l.y,d=l.width,p=l.height;return{absolutePath:e,hasArc:n,segments:c,polygons:i,polylines:o,curve:s,totalLength:0,zCommandIndexes:u,rect:{x:Number.isFinite(h)?h:0,y:Number.isFinite(f)?f:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(p)?p:0}}},ns=ar(es);function rs(t,e){var n=er(t)?ns(t):es(t);return e&&(e.parsedStyle.defX=n.rect.x,e.parsedStyle.defY=n.rect.y),n}function is(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=Zn(r,i));var a,s,u,c,l,h,f,d,p=Xn(o[0])!==Xn(o[1])?(s=(a=o[0]).slice(1).map((function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):a[0].slice(1).concat(t.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse(),[["M"].concat(s[0].slice(0,2))].concat(s.map((function(t){return["C"].concat(t.slice(2))})))):hn(o[0]);return[p,(u=o[1],c=p,l=u.length-1,h=[],f=0,d=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a=i+o;return 0===o||t[a]&&"M"===t[a][0]?["M"].concat(t[a].slice(-2)):(e>a||(a-=n),t[a])}))}))}(u),d.forEach((function(t,e){u.slice(1).forEach((function(t,n){f+=Ln(u[(e+n)%l].slice(-2),c[n%l].slice(-2))})),h[e]=f,f=0})),d[h.indexOf(Math.min.apply(null,h))]),function(t){return t}]}function os(t,e){var n;n=er(t)?t.split(" ").map((function(t){var e=t.split(","),n=e[1];return[Number(e[0]),Number(n)]})):t;var r,i,o=[],a=0,s=Ur(n);n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=Gr.length(t[0],t[1],n[e+1][0],n[e+1][1]),r[1]=(a+=i)/s,o.push(r))}));var u=Math.min.apply(Math,n.map((function(t){return t[0]}))),c=Math.min.apply(Math,n.map((function(t){return t[1]})));return e&&(e.parsedStyle.defX=u,e.parsedStyle.defY=c),{points:n,totalLength:s,segments:o}}var as=null;function ss(t){return function(e){var n=0;return t.map((function(t){return t===as?e[n++]:t}))}}function us(t){return t}var cs={matrix:["NNNNNN",[as,as,0,0,as,as,0,0,0,0,1,0,as,as,0,1],us],matrix3d:["NNNNNNNNNNNNNNNN",us],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ss([as,as,so.number(1)]),us],scalex:["N",ss([as,so.number(1),so.number(1)]),ss([as,so.number(1)])],scaley:["N",ss([so.number(1),as,so.number(1)]),ss([so.number(1),as])],scalez:["N",ss([so.number(1),so.number(1),as])],scale3d:["NNN",us],skew:["Aa",null,us],skewx:["A",null,ss([as,ro])],skewy:["A",null,ss([ro,as])],translate:["Tt",ss([as,as,no]),us],translatex:["T",ss([as,no,no]),ss([as,no])],translatey:["T",ss([no,as,no]),ss([no,as])],translatez:["L",ss([no,no,as])],translate3d:["TTL",us]};function ls(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=cs[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(s.length>u.length)return[];for(var c=[],l=0;u.length>l;l++){var h=s[l],f=u[l],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?ro:Ha(t)},N:Ja,T:Va,L:ja}[f.toUpperCase()](h):{a:ro,n:c[0],t:no}[f]))return[];c.push(d)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function hs(t){var e,n,r,i;switch(t.t){case"rotatex":return i=Io(Wa(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Io(Wa(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Io(Wa(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Io(Wa(t.d[3]));var o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var s=Math.sin(i/2),u=s*Math.cos(i/2),c=s*s;return[1-2*(n*n+r*r)*c,2*(e*n*c+r*u),2*(e*r*c-n*u),0,2*(e*n*c-r*u),1-2*(e*e+r*r)*c,2*(n*r*c+e*u),0,2*(e*r*c+n*u),2*(n*r*c-e*u),1-2*(e*e+n*n)*c,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var l=Io(Wa(t.d[0])),h=Io(Wa(t.d[1]));return[1,Math.tan(h),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Io(Wa(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Io(Wa(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=qa(t.d[0],0,null)||0,n=qa(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=qa(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=qa(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=qa(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=qa(t.d[0],0,null)||0,n=qa(t.d[1],0,null)||0,r=qa(t.d[2],0,null)||0,1];case"perspective":var f=qa(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map((function(t){return t.value}))}}function fs(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function ds(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;16>i;i++)t[i]=e[i]*r;return!0}(Uo,t))return!1;if(oe(jo,Uo),jo[3]=0,jo[7]=0,jo[11]=0,jo[15]=1,1e-8>Math.abs(le(jo)))return!1;var a,s,u=Uo[3],c=Uo[7],l=Uo[11],h=Uo[12],f=Uo[13],d=Uo[14],p=Uo[15];if(0!==u||0!==c||0!==l){if(Vo[0]=u,Vo[1]=c,Vo[2]=l,Vo[3]=p,!ce(jo,jo))return!1;ue(jo,jo),Ye(i,Vo,jo)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=h,e[1]=f,e[2]=d,(a=Ho)[0][0]=(s=Uo)[0],a[0][1]=s[1],a[0][2]=s[2],a[1][0]=s[4],a[1][1]=s[5],a[1][2]=s[6],a[2][0]=s[8],a[2][1]=s[9],a[2][2]=s[10],n[0]=Ae(Ho[0]),Fe(Ho[0],Ho[0]),r[0]=Be(Ho[0],Ho[1]),Wo(Ho[1],Ho[1],Ho[0],1,-r[0]),n[1]=Ae(Ho[1]),Fe(Ho[1],Ho[1]),r[0]/=n[1],r[1]=Be(Ho[0],Ho[2]),Wo(Ho[2],Ho[2],Ho[0],1,-r[1]),r[2]=Be(Ho[1],Ho[2]),Wo(Ho[2],Ho[2],Ho[1],1,-r[2]),n[2]=Ae(Ho[2]),Fe(Ho[2],Ho[2]),r[1]/=n[2],r[2]/=n[2],Ge(zo,Ho[1],Ho[2]),0>Be(Ho[0],zo))for(var v=0;3>v;v++)n[v]*=-1,Ho[v][0]*=-1,Ho[v][1]*=-1,Ho[v][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+Ho[0][0]-Ho[1][1]-Ho[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-Ho[0][0]+Ho[1][1]-Ho[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-Ho[0][0]-Ho[1][1]+Ho[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+Ho[0][0]+Ho[1][1]+Ho[2][2],0)),Ho[2][1]>Ho[1][2]&&(o[0]=-o[0]),Ho[0][2]>Ho[2][0]&&(o[1]=-o[1]),Ho[1][0]>Ho[0][1]&&(o[2]=-o[2])}(function(t){return 0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(hs).reduce(fs)}(t),e,n,r,i,o),[[e,n,r,o,i]]}var ps=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;4>r;r++)for(var i=0;4>i;i++)for(var o=0;4>o;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;4>s;s++)a[s][3]=o[s];for(var u=0;3>u;u++)for(var c=0;3>c;c++)a[3][u]+=e[c]*a[c][u];var l=i[0],h=i[1],f=i[2],d=i[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(h*h+f*f),p[0][1]=2*(l*h-f*d),p[0][2]=2*(l*f+h*d),p[1][0]=2*(l*h+f*d),p[1][1]=1-2*(l*l+f*f),p[1][2]=2*(h*f-l*d),p[2][0]=2*(l*f-h*d),p[2][1]=2*(h*f+l*d),p[2][2]=1-2*(l*l+h*h),a=t(a,p);var v,y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],a=t(a,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],a=t(a,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],a=t(a,y));for(var g=0;3>g;g++)for(var m=0;3>m;m++)a[g][m]*=n[g];return 0==(v=a)[0][2]&&0==v[0][3]&&0==v[1][2]&&0==v[1][3]&&0==v[2][0]&&0==v[2][1]&&1==v[2][2]&&0==v[2][3]&&0==v[3][2]&&1==v[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])}}();function vs(t){return t.toFixed(6).replace(".000000","")}function ys(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=ds(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=ds(e)),null===n[0]||null===r[0]?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;t.length>r;r++)n+=t[r]*e[r];return n}(t,e);r=nr(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),s=0;4>s;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(n[0][3],r[0][3],t[5]);return ps(t[0],t[1],t[2],e,t[4]).map(vs).join(",")}])}function gs(t){return t.replace(/[xy]/,"")}function ms(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function bs(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?bo(a):bo(a,t.unit)}))})},o=0;t.length>o;o++)i(o)}var a,s,u=[],c=[],l=[];if(t.length!==e.length){var h=ys(t,e);u=[h[0]],c=[h[1]],l=[["matrix",[h[2]]]]}else for(var f=0;t.length>f;f++){var d=t[f].t,p=e[f].t,v=t[f].d,y=e[f].d,g=cs[d],m=cs[p],b=void 0;if(s=p,"perspective"===(a=d)&&"perspective"===s||!("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){var T=ys([t[f]],[e[f]]);u.push(T[0]),c.push(T[1]),l.push(["matrix",[T[2]]])}else{if(d===p)b=d;else if(g[2]&&m[2]&&gs(d)===gs(p))b=gs(d),v=g[2](v),y=m[2](y);else{if(!g[1]||!m[1]||ms(d)!==ms(p)){var E=ys(t,e);u=[E[0]],c=[E[1]],l=[["matrix",[E[2]]]];break}b=ms(d),v=g[1](v),y=m[1](y)}for(var x=[],w=[],S=[],k=0;v.length>k;k++){var N=za(v[k],y[k],n,!1,k);x[k]=N[0],w[k]=N[1],S.push(N[2])}u.push(x),c.push(w),l.push([b,S])}}if(r){var P=u;u=c,c=P}return[u,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"})).join(" ")}]}var Ts=ar((function(t){if(er(t)){if("text-anchor"===t)return[bo(0,"px"),bo(0,"px")];var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Va(Es(e[0])),Va(Es(e[1]))]}return[bo(t[0]||0,"px"),bo(t[1]||0,"px")]}));function Es(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var xs=function(){function t(){this.parser=Ha,this.mixer=Qa}return t.prototype.calculator=function(t,e,n,r){return Wa(n)},t}();xs=dn([ct({token:{token:co,named:t.PropertySyntax.ANGLE}})],xs);var ws=t.Syringe.defineToken(""),Ss=t.Syringe.defineToken("");t.CircleUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),t.CircleUpdater=dn([ct({token:{token:Ss,named:t.Shape.CIRCLE}})],t.CircleUpdater),t.EllipseUpdater=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),t.EllipseUpdater=dn([ct({token:{token:Ss,named:t.Shape.ELLIPSE}})],t.EllipseUpdater),t.LineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),s=Math.min(n,i);return{width:a-o,height:Math.max(n,i)-s}},t}(),t.LineUpdater=dn([ct({token:{token:Ss,named:t.Shape.LINE}})],t.LineUpdater),t.PathUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),t.PathUpdater=dn([ct({token:{token:Ss,named:t.Shape.PATH}})],t.PathUpdater),t.PolylineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,e.map((function(t){return t[0]}))),r=Math.max.apply(Math,e.map((function(t){return t[0]}))),i=Math.min.apply(Math,e.map((function(t){return t[1]})));return{width:r-n,height:Math.max.apply(Math,e.map((function(t){return t[1]})))-i}},t}(),t.PolylineUpdater=dn([ct({token:[{token:Ss,named:t.Shape.POLYLINE},{token:Ss,named:t.Shape.POLYGON}]})],t.PolylineUpdater),t.RectUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!er(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),t.RectUpdater=dn([ct({token:[{token:Ss,named:t.Shape.RECT},{token:Ss,named:t.Shape.IMAGE},{token:Ss,named:t.Shape.GROUP}]})],t.RectUpdater),t.OffscreenCanvasCreator=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),t.OffscreenCanvasCreator=dn([ct()],t.OffscreenCanvasCreator);var ks={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Ns=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Ps=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),_s=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source);t.TextService=function(){function t(t){var e=this;this.offscreenCanvas=void 0,this.cache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!(!t||!_s.exec(n)&&!Ps.exec(t))},this.trimByKinsokuShorui=function(t){var e=[].concat(t),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e},this.offscreenCanvas=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=ks.MetricsString+ks.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(ks.BaselineSymbol).width),u=ks.HeightMultiplier*s;s=s*ks.BaselineMultiplier|0,r.width=a,r.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var c=i.getImageData(0,0,a||1,u||1).data,l=c.length,h=4*a,f=0,d=0,p=!1;for(f=0;s>f;++f){for(var v=0;h>v;v+=4)if(255!==c[d+v]){p=!0;break}if(p)break;d+=h}for(n.ascent=s-f,d=l-h,p=!1,f=u;f>s;--f){for(var y=0;h>y;y+=4)if(255!==c[d+y]){p=!0;break}if(p)break;d-=h}return n.descent=f-s,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,u=e.textAlign,c=e.letterSpacing,l=e.leading,h=void 0===l?0:l,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=rr(e)&&e+"px"||"16px",s=er(n)?n.split(","):[n],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&0>xa.indexOf(c)&&(c='"'+c+'"'),s[u]=c}return r+" "+i+" "+o+" "+a+" "+s.join(",")}(e),d=this.measureFont(f,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var p=this.offscreenCanvas.getOrCreateContext(n);p.font=f,e.isOverflowing=!1;for(var v=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(v.length),g=0,m=0;v.length>m;m++){var b=p.measureText(v[m]).width+(v[m].length-1)*c;y[m]=b,g=Math.max(g,b)}var T=g+a,E=o||d.fontSize+a,x=Math.max(E,d.fontSize+a)+(v.length-1)*(E+h),w=0;return"middle"===s?w=-x/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-x:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:T,height:x,lines:v,lineWidths:y,lineHeight:E+=h,maxLineWidth:g,fontProperties:d,lineMetrics:y.map((function(t,e){var n=0;return"center"===u?n-=t/2:"right"!==u&&"end"!==u||(n-=t),new Ga(n-a/2,w+e*E,t+a,E)}))}},e.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,s=e.maxLines,u=void 0===s?1/0:s,c=e.textOverflow,l=this.offscreenCanvas.getOrCreateContext(n),h=o+a,f="";"ellipsis"===c?f="...":c&&"clip"!==c&&(f=c);for(var d=[],p=0,v=0,y={},g=function(t){return r.getFromCache(t,a,y,l)},m=Array.from(f).reduce((function(t,e){return t+g(e)}),0),b=Array.from(t),T=0;b.length>T;T++){var E=b[T],x=t[T-1],w=t[T+1],S=g(E);if(this.isNewline(E))v=0,d[++p]="";else{if(v>0&&v+S>h){if(p+1>=u){if(e.isOverflowing=!0,m>0&&h>=m){for(var k=0,N=0,P=0;d[p].length>P;P++){var _=g(d[p][P]);if(k+_+m>h){N=P;break}k+=_}d[p]=(d[p]||"").slice(0,N)+f}break}if(v=0,d[++p]="",this.isBreakingSpace(E))continue;this.canBreakInLastChar(E)||(d=this.trimToBreakable(d),v=this.sumTextWidthByCache(d[p]||"",y)),this.shouldBreakByKinsokuShorui(E,w)&&(d=this.trimByKinsokuShorui(d),v+=g(x||""))}v+=S,d[p]=(d[p]||"")+E}}return d.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&ks.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.isNewline=function(t){return"string"==typeof t&&ks.Newlines.indexOf(t.charCodeAt(0))>=0},e.trimToBreakable=function(t){var e=[].concat(t),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,o),e},e.canBreakInLastChar=function(t){return!t||!Ns.test(t)},e.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},e.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!Ns.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),t.TextService=dn([ct(),pn(0,lt(t.OffscreenCanvasCreator))],t.TextService),t.TextUpdater=function(){function t(t){this.textService=void 0,this.textService=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){return t.text&&t.fontSize&&t.fontStyle&&t.fontWeight&&t.fontVariant&&t.textAlign&&t.textBaseline&&!$n(t.lineWidth)},e.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,u=t.dx,c=t.dy,l=((null==e||null===(n=e.ownerDocument)||void 0===n||null===(r=n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var h=this.textService.measureText(i,t,l);t.metrics=h;var f=[h.width/2,h.height/2,0],d=[0,1],p=0;"center"===o?(p=a/2,d=[.5,1]):"right"!==o&&"end"!==o||(p=a,d=[1,1]);var v=0;return"middle"===s?v=f[1]:"top"===s||"hanging"===s?v=2*f[1]:"alphabetic"===s?v=h.lineHeight-h.fontProperties.ascent:"bottom"!==s&&"ideographic"!==s||(v=0),u&&(p+=u),c&&(v+=c),t.anchor=[d[0],d[1],0],{width:2*f[0],height:2*f[1],offsetX:p,offsetY:v}},t}(),t.TextUpdater=dn([ct({token:{token:Ss,named:t.Shape.TEXT}}),pn(0,lt(t.TextService))],t.TextUpdater);var Ms=t.Syringe.defineToken("",{multiple:!1}),As=function(){function e(){this.registry={},this.define(t.Shape.CIRCLE,ru),this.define(t.Shape.ELLIPSE,su),this.define(t.Shape.RECT,wu),this.define(t.Shape.IMAGE,du),this.define(t.Shape.LINE,vu),this.define(t.Shape.GROUP,cu),this.define(t.Shape.PATH,gu),this.define(t.Shape.POLYGON,bu),this.define(t.Shape.POLYLINE,Eu),this.define(t.Shape.TEXT,ku),this.define(t.Shape.HTML,hu)}var n=e.prototype;return n.define=function(t,e){this.registry[t]=e},n.get=function(t){return this.registry[t]},e}(),Cs=function(){function t(e){this.type=void 0,this.eventPhase=t.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Ba,this.page=new Ba,this.canvas=new Ba,this.viewport=new Ba,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}var e=t.prototype;return e.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},e.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},e.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},e.stopPropagation=function(){this.propagationStopped=!0},e.initEvent=function(){},e.initUIEvent=function(){},e.clone=function(){throw new Error(No)},ci(t,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),t}(),Os=function(t){function e(e,n){var r;return(r=t.call(this,null)||this).type=e,r.detail=n,Object.assign(pi(r),n),r}return hi(e,t),e}(Cs),Is=function(){function t(){this.emitter=new jr.EventEmitter}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r=ir(n)&&n||tr(n)&&n.capture,i=tr(n)&&n.once,o=Ai(e)?void 0:e,a=!1,s="";if(t.indexOf(":")>-1){var u=t.split(":");t=u[1],s=u[0],a=!0}if(t=r?t+"capture":t,e=Ai(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];(null===(t=n[0].target)||void 0===t?void 0:t.name)===s&&c.apply(void 0,n)}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,i=ir(n)&&n||tr(n)&&n.capture,o=Ai(e)?void 0:e;return t=i?t+"capture":t,e=Ai(e)?e:null===(r=e)||void 0===r?void 0:r.handleEvent,this.emitter.off(t,e,o),this},e.emit=function(t,e){this.dispatchEvent(new Os(t,e))},e.dispatchEvent=function(t){if(!(t instanceof Cs))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e;if(this.document)e=this;else if(this.defaultView)e=this.defaultView;else{var n;e=null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView}if(e){var r;if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],t.target=this,null===(r=t.manager)||void 0===r||r.dispatchEvent(t)}return!t.defaultPrevented},t}(),Rs=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}hi(n,e),n.isNode=function(t){return!!t.childNodes};var r=n.prototype;return r.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},r.hasChildNodes=function(){return this.childNodes.length>0},r.isDefaultNamespace=function(t){throw new Error(No)},r.lookupNamespaceURI=function(t){throw new Error(No)},r.lookupPrefix=function(t){throw new Error(No)},r.normalize=function(){throw new Error(No)},r.isEqualNode=function(t){return this===t},r.isSameNode=function(t){return this.isEqualNode(t)},r.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof n))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=t,r=this,i=[e],o=[r];null!==(a=e.parentNode)&&void 0!==a?a:r.parentNode;){var a;e=e.parentNode?(i.push(e.parentNode),e.parentNode):e,r=r.parentNode?(o.push(r.parentNode),r.parentNode):r}if(e!==r)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var s=i.length>o.length?i:o,u=s===i?o:i;if(s[s.length-u.length]===u[0])return s===i?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],f=s[c+l];if(f!==h){var d=h.parentNode.childNodes;return d.indexOf(h)<d.indexOf(f)?u===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:s===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING},r.contain=function(t){return this.contains(t)},r.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},r.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},r.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},ci(n,[{key:"textContent",get:function(){var e="";this.nodeName===t.Shape.TEXT&&(e+=this.style.text);for(var n,r=yi(this.childNodes);!(n=r()).done;){var i=n.value;e+=i.nodeName===t.Shape.TEXT?i.nodeValue:i.textContent}return e},set:function(e){var n=this;this.childNodes.slice().forEach((function(t){n.removeChild(t)})),this.nodeName===t.Shape.TEXT&&(this.style.text=""+e)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}}]),n}(Is);Rs.DOCUMENT_POSITION_DISCONNECTED=1,Rs.DOCUMENT_POSITION_PRECEDING=2,Rs.DOCUMENT_POSITION_FOLLOWING=4,Rs.DOCUMENT_POSITION_CONTAINS=8,Rs.DOCUMENT_POSITION_CONTAINED_BY=16,Rs.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var Ls,Ds=function(e){function n(){var n;(n=e.call(this)||this).defaultView=null,n.documentElement=void 0,n.timeline=void 0,n.ownerDocument=null,n.nodeName="document";try{n.timeline=Lt.get(qo),n.timeline.attach(pi(n))}catch(t){}var r={};return oc.forEach((function(e){var n=e.d;e.inh&&n&&(r[e.n]=Ai(n)?n(t.Shape.GROUP):n)})),n.documentElement=new cu({id:"g-root",style:r}),n.documentElement.ownerDocument=pi(n),n.documentElement.parentNode=pi(n),n.childNodes=[n.documentElement],n}hi(n,e);var r=n.prototype;return r.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?ku:cu);var r=new n(e);return r.ownerDocument=this,r},r.createElementNS=function(t,e,n){return this.createElement(e,n)},r.cloneNode=function(t){throw new Error(No)},r.destroy=function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}},r.elementsFromBBox=function(e,n,r,i){var o=this.defaultView.getRBushRoot().search({minX:e,minY:n,maxX:r,maxY:i}),a=Lt.get(t.DisplayObjectPool),s=[];return o.forEach((function(t){var e=a.getByEntity(t.id),n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&s.push(e)})),s.sort((function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder})),s},r.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig();if(0>r||0>i||r>o.width||i>o.height)return null;var a=this.defaultView.viewport2Client({x:r,y:i}),s=a.x,u=a.y,c=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:s,clientY:u},picked:[]}).picked;return c&&c[0]||this.documentElement},r.elementFromPoint=function(){var t=si(oi().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",null);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return t.abrupt("return",(f=t.sent.picked)&&f[0]||this.documentElement);case 10:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig();if(0>r||0>i||r>o.width||i>o.height)return[];var a=this.defaultView.viewport2Client({x:r,y:i}),s=a.x,u=a.y,c=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:s,clientY:u},picked:[]}).picked;return c[c.length-1]!==this.documentElement&&c.push(this.documentElement),c},r.elementsFromPoint=function(){var t=si(oi().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",[]);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return(f=t.sent.picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),t.abrupt("return",f);case 11:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.appendChild=function(t,e){throw new Error(Po)},r.insertBefore=function(t,e){throw new Error(Po)},r.removeChild=function(t,e){throw new Error(Po)},r.replaceChild=function(t,e,n){throw new Error(Po)},r.append=function(){throw new Error(Po)},r.prepend=function(){throw new Error(Po)},r.getElementById=function(t){return this.documentElement.getElementById(t)},r.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},r.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},r.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},r.querySelector=function(t){return this.documentElement.querySelector(t)},r.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},r.find=function(t){return this.documentElement.find(t)},r.findAll=function(t){return this.documentElement.findAll(t)},ci(n,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),n}(Rs);(Ls=t.Strategy||(t.Strategy={}))[Ls.Standard=0]="Standard";var Fs,Bs=t.Syringe.defineToken(""),Gs=t.Syringe.defineToken("");(Fs=t.ElementEvent||(t.ElementEvent={})).DESTROY="destroy",Fs.ATTR_MODIFIED="DOMAttrModified",Fs.INSERTED="DOMNodeInserted",Fs.CHILD_INSERTED="child-inserted",Fs.REMOVED="removed",Fs.CHILD_REMOVED="child-removed",Fs.MOUNTED="DOMNodeInsertedIntoDocument",Fs.UNMOUNTED="DOMNodeRemovedFromDocument",Fs.BOUNDS_CHANGED="bounds-changed",Fs.RENDER_ORDER_CHANGED="render-order-changed",Fs.CULLED="culled";var Us=function(t){function e(e,n,r,i,o,a,s,u){var c;return(c=t.call(this,null)||this).relatedNode=void 0,c.prevValue=void 0,c.newValue=void 0,c.attrName=void 0,c.attrChange=void 0,c.prevParsedValue=void 0,c.newParsedValue=void 0,c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return hi(e,t),e}(Cs);Us.ADDITION=2,Us.MODIFICATION=1,Us.REMOVAL=3;var js,Vs=0,Hs=new Os(t.ElementEvent.CHILD_INSERTED,{child:null}),zs=new Us(t.ElementEvent.INSERTED,null,"","","",0,"",""),Ws=new Us(t.ElementEvent.REMOVED,null,"","","",0,"",""),Ys=new Os(t.ElementEvent.DESTROY),qs=new Os(t.ElementEvent.CHILD_REMOVED,{child:null}),Xs=function(e){function n(){for(var n,r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];return(n=e.call.apply(e,[this].concat(i))||this).sceneGraphService=Lt.get(Gs),n.entity=Vs++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},n.cullable={strategy:t.Strategy.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},n.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:Ce(0,0,0),localRotation:an(0,0,0,1),localScale:Ce(1,1,1),localTransform:ie(),localSkew:ln(0,0),position:Ce(0,0,0),rotation:an(0,0,0,1),scaling:Ce(1,1,1),worldTransform:ie(),origin:Ce(0,0,0)},n.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},n.geometry={contentBounds:void 0,renderBounds:void 0},n.rBushNode={aabb:void 0},n.id=void 0,n.name=void 0,n.namespaceURI="g",n.scrollLeft=0,n.scrollTop=0,n.clientTop=0,n.clientLeft=0,n.destroyed=!1,n.style={},n.computedStyle={anchor:lo,opacity:lo,fillOpacity:lo,strokeOpacity:lo,fill:lo,stroke:lo,transform:lo,transformOrigin:lo,visibility:lo,pointerEvents:lo,lineWidth:lo,lineCap:lo,lineJoin:lo,increasedLineWidthForHitTesting:lo,fontSize:lo,fontFamily:lo,fontStyle:lo,fontWeight:lo,fontVariant:lo,textAlign:lo,textBaseline:lo,textTransform:lo,zIndex:lo,filter:lo,shadowType:lo},n.parsedStyle={},n.attributes={},n}hi(n,e),n.isElement=function(t){return!!t.getAttribute};var r=n.prototype;return r.cloneNode=function(t){throw new Error(No)},r.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),Hs.detail.child=t,this.dispatchEvent(Hs),zs.relatedNode=this,t.dispatchEvent(zs),t},r.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},r.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},r.removeChild=function(t){return Ws.relatedNode=this,t.dispatchEvent(Ws),qs.detail.child=t,this.dispatchEvent(qs),this.sceneGraphService.detach(t),t},r.removeChildren=function(){var t=this;this.childNodes.slice().forEach((function(e){t.removeChild(e),e.destroy()}))},r.matches=function(t){return this.sceneGraphService.matches(t,this)},r.getElementById=function(t){return this.sceneGraphService.querySelector("#"+t,this)},r.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},r.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll("."+t,this)},r.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},r.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},r.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},r.closest=function(t){var e=this;do{if(this.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},r.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},r.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},r.after=function(){var t=this;if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];r.forEach((function(n,r){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(n,e+r+1)}))}},r.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},r.replaceWith=function(){this.after.apply(this,arguments),this.remove()},r.append=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e){return t.appendChild(e)}))},r.prepend=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e,n){return t.appendChild(e,n)}))},r.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},r.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},r.destroy=function(){this.dispatchEvent(Ys),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},r.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},r.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},r.getBounds=function(){return this.sceneGraphService.getBounds(this)},r.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},r.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},r.getClientRects=function(){return[this.getBoundingClientRect()]},r.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},r.getAttributeNames=function(){return Object.keys(this.attributes)},r.getAttribute=function(t){var e=this.attributes[t];if(void 0===e){var n=Li(t.toString(),"");e=this.attributes[n[0]]}return $n(e)?null:e},r.hasAttribute=function(t){return this.getAttributeNames().includes(t)},r.hasAttributes=function(){return!!this.getAttributeNames().length},r.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},r.setAttribute=function(t,e,n){this.attributes[t]=e},r.getAttributeNS=function(t,e){throw new Error(No)},r.getAttributeNode=function(t){throw new Error(No)},r.getAttributeNodeNS=function(t,e){throw new Error(No)},r.hasAttributeNS=function(t,e){throw new Error(No)},r.removeAttributeNS=function(t,e){throw new Error(No)},r.removeAttributeNode=function(t){throw new Error(No)},r.setAttributeNS=function(t,e,n){throw new Error(No)},r.setAttributeNode=function(t){throw new Error(No)},r.setAttributeNodeNS=function(t){throw new Error(No)},r.toggleAttribute=function(t,e){throw new Error(No)},ci(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter((function(t){return""!==t}))}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}}]),n}(Rs),Ks=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).altKey=void 0,e.button=void 0,e.buttons=void 0,e.ctrlKey=void 0,e.metaKey=void 0,e.relatedTarget=void 0,e.shiftKey=void 0,e.client=new Ba,e.movement=new Ba,e.offset=new Ba,e.global=new Ba,e.screen=new Ba,e}hi(e,t);var n=e.prototype;return n.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},n.initMouseEvent=function(){throw new Error(No)},ci(e,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),e}(Cs),Zs=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).pointerId=void 0,e.width=0,e.height=0,e.isPrimary=!1,e.pointerType=void 0,e.pressure=void 0,e.tangentialPressure=void 0,e.tiltX=void 0,e.tiltY=void 0,e.twist=void 0,e}hi(e,t);var n=e.prototype;return n.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},n.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},n.clone=function(){return this.manager.clonePointerEvent(this)},e}(Ks),Js=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).deltaMode=void 0,e.deltaX=void 0,e.deltaY=void 0,e.deltaZ=void 0,e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return hi(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(Ks),Qs={},$s=[];t.DisplayObjectPool=function(){function e(){}var n=e.prototype;return n.getByEntity=function(t){return Qs[t]},n.getAll=function(){return Object.keys(Qs).map((function(t){return Qs[t]}))},n.add=function(e,n){Qs[e]=n,n.nodeName===t.Shape.HTML&&$s.push(n)},n.remove=function(e){var n=Qs[e];if(n&&(delete Qs[e],n.nodeName===t.Shape.HTML)){var r=$s.indexOf(n);$s.splice(r,1)}},n.getHTMLs=function(){return $s},e}(),t.DisplayObjectPool=dn([ct()],t.DisplayObjectPool);var tu,eu=function(e){function n(n){var r,i;return(i=e.call(this)||this).config=void 0,i.isCustomElement=!1,i.activeAnimations=[],i.displayObjectPool=Lt.get(t.DisplayObjectPool),i.styleValueRegistry=Lt.get(oo),i.config=n,i.config.interactive=null!==(r=i.config.capture)&&void 0!==r?r:i.config.interactive,i.id=i.config.id||"",i.name=i.config.name||"",(i.config.className||i.config.class)&&(i.className=i.config.className||i.config.class),i.nodeName=i.config.type||t.Shape.GROUP,i.config.style=li({},i.config.style,i.config.attrs),null!=i.config.visible&&(i.config.style.visibility=!1===i.config.visible?"hidden":"visible"),null!=i.config.interactive&&(i.config.style.pointerEvents=!1===i.config.interactive?"none":"auto"),Object.assign(i.parsedStyle,{anchor:[0,0],fill:yo,stroke:yo,transform:[],zIndex:0,filter:[],shadowType:"outer"},i.config.initialParsedStyle),Object.assign(i.attributes,{anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""}),i.initAttributes(i.config.style),i.style=new Proxy({setProperty:function(t,e){i.setAttribute(t,e)},getPropertyValue:function(t){return i.getAttribute(t)},removeProperty:function(t){i.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:i.getAttribute(e)},set:function(t,e,n){return i.setAttribute(e,n),!0}}),i.displayObjectPool.add(i.entity,pi(i)),i}hi(n,e);var r=n.prototype;return r.destroy=function(){e.prototype.destroy.call(this),this.displayObjectPool.remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},r.cloneNode=function(t,e){var r=li({},this.attributes);for(var i in r){var o=r[i];o instanceof n&&(r[i]=o.cloneNode(t)),e&&(r[i]=e(i,o))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach((function(e){if(!e.style.isMarker){var n=e.cloneNode(t);a.appendChild(n)}})),a},r.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t,{forceUpdateGeometry:!0,usedAttributes:["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]}),e.dirty=!0},r.setAttribute=function(t,n,r){void 0===r&&(r=!1);var i=Li(t,n),o=i[0],a=i[1];or(n)||(r||a!==this.attributes[o])&&(this.internalSetAttribute(o,a),e.prototype.setAttribute.call(this,o,a))},r.internalSetAttribute=function(e,n,r){var i,o=this;void 0===r&&(r={});var a=this.renderable,s=this.attributes[e],u=this.parsedStyle[e];this.styleValueRegistry.processProperties(this,((i={})[e]=n,i),r),this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&this.parsedStyle.clipPathTargets.forEach((function(e){o.sceneGraphService.dirtifyToRoot(e),e.dispatchEvent(new Us(t.ElementEvent.ATTR_MODIFIED,e,o,o,"clipPath",Us.MODIFICATION,o,o)),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback("clipPath",o,o)})),a.dirty=!0;var c=this.parsedStyle[e];this.isConnected&&(js||(js=new Us(t.ElementEvent.ATTR_MODIFIED,null,null,null,null,Us.MODIFICATION,null,null)),js.relatedNode=this,js.prevValue=s,js.newValue=n,js.attrName=e,js.prevParsedValue=u,js.newParsedValue=c,this.dispatchEvent(js)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(e,s,n,u,c)},r.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],r=e[1],i=t.getMax();return new Ga(n,r,i[0]-n,i[1]-r)},r.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,Oo(t,e,n)),this},r.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},r.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,Oo(t,e,n)),this},r.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,Oo(t,e,n)),this},r.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,Oo(t,e,n)),this},r.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,Oo(t,e,n)),this},r.getPosition=function(){return this.sceneGraphService.getPosition(this)},r.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},r.scale=function(t,e,n){return this.scaleLocal(t,e,n)},r.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Oo(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},r.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Oo(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},r.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},r.getScale=function(){return this.sceneGraphService.getScale(this)},r.getEulerAngles=function(){var t=Do(Me(),this.sceneGraphService.getWorldTransform(this));return Ro(t[2])},r.getLocalEulerAngles=function(){var t=Do(Me(),this.sceneGraphService.getLocalRotation(this));return Ro(t[2])},r.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},r.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},r.rotateLocal=function(t,e,n){return $n(e)&&$n(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},r.rotate=function(t,e,n){return $n(e)&&$n(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},r.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},r.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},r.setLocalSkew=function(t,e){return this.sceneGraphService.setLocalSkew(this,t,e),this},r.getRotation=function(){return this.sceneGraphService.getRotation(this)},r.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},r.getLocalSkew=function(){return this.sceneGraphService.getLocalSkew(this)},r.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},r.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},r.setLocalTransform=function(t){return this.sceneGraphService.setLocalTransform(this,t),this},r.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},r.getAnimations=function(){return this.activeAnimations},r.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&(i=null===(r=this.parsedStyle.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return i?i.play(this,t,e):null},r.isVisible=function(){var t;return"visible"===(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)},r.isInteractive=function(){var t;return"none"!==(null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)},r.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},r.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))+1),this},r.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))-1),this},r.getConfig=function(){return this.config},r.attr=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n[1];return i?tr(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},r.getMatrix=function(t){var e=t||this.getWorldTransform(),n=me(Me(),e),r=n[0],i=n[1],o=be(Me(),e),a=o[0],s=o[1],u=Te(qe(),e),c=Do(Me(),u);return Fo(c[0]||c[2],r,i,a,s)},r.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},r.setMatrix=function(t){var e=Bo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setEulerAngles(e[4]).setPosition(n,r).setLocalScale(i,o)},r.setLocalMatrix=function(t){var e=Bo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setLocalEulerAngles(e[4]).setLocalPosition(n,r).setLocalScale(i,o)},r.show=function(){this.style.visibility="visible"},r.hide=function(){this.style.visibility="hidden"},ci(n,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),n}(Xs),nu=["style"],ru=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,nu);return e.call(this,li({type:t.Shape.CIRCLE,style:li({cx:"",cy:"",r:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return hi(n,e),n}(eu),iu=["style"],ou=function(t){function e(e){var n,r=void 0===e?{}:e,i=r.style,o=di(r,iu);return(n=t.call(this,li({style:li({x:"",y:""},i)},o))||this).isCustomElement=!0,n}return hi(e,t),e}(eu),au=["style"],su=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,au);return e.call(this,li({type:t.Shape.ELLIPSE,style:li({cx:"",cy:"",rx:"",ry:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return hi(n,e),n}(eu),uu=["style"],cu=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,uu);return e.call(this,li({type:t.Shape.GROUP,style:li({x:"",y:"",width:"",height:""},i)},o))||this}return hi(n,e),n}(eu),lu=["style"],hu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,lu);return(r=e.call(this,li({type:t.Shape.HTML,style:li({x:"",y:"",width:"auto",height:"auto",innerHTML:""},o)},a))||this).cullable.enable=!1,r}hi(n,e);var r=n.prototype;return r.getDomElement=function(){return this.parsedStyle.$el},r.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},r.getClientRects=function(){return[this.getBoundingClientRect()]},r.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(t=this.ownerDocument)||void 0===t||null===(e=t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,a=new La;return a.setMinMax(Ce(i,o,0),Ce(i+n.width,o+n.height,0)),a}return null},r.getLocalBounds=function(){if(this.parentNode){var t=ce(ie(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!La.isEmpty(e)){var n=new La;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},n}(eu),fu=["style"],du=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,fu);return e.call(this,li({type:t.Shape.IMAGE,style:li({x:"",y:"",img:"",width:"",height:""},i)},o))||this}return hi(n,e),n}(eu),pu=["style"],vu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,pu);(r=e.call(this,li({type:t.Shape.LINE,style:li({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0;var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd;return u&&u instanceof eu&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),c&&c instanceof eu&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}hi(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof eu&&(this.markerStartAngle=0,r.remove()),i&&i instanceof eu&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof eu&&(this.markerEndAngle=0,r.remove()),i&&i instanceof eu&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},r.transformMarker=function(t){var e=this.parsedStyle,n=e.x1,r=e.x2,i=e.y1,o=e.y2,a=e.defX,s=e.defY,u=t?e.markerStart:e.markerEnd;if(u&&u instanceof eu){var c,l,h,f,d,p,v;t?(f=n-a,d=i-s,l=r-n,h=o-i,p=e.markerStartOffset||0,v=this.markerStartAngle):(f=r-a,d=o-s,l=n-r,h=i-o,p=e.markerEndOffset||0,v=this.markerEndAngle),c=Math.atan2(h,l),u.setLocalEulerAngles(180*c/Math.PI+v),u.setLocalPosition(f+Math.cos(c)*p,d+Math.sin(c)*p)}},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=Gr.pointAt(e.x1,e.y1,e.x2,e.y2,t),o=i.x,a=i.y,s=Ue(Me(),Ce(o-n,a-r,0),this.getLocalTransform());return new Ba(s[0],s[1])},r.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},r.getTotalLength=function(){var t=this.parsedStyle;return Gr.length(t.x1,t.y1,t.x2,t.y2)},n}(eu),yu=["style"],gu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,yu);(r=e.call(this,li({type:t.Shape.PATH,style:li({path:"",miterLimit:""},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof eu&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof eu&&r.placeMarkerMid(l),c&&c instanceof eu&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}hi(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof eu&&(this.markerStartAngle=0,r.remove()),i&&i instanceof eu&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof eu&&(this.markerEndAngle=0,r.remove()),i&&i instanceof eu&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.markerStartOffset,r=e.markerEndOffset,i=e.defX,o=e.defY,a=t?e.markerStart:e.markerEnd;if(a&&a instanceof eu){var s,u,c,l,h,f,d;if(t){var p=this.getStartTangent(),v=p[0],y=p[1];l=y[0]-i,h=y[1]-o,u=v[0]-y[0],c=v[1]-y[1],f=n||0,d=this.markerStartAngle}else{var g=this.getEndTangent(),m=g[0],b=g[1];l=b[0]-i,h=b[1]-o,u=m[0]-b[0],c=m[1]-b[1],f=r||0,d=this.markerEndAngle}s=Math.atan2(c,u),a.setLocalEulerAngles(180*s/Math.PI+d),a.setLocalPosition(l+Math.cos(s)*f,h+Math.sin(s)*f)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),t&&t instanceof eu)for(var o=1;n.length-1>o;o++){var a=n[o].currentPoint,s=a[0],u=a[1],c=1===o?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s-r,u-i)}},r.getTotalLength=function(){return Ko(this)},r.getPointAtLength=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=function(t,e,n){return qn(t,e,fn(fn({},n),{bbox:!1,length:!0})).point}(e.path.absolutePath,t),o=i.x,a=i.y,s=Ue(Me(),Ce(o-n,a-r,0),this.getLocalTransform());return new Ba(s[0],s[1])},r.getPoint=function(t){return this.getPointAtLength(t*Ko(this))},r.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},r.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},n}(eu),mu=["style"],bu=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=di(i,mu);(r=e.call(this,li({type:t.Shape.POLYGON,style:li({points:"",miterLimit:"",isClosed:!0},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof eu&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof eu&&r.placeMarkerMid(l),c&&c instanceof eu&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}hi(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof eu&&(this.markerStartAngle=0,r.remove()),i&&i instanceof eu&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof eu&&(this.markerEndAngle=0,r.remove()),i&&i instanceof eu&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY,o=t?e.markerStart:e.markerEnd;if(o&&o instanceof eu){var a,s,u,c,l,h,f;if(c=n[0][0]-r,l=n[0][1]-i,t)s=n[1][0]-n[0][0],u=n[1][1]-n[0][1],h=e.markerStartOffset||0,f=this.markerStartAngle;else{var d=n.length;this.style.isClosed?(s=n[d-1][0]-n[0][0],u=n[d-1][1]-n[0][1]):(c=n[d-1][0]-r,l=n[d-1][1]-i,s=n[d-2][0]-n[d-1][0],u=n[d-2][1]-n[d-1][1]),h=e.markerEndOffset||0,f=this.markerEndAngle}a=Math.atan2(u,s),o.setLocalEulerAngles(180*a/Math.PI+f),o.setLocalPosition(c+Math.cos(a)*h,l+Math.sin(a)*h)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),this.markerMidList=[],t&&t instanceof eu)for(var o=1;(this.style.isClosed?n.length:n.length-1)>o;o++){var a=n[o][0]-r,s=n[o][1]-i,u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(a,s)}},n}(eu),Tu=["style"],Eu=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,Tu);return e.call(this,li({type:t.Shape.POLYLINE,style:li({points:"",miterLimit:"",isClosed:!1},i)},o))||this}hi(n,e);var r=n.prototype;return r.getTotalLength=function(){return this.parsedStyle.points.totalLength},r.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=e.points,o=i.points,a=0,s=0;i.segments.forEach((function(e,n){e[0]>t||t>e[1]||(a=(t-e[0])/(e[1]-e[0]),s=n)}));var u=Gr.pointAt(o[s][0],o[s][1],o[s+1][0],o[s+1][1],a),c=u.x,l=u.y,h=Ue(Me(),Ce(c-n,l-r,0),this.getLocalTransform());return new Ba(h[0],h[1])},r.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},r.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},n}(bu),xu=["style"],wu=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,xu);return e.call(this,li({type:t.Shape.RECT,style:li({x:"",y:"",width:"",height:"",radius:""},i)},o))||this}return hi(n,e),n}(eu),Su=["style"],ku=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=di(r,Su);return e.call(this,li({type:t.Shape.TEXT,style:li({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},i)},o))||this}hi(n,e);var r=n.prototype;return r.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},r.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},r.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},n}(eu);(tu=t.RenderReason||(t.RenderReason={}))[tu.CAMERA_CHANGED=0]="CAMERA_CHANGED",tu[tu.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",tu[tu.NONE=2]="NONE";var Nu=t.Syringe.defineToken("");t.EventService=function(){function t(t,e,n,r){var i=this;this.renderingContext=void 0,this.contextService=void 0,this.canvasConfig=void 0,this.displayObjectPool=void 0,this.rootTarget=void 0,this.emitter=new jr.EventEmitter,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ie(),this.tmpVec3=Me(),this.onPointerDown=function(){var t=si(oi().mark((function t(e){var n;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,i.createPointerEvent(e);case 4:i.dispatchEvent(n=t.sent,"pointerdown"),"touch"===n.pointerType?i.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||i.dispatchEvent(n,2===n.button?"rightdown":"mousedown"),i.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),i.freeEvent(n);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerUp=function(){var t=si(oi().mark((function t(e){var n,r,o,a,s,u,c,l,h;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,i.createPointerEvent(e);case 5:if(i.dispatchEvent(r=t.sent,"pointerup"),"touch"===r.pointerType?i.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||i.dispatchEvent(r,2===r.button?"rightup":"mouseup"),o=i.trackingData(e.pointerId),a=i.findMountedTarget(o.pressTargetsByButton[e.button]),s=a,a&&!r.composedPath().includes(a)){for(u=a;u&&!r.composedPath().includes(u);)r.currentTarget=u,i.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?i.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||i.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),Rs.isNode(u)&&(u=u.parentNode);delete o.pressTargetsByButton[e.button],s=u}s&&((l=i.clonePointerEvent(r,"click")).target=s,l.path=[],o.clicksByButton[e.button]||(o.clicksByButton[e.button]={clickCount:0,target:l.target,timeStamp:n}),(h=o.clicksByButton[e.button]).target===l.target&&200>n-h.timeStamp?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=n,l.detail=h.clickCount,(null===(c=r.detail)||void 0===c?void 0:c.preventClick)||("mouse"!==l.pointerType&&"touch"!==l.pointerType||i.dispatchEvent(l,"click"),i.dispatchEvent(l,"pointertap")),i.freeEvent(l)),i.freeEvent(r);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerMove=function(){var t=si(oi().mark((function t(e){var n,r,o,a,s,u,c,l,h,f;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,i.createPointerEvent(e);case 4:if(r="mouse"===(n=t.sent).pointerType||"pen"===n.pointerType,o=i.trackingData(e.pointerId),a=i.findMountedTarget(o.overTargets),!o.overTargets||a===n.target){t.next=23;break}return s="mousemove"===e.type?"mouseout":"pointerout",t.next=12,i.createPointerEvent(e,s,a||void 0);case 12:if(i.dispatchEvent(u=t.sent,"pointerout"),r&&i.dispatchEvent(u,"mouseout"),n.composedPath().includes(a)){t.next=22;break}return t.next=18,i.createPointerEvent(e,"pointerleave",a||void 0);case 18:for((c=t.sent).eventPhase=c.AT_TARGET;c.target&&!n.composedPath().includes(c.target);)c.currentTarget=c.target,i.notifyTarget(c),r&&i.notifyTarget(c,"mouseleave"),Rs.isNode(c.target)&&(c.target=c.target.parentNode);i.freeEvent(c);case 22:i.freeEvent(u);case 23:if(a===n.target){t.next=38;break}l=i.clonePointerEvent(n,"mousemove"===e.type?"mouseover":"pointerover"),i.dispatchEvent(l,"pointerover"),r&&i.dispatchEvent(l,"mouseover"),h=a&&Rs.isNode(a)&&a.parentNode;case 29:if(!h||h===(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode)){t.next=35;break}if(h!==n.target){t.next=32;break}return t.abrupt("break",35);case 32:h=h.parentNode,t.next=29;break;case 35:if(!h||h===(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode)){for((f=i.clonePointerEvent(n,"pointerenter")).eventPhase=f.AT_TARGET;f.target&&f.target!==a&&f.target!==(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode);)f.currentTarget=f.target,i.notifyTarget(f),r&&i.notifyTarget(f,"mouseenter"),Rs.isNode(f.target)&&(f.target=f.target.parentNode);i.freeEvent(f)}i.freeEvent(l);case 38:i.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&i.dispatchEvent(n,"touchmove"),r&&(i.dispatchEvent(n,"mousemove"),i.cursor=i.getCursor(n.target)),o.overTargets=n.composedPath(),i.freeEvent(n);case 43:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerOut=function(){var t=si(oi().mark((function t(e){var n,r,o,a,s;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:if(!(n=i.trackingData(e.pointerId)).overTargets){t.next=19;break}return r="mouse"===e.pointerType||"pen"===e.pointerType,o=i.findMountedTarget(n.overTargets),t.next=8,i.createPointerEvent(e,"pointerout",o||void 0);case 8:return i.dispatchEvent(a=t.sent),r&&i.dispatchEvent(a,"mouseout"),t.next=13,i.createPointerEvent(e,"pointerleave",o||void 0);case 13:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&s.target!==(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode);)s.currentTarget=s.target,i.notifyTarget(s),r&&i.notifyTarget(s,"mouseleave"),Rs.isNode(s.target)&&(s.target=s.target.parentNode);n.overTargets=null,i.freeEvent(a),i.freeEvent(s);case 19:i.cursor=null;case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerOver=function(){var t=si(oi().mark((function t(e){var n,r,o,a;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return n=i.trackingData(e.pointerId),t.next=5,i.createPointerEvent(e);case 5:for(o="mouse"===(r=t.sent).pointerType||"pen"===r.pointerType,i.dispatchEvent(r,"pointerover"),o&&i.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(i.cursor=i.getCursor(r.target)),(a=i.clonePointerEvent(r,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(Rs.isNode(i.rootTarget)&&i.rootTarget.parentNode);)a.currentTarget=a.target,i.notifyTarget(a),o&&i.notifyTarget(a,"mouseenter"),Rs.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=r.composedPath(),i.freeEvent(r),i.freeEvent(a);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var t=si(oi().mark((function t(e){var n,r,o,a;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Zs){t.next=2;break}return t.abrupt("return");case 2:return n=i.trackingData(e.pointerId),r=i.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,i.createPointerEvent(e);case 6:if(o=t.sent,r){for(a=r;a;)o.currentTarget=a,i.notifyTarget(o,"pointerupoutside"),"touch"===o.pointerType||"mouse"!==o.pointerType&&"pen"!==o.pointerType||i.notifyTarget(o,2===o.button?"rightupoutside":"mouseupoutside"),Rs.isNode(a)&&(a=a.parentNode);delete n.pressTargetsByButton[e.button]}i.freeEvent(o);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onWheel=function(){var t=si(oi().mark((function t(e){var n;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Js){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,i.createWheelEvent(e);case 4:i.dispatchEvent(n=t.sent),i.freeEvent(n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.renderingContext=t,this.contextService=e,this.canvasConfig=n,this.displayObjectPool=r}var e=t.prototype;return e.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Ba(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Ba(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,o=i.width,a=i.height,s=r.getPerspectiveInverse(),u=r.getWorldTransform(),c=he(this.tmpMatrix,u,s),l=Ie(this.tmpVec3,e/o*2-1,2*(1-n/a)-1,0);return Ue(l,l,c),new Ba(l[0],l[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=he(this.tmpMatrix,n,r),o=Ie(this.tmpVec3,t.x,t.y,0);Ue(this.tmpVec3,this.tmpVec3,i);var a=this.canvasConfig;return new Ba((o[0]+1)/2*a.width,(1-(o[1]+1)/2)*a.height)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;r>n;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;n.length>o;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;2048>r&&t!==this.rootTarget;r++)Rs.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.hitTest=function(){var t=si(oi().mark((function t(e){var n,r,i,o,a;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.viewportY,o=(i=this.canvasConfig).width,a=i.height,!(0>(n=e.viewportX)||0>r||n>o||r>a)){t.next=4;break}return t.abrupt("return",null);case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e,n=yi(this.displayObjectPool.getHTMLs());!(e=n()).done;){var r=e.value;if(t.nativeEvent.composedPath().indexOf(r)>-1)return r}return null},e.pickTarget=function(){var t=si(oi().mark((function t(e){return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.createPointerEvent=function(){var t=si(oi().mark((function t(e,n,r){var i,o;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.allocateEvent(Zs),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r){t.next=11;break}t.t0=r,t.next=20;break;case 11:if(t.t1=o,t.t1){t.next=19;break}if(t.t2=this.isNativeEventFromCanvas(i),!t.t2){t.next=18;break}return t.next=17,this.pickTarget(i);case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),e.createWheelEvent=function(){var t=si(oi().mark((function t(e){var n,r;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Js),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0){t.next=15;break}if(t.t1=this.isNativeEventFromCanvas(n),!t.t1){t.next=14;break}return t.next=13,this.pickTarget(n);case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(Js);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=e.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(Zs);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof Zs&&e instanceof Zs&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof Ks&&e instanceof Ks&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){var n;e=null!==(n=e)&&void 0!==n?n:t.type,this.notifyListeners(t,t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;r.length>i&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||Rs.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Xs.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Rs.isNode(e)&&e.parentNode}},t}(),t.EventService=dn([ct(),pn(0,lt(Nu)),pn(1,lt(Ms)),pn(2,lt(Yo)),pn(3,lt(t.DisplayObjectPool))],t.EventService);var Pu,_u,Mu,Au=t.Syringe.defineToken(""),Cu=t.Syringe.defineToken("",{multiple:!1});(Pu=t.CameraType||(t.CameraType={}))[Pu.ORBITING=0]="ORBITING",Pu[Pu.EXPLORING=1]="EXPLORING",Pu[Pu.TRACKING=2]="TRACKING",(_u=t.CameraTrackingMode||(t.CameraTrackingMode={}))[_u.DEFAULT=0]="DEFAULT",_u[_u.ROTATIONAL=1]="ROTATIONAL",_u[_u.TRANSLATIONAL=2]="TRANSLATIONAL",_u[_u.CINEMATIC=3]="CINEMATIC",(Mu=t.CameraProjectionMode||(t.CameraProjectionMode={}))[Mu.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Mu[Mu.PERSPECTIVE=1]="PERSPECTIVE";var Ou={UPDATED:"updated"},Iu=2e-4;t.Camera=function(){function e(){this.canvas=void 0,this.eventEmitter=new jr.EventEmitter,this.matrix=ie(),this.right=Ce(1,0,0),this.up=Ce(0,1,0),this.forward=Ce(0,0,1),this.position=Ce(0,0,1),this.focalPoint=Ce(0,0,0),this.distanceVector=Ce(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ie(),this.projectionMatrixInverse=ie(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=t.CameraType.EXPLORING,this.trackingMode=t.CameraTrackingMode.DEFAULT,this.projectionMode=t.CameraProjectionMode.PERSPECTIVE,this.frustum=new Fa,this.orthoMatrix=ie()}var n=e.prototype;return n.isOrtho=function(){return this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC},n.getProjectionMode=function(){return this.projectionMode},n.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},n.getPerspectiveInverse=function(){return this.projectionMatrixInverse},n.getFrustum=function(){return this.frustum},n.getPosition=function(){return this.position},n.getFocalPoint=function(){return this.focalPoint},n.getDollyingStep=function(){return this.dollyingStep},n.getNear=function(){return this.near},n.getFar=function(){return this.far},n.getZoom=function(){return this.zoom},n.getOrthoMatrix=function(){return this.orthoMatrix},n.getView=function(){return this.view},n.setEnableUpdate=function(t){this.enableUpdate=t},n.setType=function(e,n){return this.type=e,this.setWorldRotation(this.type===t.CameraType.EXPLORING),this._getAngles(),this.type===t.CameraType.TRACKING&&void 0!==n&&this.setTrackingMode(n),this},n.setProjectionMode=function(t){return this.projectionMode=t,this},n.setTrackingMode=function(e){if(this.type!==t.CameraType.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this},n.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},n.getViewTransform=function(){return ce(ie(),this.matrix)},n.getWorldTransform=function(){return this.matrix},n.jitterProjectionMatrix=function(t,e){var n=ye(ie(),[t,e,0]);this.jitteredProjectionMatrix=he(ie(),n,this.projectionMatrix)},n.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},n.setMatrix=function(t){return this.matrix=t,this._update(),this},n.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},n.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},n.setNear=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this},n.setFar=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this},n.setViewOffset=function(e,n,r,i,o,a){return this.aspect=e/n,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},n.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},n.setZoom=function(e){return this.zoom=e,this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===t.CameraProjectionMode.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},n.setPerspective=function(e,n,r,i){var o;this.projectionMode=t.CameraProjectionMode.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var a=this.near*Math.tan(Io(.5*this.fov))/this.zoom,s=2*a,u=this.aspect*s,c=-.5*u;if(null===(o=this.view)||void 0===o?void 0:o.enabled){var l=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/l,a-=this.view.offsetY*s/h,u*=this.view.width/l,s*=this.view.height/h}return function(t,e,n,r,i,o,a){var s=2*o/(r-i),u=(n+e)/(n-e),c=(r+i)/(r-i),l=-(a+o)/(a-o),h=-2*a*o/(a-o);t[0]=2*o/(n-e),t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=l,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0}(this.projectionMatrix,c,c+u,a,a-s,e,this.far),de(this.projectionMatrix,this.projectionMatrix,Ce(1,-1,1)),ce(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},n.setOrthographic=function(e,n,r,i,o,a){var s;this.projectionMode=t.CameraProjectionMode.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=r,this.bottom=i,this.near=o,this.far=a;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=l-u,d=l+u,p=h+c,v=h-c;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(f+=y*this.view.offsetX)+y*this.view.width,v=(p-=g*this.view.offsetY)-g*this.view.height}return ke(this.projectionMatrix,f,d,v,p,o,a),de(this.projectionMatrix,this.projectionMatrix,Ce(1,-1,1)),ce(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},n.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=Oo(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},n.setFocalPoint=function(e,n,r){void 0===n&&(n=this.focalPoint[1]),void 0===r&&(r=this.focalPoint[2]);var i=Ce(0,1,0);if(this.focalPoint=Oo(e,n,r),this.trackingMode===t.CameraTrackingMode.CINEMATIC){var o=Le(Me(),this.focalPoint,this.position);e=o[0],n=o[1],r=o[2];var a=Ae(o),s=Ro(Math.asin(n/a)),u=90+Ro(Math.atan2(r,e)),c=ie();ve(c,c,Io(u)),pe(c,c,Io(s)),i=Ue(Me(),[0,1,0],c)}return ce(this.matrix,Ne(ie(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},n.getDistance=function(){return this.distance},n.getDistanceVector=function(){return this.distanceVector},n.setDistance=function(t){if(this.distance===t||0>t)return this;this.distance=t,Iu>this.distance&&(this.distance=Iu),this.dollyingStep=this.distance/100;var e=Me(),n=this.forward,r=this.focalPoint;return e[0]=(t=this.distance)*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},n.setMaxDistance=function(t){return this.maxDistance=t,this},n.setMinDistance=function(t){return this.minDistance=t,this},n.setAzimuth=function(e){return this.azimuth=Co(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},n.getAzimuth=function(){return this.azimuth},n.setElevation=function(e){return this.elevation=Co(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},n.getElevation=function(){return this.elevation},n.setRoll=function(e){return this.roll=Co(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},n.getRoll=function(){return this.roll},n._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},n.computeMatrix=function(){var e=Xe(qe(),[0,0,1],Io(this.roll));se(this.matrix);var n=Xe(qe(),[1,0,0],Io((this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.elevation)),r=Xe(qe(),[0,1,0],Io((this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.azimuth)),i=Ke(qe(),r,n);i=Ke(qe(),i,e);var o=xe(ie(),i);this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?(fe(this.matrix,this.matrix,this.focalPoint),he(this.matrix,this.matrix,o),fe(this.matrix,this.matrix,[0,0,this.distance])):this.type===t.CameraType.TRACKING&&(fe(this.matrix,this.matrix,this.position),he(this.matrix,this.matrix,o))},n._setPosition=function(t,e,n){this.position=Oo(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},n._getAxes=function(){Oe(this.right,Oo(Ye(We(),[1,0,0,0],this.matrix))),Oe(this.up,Oo(Ye(We(),[0,1,0,0],this.matrix))),Oe(this.forward,Oo(Ye(We(),[0,0,1,0],this.matrix))),Fe(this.right,this.right),Fe(this.up,this.up),Fe(this.forward,this.forward)},n._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=Ae(this.distanceVector);if(0===i)return this.elevation=0,void(this.azimuth=0);this.type===t.CameraType.TRACKING||this.rotateWorld?(this.elevation=Ro(Math.asin(n/i)),this.azimuth=Ro(Math.atan2(-e,-r))):(this.elevation=-Ro(Math.asin(n/i)),this.azimuth=-Ro(Math.atan2(-e,-r)))},n._getPosition=function(){Oe(this.position,Oo(Ye(We(),[0,0,0,1],this.matrix))),this._getDistance()},n._getFocalPoint=function(){var t,e;!function(t,e,n){var r=e[0],i=e[1],o=e[2];t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8]}(this.distanceVector,[0,0,-this.distance],(t=re(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Re(this.focalPoint,this.position,this.distanceVector),this._getDistance()},n._getDistance=function(){this.distanceVector=Le(Me(),this.focalPoint,this.position),this.distance=Ae(this.distanceVector),this.dollyingStep=this.distance/100},n._getOrthoMatrix=function(){if(this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC){var e=this.position,n=Xe(qe(),[0,0,1],-this.roll*Math.PI/180);Ee(this.orthoMatrix,n,Ce((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),Ce(this.zoom,this.zoom,1),e)}},n.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=he(ie(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(Ou.UPDATED)}},n.rotate=function(t,e,n){throw new Error(No)},n.pan=function(t,e){throw new Error(No)},n.dolly=function(t){throw new Error(No)},n.createLandmark=function(t,e){throw new Error(No)},n.gotoLandmark=function(t,e){throw new Error(No)},e}(),t.Camera=dn([ut({token:Cu})],t.Camera);var Ru=t.Syringe.defineToken("");t.RenderingService=function(){function e(e,n,r,i,o,a){this.renderingPluginProvider=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.sceneGraphService=void 0,this.styleValueRegistry=void 0,this.camera=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new Os(t.ElementEvent.RENDER_ORDER_CHANGED),this.hooks={init:new oa,dirtycheck:new Ea(["object"]),cull:new Ea(["object","camera"]),beginFrame:new va([]),beforeRender:new va(["objectToRender"]),render:new va(["objectToRender"]),afterRender:new va(["objectToRender"]),endFrame:new va([]),destroy:new va([]),pick:new ca(["result"]),pickSync:new Ea(["result"]),pointerDown:new va(["event"]),pointerUp:new va(["event"]),pointerMove:new va(["event"]),pointerOut:new va(["event"]),pointerOver:new va(["event"]),pointerWheel:new va(["event"]),pointerCancel:new va(["event"])},this.renderingPluginProvider=e,this.canvasConfig=n,this.renderingContext=r,this.sceneGraphService=i,this.styleValueRegistry=o,this.camera=a}var n=e.prototype;return n.init=function(){var t=si(oi().mark((function t(){var e=this;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(t){t.apply(e)})),t.next=3,this.hooks.init.promise();case 3:this.inited=!0;case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getStats=function(){return this.stats},n.disableDirtyRectangleRendering=function(){return!this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering||this.renderingContext.renderReasons.has(t.RenderReason.CAMERA_CHANGED)},n.render=function(t){var e=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.sceneGraphService.triggerPendingEvents(),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root,t),this.hooks.beginFrame.call(),this.renderingContext.renderListCurrentFrame.forEach((function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)})),this.hooks.endFrame.call(),this.renderingContext.renderListCurrentFrame=[],this.renderingContext.renderReasons.clear())},n.renderDisplayObject=function(t,e){var n=this,r=e.renderer.getConfig(),i=r.enableDirtyCheck,o=r.enableCulling;this.styleValueRegistry.recalc(t);var a=i?this.hooks.dirtycheck.call(t):t;if(a){var s=o?this.hooks.cull.call(a,this.camera):a;s&&(this.stats.rendered++,this.renderingContext.renderListCurrentFrame.push(s))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var u=t.sortable,c=!1;u.dirty&&(u.sorted=t.childNodes.slice().sort(wo),c=!0,u.dirty=!1),(u.sorted||t.childNodes).forEach((function(t){n.renderDisplayObject(t,e)})),c&&t.forEach((function(t){n.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.dispatchEvent(n.renderOrderChangedEvent)}))},n.destroy=function(){this.inited=!1,this.hooks.destroy.call()},n.dirtify=function(){this.renderingContext.renderReasons.add(t.RenderReason.DISPLAY_OBJECT_CHANGED)},e}(),t.RenderingService=dn([ct(),pn(0,Dt(Ru)),pn(1,lt(Yo)),pn(2,lt(Nu)),pn(3,lt(Gs)),pn(4,lt(oo)),pn(5,lt(Au))],t.RenderingService);var Lu=t.Syringe.defineToken(""),Du=t.Syringe.defineToken("",{multiple:!1}),Fu=/\[\s*(.*)=(.*)\s*\]/;t.DefaultSceneGraphSelector=function(){function t(){}var e=t.prototype;return e.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find((function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.find((function(e){return e.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):null}return e.find((function(n){return e!==n&&n.nodeName===t}))},e.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll((function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.findAll((function(r){return e!==r&&r.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},e.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(t.startsWith("[")){var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}return e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var e=t.match(Fu),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},e.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return $n(n)?"":n.toString?n.toString():""},t}(),t.DefaultSceneGraphSelector=dn([ct({token:Du})],t.DefaultSceneGraphSelector),t.DefaultSceneGraphService=function(){function e(e){var n,r,i,o,a,s,u,c,l=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Os(t.ElementEvent.BOUNDS_CHANGED),this.rotate=(n=qe(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=Ce(e,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=qe();Qe(a,e[0],e[1],e[2]);var s=l.getRotation(t),u=l.getRotation(t.parentNode);sn(n,u),Je(n,n),Ke(a,n,a),Ke(o.localRotation,a,s),cn(o.localRotation,o.localRotation),l.dirtifyLocal(t,o)}else l.rotateLocal(t,e)}),this.rotateLocal=(r=qe(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=Ce(e,n,i));var o=t.transformable;Qe(r,e[0],e[1],e[2]),un(o.localRotation,o.localRotation,r),l.dirtifyLocal(t,o)}),this.setEulerAngles=(i=qe(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){Qe(o.localRotation,e[0],e[1],e[2]);var a=l.getRotation(t.parentNode);sn(i,Je(qe(),a)),un(o.localRotation,o.localRotation,i),l.dirtifyLocal(t,o)}else l.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var i=t.transformable;je(e,Me())||(function(t,e,n){var r=n[0],i=n[1],o=n[2],a=e[0],s=e[1],u=e[2],c=i*u-o*s,l=o*a-r*u,h=r*s-i*a,f=i*h-o*l,d=o*c-r*h,p=r*l-i*c,v=2*n[3];l*=v,h*=v,d*=2,p*=2,t[0]=a+(c*=v)+(f*=2),t[1]=s+l+d,t[2]=u+h+p}(e,e,i.localRotation),Re(i.localPosition,i.localPosition,e),l.dirtifyLocal(t,i))},this.setPosition=(o=ie(),a=Me(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,je(l.getPosition(t),a)||(Oe(n.position,a),null!==t.parentNode&&t.parentNode.transformable?(oe(o,t.parentNode.transformable.worldTransform),ce(o,o),Ue(n.localPosition,a,o)):Oe(n.localPosition,a),l.dirtifyLocal(t,n))}),this.setLocalPosition=function(){var t=Me();return function(e,n){var r=e.transformable;t[0]=n[0],t[1]=n[1],t[2]=n[2]||0,je(r.localPosition,t)||(Oe(r.localPosition,t),l.dirtifyLocal(e,r))}}(),this.translate=(s=Me(),u=Me(),c=Me(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ie(u,e,n,r)),je(e,s)||(Re(c,l.getPosition(t),e),l.setPosition(t,c))}),this.setRotation=function(){var t=qe();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=an(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var s=l.getRotation(e.parentNode);sn(t,s),Je(t,t),Ke(a.localRotation,t,n),cn(a.localRotation,a.localRotation),l.dirtifyLocal(e,a)}else l.setLocalRotation(e,n)}},this.calcLocalTransform=function(){var t=ie(),e=Me(),n=an(0,0,0,1);return function(r){if(0!==r.localSkew[0]||0!==r.localSkew[1]){if(Ee(r.localTransform,r.localRotation,r.localPosition,Ce(1,1,1),r.origin),0!==r.localSkew[0]||0!==r.localSkew[1]){var i=se(t);i[4]=Math.tan(r.localSkew[0]),i[1]=Math.tan(r.localSkew[1]),he(r.localTransform,r.localTransform,i)}var o=Ee(t,n,e,r.localScale,r.origin);he(r.localTransform,r.localTransform,o)}else Ee(r.localTransform,r.localRotation,r.localPosition,r.localScale,r.origin)}}(),this.sceneGraphSelectorFactory=e}var n=e.prototype;return n.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},n.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},n.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},n.attach=function(t,e,n){var r,i;t.parentNode&&this.detach(t),t.parentNode=e,$n(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var o=e.sortable;((null==o||null===(r=o.sorted)||void 0===r?void 0:r.length)||(null===(i=t.style)||void 0===i?void 0:i.zIndex))&&(o.dirty=!0);var a=t.transformable;a&&this.dirtifyWorld(t,a),a.frozen&&this.unfreezeParentToRoot(t)},n.detach=function(t){if(t.parentNode){var e,n,r=t.transformable,i=t.parentNode.sortable;((null==i||null===(e=i.sorted)||void 0===e?void 0:e.length)||(null===(n=t.style)||void 0===n?void 0:n.zIndex))&&(i.dirty=!0);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},n.getOrigin=function(t){return t.transformable.origin},n.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var i=t.transformable;if(!je(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},n.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ce(e,n,r));var i=t.transformable;Qe(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},n.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=Ce(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},n.setLocalScale=function(t,e){var n=t.transformable,r=Ce(e[0],e[1],e[2]||n.localScale[2]);je(r,n.localScale)||(Oe(n.localScale,r),this.dirtifyLocal(t,n))},n.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=an(e,n,r,i));var o=t.transformable;sn(o.localRotation,e),this.dirtifyLocal(t,o)},n.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=ln(e,n));var r,i,o=t.transformable;(r=o.localSkew)[0]=(i=e)[0],r[1]=i[1],this.dirtifyLocal(t,o)},n.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},n.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},n.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){e.has(n.entity)||(t.boundsChangedEvent.detail=r,n.dispatchEvent(t.boundsChangedEvent),e.add(n.entity))};this.pendingEvents.forEach((function(t){var e=t[0],r=t[1];r.affectChildren?e.forEach((function(t){n(t,r)})):n(e,r)})),this.pendingEvents=[]},n.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.pendingEvents.push([t,{affectChildren:e}])},n.getPosition=function(t){var e=t.transformable;return me(e.position,this.getWorldTransform(t,e))},n.getRotation=function(t){var e=t.transformable;return Te(e.rotation,this.getWorldTransform(t,e))},n.getScale=function(t){var e=t.transformable;return be(e.scaling,this.getWorldTransform(t,e))},n.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},n.getLocalPosition=function(t){return t.transformable.localPosition},n.getLocalRotation=function(t){return t.transformable.localRotation},n.getLocalScale=function(t){return t.transformable.localScale},n.getLocalSkew=function(t){return t.transformable.localSkew},n.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},n.setLocalTransform=function(t,e){var n=me(Me(),e),r=Te(qe(),e),i=be(Me(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},n.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},n.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(La.isEmpty(r))return null;var i=n||new La;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},n.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new La},n.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new La).update(r.center,r.halfExtents))})),e){var a=So(t);if(a){var s,u=this.getTransformedGeometryBounds(a.style.clipPath,!0);u&&(s=new La).setFromTransformedAABB(u,this.getWorldTransform(a)),o?s&&(o=s.intersection(o)):o=s}}return o||(o=new La),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},n.getLocalBounds=function(t){if(t.parentNode){var e=ie();t.parentNode.transformable&&(e=ce(ie(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!La.isEmpty(n)){var r=new La;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},n.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);La.isEmpty(i)||(r=new La).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(e=t.ownerDocument)||void 0===e||null===(n=e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=r.getMin(),s=a[0],u=a[1],c=r.getMax();return new Ga(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),c[0]-s,c[1]-u)}return new Ga((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},n.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},n.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;n.length>r;r++)this.syncHierarchy(n[r])}},n.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?he(e.worldTransform,r.worldTransform,e.localTransform):oe(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},n.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},e}(),t.DefaultSceneGraphService=dn([ct({token:Gs}),pn(0,lt(Lu))],t.DefaultSceneGraphService);var Bu=function(){function t(t){this.sceneGraphService=void 0,this.sceneGraphService=t}return t.prototype.calculator=function(t,e,n,r){var i=this;if(n instanceof Ni&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets){var o=e.parsedStyle.clipPathTargets.indexOf(r);e.parsedStyle.clipPathTargets.splice(o,1)}return n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),r.forEach((function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)})),n},t}();Bu=dn([ct({token:{token:co,named:t.PropertySyntax.CLIP_PATH}}),pn(0,lt(Gs))],Bu);var Gu=function(){function t(){this.parser=Oa,this.mixer=Ia}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ni?"none"===n.value?yo:go:n},t}();Gu=dn([ct({token:[{token:co,named:t.PropertySyntax.PAINT},{token:co,named:t.PropertySyntax.COLOR}]})],Gu);var Uu=function(){function t(){this.parser=Ka}return t.prototype.calculator=function(t,e,n){return n instanceof Ni?[]:n},t}();function ju(t){var e=t.parsedStyle.fontSize;return $n(e)?null:e}Uu=dn([ct({token:{token:co,named:t.PropertySyntax.FILTER}})],Uu);var Vu=function(){function e(){this.parser=Va,this.mixer=Qa}return e.prototype.calculator=function(e,n,r,i,o){if(!Wi.isRelativeUnit(r.unit))return r.value;if(r.unit===t.UnitType.kPercentage)return 0;if(r.unit===t.UnitType.kEms){if(i.parentNode){var a=ju(i.parentNode);if(a)return a*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}if(r.unit===t.UnitType.kRems){var s;if(null==i||null===(s=i.ownerDocument)||void 0===s?void 0:s.documentElement){var u=ju(i.ownerDocument.documentElement);if(u)return u*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}},e}();Vu=dn([ct({token:[{token:co,named:t.PropertySyntax.LENGTH_PERCENTAGE},{token:co,named:t.PropertySyntax.LENGTH}]})],Vu);var Hu=function(){function t(){this.mixer=ts}var e=t.prototype;return e.parser=function(t){var e=Ya(rr(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}();Hu=dn([ct({token:{token:co,named:t.PropertySyntax.LENGTH_PERCENTAGE_12}})],Hu);var zu=function(){function t(){this.mixer=ts}var e=t.prototype;return e.parser=function(t){var e=Ya(rr(t)?[t]:t);return 1===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[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}();zu=dn([ct({token:{token:co,named:t.PropertySyntax.LENGTH_PERCENTAGE_14}})],zu);var Wu=function(e){function n(){return e.apply(this,arguments)||this}return hi(n,e),n.prototype.postProcessor=function(e){var n,r,i;switch(e.nodeName){case t.Shape.CIRCLE:case t.Shape.ELLIPSE:var o=e.parsedStyle,a=o.cx,s=o.cy;$n(a)||(n=a),$n(s)||(r=s);break;case t.Shape.LINE:var u=e.parsedStyle,c=u.y1,l=u.y2;n=Math.min(u.x1,u.x2),r=Math.min(c,l),i=0;break;case t.Shape.RECT:case t.Shape.IMAGE:case t.Shape.GROUP:case t.Shape.HTML:case t.Shape.TEXT:case t.Shape.MESH:$n(e.parsedStyle.x)||(n=e.parsedStyle.x),$n(e.parsedStyle.y)||(r=e.parsedStyle.y)}if(e.nodeName!==t.Shape.PATH&&e.nodeName!==t.Shape.POLYLINE&&e.nodeName!==t.Shape.POLYGON&&(e.parsedStyle.defX=n||0,e.parsedStyle.defY=r||0),!$n(n)||!$n(r)||!$n(i)){var h=e.getLocalPosition(),f=h[0],d=h[1],p=h[2];e.setLocalPosition($n(n)?f:n,$n(r)?d:r,$n(i)?p:i)}},n}(Vu);Wu=dn([ct({token:{token:co,named:t.PropertySyntax.COORDINATE}})],Wu);var Yu=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i;n instanceof Ni&&(n=null);var o=null===(i=n)||void 0===i?void 0:i.cloneNode(!0);return o&&(o.style.isMarker=!0),o},t}();Yu=dn([ct({token:{token:co,named:t.PropertySyntax.MARKER}})],Yu);var qu=function(){function t(){this.mixer=Qa,this.parser=Ja}return t.prototype.calculator=function(t,e,n){return n.value},t}();qu=dn([ct({token:{token:co,named:t.PropertySyntax.NUMBER}})],qu);var Xu=function(){function e(){this.parser=Ja,this.mixer=$a(0,1)}var n=e.prototype;return n.calculator=function(t,e,n){return n.value},n.postProcessor=function(e){if(e.attributes.offsetPath){var n=e.attributes.offsetPath.nodeName;if(n===t.Shape.LINE||n===t.Shape.PATH||n===t.Shape.POLYLINE){var r=e.attributes.offsetPath.getPoint(e.parsedStyle.offsetDistance);r&&e.setLocalPosition(r.x,r.y)}}},e}();Xu=dn([ct({token:{token:co,named:t.PropertySyntax.OFFSET_DISTANCE}})],Xu);var Ku=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t}();Ku=dn([ct({token:{token:co,named:t.PropertySyntax.OFFSET_PATH}})],Ku);var Zu=function(){function t(){this.parser=Ja,this.mixer=$a(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}();Zu=dn([ct({token:{token:co,named:t.PropertySyntax.OPACITY_VALUE}})],Zu);var Ju=function(){function e(){this.parser=rs,this.mixer=is}var n=e.prototype;return n.calculator=function(t,e,n){return n instanceof Ni&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new Ga(0,0,0,0)}:n},n.postProcessor=function(e){if(e.nodeName===t.Shape.PATH){var n=e.parsedStyle,r=n.defX,i=n.defY;e.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},e}();Ju=dn([ct({token:{token:co,named:t.PropertySyntax.PATH}})],Ju);var Qu=function(){function e(){this.parser=os}return e.prototype.postProcessor=function(e){if(e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.POLYLINE){var n=e.parsedStyle;e.setLocalPosition(n.defX,n.defY)}},e}();Qu=dn([ct({token:{token:co,named:t.PropertySyntax.LIST_OF_POINTS}})],Qu);var $u=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).mixer=$a(0,1/0),e}return hi(e,t),e}(Vu);$u=dn([ct({token:{token:co,named:t.PropertySyntax.SHADOW_BLUR}})],$u);var tc=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ni?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}();tc=dn([ct({token:{token:co,named:t.PropertySyntax.TEXT}})],tc);var ec=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}();ec=dn([ct({token:{token:co,named:t.PropertySyntax.TEXT_TRANSFORM}})],ec);var nc=function(){function t(){this.tmpMat4=ie(),this.parser=ls,this.mixer=bs}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ni?[]:n},e.postProcessor=function(t){var e=this,n=t.parsedStyle,r=n.transform,i=n.defX,o=n.defY;r&&r.length&&(t.resetLocalTransform(),t.setLocalPosition(i,o),r.forEach((function(n){var r=n.t,a=n.d;if("scale"===r){var s=(null==a?void 0:a.map((function(t){return t.value})))||[1,1];t.scaleLocal(s[0],s[1],1)}else if("scalex"===r){var u=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(u[0],1,1)}else if("scaley"===r){var c=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,c[0],1)}else if("scalez"===r){var l=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,1,l[0])}else if("scale3d"===r){var h=(null==a?void 0:a.map((function(t){return t.value})))||[1,1,1];t.scaleLocal(h[0],h[1],h[2])}else if("translate"===r){var f=a||[no,no];t.translateLocal(f[0].value,f[1].value,0)}else if("translatex"===r){t.translateLocal((a||[no])[0].value,0,0)}else if("translatey"===r){t.translateLocal(0,(a||[no])[0].value,0)}else if("translatez"===r){t.translateLocal(0,0,(a||[no])[0].value)}else if("translate3d"===r){var d=a||[no,no,no];t.translateLocal(d[0].value,d[1].value,d[2].value)}else if("rotate"===r){t.rotateLocal(0,0,(a||[ro])[0].value)}else if("rotatex"===r){t.rotateLocal((a||[ro])[0].value,0,0)}else if("rotatey"===r){t.rotateLocal(0,(a||[ro])[0].value,0)}else if("rotatez"===r){t.rotateLocal(0,0,(a||[ro])[0].value)}else if("rotate3d"===r);else if("skew"===r){var p=(null==a?void 0:a.map((function(t){return t.value})))||[0,0];t.setLocalSkew(Io(p[0]),Io(p[1]))}else if("skewx"===r){var v=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(Io(v[0]),t.getLocalSkew()[1])}else if("skewy"===r){var y=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(t.getLocalSkew()[0],Io(y[0]))}else if("matrix"===r){var g=a.map((function(t){return t.value}));t.setLocalTransform(ae(e.tmpMat4,g[0],g[1],0,0,g[2],g[3],0,0,0,0,1,0,g[4]+i,g[5]+o,0,1))}else"matrix3d"===r&&(ae.apply(_e,[e.tmpMat4].concat(a.map((function(t){return t.value})))),e.tmpMat4[12]+=i,e.tmpMat4[13]+=o,t.setLocalTransform(e.tmpMat4))})))},t}();nc=dn([ct({token:{token:co,named:t.PropertySyntax.TRANSFORM}})],nc);var rc=function(){this.parser=Ts};rc=dn([ct({token:{token:co,named:t.PropertySyntax.TRANSFORM_ORIGIN}})],rc);var ic=function(){function t(){this.parser=Ja}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t}();ic=dn([ct({token:{token:co,named:t.PropertySyntax.Z_INDEX}})],ic);var oc=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:t.PropertySyntax.PAINT},{n:"stroke",int:!0,k:["none"],d:"none",syntax:t.PropertySyntax.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:t.PropertySyntax.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:t.PropertySyntax.OFFSET_PATH},{n:"offsetDistance",int:!0,syntax:t.PropertySyntax.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:t.PropertySyntax.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:t.PropertySyntax.FILTER},{n:"clipPath",syntax:t.PropertySyntax.CLIP_PATH},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:t.PropertySyntax.TRANSFORM},{n:"transformOrigin",p:100,d:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"center":e===t.Shape.TEXT?"text-anchor":"left top"},l:!0,syntax:t.PropertySyntax.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"cy",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"y",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"z",int:!0,d:"0",syntax:t.PropertySyntax.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"y1",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"z1",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"x2",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"y2",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"z2",int:!0,l:!0,syntax:t.PropertySyntax.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:t.PropertySyntax.PATH,p:50},{n:"points",l:!0,syntax:t.PropertySyntax.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:t.PropertySyntax.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:t.PropertySyntax.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:t.PropertySyntax.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:t.PropertySyntax.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:t.PropertySyntax.NUMBER,d:function(e){return e===t.Shape.PATH||e===t.Shape.POLYGON||e===t.Shape.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","end","left","right"],d:"start"},{n:"markerStart",syntax:t.PropertySyntax.MARKER},{n:"markerEnd",syntax:t.PropertySyntax.MARKER},{n:"markerMid",syntax:t.PropertySyntax.MARKER},{n:"markerStartOffset",syntax:t.PropertySyntax.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:t.PropertySyntax.LENGTH,l:!0,int:!0,d:"0"}],ac={},sc={},uc={},cc=ar((function(t){return t.sort((function(t,e){return uc[t]-uc[e]}))})),lc=Me(),hc=Me(),fc=Me(),dc=function(){function e(t,e,n){var r=this;this.sceneGraphService=void 0,this.propertySyntaxFactory=void 0,this.geometryUpdaterFactory=void 0,this.sceneGraphService=t,this.propertySyntaxFactory=e,this.geometryUpdaterFactory=n,oc.forEach((function(t){r.registerMetadata(t)}))}var n=e.prototype;return n.registerMetadata=function(t){[t.n].concat(t.a||[]).forEach((function(e){ac[e]=t,uc[e]=t.p||0}))},n.unregisterMetadata=function(t){delete ac[t]},n.getPropertySyntax=function(t){return this.propertySyntaxFactory(t)},n.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]});var i=n.skipUpdateAttribute,o=n.skipParse,a=n.usedAttributes,s=n.forceUpdateGeometry,u=Object.keys(e);u.forEach((function(n){var r,o=Li(n,e[n]),a=o[0];i||(t.attributes[a]=o[1]),!s&&(null===(r=ac[a])||void 0===r?void 0:r.l)&&(s=!0)})),o||u.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t)})),(u=cc((null==a?void 0:a.length)?Array.from(new Set(u.concat(a))):u)).forEach((function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t))})),s&&this.updateGeometry(t),u.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),t.children.length&&u.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))}))},n.parseProperty=function(t,e,n){var r=ac[t],i=e;if((""===e||$n(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)i=vo(e);else if(r){var o=r.k,a=r.syntax,s=a&&this.getPropertySyntax(a);o&&o.indexOf(e)>-1?i=vo(e):s&&s.parser&&(i=s.parser(e,n))}return i},n.computeProperty=function(t,e,n){var r=ac[t],i=e;if(r){var o=r.syntax,a=r.d;if(e instanceof Ni){var s=e.value;if("unset"===s&&(s=r.inh&&!("g-root"===n.id)?"inherit":"initial"),"initial"===s)$n(a)||(e=this.parseProperty(t,Ai(a)?a(n.nodeName):a,n));else if("inherit"===s){var u=this.tryToResolveProperty(n,t,{inherited:!0});return $n(u)?void this.addUnresolveProperty(n,t):u}}var c=o&&this.getPropertySyntax(o);if(c&&c.calculator)i=c.calculator(t,n.parsedStyle[t],e,n,this);else i=e instanceof Ni?e.value:e}return i},n.postProcessProperty=function(t,e){var n=ac[t];if(n&&n.syntax){var r=n.syntax&&this.getPropertySyntax(n.syntax);r&&r.postProcessor&&r.postProcessor(e)}},n.addUnresolveProperty=function(t,e){sc[t.entity]||(sc[t.entity]=[]),-1===sc[t.entity].indexOf(e)&&sc[t.entity].push(e)},n.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&function(t,e){return!sc[t.entity]||0===sc[t.entity].length||sc[t.entity].includes(e)}(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"===r||"initial"===r||"inherit"===r)return;return r}},n.recalc=function(t){var e=sc[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete sc[t.entity]}},n.updateGeometry=function(e){var n=this.geometryUpdaterFactory(e.nodeName);if(n){var r=e.geometry;r.contentBounds||(r.contentBounds=new La),r.renderBounds||(r.renderBounds=new La);var i=e.parsedStyle,o=n.update(i,e),a=o.width,s=o.height,u=o.depth,c=void 0===u?0:u,l=o.offsetX,h=void 0===l?0:l,f=o.offsetY,d=void 0===f?0:f,p=o.offsetZ,v=void 0===p?0:p,y=0>a,g=0>s,m=Ie(lc,Math.abs(a)/2,Math.abs(s)/2,c/2),b=i.stroke,T=i.lineWidth,E=i.increasedLineWidthForHitTesting,x=i.shadowType,w=i.shadowColor,S=i.filter,k=void 0===S?[]:S,N=i.transformOrigin,P=i.anchor;e.nodeName===t.Shape.TEXT&&delete i.anchor;var _=Ie(hc,(1-2*(P&&P[0]||0))*a/2+h,(1-2*(P&&P[1]||0))*s/2+d,(1-2*(P&&P[2]||0))*m[2]+v);r.contentBounds.update(_,m);var M=e.nodeName===t.Shape.POLYLINE||e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.PATH?Math.SQRT2:.5;if(b&&!b.isNone){var A=((T||0)+(E||0))*M;Re(m,m,Ie(fc,A,A,0))}if(r.renderBounds.update(_,m),w&&x&&"inner"!==x){var C=r.renderBounds,O=C.min,I=C.max,R=i.shadowBlur||0,L=i.shadowOffsetX||0,D=i.shadowOffsetY||0,F=I[0]+R+L,B=O[1]-R+D,G=I[1]+R+D;O[0]=Math.min(O[0],O[0]-R+L),I[0]=Math.max(I[0],F),O[1]=Math.min(O[1],B),I[1]=Math.max(I[1],G),r.renderBounds.setMinMax(O,I)}k.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,Re(r.renderBounds.halfExtents,r.renderBounds.halfExtents,Ce(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,u=r.renderBounds,c=u.min,l=u.max,h=l[0]+s+o,f=c[1]-s+a,d=l[1]+s+a;c[0]=Math.min(c[0],c[0]-s+o),l[0]=Math.max(l[0],h),c[1]=Math.min(c[1],f),l[1]=Math.max(l[1],d),r.renderBounds.setMinMax(c,l)}})),P=i.anchor;var U=(y?-1:1)*qa(N[0],0,e),j=(g?-1:1)*qa(N[1],1,e);e.setOrigin(U-=(y?-1:1)*(P&&P[0]||0)*r.contentBounds.halfExtents[0]*2,j-=(g?-1:1)*(P&&P[1]||0)*r.contentBounds.halfExtents[1]*2),this.sceneGraphService.dirtifyToRoot(e)}},n.isPropertyInheritable=function(t){var e=ac[t];return!!e&&e.inh},e}();dc=dn([ct({token:oo}),pn(0,lt(Gs)),pn(1,lt(uo)),pn(2,lt(ws))],dc);var pc,vc,yc,gc,mc=At((function(e){e(t.DisplayObjectPool),e(t.Camera),e(t.DefaultSceneGraphSelector),e({token:Lu,useFactory:function(t){return function(){return t.container.get(Du)}}}),e(t.DefaultSceneGraphService),e(t.OffscreenCanvasCreator),e(t.TextService),e(t.CircleUpdater),e(t.EllipseUpdater),e(t.RectUpdater),e(t.TextUpdater),e(t.LineUpdater),e(t.PolylineUpdater),e(t.PathUpdater),e({token:ws,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Ss,n)&&(e[n]=t.container.getNamed(Ss,n)),e[n]}}}),e(qu),e(xs),e(Bu),e(Gu),e(Uu),e(Vu),e(Hu),e(zu),e(Wu),e(Xu),e(Ku),e(Zu),e(Ju),e(Qu),e($u),e(tc),e(ec),e(nc),e(rc),e(ic),e(Yu),e({token:uo,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(co,n)&&(e[n]=t.container.getNamed(co,n)),e[n]}}}),e(dc)})),bc=function(){function t(t){this.plugins=[],this.config=void 0,this.config=li({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(t){-1===this.plugins.findIndex((function(e){return e===t}))&&this.plugins.push(t)},e.unregisterPlugin=function(t){var e=this.plugins.findIndex((function(e){return e===t}));e>-1&&this.plugins.splice(e,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(t){return this.plugins.find((function(e){return e.name===t}))},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),Tc=t.Syringe.defineToken(""),Ec=(pc=function(){function e(t,e){this.strategyProvider=void 0,this.renderingContext=void 0,this.strategyProvider=t,this.renderingContext=e}return e.prototype.apply=function(e){var n=this,r=this.strategyProvider.getContributions();e.hooks.cull.tap(vc.tag,(function(e){if(e){var i=e.cullable;return i.visible=0===r.length?n.renderingContext.unculledEntities.indexOf(e.entity)>-1:r.every((function(t){return t.isVisible(e)})),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new Os(t.ElementEvent.CULLED)),null)}return e})),e.hooks.afterRender.tap(vc.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},e}(),pc.tag="Culling",vc=pc);Ec=vc=dn([ct({contrib:Ru}),pn(0,Dt(Tc)),pn(1,lt(Nu))],Ec);var xc,wc,Sc=(yc=function(){function t(){}return t.prototype.apply=function(t){t.hooks.dirtycheck.tap(gc.tag,(function(e){return e?e.renderable.dirty||t.disableDirtyRectangleRendering()?e:null:e}))},t}(),yc.tag="DirtyCheck",gc=yc);Sc=gc=dn([ct({contrib:Ru})],Sc);var kc=(xc=function(){function t(t,e,n,r,i){var o=this;this.canvasConfig=void 0,this.contextService=void 0,this.renderingService=void 0,this.renderingContext=void 0,this.eventService=void 0,this.autoPreventDefault=!1,this.rootPointerEvent=new Zs(null),this.rootWheelEvent=new Js(null),this.onPointerMove=function(t){var e,n,r=null===(e=o.renderingContext.root)||void 0===e||null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r.supportsTouchEvents||"touch"!==t.pointerType){for(var i,a=yi(o.normalizeToPointerEvent(t,r));!(i=a()).done;){var s=o.bootstrapEvent(o.rootPointerEvent,i.value,r);o.eventService.mapEvent(s)}o.setCursor(o.eventService.cursor)}},this.canvasConfig=t,this.contextService=e,this.renderingService=n,this.renderingContext=r,this.eventService=i}var e=t.prototype;return e.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var t=si(oi().mark((function t(n){return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.renderingService.hooks.pick.promise({position:n,picked:[],topmost:!0});case 2:return t.abrupt("return",t.sent.picked[0]||null);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(wc.tag,(function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap(wc.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var i,o=yi(r);!(i=o()).done;){var a=e.bootstrapEvent(e.rootPointerEvent,i.value,n);e.eventService.mapEvent(a)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerUp.tap(wc.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r,i=e.contextService.getDomElement(),o=i&&t.target&&t.target!==i&&i.contains&&!i.contains(t.target)?"outside":"",a=yi(e.normalizeToPointerEvent(t,n));!(r=a()).done;){var s=e.bootstrapEvent(e.rootPointerEvent,r.value,n);s.type+=o,e.eventService.mapEvent(s)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerMove.tap(wc.tag,this.onPointerMove),t.hooks.pointerOver.tap(wc.tag,this.onPointerMove),t.hooks.pointerOut.tap(wc.tag,this.onPointerMove)},e.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var r=this.eventService.client2Viewport(new Ba(e.clientX,e.clientY)),i=r.y;t.viewport.x=r.x,t.viewport.y=i;var o=this.eventService.viewport2Canvas(t.viewport),a=o.y;return t.canvas.x=o.x,t.canvas.y=a,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=_o[t.type]||t.type),t},e.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new Ba(t.clientX,t.clientY)),r=n.y;e.viewport.x=n.x,e.viewport.y=r;var i=this.eventService.viewport2Canvas(e.viewport),o=i.y;return e.canvas.x=i.x,e.canvas.y=o,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},e.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},e.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},e.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;t.changedTouches.length>r;r++){var i=t.changedTouches[r];or(i.button)&&(i.button=0),or(i.buttons)&&(i.buttons=1),or(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),or(i.width)&&(i.width=i.radiusX||1),or(i.height)&&(i.height=i.radiusY||1),or(i.tiltX)&&(i.tiltX=0),or(i.tiltY)&&(i.tiltY=0),or(i.pointerType)&&(i.pointerType="touch"),or(i.pointerId)&&(i.pointerId=i.identifier||0),or(i.pressure)&&(i.pressure=i.force||.5),or(i.twist)&&(i.twist=0),or(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;or(o.isPrimary)&&(o.isPrimary=!0),or(o.width)&&(o.width=1),or(o.height)&&(o.height=1),or(o.tiltX)&&(o.tiltX=0),or(o.tiltY)&&(o.tiltY=0),or(o.pointerType)&&(o.pointerType="mouse"),or(o.pointerId)&&(o.pointerId=1),or(o.pressure)&&(o.pressure=.5),or(o.twist)&&(o.twist=0),or(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t}(),xc.tag="Event",wc=xc);kc=wc=dn([ct({contrib:Ru}),pn(0,lt(Yo)),pn(1,lt(Ms)),pn(2,lt(t.RenderingService)),pn(3,lt(Nu)),pn(4,lt(t.EventService))],kc);var Nc,Pc,_c=[t.Shape.CIRCLE,t.Shape.ELLIPSE,t.Shape.IMAGE,t.Shape.RECT,t.Shape.LINE,t.Shape.POLYLINE,t.Shape.POLYGON,t.Shape.TEXT,t.Shape.PATH,t.Shape.HTML],Mc=function(){function e(t){this.camera=void 0,this.camera=t}var n=e.prototype;return n.isVisible=function(e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(La.isEmpty(o))return!1;var a=this.camera.getFrustum(),s=null===(n=e.parentNode)||void 0===n||null===(r=n.cullable)||void 0===r?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,s||t.Mask.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==t.Mask.OUTSIDE,i.visible},n.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===t.Mask.OUTSIDE||r===t.Mask.INSIDE)return r;for(var o=t.Mask.INSIDE,a=_c.indexOf(e.nodeName)>-1,s=0,u=i.length;u>s;++s){var c=1<<s;if(0!=(r&c)&&(!a||4!==s&&5!==s)){var l=i[s],h=l.normal,f=l.distance;if(0>Be(h,n.getPositiveFarPoint(i[s]))+f)return t.Mask.OUTSIDE;0>Be(h,n.getNegativeFarPoint(i[s]))+f&&(o|=c)}}return o},e}();Mc=dn([ct({contrib:Tc}),pn(0,lt(Au))],Mc);var Ac=(Nc=function(){function e(t,e,n,r){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set,this.renderingContext=t,this.styleValueRegistry=e,this.sceneGraphService=n,this.rBush=r}var n=e.prototype;return n.pushToSync=function(t){var e=this;t.forEach((function(t){e.toSync.add(t)}))},n.apply=function(e){var n=this,r=function(t){t.target.renderable.dirty=!0,e.dirtify()},i=function(t){t.detail.affectChildren&&t.target.forEach((function(t){n.pushToSync([t])})),n.pushToSync(t.composedPath().slice(0,-2)),e.dirtify()},o=function(t){var r=t.target;n.pushToSync(t.composedPath().slice(0,-2)),n.styleValueRegistry.recalc(r),n.sceneGraphService.dirtifyToRoot(r),e.dirtify()},a=function(t){var r=t.target,i=r.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(r),n.sceneGraphService.dirtifyToRoot(t.target),e.dirtify()};e.hooks.init.tapPromise(Pc.tag,si(oi().mark((function e(){return oi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.renderingContext.root.addEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.addEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.addEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.addEventListener(t.ElementEvent.BOUNDS_CHANGED,i);case 4:case"end":return e.stop()}}),e)})))),e.hooks.destroy.tap(Pc.tag,(function(){n.renderingContext.root.removeEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.removeEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.removeEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.removeEventListener(t.ElementEvent.BOUNDS_CHANGED,i)})),e.hooks.endFrame.tap(Pc.tag,(function(){n.syncRTree()}))},n.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter((function(t){return t.isConnected})).forEach((function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=i.getMin(),a=o[0],s=o[1],u=i.getMax(),c=u[0],l=u[1];r.aabb||(r.aabb={}),r.aabb.id=n.entity,r.aabb.minX=a,r.aabb.minY=s,r.aabb.maxX=c,r.aabb.maxY=l}r.aabb&&(isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb))})),this.rBush.load(e),e.length=0,this.toSync.clear()},e}(),Nc.tag="Prepare",Pc=Nc);Ac=Pc=dn([ct({contrib:Ru}),pn(0,lt(Nu)),pn(1,lt(oo)),pn(2,lt(Gs)),pn(3,lt(Bs))],Ac);var Cc,Oc=At((function(e){Ot.register(e,Ru,{cache:!1}),Ot.register(e,Tc,{cache:!1}),e({token:Bs,useValue:new jt}),e(t.RenderingService),e(t.EventService),e(kc),e(Ac),e(Sc),e(Ec),e(Mc)}));(Cc=t.CanvasEvent||(t.CanvasEvent={})).READY="ready",Cc.BEFORE_RENDER="beforerender",Cc.AFTER_RENDER="afterrender",Cc.BEFORE_DESTROY="beforedestroy",Cc.AFTER_DESTROY="afterdestroy",Cc.RESIZE="resize",Cc.DIRTY_RECTANGLE="dirtyrectangle";var Ic=function(e){function n(n){var r;(r=e.call(this)||this).container=Lt.createChild(),r.document=void 0,r.customElements=void 0,r.requestAnimationFrame=void 0,r.cancelAnimationFrame=void 0,r.devicePixelRatio=void 0,r.supportsPointerEvents=void 0,r.supportsTouchEvents=void 0,r.isTouchEvent=void 0,r.isMouseEvent=void 0,r.Element=eu,r.frameId=void 0,r.eventService=void 0,r.renderingService=void 0,r.inited=!1,r.readyPromise=void 0,r.resolveReadyPromise=void 0,r.mountEvent=new Os(t.ElementEvent.MOUNTED),r.unmountEvent=new Os(t.ElementEvent.UNMOUNTED),r.beforeRenderEvent=new Os(t.CanvasEvent.BEFORE_RENDER),r.afterRenderEvent=new Os(t.CanvasEvent.AFTER_RENDER),r.document=new Ds,r.document.defaultView=pi(r),r.customElements=new As;var i=n.container,o=n.canvas,a=n.offscreenCanvas,s=n.width,u=n.height,c=n.devicePixelRatio,l=n.renderer,h=n.background,f=n.cursor,d=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,y=n.createImage,g=n.supportsPointerEvents,m=n.supportsTouchEvents,b=n.isTouchEvent,T=n.isMouseEvent;!function(t,e){if(t){var n="string"==typeof t?t:t.id||Eo++;To[n]&&To[n].destroy(),To[n]=e}}(i,pi(r));var E=s,x=u,w=c;return o&&(w=1>(w=c||xo&&window.devicePixelRatio||1)?1:Math.ceil(w),E=s||function(t){var e=ko(t,"width");return"auto"===e?t.offsetWidth:parseFloat(e)}(o)||o.width/w,x=u||function(t){var e=ko(t,"height");return"auto"===e?t.offsetHeight:parseFloat(e)}(o)||o.height/w),r.devicePixelRatio=w,r.requestAnimationFrame=null!=p?p:Jr.bind(globalThis),r.cancelAnimationFrame=null!=v?v:Qr.bind(globalThis),r.supportsTouchEvents=null!=m?m:"ontouchstart"in globalThis,r.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,r.isTouchEvent=null!=b?b:function(t){return r.supportsTouchEvents&&t instanceof globalThis.TouchEvent},r.isMouseEvent=null!=T?T:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!r.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:o,width:E,height:x,renderer:l,offscreenCanvas:a,devicePixelRatio:w,cursor:f||"default",background:h||"transparent",createImage:y,document:d}),r.initDefaultCamera(E,x),si(oi().mark((function e(){return oi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.initRenderer(l);case 2:r.dispatchEvent(new Os(t.CanvasEvent.READY)),r.readyPromise&&r.resolveReadyPromise();case 4:case"end":return e.stop()}}),e)})))(),r}hi(n,e);var r=n.prototype;return r.initRenderingContext=function(e){var n=this;this.container.register({token:Yo,useValue:e}),this.container.register({token:Nu,useValue:{root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_INSERTED,(function(t){n.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_REMOVED,(function(t){n.unmountChildren(t.detail.child)}))},r.initDefaultCamera=function(e,n){var r=Lt.get(Cu);r.setType(t.CameraType.EXPLORING,t.CameraTrackingMode.DEFAULT).setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0).setOrthographic(e/-2,e/2,n/2,n/-2,.1,1e3),r.canvas=this;var i=this.container.get(Nu);r.eventEmitter.on(Ou.UPDATED,(function(){i.renderReasons.add(t.RenderReason.CAMERA_CHANGED)})),this.container.register({token:Au,useValue:r})},r.getConfig=function(){return this.container.get(Yo)},r.getContainer=function(){return this.container},r.getRoot=function(){return this.document.documentElement},r.getCamera=function(){return this.container.get(Au)},r.getContextService=function(){return this.container.get(Ms)},r.getEventService=function(){return this.eventService},r.getRenderingService=function(){return this.renderingService},r.getRenderingContext=function(){return this.container.get(Nu)},r.getRBushRoot=function(){return this.container.get(Bs)},r.getStats=function(){return this.getRenderingService().getStats()},r.destroy=function(e,n){(void 0===e&&(e=!0),void 0===n&&(n=!1),n||this.dispatchEvent(new Os(t.CanvasEvent.BEFORE_DESTROY)),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var r=this.getRoot();this.unmountChildren(r),e&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),n||this.dispatchEvent(new Os(t.CanvasEvent.AFTER_DESTROY))},r.changeSize=function(t,e){this.resize(t,e)},r.resize=function(e,n){var r=this.container.get(Yo);r.width=e,r.height=n,this.getContextService().resize(e,n);var i=this.container.get(Au),o=i.getProjectionMode();i.setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0),o===t.CameraProjectionMode.ORTHOGRAPHIC?i.setOrthographic(e/-2,e/2,n/2,n/-2,i.getNear(),i.getFar()):i.setAspect(e/n),this.dispatchEvent(new Os(t.CanvasEvent.RESIZE,{width:e,height:n}))},r.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},r.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},r.removeChild=function(t){return this.document.documentElement.removeChild(t)},r.removeChildren=function(){this.document.documentElement.removeChildren()},r.render=function(){(this.dispatchEvent(this.beforeRenderEvent),this.container.isBound(t.RenderingService))&&this.container.get(t.RenderingService).render(this.getConfig());this.dispatchEvent(this.afterRenderEvent)},r.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},r.initRenderer=function(){var e=si(oi().mark((function e(n){var r;return oi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(n),r=this.container.get(Ms),this.renderingService=this.container.get(t.RenderingService),this.eventService=this.container.get(t.EventService),this.eventService.init(),e.next=12,r.init();case 12:return e.next=14,this.renderingService.init();case 14:this.inited=!0,this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot()),n.getConfig().enableAutoRendering&&this.run();case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.loadCommonContainerModule=function(){this.container.unload(Oc),this.container.load(Oc,!0)},r.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.container=e.container,t.init()}))},r.setRenderer=function(){var t=si(oi().mark((function t(e){var n,r;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer!==e){t.next=3;break}return t.abrupt("return");case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach((function(t){t.destroy()})),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.setCursor=function(t){this.container.get(Yo).cursor=t,this.getContextService().applyCursorStyle(t)},r.unmountChildren=function(t){var e=this;if(this.inited){var n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t instanceof ou&&t.disconnectedCallback&&t.disconnectedCallback(),t.dispatchEvent(e.unmountEvent),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))}},r.mountChildren=function(t){var e=this;this.inited?t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.dispatchEvent(e.mountEvent),t instanceof ou&&t.connectedCallback&&t.connectedCallback())})):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName)},r.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},r.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},r.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},r.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},r.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},r.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},ci(n,[{key:"ready",get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),n}(Is);Lt.load(mc);var Rc=Lt.get(oo);function Lc(t,e){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lc(t,e)}var Dc={}.toString,Fc=function(t,e){return Dc.call(t)==="[object "+e+"]"},Bc=function(t){return Fc(t,"Function")};function Gc(t,e){var n;if(t)if(n=t,Array.isArray?Array.isArray(n):Fc(n,"Array"))for(var r=0,i=t.length;i>r&&!1!==e(t[r],r);r++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}var Uc,jc=function(t){return Fc(t,"String")},Vc=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return Gc(t,(function(n,r){Bc(t)&&"prototype"===r||e.push(n)})),e};!function(t,e){if(!Bc(t))throw new TypeError("Expected a function");var n=function n(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};n.cache=new Map}((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return Uc||(Uc=document.createElement("canvas").getContext("2d")),Uc.font=[o,a,i,n+"px",r].join(" "),Uc.measureText(jc(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;n>e;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;n>e;e++)for(var o=arguments[e],a=0,s=o.length;s>a;a++,i++)r[i]=o[a];return r}([t],Vc(e)).join("")}));var Hc="undefined"!=typeof Float32Array?Float32Array:Array;function zc(t,e,n){var r,i,o,a,s,u,c,l,h,f,d,p,v=n[0],y=n[1],g=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*v+s*y+h*g+e[12],t[13]=i*v+u*y+f*g+e[13],t[14]=o*v+c*y+d*g+e[14],t[15]=a*v+l*y+p*g+e[15]),t}function Wc(){var t=new Hc(3);return Hc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Yc(t){var e=new Hc(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function qc(t,e,n){var r=new Hc(3);return r[0]=t,r[1]=e,r[2]=n,r}function Xc(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Kc(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Zc(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Jc(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Qc(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var $c=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},tl=function(t){return Math.hypot(t[0],t[1],t[2])};!function(){var t=Wc()}();!function(){var t,e=(t=new Hc(4),Hc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function el(){var t=new Hc(4);return Hc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function nl(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function rl(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function il(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],d=n[0],p=n[1],v=n[2],y=n[3];return 0>(o=c*d+l*p+h*v+f*y)&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*d,t[1]=s*l+u*p,t[2]=s*h+u*v,t[3]=s*f+u*y,t}var ol=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};(function(){var t=Wc(),e=qc(1,0,0),n=qc(0,1,0)})(),function(){var t=el(),e=el()}(),function(){var t,e=(t=new Hc(9),Hc!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t)}();function al(){
16
16
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
17
- al=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new w(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(p=y);var g=d.prototype=h.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function T(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,T(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function sl(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ul(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){sl(o,r,i,a,s,"next",t)}function s(t){sl(o,r,i,a,s,"throw",t)}a(void 0)}))}}function cl(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ll(t,e,n){return e&&cl(t.prototype,e),n&&cl(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function hl(){return hl=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hl.apply(this,arguments)}function fl(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function dl(t,e){return function(n,r){e(n,r,t)}}t.AdvancedCamera=function(e){var n,r;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).landmarks=[],t.landmarkAnimationID=void 0,t}r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,Lc(n,r);var o=i.prototype;return o.rotate=function(e,n,r){if(this.relElevation=Co(n),this.relAzimuth=Co(e),this.relRoll=Co(r),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===t.CameraType.EXPLORING){var i=nl(el(),[1,0,0],Io((this.rotateWorld?1:-1)*this.relElevation)),o=nl(el(),[0,1,0],Io((this.rotateWorld?1:-1)*this.relAzimuth)),a=nl(el(),[0,0,1],Io(this.relRoll)),s=rl(el(),o,i);s=rl(el(),s,a);var u=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,d=i*s,p=i*u,v=o*a,y=o*s,g=o*u;return t[0]=1-h-p,t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-c-p,t[6]=d+v,t[7]=0,t[8]=f+y,t[9]=d-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}((c=new Hc(16),Hc!=Float32Array&&(c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[11]=0,c[12]=0,c[13]=0,c[14]=0),c[0]=1,c[5]=1,c[10]=1,c[15]=1,c),s);zc(this.matrix,this.matrix,[0,0,-this.distance]),function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],b=n[0],T=n[1],E=n[2],x=n[3];t[0]=b*r+T*s+E*h+x*v,t[1]=b*i+T*u+E*f+x*y,t[2]=b*o+T*c+E*d+x*g,t[3]=b*a+T*l+E*p+x*m,t[4]=(b=n[4])*r+(T=n[5])*s+(E=n[6])*h+(x=n[7])*v,t[5]=b*i+T*u+E*f+x*y,t[6]=b*o+T*c+E*d+x*g,t[7]=b*a+T*l+E*p+x*m,t[8]=(b=n[8])*r+(T=n[9])*s+(E=n[10])*h+(x=n[11])*v,t[9]=b*i+T*u+E*f+x*y,t[10]=b*o+T*c+E*d+x*g,t[11]=b*a+T*l+E*p+x*m,t[12]=(b=n[12])*r+(T=n[13])*s+(E=n[14])*h+(x=n[15])*v,t[13]=b*i+T*u+E*f+x*y,t[14]=b*o+T*c+E*d+x*g,t[15]=b*a+T*l+E*p+x*m}(this.matrix,this.matrix,u),zc(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}var c;return this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this._update(),this},o.pan=function(t,e){var n=Oo(t,e,0),r=Yc(this.position);return Kc(r,r,Zc(Wc(),this.right,n[0])),Kc(r,r,Zc(Wc(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},o.dolly=function(e){var n,r=this.forward,i=Yc(this.position);return n=Math.max(Math.min(this.distance+e*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,i[0]+=n*r[0],i[1]+=n*r[1],i[2]+=n*r[2],this._setPosition(i),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getDistance():this.type===t.CameraType.TRACKING&&Kc(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},o.createLandmark=function(t,e){void 0===e&&(e={});var n=e.position,r=void 0===n?this.position:n,i=e.focalPoint,o=void 0===i?this.focalPoint:i,a=e.roll,s=e.zoom,u=Lt.get(Cu);u.setType(this.type,void 0),u.setPosition(r[0],r[1]||this.position[1],r[2]||this.position[2]),u.setFocalPoint(o[0],o[1]||this.focalPoint[1],o[2]||this.focalPoint[2]),u.setRoll(a||this.roll),u.setZoom(s||this.zoom);var c,l,h={name:t,matrix:(c=u.getWorldTransform(),l=new Hc(16),l[0]=c[0],l[1]=c[1],l[2]=c[2],l[3]=c[3],l[4]=c[4],l[5]=c[5],l[6]=c[6],l[7]=c[7],l[8]=c[8],l[9]=c[9],l[10]=c[10],l[11]=c[11],l[12]=c[12],l[13]=c[13],l[14]=c[14],l[15]=c[15],l),right:Yc(u.right),up:Yc(u.up),forward:Yc(u.forward),position:Yc(u.getPosition()),focalPoint:Yc(u.getFocalPoint()),distanceVector:Yc(u.getDistanceVector()),distance:u.getDistance(),dollyingStep:u.getDollyingStep(),azimuth:u.getAzimuth(),elevation:u.getElevation(),roll:u.getRoll(),relAzimuth:u.relAzimuth,relElevation:u.relElevation,relRoll:u.relRoll,zoom:u.getZoom()};return this.landmarks.push(h),h},o.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=jc(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Fc(e,"Number")?{duration:e}:e,o=i.easing,a=void 0===o?"linear":o,s=i.duration,u=void 0===s?100:s,c=i.easingFunction,l=void 0===c?void 0:c,h=i.onfinish,f=void 0===h?void 0:h;if(0===u)return this.syncFromLandmark(r),void(f&&f());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,p=r.position,v=r.focalPoint,y=r.zoom,g=r.roll,m=l||Lt.get(Xo)(a),b=function(){n.setFocalPoint(v),n.setPosition(p),n.setRoll(g),n.setZoom(y),n.computeMatrix(),n.triggerUpdate(),f&&f()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var r=e-d;if(u<r)b();else{var i,o,a=m(r/u),s=Wc(),c=Wc();Qc(s,n.focalPoint,v,a),Qc(c,n.position,p,a),o=n.roll*(1-a)+g*a,i=n.zoom*(1-a)+y*a,n.setFocalPoint(s),n.setPosition(c),n.setRoll(o),n.setZoom(i),$c(s,v)+$c(c,p)>.01?(n.computeMatrix(),n.triggerUpdate(),u>r&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))):b()}}))}},o.syncFromLandmark=function(t){var e,n;this.matrix=((e=this.matrix)[0]=(n=t.matrix)[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e),this.right=Xc(this.right,t.right),this.up=Xc(this.up,t.up),this.forward=Xc(this.forward,t.forward),this.position=Xc(this.position,t.position),this.focalPoint=Xc(this.focalPoint,t.focalPoint),this.distanceVector=Xc(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},i}(t.Camera),t.AdvancedCamera=function(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([ut({token:Cu})],t.AdvancedCamera),Lt.register(t.AdvancedCamera);var pl=t.Syringe.defineToken(""),vl=t.Syringe.defineToken(""),yl=0;t.LayoutContext=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+yl++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),t.LayoutContext=fl([ct(),dl(0,lt(vl))],t.LayoutContext);var gl,ml,bl,Tl,El=t.Syringe.defineToken(""),xl=t.Syringe.defineToken(""),wl=t.Syringe.defineToken("");t.FragmentResult=function(t,e,n){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e},t.FragmentResult=fl([ut(),dl(0,lt(t.LayoutContext)),dl(1,lt(wl)),dl(2,lt(xl))],t.FragmentResult),(gl=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",gl.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(ml||(ml={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(bl||(bl={})),(Tl=t.PropertyName||(t.PropertyName={})).LAYOUT="display",Tl.LEFT="left",Tl.TOP="top",Tl.BOTTOM="bottom",Tl.RIGHT="right",Tl.WIDTH="width",Tl.HEIGHT="height",Tl.MIN_WIDTH="minWidth",Tl.MAX_WIDTH="maxWidth",Tl.MIN_HEIGHT="minHeight",Tl.MAX_HEIGHT="maxHeight",Tl.BOX_SIZING="boxSizing",Tl.PADDING="padding",Tl.PADDING_TOP="paddingTop",Tl.PADDING_BOTTOM="paddingBottom",Tl.PADDING_START="paddingLeft",Tl.PADDING_END="paddingRight",Tl.MARGIN="margin",Tl.MARGIN_TOP="marginTop",Tl.MARGIN_BOTTOM="marginBottom",Tl.MARGIN_START="marginLeft",Tl.MARGIN_END="marginRight",Tl.BORDER="border",Tl.BORDER_TOP="borderTop",Tl.BORDER_BOTTOM="borderBottom",Tl.BORDER_START="borderLeft",Tl.BORDER_END="borderRight",Tl.FLEX_DIRECTION="flexDirection",Tl.FLEX_WRAP="flexWrap",Tl.FLEX_FLOW="flexFlow",Tl.ALIGN_ITEMS="alignItems",Tl.ALIGN_CONTENT="alignContent",Tl.JUSTIFY_CONTENT="justifyContent",Tl.FLEX="flex",Tl.ALIGN_SELF="alignSelf",Tl.FLEX_SHRINK="flexShrink",Tl.FLEX_BASIS="flexBasis",Tl.FLEX_GROW="flexGrow",Tl.OFFSET_WIDTH="offsetWidth",Tl.OFFSET_HEIGHT="offsetHeight",Tl.ORDER="order";var Sl=function(t){if(t.isRejected||t.isFulfilled)return t;var e,n=!0,r=!1,i=!1,o=t.then((function(t){return i=!0,n=!1,e=t,t}),(function(t){throw r=!0,n=!1,t}));return o.isFulfilled=function(){return i},o.isPending=function(){return n},o.isRejected=function(){return r},o.getFullFilledValue=function(){return e},o},kl=function(){var t=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Nl=t.Syringe.defineToken(""),Pl=t.Syringe.defineToken("");t.LayoutChildren=function(){function e(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var n=e.prototype;return n.intrinsicSizes=function(){var e=new kl;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:t.LayoutTaskType.IntrinsicSizes,deferred:e}),e.promise},n.layoutNextFragment=function(e){if(this.layoutContext.mode===t.LayoutTaskType.IntrinsicSizes)throw new Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var n=new kl;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:n}),n.promise},e}(),t.LayoutChildren=fl([ut(),dl(0,lt(t.LayoutContext)),dl(1,lt(Pl))],t.LayoutChildren);var _l=t.Syringe.defineToken(""),Ml=t.Syringe.defineToken(""),Al=[0,0,0,0];t.LayoutEdges=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,y,g;this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0,this.options=e;var m=e.node.getAllStyle(),b=null!==(n=null===(r=m.get(t.PropertyName.PADDING_TOP))||void 0===r?void 0:r.value)&&void 0!==n?n:0,T=null!==(i=null===(o=m.get(t.PropertyName.PADDING_END))||void 0===o?void 0:o.value)&&void 0!==i?i:0,E=null!==(a=null===(s=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===s?void 0:s.value)&&void 0!==a?a:0,x=null!==(u=null===(c=m.get(t.PropertyName.PADDING_START))||void 0===c?void 0:c.value)&&void 0!==u?u:0,w=null!==(l=null===(h=m.get(t.PropertyName.PADDING_TOP))||void 0===h?void 0:h.value)&&void 0!==l?l:0,S=null!==(f=null===(d=m.get(t.PropertyName.PADDING_END))||void 0===d?void 0:d.value)&&void 0!==f?f:0,k=null!==(p=null===(v=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===v?void 0:v.value)&&void 0!==p?p:0,N=null!==(y=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==y?y:0;this.blockStart=b+Al[0]+w,this.inlineStart=T+Al[1]+S,this.blockEnd=E+Al[2]+k,this.inlineEnd=x+Al[3]+N,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEdges=fl([ut(),dl(0,lt(Ml))],t.LayoutEdges);var Cl=function(t){return void 0===t&&(t=0),new Promise((function(e){setTimeout((function(){e()}),t)}))};t.LayoutEngine=function(){function e(t,e,n){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}var n=e.prototype;return n.computeLayout=function(){var t=ul(al().mark((function t(e,n){return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,n);case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.determineAllIntrinsicSizes=function(){var t=ul(al().mark((function t(e){return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),n.getLayoutDefinitionName=function(e){var n=e.getAllStyle().get(t.PropertyName.LAYOUT);if(!n)throw new Error("layout property not found");return n.value},n.determineIntrinsicSizes=function(){var t=ul(al().mark((function t(e,n){var r;return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(r,e,n);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.invokeIntrinsicSizesCallback=function(){var e=ul(al().mark((function e(n,r,i){var o,a,s,u,c,l,h,f,d,p,v;return al().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.layoutRegistry.getLayout(n),a=new o,s=this.layoutContextFactory({mode:t.LayoutTaskType.IntrinsicSizes}),c=void 0===(u=o.inputProperties)?[]:u,l=[],i.forEach((function(t){var e=s.layoutChildrenFactory({node:t});l.push(e)})),h=this.layoutEdgesFactory({node:r}),f=r.getStyle.apply(r,c),d=a.intrinsicSizes(l,h,f),(p=this.runWorkQueue(d,s.workQueue)).next(),e.next=13,Cl();case 13:v=p.next().value,s.clearWorkQueue(),r.setIntrisicSizes(v);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.calculateLayout=function(){var t=ul(al().mark((function t(e,n,r){var i;return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(i,e,n,r);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),n.invokeLayoutCallback=function(){var e=ul(al().mark((function e(n,r,i,o){var a,s,u,c,l,h,f,d,p,v,y,g,m;return al().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.layoutRegistry.getLayout(n),s=new a,u=this.layoutContextFactory({mode:t.LayoutTaskType.Layout}),l=void 0===(c=a.inputProperties)?[]:c,h=[],i.forEach((function(t){var e=u.layoutChildrenFactory({node:t});h.push(e)})),f=this.layoutEdgesFactory({node:r}),d=r.getStyle.apply(r,l),p=s.layout(h,f,o,d),(v=this.runWorkQueue(p,u.workQueue)).next(),e.next=13,Cl();case 13:y=v.next().value,u.clearWorkQueue(),g=y instanceof t.FragmentResult?y:u.fragmentResultFactory(y),m=u.layoutFragmentFactory({inlineSize:g.inlineSize,blockSize:g.blockSize,data:g.data}),r.setComputedLayout(m),i.forEach((function(t,e){t.setComputedLayout(g.childFragments[e])}));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),n.runWorkQueue=al().mark((function e(n,r){var i,o=this;return al().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Sl(n),r.length>0&&i.isPending()&&r.forEach((function(e){e.taskType===t.LayoutTaskType.IntrinsicSizes&&e.deferred.resolve(o.getNodeIntrisicSizes(e.layoutChild.node));if(e.taskType===t.LayoutTaskType.Layout){var n=e.layoutChild,r=e.deferred,i=n.layoutContext,a=o.getNodeFragment(n.node,e.layoutConstraints);r.resolve(i.layoutFragmentFactory(a))}})),void(e.next=4);case 4:if(i.isFulfilled()){e.next=6;break}throw new Error("promise not fullfilled!");case 6:return e.abrupt("return",i.getFullFilledValue());case 7:case"end":return e.stop()}}),e)})),n.getNodeIntrisicSizes=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p=e.getAllStyle();return{minContentInlineSize:(null===(n=p.get(t.PropertyName.MIN_WIDTH))||void 0===n?void 0:n.value)||(null===(r=e.intrisicSizes)||void 0===r?void 0:r.minContentInlineSize)||(null===(i=p.get(t.PropertyName.WIDTH))||void 0===i?void 0:i.value)||0,maxContentInlineSize:(null===(o=p.get(t.PropertyName.MAX_WIDTH))||void 0===o?void 0:o.value)||(null===(a=e.intrisicSizes)||void 0===a?void 0:a.maxContentInlineSize)||(null===(s=p.get(t.PropertyName.WIDTH))||void 0===s?void 0:s.value)||0,minContentBlockSize:(null===(u=p.get(t.PropertyName.MIN_HEIGHT))||void 0===u?void 0:u.value)||(null===(c=e.intrisicSizes)||void 0===c?void 0:c.minContentBlockSize)||(null===(l=p.get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,maxContentBlockSize:(null===(h=p.get(t.PropertyName.MAX_HEIGHT))||void 0===h?void 0:h.value)||(null===(f=e.intrisicSizes)||void 0===f?void 0:f.maxContentBlockSize)||(null===(d=p.get(t.PropertyName.HEIGHT))||void 0===d?void 0:d.value)||0}},n.getNodeFragment=function(e,n){var r,i,o,a,s,u;return{inlineSize:(null===(r=e.getComputedLayout())||void 0===r?void 0:r.inlineSize)||(null===(i=e.getAllStyle().get(t.PropertyName.MIN_WIDTH))||void 0===i?void 0:i.value)||(null===(o=e.getAllStyle().get(t.PropertyName.WIDTH))||void 0===o?void 0:o.value)||0,blockSize:(null===(a=e.getComputedLayout())||void 0===a?void 0:a.blockSize)||(null===(s=e.getAllStyle().get(t.PropertyName.MIN_HEIGHT))||void 0===s?void 0:s.value)||(null===(u=e.getAllStyle().get(t.PropertyName.HEIGHT))||void 0===u?void 0:u.value)||0,data:n.data}},e}(),t.LayoutEngine=fl([ct(),dl(0,lt(ao)),dl(1,lt(pl)),dl(2,lt(_l))],t.LayoutEngine);var Ol,Il,Rl=t.Syringe.defineToken(""),Ll=t.Syringe.defineToken("");t.LayoutFragment=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},t.LayoutFragment=fl([ut(),dl(0,lt(t.LayoutContext)),dl(1,lt(Ll))],t.LayoutFragment),t.DefaultLayoutRegistry=((Ol=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(void 0===t&&(t="absolute"),!this.hasLayout(t))throw new Error("invalid layout property: "+t);return this.registry.get(t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(t,e){if(""===t)throw new TypeError("layout name cant't be empty");if(Il.reservedLayout.includes(t))throw new Error("layout name '"+t+"' is a system reserved layout name, please use another name");if(this.hasLayout(t))throw new Error("layout '"+t+"' already exist.");this.registry.set(t,e)},e.deleteLayout=function(t){this.registry.delete(t)},ll(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],Il=Ol),t.DefaultLayoutRegistry=Il=fl([ct({token:ao})],t.DefaultLayoutRegistry);var Dl=At((function(e){e(t.DefaultLayoutRegistry),e(t.LayoutEngine),e(t.LayoutEdges),e({token:_l,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Ml,useValue:n}),r.get(t.LayoutEdges)}}}),e({token:pl,useFactory:function(e){return function(n){var r=e.container.createChild();r.register(t.LayoutContext),r.register(t.LayoutChildren),r.register({token:Nl,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Pl,useValue:n}),r.get(t.LayoutChildren)}}}),r.register(t.FragmentResult),r.register({token:El,useFactory:function(e){return function(n,r){var i=e.container.createChild();return i.register({token:xl,useValue:n}),i.register({token:wl,useValue:r}),i.get(t.FragmentResult)}}}),r.register(t.LayoutFragment),r.register({token:Rl,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Ll,useValue:n}),r.get(t.LayoutFragment)}}});var i=r.get(Nl),o=r.get(Rl),a=r.get(El);return r.register({token:vl,useValue:hl({},n,{layoutChildrenFactory:i,layoutFragmentFactory:o,fragmentResultFactory:a})}),r.get(t.LayoutContext)}}})})),Fl=function(){};Fl.inputProperties=void 0,Fl.childrenInputProperties=void 0,Fl.layoutOptions=void 0;var Bl=1,Gl=function(){function e(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=Bl++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var n=e.prototype;return n.setMeasure=function(t){this.measureFn=t},n.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},n.addChild=function(t){var e;null===(e=this.children)||void 0===e||e.push(t)},n.insertChild=function(t,e){this.children.splice(t,0,e)},n.removeChild=function(t){var e,n=null===(e=this.children)||void 0===e?void 0:e.findIndex((function(e){return e.id===t.id}));this.removeChildAtIndex(n)},n.removeChildAtIndex=function(t){this.children.splice(t,1)},n.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},n.setStyle=function(t,e){this.style.set(t,e)},n.getStyle=function(){for(var t=this,e=new Map,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return r.forEach((function(n){var r=t.style.get(n);r&&e.set(n,r)})),e},n.getAllStyle=function(){return this.style},n.markDirty=function(){this.dirty=!0},n.idDirty=function(){return this.dirty},n.getSize=function(){var e,n,r,i;return{width:null!==(e=null===(n=this.style.get(t.PropertyName.WIDTH))||void 0===n?void 0:n.value)&&void 0!==e?e:0,height:null!==(r=null===(i=this.style.get(t.PropertyName.HEIGHT))||void 0===i?void 0:i.value)&&void 0!==r?r:0}},n.computeLayout=function(){var t=ul(al().mark((function t(){var e;return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,Vl.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.setComputedLayout=function(t){this.computedLayout=t},n.getComputedLayout=function(){return this.computedLayout},n.getAllComputedLayout=function(){},n.toString=function(){return"LayoutObject "+this.id},ll(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}();Lt.load(Dl);var Ul,jl,Vl=Lt.get(t.LayoutEngine),Hl=function(){function t(t,e){this.type=void 0,this.target=void 0,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[],this.type=t,this.target=e}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),zl=0,Wl=new WeakMap,Yl=function(){function e(t,e,n){this.observer=void 0,this.target=void 0,this.options=void 0,this.transientObservedNodes=[],this.observer=t,this.target=e,this.options=n}var n=e.prototype;return n.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var r=function(t,e){return t===e?t:jl&&function(t){return t===jl||t===Ul}(t)?jl:null}(e[n-1],t);if(r)return void(e[n-1]=r)}else Jl.push(this.observer),Zl||(Zl=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(Ql):Ql());e[n]=t},n.addListeners=function(){this.addListeners_(this.target)},n.addListeners_=function(e){var n=this.options;n.attributes&&e.addEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeListeners=function(){this.removeListeners_(this.target)},n.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=Wl.get(t),n=0;e.length>n;n++)if(e[n]===this){e.splice(n,1);break}}),this)},n.handleEvent=function(e){var n,r;switch(e.stopImmediatePropagation(),e.type){case t.ElementEvent.ATTR_MODIFIED:var i=e.attrName,o=e.relatedNode.namespaceURI;(n=Xl("attributes",r=e.target)).attributeName=i,n.attributeNamespace=o;var a=e.attrChange===Us.ADDITION?null:e.prevValue;Kl(r,(function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(i)||-1!==t.attributeFilter.indexOf(o)))return t.attributeOldValue?function(t){return jl||((jl=Hl.copy(Ul)).oldValue=t,jl)}(a):n}));break;case t.ElementEvent.REMOVED:case t.ElementEvent.INSERTED:var s,u,c=e.target;e.type===t.ElementEvent.INSERTED?(s=[c],u=[]):(s=[],u=[c]);var l=c.previousSibling,h=c.nextSibling;(n=Xl("childList",r=e.relatedNode)).addedNodes=s,n.removedNodes=u,n.previousSibling=l,n.nextSibling=h,Kl(r,(function(t){if(t.childList)return n}))}Ul=jl=void 0},e}(),ql=function(){function t(t){this.callback=void 0,this.nodes=[],this.records=[],this.uid=zl++,this.callback=t}var e=t.prototype;return e.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=Wl.get(t);r||Wl.set(t,r=[]);for(var i=0;r.length>i;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new Yl(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},e.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=Wl.get(e),r=0;n.length>r;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},e.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function Xl(t,e){return Ul=new Hl(t,e)}function Kl(t,e){for(var n=t;n;n=n.parentNode){var r=Wl.get(n);if(r)for(var i=0;r.length>i;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var Zl=!1,Jl=[];function Ql(){Zl=!1;var t=Jl;Jl=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=Wl.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&Ql()}function $l(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function th(t,e,n){return e&&$l(t.prototype,e),n&&$l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function eh(t,e){return eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},eh(t,e)}var nh=function(t){var e,n;function r(e,n,r,i){var o;return(o=t.call(this,e)||this).currentTime=void 0,o.timelineTime=void 0,o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,eh(e,n),r}(Cs),rh=0,ih=function(){function t(t,e){var n;this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=t,t.animation=this,this.timeline=e,this.id=""+rh++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(this.playbackRate<0){if(this._totalDuration>=1/0)throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}else this.currentTime=0},e.persist=function(){throw new Error(No)},e.addEventListener=function(t,e,n){throw new Error(No)},e.removeEventListener=function(t,e,n){throw new Error(No)},e.dispatchEvent=function(t){throw new Error(No)},e.commitStyles=function(){throw new Error(No)},e.ensureAlive=function(){var t,e;0>this.playbackRate&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new nh(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new nh(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},th(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(t=Number(t),!isNaN(t)){var e;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate;this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),oh=.1,ah="function"==typeof Float32Array,sh=function(t,e){return 1-3*e+3*t},uh=function(t,e){return 3*e-6*t},ch=function(t){return 3*t},lh=function(t,e,n){return((sh(e,n)*t+uh(e,n))*t+ch(e))*t},hh=function(t,e,n){return 3*sh(e,n)*t*t+2*uh(e,n)*t+ch(e)},fh=function(t,e,n,r){if(0>t||t>1||0>n||n>1)throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=ah?new Float32Array(11):new Array(11),o=0;11>o;++o)i[o]=lh(o*oh,t,n);var a=function(e){for(var r=0,o=1;10!==o&&e>=i[o];++o)r+=oh;--o;var a=r+(e-i[o])/(i[o+1]-i[o])*oh,s=hh(a,t,n);return.001>s?0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=lh(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&10>++s);return a}(e,r,r+oh,t,n):function(t,e,n,r){for(var i=0;4>i;++i){var o=hh(e,n,r);if(0===o)return e;e-=(lh(e,n,r)-t)/o}return e}(e,a,t,n)};return function(t){return 0===t||1===t?t:lh(a(t),e,r)}},dh={}.toString,ph=function(t,e){return dh.call(t)==="[object "+e+"]"},vh=function(t){return ph(t,"Function")},yh=function(t){return null==t};function gh(t,e){var n;if(t)if(n=t,Array.isArray?Array.isArray(n):ph(n,"Array"))for(var r=0,i=t.length;i>r&&!1!==e(t[r],r);r++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}var mh,bh=function(t,e,n){return e>t?e:t>n?n:t},Th=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return gh(t,(function(n,r){vh(t)&&"prototype"===r||e.push(n)})),e};!function(t,e){if(!vh(t))throw new TypeError("Expected a function");var n=function n(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};n.cache=new Map}((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return mh||(mh=document.createElement("canvas").getContext("2d")),mh.font=[o,a,i,n+"px",r].join(" "),mh.measureText(function(t){return ph(t,"String")}(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;n>e;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;n>e;e++)for(var o=arguments[e],a=0,s=o.length;s>a;a++,i++)r[i]=o[a];return r}([t],Th(e)).join("")}));var Eh=function(t){return Math.pow(t,2)},xh=function(t){return Math.pow(t,3)},wh=function(t){return Math.pow(t,4)},Sh=function(t){return Math.pow(t,5)},kh=function(t){return Math.pow(t,6)},Nh=function(t){return 1-Math.cos(t*Math.PI/2)},Ph=function(t){return 1-Math.sqrt(1-t*t)},_h=function(t){return t*t*(3*t-2)},Mh=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},Ah=function(t,e){void 0===e&&(e=[]);var n=e[0],r=e[1],i=void 0===r?.5:r,o=bh(Number(void 0===n?1:n),1,10),a=bh(Number(i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin((t-1-a/(2*Math.PI)*Math.asin(1/o))*(2*Math.PI)/a)},Ch=function(t,e,n){void 0===e&&(e=[]);var r=e[0],i=void 0===r?1:r,o=e[1],a=void 0===o?100:o,s=e[2],u=void 0===s?10:s,c=e[3],l=void 0===c?0:c;i=bh(i,.1,1e3),a=bh(a,.1,1e3),u=bh(u,.1,1e3),l=bh(l,.1,1e3);var h=Math.sqrt(a/i),f=u/(2*Math.sqrt(a*i)),d=1>f?h*Math.sqrt(1-f*f):0,p=1>f?(f*h-l)/d:-l+h,v=n?n*t/1e3:t;return v=1>f?Math.exp(-v*f*h)*(1*Math.cos(d*v)+p*Math.sin(d*v)):(1+p*v)*Math.exp(-v*h),0===t||1===t?t:1-v},Oh=function(t,e){void 0===e&&(e=[]);var n=e[0],r=void 0===n?10:n;return("start"==e[1]?Math.ceil:Math.floor)(bh(t,0,1)*r)/r},Ih=function(t,e){void 0===e&&(e=[]);return fh(e[0],e[1],e[2],e[3])(t)},Rh=fh(.42,0,1,1),Lh=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},Dh=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},Fh=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},Bh={steps:Oh,"step-start":function(t){return Oh(t,[1,"start"])},"step-end":function(t){return Oh(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Ih,ease:function(t){return Ih(t,[.25,.1,.25,1])},in:Rh,out:Lh(Rh),"in-out":Dh(Rh),"out-in":Fh(Rh),"in-quad":Eh,"out-quad":Lh(Eh),"in-out-quad":Dh(Eh),"out-in-quad":Fh(Eh),"in-cubic":xh,"out-cubic":Lh(xh),"in-out-cubic":Dh(xh),"out-in-cubic":Fh(xh),"in-quart":wh,"out-quart":Lh(wh),"in-out-quart":Dh(wh),"out-in-quart":Fh(wh),"in-quint":Sh,"out-quint":Lh(Sh),"in-out-quint":Dh(Sh),"out-in-quint":Fh(Sh),"in-expo":kh,"out-expo":Lh(kh),"in-out-expo":Dh(kh),"out-in-expo":Fh(kh),"in-sine":Nh,"out-sine":Lh(Nh),"in-out-sine":Dh(Nh),"out-in-sine":Fh(Nh),"in-circ":Ph,"out-circ":Lh(Ph),"in-out-circ":Dh(Ph),"out-in-circ":Fh(Ph),"in-back":_h,"out-back":Lh(_h),"in-out-back":Dh(_h),"out-in-back":Fh(_h),"in-bounce":Mh,"out-bounce":Lh(Mh),"in-out-bounce":Dh(Mh),"out-in-bounce":Fh(Mh),"in-elastic":Ah,"out-elastic":Lh(Ah),"in-out-elastic":Dh(Ah),"out-in-elastic":Fh(Ah),spring:Ch,"spring-in":Ch,"spring-out":Lh(Ch),"spring-in-out":Dh(Ch),"spring-out-in":Fh(Ch)},Gh=function(t){return t};function Uh(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var jh="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Vh=new RegExp("cubic-bezier\\("+jh+","+jh+","+jh+","+jh+"\\)"),Hh=/steps\(\s*(\d+)\s*\)/,zh=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Wh(t){var e=Vh.exec(t);if(e)return fh.apply(void 0,e.slice(1).map(Number));var n=Hh.exec(t);if(n)return Uh(Number(n[1]),0);var r=zh.exec(t);return r?Uh(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Bh[function(t){return function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substring(1):t}(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Bh.linear}function Yh(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function qh(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e<Math.min(n.delay+t+n.endDelay,r)?3:2}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),u=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}function Xh(t,e,n){var r=function(t,e){for(var n={},r=0;t.length>r;r++)for(var i in t[r])if(Kh(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Wh(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;i.length-1>o;o++){var a=o,s=o+1,u=i[a].computedOffset,c=i[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===i.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:Jh(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&t.applyTo>e})).forEach((function(n){var r=n.endOffset-n.startOffset,i=0===r?0:n.easingFunction((e-n.startOffset)/r);t.style[n.property]=n.interpolation(i)}));else for(var n in r)Kh(n)&&(t.style[n]=null)}}function Kh(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var Zh=function(t,e,n){return function(r){return n(Qh(t,e,r))}};function Jh(t,e,n,r){var i=ac[t];if(i&&i.syntax&&i.int){var o=Rc.getPropertySyntax(i.syntax);if(o){var a=Rc.parseProperty(t,e,r),s=Rc.parseProperty(t,n,r),u=Rc.computeProperty(t,a,r),c=Rc.computeProperty(t,s,r),l=o.mixer(u,c,r);if(l){var h=Zh.apply(void 0,l);return function(t){return 0===t?e:1===t?n:h(t)}}}}return Zh(!1,!0,(function(t){return t?n:e}))}function Qh(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e||"string"==typeof t&&"string"==typeof e)return.5>n?t:e;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){for(var r=[],i=0;t.length>i;i++)r.push(Qh(t[i],e[i],n));return r}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var $h=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Gh,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return th(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=Wh(t),this._easing=t}}]),t}();function tf(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;i>o;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}null!=r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(0>i||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error(i+" compositing is not supported");n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;n.length>o;o++){var a=n[o].offset;if(yh(a))r=!1;else{if(i>a)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter((function(t){return Number(t.offset)>=0&&1>=Number(t.offset)})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;r>a;a++){var s=n[a].computedOffset;if(!yh(s)&&!yh(o)){for(var u=1;a-i>u;u++)n[i+u].computedOffset=o+(Number(s)-o)*u/(a-i);i=a,o=Number(s)}}}(),n}var ef="backwards|forwards|both|none".split("|"),nf="reverse|alternate|alternate-reverse".split("|");function rf(t,e){var n=new $h;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(null!=t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===ef.indexOf(t[e]))return;if("direction"===e&&-1===nf.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function of(t,e){var n;return rf(t=af(null!==(n=t)&&void 0!==n?n:{duration:"auto"}),e)}function af(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var sf=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=of(n,!1),this.timing.effect=this,this.timing.activeDuration=Yh(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=tf(e,this.timing),this.interpolations=Xh(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=qh(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=tf(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}();function uf(t,e){return Number(t.id)-Number(e.id)}t.AnimationTimeline=function(){function t(){var t=this;this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.document=void 0,this.webAnimationsNextTick=function(e){t.currentTime=e,t.discardAnimations(),0===t.animations.length?t.timelineTicking=!1:t.requestAnimationFrame(t.webAnimationsNextTick)},this.processRafCallbacks=function(e){var n=t.rafCallbacks;t.rafCallbacks=[],e<Number(t.currentTime)&&(e=Number(t.currentTime)),t.animations.sort(uf),t.animations=t.tick(e,!0,t.animations)[0],n.forEach((function(t){t[1](e)})),t.applyPendingEffects()}}var e=t.prototype;return e.attach=function(t){this.document=t},e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){var r=new sf(t,e,n),i=new ih(r,this);return this.animations.push(i),this.restartWebAnimationsNextTick(),i.updatePromises(),i.play(),i.updatePromises(),i},e.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(uf),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},e.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?u.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,a),(i=this.pendingEffects).push.apply(i,s),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),t.AnimationTimeline=function(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([ct({token:qo})],t.AnimationTimeline);var cf=At((function(e){e({token:Xo,useValue:Wh}),e(t.AnimationTimeline)}));Lt.load(cf),t.AABB=La,t.AbstractLayoutDefinition=Fl,t.AbstractRenderer=bc,t.AbstractRendererPlugin=function(){this.container=void 0},t.Animation=ih,t.AnimationEvent=nh,t.AnimationTimelineToken=qo,t.BUILT_IN_PROPERTIES=oc,t.CSS=so,t.CSSGradientValue=ki,t.CSSKeywordValue=Ni,t.CSSRGB=io,t.CSSStyleValue=wi,t.CSSUnitValue=Wi,t.CameraContribution=Cu,t.CameraEvent=Ou,t.Canvas=Ic,t.CanvasConfig=Yo,t.Circle=ru,t.ContextNode=wl,t.ContextService=Ms,t.CustomElement=ou,t.CustomElementRegistry=As,t.CustomEvent=Os,t.DefaultCamera=Au,t.DisplayObject=eu,t.Document=Ds,t.ERROR_MSG_METHOD_NOT_IMPLEMENTED=No,t.Element=Xs,t.Ellipse=su,t.EventTarget=Is,t.FederatedEvent=Cs,t.FederatedMouseEvent=Ks,t.FederatedPointerEvent=Zs,t.FederatedWheelEvent=Js,t.FragmentResultFactory=El,t.FragmentResultOptions=xl,t.Frustum=Fa,t.GeometryAABBUpdater=Ss,t.GeometryUpdaterFactory=ws,t.GlobalContainer=Lt,t.Group=cu,t.HTML=hu,t.Image=du,t.KeyframeEffect=sf,t.LayoutChildrenFactory=Nl,t.LayoutChildrenOptions=Pl,t.LayoutContextFactory=pl,t.LayoutContextOptions=vl,t.LayoutEdgesFactory=_l,t.LayoutEdgesOptions=Ml,t.LayoutFragmentFactory=Rl,t.LayoutFragmentOptions=Ll,t.LayoutObject=Gl,t.LayoutRegistry=ao,t.Line=vu,t.Module=At,t.MutationEvent=Us,t.MutationObserver=ql,t.MutationRecord=Hl,t.Node=Rs,t.ParseEasingFunction=Xo,t.Path=gu,t.Plane=Da,t.Point=Ba,t.Polygon=bu,t.Polyline=Eu,t.RBush=jt,t.RBushRoot=Bs,t.Rect=wu,t.Rectangle=Ga,t.Registration=Yl,t.RenderingContext=Nu,t.RenderingPluginContribution=Ru,t.SceneGraphSelector=Du,t.SceneGraphSelectorFactory=Lu,t.SceneGraphService=Gs,t.StyleValueRegistry=oo,t.Text=ku,t.compareAnimations=uf,t.computeLinearGradient=function(t,e,n){var r=n*Math.PI/180,i=0+t/2,o=0+e/2,a=Math.abs(t*Math.cos(r))+Math.abs(e*Math.sin(r));return{x1:i-Math.cos(r)*a/2,y1:o-Math.sin(r)*a/2,x2:i+Math.cos(r)*a/2,y2:o+Math.sin(r)*a/2}},t.computeRadialGradient=function(t,e,n,r){return{x:n*t,y:r*e,r:Math.sqrt(t*t+e*e)/2}},t.convertToPath=function(e,n){void 0===n&&(n=!0);var r=[];switch(e.nodeName){case t.Shape.LINE:var i=e.parsedStyle;r=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.x1,i.y1,i.x2,i.y2);break;case t.Shape.CIRCLE:var o=e.parsedStyle,a=o.r;r=Zo(a,a,o.cx,o.cy);break;case t.Shape.ELLIPSE:var s=e.parsedStyle;r=Zo(s.rx,s.ry,s.cx,s.cy);break;case t.Shape.POLYLINE:case t.Shape.POLYGON:r=function(t,e){var n=t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}));return e&&n.push(["Z"]),n}(e.parsedStyle.points.points,e.nodeName===t.Shape.POLYGON);break;case t.Shape.RECT:var u=e.parsedStyle,c=u.width,l=u.height,h=u.x,f=u.y,d=u.radius,p=d&&d.some((function(t){return 0!==t}));r=function(t,e,n,r,i){if(i){var o=i[0],a=i[1],s=i[2],u=i[3],c=t>0?1:-1,l=e>0?1:-1,h=c+l!==0?1:0;return[["M",c*o+n,r],["L",t-c*a+n,r],a?["A",a,a,0,0,h,t+n,l*a+r]:null,["L",t+n,e-l*s+r],s?["A",s,s,0,0,h,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,h,n,e+r-l*u]:null,["L",n,l*o+r],o?["A",o,o,0,0,h,c*o+n,r]:null,["Z"]].filter((function(t){return t}))}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(c,l,h,f,p&&d.map((function(t){return nr(t,0,Math.min(Math.abs(c)/2,Math.abs(l)/2))})));break;case t.Shape.PATH:var v=e.parsedStyle.path,y=v.zCommandIndexes;r=[].concat(v.curve),y.forEach((function(t,e){r.splice(t+e,1,["Z"])}))}if(r.length)return function(t,e,n){var r;void 0===n&&(n=!0),n&&(r=e.getLocalTransform());var i=e.parsedStyle,o=i.defX,a=void 0===o?0:o,s=i.defY,u=void 0===s?0:s;return t.reduce((function(t,e){var i="";if("M"===e[0]||"L"===e[0]){var o=Ce(e[1]-a,e[2]-u,0);n&&Ue(o,o,r),i=""+e[0]+o[0]+","+o[1]}else if("Z"===e[0])i=e[0];else if("C"===e[0]){var s=Ce(e[1]-a,e[2]-u,0),c=Ce(e[3]-a,e[4]-u,0),l=Ce(e[5]-a,e[6]-u,0);n&&(Ue(s,s,r),Ue(c,c,r),Ue(l,l,r)),i=""+e[0]+s[0]+","+s[1]+","+c[0]+","+c[1]+","+l[0]+","+l[1]}else if("A"===e[0]){var h=Ce(e[6]-a,e[7]-u,0);n&&Ue(h,h,r),i=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+h[0]+","+h[1]}return t+i}),"")}(r,e,n)},t.createVec3=Oo,t.definedProps=function(t){return Object.fromEntries(Object.entries(t).filter((function(t){return void 0!==t[1]})))},t.deg2rad=Io,t.deg2turn=function(t){return t/360},t.findClosestClipPathTarget=So,t.getAngle=Co,t.getEuler=Do,t.getOrCalculatePathTotalLength=Ko,t.grad2deg=function(t){return 0>(t%=400)&&(t+=400),t/400*360},t.inject=lt,t.injectable=ut,t.isBrowser=xo,t.isFillOrStrokeAffected=function(t,e,n){var r=!1,i=!1;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=!!e&&!e.isNone,i=!!n&&!n.isNone):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(r=!0,i=!0),[r,i]},t.isPattern=Ca,t.layoutEngine=Vl,t.makeTiming=rf,t.mergeColors=Ia,t.normalizeKeyframes=tf,t.normalizeTimingInput=of,t.numericTimingToObject=af,t.parseColor=Oa,t.parseLength=ja,t.parsePath=rs,t.propertyMetadataCache=ac,t.rad2deg=Ro,t.setDOMSize=function(t,e,n){xo&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")},t.singleton=ct,t.styleValueRegistry=Rc,t.translatePathToString=function(t,e,n,r,i,o,a){void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=t.map((function(s,u){var c="Z"===t[t.length-1][0],l=u===t.length-(c?2:1)?o:0,h=u===t.length-(c?2:1)?a:0;switch(s[0]){case"M":return"M "+(s[1]-e+r)+","+(s[2]-n+i);case"L":return"L "+(s[1]-e+l)+","+(s[2]-n+h);case"Q":return"Q "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e+l)+" "+(s[4]-n+h);case"C":return"C "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e)+" "+(s[4]-n)+","+(s[5]-e+l)+" "+(s[6]-n+h);case"A":return"A "+s[1]+" "+s[2]+" "+s[3]+" "+s[4]+" "+s[5]+" "+(s[6]-e+l)+" "+(s[7]-n+h);case"Z":return"Z"}})).join(" ");return~s.indexOf("NaN")?"":s},t.turn2deg=Lo,Object.defineProperty(t,"__esModule",{value:!0})}));
17
+ al=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new w(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(p=y);var g=d.prototype=h.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function T(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,T(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function sl(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ul(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){sl(o,r,i,a,s,"next",t)}function s(t){sl(o,r,i,a,s,"throw",t)}a(void 0)}))}}function cl(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ll(t,e,n){return e&&cl(t.prototype,e),n&&cl(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function hl(){return hl=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hl.apply(this,arguments)}function fl(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function dl(t,e){return function(n,r){e(n,r,t)}}t.AdvancedCamera=function(e){var n,r;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).landmarks=[],t.landmarkAnimationID=void 0,t}r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,Lc(n,r);var o=i.prototype;return o.rotate=function(e,n,r){if(this.relElevation=Co(n),this.relAzimuth=Co(e),this.relRoll=Co(r),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===t.CameraType.EXPLORING){var i=nl(el(),[1,0,0],Io((this.rotateWorld?1:-1)*this.relElevation)),o=nl(el(),[0,1,0],Io((this.rotateWorld?1:-1)*this.relAzimuth)),a=nl(el(),[0,0,1],Io(this.relRoll)),s=rl(el(),o,i);s=rl(el(),s,a);var u=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,d=i*s,p=i*u,v=o*a,y=o*s,g=o*u;return t[0]=1-h-p,t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-c-p,t[6]=d+v,t[7]=0,t[8]=f+y,t[9]=d-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}((c=new Hc(16),Hc!=Float32Array&&(c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[11]=0,c[12]=0,c[13]=0,c[14]=0),c[0]=1,c[5]=1,c[10]=1,c[15]=1,c),s);zc(this.matrix,this.matrix,[0,0,-this.distance]),function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],b=n[0],T=n[1],E=n[2],x=n[3];t[0]=b*r+T*s+E*h+x*v,t[1]=b*i+T*u+E*f+x*y,t[2]=b*o+T*c+E*d+x*g,t[3]=b*a+T*l+E*p+x*m,t[4]=(b=n[4])*r+(T=n[5])*s+(E=n[6])*h+(x=n[7])*v,t[5]=b*i+T*u+E*f+x*y,t[6]=b*o+T*c+E*d+x*g,t[7]=b*a+T*l+E*p+x*m,t[8]=(b=n[8])*r+(T=n[9])*s+(E=n[10])*h+(x=n[11])*v,t[9]=b*i+T*u+E*f+x*y,t[10]=b*o+T*c+E*d+x*g,t[11]=b*a+T*l+E*p+x*m,t[12]=(b=n[12])*r+(T=n[13])*s+(E=n[14])*h+(x=n[15])*v,t[13]=b*i+T*u+E*f+x*y,t[14]=b*o+T*c+E*d+x*g,t[15]=b*a+T*l+E*p+x*m}(this.matrix,this.matrix,u),zc(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}var c;return this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this._update(),this},o.pan=function(t,e){var n=Oo(t,e,0),r=Yc(this.position);return Kc(r,r,Zc(Wc(),this.right,n[0])),Kc(r,r,Zc(Wc(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},o.dolly=function(e){var n,r=this.forward,i=Yc(this.position);return n=Math.max(Math.min(this.distance+e*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,i[0]+=n*r[0],i[1]+=n*r[1],i[2]+=n*r[2],this._setPosition(i),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getDistance():this.type===t.CameraType.TRACKING&&Kc(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},o.createLandmark=function(t,e){void 0===e&&(e={});var n=e.position,r=void 0===n?this.position:n,i=e.focalPoint,o=void 0===i?this.focalPoint:i,a=e.roll,s=e.zoom,u=Lt.get(Cu);u.setType(this.type,void 0),u.setPosition(r[0],r[1]||this.position[1],r[2]||this.position[2]),u.setFocalPoint(o[0],o[1]||this.focalPoint[1],o[2]||this.focalPoint[2]),u.setRoll(a||this.roll),u.setZoom(s||this.zoom);var c,l,h={name:t,matrix:(c=u.getWorldTransform(),l=new Hc(16),l[0]=c[0],l[1]=c[1],l[2]=c[2],l[3]=c[3],l[4]=c[4],l[5]=c[5],l[6]=c[6],l[7]=c[7],l[8]=c[8],l[9]=c[9],l[10]=c[10],l[11]=c[11],l[12]=c[12],l[13]=c[13],l[14]=c[14],l[15]=c[15],l),right:Yc(u.right),up:Yc(u.up),forward:Yc(u.forward),position:Yc(u.getPosition()),focalPoint:Yc(u.getFocalPoint()),distanceVector:Yc(u.getDistanceVector()),distance:u.getDistance(),dollyingStep:u.getDollyingStep(),azimuth:u.getAzimuth(),elevation:u.getElevation(),roll:u.getRoll(),relAzimuth:u.relAzimuth,relElevation:u.relElevation,relRoll:u.relRoll,zoom:u.getZoom()};return this.landmarks.push(h),h},o.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=jc(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Fc(e,"Number")?{duration:e}:e,o=i.easing,a=void 0===o?"linear":o,s=i.duration,u=void 0===s?100:s,c=i.easingFunction,l=void 0===c?void 0:c,h=i.onfinish,f=void 0===h?void 0:h;if(0===u)return this.syncFromLandmark(r),void(f&&f());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,p=r.position,v=r.focalPoint,y=r.zoom,g=r.roll,m=l||Lt.get(Xo)(a),b=function(){n.setFocalPoint(v),n.setPosition(p),n.setRoll(g),n.setZoom(y),n.computeMatrix(),n.triggerUpdate(),f&&f()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var r=e-d;if(u<r)b();else{var i,o,a=m(r/u),s=Wc(),c=Wc();Qc(s,n.focalPoint,v,a),Qc(c,n.position,p,a),o=n.roll*(1-a)+g*a,i=n.zoom*(1-a)+y*a,n.setFocalPoint(s),n.setPosition(c),n.setRoll(o),n.setZoom(i),$c(s,v)+$c(c,p)>.01?(n.computeMatrix(),n.triggerUpdate(),u>r&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))):b()}}))}},o.syncFromLandmark=function(t){var e,n;this.matrix=((e=this.matrix)[0]=(n=t.matrix)[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e),this.right=Xc(this.right,t.right),this.up=Xc(this.up,t.up),this.forward=Xc(this.forward,t.forward),this.position=Xc(this.position,t.position),this.focalPoint=Xc(this.focalPoint,t.focalPoint),this.distanceVector=Xc(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},i}(t.Camera),t.AdvancedCamera=function(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([ut({token:Cu})],t.AdvancedCamera),Lt.register(t.AdvancedCamera),eu.prototype.getCount=function(){return this.childElementCount},eu.prototype.getParent=function(){return this.parentElement},eu.prototype.getChildren=function(){return this.children},eu.prototype.getFirst=function(){return this.firstElementChild},eu.prototype.getLast=function(){return this.lastElementChild},eu.prototype.getChildByIndex=function(t){return this.children[t]||null},eu.prototype.add=function(t,e){return this.appendChild(t,e)},eu.prototype.setClip=function(t){this.style.clipPath=t},eu.prototype.getClip=function(){return this.style.clipPath||null},eu.prototype.set=function(t,e){this.config[t]=e},eu.prototype.get=function(t){return this.config[t]},eu.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},eu.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},eu.prototype.setZIndex=function(t){return this.style.zIndex=t,this};var pl=t.Syringe.defineToken(""),vl=t.Syringe.defineToken(""),yl=0;t.LayoutContext=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+yl++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),t.LayoutContext=fl([ct(),dl(0,lt(vl))],t.LayoutContext);var gl,ml,bl,Tl,El=t.Syringe.defineToken(""),xl=t.Syringe.defineToken(""),wl=t.Syringe.defineToken("");t.FragmentResult=function(t,e,n){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e},t.FragmentResult=fl([ut(),dl(0,lt(t.LayoutContext)),dl(1,lt(wl)),dl(2,lt(xl))],t.FragmentResult),(gl=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",gl.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(ml||(ml={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(bl||(bl={})),(Tl=t.PropertyName||(t.PropertyName={})).LAYOUT="display",Tl.LEFT="left",Tl.TOP="top",Tl.BOTTOM="bottom",Tl.RIGHT="right",Tl.WIDTH="width",Tl.HEIGHT="height",Tl.MIN_WIDTH="minWidth",Tl.MAX_WIDTH="maxWidth",Tl.MIN_HEIGHT="minHeight",Tl.MAX_HEIGHT="maxHeight",Tl.BOX_SIZING="boxSizing",Tl.PADDING="padding",Tl.PADDING_TOP="paddingTop",Tl.PADDING_BOTTOM="paddingBottom",Tl.PADDING_START="paddingLeft",Tl.PADDING_END="paddingRight",Tl.MARGIN="margin",Tl.MARGIN_TOP="marginTop",Tl.MARGIN_BOTTOM="marginBottom",Tl.MARGIN_START="marginLeft",Tl.MARGIN_END="marginRight",Tl.BORDER="border",Tl.BORDER_TOP="borderTop",Tl.BORDER_BOTTOM="borderBottom",Tl.BORDER_START="borderLeft",Tl.BORDER_END="borderRight",Tl.FLEX_DIRECTION="flexDirection",Tl.FLEX_WRAP="flexWrap",Tl.FLEX_FLOW="flexFlow",Tl.ALIGN_ITEMS="alignItems",Tl.ALIGN_CONTENT="alignContent",Tl.JUSTIFY_CONTENT="justifyContent",Tl.FLEX="flex",Tl.ALIGN_SELF="alignSelf",Tl.FLEX_SHRINK="flexShrink",Tl.FLEX_BASIS="flexBasis",Tl.FLEX_GROW="flexGrow",Tl.OFFSET_WIDTH="offsetWidth",Tl.OFFSET_HEIGHT="offsetHeight",Tl.ORDER="order";var Sl=function(t){if(t.isRejected||t.isFulfilled)return t;var e,n=!0,r=!1,i=!1,o=t.then((function(t){return i=!0,n=!1,e=t,t}),(function(t){throw r=!0,n=!1,t}));return o.isFulfilled=function(){return i},o.isPending=function(){return n},o.isRejected=function(){return r},o.getFullFilledValue=function(){return e},o},kl=function(){var t=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Nl=t.Syringe.defineToken(""),Pl=t.Syringe.defineToken("");t.LayoutChildren=function(){function e(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var n=e.prototype;return n.intrinsicSizes=function(){var e=new kl;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:t.LayoutTaskType.IntrinsicSizes,deferred:e}),e.promise},n.layoutNextFragment=function(e){if(this.layoutContext.mode===t.LayoutTaskType.IntrinsicSizes)throw new Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var n=new kl;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:n}),n.promise},e}(),t.LayoutChildren=fl([ut(),dl(0,lt(t.LayoutContext)),dl(1,lt(Pl))],t.LayoutChildren);var _l=t.Syringe.defineToken(""),Ml=t.Syringe.defineToken(""),Al=[0,0,0,0];t.LayoutEdges=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,y,g;this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0,this.options=e;var m=e.node.getAllStyle(),b=null!==(n=null===(r=m.get(t.PropertyName.PADDING_TOP))||void 0===r?void 0:r.value)&&void 0!==n?n:0,T=null!==(i=null===(o=m.get(t.PropertyName.PADDING_END))||void 0===o?void 0:o.value)&&void 0!==i?i:0,E=null!==(a=null===(s=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===s?void 0:s.value)&&void 0!==a?a:0,x=null!==(u=null===(c=m.get(t.PropertyName.PADDING_START))||void 0===c?void 0:c.value)&&void 0!==u?u:0,w=null!==(l=null===(h=m.get(t.PropertyName.PADDING_TOP))||void 0===h?void 0:h.value)&&void 0!==l?l:0,S=null!==(f=null===(d=m.get(t.PropertyName.PADDING_END))||void 0===d?void 0:d.value)&&void 0!==f?f:0,k=null!==(p=null===(v=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===v?void 0:v.value)&&void 0!==p?p:0,N=null!==(y=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==y?y:0;this.blockStart=b+Al[0]+w,this.inlineStart=T+Al[1]+S,this.blockEnd=E+Al[2]+k,this.inlineEnd=x+Al[3]+N,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEdges=fl([ut(),dl(0,lt(Ml))],t.LayoutEdges);var Cl=function(t){return void 0===t&&(t=0),new Promise((function(e){setTimeout((function(){e()}),t)}))};t.LayoutEngine=function(){function e(t,e,n){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}var n=e.prototype;return n.computeLayout=function(){var t=ul(al().mark((function t(e,n){return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,n);case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.determineAllIntrinsicSizes=function(){var t=ul(al().mark((function t(e){return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),n.getLayoutDefinitionName=function(e){var n=e.getAllStyle().get(t.PropertyName.LAYOUT);if(!n)throw new Error("layout property not found");return n.value},n.determineIntrinsicSizes=function(){var t=ul(al().mark((function t(e,n){var r;return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(r,e,n);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.invokeIntrinsicSizesCallback=function(){var e=ul(al().mark((function e(n,r,i){var o,a,s,u,c,l,h,f,d,p,v;return al().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.layoutRegistry.getLayout(n),a=new o,s=this.layoutContextFactory({mode:t.LayoutTaskType.IntrinsicSizes}),c=void 0===(u=o.inputProperties)?[]:u,l=[],i.forEach((function(t){var e=s.layoutChildrenFactory({node:t});l.push(e)})),h=this.layoutEdgesFactory({node:r}),f=r.getStyle.apply(r,c),d=a.intrinsicSizes(l,h,f),(p=this.runWorkQueue(d,s.workQueue)).next(),e.next=13,Cl();case 13:v=p.next().value,s.clearWorkQueue(),r.setIntrisicSizes(v);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.calculateLayout=function(){var t=ul(al().mark((function t(e,n,r){var i;return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(i,e,n,r);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),n.invokeLayoutCallback=function(){var e=ul(al().mark((function e(n,r,i,o){var a,s,u,c,l,h,f,d,p,v,y,g,m;return al().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.layoutRegistry.getLayout(n),s=new a,u=this.layoutContextFactory({mode:t.LayoutTaskType.Layout}),l=void 0===(c=a.inputProperties)?[]:c,h=[],i.forEach((function(t){var e=u.layoutChildrenFactory({node:t});h.push(e)})),f=this.layoutEdgesFactory({node:r}),d=r.getStyle.apply(r,l),p=s.layout(h,f,o,d),(v=this.runWorkQueue(p,u.workQueue)).next(),e.next=13,Cl();case 13:y=v.next().value,u.clearWorkQueue(),g=y instanceof t.FragmentResult?y:u.fragmentResultFactory(y),m=u.layoutFragmentFactory({inlineSize:g.inlineSize,blockSize:g.blockSize,data:g.data}),r.setComputedLayout(m),i.forEach((function(t,e){t.setComputedLayout(g.childFragments[e])}));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),n.runWorkQueue=al().mark((function e(n,r){var i,o=this;return al().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Sl(n),r.length>0&&i.isPending()&&r.forEach((function(e){e.taskType===t.LayoutTaskType.IntrinsicSizes&&e.deferred.resolve(o.getNodeIntrisicSizes(e.layoutChild.node));if(e.taskType===t.LayoutTaskType.Layout){var n=e.layoutChild,r=e.deferred,i=n.layoutContext,a=o.getNodeFragment(n.node,e.layoutConstraints);r.resolve(i.layoutFragmentFactory(a))}})),void(e.next=4);case 4:if(i.isFulfilled()){e.next=6;break}throw new Error("promise not fullfilled!");case 6:return e.abrupt("return",i.getFullFilledValue());case 7:case"end":return e.stop()}}),e)})),n.getNodeIntrisicSizes=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p=e.getAllStyle();return{minContentInlineSize:(null===(n=p.get(t.PropertyName.MIN_WIDTH))||void 0===n?void 0:n.value)||(null===(r=e.intrisicSizes)||void 0===r?void 0:r.minContentInlineSize)||(null===(i=p.get(t.PropertyName.WIDTH))||void 0===i?void 0:i.value)||0,maxContentInlineSize:(null===(o=p.get(t.PropertyName.MAX_WIDTH))||void 0===o?void 0:o.value)||(null===(a=e.intrisicSizes)||void 0===a?void 0:a.maxContentInlineSize)||(null===(s=p.get(t.PropertyName.WIDTH))||void 0===s?void 0:s.value)||0,minContentBlockSize:(null===(u=p.get(t.PropertyName.MIN_HEIGHT))||void 0===u?void 0:u.value)||(null===(c=e.intrisicSizes)||void 0===c?void 0:c.minContentBlockSize)||(null===(l=p.get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,maxContentBlockSize:(null===(h=p.get(t.PropertyName.MAX_HEIGHT))||void 0===h?void 0:h.value)||(null===(f=e.intrisicSizes)||void 0===f?void 0:f.maxContentBlockSize)||(null===(d=p.get(t.PropertyName.HEIGHT))||void 0===d?void 0:d.value)||0}},n.getNodeFragment=function(e,n){var r,i,o,a,s,u;return{inlineSize:(null===(r=e.getComputedLayout())||void 0===r?void 0:r.inlineSize)||(null===(i=e.getAllStyle().get(t.PropertyName.MIN_WIDTH))||void 0===i?void 0:i.value)||(null===(o=e.getAllStyle().get(t.PropertyName.WIDTH))||void 0===o?void 0:o.value)||0,blockSize:(null===(a=e.getComputedLayout())||void 0===a?void 0:a.blockSize)||(null===(s=e.getAllStyle().get(t.PropertyName.MIN_HEIGHT))||void 0===s?void 0:s.value)||(null===(u=e.getAllStyle().get(t.PropertyName.HEIGHT))||void 0===u?void 0:u.value)||0,data:n.data}},e}(),t.LayoutEngine=fl([ct(),dl(0,lt(ao)),dl(1,lt(pl)),dl(2,lt(_l))],t.LayoutEngine);var Ol,Il,Rl=t.Syringe.defineToken(""),Ll=t.Syringe.defineToken("");t.LayoutFragment=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},t.LayoutFragment=fl([ut(),dl(0,lt(t.LayoutContext)),dl(1,lt(Ll))],t.LayoutFragment),t.DefaultLayoutRegistry=((Ol=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(void 0===t&&(t="absolute"),!this.hasLayout(t))throw new Error("invalid layout property: "+t);return this.registry.get(t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(t,e){if(""===t)throw new TypeError("layout name cant't be empty");if(Il.reservedLayout.includes(t))throw new Error("layout name '"+t+"' is a system reserved layout name, please use another name");if(this.hasLayout(t))throw new Error("layout '"+t+"' already exist.");this.registry.set(t,e)},e.deleteLayout=function(t){this.registry.delete(t)},ll(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],Il=Ol),t.DefaultLayoutRegistry=Il=fl([ct({token:ao})],t.DefaultLayoutRegistry);var Dl=At((function(e){e(t.DefaultLayoutRegistry),e(t.LayoutEngine),e(t.LayoutEdges),e({token:_l,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Ml,useValue:n}),r.get(t.LayoutEdges)}}}),e({token:pl,useFactory:function(e){return function(n){var r=e.container.createChild();r.register(t.LayoutContext),r.register(t.LayoutChildren),r.register({token:Nl,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Pl,useValue:n}),r.get(t.LayoutChildren)}}}),r.register(t.FragmentResult),r.register({token:El,useFactory:function(e){return function(n,r){var i=e.container.createChild();return i.register({token:xl,useValue:n}),i.register({token:wl,useValue:r}),i.get(t.FragmentResult)}}}),r.register(t.LayoutFragment),r.register({token:Rl,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Ll,useValue:n}),r.get(t.LayoutFragment)}}});var i=r.get(Nl),o=r.get(Rl),a=r.get(El);return r.register({token:vl,useValue:hl({},n,{layoutChildrenFactory:i,layoutFragmentFactory:o,fragmentResultFactory:a})}),r.get(t.LayoutContext)}}})})),Fl=function(){};Fl.inputProperties=void 0,Fl.childrenInputProperties=void 0,Fl.layoutOptions=void 0;var Bl=1,Gl=function(){function e(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=Bl++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var n=e.prototype;return n.setMeasure=function(t){this.measureFn=t},n.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},n.addChild=function(t){var e;null===(e=this.children)||void 0===e||e.push(t)},n.insertChild=function(t,e){this.children.splice(t,0,e)},n.removeChild=function(t){var e,n=null===(e=this.children)||void 0===e?void 0:e.findIndex((function(e){return e.id===t.id}));this.removeChildAtIndex(n)},n.removeChildAtIndex=function(t){this.children.splice(t,1)},n.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},n.setStyle=function(t,e){this.style.set(t,e)},n.getStyle=function(){for(var t=this,e=new Map,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return r.forEach((function(n){var r=t.style.get(n);r&&e.set(n,r)})),e},n.getAllStyle=function(){return this.style},n.markDirty=function(){this.dirty=!0},n.idDirty=function(){return this.dirty},n.getSize=function(){var e,n,r,i;return{width:null!==(e=null===(n=this.style.get(t.PropertyName.WIDTH))||void 0===n?void 0:n.value)&&void 0!==e?e:0,height:null!==(r=null===(i=this.style.get(t.PropertyName.HEIGHT))||void 0===i?void 0:i.value)&&void 0!==r?r:0}},n.computeLayout=function(){var t=ul(al().mark((function t(){var e;return al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,Vl.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.setComputedLayout=function(t){this.computedLayout=t},n.getComputedLayout=function(){return this.computedLayout},n.getAllComputedLayout=function(){},n.toString=function(){return"LayoutObject "+this.id},ll(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}();Lt.load(Dl);var Ul,jl,Vl=Lt.get(t.LayoutEngine),Hl=function(){function t(t,e){this.type=void 0,this.target=void 0,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[],this.type=t,this.target=e}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),zl=0,Wl=new WeakMap,Yl=function(){function e(t,e,n){this.observer=void 0,this.target=void 0,this.options=void 0,this.transientObservedNodes=[],this.observer=t,this.target=e,this.options=n}var n=e.prototype;return n.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var r=function(t,e){return t===e?t:jl&&function(t){return t===jl||t===Ul}(t)?jl:null}(e[n-1],t);if(r)return void(e[n-1]=r)}else Jl.push(this.observer),Zl||(Zl=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(Ql):Ql());e[n]=t},n.addListeners=function(){this.addListeners_(this.target)},n.addListeners_=function(e){var n=this.options;n.attributes&&e.addEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeListeners=function(){this.removeListeners_(this.target)},n.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=Wl.get(t),n=0;e.length>n;n++)if(e[n]===this){e.splice(n,1);break}}),this)},n.handleEvent=function(e){var n,r;switch(e.stopImmediatePropagation(),e.type){case t.ElementEvent.ATTR_MODIFIED:var i=e.attrName,o=e.relatedNode.namespaceURI;(n=Xl("attributes",r=e.target)).attributeName=i,n.attributeNamespace=o;var a=e.attrChange===Us.ADDITION?null:e.prevValue;Kl(r,(function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(i)||-1!==t.attributeFilter.indexOf(o)))return t.attributeOldValue?function(t){return jl||((jl=Hl.copy(Ul)).oldValue=t,jl)}(a):n}));break;case t.ElementEvent.REMOVED:case t.ElementEvent.INSERTED:var s,u,c=e.target;e.type===t.ElementEvent.INSERTED?(s=[c],u=[]):(s=[],u=[c]);var l=c.previousSibling,h=c.nextSibling;(n=Xl("childList",r=e.relatedNode)).addedNodes=s,n.removedNodes=u,n.previousSibling=l,n.nextSibling=h,Kl(r,(function(t){if(t.childList)return n}))}Ul=jl=void 0},e}(),ql=function(){function t(t){this.callback=void 0,this.nodes=[],this.records=[],this.uid=zl++,this.callback=t}var e=t.prototype;return e.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=Wl.get(t);r||Wl.set(t,r=[]);for(var i=0;r.length>i;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new Yl(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},e.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=Wl.get(e),r=0;n.length>r;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},e.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function Xl(t,e){return Ul=new Hl(t,e)}function Kl(t,e){for(var n=t;n;n=n.parentNode){var r=Wl.get(n);if(r)for(var i=0;r.length>i;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var Zl=!1,Jl=[];function Ql(){Zl=!1;var t=Jl;Jl=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=Wl.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&Ql()}function $l(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function th(t,e,n){return e&&$l(t.prototype,e),n&&$l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function eh(t,e){return eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},eh(t,e)}var nh=function(t){var e,n;function r(e,n,r,i){var o;return(o=t.call(this,e)||this).currentTime=void 0,o.timelineTime=void 0,o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,eh(e,n),r}(Cs),rh=0,ih=function(){function t(t,e){var n;this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=t,t.animation=this,this.timeline=e,this.id=""+rh++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(this.playbackRate<0){if(this._totalDuration>=1/0)throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}else this.currentTime=0},e.persist=function(){throw new Error(No)},e.addEventListener=function(t,e,n){throw new Error(No)},e.removeEventListener=function(t,e,n){throw new Error(No)},e.dispatchEvent=function(t){throw new Error(No)},e.commitStyles=function(){throw new Error(No)},e.ensureAlive=function(){var t,e;0>this.playbackRate&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new nh(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new nh(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},th(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(t=Number(t),!isNaN(t)){var e;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate;this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),oh=.1,ah="function"==typeof Float32Array,sh=function(t,e){return 1-3*e+3*t},uh=function(t,e){return 3*e-6*t},ch=function(t){return 3*t},lh=function(t,e,n){return((sh(e,n)*t+uh(e,n))*t+ch(e))*t},hh=function(t,e,n){return 3*sh(e,n)*t*t+2*uh(e,n)*t+ch(e)},fh=function(t,e,n,r){if(0>t||t>1||0>n||n>1)throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=ah?new Float32Array(11):new Array(11),o=0;11>o;++o)i[o]=lh(o*oh,t,n);var a=function(e){for(var r=0,o=1;10!==o&&e>=i[o];++o)r+=oh;--o;var a=r+(e-i[o])/(i[o+1]-i[o])*oh,s=hh(a,t,n);return.001>s?0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=lh(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&10>++s);return a}(e,r,r+oh,t,n):function(t,e,n,r){for(var i=0;4>i;++i){var o=hh(e,n,r);if(0===o)return e;e-=(lh(e,n,r)-t)/o}return e}(e,a,t,n)};return function(t){return 0===t||1===t?t:lh(a(t),e,r)}},dh={}.toString,ph=function(t,e){return dh.call(t)==="[object "+e+"]"},vh=function(t){return ph(t,"Function")},yh=function(t){return null==t};function gh(t,e){var n;if(t)if(n=t,Array.isArray?Array.isArray(n):ph(n,"Array"))for(var r=0,i=t.length;i>r&&!1!==e(t[r],r);r++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}var mh,bh=function(t,e,n){return e>t?e:t>n?n:t},Th=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return gh(t,(function(n,r){vh(t)&&"prototype"===r||e.push(n)})),e};!function(t,e){if(!vh(t))throw new TypeError("Expected a function");var n=function n(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};n.cache=new Map}((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return mh||(mh=document.createElement("canvas").getContext("2d")),mh.font=[o,a,i,n+"px",r].join(" "),mh.measureText(function(t){return ph(t,"String")}(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;n>e;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;n>e;e++)for(var o=arguments[e],a=0,s=o.length;s>a;a++,i++)r[i]=o[a];return r}([t],Th(e)).join("")}));var Eh=function(t){return Math.pow(t,2)},xh=function(t){return Math.pow(t,3)},wh=function(t){return Math.pow(t,4)},Sh=function(t){return Math.pow(t,5)},kh=function(t){return Math.pow(t,6)},Nh=function(t){return 1-Math.cos(t*Math.PI/2)},Ph=function(t){return 1-Math.sqrt(1-t*t)},_h=function(t){return t*t*(3*t-2)},Mh=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},Ah=function(t,e){void 0===e&&(e=[]);var n=e[0],r=e[1],i=void 0===r?.5:r,o=bh(Number(void 0===n?1:n),1,10),a=bh(Number(i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin((t-1-a/(2*Math.PI)*Math.asin(1/o))*(2*Math.PI)/a)},Ch=function(t,e,n){void 0===e&&(e=[]);var r=e[0],i=void 0===r?1:r,o=e[1],a=void 0===o?100:o,s=e[2],u=void 0===s?10:s,c=e[3],l=void 0===c?0:c;i=bh(i,.1,1e3),a=bh(a,.1,1e3),u=bh(u,.1,1e3),l=bh(l,.1,1e3);var h=Math.sqrt(a/i),f=u/(2*Math.sqrt(a*i)),d=1>f?h*Math.sqrt(1-f*f):0,p=1>f?(f*h-l)/d:-l+h,v=n?n*t/1e3:t;return v=1>f?Math.exp(-v*f*h)*(1*Math.cos(d*v)+p*Math.sin(d*v)):(1+p*v)*Math.exp(-v*h),0===t||1===t?t:1-v},Oh=function(t,e){void 0===e&&(e=[]);var n=e[0],r=void 0===n?10:n;return("start"==e[1]?Math.ceil:Math.floor)(bh(t,0,1)*r)/r},Ih=function(t,e){void 0===e&&(e=[]);return fh(e[0],e[1],e[2],e[3])(t)},Rh=fh(.42,0,1,1),Lh=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},Dh=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},Fh=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},Bh={steps:Oh,"step-start":function(t){return Oh(t,[1,"start"])},"step-end":function(t){return Oh(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Ih,ease:function(t){return Ih(t,[.25,.1,.25,1])},in:Rh,out:Lh(Rh),"in-out":Dh(Rh),"out-in":Fh(Rh),"in-quad":Eh,"out-quad":Lh(Eh),"in-out-quad":Dh(Eh),"out-in-quad":Fh(Eh),"in-cubic":xh,"out-cubic":Lh(xh),"in-out-cubic":Dh(xh),"out-in-cubic":Fh(xh),"in-quart":wh,"out-quart":Lh(wh),"in-out-quart":Dh(wh),"out-in-quart":Fh(wh),"in-quint":Sh,"out-quint":Lh(Sh),"in-out-quint":Dh(Sh),"out-in-quint":Fh(Sh),"in-expo":kh,"out-expo":Lh(kh),"in-out-expo":Dh(kh),"out-in-expo":Fh(kh),"in-sine":Nh,"out-sine":Lh(Nh),"in-out-sine":Dh(Nh),"out-in-sine":Fh(Nh),"in-circ":Ph,"out-circ":Lh(Ph),"in-out-circ":Dh(Ph),"out-in-circ":Fh(Ph),"in-back":_h,"out-back":Lh(_h),"in-out-back":Dh(_h),"out-in-back":Fh(_h),"in-bounce":Mh,"out-bounce":Lh(Mh),"in-out-bounce":Dh(Mh),"out-in-bounce":Fh(Mh),"in-elastic":Ah,"out-elastic":Lh(Ah),"in-out-elastic":Dh(Ah),"out-in-elastic":Fh(Ah),spring:Ch,"spring-in":Ch,"spring-out":Lh(Ch),"spring-in-out":Dh(Ch),"spring-out-in":Fh(Ch)},Gh=function(t){return t};function Uh(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var jh="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Vh=new RegExp("cubic-bezier\\("+jh+","+jh+","+jh+","+jh+"\\)"),Hh=/steps\(\s*(\d+)\s*\)/,zh=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Wh(t){var e=Vh.exec(t);if(e)return fh.apply(void 0,e.slice(1).map(Number));var n=Hh.exec(t);if(n)return Uh(Number(n[1]),0);var r=zh.exec(t);return r?Uh(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Bh[function(t){return function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substring(1):t}(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Bh.linear}function Yh(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function qh(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e<Math.min(n.delay+t+n.endDelay,r)?3:2}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),u=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}function Xh(t,e,n){var r=function(t,e){for(var n={},r=0;t.length>r;r++)for(var i in t[r])if(Kh(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Wh(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;i.length-1>o;o++){var a=o,s=o+1,u=i[a].computedOffset,c=i[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===i.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:Jh(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&t.applyTo>e})).forEach((function(n){var r=n.endOffset-n.startOffset,i=0===r?0:n.easingFunction((e-n.startOffset)/r);t.style[n.property]=n.interpolation(i)}));else for(var n in r)Kh(n)&&(t.style[n]=null)}}function Kh(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var Zh=function(t,e,n){return function(r){return n(Qh(t,e,r))}};function Jh(t,e,n,r){var i=ac[t];if(i&&i.syntax&&i.int){var o=Rc.getPropertySyntax(i.syntax);if(o){var a=Rc.parseProperty(t,e,r),s=Rc.parseProperty(t,n,r),u=Rc.computeProperty(t,a,r),c=Rc.computeProperty(t,s,r),l=o.mixer(u,c,r);if(l){var h=Zh.apply(void 0,l);return function(t){return 0===t?e:1===t?n:h(t)}}}}return Zh(!1,!0,(function(t){return t?n:e}))}function Qh(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e||"string"==typeof t&&"string"==typeof e)return.5>n?t:e;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){for(var r=[],i=0;t.length>i;i++)r.push(Qh(t[i],e[i],n));return r}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var $h=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Gh,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return th(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=Wh(t),this._easing=t}}]),t}();function tf(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;i>o;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}null!=r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(0>i||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error(i+" compositing is not supported");n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;n.length>o;o++){var a=n[o].offset;if(yh(a))r=!1;else{if(i>a)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter((function(t){return Number(t.offset)>=0&&1>=Number(t.offset)})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;r>a;a++){var s=n[a].computedOffset;if(!yh(s)&&!yh(o)){for(var u=1;a-i>u;u++)n[i+u].computedOffset=o+(Number(s)-o)*u/(a-i);i=a,o=Number(s)}}}(),n}var ef="backwards|forwards|both|none".split("|"),nf="reverse|alternate|alternate-reverse".split("|");function rf(t,e){var n=new $h;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(null!=t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===ef.indexOf(t[e]))return;if("direction"===e&&-1===nf.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function of(t,e){var n;return rf(t=af(null!==(n=t)&&void 0!==n?n:{duration:"auto"}),e)}function af(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var sf=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=of(n,!1),this.timing.effect=this,this.timing.activeDuration=Yh(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=tf(e,this.timing),this.interpolations=Xh(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=qh(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=tf(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}();function uf(t,e){return Number(t.id)-Number(e.id)}t.AnimationTimeline=function(){function t(){var t=this;this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.document=void 0,this.webAnimationsNextTick=function(e){t.currentTime=e,t.discardAnimations(),0===t.animations.length?t.timelineTicking=!1:t.requestAnimationFrame(t.webAnimationsNextTick)},this.processRafCallbacks=function(e){var n=t.rafCallbacks;t.rafCallbacks=[],e<Number(t.currentTime)&&(e=Number(t.currentTime)),t.animations.sort(uf),t.animations=t.tick(e,!0,t.animations)[0],n.forEach((function(t){t[1](e)})),t.applyPendingEffects()}}var e=t.prototype;return e.attach=function(t){this.document=t},e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){var r=new sf(t,e,n),i=new ih(r,this);return this.animations.push(i),this.restartWebAnimationsNextTick(),i.updatePromises(),i.play(),i.updatePromises(),i},e.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(uf),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},e.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?u.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,a),(i=this.pendingEffects).push.apply(i,s),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),t.AnimationTimeline=function(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([ct({token:qo})],t.AnimationTimeline);var cf=At((function(e){e({token:Xo,useValue:Wh}),e(t.AnimationTimeline)}));Lt.load(cf),t.AABB=La,t.AbstractLayoutDefinition=Fl,t.AbstractRenderer=bc,t.AbstractRendererPlugin=function(){this.container=void 0},t.Animation=ih,t.AnimationEvent=nh,t.AnimationTimelineToken=qo,t.BUILT_IN_PROPERTIES=oc,t.CSS=so,t.CSSGradientValue=ki,t.CSSKeywordValue=Ni,t.CSSRGB=io,t.CSSStyleValue=wi,t.CSSUnitValue=Wi,t.CameraContribution=Cu,t.CameraEvent=Ou,t.Canvas=Ic,t.CanvasConfig=Yo,t.Circle=ru,t.ContextNode=wl,t.ContextService=Ms,t.CustomElement=ou,t.CustomElementRegistry=As,t.CustomEvent=Os,t.DefaultCamera=Au,t.DisplayObject=eu,t.Document=Ds,t.ERROR_MSG_METHOD_NOT_IMPLEMENTED=No,t.Element=Xs,t.Ellipse=su,t.EventTarget=Is,t.FederatedEvent=Cs,t.FederatedMouseEvent=Ks,t.FederatedPointerEvent=Zs,t.FederatedWheelEvent=Js,t.FragmentResultFactory=El,t.FragmentResultOptions=xl,t.Frustum=Fa,t.GeometryAABBUpdater=Ss,t.GeometryUpdaterFactory=ws,t.GlobalContainer=Lt,t.Group=cu,t.HTML=hu,t.Image=du,t.KeyframeEffect=sf,t.LayoutChildrenFactory=Nl,t.LayoutChildrenOptions=Pl,t.LayoutContextFactory=pl,t.LayoutContextOptions=vl,t.LayoutEdgesFactory=_l,t.LayoutEdgesOptions=Ml,t.LayoutFragmentFactory=Rl,t.LayoutFragmentOptions=Ll,t.LayoutObject=Gl,t.LayoutRegistry=ao,t.Line=vu,t.Module=At,t.MutationEvent=Us,t.MutationObserver=ql,t.MutationRecord=Hl,t.Node=Rs,t.ParseEasingFunction=Xo,t.Path=gu,t.Plane=Da,t.Point=Ba,t.Polygon=bu,t.Polyline=Eu,t.RBush=jt,t.RBushRoot=Bs,t.Rect=wu,t.Rectangle=Ga,t.Registration=Yl,t.RenderingContext=Nu,t.RenderingPluginContribution=Ru,t.SceneGraphSelector=Du,t.SceneGraphSelectorFactory=Lu,t.SceneGraphService=Gs,t.StyleValueRegistry=oo,t.Text=ku,t.compareAnimations=uf,t.computeLinearGradient=function(t,e,n){var r=n*Math.PI/180,i=0+t/2,o=0+e/2,a=Math.abs(t*Math.cos(r))+Math.abs(e*Math.sin(r));return{x1:i-Math.cos(r)*a/2,y1:o-Math.sin(r)*a/2,x2:i+Math.cos(r)*a/2,y2:o+Math.sin(r)*a/2}},t.computeRadialGradient=function(t,e,n,r){return{x:n*t,y:r*e,r:Math.sqrt(t*t+e*e)/2}},t.convertToPath=function(e,n){void 0===n&&(n=!0);var r=[];switch(e.nodeName){case t.Shape.LINE:var i=e.parsedStyle;r=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.x1,i.y1,i.x2,i.y2);break;case t.Shape.CIRCLE:var o=e.parsedStyle,a=o.r;r=Zo(a,a,o.cx,o.cy);break;case t.Shape.ELLIPSE:var s=e.parsedStyle;r=Zo(s.rx,s.ry,s.cx,s.cy);break;case t.Shape.POLYLINE:case t.Shape.POLYGON:r=function(t,e){var n=t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}));return e&&n.push(["Z"]),n}(e.parsedStyle.points.points,e.nodeName===t.Shape.POLYGON);break;case t.Shape.RECT:var u=e.parsedStyle,c=u.width,l=u.height,h=u.x,f=u.y,d=u.radius,p=d&&d.some((function(t){return 0!==t}));r=function(t,e,n,r,i){if(i){var o=i[0],a=i[1],s=i[2],u=i[3],c=t>0?1:-1,l=e>0?1:-1,h=c+l!==0?1:0;return[["M",c*o+n,r],["L",t-c*a+n,r],a?["A",a,a,0,0,h,t+n,l*a+r]:null,["L",t+n,e-l*s+r],s?["A",s,s,0,0,h,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,h,n,e+r-l*u]:null,["L",n,l*o+r],o?["A",o,o,0,0,h,c*o+n,r]:null,["Z"]].filter((function(t){return t}))}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(c,l,h,f,p&&d.map((function(t){return nr(t,0,Math.min(Math.abs(c)/2,Math.abs(l)/2))})));break;case t.Shape.PATH:var v=e.parsedStyle.path,y=v.zCommandIndexes;r=[].concat(v.curve),y.forEach((function(t,e){r.splice(t+e,1,["Z"])}))}if(r.length)return function(t,e,n){var r;void 0===n&&(n=!0),n&&(r=e.getLocalTransform());var i=e.parsedStyle,o=i.defX,a=void 0===o?0:o,s=i.defY,u=void 0===s?0:s;return t.reduce((function(t,e){var i="";if("M"===e[0]||"L"===e[0]){var o=Ce(e[1]-a,e[2]-u,0);n&&Ue(o,o,r),i=""+e[0]+o[0]+","+o[1]}else if("Z"===e[0])i=e[0];else if("C"===e[0]){var s=Ce(e[1]-a,e[2]-u,0),c=Ce(e[3]-a,e[4]-u,0),l=Ce(e[5]-a,e[6]-u,0);n&&(Ue(s,s,r),Ue(c,c,r),Ue(l,l,r)),i=""+e[0]+s[0]+","+s[1]+","+c[0]+","+c[1]+","+l[0]+","+l[1]}else if("A"===e[0]){var h=Ce(e[6]-a,e[7]-u,0);n&&Ue(h,h,r),i=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+h[0]+","+h[1]}return t+i}),"")}(r,e,n)},t.createVec3=Oo,t.decompose=Bo,t.definedProps=function(t){return Object.fromEntries(Object.entries(t).filter((function(t){return void 0!==t[1]})))},t.deg2rad=Io,t.deg2turn=function(t){return t/360},t.findClosestClipPathTarget=So,t.getAngle=Co,t.getEuler=Do,t.getOrCalculatePathTotalLength=Ko,t.grad2deg=function(t){return 0>(t%=400)&&(t+=400),t/400*360},t.inject=lt,t.injectable=ut,t.isBrowser=xo,t.isFillOrStrokeAffected=function(t,e,n){var r=!1,i=!1;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=!!e&&!e.isNone,i=!!n&&!n.isNone):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(r=!0,i=!0),[r,i]},t.isPattern=Ca,t.layoutEngine=Vl,t.makeTiming=rf,t.mergeColors=Ia,t.normalizeKeyframes=tf,t.normalizeTimingInput=of,t.numericTimingToObject=af,t.parseColor=Oa,t.parseLength=ja,t.parsePath=rs,t.propertyMetadataCache=ac,t.rad2deg=Ro,t.setDOMSize=function(t,e,n){xo&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")},t.singleton=ct,t.styleValueRegistry=Rc,t.translatePathToString=function(t,e,n,r,i,o,a){void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=t.map((function(s,u){var c="Z"===t[t.length-1][0],l=u===t.length-(c?2:1)?o:0,h=u===t.length-(c?2:1)?a:0;switch(s[0]){case"M":return"M "+(s[1]-e+r)+","+(s[2]-n+i);case"L":return"L "+(s[1]-e+l)+","+(s[2]-n+h);case"Q":return"Q "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e+l)+" "+(s[4]-n+h);case"C":return"C "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e)+" "+(s[4]-n)+","+(s[5]-e+l)+" "+(s[6]-n+h);case"A":return"A "+s[1]+" "+s[2]+" "+s[3]+" "+s[4]+" "+s[5]+" "+(s[6]-e+l)+" "+(s[7]-n+h);case"Z":return"Z"}})).join(" ");return~s.indexOf("NaN")?"":s},t.turn2deg=Lo,Object.defineProperty(t,"__esModule",{value:!0})}));