@antv/g 5.6.4 → 5.7.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.
Files changed (35) hide show
  1. package/dist/css/StyleValueRegistry.d.ts.map +1 -1
  2. package/dist/css/interfaces.d.ts +1 -0
  3. package/dist/css/interfaces.d.ts.map +1 -1
  4. package/dist/css/properties/CSSPropertyMarker.d.ts +6 -0
  5. package/dist/css/properties/CSSPropertyMarker.d.ts.map +1 -0
  6. package/dist/css/properties/index.d.ts +1 -0
  7. package/dist/css/properties/index.d.ts.map +1 -1
  8. package/dist/display-objects/CustomElement.d.ts +1 -1
  9. package/dist/display-objects/CustomElement.d.ts.map +1 -1
  10. package/dist/display-objects/DisplayObject.d.ts +1 -1
  11. package/dist/display-objects/DisplayObject.d.ts.map +1 -1
  12. package/dist/display-objects/Line.d.ts +30 -0
  13. package/dist/display-objects/Line.d.ts.map +1 -1
  14. package/dist/display-objects/Path.d.ts +43 -0
  15. package/dist/display-objects/Path.d.ts.map +1 -1
  16. package/dist/display-objects/Polygon.d.ts +34 -0
  17. package/dist/display-objects/Polygon.d.ts.map +1 -1
  18. package/dist/display-objects/Polyline.d.ts +29 -2
  19. package/dist/display-objects/Polyline.d.ts.map +1 -1
  20. package/dist/dom/FederatedMouseEvent.d.ts +0 -2
  21. package/dist/dom/FederatedMouseEvent.d.ts.map +1 -1
  22. package/dist/global-module.d.ts.map +1 -1
  23. package/dist/index.esm.js +594 -85
  24. package/dist/index.js +593 -84
  25. package/dist/index.umd.js +593 -84
  26. package/dist/index.umd.min.js +2 -2
  27. package/dist/plugins/PrepareRendererPlugin.d.ts.map +1 -1
  28. package/dist/services/SceneGraphService.d.ts +1 -1
  29. package/dist/services/SceneGraphService.d.ts.map +1 -1
  30. package/dist/shapes/AABB.d.ts.map +1 -1
  31. package/dist/types.d.ts +53 -7
  32. package/dist/types.d.ts.map +1 -1
  33. package/dist/utils/path.d.ts +1 -1
  34. package/dist/utils/path.d.ts.map +1 -1
  35. package/package.json +3 -3
@@ -1,3 +1,3 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}var r,i,o=n((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=n((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=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var n=0;e.id=function(){return n++}})),u=n((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=n((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=n((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=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}})),p=n((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}})),f=n((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})),d=n((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})),y=n((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})),v=n((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=n((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 p=h[l];if(p.key===r.key)throw new Error(c.DUPLICATED_METADATA+" "+p.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=n((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 y.Metadata(o.INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),T=n((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})),b=n((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 T.QueryableString(e||""),this.metadata=new Array;var i=null;"string"==typeof r?i=new y.Metadata(o.NAMED_TAG,r):r instanceof y.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})),S=n((function(t,n){var r=e&&e.__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),p=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),f=u(t,n);return r(r([],p),f)}function s(t,e,n,r,i){var o=i[t.toString()]||[],s=l(o),u=!0!==s.unmanaged,h=r[t],p=s.inject||s.multiInject;if((h=p||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 f=new b.Target(a.TargetTypeEnum.ConstructorArgument,s.targetName,h);return f.metadata=o,f}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],p=l(n[c]),f=new b.Target(a.TargetTypeEnum.ClassProperty,p.targetName||c,p.inject||p.multiInject);f.metadata=h,i.push(f)}var d=Object.getPrototypeOf(e.prototype).constructor;if(d!==Object){var y=u(t,d);i=r(r([],i),y)}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(n,"__esModule",{value:!0}),n.getFunctionName=n.getBaseClassDependencyCount=n.getDependencies=void 0,Object.defineProperty(n,"getFunctionName",{enumerable:!0,get:function(){return f.getFunctionName}}),n.getDependencies=function(t,e){return i(t,f.getFunctionName(e),e,!1)},n.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var a=i(e,f.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}})),E=n((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})),x=n((function(t,e){function n(t){return t._bindingDictionary}function r(t,e,n,r,i,a){var s=new y.Metadata(t?o.MULTI_INJECT_TAG:o.INJECT_TAG,n),u=new b.Target(e,r,n,s);if(void 0!==i){var c=new y.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 E.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=f.getServiceIdentifierAsString(t),o=c.NOT_REGISTERED;throw o+=f.listMetadataForTarget(i,n),o+=f.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o);case h.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;default:if(n.isArray())return e;i=f.getServiceIdentifierAsString(t),o=c.AMBIGUOUS_MATCH+" "+i;throw o+=f.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 E.Request(n,r,null,l,u);var p=new v.Plan(r,h);r.addPlan(p)}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=S.getDependencies(t,e.implementationType);if(!r.container.options.skipBaseClassChecks)if(S.getBaseClassDependencyCount(t,e.implementationType)>i.length){var o=c.ARGUMENTS_LENGTH_MISMATCH(S.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 d.Context(e),h=r(n,i,o,"",a,u);try{return s(t,c,o,l,null,h),l}catch(t){throw p.isStackOverflowExeption(t)&&l.plan&&f.circularDependencyToException(l.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new b.Target(a.TargetTypeEnum.Variable,"",e,new y.Metadata(n,r)),o=new d.Context(t);return new E.Request(e,o,null,[],i)}})),w=n((function(t,n){var r=e&&e.__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(n,"__esModule",{value:!0}),n.resolveInstance=void 0,n.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=n((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 p.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],p=h.scope===a.BindingScopeEnum.Singleton,d=h.scope===a.BindingScopeEnum.Request;if(p&&h.activated)return h.cache;if(d&&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 y=f.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(c.INVALID_BINDING_TYPE+" "+y)}l=w.resolveInstance(h.implementationType,o,r(t))}return"function"==typeof h.onActivation&&(l=h.onActivation(e.parentContext,l)),p&&(h.cache=l,h.activated=!0),d&&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)}})),P=n((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 y.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)}}})),C=n((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 N.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=P.namedConstraint(t),new N.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new N.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=P.taggedConstraint(t)(e),new N.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return P.typeConstraint(t)(e.parentRequest)},new N.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return P.namedConstraint(t)(e.parentRequest)},new N.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return P.taggedConstraint(t)(e)(n.parentRequest)},new N.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return P.traverseAncerstors(e,P.typeConstraint(t))},new N.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!P.traverseAncerstors(e,P.typeConstraint(t))},new N.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return P.traverseAncerstors(e,P.namedConstraint(t))},new N.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!P.traverseAncerstors(e,P.namedConstraint(t))},new N.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return P.traverseAncerstors(n,P.taggedConstraint(t)(e))},new N.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!P.traverseAncerstors(n,P.taggedConstraint(t)(e))},new N.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return P.traverseAncerstors(e,t)},new N.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!P.traverseAncerstors(e,t)},new N.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=n})),N=n((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 C.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=n})),M=n((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 C.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new N.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})),_=n((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})),A=n((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 C.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new N.BindingOnSyntax(this._binding),this._bindingInSyntax=new _.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=n((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 A.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 A.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=n((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=n((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=n((function(t,n){var r=e&&e.__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=e&&e.__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=e&&e.__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(n,"__esModule",{value:!0}),n.Container=void 0;var p=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 x.getBindingDictionary(t)})),s=x.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+" "+f.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=x.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=x.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}();n.Container=p})),D=n((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}})),U=n((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}}})),F=n((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 y.Metadata(t,e);"number"==typeof i?g.tagParameter(n,r,i,o):g.tagProperty(n,r,o)}}})),B=n((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 y.Metadata(o.NAMED_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),V=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0,e.optional=function(){return function(t,e,n){var r=new y.Metadata(o.OPTIONAL_TAG,!0);"number"==typeof n?g.tagParameter(t,e,n,r):g.tagProperty(t,e,r)}}})),G=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0,e.unmanaged=function(){return function(t,e,n){var r=new y.Metadata(o.UNMANAGED_TAG,!0);g.tagParameter(t,e,n,r)}}})),j=n((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 y.Metadata(o.MULTI_INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),z=n((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 y.Metadata(o.NAME_TAG,t);g.tagParameter(e,n,r,i)}}})),H=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0,e.postConstruct=function(){return function(t,e,n){var r=new y.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=n((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=n((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 U.injectable}}),Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return F.tagged}}),Object.defineProperty(e,"named",{enumerable:!0,get:function(){return B.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 V.optional}}),Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return G.unmanaged}}),Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return j.multiInject}}),Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return z.targetName}}),Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return H.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 P.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return P.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return P.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return P.typeConstraint}}),Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return f.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(e){return t.Utils.isDefinedToken(e)?e.symbol:e}function rt(e){return t.Utils.isDefinedToken(e)?e.symbol:e}!function(t){!function(n){var r="object"==typeof e?e:"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,p=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?et():Set,f=new(l||"function"!=typeof WeakMap?nt():WeakMap);function d(t,e,n,r){if(L(n)){if(!H(t))throw new TypeError;if(!Y(e))throw new TypeError;return w(t,e)}if(!H(t))throw new TypeError;if(!F(e))throw new TypeError;if(!F(r)&&!L(r)&&!D(r))throw new TypeError;return D(r)&&(r=void 0),k(t,e,n=z(n),r)}function y(t,e){function n(n,r){if(!F(n))throw new TypeError;if(!L(r)&&!q(r))throw new TypeError;A(t,e,n,r)}return n}function v(t,e,n,r){if(!F(n))throw new TypeError;return L(r)||(r=z(r)),A(t,e,n,r)}function g(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),C(t,e,n)}function m(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),N(t,e,n)}function T(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),M(t,e,n)}function b(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),_(t,e,n)}function S(t,e){if(!F(t))throw new TypeError;return L(e)||(e=z(e)),O(t,e)}function E(t,e){if(!F(t))throw new TypeError;return L(e)||(e=z(e)),I(t,e)}function x(t,e,n){if(!F(e))throw new TypeError;L(n)||(n=z(n));var r=P(e,n,!1);if(L(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=f.get(e);return i.delete(n),i.size>0||f.delete(e),!0}function w(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(!F(o))throw new TypeError;r=o}}return r}function P(t,e,n){var r=f.get(t);if(L(r)){if(!n)return;r=new h,f.set(t,r)}var i=r.get(e);if(L(i)){if(!n)return;i=new h,r.set(e,i)}return i}function C(t,e,n){if(N(t,e,n))return!0;var r=$(e);return!D(r)&&C(t,r,n)}function N(t,e,n){var r=P(e,n,!1);return!L(r)&&G(r.has(t))}function M(t,e,n){if(N(t,e,n))return _(t,e,n);var r=$(e);return D(r)?void 0:M(t,r,n)}function _(t,e,n){var r=P(e,n,!1);if(!L(r))return r.get(t)}function A(t,e,n,r){P(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 p,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=P(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 U(t){return"symbol"==typeof t}function F(t){return"object"==typeof t?null!==t:"function"==typeof t}function B(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(F(o))throw new TypeError;return o}return V(t,"default"===n?"number":n)}function V(t,e){if("string"===e){var n=t.toString;if(W(n))if(!F(i=n.call(t)))return i;if(W(r=t.valueOf))if(!F(i=r.call(t)))return i}else{var r;if(W(r=t.valueOf))if(!F(i=r.call(t)))return i;var i,o=t.toString;if(W(o))if(!F(i=o.call(t)))return i}throw new TypeError}function G(t){return!!t}function j(t){return""+t}function z(t){var e=B(t,3);return U(e)?e:j(e)}function H(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(!F(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",d),t("metadata",y),t("defineMetadata",v),t("hasMetadata",g),t("hasOwnMetadata",m),t("getMetadata",T),t("getOwnMetadata",b),t("getMetadataKeys",S),t("getOwnMetadataKeys",E),t("deleteMetadata",x)}(i)}()}(r||(r={})),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={})),(i=t.Utils||(t.Utils={})).toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},i.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},i.isDefinedToken=function(t){return!!(t&&"object"===q(t)&&"symbol"in t&&"multiple"in t)},i.isInjectOption=function(t){return!(!t||"object"!==q(t)||!("token"in t))},i.isNamedToken=function(t){return!!(t&&"object"===q(t)&&"token"in t&&"named"in t)},i.isMultipleEnabled=function(t){return i.isDefinedToken(t)&&t.multiple};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))}function ht(t){return Y.named(nt(t))}var pt=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){yt(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 yt(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 gt=function(){function e(n,r,i){!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=n,this.token=r,this.option=i,this.rawToken=t.Utils.isNamedToken(r)?r.token:r,this.named=t.Utils.isNamedToken(r)?r.named:void 0,this.mutiple=!!this.named||t.Utils.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var n,r,i;return n=e,r=[{key:"resolve",value:function(){var e=this,n=this.register;(function(t){return t&&"object"===J(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(n)&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(r){t.Utils.isMultipleEnabled(r)?tt(r,n).toService(e.generalToken):et(r,n).toService(e.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=Lt.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=Lt.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=Lt.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=Lt.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))}}],i=[{key:"resolveTarget",value:function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var o=Reflect.getMetadata(pt,r);o&&e.resolveOption(n,o)}catch(t){}if(t.Utils.isClass(r))if(i.useClass){var a=t.Utils.toArray(i.useClass);a.unshift(r),i.useClass=a}else i.useClass=[r];var s;try{s=Reflect.getMetadata(t.Syringe.ClassOptionSymbol,r)}catch(t){}if((s=dt(dt({},s||{}),i)).token){var u=t.Utils.toArray(s.token);u.unshift(r),s.token=u}else s.token=[r];e.resolveOption(n,s)}catch(t){}}},{key:"resolveOption",value:function(n,r){var i=function(e){var n=t.Utils.toArray(e.token),r=t.Utils.toArray(e.useClass),i=t.Utils.toArray(e.useDynamic),o=t.Utils.toArray(e.useFactory),a=t.Utils.toArray(e.contrib),s={token:n,useClass:r,lifecycle:a.length>0?t.Syringe.Lifecycle.singleton:e.lifecycle||t.Syringe.Lifecycle.transient,contrib:a,useDynamic:i,useFactory:o};return"useValue"in e&&(s.useValue=e.useValue),s}(dt(dt({},e.globalConfig),r));(0!==i.useClass.length||0!==i.useDynamic.length||0!==i.useFactory.length||"useValue"in i)&&i.token.forEach((function(t){new e(n,t,dt({},i)).resolve()}))}}],r&&vt(n.prototype,r),i&&vt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();gt.globalConfig=t.Syringe.DefaultOption;var mt=t.Syringe.defineToken("ContributionProvider");function Tt(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 St(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?St(Object(n),!0).forEach((function(e){xt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(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 kt=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,Tt(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 Pt(e,n){return{token:{token:mt,named:e},useDynamic:function(t){return new kt(e,t.container,n)},lifecycle:t.Syringe.Lifecycle.singleton}}function Ct(e,n,r){e({token:{token:mt,named:n},useDynamic:function(t){return new kt(n,t.container,r)},lifecycle:t.Syringe.Lifecycle.singleton})}function Nt(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 Mt=function(){function e(n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(e,n,i,o){var a={bind:e,unbind:n,isBound:i,rebind:o},s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.Utils.isInjectOption(e)?gt.resolveOption(a,e):gt.resolveTarget(a,e,n)};r.baseRegistry&&r.baseRegistry(s),r.optionCollection&&r.optionCollection.forEach((function(t){return s(t)}))},this.baseRegistry=n,this.inversifyModule=new Y.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var n,r,i;return n=e,r=[{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(Pt(e))})),this}}],r&&Nt(n.prototype,r),i&&Nt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();function _t(t){return t&&"inversifyModule"in t}function At(t){return new Mt(t)}function Ot(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 It,Rt=new Map,Lt=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=t||new Y.Container,e.setContainer(this.container,this)}var n,r,i;return n=e,r=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(_t(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){_t(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 t=new e(this.container.createChild());return t.parent=this,t}},{key:"register",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.Utils.isInjectOption(e)?gt.resolveOption(this.container,e):gt.resolveTarget(this.container,e,n)}}],i=[{key:"setContainer",value:function(t,e){return Rt.set(t.id,e)}},{key:"getContainer",value:function(t){var n=Rt.get(t.id);if(!n){var r=new e(t);return e.setContainer(t,r),r}return n}},{key:"config",value:function(t){gt.globalConfig=t}}],r&&Ot(n.prototype,r),i&&Ot(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}(),Dt=new Lt(it),Ut=Dt.register.bind(Dt),Ft=function(t){return function(e,n,r){ht(t)(e,n,r),lt(mt)(e,n,r)}};function Bt(t,e,n,r,i){Vt(t,e,n||0,r||t.length-1,i||jt)}function Vt(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);Vt(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,p=r;for(Gt(t,n,e),i(t[r],l)>0&&Gt(t,n,r);p>h;){for(Gt(t,h,p),h++,p--;0>i(t[h],l);)h++;for(;i(t[p],l)>0;)p--}0===i(t[n],l)?Gt(t,n,p):Gt(t,++p,r),p>e||(n=p+1),e>p||(r=p-1)}}function Gt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function jt(t,e){return e>t?-1:t>e?1:0}(It=t.Contribution||(t.Contribution={})).Provider=mt,It.register=Ct;class zt{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(!te(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;te(t,s)&&(e.leaf?n.push(a):$t(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n}collides(t){let e=this.data;if(!te(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(te(t,o)){if(e.leaf||$t(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=ee([]),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=Ht(t,n.children,e);if(-1!==r)return n.children.splice(r,1),i.push(n),this._condense(i),this}u||n.leaf||!$t(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=ee(t.slice(e,n+1)),Wt(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=ee([]),o.leaf=!1,o.height=r;const s=Math.ceil(i/a),u=s*Math.ceil(Math.sqrt(a));ne(t,e,n,u,this.compareMinX);for(let i=e;n>=i;i+=u){const e=Math.min(i+u-1,n);ne(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 Wt(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=Zt(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),qt(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=ee(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Wt(n,this.toBBox),Wt(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=ee([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Wt(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=Yt(t,0,a,this.toBBox),s=Yt(t,a,n,this.toBBox),u=Qt(e,s),c=Zt(e)+Zt(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:Xt,i=t.leaf?this.compareMinY:Kt,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=Yt(t,0,e,i),a=Yt(t,n-e,n,i);let s=Jt(o)+Jt(a);for(let r=e;n-e>r;r++){const e=t.children[r];qt(o,t.leaf?i(e):e),s+=Jt(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];qt(a,t.leaf?i(e):e),s+=Jt(a)}return s}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)qt(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():Wt(t[n],this.toBBox)}}function Ht(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 Wt(t,e){Yt(t,0,t.children.length,e,t)}function Yt(t,e,n,r,i){i||(i=ee(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];qt(i,t.leaf?r(e):e)}return i}function qt(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 Xt(t,e){return t.minX-e.minX}function Kt(t,e){return t.minY-e.minY}function Zt(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Jt(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Qt(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 $t(t,e){return!(t.minX>e.minX||t.minY>e.minY||e.maxX>t.maxX||e.maxY>t.maxY)}function te(t,e){return!(e.minX>t.maxX||e.minY>t.maxY||t.minX>e.maxX||t.minY>e.maxY)}function ee(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ne(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;Bt(t,a,e,n,i),o.push(e,a,a,n)}}var re,ie,oe,ae,se=function(){return se=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},se.apply(this,arguments)};function ue(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 ce(t,e){return function(n,r){e(n,r,t)}}function le(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function he(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;o>i;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function pe(){
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}var r,i,o=n((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=n((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=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var n=0;e.id=function(){return n++}})),u=n((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=n((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=n((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=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}})),f=n((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}})),p=n((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})),d=n((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=n((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=n((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=n((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=n((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)}}})),T=n((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})),S=n((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 T.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})),b=n((function(t,n){var r=e&&e.__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),p=u(t,n);return r(r([],f),p)}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 p=new S.Target(a.TargetTypeEnum.ConstructorArgument,s.targetName,h);return p.metadata=o,p}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]),p=new S.Target(a.TargetTypeEnum.ClassProperty,f.targetName||c,f.inject||f.multiInject);p.metadata=h,i.push(p)}var d=Object.getPrototypeOf(e.prototype).constructor;if(d!==Object){var v=u(t,d);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(n,"__esModule",{value:!0}),n.getFunctionName=n.getBaseClassDependencyCount=n.getDependencies=void 0,Object.defineProperty(n,"getFunctionName",{enumerable:!0,get:function(){return p.getFunctionName}}),n.getDependencies=function(t,e){return i(t,p.getFunctionName(e),e,!1)},n.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var a=i(e,p.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}})),E=n((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})),k=n((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 S.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 E.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=p.getServiceIdentifierAsString(t),o=c.NOT_REGISTERED;throw o+=p.listMetadataForTarget(i,n),o+=p.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o);case h.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;default:if(n.isArray())return e;i=p.getServiceIdentifierAsString(t),o=c.AMBIGUOUS_MATCH+" "+i;throw o+=p.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 E.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=b.getDependencies(t,e.implementationType);if(!r.container.options.skipBaseClassChecks)if(b.getBaseClassDependencyCount(t,e.implementationType)>i.length){var o=c.ARGUMENTS_LENGTH_MISMATCH(b.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 d.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&&p.circularDependencyToException(l.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new S.Target(a.TargetTypeEnum.Variable,"",e,new v.Metadata(n,r)),o=new d.Context(t);return new E.Request(e,o,null,[],i)}})),x=n((function(t,n){var r=e&&e.__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(n,"__esModule",{value:!0}),n.resolveInstance=void 0,n.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}})),w=n((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,d=h.scope===a.BindingScopeEnum.Request;if(f&&h.activated)return h.cache;if(d&&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=p.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(c.INVALID_BINDING_TYPE+" "+v)}l=x.resolveInstance(h.implementationType,o,r(t))}return"function"==typeof h.onActivation&&(l=h.onActivation(e.parentContext,l)),f&&(h.cache=l,h.activated=!0),d&&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)}})),P=n((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)}}})),M=n((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 C.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=P.namedConstraint(t),new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=P.taggedConstraint(t)(e),new C.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return P.typeConstraint(t)(e.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return P.namedConstraint(t)(e.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return P.taggedConstraint(t)(e)(n.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return P.traverseAncerstors(e,P.typeConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!P.traverseAncerstors(e,P.typeConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return P.traverseAncerstors(e,P.namedConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!P.traverseAncerstors(e,P.namedConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return P.traverseAncerstors(n,P.taggedConstraint(t)(e))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!P.traverseAncerstors(n,P.taggedConstraint(t)(e))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return P.traverseAncerstors(e,t)},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!P.traverseAncerstors(e,t)},new C.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=n})),C=n((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 M.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=n})),N=n((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 M.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new C.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})),_=n((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 N.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=a.BindingScopeEnum.Singleton,new N.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=a.BindingScopeEnum.Transient,new N.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=n})),A=n((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 M.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new C.BindingOnSyntax(this._binding),this._bindingInSyntax=new _.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=n((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 A.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 N.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 A.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 N.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 N.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 N.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 N.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=n})),I=n((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=n((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=n((function(t,n){var r=e&&e.__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=e&&e.__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=e&&e.__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(n,"__esModule",{value:!0}),n.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 k.getBindingDictionary(t)})),s=k.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+" "+p.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=k.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=k.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),w.resolve(n)}},t}();n.Container=f})),D=n((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}})),U=n((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}}})),F=n((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)}}})),B=n((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)}}})),V=n((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)}}})),G=n((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)}}})),j=n((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)}}})),z=n((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)}}})),H=n((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=n((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=n((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 U.injectable}}),Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return F.tagged}}),Object.defineProperty(e,"named",{enumerable:!0,get:function(){return B.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 V.optional}}),Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return G.unmanaged}}),Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return j.multiInject}}),Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return z.targetName}}),Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return H.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 P.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return P.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return P.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return P.typeConstraint}}),Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return p.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(e){return t.Utils.isDefinedToken(e)?e.symbol:e}function rt(e){return t.Utils.isDefinedToken(e)?e.symbol:e}!function(t){!function(n){var r="object"==typeof e?e:"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,p=new(l||"function"!=typeof WeakMap?nt():WeakMap);function d(t,e,n,r){if(L(n)){if(!H(t))throw new TypeError;if(!Y(e))throw new TypeError;return x(t,e)}if(!H(t))throw new TypeError;if(!F(e))throw new TypeError;if(!F(r)&&!L(r)&&!D(r))throw new TypeError;return D(r)&&(r=void 0),w(t,e,n=z(n),r)}function v(t,e){function n(n,r){if(!F(n))throw new TypeError;if(!L(r)&&!q(r))throw new TypeError;A(t,e,n,r)}return n}function y(t,e,n,r){if(!F(n))throw new TypeError;return L(r)||(r=z(r)),A(t,e,n,r)}function g(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),M(t,e,n)}function m(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),C(t,e,n)}function T(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),N(t,e,n)}function S(t,e,n){if(!F(e))throw new TypeError;return L(n)||(n=z(n)),_(t,e,n)}function b(t,e){if(!F(t))throw new TypeError;return L(e)||(e=z(e)),O(t,e)}function E(t,e){if(!F(t))throw new TypeError;return L(e)||(e=z(e)),I(t,e)}function k(t,e,n){if(!F(e))throw new TypeError;L(n)||(n=z(n));var r=P(e,n,!1);if(L(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=p.get(e);return i.delete(n),i.size>0||p.delete(e),!0}function x(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 w(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(!F(o))throw new TypeError;r=o}}return r}function P(t,e,n){var r=p.get(t);if(L(r)){if(!n)return;r=new h,p.set(t,r)}var i=r.get(e);if(L(i)){if(!n)return;i=new h,r.set(e,i)}return i}function M(t,e,n){if(C(t,e,n))return!0;var r=$(e);return!D(r)&&M(t,r,n)}function C(t,e,n){var r=P(e,n,!1);return!L(r)&&G(r.has(t))}function N(t,e,n){if(C(t,e,n))return _(t,e,n);var r=$(e);return D(r)?void 0:N(t,r,n)}function _(t,e,n){var r=P(e,n,!1);if(!L(r))return r.get(t)}function A(t,e,n,r){P(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=P(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 U(t){return"symbol"==typeof t}function F(t){return"object"==typeof t?null!==t:"function"==typeof t}function B(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(F(o))throw new TypeError;return o}return V(t,"default"===n?"number":n)}function V(t,e){if("string"===e){var n=t.toString;if(W(n))if(!F(i=n.call(t)))return i;if(W(r=t.valueOf))if(!F(i=r.call(t)))return i}else{var r;if(W(r=t.valueOf))if(!F(i=r.call(t)))return i;var i,o=t.toString;if(W(o))if(!F(i=o.call(t)))return i}throw new TypeError}function G(t){return!!t}function j(t){return""+t}function z(t){var e=B(t,3);return U(e)?e:j(e)}function H(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(!F(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",d),t("metadata",v),t("defineMetadata",y),t("hasMetadata",g),t("hasOwnMetadata",m),t("getMetadata",T),t("getOwnMetadata",S),t("getMetadataKeys",b),t("getOwnMetadataKeys",E),t("deleteMetadata",k)}(i)}()}(r||(r={})),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={})),(i=t.Utils||(t.Utils={})).toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},i.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},i.isDefinedToken=function(t){return!!(t&&"object"===q(t)&&"symbol"in t&&"multiple"in t)},i.isInjectOption=function(t){return!(!t||"object"!==q(t)||!("token"in t))},i.isNamedToken=function(t){return!!(t&&"object"===q(t)&&"token"in t&&"named"in t)},i.isMultipleEnabled=function(t){return i.isDefinedToken(t)&&t.multiple};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))}function ht(t){return Y.named(nt(t))}var ft=Symbol("SyringeOptionSymbol");function pt(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?pt(Object(n),!0).forEach((function(e){vt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yt(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 gt=function(){function e(n,r,i){!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=n,this.token=r,this.option=i,this.rawToken=t.Utils.isNamedToken(r)?r.token:r,this.named=t.Utils.isNamedToken(r)?r.named:void 0,this.mutiple=!!this.named||t.Utils.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var n,r,i;return n=e,r=[{key:"resolve",value:function(){var e=this,n=this.register;(function(t){return t&&"object"===J(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(n)&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(r){t.Utils.isMultipleEnabled(r)?tt(r,n).toService(e.generalToken):et(r,n).toService(e.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=Lt.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=Lt.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=Lt.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=Lt.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))}}],i=[{key:"resolveTarget",value:function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var o=Reflect.getMetadata(ft,r);o&&e.resolveOption(n,o)}catch(t){}if(t.Utils.isClass(r))if(i.useClass){var a=t.Utils.toArray(i.useClass);a.unshift(r),i.useClass=a}else i.useClass=[r];var s;try{s=Reflect.getMetadata(t.Syringe.ClassOptionSymbol,r)}catch(t){}if((s=dt(dt({},s||{}),i)).token){var u=t.Utils.toArray(s.token);u.unshift(r),s.token=u}else s.token=[r];e.resolveOption(n,s)}catch(t){}}},{key:"resolveOption",value:function(n,r){var i=function(e){var n=t.Utils.toArray(e.token),r=t.Utils.toArray(e.useClass),i=t.Utils.toArray(e.useDynamic),o=t.Utils.toArray(e.useFactory),a=t.Utils.toArray(e.contrib),s={token:n,useClass:r,lifecycle:a.length>0?t.Syringe.Lifecycle.singleton:e.lifecycle||t.Syringe.Lifecycle.transient,contrib:a,useDynamic:i,useFactory:o};return"useValue"in e&&(s.useValue=e.useValue),s}(dt(dt({},e.globalConfig),r));(0!==i.useClass.length||0!==i.useDynamic.length||0!==i.useFactory.length||"useValue"in i)&&i.token.forEach((function(t){new e(n,t,dt({},i)).resolve()}))}}],r&&yt(n.prototype,r),i&&yt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();gt.globalConfig=t.Syringe.DefaultOption;var mt=t.Syringe.defineToken("ContributionProvider");function Tt(t){return function(t){if(Array.isArray(t))return St(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 St(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 St(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 St(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 bt(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?bt(Object(n),!0).forEach((function(e){kt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function kt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xt(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 wt=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,Tt(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&&xt(e.prototype,n),r&&xt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Pt(e,n){return{token:{token:mt,named:e},useDynamic:function(t){return new wt(e,t.container,n)},lifecycle:t.Syringe.Lifecycle.singleton}}function Mt(e,n,r){e({token:{token:mt,named:n},useDynamic:function(t){return new wt(n,t.container,r)},lifecycle:t.Syringe.Lifecycle.singleton})}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 Nt=function(){function e(n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(e,n,i,o){var a={bind:e,unbind:n,isBound:i,rebind:o},s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.Utils.isInjectOption(e)?gt.resolveOption(a,e):gt.resolveTarget(a,e,n)};r.baseRegistry&&r.baseRegistry(s),r.optionCollection&&r.optionCollection.forEach((function(t){return s(t)}))},this.baseRegistry=n,this.inversifyModule=new Y.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var n,r,i;return n=e,r=[{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(Pt(e))})),this}}],r&&Ct(n.prototype,r),i&&Ct(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();function _t(t){return t&&"inversifyModule"in t}function At(t){return new Nt(t)}function Ot(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 It,Rt=new Map,Lt=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=t||new Y.Container,e.setContainer(this.container,this)}var n,r,i;return n=e,r=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(_t(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){_t(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 t=new e(this.container.createChild());return t.parent=this,t}},{key:"register",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.Utils.isInjectOption(e)?gt.resolveOption(this.container,e):gt.resolveTarget(this.container,e,n)}}],i=[{key:"setContainer",value:function(t,e){return Rt.set(t.id,e)}},{key:"getContainer",value:function(t){var n=Rt.get(t.id);if(!n){var r=new e(t);return e.setContainer(t,r),r}return n}},{key:"config",value:function(t){gt.globalConfig=t}}],r&&Ot(n.prototype,r),i&&Ot(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}(),Dt=new Lt(it),Ut=Dt.register.bind(Dt),Ft=function(t){return function(e,n,r){ht(t)(e,n,r),lt(mt)(e,n,r)}};function Bt(t,e,n,r,i){Vt(t,e,n||0,r||t.length-1,i||jt)}function Vt(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);Vt(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 jt(t,e){return e>t?-1:t>e?1:0}(It=t.Contribution||(t.Contribution={})).Provider=mt,It.register=Mt;class zt{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(!te(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;te(t,s)&&(e.leaf?n.push(a):$t(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n}collides(t){let e=this.data;if(!te(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(te(t,o)){if(e.leaf||$t(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=ee([]),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=Ht(t,n.children,e);if(-1!==r)return n.children.splice(r,1),i.push(n),this._condense(i),this}u||n.leaf||!$t(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=ee(t.slice(e,n+1)),Wt(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=ee([]),o.leaf=!1,o.height=r;const s=Math.ceil(i/a),u=s*Math.ceil(Math.sqrt(a));ne(t,e,n,u,this.compareMinX);for(let i=e;n>=i;i+=u){const e=Math.min(i+u-1,n);ne(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 Wt(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=Zt(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),qt(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=ee(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Wt(n,this.toBBox),Wt(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=ee([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Wt(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=Yt(t,0,a,this.toBBox),s=Yt(t,a,n,this.toBBox),u=Qt(e,s),c=Zt(e)+Zt(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:Xt,i=t.leaf?this.compareMinY:Kt,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=Yt(t,0,e,i),a=Yt(t,n-e,n,i);let s=Jt(o)+Jt(a);for(let r=e;n-e>r;r++){const e=t.children[r];qt(o,t.leaf?i(e):e),s+=Jt(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];qt(a,t.leaf?i(e):e),s+=Jt(a)}return s}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)qt(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():Wt(t[n],this.toBBox)}}function Ht(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 Wt(t,e){Yt(t,0,t.children.length,e,t)}function Yt(t,e,n,r,i){i||(i=ee(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];qt(i,t.leaf?r(e):e)}return i}function qt(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 Xt(t,e){return t.minX-e.minX}function Kt(t,e){return t.minY-e.minY}function Zt(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Jt(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Qt(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 $t(t,e){return!(t.minX>e.minX||t.minY>e.minY||e.maxX>t.maxX||e.maxY>t.maxY)}function te(t,e){return!(e.minX>t.maxX||e.minY>t.maxY||t.minX>e.maxX||t.minY>e.maxY)}function ee(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ne(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;Bt(t,a,e,n,i),o.push(e,a,a,n)}}var re,ie,oe,ae,se=function(){return se=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},se.apply(this,arguments)};function ue(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 ce(t,e){return function(n,r){e(n,r,t)}}function le(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function he(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;o>i;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function fe(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- pe=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 x(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=b(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 p(){}function f(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(w([])));v&&v!==e&&n.call(v,i)&&(d=v);var g=f.prototype=h.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(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 b(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,b(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 S(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function w(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 p.prototype=f,s(g,"constructor",f),s(f,"constructor",p),p.displayName=s(f,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(T.prototype),s(T.prototype,o,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(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=w,x.prototype={constructor:x,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(E),!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),E(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;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function fe(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 de(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){fe(o,r,i,a,s,"next",t)}function s(t){fe(o,r,i,a,s,"throw",t)}a(void 0)}))}}function ye(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 ve(t,e,n){return e&&ye(t.prototype,e),n&&ye(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ge(){return ge=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},ge.apply(this,arguments)}function me(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Te(t,e)}function Te(t,e){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Te(t,e)}function be(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Se(t,e,n){return Se=be()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&Te(i,n.prototype),i},Se.apply(null,arguments)}function Ee(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 xe(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function we(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 ke(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 we(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)?we(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.")}(re=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",re.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(ie||(ie={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(oe||(oe={})),(ae=t.PropertyName||(t.PropertyName={})).LAYOUT="display",ae.LEFT="left",ae.TOP="top",ae.BOTTOM="bottom",ae.RIGHT="right",ae.WIDTH="width",ae.HEIGHT="height",ae.MIN_WIDTH="minWidth",ae.MAX_WIDTH="maxWidth",ae.MIN_HEIGHT="minHeight",ae.MAX_HEIGHT="maxHeight",ae.BOX_SIZING="boxSizing",ae.PADDING="padding",ae.PADDING_TOP="paddingTop",ae.PADDING_BOTTOM="paddingBottom",ae.PADDING_START="paddingLeft",ae.PADDING_END="paddingRight",ae.MARGIN="margin",ae.MARGIN_TOP="marginTop",ae.MARGIN_BOTTOM="marginBottom",ae.MARGIN_START="marginLeft",ae.MARGIN_END="marginRight",ae.BORDER="border",ae.BORDER_TOP="borderTop",ae.BORDER_BOTTOM="borderBottom",ae.BORDER_START="borderLeft",ae.BORDER_END="borderRight",ae.FLEX_DIRECTION="flexDirection",ae.FLEX_WRAP="flexWrap",ae.FLEX_FLOW="flexFlow",ae.ALIGN_ITEMS="alignItems",ae.ALIGN_CONTENT="alignContent",ae.JUSTIFY_CONTENT="justifyContent",ae.FLEX="flex",ae.ALIGN_SELF="alignSelf",ae.FLEX_SHRINK="flexShrink",ae.FLEX_BASIS="flexBasis",ae.FLEX_GROW="flexGrow",ae.OFFSET_WIDTH="offsetWidth",ae.OFFSET_HEIGHT="offsetHeight",ae.ORDER="order";var Pe=1,Ce=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=Pe++,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=de(pe().mark((function t(){var e;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,uh.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},ve(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}(),Ne=t.Syringe.defineToken("LayoutContextFactory"),Me=t.Syringe.defineToken("LayoutContextOptions"),_e=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=""+_e++,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=ue([ct(),ce(0,lt(Me)),le("design:paramtypes",[Object])],t.LayoutContext);var Ae=t.Syringe.defineToken("FragmentResultFactory"),Oe=t.Syringe.defineToken("FragmentResultOptions"),Ie=t.Syringe.defineToken("contextNode");function Re(t){if(!t)throw new Error}function Le(t,e){if(t!==e)throw new Error}function De(t,e){if(t===e)throw new Error}function Ue(t){return void 0===t}function Fe(t){return null==t}function Be(t){return"number"==typeof t}function Ve(t){return"function"==typeof t}function Ge(t){return"boolean"==typeof t}function je(t){return"[object Object]"===Object.prototype.toString.call(t)}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=ue([ut(),ce(0,lt(t.LayoutContext)),ce(1,lt(Ie)),ce(2,lt(Oe)),le("design:paramtypes",[t.LayoutContext,Ce,Object])],t.FragmentResult);var ze={},He=0;function We(t,e){if(t){var n="string"==typeof t?t:t.id||He++;ze[n]&&ze[n].destroy(),ze[n]=e}}var Ye="undefined"!=typeof window&&void 0!==window.document,qe=.1,Xe="function"==typeof Float32Array,Ke=function(t,e){return 1-3*e+3*t},Ze=function(t,e){return 3*e-6*t},Je=function(t){return 3*t},Qe=function(t,e,n){return((Ke(e,n)*t+Ze(e,n))*t+Je(e))*t},$e=function(t,e,n){return 3*Ke(e,n)*t*t+2*Ze(e,n)*t+Je(e)},tn=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=Xe?new Float32Array(11):new Array(11),o=0;11>o;++o)i[o]=Qe(o*qe,t,n);var a=function(e){for(var r=0,o=1;10!==o&&e>=i[o];++o)r+=qe;--o;var a=r+(e-i[o])/(i[o+1]-i[o])*qe,s=$e(a,t,n);return.001>s?0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=Qe(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+qe,t,n):function(t,e,n,r){for(var i=0;4>i;++i){var o=$e(e,n,r);if(0===o)return e;e-=(Qe(e,n,r)-t)/o}return e}(e,a,t,n)};return function(t){return 0===t||1===t?t:Qe(a(t),e,r)}},en=1e-6,nn="undefined"!=typeof Float32Array?Float32Array:Array;function rn(){var t=new nn(9);return nn!=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 on(){var t=new nn(16);return nn!=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 an(t){var e=new nn(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}function sn(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 un(t,e,n,r,i,o,a,s,u,c,l,h,p,f,d,y){var v=new nn(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=a,v[7]=s,v[8]=u,v[9]=c,v[10]=l,v[11]=h,v[12]=p,v[13]=f,v[14]=d,v[15]=y,v}function cn(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 ln(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],p=e[10],f=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,b=n*c-o*a,S=r*u-i*s,E=r*c-o*s,x=i*c-o*u,w=l*y-h*d,k=l*v-p*d,P=l*g-f*d,C=h*v-p*y,N=h*g-f*y,M=p*g-f*v,_=m*M-T*N+b*C+S*P-E*k+x*w;return _?(t[0]=(s*M-u*N+c*C)*(_=1/_),t[1]=(i*N-r*M-o*C)*_,t[2]=(y*x-v*E+g*S)*_,t[3]=(p*E-h*x-f*S)*_,t[4]=(u*P-a*M-c*k)*_,t[5]=(n*M-i*P+o*k)*_,t[6]=(v*b-d*x-g*T)*_,t[7]=(l*x-p*b+f*T)*_,t[8]=(a*N-s*P+c*w)*_,t[9]=(r*P-n*N-o*w)*_,t[10]=(d*E-y*b+g*m)*_,t[11]=(h*b-l*E-f*m)*_,t[12]=(s*k-a*C-u*w)*_,t[13]=(n*C-r*k+i*w)*_,t[14]=(y*T-d*S-v*m)*_,t[15]=(l*S-h*T+p*m)*_,t):null}function hn(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],p=e[9],f=e[10],d=e[11],y=e[12],v=e[13],g=e[14],m=e[15],T=n[0],b=n[1],S=n[2],E=n[3];return t[0]=T*r+b*s+S*h+E*y,t[1]=T*i+b*u+S*p+E*v,t[2]=T*o+b*c+S*f+E*g,t[3]=T*a+b*l+S*d+E*m,t[4]=(T=n[4])*r+(b=n[5])*s+(S=n[6])*h+(E=n[7])*y,t[5]=T*i+b*u+S*p+E*v,t[6]=T*o+b*c+S*f+E*g,t[7]=T*a+b*l+S*d+E*m,t[8]=(T=n[8])*r+(b=n[9])*s+(S=n[10])*h+(E=n[11])*y,t[9]=T*i+b*u+S*p+E*v,t[10]=T*o+b*c+S*f+E*g,t[11]=T*a+b*l+S*d+E*m,t[12]=(T=n[12])*r+(b=n[13])*s+(S=n[14])*h+(E=n[15])*y,t[13]=T*i+b*u+S*p+E*v,t[14]=T*o+b*c+S*f+E*g,t[15]=T*a+b*l+S*d+E*m,t}function pn(t,e,n){var r,i,o,a,s,u,c,l,h,p,f,d,y=n[0],v=n[1],g=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*g+e[12],t[13]=e[1]*y+e[5]*v+e[9]*g+e[13],t[14]=e[2]*y+e[6]*v+e[10]*g+e[14],t[15]=e[3]*y+e[7]*v+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],p=e[9],f=e[10],d=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]=p,t[10]=f,t[11]=d,t[12]=r*y+s*v+h*g+e[12],t[13]=i*y+u*v+p*g+e[13],t[14]=o*y+c*v+f*g+e[14],t[15]=a*y+l*v+d*g+e[15]),t}function fn(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 dn(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],p=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+p*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=p*i-u*r,t}function yn(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],p=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-p*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+p*i,t}function vn(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 gn(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,p=r*c,f=i*u,d=i*c,y=o*c,v=a*s,g=a*u,m=a*c;return t[0]=1-(f+y),t[1]=h+m,t[2]=p-g,t[3]=0,t[4]=h-m,t[5]=1-(l+y),t[6]=d+v,t[7]=0,t[8]=p+g,t[9]=d-v,t[10]=1-(l+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function mn(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Tn(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 bn(t,e){var n=new nn(3);Tn(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,p=e[8]*r,f=e[9]*i,d=e[10]*o,y=a+l+d,v=0;return y>0?(v=2*Math.sqrt(y+1),t[3]=.25*v,t[0]=(h-f)/v,t[1]=(p-u)/v,t[2]=(s-c)/v):a>l&&a>d?(v=2*Math.sqrt(1+a-l-d),t[3]=(h-f)/v,t[0]=.25*v,t[1]=(s+c)/v,t[2]=(p+u)/v):l>d?(v=2*Math.sqrt(1+l-a-d),t[3]=(p-u)/v,t[0]=(s+c)/v,t[1]=.25*v,t[2]=(h+f)/v):(v=2*Math.sqrt(1+d-a-l),t[3]=(s-c)/v,t[0]=(p+u)/v,t[1]=(h+f)/v,t[2]=.25*v),t}function Sn(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,p=o*c,f=o*l,d=o*h,y=a*l,v=a*h,g=s*h,m=u*c,T=u*l,b=u*h,S=r[0],E=r[1],x=r[2],w=i[0],k=i[1],P=i[2],C=(1-(y+g))*S,N=(f+b)*S,M=(d-T)*S,_=(f-b)*E,A=(1-(p+g))*E,O=(v+m)*E,I=(d+T)*x,R=(v-m)*x,L=(1-(p+y))*x;return t[0]=C,t[1]=N,t[2]=M,t[3]=0,t[4]=_,t[5]=A,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=L,t[11]=0,t[12]=n[0]+w-(C*w+_*k+I*P),t[13]=n[1]+k-(N*w+A*k+R*P),t[14]=n[2]+P-(M*w+O*k+L*P),t[15]=1,t}function En(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,p=i*a,f=i*s,d=i*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-d,t[1]=l+g,t[2]=p-v,t[3]=0,t[4]=l-g,t[5]=1-c-d,t[6]=f+y,t[7]=0,t[8]=p+v,t[9]=f-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function xn(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 wn(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 kn=wn;function Pn(t,e,n,r){var i,o,a,s,u,c,l,h,p,f,d=e[0],y=e[1],v=e[2],g=r[0],m=r[1],T=r[2],b=n[0],S=n[1],E=n[2];return Math.abs(d-b)<en&&Math.abs(y-S)<en&&Math.abs(v-E)<en?cn(t):(l=d-b,h=y-S,p=v-E,i=m*(p*=f=1/Math.hypot(l,h,p))-T*(h*=f),o=T*(l*=f)-g*p,a=g*h-m*l,(f=Math.hypot(i,o,a))?(i*=f=1/f,o*=f,a*=f):(i=0,o=0,a=0),s=h*a-p*o,u=p*i-l*a,c=l*o-h*i,(f=Math.hypot(s,u,c))?(s*=f=1/f,u*=f,c*=f):(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]=p,t[11]=0,t[12]=-(i*d+o*y+a*v),t[13]=-(s*d+u*y+c*v),t[14]=-(l*d+h*y+p*v),t[15]=1,t)}function Cn(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 Nn=Object.freeze({__proto__:null,create:on,clone:an,copy:sn,fromValues:un,set:function(t,e,n,r,i,o,a,s,u,c,l,h,p,f,d,y,v){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]=p,t[12]=f,t[13]=d,t[14]=y,t[15]=v,t},identity:cn,transpose:function(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},invert:ln,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],p=e[10],f=e[11],d=e[12],y=e[13],v=e[14],g=e[15];return t[0]=s*(p*g-f*v)-h*(u*g-c*v)+y*(u*f-c*p),t[1]=-(r*(p*g-f*v)-h*(i*g-o*v)+y*(i*f-o*p)),t[2]=r*(u*g-c*v)-s*(i*g-o*v)+y*(i*c-o*u),t[3]=-(r*(u*f-c*p)-s*(i*f-o*p)+h*(i*c-o*u)),t[4]=-(a*(p*g-f*v)-l*(u*g-c*v)+d*(u*f-c*p)),t[5]=n*(p*g-f*v)-l*(i*g-o*v)+d*(i*f-o*p),t[6]=-(n*(u*g-c*v)-a*(i*g-o*v)+d*(i*c-o*u)),t[7]=n*(u*f-c*p)-a*(i*f-o*p)+l*(i*c-o*u),t[8]=a*(h*g-f*y)-l*(s*g-c*y)+d*(s*f-c*h),t[9]=-(n*(h*g-f*y)-l*(r*g-o*y)+d*(r*f-o*h)),t[10]=n*(s*g-c*y)-a*(r*g-o*y)+d*(r*c-o*s),t[11]=-(n*(s*f-c*h)-a*(r*f-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*v-p*y)-l*(s*v-u*y)+d*(s*p-u*h)),t[13]=n*(h*v-p*y)-l*(r*v-i*y)+d*(r*p-i*h),t[14]=-(n*(s*v-u*y)-a*(r*v-i*y)+d*(r*u-i*s)),t[15]=n*(s*p-u*h)-a*(r*p-i*h)+l*(r*u-i*s),t},determinant: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],p=t[11],f=t[12],d=t[13],y=t[14],v=t[15];return(e*a-n*o)*(h*v-p*y)-(e*s-r*o)*(l*v-p*d)+(e*u-i*o)*(l*y-h*d)+(n*s-r*a)*(c*v-p*f)-(n*u-i*a)*(c*y-h*f)+(r*u-i*s)*(c*d-l*f)},multiply:hn,translate:pn,scale:fn,rotate:function(t,e,n,r){var i,o,a,s,u,c,l,h,p,f,d,y,v,g,m,T,b,S,E,x,w,k,P,C,N=r[0],M=r[1],_=r[2],A=Math.hypot(N,M,_);return en>A?null:(N*=A=1/A,M*=A,_*=A,i=Math.sin(n),o=Math.cos(n),u=e[1],c=e[2],l=e[3],p=e[5],f=e[6],d=e[7],v=e[9],g=e[10],m=e[11],E=N*M*(a=1-o)-_*i,x=M*M*a+o,w=_*M*a+N*i,k=N*_*a+M*i,P=M*_*a-N*i,C=_*_*a+o,t[0]=(s=e[0])*(T=N*N*a+o)+(h=e[4])*(b=M*N*a+_*i)+(y=e[8])*(S=_*N*a-M*i),t[1]=u*T+p*b+v*S,t[2]=c*T+f*b+g*S,t[3]=l*T+d*b+m*S,t[4]=s*E+h*x+y*w,t[5]=u*E+p*x+v*w,t[6]=c*E+f*x+g*w,t[7]=l*E+d*x+m*w,t[8]=s*k+h*P+y*C,t[9]=u*k+p*P+v*C,t[10]=c*k+f*P+g*C,t[11]=l*k+d*P+m*C,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:dn,rotateY:yn,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],p=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+p*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=p*i-u*r,t},fromTranslation:vn,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 en>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:gn,fromQuat2:function(t,e){var n=new nn(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)),gn(t,e,n),t},getTranslation:mn,getScaling:Tn,getRotation:bn,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,p=i*c,f=i*l,d=o*c,y=o*l,v=a*l,g=s*u,m=s*c,T=s*l,b=r[0],S=r[1],E=r[2];return t[0]=(1-(d+v))*b,t[1]=(p+T)*b,t[2]=(f-m)*b,t[3]=0,t[4]=(p-T)*S,t[5]=(1-(h+v))*S,t[6]=(y+g)*S,t[7]=0,t[8]=(f+m)*E,t[9]=(y-g)*E,t[10]=(1-(h+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Sn,fromQuat:En,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:xn,perspective:xn,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:wn,ortho:kn,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:Pn,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],p=a-n[2],f=l*l+h*h+p*p;f>0&&(l*=f=1/Math.sqrt(f),h*=f,p*=f);var d=u*p-c*h,y=c*l-s*p,v=s*h-u*l;return(f=d*d+y*y+v*v)>0&&(d*=f=1/Math.sqrt(f),y*=f,v*=f),t[0]=d,t[1]=y,t[2]=v,t[3]=0,t[4]=h*v-p*y,t[5]=p*d-l*v,t[6]=l*y-h*d,t[7]=0,t[8]=l,t[9]=h,t[10]=p,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:Cn,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],p=t[10],f=t[11],d=t[12],y=t[13],v=t[14],g=t[15],m=e[0],T=e[1],b=e[2],S=e[3],E=e[4],x=e[5],w=e[6],k=e[7],P=e[8],C=e[9],N=e[10],M=e[11],_=e[12],A=e[13],O=e[14],I=e[15];return!(Math.abs(n-m)>en*Math.max(1,Math.abs(n),Math.abs(m))||Math.abs(r-T)>en*Math.max(1,Math.abs(r),Math.abs(T))||Math.abs(i-b)>en*Math.max(1,Math.abs(i),Math.abs(b))||Math.abs(o-S)>en*Math.max(1,Math.abs(o),Math.abs(S))||Math.abs(a-E)>en*Math.max(1,Math.abs(a),Math.abs(E))||Math.abs(s-x)>en*Math.max(1,Math.abs(s),Math.abs(x))||Math.abs(u-w)>en*Math.max(1,Math.abs(u),Math.abs(w))||Math.abs(c-k)>en*Math.max(1,Math.abs(c),Math.abs(k))||Math.abs(l-P)>en*Math.max(1,Math.abs(l),Math.abs(P))||Math.abs(h-C)>en*Math.max(1,Math.abs(h),Math.abs(C))||Math.abs(p-N)>en*Math.max(1,Math.abs(p),Math.abs(N))||Math.abs(f-M)>en*Math.max(1,Math.abs(f),Math.abs(M))||Math.abs(d-_)>en*Math.max(1,Math.abs(d),Math.abs(_))||Math.abs(y-A)>en*Math.max(1,Math.abs(y),Math.abs(A))||Math.abs(v-O)>en*Math.max(1,Math.abs(v),Math.abs(O))||Math.abs(g-I)>en*Math.max(1,Math.abs(g),Math.abs(I)))},mul:hn,sub:Cn});function Mn(){var t=new nn(3);return nn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function _n(t){var e=new nn(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function An(t){return Math.hypot(t[0],t[1],t[2])}function On(t,e,n){var r=new nn(3);return r[0]=t,r[1]=e,r[2]=n,r}function In(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Rn(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ln(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Dn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Un(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Fn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Bn(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}function Vn(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 Gn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jn(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 zn(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}function Hn(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 Wn(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)<=en*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=en*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=en*Math.max(1,Math.abs(i),Math.abs(s))}var Yn,qn=Dn,Xn=Un,Kn=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},Zn=An;Yn=Mn();function Jn(){var t=new nn(4);return nn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Qn(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=Jn()}();function $n(){var t=new nn(4);return nn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function tr(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 er(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 nr(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],p=e[3],f=n[0],d=n[1],y=n[2],v=n[3];return 0>(o=c*f+l*d+h*y+p*v)&&(o=-o,f=-f,d=-d,y=-y,v=-v),1-o>en?(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*f,t[1]=s*l+u*d,t[2]=s*h+u*y,t[3]=s*p+u*v,t}function rr(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 ir(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 or,ar,sr,ur,cr,lr,hr=function(t,e,n,r){var i=new nn(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},pr=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},fr=er,dr=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};or=Mn(),ar=On(1,0,0),sr=On(0,1,0),ur=$n(),cr=$n(),lr=rn();function yr(t,e){var n=new nn(2);return n[0]=t,n[1]=e,n}!function(){var t,e=(t=new nn(2),nn!=Float32Array&&(t[0]=0,t[1]=0),t)}();function vr(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function gr(t){return void 0===t?0:t>360||-360>t?t%360:t}function mr(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Be(t)?On(t,e,n):Array.isArray(t)&&3===t.length?_n(t):On(t[0],t[1]||e,t[2]||n)}function Tr(t){return t*(Math.PI/180)}function br(t){return t*(180/Math.PI)}function Sr(t){return 360*t}function Er(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,o=Tn(Mn(),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 xr(t,e,n,r,i){var o,a,s,u,c,l,h,p,f,d,y=Math.cos(t),v=Math.sin(t);return o=r*y,a=i*v,s=0,u=-r*v,c=i*y,l=0,h=e,p=n,f=1,(d=new nn(9))[0]=o,d[1]=a,d[2]=s,d[3]=u,d[4]=c,d[5]=l,d[6]=h,d[7]=p,d[8]=f,d}function wr(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);return 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,t}function kr(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=br(Math.atan2(n,e));return[t[6],t[7],o,a,s]}var Pr=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substring(1):t},Cr=function(t){return Math.pow(t,2)},Nr=function(t){return Math.pow(t,3)},Mr=function(t){return Math.pow(t,4)},_r=function(t){return Math.pow(t,5)},Ar=function(t){return Math.pow(t,6)},Or=function(t){return 1-Math.cos(t*Math.PI/2)},Ir=function(t){return 1-Math.sqrt(1-t*t)},Rr=function(t){return t*t*(3*t-2)},Lr=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)},Dr=function(t,e){void 0===e&&(e=[]);var n=e[0],r=e[1],i=void 0===r?.5:r,o=vr(Number(void 0===n?1:n),1,10),a=vr(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)},Ur=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=vr(i,.1,1e3),a=vr(a,.1,1e3),u=vr(u,.1,1e3),l=vr(l,.1,1e3);var h=Math.sqrt(a/i),p=u/(2*Math.sqrt(a*i)),f=1>p?h*Math.sqrt(1-p*p):0,d=1>p?(p*h-l)/f:-l+h,y=n?n*t/1e3:t;return y=1>p?Math.exp(-y*p*h)*(1*Math.cos(f*y)+d*Math.sin(f*y)):(1+d*y)*Math.exp(-y*h),0===t||1===t?t:1-y},Fr=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)(vr(t,0,1)*r)/r},Br=function(t,e){void 0===e&&(e=[]);return tn(e[0],e[1],e[2],e[3])(t)},Vr=tn(.42,0,1,1),Gr=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},jr=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}},zr=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}},Hr={steps:Fr,"step-start":function(t){return Fr(t,[1,"start"])},"step-end":function(t){return Fr(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Br,ease:function(t){return Br(t,[.25,.1,.25,1])},in:Vr,out:Gr(Vr),"in-out":jr(Vr),"out-in":zr(Vr),"in-quad":Cr,"out-quad":Gr(Cr),"in-out-quad":jr(Cr),"out-in-quad":zr(Cr),"in-cubic":Nr,"out-cubic":Gr(Nr),"in-out-cubic":jr(Nr),"out-in-cubic":zr(Nr),"in-quart":Mr,"out-quart":Gr(Mr),"in-out-quart":jr(Mr),"out-in-quart":zr(Mr),"in-quint":_r,"out-quint":Gr(_r),"in-out-quint":jr(_r),"out-in-quint":zr(_r),"in-expo":Ar,"out-expo":Gr(Ar),"in-out-expo":jr(Ar),"out-in-expo":zr(Ar),"in-sine":Or,"out-sine":Gr(Or),"in-out-sine":jr(Or),"out-in-sine":zr(Or),"in-circ":Ir,"out-circ":Gr(Ir),"in-out-circ":jr(Ir),"out-in-circ":zr(Ir),"in-back":Rr,"out-back":Gr(Rr),"in-out-back":jr(Rr),"out-in-back":zr(Rr),"in-bounce":Lr,"out-bounce":Gr(Lr),"in-out-bounce":jr(Lr),"out-in-bounce":zr(Lr),"in-elastic":Dr,"out-elastic":Gr(Dr),"in-out-elastic":jr(Dr),"out-in-elastic":zr(Dr),spring:Ur,"spring-in":Ur,"spring-out":Gr(Ur),"spring-in-out":jr(Ur),"spring-out-in":zr(Ur)},Wr=function(t){return Hr[function(t){return Pr(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Hr.linear},Yr=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},qr=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}))},Xr={keys:Object.keys,values:Object.values,entries:Object.entries};function Kr(t,e){if(Ye)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function Zr(t){var e=Kr(t,"width");return"auto"===e?t.offsetWidth:parseFloat(e)}function Jr(t){var e=Kr(t,"height");return"auto"===e?t.offsetHeight:parseFloat(e)}var Qr={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function $r(t){var e=t.type,n=t.value;return"hex"===e?"#"+n:"literal"===e?n:"rgb"===e?"rgb("+n.join(",")+")":"rgba("+n.join(",")+")"}var ti,ei=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/,p=/^\(/,f=/^\)/,d=/^,/,y=/^\#([0-9a-fA-F]+)/,v=/^([a-zA-Z]+)/,g=/^rgb/i,m=/^rgba/i,T=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,b="";function S(t){throw new Error(b+": "+t)}function E(){var t=O(x);return b.length>0&&S("Invalid input not EOF"),t}function x(){return w("linear-gradient",t,P)||w("repeating-linear-gradient",e,P)||w("radial-gradient",n,C)||w("repeating-radial-gradient",r,C)||w("conic-gradient",i,C)}function w(t,e,n){return k(e,(function(e){var r=n();return r&&(F(d)||S("Missing comma before color stops")),{type:t,orientation:r,colorStops:O(I)}}))}function k(t,e){var n=F(t);if(n){F(p)||S("Missing (");var r=e(n);return F(f)||S("Missing )"),r}}function P(){return U("directional",o,1)||U("angular",h,1)}function C(){var t,e,n=N();return n&&((t=[]).push(n),e=b,F(d)&&((n=N())?t.push(n):b=e)),t}function N(){var t=function(){var t=U("shape",/^(circle)/i,0);t&&(t.style=D()||M());return t}()||function(){var t=U("shape",/^(ellipse)/i,0);t&&(t.style=L()||M());return t}();if(t)t.at=_();else{var e=M();if(e){t=e;var n=_();n&&(t.at=n)}else{var r=A();r&&(t={type:"default-radial",at:r})}}return t}function M(){return U("extent-keyword",a,1)}function _(){if(U("position",/^at/,0)){var t=A();return t||S("Missing positioning value"),t}}function A(){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);F(d);)(e=t())?n.push(e):S("One extra comma");return n}function I(){var t=U("hex",y,1)||k(m,(function(){return{type:"rgba",value:O(R)}}))||k(g,(function(){return{type:"rgb",value:O(R)}}))||U("literal",v,0);return t||S("Expected color definition"),t.length=L(),t}function R(){return F(T)[1]}function L(){return U("%",c,1)||U("position-keyword",s,1)||D()}function D(){return U("px",u,1)||U("em",l,1)}function U(t,e,n){var r=F(e);if(r)return{type:t,value:r[n]}}function F(t){var e=/^[\n\r\t\s]+/.exec(b);e&&B(e[0].length);var n=t.exec(b);return n&&B(n[0].length),n}function B(t){b=b.substring(t)}return function(t){return b=t,E()}}();(ti=t.PropertySyntax||(t.PropertySyntax={})).COORDINATE="<coordinate>",ti.COLOR="<color>",ti.PAINT="<paint>",ti.NUMBER="<number>",ti.ANGLE="<angle>",ti.OPACITY_VALUE="<opacity-value>",ti.SHADOW_BLUR="<shadow-blur>",ti.LENGTH="<length>",ti.PERCENTAGE="<percentage>",ti.LENGTH_PERCENTAGE="<length> | <percentage>",ti.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",ti.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",ti.LIST_OF_POINTS="<list-of-points>",ti.PATH="<path>",ti.FILTER="<filter>",ti.Z_INDEX="<z-index>",ti.OFFSET_PATH="<offset-path>",ti.OFFSET_DISTANCE="<offset-distance>",ti.CLIP_PATH="<clip-path>",ti.TRANSFORM="<transform>",ti.TRANSFORM_ORIGIN="<transform-origin>",ti.TEXT="<text>",ti.TEXT_TRANSFORM="<text-transform>";var ni=t.Syringe.defineToken("StyleValueRegistry"),ri=function(t){return t};function ii(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var oi="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",ai=new RegExp("cubic-bezier\\("+oi+","+oi+","+oi+","+oi+"\\)"),si=/steps\(\s*(\d+)\s*\)/,ui=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function ci(t){var e=ai.exec(t);if(e)return tn.apply(void 0,e.slice(1).map(Number));var n=si.exec(t);if(n)return ii(Number(n[1]),0);var r=ui.exec(t);return r?ii(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Wr(t)}function li(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 hi(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 pi(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function n(){for(var r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];var a=e?e.apply(this,i):i[0],s=n.cache;if(s.has(a))return s.get(a);var u=t.apply(this,i);return n.cache=s.set(a,u)||s,u};return n.cache=new(pi.Cache||Map),n}pi.Cache=Map;var fi=pi((function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}));function di(t){return!Fe(t)&&"string"==typeof t}function yi(t,e,n){var r=function(t,e){for(var n={},r=0;t.length>r;r++)for(var i in t[r])if(vi(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:ci(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:mi(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)vi(n)&&(t.style[n]=null)}}function vi(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var gi=function(t,e,n){return function(r){return n(Ti(t,e,r))}};function mi(t,e,n,r){var i=e,o=n,a=Dt.get(ni),s=a.getMetadata(t);if(s&&s.syntax&&s.interpolable){var u=a.getPropertySyntax(s.syntax);if(u){u.parser&&(i=u.parser(e,r),o=u.parser(n,r));var c=u.mixer(i,o,r);if(c){var l=gi.apply(void 0,c);return function(t){return 0===t?e:1===t?n:l(t)}}}}return gi(!1,!0,(function(t){return t?n:e}))}function Ti(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(Ti(t[i],e[i],n));return r}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var bi,Si={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},Ei=pi((function(t){var e=fi(t),n=Si[e];return[e=(null==n?void 0:n.alias)||e,n]}));function xi(t,e){var n,r=Ei(t),i=r[1];return[r[0],di(e)&&(null==i||null===(n=i.values)||void 0===n?void 0:n[e])||e]}(bi=t.Shape||(t.Shape={})).GROUP="g",bi.CIRCLE="circle",bi.ELLIPSE="ellipse",bi.IMAGE="image",bi.RECT="rect",bi.LINE="line",bi.POLYLINE="polyline",bi.POLYGON="polygon",bi.TEXT="text",bi.PATH="path",bi.HTML="html",bi.MESH="mesh";var wi=t.Syringe.defineToken("CanvasConfig");function ki(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}function Pi(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}}function Ci(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};if("M"===l)a=u;var p=c.length;h.currentPoint=i=[c[p-2],c[p-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 f=h.prePoint;if("C"===l){var d=[c[1],c[2]],y=[c[3],c[4]];h.startTangent=[f[0]-d[0],f[1]-d[1]],h.endTangent=[i[0]-y[0],i[1]-y[1]],0===h.startTangent[0]&&0===h.startTangent[1]&&(h.startTangent=[d[0]-y[0],d[1]-y[1]]),0===h.endTangent[0]&&0===h.endTangent[1]&&(h.endTangent=[y[0]-d[0],y[1]-d[1]])}r.push(h)}return r}function Ni(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 Mi=function(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)},_i=function(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)},Ai=function(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)},Oi=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=Mi,this.call=Mi,this._callAsync=_i,this.callAsync=_i,this._promise=Ai,this.promise=Ai,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=ke(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}(),Ii=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=ke(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,p=0,f=function(t){var i=t;h!==o&&("sync"!==e.options.taps[i].type||p++>20)&&(p=0,l+="function _next"+i+"() {\n",l+=h(),l+="}\n",h=function(){return(c?"return ":"")+"_next"+i+"();\n"});var a=h,f=function(t){return t?"":o()},d=e.callTap(i,{onError:function(t){return n(i,t,a,f)},onResult:r&&function(t){return r(i,t,a,f)},onDone:!r&&a,rethrowIfPossible:s&&(0>u||u>i)});h=function(){return d}},d=this.options.taps.length-1;d>=0;d--)f(d);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}(),Ri=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),Li=new Ri,Di=function(t){return Li.setup(this,t),Li.create(t)},Ui=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=Di,r._call=void 0,r.call=void 0,r}return me(e,t),e}(Oi),Fi=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),Bi=new Fi,Vi=function(t){return Bi.setup(this,t),Bi.create(t)},Gi=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=Vi,r._call=void 0,r.call=void 0,r}return me(e,t),e}(Oi),ji=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),zi=new ji,Hi=function(){throw new Error("tapAsync is not supported on a SyncHook")},Wi=function(){throw new Error("tapPromise is not supported on a SyncHook")},Yi=function(t){return zi.setup(this,t),zi.create(t)},qi=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=Hi,r.tapPromise=Wi,r.compile=Yi,r}return me(e,t),e}(Oi),Xi=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),Ki=new Xi,Zi=function(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")},Ji=function(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")},Qi=function(t){return Ki.setup(this,t),Ki.create(t)},$i=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=Zi,r.tapPromise=Ji,r.compile=Qi,r}return me(e,t),e}(qi),to=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function eo(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Be(e)?e+"px":e.toString(),s=di(n)?n.split(","):[n.value],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&0>to.indexOf(c)&&(c='"'+c+'"'),s[u]=c}return r+" "+i+" "+o+" "+a+" "+s.join(",")}var no=t.Syringe.defineToken("LayoutChildrenFactory"),ro=t.Syringe.defineToken("LayoutChildrenOptions");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 qr;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 qr;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:n}),n.promise},e}(),t.LayoutChildren=ue([ut(),ce(0,lt(t.LayoutContext)),ce(1,lt(ro)),le("design:paramtypes",[t.LayoutContext,Object])],t.LayoutChildren);var io=function(){};io.inputProperties=void 0,io.childrenInputProperties=void 0,io.layoutOptions=void 0;var oo,ao,so=t.Syringe.defineToken("LayoutEdgesFactory"),uo=t.Syringe.defineToken("LayoutEdgesOptions"),co=[0,0,0,0];t.LayoutEdges=function(e){var n,r,i,o,a,s,u,c,l,h,p,f,d,y,v,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(),T=null!==(n=null===(r=m.get(t.PropertyName.PADDING_TOP))||void 0===r?void 0:r.value)&&void 0!==n?n:0,b=null!==(i=null===(o=m.get(t.PropertyName.PADDING_END))||void 0===o?void 0:o.value)&&void 0!==i?i:0,S=null!==(a=null===(s=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===s?void 0:s.value)&&void 0!==a?a:0,E=null!==(u=null===(c=m.get(t.PropertyName.PADDING_START))||void 0===c?void 0:c.value)&&void 0!==u?u:0,x=null!==(l=null===(h=m.get(t.PropertyName.PADDING_TOP))||void 0===h?void 0:h.value)&&void 0!==l?l:0,w=null!==(p=null===(f=m.get(t.PropertyName.PADDING_END))||void 0===f?void 0:f.value)&&void 0!==p?p:0,k=null!==(d=null===(y=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===y?void 0:y.value)&&void 0!==d?d:0,P=null!==(v=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==v?v:0;this.blockStart=T+co[0]+x,this.inlineStart=b+co[1]+w,this.blockEnd=S+co[2]+k,this.inlineEnd=E+co[3]+P,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEdges=ue([ut(),ce(0,lt(uo)),le("design:paramtypes",[Object])],t.LayoutEdges),t.LayoutRegistry=((oo=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(ao.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)},ve(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],ao=oo),t.LayoutRegistry=ao=ue([ct()],t.LayoutRegistry);var lo=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=de(pe().mark((function t(e,n){return pe().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=de(pe().mark((function t(e){return pe().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=de(pe().mark((function t(e,n){var r;return pe().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=de(pe().mark((function e(n,r,i){var o,a,s,u,c,l,h,p,f,d,y;return pe().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}),p=r.getStyle.apply(r,c),f=a.intrinsicSizes(l,h,p),(d=this.runWorkQueue(f,s.workQueue)).next(),e.next=13,lo();case 13:y=d.next().value,s.clearWorkQueue(),r.setIntrisicSizes(y);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.calculateLayout=function(){var t=de(pe().mark((function t(e,n,r){var i;return pe().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=de(pe().mark((function e(n,r,i,o){var a,s,u,c,l,h,p,f,d,y,v,g,m;return pe().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)})),p=this.layoutEdgesFactory({node:r}),f=r.getStyle.apply(r,l),d=s.layout(h,p,o,f),(y=this.runWorkQueue(d,u.workQueue)).next(),e.next=13,lo();case 13:v=y.next().value,u.clearWorkQueue(),g=v instanceof t.FragmentResult?v:u.fragmentResultFactory(v),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=pe().mark((function e(n,r){var i,o=this;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Yr(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,p,f,d=e.getAllStyle();return{minContentInlineSize:(null===(n=d.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=d.get(t.PropertyName.WIDTH))||void 0===i?void 0:i.value)||0,maxContentInlineSize:(null===(o=d.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=d.get(t.PropertyName.WIDTH))||void 0===s?void 0:s.value)||0,minContentBlockSize:(null===(u=d.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=d.get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,maxContentBlockSize:(null===(h=d.get(t.PropertyName.MAX_HEIGHT))||void 0===h?void 0:h.value)||(null===(p=e.intrisicSizes)||void 0===p?void 0:p.maxContentBlockSize)||(null===(f=d.get(t.PropertyName.HEIGHT))||void 0===f?void 0:f.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=ue([ct(),ce(0,lt(t.LayoutRegistry)),ce(1,lt(Ne)),ce(2,lt(so)),le("design:paramtypes",[t.LayoutRegistry,Function,Function])],t.LayoutEngine);var ho=t.Syringe.defineToken("LayoutFragmentFactory"),po=t.Syringe.defineToken("LayoutFragmentOptions");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=ue([ut(),ce(0,lt(t.LayoutContext)),ce(1,lt(po)),le("design:paramtypes",[t.LayoutContext,Object])],t.LayoutFragment);var fo,yo,vo,go,mo,To=n((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 p,f=l.length;for(c=0;f>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(p=1,u=new Array(h-1);h>p;p++)u[p-1]=arguments[p];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}));(fo=t.UnitType||(t.UnitType={}))[fo.kUnknown=0]="kUnknown",fo[fo.kNumber=1]="kNumber",fo[fo.kPercentage=2]="kPercentage",fo[fo.kEms=3]="kEms",fo[fo.kExs=4]="kExs",fo[fo.kPixels=5]="kPixels",fo[fo.kCentimeters=6]="kCentimeters",fo[fo.kMillimeters=7]="kMillimeters",fo[fo.kInches=8]="kInches",fo[fo.kPoints=9]="kPoints",fo[fo.kPicas=10]="kPicas",fo[fo.kQuarterMillimeters=11]="kQuarterMillimeters",fo[fo.kViewportWidth=12]="kViewportWidth",fo[fo.kViewportHeight=13]="kViewportHeight",fo[fo.kViewportInlineSize=14]="kViewportInlineSize",fo[fo.kViewportBlockSize=15]="kViewportBlockSize",fo[fo.kViewportMin=16]="kViewportMin",fo[fo.kViewportMax=17]="kViewportMax",fo[fo.kSmallViewportWidth=18]="kSmallViewportWidth",fo[fo.kSmallViewportHeight=19]="kSmallViewportHeight",fo[fo.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",fo[fo.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",fo[fo.kSmallViewportMin=22]="kSmallViewportMin",fo[fo.kSmallViewportMax=23]="kSmallViewportMax",fo[fo.kLargeViewportWidth=24]="kLargeViewportWidth",fo[fo.kLargeViewportHeight=25]="kLargeViewportHeight",fo[fo.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",fo[fo.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",fo[fo.kLargeViewportMin=28]="kLargeViewportMin",fo[fo.kLargeViewportMax=29]="kLargeViewportMax",fo[fo.kDynamicViewportWidth=30]="kDynamicViewportWidth",fo[fo.kDynamicViewportHeight=31]="kDynamicViewportHeight",fo[fo.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",fo[fo.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",fo[fo.kDynamicViewportMin=34]="kDynamicViewportMin",fo[fo.kDynamicViewportMax=35]="kDynamicViewportMax",fo[fo.kContainerWidth=36]="kContainerWidth",fo[fo.kContainerHeight=37]="kContainerHeight",fo[fo.kContainerInlineSize=38]="kContainerInlineSize",fo[fo.kContainerBlockSize=39]="kContainerBlockSize",fo[fo.kContainerMin=40]="kContainerMin",fo[fo.kContainerMax=41]="kContainerMax",fo[fo.kRems=42]="kRems",fo[fo.kChs=43]="kChs",fo[fo.kUserUnits=44]="kUserUnits",fo[fo.kDegrees=45]="kDegrees",fo[fo.kRadians=46]="kRadians",fo[fo.kGradians=47]="kGradians",fo[fo.kTurns=48]="kTurns",fo[fo.kMilliseconds=49]="kMilliseconds",fo[fo.kSeconds=50]="kSeconds",fo[fo.kHertz=51]="kHertz",fo[fo.kKilohertz=52]="kKilohertz",fo[fo.kDotsPerPixel=53]="kDotsPerPixel",fo[fo.kDotsPerInch=54]="kDotsPerInch",fo[fo.kDotsPerCentimeter=55]="kDotsPerCentimeter",fo[fo.kFraction=56]="kFraction",fo[fo.kInteger=57]="kInteger",fo[fo.kQuirkyEms=58]="kQuirkyEms",(yo=t.UnitCategory||(t.UnitCategory={}))[yo.kUNumber=0]="kUNumber",yo[yo.kUPercent=1]="kUPercent",yo[yo.kULength=2]="kULength",yo[yo.kUAngle=3]="kUAngle",yo[yo.kUTime=4]="kUTime",yo[yo.kUFrequency=5]="kUFrequency",yo[yo.kUResolution=6]="kUResolution",yo[yo.kUOther=7]="kUOther",(vo=t.ValueRange||(t.ValueRange={}))[vo.kAll=0]="kAll",vo[vo.kNonNegative=1]="kNonNegative",vo[vo.kInteger=2]="kInteger",vo[vo.kNonNegativeInteger=3]="kNonNegativeInteger",vo[vo.kPositiveInteger=4]="kPositiveInteger",(go=t.Nested||(t.Nested={}))[go.kYes=0]="kYes",go[go.kNo=1]="kNo",(mo=t.ParenLess||(t.ParenLess={}))[mo.kYes=0]="kYes",mo[mo.kNo=1]="kNo";var bo,So=[{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}];(bo=t.CSSStyleValueType||(t.CSSStyleValueType={}))[bo.kUnknownType=0]="kUnknownType",bo[bo.kUnparsedType=1]="kUnparsedType",bo[bo.kKeywordType=2]="kKeywordType",bo[bo.kUnitType=3]="kUnitType",bo[bo.kSumType=4]="kSumType",bo[bo.kProductType=5]="kProductType",bo[bo.kNegateType=6]="kNegateType",bo[bo.kInvertType=7]="kInvertType",bo[bo.kMinType=8]="kMinType",bo[bo.kMaxType=9]="kMaxType",bo[bo.kClampType=10]="kClampType",bo[bo.kTransformType=11]="kTransformType",bo[bo.kPositionType=12]="kPositionType",bo[bo.kURLImageType=13]="kURLImageType",bo[bo.kColorType=14]="kColorType",bo[bo.kUnsupportedColorType=15]="kUnsupportedColorType";var Eo,xo,wo=function(){function e(){}e.parse=function(t,e){return[][0]},e.parseAll=function(t,e){return[]},e.unitFromName=function(e){return e?"number"===e?t.UnitType.kNumber:"percent"===e||"%"===e?t.UnitType.kPercentage:this.stringToUnitType(e):t.UnitType.kUnknown},e.unitTypeToUnitCategory=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return t.UnitCategory.kUNumber;case t.UnitType.kPercentage:return t.UnitCategory.kUPercent;case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:return t.UnitCategory.kULength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.UnitCategory.kUTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.UnitCategory.kUAngle;case t.UnitType.kHertz:case t.UnitType.kKilohertz:return t.UnitCategory.kUFrequency;case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:return t.UnitCategory.kUResolution;default:return t.UnitCategory.kUOther}},e.unitTypeToString=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:case t.UnitType.kUserUnits:return"";case t.UnitType.kPercentage:return"%";case t.UnitType.kEms:case t.UnitType.kQuirkyEms: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""},e.stringToUnitType=function(t){return So.find((function(e){return e.name===t})).unit_type},e.canonicalUnitTypeForCategory=function(e){switch(e){case t.UnitCategory.kUNumber:return t.UnitType.kNumber;case t.UnitCategory.kULength:return t.UnitType.kPixels;case t.UnitCategory.kUPercent:return t.UnitType.kPercentage;case t.UnitCategory.kUTime:return t.UnitType.kSeconds;case t.UnitCategory.kUAngle:return t.UnitType.kDegrees;case t.UnitCategory.kUFrequency:return t.UnitType.kHertz;case t.UnitCategory.kUResolution:return t.UnitType.kDotsPerPixel;default:return t.UnitType.kUnknown}},e.conversionToCanonicalUnitsScaleFactor=function(e){var n=1;switch(e){case t.UnitType.kPixels:case t.UnitType.kUserUnits:case t.UnitType.kDegrees:case t.UnitType.kSeconds:case t.UnitType.kHertz:break;case t.UnitType.kMilliseconds:n=.001;break;case t.UnitType.kCentimeters:case t.UnitType.kDotsPerCentimeter:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kDotsPerInch:case t.UnitType.kPoints:case t.UnitType.kPicas:break;case t.UnitType.kRadians:n=180/Math.PI;break;case t.UnitType.kGradians:n=.9;break;case t.UnitType.kTurns:n=360;break;case t.UnitType.kKilohertz:n=1e3}return n},e.isAngle=function(e){return e===t.UnitType.kDegrees||e===t.UnitType.kRadians||e===t.UnitType.kGradians||e===t.UnitType.kTurns},e.isViewportPercentageLength=function(e){return e>=t.UnitType.kViewportWidth&&t.UnitType.kDynamicViewportMax>=e},e.isContainerPercentageLength=function(e){return e>=t.UnitType.kContainerWidth&&t.UnitType.kContainerMax>=e},e.isLength=function(e){return e>=t.UnitType.kEms&&t.UnitType.kUserUnits>=e||e==t.UnitType.kQuirkyEms},e.isRelativeUnit=function(e){return e===t.UnitType.kPercentage||e===t.UnitType.kEms||e===t.UnitType.kExs||e===t.UnitType.kRems||e===t.UnitType.kChs||this.isViewportPercentageLength(e)||this.isContainerPercentageLength(e)},e.isTime=function(e){return e===t.UnitType.kSeconds||e===t.UnitType.kMilliseconds},e.isFrequency=function(e){return e==t.UnitType.kHertz||e==t.UnitType.kKilohertz},e.isResolution=function(e){return e>=t.UnitType.kDotsPerPixel&&t.UnitType.kDotsPerCentimeter>=e},e.isFlex=function(e){return e===t.UnitType.kFraction};var n=e.prototype;return n.toString=function(){return this.buildCSSText(t.Nested.kNo,t.ParenLess.kNo,"")},n.isNumericValue=function(){return this.getType()>=t.CSSStyleValueType.kUnitType&&this.getType()<=t.CSSStyleValueType.kClampType},e}(),ko=function(e){function n(t){var n;return(n=e.call(this)||this).colorSpace=void 0,n.colorSpace=t,n}me(n,e);var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.kColorType},r.to=function(t){return this},n}(wo),Po=function(e){function n(t){var n;return(n=e.call(this)||this).value=void 0,n.value=t,n}me(n,e);var r=n.prototype;return r.clone=function(){return new n(this.value)},r.getType=function(){return t.CSSStyleValueType.kKeywordType},r.buildCSSText=function(t,e,n){return n+this.value},n}(wo);function Co(e){switch(De(e,t.UnitType.kNumber),e){case t.UnitType.kEms:case t.UnitType.kExs:case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:case t.UnitType.kViewportWidth:case t.UnitType.kViewportHeight:case t.UnitType.kViewportInlineSize:case t.UnitType.kViewportBlockSize:case t.UnitType.kViewportMin:case t.UnitType.kViewportMax:case t.UnitType.kSmallViewportWidth:case t.UnitType.kSmallViewportHeight:case t.UnitType.kSmallViewportInlineSize:case t.UnitType.kSmallViewportBlockSize:case t.UnitType.kSmallViewportMin:case t.UnitType.kSmallViewportMax:case t.UnitType.kLargeViewportWidth:case t.UnitType.kLargeViewportHeight:case t.UnitType.kLargeViewportInlineSize:case t.UnitType.kLargeViewportBlockSize:case t.UnitType.kLargeViewportMin:case t.UnitType.kLargeViewportMax:case t.UnitType.kDynamicViewportWidth:case t.UnitType.kDynamicViewportHeight:case t.UnitType.kDynamicViewportInlineSize:case t.UnitType.kDynamicViewportBlockSize:case t.UnitType.kDynamicViewportMin:case t.UnitType.kDynamicViewportMax:case t.UnitType.kContainerWidth:case t.UnitType.kContainerHeight:case t.UnitType.kContainerInlineSize:case t.UnitType.kContainerBlockSize:case t.UnitType.kContainerMin:case t.UnitType.kContainerMax:case t.UnitType.kRems:case t.UnitType.kChs:return t.BaseType.kLength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.BaseType.kTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.BaseType.kAngle;case t.UnitType.kHertz:case t.UnitType.kKilohertz:return t.BaseType.kFrequency;case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:return t.BaseType.kResolution;case t.UnitType.kFraction:return t.BaseType.kFlex;case t.UnitType.kPercentage:return t.BaseType.kPercent;default:return t.BaseType.kLength}}function No(e){switch(e){case t.BaseType.kLength:return"length";case t.BaseType.kAngle:return"angle";case t.BaseType.kTime:return"time";case t.BaseType.kFrequency:return"frequency";case t.BaseType.kResolution:return"resolution";case t.BaseType.kFlex:return"flex";case t.BaseType.kPercent:return"percent"}return""}(Eo=t.CSSMathOperator||(t.CSSMathOperator={})).kAdd="+",Eo.kSubtract="-",Eo.kMultiply="*",Eo.kDivide="/",Eo.kMin="min",Eo.kMax="max",Eo.kClamp="clamp",Eo.kInvalid="",(xo=t.BaseType||(t.BaseType={}))[xo.kLength=0]="kLength",xo[xo.kAngle=1]="kAngle",xo[xo.kTime=2]="kTime",xo[xo.kFrequency=3]="kFrequency",xo[xo.kResolution=4]="kResolution",xo[xo.kFlex=5]="kFlex",xo[xo.kPercent=6]="kPercent",xo[xo.kNumBaseTypes=7]="kNumBaseTypes";var Mo=function(){function e(e,n){void 0===e&&(e=t.UnitType.kNumber),void 0===n&&(n=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=t.BaseType.kPercent,this.hasPercentHint=!1,this.exponents=new Array(t.BaseType.kNumBaseTypes).fill(0),e!==t.UnitType.kNumber&&this.setExponent(Co(e),n)}var n=e.prototype;return n.applyPercentHint=function(e){De(e,t.BaseType.kPercent),this.setExponent(e,this.exponent(e)+this.exponent(t.BaseType.kPercent)),this.setExponent(t.BaseType.kPercent,0),this.percentHint=e,this.hasPercentHint=!0},n.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},n.isOnlyNonZeroEntry=function(t,e){return De(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(e){return De(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)&&!this.hasPercentHint},n.matchesPercentage=function(){return this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesBaseTypePercentage=function(e){return De(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},n.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},e.add=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint),Le(e.percentHint,n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;if(e.exponents[i]!==n.exponents[i]&&(o!==t.BaseType.kPercent&&(e.applyPercentHint(o),n.applyPercentHint(o)),e.exponents[i]!==n.exponents[i]))return e}return e},e.multiply=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;e.setExponent(o,e.exponent(o)+n.exponent(o))}return e},e}(),_o=function(e){function n(t){var n;return(n=e.call(this)||this).type_=void 0,n.type_=t,n}me(n,e),n.fromNumberish=function(e){return"number"==typeof e?new Do(e,t.UnitType.kNumber):e},n.fromPercentish=function(e){return"number"==typeof e?new Do(100*e,t.UnitType.kPercentage):e};var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.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=Ao(n);return i.every((function(e){return t.equals(e)}))},r.add=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kSumType,i,this);var o=Ro(i,t.CSSMathOperator.kAdd);return o||Wo.create(i)},r.sub=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);i=i.map((function(t){return t.negate()})),Oo(t.CSSStyleValueType.kSumType,i,this);var o=Ro(i,t.CSSMathOperator.kAdd);return o||Wo.create(i)},r.mul=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kProductType,i,this);var o=Lo(i);return o||Yo.create(i)},r.div=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);i=i.map((function(t){return t.invert()})),Oo(t.CSSStyleValueType.kProductType,i,this);var o=Lo(i);return o||Yo.create(i)},r.min=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kMinType,i,this);var o=Ro(i,t.CSSMathOperator.kMin);return o||zo.create(i)},r.max=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kMaxType,i,this);var o=Ro(i,t.CSSMathOperator.kMax);return o||Ho.create(i)},r.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=Io(e[0]);return r?(n="string"==typeof t?Do.unitFromName(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(n.unitFromName(a)))return null}var s=this.sumValue();if(!s.length)return null;for(var u,c=[],l=ke(s);!(u=l()).done;){var h=u.value,p=Io(h);if(!p)return null;c.push(p)}if(0===e.length){c.sort((function(t,e){return t.unit-e.unit}));var f=Wo.create(c);return Re(!!f),f}for(var d=[],y=function(){var t=n.unitFromName(g[v]);Re(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);d.push(new Do(e,t))},v=0,g=e;g.length>v;v++)y();if(c.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return Wo.create(d)},r.type=function(){var e={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},n=this.type_.exponent(t.BaseType.kLength);return n&&(e.length=n),(n=this.type_.exponent(t.BaseType.kAngle))&&(e.angle=n),(n=this.type_.exponent(t.BaseType.kTime))&&(e.time=n),(n=this.type_.exponent(t.BaseType.kFrequency))&&(e.frequency=n),(n=this.type_.exponent(t.BaseType.kResolution))&&(e.resolution=n),(n=this.type_.exponent(t.BaseType.kFlex))&&(e.flex=n),(n=this.type_.exponent(t.BaseType.kPercent))&&(e.percent=n),this.type_.hasPercentHint&&(e.percentHint=No(this.type_.percentHint)),e},n.isValidUnit=function(e){return e!==t.UnitType.kUserUnits&&!!(e===t.UnitType.kNumber||e==t.UnitType.kPercentage||this.isLength(e)||this.isAngle(e)||this.isTime(e)||this.isFrequency(e)||this.isResolution(e)||this.isFlex(e))},r.negate=function(){return Bo.create(this)},r.invert=function(){return Fo.create(this)},n}(wo);function Ao(t){return t.map(_o.fromNumberish)}function Oo(t,e,n){Re(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Io(t){return 0===Object.keys(t.units).length?new Do(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Do(t.value,Number(Object.keys(t.units)[0])):null}function Ro(e,n){Re(!!e.length);var r=e[0]instanceof Do?e[0]:null;if(!r)return null;for(var i=r.value,o=1;e.length>o;o++){var a=e[o]instanceof Do?e[o]:null;if(!a||a.unit!==r.unit)return null;n===t.CSSMathOperator.kAdd?i+=a.value:n===t.CSSMathOperator.kMax?i=Math.max(i,a.value):n===t.CSSMathOperator.kMin&&(i=Math.min(i,a.value))}return new Do(i,r.unit)}function Lo(e){Re(!!e.length);for(var n=t.UnitType.kNumber,r=1,i=0;e.length>i;i++){var o=e[i]instanceof Do?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 Do(r,n)}var Do=function(e){function n(r,i){var o,a;return void 0===i&&(i=t.UnitType.kNumber),a="string"==typeof i?n.unitFromName(i):i,Re(n.isValidUnit(a)),(o=e.call(this,new Mo(a))||this).unit=void 0,o.value=void 0,o.unit=a,o.value=r,o}me(n,e),n.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},n.toCanonicalUnitIfPossible=function(e){var n=this.toCanonicalUnit(e);return n===t.UnitType.kUnknown?e:n},n.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Re(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},n.formatNumber=function(t,e){return void 0===e&&(e=""),t+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=n.toCanonicalUnit(this.unit);if(r!==n.toCanonicalUnit(e)||r===t.UnitType.kUnknown)return null;var i=wo.conversionToCanonicalUnitsScaleFactor(this.unit)/wo.conversionToCanonicalUnitsScaleFactor(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 t.CSSStyleValueType.kUnitType},r.sumValue=function(){var e=[],r={};return this.unit!==t.UnitType.kNumber&&(r[n.toCanonicalUnitIfPossible(this.unit)]=1),e.push({value:this.value*wo.conversionToCanonicalUnitsScaleFactor(this.unit),units:r}),e},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):Fo.create(this)},r.buildCSSText=function(e,r,i){var o;switch(this.unit){case t.UnitType.kUnknown:break;case t.UnitType.kInteger:o=Number(this.value).toFixed(0);break;case t.UnitType.kNumber:case t.UnitType.kPercentage:case t.UnitType.kEms:case t.UnitType.kQuirkyEms:case t.UnitType.kExs:case t.UnitType.kRems:case t.UnitType.kChs:case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:case t.UnitType.kHertz:case t.UnitType.kKilohertz:case t.UnitType.kTurns:case t.UnitType.kFraction:case t.UnitType.kViewportWidth:case t.UnitType.kViewportHeight:case t.UnitType.kViewportInlineSize:case t.UnitType.kViewportBlockSize:case t.UnitType.kViewportMin:case t.UnitType.kViewportMax:case t.UnitType.kSmallViewportWidth:case t.UnitType.kSmallViewportHeight:case t.UnitType.kSmallViewportInlineSize:case t.UnitType.kSmallViewportBlockSize:case t.UnitType.kSmallViewportMin:case t.UnitType.kSmallViewportMax:case t.UnitType.kLargeViewportWidth:case t.UnitType.kLargeViewportHeight:case t.UnitType.kLargeViewportInlineSize:case t.UnitType.kLargeViewportBlockSize:case t.UnitType.kLargeViewportMin:case t.UnitType.kLargeViewportMax:case t.UnitType.kDynamicViewportWidth:case t.UnitType.kDynamicViewportHeight:case t.UnitType.kDynamicViewportInlineSize:case t.UnitType.kDynamicViewportBlockSize:case t.UnitType.kDynamicViewportMin:case t.UnitType.kDynamicViewportMax:case t.UnitType.kContainerWidth:case t.UnitType.kContainerHeight:case t.UnitType.kContainerInlineSize:case t.UnitType.kContainerBlockSize:case t.UnitType.kContainerMin:case t.UnitType.kContainerMax:var a=this.value,s=n.unitTypeToString(this.unit);if(-999999>a||a>999999){var u=n.unitTypeToString(this.unit);o=!Number.isFinite(a)||Number.isNaN(a)?n.formatInfinityOrNaN(a,u):n.formatNumber(a,u)}else o=""+a+s}return i+=o},n}(_o),Uo=function(t){function e(){return t.apply(this,arguments)||this}return me(e,t),e.prototype.isUnitValue=function(){return!1},e}(_o),Fo=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="invert",r.value=t,r}me(n,e),n.create=function(t){return new n(t,Mo.negateExponents(t.type_))};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kInvertType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kInvertType&&this.value.equals(e.value)},r.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)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="1 / "),n===t.ParenLess.kNo&&(r+=")"),r},n}(Uo),Bo=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="negate",r.value=t,r}me(n,e),n.create=function(t){return new n(t,t.type_)};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kNegateType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kNegateType&&this.value.equals(e.value)},r.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="-"),n===t.ParenLess.kNo&&(r+=")"),r},n}(Uo);function Vo(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 Go,jo=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).values=void 0,r.values=e,r}me(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}(Uo),zo=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).operator="min",t}me(n,e),n.create=function(t){return new n(t,Vo(t,Mo.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMinType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=ke(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},r.buildCSSText=function(e,n,r){r+="min(";for(var i,o=!0,a=ke(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}(jo),Ho=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).operator="max",t}me(n,e),n.create=function(t){return new n(t,Vo(t,Mo.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMaxType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=ke(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},r.buildCSSText=function(e,n,r){r+="max(";for(var i,o=!0,a=ke(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}(jo),Wo=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).operator="sum",t}me(n,e),n.create=function(t){return new n(t,Vo(t,Mo.add))},n.numericTypeFromUnitMap=function(t){var e=new Mo;return Object.keys(t).forEach((function(n){var r=t[n];e=Mo.multiply(e,new Mo(Number(n),r),false),Re(!0)})),e},n.canCreateNumericTypeFromSumValue=function(t){var e=this;Re(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return Mo.add(n,e.numericTypeFromUnitMap(t.units),false),!0}))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kSumType},r.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(ge({},e)):t[n].value+=e.value}))})),n.canCreateNumericTypeFromSumValue(t)?t:null},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kNegateType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" - "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" + ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}(jo),Yo=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).operator="product",t}me(n,e),n.create=function(t){return new n(t,Vo(t,Mo.multiply))},n.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){De(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 r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kProductType},r.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(e){var r=e.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(e){i.push({value:t.value*e.value,units:n.multiplyUnitMaps(t.units,e.units)})}))})),t=i})),t},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kInvertType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" / "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" * ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}(jo),qo=new Do(0,"px"),Xo=new Do(0,"deg"),Ko=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}me(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}(ko);(Go=t.GradientType||(t.GradientType={}))[Go.Constant=0]="Constant",Go[Go.LinearGradient=1]="LinearGradient",Go[Go.RadialGradient=2]="RadialGradient";var Zo=function(e){function n(t,n){var r;return(r=e.call(this)||this).type=void 0,r.value=void 0,r.type=t,r.value=n,r}me(n,e);var r=n.prototype;return r.clone=function(){return new n(this.type,this.value)},r.buildCSSText=function(t,e,n){return n},r.getType=function(){return t.CSSStyleValueType.kColorType},n}(wo);function Jo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qo(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $o(){}var ta=.7,ea=1/ta,na="\\s*([+-]?\\d+)\\s*",ra="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ia="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oa=/^#([0-9a-f]{3,8})$/,aa=new RegExp("^rgb\\("+[na,na,na]+"\\)$"),sa=new RegExp("^rgb\\("+[ia,ia,ia]+"\\)$"),ua=new RegExp("^rgba\\("+[na,na,na,ra]+"\\)$"),ca=new RegExp("^rgba\\("+[ia,ia,ia,ra]+"\\)$"),la=new RegExp("^hsl\\("+[ra,ia,ia]+"\\)$"),ha=new RegExp("^hsla\\("+[ra,ia,ia,ra]+"\\)$"),pa={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 fa(){return this.rgb().formatHex()}function da(){return this.rgb().formatRgb()}function ya(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=oa.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?va(e):3===n?new Ta(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ga(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ga(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=aa.exec(t))?new Ta(e[1],e[2],e[3],1):(e=sa.exec(t))?new Ta(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ua.exec(t))?ga(e[1],e[2],e[3],e[4]):(e=ca.exec(t))?ga(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=la.exec(t))?xa(e[1],e[2]/100,e[3]/100,1):(e=ha.exec(t))?xa(e[1],e[2]/100,e[3]/100,e[4]):pa.hasOwnProperty(t)?va(pa[t]):"transparent"===t?new Ta(NaN,NaN,NaN,0):null}function va(t){return new Ta(t>>16&255,t>>8&255,255&t,1)}function ga(t,e,n,r){return r>0||(t=e=n=NaN),new Ta(t,e,n,r)}function ma(t){return t instanceof $o||(t=ya(t)),t?new Ta((t=t.rgb()).r,t.g,t.b,t.opacity):new Ta}function Ta(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ba(){return"#"+Ea(this.r)+Ea(this.g)+Ea(this.b)}function Sa(){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 Ea(t){return(16>(t=Math.max(0,Math.min(255,Math.round(t)||0)))?"0":"")+t.toString(16)}function xa(t,e,n,r){return r>0?n>0&&1>n?e>0||(t=NaN):t=e=NaN:t=e=n=NaN,new ka(t,e,n,r)}function wa(t){if(t instanceof ka)return new ka(t.h,t.s,t.l,t.opacity);if(t instanceof $o||(t=ya(t)),!t)return new ka;if(t instanceof ka)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 ka(a,s,u,t.opacity)}function ka(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Pa(t,e,n){return 255*(60>t?e+(n-e)*t/60:180>t?n:240>t?e+(n-e)*(240-t)/60:e)}Jo($o,ya,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:fa,formatHex:fa,formatHsl:function(){return wa(this).formatHsl()},formatRgb:da,toString:da}),Jo(Ta,(function(t,e,n,r){return 1===arguments.length?ma(t):new Ta(t,e,n,null==r?1:r)}),Qo($o,{brighter:function(t){return t=null==t?ea:Math.pow(ea,t),new Ta(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?ta:Math.pow(ta,t),new Ta(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:ba,formatHex:ba,formatRgb:Sa,toString:Sa})),Jo(ka,(function(t,e,n,r){return 1===arguments.length?wa(t):new ka(t,e,n,null==r?1:r)}),Qo($o,{brighter:function(t){return t=null==t?ea:Math.pow(ea,t),new ka(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?ta:Math.pow(ta,t),new ka(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 Ta(Pa(240>t?t+120:t-240,i,r),Pa(t,i,r),Pa(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 Ca=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Na=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Ma=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,_a=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Aa={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},Oa=pi((function(t){return"angular"===t.type?Number(t.value):Aa[t.value]||0})),Ia=pi((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}})),Ra=pi((function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return ei(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(!Fe(u)&&!Fe(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,$r(t)]}));if("linear-gradient"===r)return new Zo(t.GradientType.LinearGradient,{angle:i?Oa(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=Ia(i[0].at);return new Zo(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=Ca.exec(e);if(r){var i,o=(null===(i=r[2].match(_a))||void 0===i?void 0:i.map((function(t){return t.split(":")})))||[];return[new Zo(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=Na.exec(t);if(e){var n;return{cx:.5,cy:.5,steps:((null===(n=e[4].match(_a))||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(!di(a))return[new Zo(t.GradientType.RadialGradient,a)];e=a}}else if("p"===n)return function(t){var e=Ma.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 La(t){return je(t)&&!!t.image}var Da=pi((function(t){if(La(t))return ge({repetition:"repeat"},t);if(Fe(t)&&(t=""),"transparent"===t)return new Ko(0,0,0,0);"currentColor"===t&&(t="black");var e=Ra(t);if(e)return e;var n=ya(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),Se(Ko,r)}));function Ua(t,e){if(t instanceof Ko&&e instanceof Ko)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(vr(e[n],0,255));return e[3]=vr(e[3],0,1),"rgba("+e.join(",")+")"}]}var Fa,Ba=function(){function t(t,e){this.center=void 0,this.halfExtents=void 0,this.min=Mn(),this.max=Mn(),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){this.center=In(Mn(),t||Mn()),this.halfExtents=In(Mn(),e||On(0,0,0)),this.min=qn(this.min,this.center,this.halfExtents),this.max=Ln(this.max,this.center,this.halfExtents)},e.setMinMax=function(t,e){Ln(this.center,e,t),Fn(this.center,this.center,.5),qn(this.halfExtents,e,t),Fn(this.halfExtents,this.halfExtents,.5),In(this.min,t),In(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,p=i-u,f=i+u,d=o-c,y=o+c,v=e.center,g=v[0],m=v[1],T=v[2],b=e.halfExtents,S=b[0],E=b[1],x=b[2],w=g-S,k=g+S,P=m-E,C=m+E,N=T-x,M=T+x;l>w&&(l=w),k>h&&(h=k),p>P&&(p=P),C>f&&(f=C),d>N&&(d=N),M>y&&(y=M),n[0]=.5*(l+h),n[1]=.5*(p+f),n[2]=.5*(d+y),a[0]=.5*(h-l),a[1]=.5*(f-p),a[2]=.5*(y-d),this.min[0]=l,this.min[1]=p,this.min[2]=d,this.max[0]=h,this.max[1]=f,this.max[2]=y}},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],p=e[2],f=e[6],d=e[10],y=Math.abs(a),v=Math.abs(s),g=Math.abs(u),m=Math.abs(c),T=Math.abs(l),b=Math.abs(h),S=Math.abs(p),E=Math.abs(f),x=Math.abs(d);Rn(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]+p*i[0]+f*i[1]+d*i[2]),Rn(r,y*o[0]+v*o[1]+g*o[2],m*o[0]+T*o[1]+b*o[2],S*o[0]+E*o[1]+x*o[2]),this.min=qn(this.min,n,r),this.max=Ln(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=Mn(),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}(Mn(),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?In(Mn(),this.min):272===t.pnVertexFlag?On(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?On(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?On(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?On(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?On(this.max[0],this.min[1],this.max[2]):On(this.max[0],this.max[1],1===t.pnVertexFlag?this.min[2]:this.max[2])},e.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?In(Mn(),this.max):272===t.pnVertexFlag?On(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?On(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?On(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?On(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?On(this.min[0],this.max[1],this.min[2]):On(this.min[0],this.min[1],1===t.pnVertexFlag?this.max[2]:this.min[2])},t}(),Va=Mn(),Ga=function(){function t(t,e){this.center=void 0,this.radius=void 0,this.center=t||Mn(),this.radius=e||.5}var e=t.prototype;return e.containsPoint=function(t){return qn(Va,t,this.center),An(Va)<this.radius*this.radius},e.intersects=function(t){qn(Va,t.center,this.center);var e=t.radius+this.radius;return An(Va)<=e*e},t}(),ja=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||On(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 Gn(t,this.normal)-this.distance},e.normalize=function(){var t=1/Zn(this.normal);Fn(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&&zn(n,t,e,i),o},t}();(Fa=t.Mask||(t.Mask={}))[Fa.OUTSIDE=4294967295]="OUTSIDE",Fa[Fa.INSIDE=0]="INSIDE",Fa[Fa.INDETERMINATE=2147483647]="INDETERMINATE";var za=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;6>e;e++)this.planes.push(new ja)}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],p=t[11],f=t[12],d=t[13],y=t[14],v=t[15];Rn(this.planes[0].normal,i-e,u-o,p-c),this.planes[0].distance=v-f,Rn(this.planes[1].normal,i+e,u+o,p+c),this.planes[1].distance=v+f,Rn(this.planes[2].normal,i+n,u+a,p+l),this.planes[2].distance=v+d,Rn(this.planes[3].normal,i-n,u-a,p-l),this.planes[3].distance=v-d,Rn(this.planes[4].normal,i-r,u-s,p-h),this.planes[4].distance=v-y,Rn(this.planes[5].normal,i+r,u+s,p+h),this.planes[5].distance=v+y,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),Ha=Mn(),Wa=Mn(),Ya=Mn(),qa=Mn(),Xa=Mn(),Ka=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||Mn(),this.direction=e||On(0,0,-1)}var e=t.prototype;return e.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},e.intersectsSphere=function(t,e){var n=qn(Ha,this.origin,t.center);Vn(Wa,In(Wa,this.direction));var r=Gn(n,Wa),i=Gn(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(0>o)return!1;var a=Math.abs(-r-Math.sqrt(o));return e&&(In(e,this.direction),Bn(e,this.origin,e,a)),!0},e.intersectsPlane=function(t,e){var n=(t.distance-Gn(t.normal,this.origin))/Gn(t.normal,this.direction),r=n>=0;return r&&e&&Bn(e,this.origin,this.direction,n),r},e.intersectsAABBWithoutIntersection=function(t){var e=Ha,n=Wa,r=Ya,i=qa,o=Xa,a=this.direction;return qn(e,this.origin,t.center),Rn(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),Xn(r,e,a),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(Rn(o,Math.abs(a[0]),Math.abs(a[1]),Math.abs(a[2])),jn(n,a,e),Rn(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},e.intersectAABBWithIntersection=function(t,e){var n=In(Mn(),t.getMin());qn(n,n,this.origin);var r=In(Mn(),t.getMax());qn(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=0>n[0]?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=0>r[0]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=0>n[1]?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=0>r[1]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=0>n[2]?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=0>r[2]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=Rn(Ya,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),a=Rn(qa,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),s=Math.min(Math.min(a[0],a[1]),a[2]),u=Math.max(Math.max(o[0],o[1]),o[2]),c=s>=u&&u>=0;return c&&(In(e,this.direction),Bn(e,this.origin,e,u)),c},t}(),Za=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}(),Ja=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 Qa(t,e){if(Fe(e))return new Do(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return new Do(Number(e),"px");if("deg".search(t)>=0)return new Do(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 new Do(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}function $a(t){return Qa(new RegExp("px","g"),t)}function ts(t){return Be(t)?new Do(t,"px"):Qa(new RegExp("px|%|em|rem","g"),t)}function es(t){return Qa(new RegExp("deg|rad|grad|turn","g"),t)}function ns(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,u=Do.toCanonicalUnit(t.unit),c=t.convertTo(u),l=e.convertTo(u);return c&&l?(a=c.value,s=l.value,o=Do.unitTypeToString(t.unit)):(Do.isLength(t.unit)||Do.isLength(e.unit))&&(a=as(t,i,n),s=as(e,i,n),o="px"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function rs(e){var n=0;return e.unit===t.UnitType.kDegrees?n=e.value:e.unit===t.UnitType.kRadians?n=br(Number(e.value)):e.unit===t.UnitType.kTurns&&(n=Sr(Number(e.value))),n}function is(t){return di(t)?t.split(" ").map((function(t){return ts(t)})):t.map((function(t){return ts(t.toString())}))}function os(t,e,n){if(t.length===e.length){var r=t[0].unit;return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t.map((function(t){return new Do(t,r)})).join(" ")}]}}function as(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 Ba.isEmpty(i)||(o=2*i.halfExtents[n]),Number(e.value)/100*o}return 0}function ss(t){return t.toString()}function us(t){return"number"==typeof t?new Do(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new Do(Number(t)):new Do(0)}function cs(t,e){return[t.value,e.value,ss]}function ls(t,e){return function(n,r){return[n.value,r.value,function(n){return ss(vr(n,t,e))}]}}function hs(t){return t.map((function(t){return Array.isArray(t)?he([],t,!0):t}))}function ps(t,e){return void 0===e&&(e="off"),function(t,e){if("off"===e)return hs(t);var n="number"!=typeof e||1>e?1:Math.pow(10,e);return t.map((function(t){var r=t.slice(1).map(Number).map((function(t){return e?Math.round(t*n)/n:Math.round(t)}));return he([t[0]],r,!0)}))}(t,e).map((function(t){return t[0]+t.slice(1).join(" ")})).join("")}var fs={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function ds(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 ys={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function vs(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return ys[e]===t.length-1&&"achlmqstvz".includes(e)}))}function gs(t){return vs(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function ms(t){return gs(t)&&t.every((function(t){return"ACLMQZ".includes(t[0])}))}function Ts(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ys[n]&&("m"===n&&r.length>2?(t.segments.push(he([e],r.splice(0,2),!0)),n="l",e="m"===e?"l":"L"):t.segments.push(he([e],r.splice(0,ys[n]),!0)),ys[n]););}function bs(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 Ss(t){return t>=48&&57>=t||43===t||45===t||46===t}function Es(t){return t>=48&&57>=t}function xs(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)),Es(e)||46===e){if(46!==e){if(a=48===e,e=r.charCodeAt(o+=1),a&&n>o&&e&&Es(e))return void(t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number');for(;n>o&&Es(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(c=!0,o+=1;Es(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||!Es(r.charCodeAt(o)))return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent');for(;n>o&&Es(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 ws(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 ks(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=ys[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,ws(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?xs(t):bs(t),t.err.length)return;t.data.push(t.param),ws(t),e>t.index&&44===n.charCodeAt(t.index)&&(t.index+=1,ws(t))}if(t.index>=t.max)break;if(!Ss(n.charCodeAt(t.index)))break}Ts(t)}else Ts(t);else t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command'}var Ps=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 Cs(t){if(gs(t))return hs(t);var e=function(t){if(vs(t))return hs(t);var e=new Ps(t);for(ws(e);e.max>e.index&&!e.err.length;)ks(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:e=he([u],a.map((function(t,e){return t+(e%2?r:n)})),!0)}else e=he([u],a,!0);var c=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[c-2],r=e[c-1],"M"===u&&(i=n,o=r)}return e}))}function Ns(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=he(["C",c,l],s,!0)}else if("T"===n){var h=2*r-e.qx,p=2*i-e.qy;e.qx=h,e.qy=p,u=he(["Q",h,p],s,!0)}else if("Q"===n){var f=s[1];e.qx=s[0],e.qy=f}return u}function Ms(t){if(ms(t))return hs(t);for(var e=Cs(t),n=se({},fs),r=[],i=e.length,o=0;i>o;o+=1){r[o]=e[o][0],e[o]=Ns(e[o],n);var a=e[o],s=a.length;n.x1=+a[s-2],n.y1=+a[s-1],n.x2=+a[s-4]||n.x1,n.y2=+a[s-3]||n.y1}return e}function _s(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function As(t,e,n,r,i,o,a,s,u,c){var l,h,p,f,d,y=t,v=e,g=n,m=r,T=s,b=u,S=120*Math.PI/180,E=Math.PI/180*(+i||0),x=[];if(c)h=c[0],p=c[1],f=c[2],d=c[3];else{v=(l=_s(y,v,-E)).y;var w=((y=l.x)-(T=(l=_s(T,b,-E)).x))/2,k=(v-(b=l.y))/2,P=w*w/(g*g)+k*k/(m*m);P>1&&(g*=P=Math.sqrt(P),m*=P);var C=g*g,N=m*m,M=(o===a?-1:1)*Math.sqrt(Math.abs((C*N-C*k*k-N*w*w)/(C*k*k+N*w*w)));f=M*g*k/m+(y+T)/2,d=M*-m*w/g+(v+b)/2,h=Math.asin(((v-d)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),p=Math.asin(((b-d)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),h=f>y?Math.PI-h:h,p=f>T?Math.PI-p:p,0>h&&(h=2*Math.PI+h),0>p&&(p=2*Math.PI+p),a&&h>p&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var _=p-h;if(Math.abs(_)>S){var A=p,O=T,I=b;p=h+S*(a&&p>h?1:-1),x=As(T=f+g*Math.cos(p),b=d+m*Math.sin(p),g,m,i,0,a,O,I,[p,A,f,d])}_=p-h;var R=Math.cos(h),L=Math.sin(h),D=Math.cos(p),U=Math.sin(p),F=Math.tan(_/4),B=4/3*g*F,V=4/3*m*F,G=[y,v],j=[y+B*L,v-V*R],z=[T+B*U,b-V*D],H=[T,b];if(j[0]=2*G[0]-j[0],j[1]=2*G[1]-j[1],c)return he(he(he(he([],j,!0),z,!0),H,!0),x,!0);for(var W=[],Y=0,q=(x=he(he(he(he([],j,!0),z,!0),H,!0),x,!0)).length;q>Y;Y+=1)W[Y]=Y%2?_s(x[Y-1],x[Y],E).y:_s(x[Y],x[Y+1],E).x;return W}function Os(t,e,n,r,i,o){var a=1/3,s=2/3;return[a*t+s*n,a*e+s*r,a*i+s*n,a*o+s*r,i,o]}function Is(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function Rs(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ls(t,e,n,r,i){var o=Rs([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(0<i)if(i<o){var s=Is([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 Ds(t,e,n,r){var i=.5,o=[t,e],a=[n,r],s=Is(o,a,i),u=Is(a,s,i),c=Is(s,u,i),l=Is(u,c,i),h=Is(c,l,i),p=he(he(he(he(he([],o,!0),s,!0),c,!0),h,!0),[i],!1),f=Ls.apply(void 0,p).point,d=he(he(he(he(he([],h,!0),l,!0),u,!0),a,!0),[0],!1),y=Ls.apply(void 0,d).point;return[f.x,f.y,y.x,y.y,n,r]}function Us(t,e){var n,r=t[0],i=t.slice(1).map(Number),o=i[0],a=i[1],s=e.x1,u=e.y1,c=e.x,l=e.y;switch("TQ".includes(r)||(e.qx=null,e.qy=null),r){case"M":return e.x=o,e.y=a,t;case"A":return n=he([s,u],i,!0),he(["C"],As.apply(void 0,n),!0);case"Q":return e.qx=o,e.qy=a,n=he([s,u],i,!0),he(["C"],Os.apply(void 0,n),!0);case"L":return he(["C"],Ds(s,u,o,a),!0);case"Z":return s===c&&u===l?["C",s,u,c,l,c,l]:he(["C"],Ds(s,u,c,l),!0)}return t}function Fs(t,e){if(void 0===e&&(e=!1),function(t){return ms(t)&&t.every((function(t){return"MC".includes(t[0])}))}(t)){var n=hs(t);return e?[n,[]]:n}for(var r,i,o=Ms(t),a=se({},fs),s=[],u="",c=o.length,l=[],h=0;c>h;h+=1){o[h]&&(u=o[h][0]),s[h]=u;var p=Us(o[h],a);o[h]=p,ds(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 Bs(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 Vs(t,e,n,r,i,o,a,s,u,c){var l=Math.abs,h=Math.sin,p=Math.cos,f=Math.sqrt,d=Math.PI,y=l(n),v=l(r),g=(i%360+360)%360*(d/180);if(t===s&&e===u)return{x:t,y:e};if(0===y||0===v)return Ls(t,e,s,u,c).point;var m=(t-s)/2,T=(e-u)/2,b={x:p(g)*m+h(g)*T,y:-h(g)*m+p(g)*T},S=Math.pow(b.x,2)/Math.pow(y,2)+Math.pow(b.y,2)/Math.pow(v,2);S>1&&(y*=f(S),v*=f(S));var E=(Math.pow(y,2)*Math.pow(v,2)-Math.pow(y,2)*Math.pow(b.y,2)-Math.pow(v,2)*Math.pow(b.x,2))/(Math.pow(y,2)*Math.pow(b.y,2)+Math.pow(v,2)*Math.pow(b.x,2)),x=(o!==a?1:-1)*f(E=0>E?0:E),w=x*(y*b.y/v),k=x*(-v*b.x/y),P=p(g)*w-h(g)*k+(t+s)/2,C=h(g)*w+p(g)*k+(e+u)/2,N={x:(b.x-w)/y,y:(b.y-k)/v},M=Bs({x:1,y:0},N),_=Bs(N,{x:(-b.x-w)/y,y:(-b.y-k)/v});!a&&_>0?_-=2*d:a&&0>_&&(_+=2*d);var A=M+(_%=2*d)*c,O=y*p(A),I=v*h(A);return{x:p(g)*O-h(g)*I+P,y:h(g)*O+p(g)*I+C}}function Gs(t,e,n,r,i,o,a,s,u,c){var l,h="number"==typeof c,p=t,f=e,d=0,y=[p,f,d],v=[p,f],g={x:0,y:0},m=[{x:p,y:f}];h&&0>=c&&(g={x:p,y:f});for(var T=0;100>=T;T+=1){if(l=Vs(t,e,n,r,i,o,a,s,u,T/100),m=m.concat({x:p=l.x,y:f=l.y}),d+=Rs(v,[p,f]),v=[p,f],h&&d>=c&&c>y[2]){var b=(d-c)/(d-y[2]);g={x:v[0]*(1-b)+y[0]*b,y:v[1]*(1-b)+y[1]*b}}y=[p,f,d]}return h&&c>=d&&(g={x:s,y:u}),{length:d,point:g,min:{x:Math.min.apply(Math,m.map((function(t){return t.x}))),y:Math.min.apply(Math,m.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,m.map((function(t){return t.x}))),y:Math.max.apply(Math,m.map((function(t){return t.y})))}}}function js(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 zs(t,e,n,r,i,o,a,s,u){var c,l="number"==typeof u,h=t,p=e,f=0,d=[h,p,f],y=[h,p],v={x:0,y:0},g=[{x:h,y:p}];l&&0>=u&&(v={x:h,y:p});for(var m=0;30>=m;m+=1){if(c=js(t,e,n,r,i,o,a,s,m/30),g=g.concat({x:h=c.x,y:p=c.y}),f+=Rs(y,[h,p]),y=[h,p],l&&f>=u&&u>d[2]){var T=(f-u)/(f-d[2]);v={x:y[0]*(1-T)+d[0]*T,y:y[1]*(1-T)+d[1]*T}}d=[h,p,f]}return l&&u>=f&&(v={x:a,y:s}),{length:f,point:v,min:{x:Math.min.apply(Math,g.map((function(t){return t.x}))),y:Math.min.apply(Math,g.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,g.map((function(t){return t.x}))),y:Math.max.apply(Math,g.map((function(t){return t.y})))}}}function Hs(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 Ws(t,e,n,r,i,o,a){var s,u="number"==typeof a,c=t,l=e,h=0,p=[c,l,h],f=[c,l],d={x:0,y:0},y=[{x:c,y:l}];u&&0>=a&&(d={x:c,y:l});for(var v=0;30>=v;v+=1){if(s=Hs(t,e,n,r,i,o,v/30),y=y.concat({x:c=s.x,y:l=s.y}),h+=Rs(f,[c,l]),f=[c,l],u&&h>=a&&a>p[2]){var g=(h-a)/(h-p[2]);d={x:f[0]*(1-g)+p[0]*g,y:f[1]*(1-g)+p[1]*g}}p=[c,l,h]}return u&&a>=h&&(d={x:i,y:o}),{length:h,point:d,min:{x:Math.min.apply(Math,y.map((function(t){return t.x}))),y:Math.min.apply(Math,y.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,y.map((function(t){return t.x}))),y:Math.max.apply(Math,y.map((function(t){return t.y})))}}}function Ys(t,e){for(var n,r,i,o,a,s,u,c,l,h=Ms(t),p="number"==typeof e,f=[],d=0,y=0,v=0,g=0,m=[],T=[],b=0,S={x:0,y:0},E=S,x=S,w=S,k=0,P=0,C=h.length;C>P;P+=1)f=(u="M"===(c=(l=h[P])[0]))?f:he([d,y],l.slice(1),!0),u?(E=S={x:v=l[1],y:g=l[2]},b=0,p&&.001>e&&(w=S)):"L"===c?(b=(n=Ls.apply(void 0,he(he([],f,!1),[(e||0)-k],!1))).length,S=n.min,E=n.max,x=n.point):"A"===c?(b=(r=Gs.apply(void 0,he(he([],f,!1),[(e||0)-k],!1))).length,S=r.min,E=r.max,x=r.point):"C"===c?(b=(i=zs.apply(void 0,he(he([],f,!1),[(e||0)-k],!1))).length,S=i.min,E=i.max,x=i.point):"Q"===c?(b=(o=Ws.apply(void 0,he(he([],f,!1),[(e||0)-k],!1))).length,S=o.min,E=o.max,x=o.point):"Z"===c&&(b=(a=Ls.apply(void 0,he(he([],f=[d,y,v,g],!1),[(e||0)-k],!1))).length,S=a.min,E=a.max,x=a.point),p&&e>k&&k+b>=e&&(w=x),T=he(he([],T,!0),[E],!1),m=he(he([],m,!0),[S],!1),k+=b,d=(s="Z"!==c?l.slice(-2):[v,g])[0],y=s[1];return p&&e>=k&&(w={x:d,y:y}),{length:k,point:w,min:{x:Math.min.apply(Math,m.map((function(t){return t.x}))),y:Math.min.apply(Math,m.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,T.map((function(t){return t.x}))),y:Math.max.apply(Math,T.map((function(t){return t.y})))}}}function qs(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}function Xs(t){return function(t){var e=0,n=0,r=0;return Fs(t).map((function(t){var i;return"M"===t[0]?(e=t[1],n=t[2],0):(r=qs.apply(void 0,he([e,n],t.slice(1),!1)),i=t.slice(-2),e=i[0],n=i[1],r)})).reduce((function(t,e){return t+e}),0)}(t)>=0}function Ks(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?zs.apply(void 0,r).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=Is(n,r,e),s=Is(r,i,e),u=Is(i,o,e),c=Is(a,s,e),l=Is(s,u,e),h=Is(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function Zs(t,e,n){var r=Ks(t),i=Ks(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),p=[c,l],f=[h-o,h-a],d=0,y=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return f[e]-=(d=n&&f[e]&&t.l>=p[e])?1:0,d?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:Zs(y[0],y[1],h)}var Js=pi((function(t){var e;try{if(Array.isArray(t)&&0===t.length)throw new Error;e=Ms(t)}catch(n){e=Ms(""),console.error("[g]: Invalid SVG Path definition: "+t)}var n=ki(e),r=Pi(e),i=r.polygons,o=r.polylines,a=Fs(e,!0),s=a[0],u=a[1],c=Ci(s),l=function(t){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var e=Ys(t),n=e.min,r=n.x,i=n.y,o=e.max,a=o.x,s=o.y,u=a-r,c=s-i;return{length:e.length,width:u,height:c,x:r,y:i,x2:a,y2:s,cx:r+u/2,cy:i+c/2,cz:Math.max(u,c)+Math.min(u,c)/2}}(e),h=l.x,p=l.y,f=l.width,d=l.height;return{absolutePath:e,hasArc:n,segments:c,polygons:i,polylines:o,curve:s,totalLength:l.length,zCommandIndexes:u,rect:new Ja(Number.isFinite(h)?h:0,Number.isFinite(p)?p:0,Number.isFinite(f)?f:0,Number.isFinite(d)?d:0)}}),(function(t){return di(t)?t:ps(t)}));function Qs(t,e){var n=Js(t);return e&&(e.parsedStyle.defX=n.rect.x,e.parsedStyle.defY=n.rect.y),n}function $s(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=Zs(r,i));var a,s,u,c,l,h,p,f,d=Xs(o[0])!==Xs(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))})))):hs(o[0]);return[d,(u=o[1],c=d,l=u.length-1,h=[],p=0,f=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),f.forEach((function(t,e){u.slice(1).forEach((function(t,n){p+=Rs(u[(e+n)%l].slice(-2),c[n%l].slice(-2))})),h[e]=p,p=0})),f[h.indexOf(Math.min.apply(null,h))]),function(t){return t}]}function tu(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function eu(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}}var nu={box:function(t,e,n,r){return eu([t,n],[e,r])},length:function(t,e,n,r){return tu(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?tu(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?tu(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 ru=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+=tu(r[0],r[1],i[0],i[1])}return e}(t)};function iu(t,e){var n;n=di(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=ru(n);n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=nu.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 ou=function(t){return Qa(/deg|rad|grad|turn|px|%/g,t)},au=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function su(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,au.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return ou(t)||Da(t)}))}),n.lastIndex===t.length)return r}return[]}var uu=function(){var t=new Float32Array(16);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};var cu=function(t){var e=new Float32Array(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};var lu=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],p=t[11],f=t[12],d=t[13],y=t[14],v=t[15];return(e*a-n*o)*(h*v-p*y)-(e*s-r*o)*(l*v-p*d)+(e*u-i*o)*(l*y-h*d)+(n*s-r*a)*(c*v-p*f)-(n*u-i*a)*(c*y-h*f)+(r*u-i*s)*(c*d-l*f)};var hu=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],p=e[10],f=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,b=n*c-o*a,S=r*u-i*s,E=r*c-o*s,x=i*c-o*u,w=l*y-h*d,k=l*v-p*d,P=l*g-f*d,C=h*v-p*y,N=h*g-f*y,M=p*g-f*v,_=m*M-T*N+b*C+S*P-E*k+x*w;if(!_)return null;return t[0]=(s*M-u*N+c*C)*(_=1/_),t[1]=(i*N-r*M-o*C)*_,t[2]=(y*x-v*E+g*S)*_,t[3]=(p*E-h*x-f*S)*_,t[4]=(u*P-a*M-c*k)*_,t[5]=(n*M-i*P+o*k)*_,t[6]=(v*b-d*x-g*T)*_,t[7]=(l*x-p*b+f*T)*_,t[8]=(a*N-s*P+c*w)*_,t[9]=(r*P-n*N-o*w)*_,t[10]=(d*E-y*b+g*m)*_,t[11]=(h*b-l*E-f*m)*_,t[12]=(s*k-a*C-u*w)*_,t[13]=(n*C-r*k+i*w)*_,t[14]=(y*T-d*S-v*m)*_,t[15]=(l*S-h*T+p*m)*_,t};var pu=function(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};var fu=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t};var du={length:function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)},normalize:fu,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},cross:function(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}},yu=uu(),vu=uu(),gu=[0,0,0,0],mu=[[0,0,0],[0,0,0],[0,0,0]],Tu=[0,0,0];function bu(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}var Su={number:function(t){return new Do(t)},percent:function(t){return new Do(t,"%")},px:function(t){return new Do(t,"px")},em:function(t){return new Do(t,"em")},rem:function(t){return new Do(t,"rem")},deg:function(t){return new Do(t,"deg")},grad:function(t){return new Do(t,"grad")},rad:function(t){return new Do(t,"rad")},turn:function(t){return new Do(t,"turn")},s:function(t){return new Do(t,"s")},ms:function(t){return new Do(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;Dt.get(ni).registerMetadata({name:e,inherited:n,interpolable:r,defaultValue:i,syntax:o})},registerLayout:function(e,n){Dt.get(t.LayoutRegistry).registerLayout(e,n)}},Eu=null;function xu(t){return function(e){var n=0;return t.map((function(t){return t===Eu?e[n++]:t}))}}function wu(t){return t}var ku={matrix:["NNNNNN",[Eu,Eu,0,0,Eu,Eu,0,0,0,0,1,0,Eu,Eu,0,1],wu],matrix3d:["NNNNNNNNNNNNNNNN",wu],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",xu([Eu,Eu,Su.number(1)]),wu],scalex:["N",xu([Eu,Su.number(1),Su.number(1)]),xu([Eu,Su.number(1)])],scaley:["N",xu([Su.number(1),Eu,Su.number(1)]),xu([Su.number(1),Eu])],scalez:["N",xu([Su.number(1),Su.number(1),Eu])],scale3d:["NNN",wu],skew:["Aa",null,wu],skewx:["A",null,xu([Eu,Xo])],skewy:["A",null,xu([Xo,Eu])],translate:["Tt",xu([Eu,Eu,qo]),wu],translatex:["T",xu([Eu,qo,qo]),xu([Eu,qo])],translatey:["T",xu([qo,Eu,qo]),xu([qo,Eu])],translatez:["L",xu([qo,qo,Eu])],translate3d:["TTL",wu]};function Pu(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=ku[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],p=u[l],f=void 0;if(void 0===(f=h?{A:function(t){return"0"===t.trim()?Xo:es(t)},N:us,T:ts,L:$a}[p.toUpperCase()](h):{a:Xo,n:c[0],t:qo}[p]))return[];c.push(f)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function Cu(t){var e,n,r,i;switch(t.t){case"rotatex":return i=Tr(rs(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=Tr(rs(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=Tr(rs(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=Tr(rs(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=Tr(rs(t.d[0])),h=Tr(rs(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=Tr(rs(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=Tr(rs(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=as(t.d[0],0,null)||0,n=as(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=as(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=as(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=as(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=as(t.d[0],0,null)||0,n=as(t.d[1],0,null)||0,r=as(t.d[2],0,null)||0,1];case"perspective":var p=as(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,p?-1/p: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 Nu(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 Mu(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(e||(e=[0,0,0]),n||(n=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0,1]),o||(o=[0,0,0,1]),!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}(yu,t))return!1;if(cu(vu),vu[3]=0,vu[7]=0,vu[11]=0,vu[15]=1,Math.abs(1e-8>lu(vu)))return!1;var a,s,u,c,l,h,p,f=yu[3],d=yu[7],y=yu[11],v=yu[12],g=yu[13],m=yu[14],T=yu[15];if(0!==f||0!==d||0!==y){if(gu[0]=f,gu[1]=d,gu[2]=y,gu[3]=T,!hu(vu,vu))return!1;pu(vu,vu),(a=i)[0]=(u=vu)[0]*(c=(s=gu)[0])+u[4]*(l=s[1])+u[8]*(h=s[2])+u[12]*(p=s[3]),a[1]=u[1]*c+u[5]*l+u[9]*h+u[13]*p,a[2]=u[2]*c+u[6]*l+u[10]*h+u[14]*p,a[3]=u[3]*c+u[7]*l+u[11]*h+u[15]*p}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=v,e[1]=g,e[2]=m,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(mu,yu),n[0]=du.length(mu[0]),du.normalize(mu[0],mu[0]),r[0]=du.dot(mu[0],mu[1]),bu(mu[1],mu[1],mu[0],1,-r[0]),n[1]=du.length(mu[1]),du.normalize(mu[1],mu[1]),r[0]/=n[1],r[1]=du.dot(mu[0],mu[2]),bu(mu[2],mu[2],mu[0],1,-r[1]),r[2]=du.dot(mu[1],mu[2]),bu(mu[2],mu[2],mu[1],1,-r[2]),n[2]=du.length(mu[2]),du.normalize(mu[2],mu[2]),r[1]/=n[2],r[2]/=n[2],du.cross(Tu,mu[1],mu[2]),0>du.dot(mu[0],Tu))for(var b=0;3>b;b++)n[b]*=-1,mu[b][0]*=-1,mu[b][1]*=-1,mu[b][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+mu[0][0]-mu[1][1]-mu[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-mu[0][0]+mu[1][1]-mu[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-mu[0][0]-mu[1][1]+mu[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+mu[0][0]+mu[1][1]+mu[2][2],0)),mu[2][1]>mu[1][2]&&(o[0]=-o[0]),mu[0][2]>mu[2][0]&&(o[1]=-o[1]),mu[1][0]>mu[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(Cu).reduce(Nu)}(t),e,n,r,i,o),[[e,n,r,o,i]]}var _u=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],p=i[2],f=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(h*h+p*p),d[0][1]=2*(l*h-p*f),d[0][2]=2*(l*p+h*f),d[1][0]=2*(l*h+p*f),d[1][1]=1-2*(l*l+p*p),d[1][2]=2*(h*p-l*f),d[2][0]=2*(l*p-h*f),d[2][1]=2*(h*p+l*f),d[2][2]=1-2*(l*l+h*h),a=t(a,d);var y,v=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(v[2][1]=r[2],a=t(a,v)),r[1]&&(v[2][1]=0,v[2][0]=r[0],a=t(a,v)),r[0]&&(v[2][0]=0,v[1][0]=r[0],a=t(a,v));for(var g=0;3>g;g++)for(var m=0;3>m;m++)a[g][m]*=n[g];return 0==(y=a)[0][2]&&0==y[0][3]&&0==y[1][2]&&0==y[1][3]&&0==y[2][0]&&0==y[2][1]&&1==y[2][2]&&0==y[2][3]&&0==y[3][2]&&1==y[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 Au(t){return t.toFixed(6).replace(".000000","")}function Ou(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=Mu(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=Mu(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=vr(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 _u(t[0],t[1],t[2],e,t[4]).map(Au).join(",")}])}function Iu(t){return t.replace(/[xy]/,"")}function Ru(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function Lu(e,n,r){var i=!1;if(!e.length||!n.length){e.length||(i=!0,e=n,n=[]);for(var o=function(t){var r=e[t],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;n.push({t:i,d:o.map((function(t){return"number"==typeof t?new Do(a):new Do(a,t.unit)}))})},a=0;e.length>a;a++)o(a)}var s,u,c=[],l=[],h=[];if(e.length!==n.length){var p=Ou(e,n);c=[p[0]],l=[p[1]],h=[["matrix",[p[2]]]]}else for(var f=0;e.length>f;f++){var d=e[f].t,y=n[f].t,v=e[f].d,g=n[f].d,m=ku[d],T=ku[y],b=void 0;if(u=y,"perspective"===(s=d)&&"perspective"===u||!("matrix"!==s&&"matrix3d"!==s||"matrix"!==u&&"matrix3d"!==u)){var S=Ou([e[f]],[n[f]]);c.push(S[0]),l.push(S[1]),h.push(["matrix",[S[2]]])}else{if(d===y)b=d;else if(m[2]&&T[2]&&Iu(d)===Iu(y))b=Iu(d),v=m[2](v),g=T[2](g);else{if(!m[1]||!T[1]||Ru(d)!==Ru(y)){var E=Ou(e,n);c=[E[0]],l=[E[1]],h=[["matrix",[E[2]]]];break}b=Ru(d),v=m[1](v),g=T[1](g)}for(var x=[],w=[],k=[],P=0;v.length>P;P++){var C=(v[P].unit===t.UnitType.kNumber?cs:ns)(v[P],g[P],r,!1,P);x[P]=C[0],w[P]=C[1],k.push(C[2])}c.push(x),l.push(w),h.push([b,k])}}if(i){var N=c;c=l,l=N}return[c,l,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return h[e][1][n](t)})).join(",");return"matrix"===h[e][0]&&16===n.split(",").length&&(h[e][0]="matrix3d"),"matrix3d"===h[e][0]&&6===n.split(",").length&&(h[e][0]="matrix"),h[e][0]+"("+n+")"})).join(" ")}]}function Du(t){if(di(t)){if("text-anchor"===t)return[new Do(0,"px"),new Do(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:[ts(Uu(e[0])),ts(Uu(e[1]))]}return[new Do(t[0]||0,"px"),new Do(t[1]||0,"px")]}function Uu(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var Fu,Bu=t.Syringe.defineToken("CSSPropertySyntaxFactory"),Vu=t.Syringe.defineToken("CSSProperty");t.CSSPropertyAngle=function(){function t(){this.parser=es,this.mixer=ns}return t.prototype.calculator=function(t,e,n,r){return new Do(rs(n),"deg")},t}(),t.CSSPropertyAngle=ue([ct({token:{token:Vu,named:t.PropertySyntax.ANGLE}})],t.CSSPropertyAngle),(Fu=t.ElementEvent||(t.ElementEvent={})).DESTROY="destroy",Fu.ATTR_MODIFIED="DOMAttrModified",Fu.INSERTED="DOMNodeInserted",Fu.CHILD_INSERTED="child-inserted",Fu.REMOVED="removed",Fu.CHILD_REMOVED="child-removed",Fu.MOUNTED="DOMNodeInsertedIntoDocument",Fu.UNMOUNTED="DOMNodeRemovedFromDocument",Fu.BOUNDS_CHANGED="bounds-changed",Fu.RENDER_ORDER_CHANGED="render-order-changed",Fu.CULLED="culled";var Gu,ju=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 Za,this.page=new Za,this.canvas=new Za,this.viewport=new Za,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(){},ve(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}(),zu=function(t){function e(e,n){var r;return(r=t.call(this,null)||this).type=e,r.detail=n,Object.assign(xe(r),n),r}return me(e,t),e}(ju),Hu=function(){function t(){this.emitter=new To.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=Ge(n)&&n||je(n)&&n.capture,i=je(n)&&n.once,o=Ve(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=Ve(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=Ge(n)&&n||je(n)&&n.capture,o=Ve(e)?void 0:e;return t=i?t+"capture":t,e=Ve(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 zu(t,e))},e.dispatchEvent=function(t){if(!(t instanceof ju))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e,n;if(this.document)e=this;else if(this.defaultView)e=this.defaultView;else{var r;e=null===(r=this.ownerDocument)||void 0===r?void 0:r.defaultView}e&&(t.manager=e.getEventService()||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t));return!t.defaultPrevented},t}(),Wu=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}me(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("Method not implemented.")},r.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},r.lookupPrefix=function(t){throw new Error("Method not implemented.")},r.normalize=function(){throw new Error("Method not implemented.")},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],p=s[c+l];if(p!==h){var f=h.parentNode.childNodes;return f.indexOf(h)<f.indexOf(p)?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)}))},ve(n,[{key:"textContent",get:function(){var e="";this.nodeName===t.Shape.TEXT&&(e+=this.style.text);for(var n,r=ke(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,!0)})),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}(Hu);Wu.DOCUMENT_POSITION_DISCONNECTED=1,Wu.DOCUMENT_POSITION_PRECEDING=2,Wu.DOCUMENT_POSITION_FOLLOWING=4,Wu.DOCUMENT_POSITION_CONTAINS=8,Wu.DOCUMENT_POSITION_CONTAINED_BY=16,Wu.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,(Gu=t.Strategy||(t.Strategy={}))[Gu.Standard=0]="Standard";var Yu=function(){function e(){this.strategy=t.Strategy.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return e.prototype.isCulled=function(){return this.enable&&!this.visible},e}();Yu.tag="c-cullable";var qu=function(){this.contentBounds=void 0,this.renderBounds=void 0};qu.tag="c-geometry";var Xu=function(){this.aabb=void 0};Xu.tag="c-rbush-node";var Ku=t.Syringe.defineToken("RBushRoot"),Zu=function(){this.bounds=void 0,this.boundsDirty=!0,this.renderBounds=void 0,this.renderBoundsDirty=!0,this.dirtyRenderBounds=void 0,this.dirty=!1};Zu.tag="c-renderable";var Ju=function(){this.dirty=!1,this.sorted=void 0,this.lastSortedIndex=void 0,this.renderOrder=0};Ju.tag="c-sortable";var Qu=function(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=On(0,0,0),this.localRotation=hr(0,0,0,1),this.localScale=On(1,1,1),this.localTransform=on(),this.localSkew=yr(0,0),this.position=On(0,0,0),this.rotation=hr(0,0,0,1),this.scaling=On(1,1,1),this.worldTransform=on(),this.origin=On(0,0,0)};Qu.tag="c-transform";var $u=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 me(e,t),e}(ju);$u.ADDITION=2,$u.MODIFICATION=1,$u.REMOVAL=3;var tc=0,ec=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).sceneGraphService=Dt.get(ul),t.entity=tc++,t.renderable=new Zu,t.cullable=new Yu,t.transformable=new Qu,t.sortable=new Ju,t.geometry=new qu,t.rBushNode=new Xu,t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={},t.parsedStyle={},t.attributes={},t}me(n,e),n.isElement=function(t){return!!t.getAttribute};var r=n.prototype;return r.cloneNode=function(t){throw new Error("Method not implemented.")},r.appendChild=function(e,n){return this.sceneGraphService.attach(e,this,n),this.dispatchEvent(new zu(t.ElementEvent.CHILD_INSERTED,{child:e})),e.dispatchEvent(new $u(t.ElementEvent.INSERTED,this,"","","",0,"","")),e},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,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},r.removeChild=function(e,n){return void 0===n&&(n=!0),e.dispatchEvent(new $u(t.ElementEvent.REMOVED,this,"","","",0,"","")),n&&(e.dispatchEvent(new zu(t.ElementEvent.DESTROY)),e.destroyed=!0),this.dispatchEvent(new zu(t.ElementEvent.CHILD_REMOVED,{child:e})),this.sceneGraphService.detach(e),n&&e.emitter.removeAllListeners(),e},r.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},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(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},r.destroy=function(){this.dispatchEvent(new zu(t.ElementEvent.DESTROY)),this.remove(!1),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=xi(t.toString(),"");e=this.attributes[n[0]]}return Fe(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("Method not implemented.")},r.getAttributeNode=function(t){throw new Error("Method not implemented.")},r.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},r.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},r.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},r.removeAttributeNode=function(t){throw new Error("Method not implemented.")},r.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},r.setAttributeNode=function(t){throw new Error("Method not implemented.")},r.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},r.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},ve(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}(Wu);t.DisplayObjectPool=function(){function e(){this.pool={},this.htmlPool=[]}var n=e.prototype;return n.getByEntity=function(t){return this.pool[t]},n.add=function(e,n){this.pool[e]=n,n.nodeName===t.Shape.HTML&&this.htmlPool.push(n)},n.remove=function(e){var n=this.pool[e];if(delete this.pool[e],n.nodeName===t.Shape.HTML){var r=this.htmlPool.indexOf(n);this.htmlPool.splice(r,1)}},n.getHTMLs=function(){return this.htmlPool},e}(),t.DisplayObjectPool=ue([ct()],t.DisplayObjectPool);var nc={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:""},rc=function(e){function n(n){var r,i;return(i=e.call(this)||this).config=void 0,i.styleValueRegistry=Dt.get(ni),i.isCustomElement=!1,i.activeAnimations=[],i.mutationEvent=new $u(t.ElementEvent.ATTR_MODIFIED,xe(i),null,null,null,$u.MODIFICATION,null,null),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=ge({},nc,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"),i.style=new Proxy(ge({},i.attributes,{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.initAttributes(i.config.style),Dt.get(t.DisplayObjectPool).add(i.entity,xe(i)),i}me(n,e);var r=n.prototype;return r.destroy=function(){e.prototype.destroy.call(this),Dt.get(t.DisplayObjectPool).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},r.cloneNode=function(t){var e=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:ge({},this.attributes)});return e.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach((function(n){var r=n.cloneNode(t);e.appendChild(r)})),e},r.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t),e.dirty=!0},r.setAttribute=function(t,n,r){void 0===r&&(r=!1);var i=xi(t,n),o=i[0],a=i[1];Ue(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 $u(t.ElementEvent.ATTR_MODIFIED,e,o,o,"clipPath",$u.MODIFICATION,o,o)),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback("clipPath",o,o)})),a.dirty=!0,this.mutationEvent.prevValue=s,this.mutationEvent.newValue=n,this.mutationEvent.attrName=e,this.mutationEvent.prevParsedValue=u,this.mutationEvent.newParsedValue=this.parsedStyle[e],this.dispatchEvent(this.mutationEvent),this.isCustomElement&&this.isConnected&&this.attributeChangedCallback&&this.attributeChangedCallback(e,s,n)},r.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],r=e[1],i=t.getMax();return new Ja(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,mr(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,mr(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,mr(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,mr(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,mr(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=mr(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},r.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=mr(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=Er(Mn(),this.sceneGraphService.getWorldTransform(this));return br(t[2])},r.getLocalEulerAngles=function(){var t=Er(Mn(),this.sceneGraphService.getLocalRotation(this));return br(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 Fe(e)&&Fe(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},r.rotate=function(t,e,n){return Fe(e)&&Fe(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 delete this.parsedStyle.transform,i?i.play(new nl(this,t,e)):null},r.show=function(){this.style.visibility="visible"},r.hide=function(){this.style.visibility="hidden"},r.isVisible=function(){var t,e;return"visible"===(null===(t=this.parsedStyle)||void 0===t||null===(e=t.visibility)||void 0===e?void 0:e.value)},r.isInteractive=function(){var t,e;return"none"!==(null===(t=this.parsedStyle)||void 0===t||null===(e=t.pointerEvents)||void 0===e?void 0:e.value)},r.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},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.getCount=function(){return this.childElementCount},r.getParent=function(){return this.parentElement},r.getChildren=function(){return this.children},r.getFirst=function(){return this.firstElementChild},r.getLast=function(){return this.lastElementChild},r.getChildByIndex=function(t){return this.children[t]||null},r.add=function(t,e){return this.appendChild(t,e)},r.setClip=function(t){this.style.clipPath=t},r.getClip=function(){return this.style.clipPath||null},r.set=function(t,e){this.config[t]=e},r.get=function(t){return this.config[t]},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?je(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.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.setZIndex=function(t){return this.style.zIndex=t,this},r.getMatrix=function(t){var e=t||this.getWorldTransform(),n=mn(Mn(),e),r=n[0],i=n[1],o=Tn(Mn(),e),a=o[0],s=o[1],u=bn($n(),e),c=Er(Mn(),u);return xr(c[0]||c[2],r,i,a,s)},r.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},r.setMatrix=function(t){var e=kr(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=kr(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setLocalEulerAngles(e[4]).setLocalPosition(n,r).setLocalScale(i,o)},ve(n,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),n}(ec),ic=["style"],oc=function(t){function e(e){var n,r=void 0===e?{}:e,i=r.style,o=Ee(r,ic);return(n=t.call(this,ge({style:ge({x:"",y:""},i)},o))||this).isCustomElement=!0,n}return me(e,t),e}(rc),ac=["style"],sc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,ac);return e.call(this,ge({type:t.Shape.CIRCLE,style:ge({cx:"",cy:"",r:""},i)},o))||this}return me(n,e),n}(rc),uc=["style"],cc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,uc);return e.call(this,ge({type:t.Shape.ELLIPSE,style:ge({cx:"",cy:"",rx:"",ry:""},i)},o))||this}return me(n,e),n}(rc),lc=["style"],hc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,lc);return e.call(this,ge({type:t.Shape.GROUP,style:ge({x:"",y:"",width:"",height:""},i)},o))||this}return me(n,e),n}(rc),pc=["style"],fc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,pc);return e.call(this,ge({type:t.Shape.IMAGE,style:ge({x:"",y:"",img:"",width:"",height:""},i)},o))||this}return me(n,e),n}(rc),dc=["style"],yc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,dc);return e.call(this,ge({type:t.Shape.LINE,style:ge({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},i)},o))||this}me(n,e);var r=n.prototype;return r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=nu.pointAt(e.x1.value,e.y1.value,e.x2.value,e.y2.value,t),o=i.x,a=i.y,s=Hn(Mn(),On(o-n,a-r,0),this.getLocalTransform());return new Za(s[0],s[1])},r.getTotalLength=function(){var t=this.parsedStyle;return nu.length(t.x1.value,t.y1.value,t.x2.value,t.y2.value)},n}(rc),vc=["style"],gc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,vc);return e.call(this,ge({type:t.Shape.PATH,style:ge({path:"",miterLimit:""},i)},o))||this}me(n,e);var r=n.prototype;return r.getTotalLength=function(){return this.parsedStyle.path.totalLength},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=e.path,o=function(t,e){return Ys(t,e).point}(i.absolutePath,t*i.totalLength),a=o.x,s=o.y,u=Hn(Mn(),On(a-n,s-r,0),this.getLocalTransform());return new Za(u[0],u[1])},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}(rc),mc=["style"],Tc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,mc);return e.call(this,ge({type:t.Shape.POLYGON,style:ge({points:"",miterLimit:""},i)},o))||this}return me(n,e),n}(rc),bc=["style"],Sc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,bc);return e.call(this,ge({type:t.Shape.POLYLINE,style:ge({points:"",miterLimit:""},i)},o))||this}me(n,e);var r=n.prototype;return r.getTotalLength=function(){return this.parsedStyle.points.totalLength},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=nu.pointAt(o[s][0],o[s][1],o[s+1][0],o[s+1][1],a),c=u.x,l=u.y,h=Hn(Mn(),On(c-n,l-r,0),this.getLocalTransform());return new Za(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}(rc),Ec=["style"],xc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,Ec);return e.call(this,ge({type:t.Shape.RECT,style:ge({x:"",y:"",width:"",height:"",radius:""},i)},o))||this}return me(n,e),n}(rc),wc=["style"],kc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,wc);return e.call(this,ge({type:t.Shape.TEXT,style:ge({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},i)},o))||this}me(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}(rc),Pc=["style"],Cc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=Ee(i,Pc);return(r=e.call(this,ge({type:t.Shape.HTML,style:ge({x:"",y:"",width:"auto",height:"auto",innerHTML:""},o)},a))||this).cullable.enable=!1,r}me(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 Ba;return a.setMinMax(On(i,o,0),On(i+n.width,o+n.height,0)),a}return null},r.getLocalBounds=function(){if(this.parentNode){var t=ln(on(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Ba.isEmpty(e)){var n=new Ba;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},n}(rc),Nc=function(t){function e(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 me(e,t),e}(ju),Mc=0,_c=function(){function t(t,e){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._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=t,t.animation=this,this.timeline=e,this.id=""+Mc++,this._inEffect=!!this.effect.update(0),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("Method not implemented.")},e.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.dispatchEvent=function(t){throw new Error("Method not implemented.")},e.commitStyles=function(){throw new Error("Method not implemented.")},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 Nc(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 Nc(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},ve(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(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}();function Ac(t,e){return Number(t.id)-Number(e.id)}var Oc,Ic,Rc=function(){function t(t){var e=this;this.document=void 0,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.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(Ac),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t){var e=new _c(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(Ac),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}(),Lc=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",n.timeline=new Rc(xe(n));var r={};return Ml.forEach((function(e){var n=e.defaultValue;e.inherited&&n&&(r[e.name]=Ve(n)?n(t.Shape.GROUP):n)})),n.documentElement=new hc({id:"g-root",style:r}),n.documentElement.ownerDocument=xe(n),n.documentElement.parentNode=xe(n),n.childNodes=[n.documentElement],n}me(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?kc:hc);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("Method not implemented.")},r.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},r.elementFromPoint=function(){var t=de(pe().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,p;return pe().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",(p=t.sent.picked)&&p[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=de(pe().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,p;return pe().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(p=t.sent.picked)[p.length-1]!==this.documentElement&&p.push(this.documentElement),t.abrupt("return",p);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("Use document.documentElement instead.")},r.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},r.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},r.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},r.append=function(){throw new Error("Use document.documentElement instead.")},r.prepend=function(){throw new Error("Use document.documentElement instead.")},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)},ve(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}(Wu),Dc=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 Za,e.movement=new Za,e.offset=new Za,e.global=new Za,e.screen=new Za,e}me(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("Method not implemented.")},ve(e,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"x",get:function(){return this.clientX}},{key:"y",get:function(){return this.clientY}},{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}(ju),Uc=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}me(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!")},e}(Dc),Fc=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 me(e,t),e}(Dc),Bc=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=ri,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 ve(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=ci(t),this._easing=t}}]),t}(),Vc=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}(),Gc=0,jc=new WeakMap,zc=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:Ic&&function(t){return t===Ic||t===Oc}(t)?Ic:null}(e[n-1],t);if(r)return void(e[n-1]=r)}else Xc.push(this.observer),qc||(qc=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(Kc):Kc());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=jc.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=Wc("attributes",r=e.target)).attributeName=i,n.attributeNamespace=o;var a=e.attrChange===$u.ADDITION?null:e.prevValue;Yc(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 Ic||((Ic=Vc.copy(Oc)).oldValue=t,Ic)}(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=Wc("childList",r=e.relatedNode)).addedNodes=s,n.removedNodes=u,n.previousSibling=l,n.nextSibling=h,Yc(r,(function(t){if(t.childList)return n}))}Oc=Ic=void 0},e}(),Hc=function(){function t(t){this.callback=void 0,this.nodes=[],this.records=[],this.uid=Gc++,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=jc.get(t);r||jc.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 zc(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=jc.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 Wc(t,e){return Oc=new Vc(t,e)}function Yc(t,e){for(var n=t;n;n=n.parentNode){var r=jc.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 qc=!1,Xc=[];function Kc(){qc=!1;var t=Xc;Xc=[],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=jc.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&Kc()}function Zc(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(Fe(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(!Fe(s)&&!Fe(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 Jc="backwards|forwards|both|none".split("|"),Qc="reverse|alternate|alternate-reverse".split("|");function $c(t,e){var n=new Bc;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===Jc.indexOf(t[e]))return;if("direction"===e&&-1===Qc.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function tl(t,e){var n;return $c(t=el(null!==(n=t)&&void 0!==n?n:{duration:"auto"}),e)}function el(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var nl=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=tl(n,!1),this.timing.effect=this,this.timing.activeDuration=li(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Zc(e,this.timing),this.interpolations=yi(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=hi(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=Zc(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}(),rl=function(){function e(){this.registry={},this.define(t.Shape.CIRCLE,sc),this.define(t.Shape.ELLIPSE,cc),this.define(t.Shape.RECT,xc),this.define(t.Shape.IMAGE,fc),this.define(t.Shape.LINE,yc),this.define(t.Shape.GROUP,hc),this.define(t.Shape.PATH,gc),this.define(t.Shape.POLYGON,Tc),this.define(t.Shape.POLYLINE,Sc),this.define(t.Shape.TEXT,kc),this.define(t.Shape.HTML,Cc)}var n=e.prototype;return n.define=function(t,e){this.registry[t]=e},n.get=function(t){return this.registry[t]},e}(),il=t.Syringe.defineToken("SceneGraphSelectorFactory"),ol=t.Syringe.defineToken("SceneGraphSelector",{multiple:!1}),al=/\[\s*(.*)=(.*)\s*\]/;function sl(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}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(al),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 Fe(n)?"":n.toString?n.toString():""},t}(),t.DefaultSceneGraphSelector=ue([ct({token:ol})],t.DefaultSceneGraphSelector);var ul=t.Syringe.defineToken("SceneGraphService");t.DefaultSceneGraphService=function(){function e(){var e,n,r,i,o,a=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new zu(t.ElementEvent.BOUNDS_CHANGED),this.rotate=(e=$n(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=On(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var s=$n();ir(s,n[0],n[1],n[2]);var u=a.getRotation(t),c=a.getRotation(t.parentNode);pr(e,c),rr(e,e),er(s,e,s),er(o.localRotation,s,u),dr(o.localRotation,o.localRotation),a.dirtifyLocal(t,o)}else a.rotateLocal(t,n)}),this.rotateLocal=(n=$n(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=On(e,r,i));var o=t.transformable;ir(n,e[0],e[1],e[2]),fr(o.localRotation,o.localRotation,n),a.dirtifyLocal(t,o)}),this.setEulerAngles=(r=$n(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=On(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){ir(o.localRotation,e[0],e[1],e[2]);var s=a.getRotation(t.parentNode);pr(r,rr($n(),s)),fr(o.localRotation,o.localRotation,r),a.dirtifyLocal(t,o)}else a.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=On(e,n,r));var i=t.transformable;Wn(e,Mn())||(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,p=i*h-o*l,f=o*c-r*h,d=r*l-i*c,y=2*n[3];l*=y,h*=y,f*=2,d*=2,t[0]=a+(c*=y)+(p*=2),t[1]=s+l+f,t[2]=u+h+d}(e,e,i.localRotation),Ln(i.localPosition,i.localPosition,e),a.dirtifyLocal(t,i))},this.setPosition=(i=on(),function(t,e){var n=t.transformable;e=On(e[0],e[1],e[2]||0),Wn(a.getPosition(t),e)||(n.position=e,null!==t.parentNode&&t.parentNode.transformable?(sn(i,t.parentNode.transformable.worldTransform),ln(i,i),Hn(n.localPosition,e,i)):In(n.localPosition,e),a.dirtifyLocal(t,n))}),this.translate=(o=Mn(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=On(e,n,r)),Wn(e,Mn())||(Ln(o,a.getPosition(t),e),a.setPosition(t,o))}),this.setRotation=function(){var t=$n();return function(e,n,r,i,o){var s=e.transformable;if("number"==typeof n&&(n=hr(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var u=a.getRotation(e.parentNode);pr(t,u),rr(t,t),er(s.localRotation,t,n),dr(s.localRotation,s.localRotation),a.dirtifyLocal(e,s)}else a.setLocalRotation(e,n)}}}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){t.parentNode&&this.detach(t),t.parentNode=e,Fe(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0);var i=t.transformable;i&&this.dirtifyWorld(t,i),i.frozen&&this.unfreezeParentToRoot(t)},n.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var r=t.parentNode.childNodes.indexOf(t);r>-1&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),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=On(e,n,r));var i=t.transformable;if(!Wn(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=On(e,n,r));var i=t.transformable;ir(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},n.setLocalPosition=function(t,e){var n=t.transformable;e=On(e[0],e[1],e[2]||0),Wn(n.localPosition,e)||(In(n.localPosition,e),this.dirtifyLocal(t,n))},n.scaleLocal=function(t,e){var n=t.transformable;Un(n.localScale,n.localScale,On(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},n.setLocalScale=function(t,e){var n=t.transformable,r=On(e[0],e[1],e[2]||n.localScale[2]);Wn(r,n.localScale)||(In(n.localScale,r),this.dirtifyLocal(t,n))},n.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=hr(e,n,r,i));var o=t.transformable;pr(o.localRotation,e),this.dirtifyLocal(t,o)},n.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=yr(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 mn(e.position,this.getWorldTransform(t,e))},n.getRotation=function(t){var e=t.transformable;return bn(e.rotation,this.getWorldTransform(t,e))},n.getScale=function(t){var e=t.transformable;return Tn(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.calcLocalTransform=function(t){if(Sn(t.localTransform,t.localRotation,t.localPosition,On(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=cn(on());e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),hn(t.localTransform,t.localTransform,e)}var n=Sn(on(),hr(0,0,0,1),Mn(),t.localScale,t.origin);hn(t.localTransform,t.localTransform,n)},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=mn(Mn(),e),r=bn($n(),e),i=Tn(Mn(),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){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(Ba.isEmpty(n))return null;var r=new Ba;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r},n.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new Ba},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=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(i?i.add(r):(i=new Ba).update(r.center,r.halfExtents))}));var o=t.parsedStyle.clipPath;if(o){var a,s=this.getTransformedGeometryBounds(o,!0);s&&(a=new Ba).setFromTransformedAABB(s,this.getWorldTransform(t)),i?a&&(i=a.intersection(i)):i=a}return i&&(e?r.renderBounds=i:r.bounds=i),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,i||new Ba},n.getLocalBounds=function(t){if(t.parentNode){var e=on();t.parentNode.transformable&&(e=ln(on(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Ba.isEmpty(n)){var r=new Ba;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},n.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);Ba.isEmpty(i)||(r=new Ba).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 Ja(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),c[0]-s,c[1]-u)}return new Ja((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?hn(e.worldTransform,r.worldTransform,e.localTransform):sn(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}(),ue([lt(il),le("design:type",Function)],t.DefaultSceneGraphService.prototype,"sceneGraphSelectorFactory",void 0),t.DefaultSceneGraphService=ue([ct({token:ul})],t.DefaultSceneGraphService);var cl,ll=t.Syringe.defineToken("ContextService",{multiple:!1});(cl=t.RenderReason||(t.RenderReason={}))[cl.CAMERA_CHANGED=0]="CAMERA_CHANGED",cl[cl.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",cl[cl.NONE=2]="NONE";var hl,pl,fl,dl=t.Syringe.defineToken("RenderingContext"),yl=t.Syringe.defineToken("DefaultCamera");(hl=t.CameraType||(t.CameraType={}))[hl.ORBITING=0]="ORBITING",hl[hl.EXPLORING=1]="EXPLORING",hl[hl.TRACKING=2]="TRACKING",(pl=t.CameraTrackingMode||(t.CameraTrackingMode={}))[pl.DEFAULT=0]="DEFAULT",pl[pl.ROTATIONAL=1]="ROTATIONAL",pl[pl.TRANSLATIONAL=2]="TRANSLATIONAL",pl[pl.CINEMATIC=3]="CINEMATIC",(fl=t.CameraProjectionMode||(t.CameraProjectionMode={}))[fl.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",fl[fl.PERSPECTIVE=1]="PERSPECTIVE";var vl={UPDATED:"updated"},gl=Math.PI/180,ml=180/Math.PI,Tl=2e-4,bl=function(e){function n(n,r){var i;return void 0===n&&(n=t.CameraType.EXPLORING),void 0===r&&(r=t.CameraTrackingMode.DEFAULT),(i=e.call(this)||this).canvas=void 0,i.matrix=on(),i.right=On(1,0,0),i.up=On(0,1,0),i.forward=On(0,0,1),i.position=On(0,0,1),i.focalPoint=On(0,0,0),i.distanceVector=On(0,0,-1),i.distance=1,i.azimuth=0,i.elevation=0,i.roll=0,i.relAzimuth=0,i.relElevation=0,i.relRoll=0,i.dollyingStep=0,i.maxDistance=1/0,i.minDistance=-1/0,i.zoom=1,i.rotateWorld=!1,i.fov=30,i.near=.1,i.far=1e3,i.aspect=1,i.left=void 0,i.rright=void 0,i.top=void 0,i.bottom=void 0,i.projectionMatrix=on(),i.projectionMatrixInverse=on(),i.jitteredProjectionMatrix=void 0,i.view=void 0,i.enableUpdate=!0,i.type=t.CameraType.EXPLORING,i.trackingMode=t.CameraTrackingMode.DEFAULT,i.projectionMode=t.CameraProjectionMode.PERSPECTIVE,i.frustum=new za,i.landmarks=[],i.landmarkAnimationID=void 0,i.orthoMatrix=on(),i.setType(n,r),i}me(n,e);var r=n.prototype;return r.isOrtho=function(){return this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC},r.getProjectionMode=function(){return this.projectionMode},r.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},r.getPerspectiveInverse=function(){return this.projectionMatrixInverse},r.getFrustum=function(){return this.frustum},r.getPosition=function(){return this.position},r.getFocalPoint=function(){return this.focalPoint},r.getDollyingStep=function(){return this.dollyingStep},r.getNear=function(){return this.near},r.getFar=function(){return this.far},r.getZoom=function(){return this.zoom},r.getOrthoMatrix=function(){return this.orthoMatrix},r.getView=function(){return this.view},r.setEnableUpdate=function(t){this.enableUpdate=t},r.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},r.setProjectionMode=function(t){return this.projectionMode=t,this},r.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},r.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},r.getViewTransform=function(){return ln(on(),this.matrix)},r.getWorldTransform=function(){return this.matrix},r.jitterProjectionMatrix=function(t,e){var n=vn(on(),[t,e,0]);this.jitteredProjectionMatrix=hn(on(),n,this.projectionMatrix)},r.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},r.setMatrix=function(t){return this.matrix=t,this._update(),this},r.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},r.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},r.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},r.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},r.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},r.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},r.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},r.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(.5*gl*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 wr(this.projectionMatrix,c,c+u,a,a-s,e,this.far),fn(this.projectionMatrix,this.projectionMatrix,On(1,-1,1)),ln(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},r.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,p=l-u,f=l+u,d=h+c,y=h-c;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var v=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f=(p+=v*this.view.offsetX)+v*this.view.width,y=(d-=g*this.view.offsetY)-g*this.view.height}return kn(this.projectionMatrix,p,f,y,d,o,a),fn(this.projectionMatrix,this.projectionMatrix,On(1,-1,1)),ln(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},r.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=mr(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},r.setFocalPoint=function(e,n,r){void 0===n&&(n=this.focalPoint[1]),void 0===r&&(r=this.focalPoint[2]);var i=On(0,1,0);if(this.focalPoint=mr(e,n,r),this.trackingMode===t.CameraTrackingMode.CINEMATIC){var o=Dn(Mn(),this.focalPoint,this.position);e=o[0],n=o[1],r=o[2];var a=An(o),s=Math.asin(n/a)*ml,u=90+Math.atan2(r,e)*ml,c=on();yn(c,c,u*gl),dn(c,c,s*gl),i=Hn(Mn(),[0,1,0],c)}return ln(this.matrix,Pn(on(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},r.getDistance=function(){return this.distance},r.setDistance=function(t){if(this.distance===t||0>t)return this;this.distance=t,Tl>this.distance&&(this.distance=Tl),this.dollyingStep=this.distance/100;var e=Mn(),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},r.setMaxDistance=function(t){return this.maxDistance=t,this},r.setMinDistance=function(t){return this.minDistance=t,this},r.setAzimuth=function(e){return this.azimuth=gr(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},r.getAzimuth=function(){return this.azimuth},r.setElevation=function(e){return this.elevation=gr(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},r.getElevation=function(){return this.elevation},r.setRoll=function(e){return this.roll=gr(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},r.getRoll=function(){return this.roll},r.rotate=function(e,n,r){if(this.relElevation=gr(n),this.relAzimuth=gr(e),this.relRoll=gr(r),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===t.CameraType.EXPLORING){var i=tr($n(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*gl),o=tr($n(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*gl),a=tr($n(),[0,0,1],this.relRoll*gl),s=er($n(),o,i);s=er($n(),s,a);var u=En(on(),s);pn(this.matrix,this.matrix,[0,0,-this.distance]),hn(this.matrix,this.matrix,u),pn(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}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},r.pan=function(t,e){var n=mr(t,e,0),r=_n(this.position);return Ln(r,r,Fn(Mn(),this.right,n[0])),Ln(r,r,Fn(Mn(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},r.dolly=function(e){var n,r=this.forward,i=_n(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&&Ln(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},r.createLandmark=function(t,e){void 0===e&&(e={});var r=e.position,i=void 0===r?this.position:r,o=e.focalPoint,a=void 0===o?this.focalPoint:o,s=e.roll,u=e.zoom,c=new n;c.setType(this.type,void 0),c.setPosition(i[0],i[1]||this.position[1],i[2]||this.position[2]),c.setFocalPoint(a[0],a[1]||this.focalPoint[1],a[2]||this.focalPoint[2]),c.setRoll(s||this.roll),c.setZoom(u||this.zoom);var l={name:t,matrix:an(c.matrix),right:_n(c.right),up:_n(c.up),forward:_n(c.forward),position:_n(c.position),focalPoint:_n(c.focalPoint),distanceVector:_n(c.distanceVector),distance:c.distance,dollyingStep:c.dollyingStep,azimuth:c.azimuth,elevation:c.elevation,roll:c.roll,relAzimuth:c.relAzimuth,relElevation:c.relElevation,relRoll:c.relRoll,zoom:c.zoom};return this.landmarks.push(l),l},r.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=di(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Be(e)?{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,p=void 0===h?void 0:h;if(0===u)return this.syncFromLandmark(r),void(p&&p());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var f,d=r.position,y=r.focalPoint,v=r.zoom,g=r.roll,m=l||ci(a),T=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(g),n.setZoom(v),n.computeMatrix(),n.triggerUpdate(),p&&p()};this.canvas.requestAnimationFrame((function t(e){void 0===f&&(f=e);var r=e-f;if(u<r)T();else{var i,o,a=m(r/u),s=Mn(),c=Mn();zn(s,n.focalPoint,y,a),zn(c,n.position,d,a),o=n.roll*(1-a)+g*a,i=n.zoom*(1-a)+v*a,n.setFocalPoint(s),n.setPosition(c),n.setRoll(o),n.setZoom(i),Kn(s,y)+Kn(c,d)>.01?(n.computeMatrix(),n.triggerUpdate(),u>r&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))):T()}}))}},r._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},r.computeMatrix=function(){var e=tr($n(),[0,0,1],this.roll*gl);cn(this.matrix);var n=tr($n(),[1,0,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.elevation*gl),r=tr($n(),[0,1,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.azimuth*gl),i=er($n(),r,n);i=er($n(),i,e);var o=En(on(),i);this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?(pn(this.matrix,this.matrix,this.focalPoint),hn(this.matrix,this.matrix,o),pn(this.matrix,this.matrix,[0,0,this.distance])):this.type===t.CameraType.TRACKING&&(pn(this.matrix,this.matrix,this.position),hn(this.matrix,this.matrix,o))},r._setPosition=function(t,e,n){this.position=mr(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()},r._getAxes=function(){In(this.right,mr(Qn(Jn(),[1,0,0,0],this.matrix))),In(this.up,mr(Qn(Jn(),[0,1,0,0],this.matrix))),In(this.forward,mr(Qn(Jn(),[0,0,1,0],this.matrix))),Vn(this.right,this.right),Vn(this.up,this.up),Vn(this.forward,this.forward)},r._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=An(this.distanceVector);if(0===i)return this.elevation=0,void(this.azimuth=0);this.type===t.CameraType.TRACKING||this.rotateWorld?(this.elevation=Math.asin(n/i)*ml,this.azimuth=Math.atan2(-e,-r)*ml):(this.elevation=-Math.asin(n/i)*ml,this.azimuth=-Math.atan2(-e,-r)*ml)},r._getPosition=function(){In(this.position,mr(Qn(Jn(),[0,0,0,1],this.matrix))),this._getDistance()},r._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=rn(),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)),Ln(this.focalPoint,this.position,this.distanceVector),this._getDistance()},r._getDistance=function(){this.distanceVector=Dn(Mn(),this.focalPoint,this.position),this.distance=An(this.distanceVector),this.dollyingStep=this.distance/100},r._getOrthoMatrix=function(){if(this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC){var e=this.position,n=tr($n(),[0,0,1],-this.roll*Math.PI/180);Sn(this.orthoMatrix,n,On((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),On(this.zoom,this.zoom,1),e)}},r.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=hn(on(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(vl.UPDATED)}},r.syncFromLandmark=function(t){this.matrix=sn(this.matrix,t.matrix),this.right=In(this.right,t.right),this.up=In(this.up,t.up),this.forward=In(this.forward,t.forward),this.position=In(this.position,t.position),this.focalPoint=In(this.focalPoint,t.focalPoint),this.distanceVector=In(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},n}(To.EventEmitter),Sl=t.Syringe.defineToken("RenderingPluginContribution");t.RenderingService=function(){function e(){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 zu(t.ElementEvent.RENDER_ORDER_CHANGED),this.hooks={init:new Ui,dirtycheck:new $i(["object"]),cull:new $i(["object","camera"]),beginFrame:new qi([]),beforeRender:new qi(["objectToRender"]),render:new qi(["objectToRender"]),afterRender:new qi(["objectToRender"]),endFrame:new qi([]),destroy:new qi([]),pick:new Gi(["result"]),pointerDown:new qi(["event"]),pointerUp:new qi(["event"]),pointerMove:new qi(["event"]),pointerOut:new qi(["event"]),pointerOver:new qi(["event"]),pointerWheel:new qi(["event"]),pointerCancel:new qi(["event"])}}var n=e.prototype;return n.init=function(){var t=de(pe().mark((function t(){var e=this;return pe().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(sl),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}(),ue([Ft(Sl),le("design:type",Object)],t.RenderingService.prototype,"renderingPluginProvider",void 0),ue([lt(wi),le("design:type",Object)],t.RenderingService.prototype,"canvasConfig",void 0),ue([lt(dl),le("design:type",Object)],t.RenderingService.prototype,"renderingContext",void 0),ue([lt(ul),le("design:type",Object)],t.RenderingService.prototype,"sceneGraphService",void 0),ue([lt(ni),le("design:type",Object)],t.RenderingService.prototype,"styleValueRegistry",void 0),ue([lt(yl),le("design:type",bl)],t.RenderingService.prototype,"camera",void 0),t.RenderingService=ue([ct()],t.RenderingService);t.EventService=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).renderingContext=void 0,e.contextService=void 0,e.canvasConfig=void 0,e.displayObjectPool=void 0,e.rootTarget=void 0,e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.pickHandler=void 0,e.onPointerDown=function(){var t=de(pe().mark((function t(n){var r;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:e.dispatchEvent(r=t.sent,"pointerdown"),"touch"===r.pointerType?e.dispatchEvent(r,"touchstart"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||e.dispatchEvent(r,2===r.button?"rightdown":"mousedown"),e.trackingData(n.pointerId).pressTargetsByButton[n.button]=r.composedPath(),e.freeEvent(r);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUp=function(){var t=de(pe().mark((function t(n){var r,i,o,a,s,u,c,l,h;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return r=performance.now(),t.next=5,e.createPointerEvent(n);case 5:if(e.dispatchEvent(i=t.sent,"pointerup"),"touch"===i.pointerType?e.dispatchEvent(i,"touchend"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.dispatchEvent(i,2===i.button?"rightup":"mouseup"),o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.pressTargetsByButton[n.button]),s=a,a&&!i.composedPath().includes(a)){for(u=a;u&&!i.composedPath().includes(u);)i.currentTarget=u,e.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType?e.notifyTarget(i,"touchendoutside"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),Wu.isNode(u)&&(u=u.parentNode);delete o.pressTargetsByButton[n.button],s=u}s&&((l=e.clonePointerEvent(i,"click")).target=s,l.path=[],o.clicksByButton[n.button]||(o.clicksByButton[n.button]={clickCount:0,target:l.target,timeStamp:r}),(h=o.clicksByButton[n.button]).target===l.target&&200>r-h.timeStamp?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=r,l.detail=h.clickCount,(null===(c=i.detail)||void 0===c?void 0:c.preventClick)||e.dispatchEvent(l,"mouse"===l.pointerType||"touch"===l.pointerType?"click":"pointertap"),e.freeEvent(l)),e.freeEvent(i);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerMove=function(){var t=de(pe().mark((function t(n){var r,i,o,a,s,u,c,l,h,p;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:if(i="mouse"===(r=t.sent).pointerType||"pen"===r.pointerType,o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.overTargets),!o.overTargets||a===r.target){t.next=23;break}return s="mousemove"===n.type?"mouseout":"pointerout",t.next=12,e.createPointerEvent(n,s,a||void 0);case 12:if(e.dispatchEvent(u=t.sent,"pointerout"),i&&e.dispatchEvent(u,"mouseout"),r.composedPath().includes(a)){t.next=22;break}return t.next=18,e.createPointerEvent(n,"pointerleave",a||void 0);case 18:for((c=t.sent).eventPhase=c.AT_TARGET;c.target&&!r.composedPath().includes(c.target);)c.currentTarget=c.target,e.notifyTarget(c),i&&e.notifyTarget(c,"mouseleave"),Wu.isNode(c.target)&&(c.target=c.target.parentNode);e.freeEvent(c);case 22:e.freeEvent(u);case 23:if(a===r.target){t.next=38;break}l=e.clonePointerEvent(r,"mousemove"===n.type?"mouseover":"pointerover"),e.dispatchEvent(l,"pointerover"),i&&e.dispatchEvent(l,"mouseover"),h=a&&Wu.isNode(a)&&a.parentNode;case 29:if(!h||h===(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode)){t.next=35;break}if(h!==r.target){t.next=32;break}return t.abrupt("break",35);case 32:h=h.parentNode,t.next=29;break;case 35:if(!h||h===(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode)){for((p=e.clonePointerEvent(r,"pointerenter")).eventPhase=p.AT_TARGET;p.target&&p.target!==a&&p.target!==(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode);)p.currentTarget=p.target,e.notifyTarget(p),i&&e.notifyTarget(p,"mouseenter"),Wu.isNode(p.target)&&(p.target=p.target.parentNode);e.freeEvent(p)}e.freeEvent(l);case 38:e.dispatchEvent(r,"pointermove"),"touch"===r.pointerType&&e.dispatchEvent(r,"touchmove"),i&&(e.dispatchEvent(r,"mousemove"),e.cursor=e.getCursor(r.target)),o.overTargets=r.composedPath(),e.freeEvent(r);case 43:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOut=function(){var t=de(pe().mark((function t(n){var r,i,o,a,s;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:if(!(r=e.trackingData(n.pointerId)).overTargets){t.next=19;break}return i="mouse"===n.pointerType||"pen"===n.pointerType,o=e.findMountedTarget(r.overTargets),t.next=8,e.createPointerEvent(n,"pointerout",o||void 0);case 8:return e.dispatchEvent(a=t.sent),i&&e.dispatchEvent(a,"mouseout"),t.next=13,e.createPointerEvent(n,"pointerleave",o||void 0);case 13:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&s.target!==(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode);)s.currentTarget=s.target,e.notifyTarget(s),i&&e.notifyTarget(s,"mouseleave"),Wu.isNode(s.target)&&(s.target=s.target.parentNode);r.overTargets=null,e.freeEvent(a),e.freeEvent(s);case 19:e.cursor=null;case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOver=function(){var t=de(pe().mark((function t(n){var r,i,o,a;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),t.next=5,e.createPointerEvent(n);case 5:for(o="mouse"===(i=t.sent).pointerType||"pen"===i.pointerType,e.dispatchEvent(i,"pointerover"),o&&e.dispatchEvent(i,"mouseover"),"mouse"===i.pointerType&&(e.cursor=e.getCursor(i.target)),(a=e.clonePointerEvent(i,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode);)a.currentTarget=a.target,e.notifyTarget(a),o&&e.notifyTarget(a,"mouseenter"),Wu.isNode(a.target)&&(a.target=a.target.parentNode);r.overTargets=i.composedPath(),e.freeEvent(i),e.freeEvent(a);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUpOutside=function(){var t=de(pe().mark((function t(n){var r,i,o,a;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),i=e.findMountedTarget(r.pressTargetsByButton[n.button]),t.next=6,e.createPointerEvent(n);case 6:if(o=t.sent,i){for(a=i;a;)o.currentTarget=a,e.notifyTarget(o,"pointerupoutside"),"touch"===o.pointerType||"mouse"!==o.pointerType&&"pen"!==o.pointerType||e.notifyTarget(o,2===o.button?"rightupoutside":"mouseupoutside"),Wu.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[n.button]}e.freeEvent(o);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onWheel=function(){var t=de(pe().mark((function t(n){var r;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Fc){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createWheelEvent(n);case 4:e.dispatchEvent(r=t.sent),e.freeEvent(r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}me(e,t);var n=e.prototype;return n.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)},n.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Za(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},n.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Za(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},n.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=hn(on(),u,s),l=On(e/o*2-1,2*(1-n/a)-1,0);return Hn(l,l,c),new Za(l[0],l[1])},n.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=hn(on(),n,r),o=On(t.x,t.y,0);Hn(o,o,i);var a=this.canvasConfig;return new Za((o[0]+1)/2*a.width,(1-(o[1]+1)/2)*a.height)},n.setPickHandler=function(t){this.pickHandler=t},n.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}))},n.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)}},n.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},n.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}}},n.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++)Wu.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},n.hitTest=function(){var t=de(pe().mark((function t(e){var n,r,i,o,a;return pe().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)}}(),n.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},n.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e,n=ke(this.displayObjectPool.getHTMLs());!(e=n()).done;){var r=e.value;if(t.nativeEvent.composedPath().indexOf(r)>-1)return r}return null},n.pickTarget=function(){var t=de(pe().mark((function t(e){return pe().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)}}(),n.createPointerEvent=function(){var t=de(pe().mark((function t(e,n,r){var i,o;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.allocateEvent(Uc),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)}}(),n.createWheelEvent=function(){var t=de(pe().mark((function t(e){var n,r;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Fc),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)}}(),n.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},n.clonePointerEvent=function(t,e){var n=this.allocateEvent(Uc);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},n.copyPointerData=function(t,e){t instanceof Uc&&e instanceof Uc&&(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)},n.copyMouseData=function(t,e){t instanceof Dc&&e instanceof Dc&&(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))},n.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},n.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)},n.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},n.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)},n.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)},n.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)},n.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||Wu.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},n.getCursor=function(t){for(var e=t;e;){var n=ec.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Wu.isNode(e)&&e.parentNode}},e}(To.EventEmitter),ue([lt(dl),le("design:type",Object)],t.EventService.prototype,"renderingContext",void 0),ue([lt(ll),le("design:type",Object)],t.EventService.prototype,"contextService",void 0),ue([lt(wi),le("design:type",Object)],t.EventService.prototype,"canvasConfig",void 0),ue([lt(t.DisplayObjectPool),le("design:type",t.DisplayObjectPool)],t.EventService.prototype,"displayObjectPool",void 0),ue([Y.postConstruct(),le("design:type",Function),le("design:paramtypes",[]),le("design:returntype",void 0)],t.EventService.prototype,"init",null),t.EventService=ue([ct()],t.EventService),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=ue([ct()],t.OffscreenCanvasCreator);var El={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]},xl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,wl=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),kl=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source);t.TextService=function(){function t(){var t=this;this.cache={},this.offscreenCanvas=void 0,this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!kl.exec(n)&&!wl.exec(e))},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}}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=El.MetricsString+El.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(El.BaselineSymbol).width),u=El.HeightMultiplier*s;s=s*El.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,p=0,f=0,d=!1;for(p=0;s>p;++p){for(var y=0;h>y;y+=4)if(255!==c[f+y]){d=!0;break}if(d)break;f+=h}for(n.ascent=s-p,f=l-h,d=!1,p=u;p>s;--p){for(var v=0;h>v;v+=4)if(255!==c[f+v]){d=!0;break}if(d)break;f-=h}return n.descent=p-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,p=eo(e),f=this.measureFont(p,n);0===f.fontSize&&(f.fontSize=r.value,f.ascent=r.value);var d=this.offscreenCanvas.getOrCreateContext(n);d.font=p;for(var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=new Array(y.length),g=0,m=0;y.length>m;m++){var T=d.measureText(y[m]).width+(y[m].length-1)*c.value;v[m]=T,g=Math.max(g,T)}var b=g+a.value,S=o.value||f.fontSize+a.value,E=Math.max(S,f.fontSize+a.value)+(y.length-1)*(S+h),x=0;return"middle"===s.value?x=-E/2:"bottom"===s.value||"alphabetic"===s.value||"ideographic"===s.value?x=-E:"top"!==s.value&&"hanging"!==s.value||(x=0),{font:p,width:b,height:E,lines:y,lineWidths:v,lineHeight:S+=h,maxLineWidth:g,fontProperties:f,lineMetrics:v.map((function(t,e){var n=0;return"center"===u.value?n-=t/2:"right"!==u.value&&"end"!==u.value||(n-=t),new Ja(n-a.value/2,x+e*S,t+a.value,S)}))}},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.value,c=[],l=0,h=0,p={},f=function(t){return r.getFromCache(t,a.value,p,s)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=f(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]||"",p)),r.shouldBreakByKinsokuShorui(e,o)&&(c=r.trimByKinsokuShorui(c),h+=f(i||""))}h+=a,c[l]=(c[l]||"")+e})),c.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&El.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.isNewline=function(t){return"string"==typeof t&&El.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||!xl.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(!xl.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}(),ue([lt(t.OffscreenCanvasCreator),le("design:type",t.OffscreenCanvasCreator)],t.TextService.prototype,"offscreenCanvas",void 0),t.TextService=ue([ct()],t.TextService);var Pl=t.Syringe.defineToken("GeometryUpdaterFactory"),Cl=t.Syringe.defineToken("GeometryAABBUpdater");function Nl(t){var e=t.parsedStyle.fontSize;return e&&!Do.isRelativeUnit(e.unit)?e.clone():null}t.CircleUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n.value,height:2*n.value}},t}(),t.CircleUpdater=ue([ct({token:{token:Cl,named:t.Shape.CIRCLE}})],t.CircleUpdater),t.EllipseUpdater=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx.value,height:2*t.ry.value}},t}(),t.EllipseUpdater=ue([ct({token:{token:Cl,named:t.Shape.ELLIPSE}})],t.EllipseUpdater),t.RectUpdater=function(){function e(){}return e.prototype.update=function(e,n){var r=e.img,i=e.width,o=e.height,a=0,s=0;return i instanceof Do&&i.unit===t.UnitType.kPixels&&(a=i.value),o instanceof Do&&o.unit===t.UnitType.kPixels&&(s=o.value),r&&!di(r)&&(a||(a=r.width),s||(s=r.height)),i instanceof Do&&(i.value=a),o instanceof Do&&(o.value=s),{width:a,height:s}},e}(),t.RectUpdater=ue([ct({token:[{token:Cl,named:t.Shape.RECT},{token:Cl,named:t.Shape.IMAGE},{token:Cl,named:t.Shape.GROUP}]})],t.RectUpdater),t.TextUpdater=function(){function t(){this.textService=void 0}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&&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 p=h.lineHeight,f=h.fontProperties,d=On(h.width/2,h.height/2,0),y=[0,1],v=0;"center"===o.value?(v=a.value/2,y=[.5,1]):"right"!==o.value&&"end"!==o.value||(v=a.value,y=[1,1]);var g=0;return"middle"===s.value?g=d[1]:"top"===s.value||"hanging"===s.value?g=2*d[1]:"alphabetic"===s.value?g=p-f.ascent:"bottom"!==s.value&&"ideographic"!==s.value||(g=0),u&&(v+=u.value),c&&(g+=c.value),t.anchor=[new Do(y[0]),new Do(y[1]),new Do(0)],{width:2*d[0],height:2*d[1],offsetX:v,offsetY:g}},t}(),ue([lt(t.TextService),le("design:type",t.TextService)],t.TextUpdater.prototype,"textService",void 0),t.TextUpdater=ue([ct({token:{token:Cl,named:t.Shape.TEXT}})],t.TextUpdater),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.value,r.value),a=Math.max(e.value,r.value),s=Math.min(n.value,i.value);return{width:a-o,height:Math.max(n.value,i.value)-s}},t}(),t.LineUpdater=ue([ct({token:{token:Cl,named:t.Shape.LINE}})],t.LineUpdater),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=ue([ct({token:[{token:Cl,named:t.Shape.POLYLINE},{token:Cl,named:t.Shape.POLYGON}]})],t.PolylineUpdater),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=ue([ct({token:{token:Cl,named:t.Shape.PATH}})],t.PathUpdater),t.CSSPropertyClipPath=function(){function t(){this.sceneGraphService=void 0}return t.prototype.calculator=function(t,e,n,r){if(n instanceof Po&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets){var i=e.parsedStyle.clipPathTargets.indexOf(r);e.parsedStyle.clipPathTargets.splice(i,1)}return n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),this.sceneGraphService.dirtifyToRoot(r),n},t}(),ue([lt(ul),le("design:type",Object)],t.CSSPropertyClipPath.prototype,"sceneGraphService",void 0),t.CSSPropertyClipPath=ue([ct({token:{token:Vu,named:t.PropertySyntax.CLIP_PATH}})],t.CSSPropertyClipPath),t.CSSPropertyColor=function(){function t(){this.parser=Da,this.mixer=Ua}return t.prototype.calculator=function(t,e,n,r){return n instanceof Po?new Ko(0,0,0,0,"none"===n.value):n},t}(),t.CSSPropertyColor=ue([ct({token:[{token:Vu,named:t.PropertySyntax.PAINT},{token:Vu,named:t.PropertySyntax.COLOR}]})],t.CSSPropertyColor),t.CSSPropertyFilter=function(){function t(){this.parser=su}return t.prototype.calculator=function(t,e,n){return n instanceof Po?[]:n},t}(),t.CSSPropertyFilter=ue([ct({token:{token:Vu,named:t.PropertySyntax.FILTER}})],t.CSSPropertyFilter),t.CSSPropertyLengthOrPercentage=function(){function e(){this.parser=ts,this.mixer=ns}return e.prototype.calculator=function(e,n,r,i,o){if(!Do.isRelativeUnit(r.unit))return r.clone();if(r.unit===t.UnitType.kPercentage)return new Do(0,"px");if(r.unit===t.UnitType.kEms){if(i.parentNode){var a=Nl(i.parentNode);if(a)return a.value*=r.value,a;o.addUnresolveProperty(i,e)}return new Do(0,"px")}if(r.unit===t.UnitType.kRems){var s;if(null==i||null===(s=i.ownerDocument)||void 0===s?void 0:s.documentElement){var u=Nl(i.ownerDocument.documentElement);if(u)return u.value*=r.value,u;o.addUnresolveProperty(i,e)}return new Do(0,"px")}},e}(),t.CSSPropertyLengthOrPercentage=ue([ct({token:[{token:Vu,named:t.PropertySyntax.LENGTH_PERCENTAGE},{token:Vu,named:t.PropertySyntax.LENGTH}]})],t.CSSPropertyLengthOrPercentage),t.CSSPropertyLengthOrPercentage12=function(){function t(){this.mixer=os}return t.prototype.parser=function(t){var e=is(Be(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},t}(),t.CSSPropertyLengthOrPercentage12=ue([ct({token:{token:Vu,named:t.PropertySyntax.LENGTH_PERCENTAGE_12}})],t.CSSPropertyLengthOrPercentage12),t.CSSPropertyLengthOrPercentage14=function(){function t(){this.mixer=os}return t.prototype.parser=function(t){var e=is(Be(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]]},t}(),t.CSSPropertyLengthOrPercentage14=ue([ct({token:{token:Vu,named:t.PropertySyntax.LENGTH_PERCENTAGE_14}})],t.CSSPropertyLengthOrPercentage14),t.CSSPropertyLocalPosition=function(e){function n(){return e.apply(this,arguments)||this}return me(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;Fe(a)||(n=a.value),Fe(s)||(r=s.value);break;case t.Shape.LINE:var u=e.parsedStyle,c=u.y1,l=u.y2;n=Math.min(u.x1.value,u.x2.value),r=Math.min(c.value,l.value),i=0;break;case t.Shape.RECT:case t.Shape.IMAGE:case t.Shape.GROUP:case t.Shape.HTML:case t.Shape.TEXT:Fe(e.parsedStyle.x)||(n=e.parsedStyle.x.value),Fe(e.parsedStyle.y)||(r=e.parsedStyle.y.value)}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),!Fe(n)||!Fe(r)||!Fe(i)){var h=e.getLocalPosition(),p=h[0],f=h[1],d=h[2];e.setLocalPosition(Fe(n)?p:n,Fe(r)?f:r,Fe(i)?d:i)}},n}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyLocalPosition=ue([ct({token:{token:Vu,named:t.PropertySyntax.COORDINATE}})],t.CSSPropertyLocalPosition),t.CSSPropertyNumber=function(){this.mixer=cs,this.parser=us},t.CSSPropertyNumber=ue([ct({token:{token:Vu,named:t.PropertySyntax.NUMBER}})],t.CSSPropertyNumber),t.CSSPropertyOffsetDistance=function(){function e(){this.parser=us,this.mixer=ls(0,1)}return e.prototype.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.value);r&&e.setLocalPosition(r.x,r.y)}}},e}(),t.CSSPropertyOffsetDistance=ue([ct({token:{token:Vu,named:t.PropertySyntax.OFFSET_DISTANCE}})],t.CSSPropertyOffsetDistance),t.CSSPropertyOffsetPath=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}(),t.CSSPropertyOffsetPath=ue([ct({token:{token:Vu,named:t.PropertySyntax.OFFSET_PATH}})],t.CSSPropertyOffsetPath),t.CSSPropertyOpacity=function(){this.parser=us,this.mixer=ls(0,1)},t.CSSPropertyOpacity=ue([ct({token:{token:Vu,named:t.PropertySyntax.OPACITY_VALUE}})],t.CSSPropertyOpacity),t.CSSPropertyPath=function(){function e(){this.parser=Qs,this.mixer=$s}var n=e.prototype;return n.calculator=function(t,e,n){return n instanceof Po&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new Ja(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}(),t.CSSPropertyPath=ue([ct({token:{token:Vu,named:t.PropertySyntax.PATH}})],t.CSSPropertyPath),t.CSSPropertyPoints=function(){function e(){this.parser=iu}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}(),t.CSSPropertyPoints=ue([ct({token:{token:Vu,named:t.PropertySyntax.LIST_OF_POINTS}})],t.CSSPropertyPoints),t.CSSPropertyShadowBlur=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=ls(0,1/0),e}return me(e,t),e}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyShadowBlur=ue([ct({token:{token:Vu,named:t.PropertySyntax.SHADOW_BLUR}})],t.CSSPropertyShadowBlur),t.CSSPropertyText=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Po?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),t.CSSPropertyText=ue([ct({token:{token:Vu,named:t.PropertySyntax.TEXT}})],t.CSSPropertyText),t.CSSPropertyTextTransform=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},t}(),t.CSSPropertyTextTransform=ue([ct({token:{token:Vu,named:t.PropertySyntax.TEXT_TRANSFORM}})],t.CSSPropertyTextTransform),t.CSSPropertyTransform=function(){function t(){this.parser=Pu,this.mixer=Lu}return t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.transform,r=e.defX,i=e.defY;n&&n.length&&(t.resetLocalTransform(),t.setLocalPosition(r,i),n.forEach((function(e){var n=e.t,o=e.d;if("scale"===n){var a=(null==o?void 0:o.map((function(t){return t.value})))||[1,1];t.scaleLocal(a[0],a[1],1)}else if("scalex"===n){var s=(null==o?void 0:o.map((function(t){return t.value})))||[1];t.scaleLocal(s[0],1,1)}else if("scaley"===n){var u=(null==o?void 0:o.map((function(t){return t.value})))||[1];t.scaleLocal(1,u[0],1)}else if("scalez"===n){var c=(null==o?void 0:o.map((function(t){return t.value})))||[1];t.scaleLocal(1,1,c[0])}else if("scale3d"===n){var l=(null==o?void 0:o.map((function(t){return t.value})))||[1,1,1];t.scaleLocal(l[0],l[1],l[2])}else if("translate"===n){var h=o||[qo,qo];t.translateLocal(h[0].value,h[1].value,0)}else if("translatex"===n){t.translateLocal((o||[qo])[0].value,0,0)}else if("translatey"===n){t.translateLocal(0,(o||[qo])[0].value,0)}else if("translatez"===n){t.translateLocal(0,0,(o||[qo])[0].value)}else if("translate3d"===n){var p=o||[qo,qo,qo];t.translateLocal(p[0].value,p[1].value,p[2].value)}else if("rotate"===n){t.rotateLocal(0,0,(o||[Xo])[0].value)}else if("rotatex"===n){t.rotateLocal((o||[Xo])[0].value,0,0)}else if("rotatey"===n){t.rotateLocal(0,(o||[Xo])[0].value,0)}else if("rotatez"===n){t.rotateLocal(0,0,(o||[Xo])[0].value)}else if("rotate3d"===n);else if("skew"===n){var f=(null==o?void 0:o.map((function(t){return t.value})))||[0,0];t.setLocalSkew(Tr(f[0]),Tr(f[1]))}else if("skewx"===n){var d=(null==o?void 0:o.map((function(t){return t.value})))||[0];t.setLocalSkew(Tr(d[0]),t.getLocalSkew()[1])}else if("skewy"===n){var y=(null==o?void 0:o.map((function(t){return t.value})))||[0];t.setLocalSkew(t.getLocalSkew()[0],Tr(y[0]))}else if("matrix"===n){var v=o.map((function(t){return t.value}));t.setLocalTransform(un(v[0],v[1],0,0,v[2],v[3],0,0,0,0,1,0,v[4]+r,v[5]+i,0,1))}else if("matrix3d"===n){var g=un.apply(Nn,o.map((function(t){return t.value})));g[12]+=r,g[13]+=i,t.setLocalTransform(g)}})))},t}(),t.CSSPropertyTransform=ue([ct({token:{token:Vu,named:t.PropertySyntax.TRANSFORM}})],t.CSSPropertyTransform),t.CSSPropertyTransformOrigin=function(){this.parser=Du},t.CSSPropertyTransformOrigin=ue([ct({token:{token:Vu,named:t.PropertySyntax.TRANSFORM_ORIGIN}})],t.CSSPropertyTransformOrigin),t.CSSPropertyZIndex=function(){function t(){this.parser=us}return t.prototype.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}(),t.CSSPropertyZIndex=ue([ct({token:{token:Vu,named:t.PropertySyntax.Z_INDEX}})],t.CSSPropertyZIndex);var Ml=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"shadowType",keywords:["inner","outer","both"],defaultValue:"outer",layoutDependent:!0},{name:"shadowColor",interpolable:!0,syntax:t.PropertySyntax.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:t.PropertySyntax.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:t.PropertySyntax.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:t.PropertySyntax.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.FILTER},{name:"clipPath",syntax:t.PropertySyntax.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"center":e===t.Shape.TEXT?"text-anchor":"left top"},layoutDependent:!0,syntax:t.PropertySyntax.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"0.5 0.5":"0 0"},layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:t.PropertySyntax.PATH,parsePriority:50},{name:"points",layoutDependent:!0,syntax:t.PropertySyntax.LIST_OF_POINTS,parsePriority:50},{name:"text",layoutDependent:!0,defaultValue:"",syntax:t.PropertySyntax.TEXT,parsePriority:50},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:t.PropertySyntax.TEXT_TRANSFORM,parsePriority:51},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"letterSpacing",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"miterLimit",layoutDependent:!0,syntax:t.PropertySyntax.NUMBER,defaultValue:function(e){return e===t.Shape.PATH||e===t.Shape.POLYGON||e===t.Shape.POLYLINE?"4":"10"}},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0}];t.DefaultStyleValueRegistry=function(){function e(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.propertySyntaxFactory=void 0,this.sceneGraphService=void 0,this.cascadeProperties={}}var n=e.prototype;return n.init=function(){var t=this;Ml.forEach((function(e){t.registerMetadata(e)}))},n.registerMetadata=function(t){var e=this;[t.name].concat(t.alias||[]).forEach((function(n){e.cache[n]=t}))},n.unregisterMetadata=function(t){delete this.cache[t]},n.getMetadata=function(t){return this.cache[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});var i=n.skipUpdateAttribute,o=n.skipParse,a=!1;Object.keys(e).forEach((function(n){var o,s=xi(n,e[n]),u=s[0];i||(t.attributes[u]=s[1]),!a&&(null===(o=r.getMetadata(u))||void 0===o?void 0:o.layoutDependent)&&(a=!0)}));var s=Object.keys(e).sort((function(t,e){var n,i;return((null===(n=r.getMetadata(t))||void 0===n?void 0:n.parsePriority)||0)-((null===(i=r.getMetadata(e))||void 0===i?void 0:i.parsePriority)||0)}));o||s.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t)}));var u=!1;s.forEach((function(e){e in t.computedStyle&&(u=r.computeProperty(e,t.computedStyle[e],t))})),u?this.dirty=!0:(a&&this.updateGeometry(t),s.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),s.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=this.getMetadata(t),i=e;if((""===e||Fe(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)i=new Po(e);else if(r){var o=r.keywords,a=r.syntax,s=a&&this.getPropertySyntax(a);if(o&&o.indexOf(e)>-1)i=new Po(e);else if(s){s&&s.parser&&(i=s.parser(e,n))}}return i},n.computeProperty=function(t,e,n){var r=this.getMetadata(t),i="g-root"===n.id,o=e instanceof wo?e.clone():e;if(r){var a=r.syntax,s=r.defaultValue;if(e instanceof Po){var u=e.value;if("unset"===u&&(u=r.inherited&&!i?"inherit":"initial"),"initial"===u)Fe(s)||(e=this.parseProperty(t,Ve(s)?s(n.nodeName):s,n));else if("inherit"===u){var c=this.tryToResolveProperty(n,t,{inherited:!0});return c?(n.parsedStyle[t]=c,!1):(this.addUnresolveProperty(n,t),!0)}}var l=a&&this.getPropertySyntax(a);if(l)if(l.calculator)o=l.calculator(t,n.parsedStyle[t],e,n,this);else o=e;else o=e}return n.parsedStyle[t]=o,!1},n.postProcessProperty=function(t,e){var n=this.getMetadata(t);if(n&&n.syntax){var r=n.syntax&&this.getPropertySyntax(n.syntax);r&&r.postProcessor&&r.postProcessor(e)}},n.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},n.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},n.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];return(!(r instanceof Po)||"unset"!==r.value&&"initial"!==r.value&&"inherit"!==r.value)&&(!(r instanceof Do&&Do.isRelativeUnit(r.unit))&&r)}return!1},n.recalc=function(t){var e=this.unresolvedProperties[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete this.unresolvedProperties[t.entity]}},n.updateGeometry=function(e){var n=Dt.get(Pl)(e.nodeName);if(n){var r,i=e.geometry;i.contentBounds||(i.contentBounds=new Ba),i.renderBounds||(i.renderBounds=new Ba);var o=e.parsedStyle,a=n.update(o,e),s=a.width,u=a.height,c=a.depth,l=void 0===c?0:c,h=a.offsetX,p=void 0===h?0:h,f=a.offsetY,d=void 0===f?0:f,y=a.offsetZ,v=void 0===y?0:y,g=0>s,m=0>u,T=On(Math.abs(s)/2,Math.abs(u)/2,l/2),b=o.stroke,S=o.lineWidth,E=o.increasedLineWidthForHitTesting,x=o.shadowType,w=o.shadowColor,k=o.filter,P=void 0===k?[]:k,C=o.transformOrigin,N=o.anchor;e.nodeName===t.Shape.TEXT&&delete o.anchor;var M=On((1-2*(N&&N[0].value||0))*s/2+p,(1-2*(N&&N[1].value||0))*u/2+d,(1-2*(N&&(null===(r=N[2])||void 0===r?void 0:r.value)||0))*T[2]+v);i.contentBounds.update(M,T);var _=e.nodeName===t.Shape.POLYLINE||e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.PATH?Math.SQRT2:.5;if(b&&!b.isNone){var A=(((null==S?void 0:S.value)||0)+((null==E?void 0:E.value)||0))*_;Ln(T,T,On(A,A,0))}if(i.renderBounds.update(M,T),w&&"inner"!==(null==x?void 0:x.value)){var O=i.renderBounds,I=O.min,R=O.max,L=o.shadowBlur,D=o.shadowOffsetX,U=o.shadowOffsetY,F=L&&L.value||0,B=D&&D.value||0,V=U&&U.value||0,G=R[0]+F+B,j=I[1]-F+V,z=R[1]+F+V;I[0]=Math.min(I[0],I[0]-F+B),R[0]=Math.max(R[0],G),I[1]=Math.min(I[1],j),R[1]=Math.max(R[1],z),i.renderBounds.setMinMax(I,R)}P.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var r=n[0].value;i.renderBounds.update(i.renderBounds.center,Ln(i.renderBounds.halfExtents,i.renderBounds.halfExtents,On(r,r,0)))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,u=i.renderBounds,c=u.min,l=u.max,h=l[0]+s+o,p=c[1]-s+a,f=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],p),l[1]=Math.max(l[1],f),i.renderBounds.setMinMax(c,l)}})),N=o.anchor;var H=(g?-1:1)*as(C[0],0,e),W=(m?-1:1)*as(C[1],1,e);e.setOrigin(H-=(g?-1:1)*(N&&N[0].value||0)*i.contentBounds.halfExtents[0]*2,W-=(m?-1:1)*(N&&N[1].value||0)*i.contentBounds.halfExtents[1]*2),this.sceneGraphService.dirtifyToRoot(e)}},n.isPropertyInheritable=function(t){var e=this.getMetadata(t);return!!e&&e.inherited},e}(),ue([lt(Bu),le("design:type",Function)],t.DefaultStyleValueRegistry.prototype,"propertySyntaxFactory",void 0),ue([lt(ul),le("design:type",Object)],t.DefaultStyleValueRegistry.prototype,"sceneGraphService",void 0),ue([Y.postConstruct(),le("design:type",Function),le("design:paramtypes",[]),le("design:returntype",void 0)],t.DefaultStyleValueRegistry.prototype,"init",null),t.DefaultStyleValueRegistry=ue([ct({token:ni})],t.DefaultStyleValueRegistry);var _l=At((function(e){Y.decorate(ut(),To.EventEmitter),e(t.DisplayObjectPool),e(t.DefaultSceneGraphSelector),e({token:il,useFactory:function(t){return function(){return t.container.get(ol)}}}),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:Pl,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Cl,n)&&(e[n]=t.container.getNamed(Cl,n)),e[n]}}}),e(t.CSSPropertyNumber),e(t.CSSPropertyAngle),e(t.CSSPropertyClipPath),e(t.CSSPropertyColor),e(t.CSSPropertyFilter),e(t.CSSPropertyLengthOrPercentage),e(t.CSSPropertyLengthOrPercentage12),e(t.CSSPropertyLengthOrPercentage14),e(t.CSSPropertyLocalPosition),e(t.CSSPropertyOffsetDistance),e(t.CSSPropertyOffsetPath),e(t.CSSPropertyOpacity),e(t.CSSPropertyPath),e(t.CSSPropertyPoints),e(t.CSSPropertyShadowBlur),e(t.CSSPropertyText),e(t.CSSPropertyTextTransform),e(t.CSSPropertyTransform),e(t.CSSPropertyTransformOrigin),e(t.CSSPropertyZIndex),e({token:Bu,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Vu,n)&&(e[n]=t.container.getNamed(Vu,n)),e[n]}}}),e(t.DefaultStyleValueRegistry),e(t.LayoutRegistry),e(t.LayoutEngine),e(t.LayoutEdges),e({token:so,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:uo,useValue:n}),r.get(t.LayoutEdges)}}}),e({token:Ne,useFactory:function(e){return function(n){var r=e.container.createChild();r.register(t.LayoutContext),r.register(t.LayoutChildren),r.register({token:no,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:ro,useValue:n}),r.get(t.LayoutChildren)}}}),r.register(t.FragmentResult),r.register({token:Ae,useFactory:function(e){return function(n,r){var i=e.container.createChild();return i.register({token:Oe,useValue:n}),i.register({token:Ie,useValue:r}),i.get(t.FragmentResult)}}}),r.register(t.LayoutFragment),r.register({token:ho,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:po,useValue:n}),r.get(t.LayoutFragment)}}});var i=r.get(no),o=r.get(ho),a=r.get(Ae);return r.register({token:Me,useValue:ge({},n,{layoutChildrenFactory:i,layoutFragmentFactory:o,fragmentResultFactory:a})}),r.get(t.LayoutContext)}}})})),Al=function(){function t(t){this.plugins=[],this.config=void 0,this.config=ge({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(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}();let Ol=1;const Il="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},Rl=Date.now();let Ll={},Dl=Date.now();const Ul=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-Dl,r=n>16?0:16-n,i=Ol++;return Ll[i]=t,Object.keys(Ll).length>1||setTimeout((()=>{Dl=e;const t=Ll;Ll={},Object.keys(t).forEach((e=>t[e](Il.performance&&"function"==typeof Il.performance.now?Il.performance.now():Date.now()-Rl)))}),r),i},Fl=t=>{delete Ll[t]},Bl=t=>"string"!=typeof t?Ul:""===t?Il.requestAnimationFrame:Il[t+"RequestAnimationFrame"],Vl=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],(t=>!!Bl(t))),Gl=Bl(Vl),jl="string"!=typeof(zl=Vl)?Fl:""===zl?Il.cancelAnimationFrame:Il[zl+"CancelAnimationFrame"]||Il[zl+"CancelRequestAnimationFrame"];var zl,Hl,Wl;Il.requestAnimationFrame=Gl,Il.cancelAnimationFrame=jl,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Gl,cancelAnimationFrame:jl});var Yl,ql,Xl=t.Syringe.defineToken("CullingStrategyContribution"),Kl=(Hl=function(){function e(){this.strategyProvider=void 0,this.renderingContext=void 0}return e.prototype.apply=function(e){var n=this,r=this.strategyProvider.getContributions();e.hooks.cull.tap(Wl.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)})),!i.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new zu(t.ElementEvent.CULLED)),null)}return e})),e.hooks.afterRender.tap(Wl.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},e}(),Hl.tag="Culling",Wl=Hl);ue([Ft(Xl),le("design:type",Object)],Kl.prototype,"strategyProvider",void 0),ue([lt(dl),le("design:type",Object)],Kl.prototype,"renderingContext",void 0),Kl=Wl=ue([ct({contrib:Sl})],Kl);var Zl,Jl,Ql=(Yl=function(){function t(){}return t.prototype.apply=function(t){t.hooks.dirtycheck.tap(ql.tag,(function(e){return e?e.renderable.dirty||t.disableDirtyRectangleRendering()?e:null:e}))},t}(),Yl.tag="DirtyCheck",ql=Yl);Ql=ql=ue([ct({contrib:Sl})],Ql);var $l=(Zl=function(){function t(){var t=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 Uc(null),this.rootWheelEvent=new Fc(null),this.onPointerMove=function(e){var n,r,i=null===(n=t.renderingContext.root)||void 0===n||null===(r=n.ownerDocument)||void 0===r?void 0:r.defaultView;if(!i.supportsTouchEvents||"touch"!==e.pointerType){for(var o,a=ke(t.normalizeToPointerEvent(e,i));!(o=a()).done;){var s=t.bootstrapEvent(t.rootPointerEvent,o.value,i);t.eventService.mapEvent(s)}t.setCursor(t.eventService.cursor)}}}var e=t.prototype;return e.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var t=de(pe().mark((function t(n){return pe().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(Jl.tag,(function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap(Jl.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=ke(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(Jl.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=ke(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(Jl.tag,this.onPointerMove),t.hooks.pointerOver.tap(Jl.tag,this.onPointerMove),t.hooks.pointerOut.tap(Jl.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 Za(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=Qr[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 Za(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];Ue(i.button)&&(i.button=0),Ue(i.buttons)&&(i.buttons=1),Ue(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),Ue(i.width)&&(i.width=i.radiusX||1),Ue(i.height)&&(i.height=i.radiusY||1),Ue(i.tiltX)&&(i.tiltX=0),Ue(i.tiltY)&&(i.tiltY=0),Ue(i.pointerType)&&(i.pointerType="touch"),Ue(i.pointerId)&&(i.pointerId=i.identifier||0),Ue(i.pressure)&&(i.pressure=i.force||.5),Ue(i.twist)&&(i.twist=0),Ue(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;Ue(o.isPrimary)&&(o.isPrimary=!0),Ue(o.width)&&(o.width=1),Ue(o.height)&&(o.height=1),Ue(o.tiltX)&&(o.tiltX=0),Ue(o.tiltY)&&(o.tiltY=0),Ue(o.pointerType)&&(o.pointerType="mouse"),Ue(o.pointerId)&&(o.pointerId=1),Ue(o.pressure)&&(o.pressure=.5),Ue(o.twist)&&(o.twist=0),Ue(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t}(),Zl.tag="Event",Jl=Zl);ue([lt(wi),le("design:type",Object)],$l.prototype,"canvasConfig",void 0),ue([lt(ll),le("design:type",Object)],$l.prototype,"contextService",void 0),ue([lt(t.RenderingService),le("design:type",t.RenderingService)],$l.prototype,"renderingService",void 0),ue([lt(dl),le("design:type",Object)],$l.prototype,"renderingContext",void 0),ue([lt(t.EventService),le("design:type",t.EventService)],$l.prototype,"eventService",void 0),$l=Jl=ue([ct({contrib:Sl})],$l);var th,eh,nh=[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],rh=function(){function e(){this.camera=void 0}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(Ba.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=nh.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,p=l.distance;if(0>Gn(h,n.getPositiveFarPoint(i[s]))+p)return t.Mask.OUTSIDE;0>Gn(h,n.getNegativeFarPoint(i[s]))+p&&(o|=c)}}return o},e}();ue([lt(yl),le("design:type",bl)],rh.prototype,"camera",void 0),rh=ue([ct({contrib:Xl})],rh);var ih=(th=function(){function e(){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set}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(eh.tag,de(pe().mark((function e(){return pe().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(eh.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(eh.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&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=i.getMin(),a=o[0],s=o[1],u=i.getMax();r.aabb={id:n.entity,minX:a,minY:s,maxX:u[0],maxY:u[1]}}r.aabb&&e.push(r.aabb)})),this.rBush.load(e),this.toSync.clear()},e}(),th.tag="Prepare",eh=th);ue([lt(dl),le("design:type",Object)],ih.prototype,"renderingContext",void 0),ue([lt(ni),le("design:type",Object)],ih.prototype,"styleValueRegistry",void 0),ue([lt(ul),le("design:type",Object)],ih.prototype,"sceneGraphService",void 0),ue([lt(Ku),le("design:type",zt)],ih.prototype,"rBush",void 0),ih=eh=ue([ct({contrib:Sl})],ih);var oh,ah=At((function(e){t.Contribution.register(e,Sl,{cache:!1}),t.Contribution.register(e,Xl,{cache:!1}),e({token:Ku,useValue:new zt}),e(t.RenderingService),e(t.EventService),e($l),e(ih),e(Ql),e(Kl),e(rh)}));(oh=t.CanvasEvent||(t.CanvasEvent={})).READY="ready",oh.BEFORE_RENDER="beforerender",oh.AFTER_RENDER="afterrender",oh.BEFORE_DESTROY="beforedestroy",oh.AFTER_DESTROY="afterdestroy",oh.RESIZE="resize",oh.DIRTY_RECTANGLE="dirtyrectangle";var sh=function(e){function n(n){var r;(r=e.call(this)||this).container=Dt.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=rc,r.frameId=void 0,r.eventService=void 0,r.renderingService=void 0,r.inited=!1,r.readyPromise=void 0,r.resolveReadyPromise=void 0,r.document=new Lc,r.document.defaultView=xe(r),r.customElements=new rl;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,p=n.cursor,f=n.document,d=n.requestAnimationFrame,y=n.cancelAnimationFrame,v=n.createImage,g=n.supportsPointerEvents,m=n.supportsTouchEvents,T=n.isTouchEvent,b=n.isMouseEvent;We(i,xe(r));var S=s,E=u,x=c;return o&&(x=1>(x=c||Ye&&window.devicePixelRatio||1)?1:Math.ceil(x),S=s||Zr(o)||o.width/x,E=u||Jr(o)||o.height/x),r.devicePixelRatio=x,r.requestAnimationFrame=null!=d?d:Gl.bind(globalThis),r.cancelAnimationFrame=null!=y?y:jl.bind(globalThis),r.supportsTouchEvents=null!=m?m:"ontouchstart"in globalThis,r.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,r.isTouchEvent=null!=T?T:function(t){return r.supportsTouchEvents&&t instanceof globalThis.TouchEvent},r.isMouseEvent=null!=b?b:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!r.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:o,width:S,height:E,renderer:l,offscreenCanvas:a,devicePixelRatio:x,cursor:p||"default",background:h,createImage:v,document:f}),r.initDefaultCamera(S,E),de(pe().mark((function e(){return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.initRenderer(l);case 2:r.dispatchEvent(new zu(t.CanvasEvent.READY)),r.readyPromise&&r.resolveReadyPromise();case 4:case"end":return e.stop()}}),e)})))(),r}me(n,e);var r=n.prototype;return r.initRenderingContext=function(e){var n=this;this.container.register({token:wi,useValue:e}),this.container.register({token:dl,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=(new bl).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(dl);r.on(vl.UPDATED,(function(){i.renderReasons.add(t.RenderReason.CAMERA_CHANGED)})),this.container.register({token:yl,useValue:r})},r.getConfig=function(){return this.container.get(wi)},r.getContainer=function(){return this.container},r.getRoot=function(){return this.document.documentElement},r.getCamera=function(){return this.container.get(yl)},r.getContextService=function(){return this.container.get(ll)},r.getEventService=function(){return this.eventService},r.getRenderingService=function(){return this.renderingService},r.getRenderingContext=function(){return this.container.get(dl)},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 zu(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 zu(t.CanvasEvent.AFTER_DESTROY))},r.changeSize=function(t,e){this.resize(t,e)},r.resize=function(e,n){var r=this.container.get(wi);r.width=e,r.height=n,this.getContextService().resize(e,n);var i=this.container.get(yl),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 zu(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,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},r.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},r.render=function(){(this.dispatchEvent(new zu(t.CanvasEvent.BEFORE_RENDER)),this.container.isBound(t.RenderingService))&&this.container.get(t.RenderingService).render(this.getConfig());this.dispatchEvent(new zu(t.CanvasEvent.AFTER_RENDER))},r.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},r.initRenderer=function(){var e=de(pe().mark((function e(n){var r;return pe().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(ll),this.renderingService=this.container.get(t.RenderingService),this.eventService=this.container.get(t.EventService),e.next=11,r.init();case 11:return e.next=13,this.renderingService.init();case 13: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 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.loadCommonContainerModule=function(){this.container.unload(ah),this.container.load(ah,!0)},r.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.container=e.container,t.init()}))},r.setRenderer=function(){var t=de(pe().mark((function t(e){var n,r;return pe().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(wi).cursor=t,this.getContextService().applyCursorStyle(t)},r.unmountChildren=function(e){var n=this;if(this.inited){var r=[];e.forEach((function(t){t.isConnected&&r.push(t)})),r.reverse().forEach((function(e){e instanceof oc&&e.disconnectedCallback&&e.disconnectedCallback(),e.dispatchEvent(new zu(t.ElementEvent.UNMOUNTED)),e!==n.document.documentElement&&(e.ownerDocument=null),e.isConnected=!1}))}},r.mountChildren=function(e){var n=this;this.inited?e.forEach((function(e){e.isConnected||(e.ownerDocument=n.document,e.isConnected=!0,e.dispatchEvent(new zu(t.ElementEvent.MOUNTED)),e instanceof oc&&e.connectedCallback&&e.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: ",e.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})},ve(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}(Hu);Dt.load(_l);var uh=Dt.get(t.LayoutEngine);t.AABB=Ba,t.AbstractLayoutDefinition=io,t.AbstractRenderer=Al,t.AbstractRendererPlugin=function(){this.container=void 0},t.Animation=_c,t.AnimationEffectTiming=Bc,t.AnimationEvent=Nc,t.AnimationTimeline=Rc,t.AsyncParallelHook=Ui,t.AsyncSeriesWaterfallHook=Gi,t.BUILT_IN_PROPERTIES=Ml,t.BoundingSphere=Ga,t.CSS=Su,t.CSSColorValue=ko,t.CSSGradientValue=Zo,t.CSSKeywordValue=Po,t.CSSMathInvert=Fo,t.CSSMathMax=Ho,t.CSSMathMin=zo,t.CSSMathNegate=Bo,t.CSSMathProduct=Yo,t.CSSMathSum=Wo,t.CSSMathValue=Uo,t.CSSMathVariadic=jo,t.CSSNumericValue=_o,t.CSSNumericValueType=Mo,t.CSSProperty=Vu,t.CSSPropertySyntaxFactory=Bu,t.CSSRGB=Ko,t.CSSStyleValue=wo,t.CSSUnitValue=Do,t.Camera=bl,t.CameraEvent=vl,t.Canvas=sh,t.CanvasConfig=wi,t.Circle=sc,t.Container=Lt,t.ContextNode=Ie,t.ContextService=ll,t.Cullable=Yu,t.CustomElement=oc,t.CustomElementRegistry=rl,t.CustomEvent=zu,t.DCHECK=Re,t.DCHECK_EQ=Le,t.DCHECK_NE=De,t.DELEGATION_SPLITTER=":",t.DefaultCamera=yl,t.DefaultContributionProvider=kt,t.Deferred=qr,t.DisplayObject=rc,t.Document=Lc,t.EasingFunctions=Hr,t.Element=ec,t.Ellipse=cc,t.EventTarget=Hu,t.FederatedEvent=ju,t.FederatedMouseEvent=Dc,t.FederatedPointerEvent=Uc,t.FederatedWheelEvent=Fc,t.FragmentResultFactory=Ae,t.FragmentResultOptions=Oe,t.Frustum=za,t.Geometry=qu,t.GeometryAABBUpdater=Cl,t.GeometryUpdaterFactory=Pl,t.GlobalContainer=Dt,t.Group=hc,t.HTML=Cc,t.Image=fc,t.KeyframeEffect=nl,t.LayoutChildrenFactory=no,t.LayoutChildrenOptions=ro,t.LayoutContextFactory=Ne,t.LayoutContextOptions=Me,t.LayoutEdgesFactory=so,t.LayoutEdgesOptions=uo,t.LayoutFragmentFactory=ho,t.LayoutFragmentOptions=po,t.LayoutObject=Ce,t.Line=yc,t.MOUSE_POINTER_ID=1,t.Module=At,t.MutationEvent=$u,t.MutationObserver=Hc,t.MutationRecord=Vc,t.Node=Wu,t.ObjectTyped=Xr,t.Odeg=Xo,t.OptionSymbol=pt,t.Opx=qo,t.Path=gc,t.Plane=ja,t.Point=Za,t.Polygon=Tc,t.Polyline=Sc,t.Provider=mt,t.RBush=zt,t.RBushNode=Xu,t.RBushRoot=Ku,t.Ray=Ka,t.Rect=xc,t.Rectangle=Ja,t.Registration=zc,t.Renderable=Zu,t.RenderingContext=dl,t.RenderingPluginContribution=Sl,t.SceneGraphSelector=ol,t.SceneGraphSelectorFactory=il,t.SceneGraphService=ul,t.Sortable=Ju,t.StyleValueRegistry=ni,t.SyncHook=qi,t.SyncWaterfallHook=$i,t.SyringeModule=Mt,t.TOUCH_TO_POINTER=Qr,t.Text=kc,t.Transform=Qu,t.baseTypeToString=No,t.camelCase=fi,t.clamp=vr,t.clampedMergeNumbers=ls,t.cleanExistedCanvas=We,t.colorStopToString=$r,t.compareAnimations=Ac,t.composeMatrix=_u,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.contrib=Ft,t.convertAngleUnit=rs,t.convertEffectInput=yi,t.convertItemToMatrix=Cu,t.convertPercentUnit=as,t.convertToDash=Pr,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.value,i.y1.value,i.x2.value,i.y2.value);break;case t.Shape.CIRCLE:var o=e.parsedStyle,a=o.r;r=Ni(a.value,a.value,o.cx.value,o.cy.value);break;case t.Shape.ELLIPSE:var s=e.parsedStyle;r=Ni(s.rx.value,s.ry.value,s.cx.value,s.cy.value);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,p=u.y,f=u.radius,d=f&&f.some((function(t){return 0!==t.value}));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.value,l.value,h.value,p.value,d&&f.map((function(t){return vr(t.value,0,Math.min(Math.abs(c.value)/2,Math.abs(l.value)/2))})));break;case t.Shape.PATH:var y=e.parsedStyle.path,v=y.zCommandIndexes;r=[].concat(y.curve),v.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=On(e[1]-a,e[2]-u,0);n&&Hn(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=On(e[1]-a,e[2]-u,0),c=On(e[3]-a,e[4]-u,0),l=On(e[5]-a,e[6]-u,0);n&&(Hn(s,s,r),Hn(c,c,r),Hn(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=On(e[6]-a,e[7]-u,0);n&&Hn(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=mr,t.decompose=kr,t.decorate=Y.decorate,t.deg2rad=Tr,t.deg2turn=function(t){return t/360},t.equalSet=function(t,e){if(t.size!==e.size)return!1;for(var n,r=ke(t);!(n=r()).done;){if(!e.has(n.value))return!1}return!0},t.extractPolygons=Pi,t.formatAttribute=xi,t.fromRotationTranslationScale=xr,t.getAngle=gr,t.getEasingFunction=Wr,t.getEuler=Er,t.getHeight=Jr,t.getRotationInRadians=function(t){return Math.atan2(t[1],t[4])},t.getScaling=function(t,e){var n=e[3],r=e[4];return t[0]=Math.hypot(e[0],e[1]),t[1]=Math.hypot(n,r),t},t.getStyle=Kr,t.getTranslation=function(t,e){return t[0]=e[6],t[1]=e[7],t},t.getWidth=Zr,t.grad2deg=function(t){return 0>(t%=400)&&(t+=400),t/400*360},t.hasArcOrBezier=ki,t.inject=lt,t.injectable=ut,t.isBoolean=Ge,t.isBrowser=Ye,t.isComparison=function(e){return e===t.CSSMathOperator.kMin||e===t.CSSMathOperator.kMax||e===t.CSSMathOperator.kClamp},t.isFunction=Ve,t.isNil=Fe,t.isNumber=Be,t.isObject=je,t.isPattern=La,t.isString=di,t.isSyringeModule=_t,t.isUndefined=Ue,t.layoutEngine=uh,t.makePerspective=wr,t.makeQuerablePromise=Yr,t.makeTiming=$c,t.memoize=pi,t.mergeColors=Ua,t.mergeDimensionList=os,t.mergeDimensions=ns,t.mergeNumberLists=function(t,e){if(t.length===e.length)return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t}]},t.mergeNumbers=cs,t.mergePaths=$s,t.mergeTransforms=Lu,t.named=ht,t.normalizeKeyframes=Zc,t.normalizeTimingInput=tl,t.numberToString=ss,t.numericTimingToObject=el,t.optional=Y.optional,t.parseAngle=es,t.parseColor=Da,t.parseDimension=Qa,t.parseDimensionArray=is,t.parseFilter=su,t.parseGradient=ei,t.parseLength=$a,t.parseLengthOrPercentage=ts,t.parseNumber=us,t.parseNumberList=function(t){return di(t)?t.split(" ").map(us):t.map(us)},t.parseParam=ou,t.parsePath=Qs,t.parsePoints=iu,t.parseTransform=Pu,t.parseTransformOrigin=Du,t.parserPercentage=function(t){return Qa(new RegExp("%","g"),t)},t.path2Segments=Ci,t.postConstruct=Y.postConstruct,t.rad2deg=br,t.register=Ut,t.registerSideOption=function(t,e){Reflect.defineMetadata(pt,t,e)},t.setDOMSize=function(t,e,n){Ye&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")},t.singleton=ct,t.sortByZIndex=sl,t.toFontString=eo,t.transient=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(at(at({},e),{},{lifecycle:t.Syringe.Lifecycle.transient}))},t.translatePathToString=function(t,e,n){var r=t.map((function(t){switch(t[0]){case"M":return"M "+(t[1]-e)+","+(t[2]-n);case"L":return"L "+(t[1]-e)+","+(t[2]-n);case"Q":return"Q "+(t[1]-e)+" "+(t[2]-n)+","+(t[3]-e)+" "+(t[4]-n);case"C":return"C "+(t[1]-e)+" "+(t[2]-n)+","+(t[3]-e)+" "+(t[4]-n)+","+(t[5]-e)+" "+(t[6]-n);case"A":return"A "+t[1]+" "+t[2]+" "+t[3]+" "+t[4]+" "+t[5]+" "+(t[6]-e)+" "+(t[7]-n);case"Z":return"Z"}})).join(" ");return~r.indexOf("NaN")?"":r},t.turn2deg=Sr,t.typeCheck=Vo,t.unitTypeToBaseType=Co,t.unmanaged=Y.unmanaged,Object.defineProperty(t,"__esModule",{value:!0})}));
3
+ fe=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 k(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 w()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(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 p(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(x([])));y&&y!==e&&n.call(y,i)&&(d=y);var g=p.prototype=h.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(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 S(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,S(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 b(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function x(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:w}}function w(){return{value:void 0,done:!0}}return f.prototype=p,s(g,"constructor",p),s(p,"constructor",f),f.displayName=s(p,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,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(T.prototype),s(T.prototype,o,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(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=x,k.prototype={constructor:k,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(E),!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),E(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;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function pe(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 de(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){pe(o,r,i,a,s,"next",t)}function s(t){pe(o,r,i,a,s,"throw",t)}a(void 0)}))}}function ve(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 ye(t,e,n){return e&&ve(t.prototype,e),n&&ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ge(){return ge=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},ge.apply(this,arguments)}function me(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Te(t,e)}function Te(t,e){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Te(t,e)}function Se(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function be(t,e,n){return be=Se()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&Te(i,n.prototype),i},be.apply(null,arguments)}function Ee(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 ke(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xe(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 we(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 xe(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)?xe(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.")}(re=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",re.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(ie||(ie={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(oe||(oe={})),(ae=t.PropertyName||(t.PropertyName={})).LAYOUT="display",ae.LEFT="left",ae.TOP="top",ae.BOTTOM="bottom",ae.RIGHT="right",ae.WIDTH="width",ae.HEIGHT="height",ae.MIN_WIDTH="minWidth",ae.MAX_WIDTH="maxWidth",ae.MIN_HEIGHT="minHeight",ae.MAX_HEIGHT="maxHeight",ae.BOX_SIZING="boxSizing",ae.PADDING="padding",ae.PADDING_TOP="paddingTop",ae.PADDING_BOTTOM="paddingBottom",ae.PADDING_START="paddingLeft",ae.PADDING_END="paddingRight",ae.MARGIN="margin",ae.MARGIN_TOP="marginTop",ae.MARGIN_BOTTOM="marginBottom",ae.MARGIN_START="marginLeft",ae.MARGIN_END="marginRight",ae.BORDER="border",ae.BORDER_TOP="borderTop",ae.BORDER_BOTTOM="borderBottom",ae.BORDER_START="borderLeft",ae.BORDER_END="borderRight",ae.FLEX_DIRECTION="flexDirection",ae.FLEX_WRAP="flexWrap",ae.FLEX_FLOW="flexFlow",ae.ALIGN_ITEMS="alignItems",ae.ALIGN_CONTENT="alignContent",ae.JUSTIFY_CONTENT="justifyContent",ae.FLEX="flex",ae.ALIGN_SELF="alignSelf",ae.FLEX_SHRINK="flexShrink",ae.FLEX_BASIS="flexBasis",ae.FLEX_GROW="flexGrow",ae.OFFSET_WIDTH="offsetWidth",ae.OFFSET_HEIGHT="offsetHeight",ae.ORDER="order";var Pe=1,Me=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=Pe++,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=de(fe().mark((function t(){var e;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,uh.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},ye(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}(),Ce=t.Syringe.defineToken("LayoutContextFactory"),Ne=t.Syringe.defineToken("LayoutContextOptions"),_e=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=""+_e++,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=ue([ct(),ce(0,lt(Ne)),le("design:paramtypes",[Object])],t.LayoutContext);var Ae=t.Syringe.defineToken("FragmentResultFactory"),Oe=t.Syringe.defineToken("FragmentResultOptions"),Ie=t.Syringe.defineToken("contextNode");function Re(t){if(!t)throw new Error}function Le(t,e){if(t!==e)throw new Error}function De(t,e){if(t===e)throw new Error}function Ue(t){return void 0===t}function Fe(t){return null==t}function Be(t){return"number"==typeof t}function Ve(t){return"function"==typeof t}function Ge(t){return"boolean"==typeof t}function je(t){return"[object Object]"===Object.prototype.toString.call(t)}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=ue([ut(),ce(0,lt(t.LayoutContext)),ce(1,lt(Ie)),ce(2,lt(Oe)),le("design:paramtypes",[t.LayoutContext,Me,Object])],t.FragmentResult);var ze={},He=0;function We(t,e){if(t){var n="string"==typeof t?t:t.id||He++;ze[n]&&ze[n].destroy(),ze[n]=e}}var Ye="undefined"!=typeof window&&void 0!==window.document,qe=.1,Xe="function"==typeof Float32Array,Ke=function(t,e){return 1-3*e+3*t},Ze=function(t,e){return 3*e-6*t},Je=function(t){return 3*t},Qe=function(t,e,n){return((Ke(e,n)*t+Ze(e,n))*t+Je(e))*t},$e=function(t,e,n){return 3*Ke(e,n)*t*t+2*Ze(e,n)*t+Je(e)},tn=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=Xe?new Float32Array(11):new Array(11),o=0;11>o;++o)i[o]=Qe(o*qe,t,n);var a=function(e){for(var r=0,o=1;10!==o&&e>=i[o];++o)r+=qe;--o;var a=r+(e-i[o])/(i[o+1]-i[o])*qe,s=$e(a,t,n);return.001>s?0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=Qe(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+qe,t,n):function(t,e,n,r){for(var i=0;4>i;++i){var o=$e(e,n,r);if(0===o)return e;e-=(Qe(e,n,r)-t)/o}return e}(e,a,t,n)};return function(t){return 0===t||1===t?t:Qe(a(t),e,r)}},en=1e-6,nn="undefined"!=typeof Float32Array?Float32Array:Array;function rn(){var t=new nn(9);return nn!=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 on(){var t=new nn(16);return nn!=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 an(t){var e=new nn(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}function sn(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 un(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,v){var y=new nn(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]=p,y[14]=d,y[15]=v,y}function cn(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 ln(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],p=e[11],d=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,S=n*c-o*a,b=r*u-i*s,E=r*c-o*s,k=i*c-o*u,x=l*v-h*d,w=l*y-f*d,P=l*g-p*d,M=h*y-f*v,C=h*g-p*v,N=f*g-p*y,_=m*N-T*C+S*M+b*P-E*w+k*x;return _?(t[0]=(s*N-u*C+c*M)*(_=1/_),t[1]=(i*C-r*N-o*M)*_,t[2]=(v*k-y*E+g*b)*_,t[3]=(f*E-h*k-p*b)*_,t[4]=(u*P-a*N-c*w)*_,t[5]=(n*N-i*P+o*w)*_,t[6]=(y*S-d*k-g*T)*_,t[7]=(l*k-f*S+p*T)*_,t[8]=(a*C-s*P+c*x)*_,t[9]=(r*P-n*C-o*x)*_,t[10]=(d*E-v*S+g*m)*_,t[11]=(h*S-l*E-p*m)*_,t[12]=(s*w-a*M-u*x)*_,t[13]=(n*M-r*w+i*x)*_,t[14]=(v*T-d*b-y*m)*_,t[15]=(l*b-h*T+f*m)*_,t):null}function hn(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],p=e[10],d=e[11],v=e[12],y=e[13],g=e[14],m=e[15],T=n[0],S=n[1],b=n[2],E=n[3];return t[0]=T*r+S*s+b*h+E*v,t[1]=T*i+S*u+b*f+E*y,t[2]=T*o+S*c+b*p+E*g,t[3]=T*a+S*l+b*d+E*m,t[4]=(T=n[4])*r+(S=n[5])*s+(b=n[6])*h+(E=n[7])*v,t[5]=T*i+S*u+b*f+E*y,t[6]=T*o+S*c+b*p+E*g,t[7]=T*a+S*l+b*d+E*m,t[8]=(T=n[8])*r+(S=n[9])*s+(b=n[10])*h+(E=n[11])*v,t[9]=T*i+S*u+b*f+E*y,t[10]=T*o+S*c+b*p+E*g,t[11]=T*a+S*l+b*d+E*m,t[12]=(T=n[12])*r+(S=n[13])*s+(b=n[14])*h+(E=n[15])*v,t[13]=T*i+S*u+b*f+E*y,t[14]=T*o+S*c+b*p+E*g,t[15]=T*a+S*l+b*d+E*m,t}function fn(t,e,n){var r,i,o,a,s,u,c,l,h,f,p,d,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],p=e[10],d=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]=p,t[11]=d,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+p*g+e[14],t[15]=a*v+l*y+d*g+e[15]),t}function pn(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 dn(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 vn(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 yn(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 gn(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,p=i*u,d=i*c,v=o*c,y=a*s,g=a*u,m=a*c;return t[0]=1-(p+v),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+v),t[6]=d+y,t[7]=0,t[8]=f+g,t[9]=d-y,t[10]=1-(l+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function mn(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Tn(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 Sn(t,e){var n=new nn(3);Tn(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,p=e[9]*i,d=e[10]*o,v=a+l+d,y=0;return v>0?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(h-p)/y,t[1]=(f-u)/y,t[2]=(s-c)/y):a>l&&a>d?(y=2*Math.sqrt(1+a-l-d),t[3]=(h-p)/y,t[0]=.25*y,t[1]=(s+c)/y,t[2]=(f+u)/y):l>d?(y=2*Math.sqrt(1+l-a-d),t[3]=(f-u)/y,t[0]=(s+c)/y,t[1]=.25*y,t[2]=(h+p)/y):(y=2*Math.sqrt(1+d-a-l),t[3]=(s-c)/y,t[0]=(f+u)/y,t[1]=(h+p)/y,t[2]=.25*y),t}function bn(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,p=o*l,d=o*h,v=a*l,y=a*h,g=s*h,m=u*c,T=u*l,S=u*h,b=r[0],E=r[1],k=r[2],x=i[0],w=i[1],P=i[2],M=(1-(v+g))*b,C=(p+S)*b,N=(d-T)*b,_=(p-S)*E,A=(1-(f+g))*E,O=(y+m)*E,I=(d+T)*k,R=(y-m)*k,L=(1-(f+v))*k;return t[0]=M,t[1]=C,t[2]=N,t[3]=0,t[4]=_,t[5]=A,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=L,t[11]=0,t[12]=n[0]+x-(M*x+_*w+I*P),t[13]=n[1]+w-(C*x+A*w+R*P),t[14]=n[2]+P-(N*x+O*w+L*P),t[15]=1,t}function En(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,p=i*s,d=i*u,v=o*a,y=o*s,g=o*u;return t[0]=1-h-d,t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-c-d,t[6]=p+v,t[7]=0,t[8]=f+y,t[9]=p-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function kn(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 xn(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 wn=xn;function Pn(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d=e[0],v=e[1],y=e[2],g=r[0],m=r[1],T=r[2],S=n[0],b=n[1],E=n[2];return Math.abs(d-S)<en&&Math.abs(v-b)<en&&Math.abs(y-E)<en?cn(t):(l=d-S,h=v-b,f=y-E,i=m*(f*=p=1/Math.hypot(l,h,f))-T*(h*=p),o=T*(l*=p)-g*f,a=g*h-m*l,(p=Math.hypot(i,o,a))?(i*=p=1/p,o*=p,a*=p):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(p=Math.hypot(s,u,c))?(s*=p=1/p,u*=p,c*=p):(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*d+o*v+a*y),t[13]=-(s*d+u*v+c*y),t[14]=-(l*d+h*v+f*y),t[15]=1,t)}function Mn(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 Cn=Object.freeze({__proto__:null,create:on,clone:an,copy:sn,fromValues:un,set:function(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,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]=p,t[13]=d,t[14]=v,t[15]=y,t},identity:cn,transpose:function(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},invert:ln,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],p=e[11],d=e[12],v=e[13],y=e[14],g=e[15];return t[0]=s*(f*g-p*y)-h*(u*g-c*y)+v*(u*p-c*f),t[1]=-(r*(f*g-p*y)-h*(i*g-o*y)+v*(i*p-o*f)),t[2]=r*(u*g-c*y)-s*(i*g-o*y)+v*(i*c-o*u),t[3]=-(r*(u*p-c*f)-s*(i*p-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-p*y)-l*(u*g-c*y)+d*(u*p-c*f)),t[5]=n*(f*g-p*y)-l*(i*g-o*y)+d*(i*p-o*f),t[6]=-(n*(u*g-c*y)-a*(i*g-o*y)+d*(i*c-o*u)),t[7]=n*(u*p-c*f)-a*(i*p-o*f)+l*(i*c-o*u),t[8]=a*(h*g-p*v)-l*(s*g-c*v)+d*(s*p-c*h),t[9]=-(n*(h*g-p*v)-l*(r*g-o*v)+d*(r*p-o*h)),t[10]=n*(s*g-c*v)-a*(r*g-o*v)+d*(r*c-o*s),t[11]=-(n*(s*p-c*h)-a*(r*p-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*y-f*v)-l*(s*y-u*v)+d*(s*f-u*h)),t[13]=n*(h*y-f*v)-l*(r*y-i*v)+d*(r*f-i*h),t[14]=-(n*(s*y-u*v)-a*(r*y-i*v)+d*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t},determinant: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],p=t[12],d=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*d)+(e*u-i*o)*(l*v-h*d)+(n*s-r*a)*(c*y-f*p)-(n*u-i*a)*(c*v-h*p)+(r*u-i*s)*(c*d-l*p)},multiply:hn,translate:fn,scale:pn,rotate:function(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d,v,y,g,m,T,S,b,E,k,x,w,P,M,C=r[0],N=r[1],_=r[2],A=Math.hypot(C,N,_);return en>A?null:(C*=A=1/A,N*=A,_*=A,i=Math.sin(n),o=Math.cos(n),u=e[1],c=e[2],l=e[3],f=e[5],p=e[6],d=e[7],y=e[9],g=e[10],m=e[11],E=C*N*(a=1-o)-_*i,k=N*N*a+o,x=_*N*a+C*i,w=C*_*a+N*i,P=N*_*a-C*i,M=_*_*a+o,t[0]=(s=e[0])*(T=C*C*a+o)+(h=e[4])*(S=N*C*a+_*i)+(v=e[8])*(b=_*C*a-N*i),t[1]=u*T+f*S+y*b,t[2]=c*T+p*S+g*b,t[3]=l*T+d*S+m*b,t[4]=s*E+h*k+v*x,t[5]=u*E+f*k+y*x,t[6]=c*E+p*k+g*x,t[7]=l*E+d*k+m*x,t[8]=s*w+h*P+v*M,t[9]=u*w+f*P+y*M,t[10]=c*w+p*P+g*M,t[11]=l*w+d*P+m*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:dn,rotateY:vn,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:yn,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 en>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:gn,fromQuat2:function(t,e){var n=new nn(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)),gn(t,e,n),t},getTranslation:mn,getScaling:Tn,getRotation:Sn,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,p=i*l,d=o*c,v=o*l,y=a*l,g=s*u,m=s*c,T=s*l,S=r[0],b=r[1],E=r[2];return t[0]=(1-(d+y))*S,t[1]=(f+T)*S,t[2]=(p-m)*S,t[3]=0,t[4]=(f-T)*b,t[5]=(1-(h+y))*b,t[6]=(v+g)*b,t[7]=0,t[8]=(p+m)*E,t[9]=(v-g)*E,t[10]=(1-(h+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:bn,fromQuat:En,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:kn,perspective:kn,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:xn,ortho:wn,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:Pn,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],p=l*l+h*h+f*f;p>0&&(l*=p=1/Math.sqrt(p),h*=p,f*=p);var d=u*f-c*h,v=c*l-s*f,y=s*h-u*l;return(p=d*d+v*v+y*y)>0&&(d*=p=1/Math.sqrt(p),v*=p,y*=p),t[0]=d,t[1]=v,t[2]=y,t[3]=0,t[4]=h*y-f*v,t[5]=f*d-l*y,t[6]=l*v-h*d,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:Mn,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],p=t[11],d=t[12],v=t[13],y=t[14],g=t[15],m=e[0],T=e[1],S=e[2],b=e[3],E=e[4],k=e[5],x=e[6],w=e[7],P=e[8],M=e[9],C=e[10],N=e[11],_=e[12],A=e[13],O=e[14],I=e[15];return!(Math.abs(n-m)>en*Math.max(1,Math.abs(n),Math.abs(m))||Math.abs(r-T)>en*Math.max(1,Math.abs(r),Math.abs(T))||Math.abs(i-S)>en*Math.max(1,Math.abs(i),Math.abs(S))||Math.abs(o-b)>en*Math.max(1,Math.abs(o),Math.abs(b))||Math.abs(a-E)>en*Math.max(1,Math.abs(a),Math.abs(E))||Math.abs(s-k)>en*Math.max(1,Math.abs(s),Math.abs(k))||Math.abs(u-x)>en*Math.max(1,Math.abs(u),Math.abs(x))||Math.abs(c-w)>en*Math.max(1,Math.abs(c),Math.abs(w))||Math.abs(l-P)>en*Math.max(1,Math.abs(l),Math.abs(P))||Math.abs(h-M)>en*Math.max(1,Math.abs(h),Math.abs(M))||Math.abs(f-C)>en*Math.max(1,Math.abs(f),Math.abs(C))||Math.abs(p-N)>en*Math.max(1,Math.abs(p),Math.abs(N))||Math.abs(d-_)>en*Math.max(1,Math.abs(d),Math.abs(_))||Math.abs(v-A)>en*Math.max(1,Math.abs(v),Math.abs(A))||Math.abs(y-O)>en*Math.max(1,Math.abs(y),Math.abs(O))||Math.abs(g-I)>en*Math.max(1,Math.abs(g),Math.abs(I)))},mul:hn,sub:Mn});function Nn(){var t=new nn(3);return nn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function _n(t){var e=new nn(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function An(t){return Math.hypot(t[0],t[1],t[2])}function On(t,e,n){var r=new nn(3);return r[0]=t,r[1]=e,r[2]=n,r}function In(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Rn(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ln(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Dn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Un(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Fn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Bn(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}function Vn(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 Gn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jn(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 zn(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}function Hn(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 Wn(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)<=en*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=en*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=en*Math.max(1,Math.abs(i),Math.abs(s))}var Yn,qn=Dn,Xn=Un,Kn=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},Zn=An;Yn=Nn();function Jn(){var t=new nn(4);return nn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Qn(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=Jn()}();function $n(){var t=new nn(4);return nn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function tr(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 er(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 nr(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],p=n[0],d=n[1],v=n[2],y=n[3];return 0>(o=c*p+l*d+h*v+f*y)&&(o=-o,p=-p,d=-d,v=-v,y=-y),1-o>en?(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*p,t[1]=s*l+u*d,t[2]=s*h+u*v,t[3]=s*f+u*y,t}function rr(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 ir(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 or,ar,sr,ur,cr,lr,hr=function(t,e,n,r){var i=new nn(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},fr=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},pr=er,dr=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};or=Nn(),ar=On(1,0,0),sr=On(0,1,0),ur=$n(),cr=$n(),lr=rn();function vr(t,e){var n=new nn(2);return n[0]=t,n[1]=e,n}!function(){var t,e=(t=new nn(2),nn!=Float32Array&&(t[0]=0,t[1]=0),t)}();function yr(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function gr(t){return void 0===t?0:t>360||-360>t?t%360:t}function mr(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Be(t)?On(t,e,n):Array.isArray(t)&&3===t.length?_n(t):On(t[0],t[1]||e,t[2]||n)}function Tr(t){return t*(Math.PI/180)}function Sr(t){return t*(180/Math.PI)}function br(t){return 360*t}function Er(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,o=Tn(Nn(),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 kr(t,e,n,r,i){var o,a,s,u,c,l,h,f,p,d,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,p=1,(d=new nn(9))[0]=o,d[1]=a,d[2]=s,d[3]=u,d[4]=c,d[5]=l,d[6]=h,d[7]=f,d[8]=p,d}function xr(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);return 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,t}function wr(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=Sr(Math.atan2(n,e));return[t[6],t[7],o,a,s]}var Pr=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substring(1):t},Mr=function(t){return Math.pow(t,2)},Cr=function(t){return Math.pow(t,3)},Nr=function(t){return Math.pow(t,4)},_r=function(t){return Math.pow(t,5)},Ar=function(t){return Math.pow(t,6)},Or=function(t){return 1-Math.cos(t*Math.PI/2)},Ir=function(t){return 1-Math.sqrt(1-t*t)},Rr=function(t){return t*t*(3*t-2)},Lr=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)},Dr=function(t,e){void 0===e&&(e=[]);var n=e[0],r=e[1],i=void 0===r?.5:r,o=yr(Number(void 0===n?1:n),1,10),a=yr(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)},Ur=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=yr(i,.1,1e3),a=yr(a,.1,1e3),u=yr(u,.1,1e3),l=yr(l,.1,1e3);var h=Math.sqrt(a/i),f=u/(2*Math.sqrt(a*i)),p=1>f?h*Math.sqrt(1-f*f):0,d=1>f?(f*h-l)/p:-l+h,v=n?n*t/1e3:t;return v=1>f?Math.exp(-v*f*h)*(1*Math.cos(p*v)+d*Math.sin(p*v)):(1+d*v)*Math.exp(-v*h),0===t||1===t?t:1-v},Fr=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)(yr(t,0,1)*r)/r},Br=function(t,e){void 0===e&&(e=[]);return tn(e[0],e[1],e[2],e[3])(t)},Vr=tn(.42,0,1,1),Gr=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},jr=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}},zr=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}},Hr={steps:Fr,"step-start":function(t){return Fr(t,[1,"start"])},"step-end":function(t){return Fr(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Br,ease:function(t){return Br(t,[.25,.1,.25,1])},in:Vr,out:Gr(Vr),"in-out":jr(Vr),"out-in":zr(Vr),"in-quad":Mr,"out-quad":Gr(Mr),"in-out-quad":jr(Mr),"out-in-quad":zr(Mr),"in-cubic":Cr,"out-cubic":Gr(Cr),"in-out-cubic":jr(Cr),"out-in-cubic":zr(Cr),"in-quart":Nr,"out-quart":Gr(Nr),"in-out-quart":jr(Nr),"out-in-quart":zr(Nr),"in-quint":_r,"out-quint":Gr(_r),"in-out-quint":jr(_r),"out-in-quint":zr(_r),"in-expo":Ar,"out-expo":Gr(Ar),"in-out-expo":jr(Ar),"out-in-expo":zr(Ar),"in-sine":Or,"out-sine":Gr(Or),"in-out-sine":jr(Or),"out-in-sine":zr(Or),"in-circ":Ir,"out-circ":Gr(Ir),"in-out-circ":jr(Ir),"out-in-circ":zr(Ir),"in-back":Rr,"out-back":Gr(Rr),"in-out-back":jr(Rr),"out-in-back":zr(Rr),"in-bounce":Lr,"out-bounce":Gr(Lr),"in-out-bounce":jr(Lr),"out-in-bounce":zr(Lr),"in-elastic":Dr,"out-elastic":Gr(Dr),"in-out-elastic":jr(Dr),"out-in-elastic":zr(Dr),spring:Ur,"spring-in":Ur,"spring-out":Gr(Ur),"spring-in-out":jr(Ur),"spring-out-in":zr(Ur)},Wr=function(t){return Hr[function(t){return Pr(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Hr.linear},Yr=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},qr=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}))},Xr={keys:Object.keys,values:Object.values,entries:Object.entries};function Kr(t,e){if(Ye)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function Zr(t){var e=Kr(t,"width");return"auto"===e?t.offsetWidth:parseFloat(e)}function Jr(t){var e=Kr(t,"height");return"auto"===e?t.offsetHeight:parseFloat(e)}var Qr={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function $r(t){var e=t.type,n=t.value;return"hex"===e?"#"+n:"literal"===e?n:"rgb"===e?"rgb("+n.join(",")+")":"rgba("+n.join(",")+")"}var ti,ei=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=/^\(/,p=/^\)/,d=/^,/,v=/^\#([0-9a-fA-F]+)/,y=/^([a-zA-Z]+)/,g=/^rgb/i,m=/^rgba/i,T=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,S="";function b(t){throw new Error(S+": "+t)}function E(){var t=O(k);return S.length>0&&b("Invalid input not EOF"),t}function k(){return x("linear-gradient",t,P)||x("repeating-linear-gradient",e,P)||x("radial-gradient",n,M)||x("repeating-radial-gradient",r,M)||x("conic-gradient",i,M)}function x(t,e,n){return w(e,(function(e){var r=n();return r&&(F(d)||b("Missing comma before color stops")),{type:t,orientation:r,colorStops:O(I)}}))}function w(t,e){var n=F(t);if(n){F(f)||b("Missing (");var r=e(n);return F(p)||b("Missing )"),r}}function P(){return U("directional",o,1)||U("angular",h,1)}function M(){var t,e,n=C();return n&&((t=[]).push(n),e=S,F(d)&&((n=C())?t.push(n):S=e)),t}function C(){var t=function(){var t=U("shape",/^(circle)/i,0);t&&(t.style=D()||N());return t}()||function(){var t=U("shape",/^(ellipse)/i,0);t&&(t.style=L()||N());return t}();if(t)t.at=_();else{var e=N();if(e){t=e;var n=_();n&&(t.at=n)}else{var r=A();r&&(t={type:"default-radial",at:r})}}return t}function N(){return U("extent-keyword",a,1)}function _(){if(U("position",/^at/,0)){var t=A();return t||b("Missing positioning value"),t}}function A(){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);F(d);)(e=t())?n.push(e):b("One extra comma");return n}function I(){var t=U("hex",v,1)||w(m,(function(){return{type:"rgba",value:O(R)}}))||w(g,(function(){return{type:"rgb",value:O(R)}}))||U("literal",y,0);return t||b("Expected color definition"),t.length=L(),t}function R(){return F(T)[1]}function L(){return U("%",c,1)||U("position-keyword",s,1)||D()}function D(){return U("px",u,1)||U("em",l,1)}function U(t,e,n){var r=F(e);if(r)return{type:t,value:r[n]}}function F(t){var e=/^[\n\r\t\s]+/.exec(S);e&&B(e[0].length);var n=t.exec(S);return n&&B(n[0].length),n}function B(t){S=S.substring(t)}return function(t){return S=t,E()}}();(ti=t.PropertySyntax||(t.PropertySyntax={})).COORDINATE="<coordinate>",ti.COLOR="<color>",ti.PAINT="<paint>",ti.NUMBER="<number>",ti.ANGLE="<angle>",ti.OPACITY_VALUE="<opacity-value>",ti.SHADOW_BLUR="<shadow-blur>",ti.LENGTH="<length>",ti.PERCENTAGE="<percentage>",ti.LENGTH_PERCENTAGE="<length> | <percentage>",ti.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",ti.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",ti.LIST_OF_POINTS="<list-of-points>",ti.PATH="<path>",ti.FILTER="<filter>",ti.Z_INDEX="<z-index>",ti.OFFSET_PATH="<offset-path>",ti.OFFSET_DISTANCE="<offset-distance>",ti.CLIP_PATH="<clip-path>",ti.MARKER="<marker>",ti.TRANSFORM="<transform>",ti.TRANSFORM_ORIGIN="<transform-origin>",ti.TEXT="<text>",ti.TEXT_TRANSFORM="<text-transform>";var ni=t.Syringe.defineToken("StyleValueRegistry"),ri=function(t){return t};function ii(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var oi="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",ai=new RegExp("cubic-bezier\\("+oi+","+oi+","+oi+","+oi+"\\)"),si=/steps\(\s*(\d+)\s*\)/,ui=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function ci(t){var e=ai.exec(t);if(e)return tn.apply(void 0,e.slice(1).map(Number));var n=si.exec(t);if(n)return ii(Number(n[1]),0);var r=ui.exec(t);return r?ii(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Wr(t)}function li(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 hi(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 fi(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function n(){for(var r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];var a=e?e.apply(this,i):i[0],s=n.cache;if(s.has(a))return s.get(a);var u=t.apply(this,i);return n.cache=s.set(a,u)||s,u};return n.cache=new(fi.Cache||Map),n}fi.Cache=Map;var pi=fi((function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}));function di(t){return!Fe(t)&&"string"==typeof t}function vi(t,e,n){var r=function(t,e){for(var n={},r=0;t.length>r;r++)for(var i in t[r])if(yi(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:ci(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:mi(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)yi(n)&&(t.style[n]=null)}}function yi(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var gi=function(t,e,n){return function(r){return n(Ti(t,e,r))}};function mi(t,e,n,r){var i=e,o=n,a=Dt.get(ni),s=a.getMetadata(t);if(s&&s.syntax&&s.interpolable){var u=a.getPropertySyntax(s.syntax);if(u){u.parser&&(i=u.parser(e,r),o=u.parser(n,r));var c=u.mixer(i,o,r);if(c){var l=gi.apply(void 0,c);return function(t){return 0===t?e:1===t?n:l(t)}}}}return gi(!1,!0,(function(t){return t?n:e}))}function Ti(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(Ti(t[i],e[i],n));return r}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var Si,bi={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},Ei=fi((function(t){var e=pi(t),n=bi[e];return[e=(null==n?void 0:n.alias)||e,n]}));function ki(t,e){var n,r=Ei(t),i=r[1];return[r[0],di(e)&&(null==i||null===(n=i.values)||void 0===n?void 0:n[e])||e]}(Si=t.Shape||(t.Shape={})).GROUP="g",Si.CIRCLE="circle",Si.ELLIPSE="ellipse",Si.IMAGE="image",Si.RECT="rect",Si.LINE="line",Si.POLYLINE="polyline",Si.POLYGON="polygon",Si.TEXT="text",Si.PATH="path",Si.HTML="html",Si.MESH="mesh";var xi=t.Syringe.defineToken("CanvasConfig");function wi(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}function Pi(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}}function Mi(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};if("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 p=h.prePoint;if("C"===l){var d=[c[1],c[2]],v=[c[3],c[4]];h.startTangent=[p[0]-d[0],p[1]-d[1]],h.endTangent=[i[0]-v[0],i[1]-v[1]],0===h.startTangent[0]&&0===h.startTangent[1]&&(h.startTangent=[d[0]-v[0],d[1]-v[1]]),0===h.endTangent[0]&&0===h.endTangent[1]&&(h.endTangent=[v[0]-d[0],v[1]-d[1]])}r.push(h)}return r}function Ci(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 Ni=function(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)},_i=function(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)},Ai=function(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)},Oi=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=Ni,this.call=Ni,this._callAsync=_i,this.callAsync=_i,this._promise=Ai,this.promise=Ai,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=we(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}(),Ii=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=we(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,p=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,p=function(t){return t?"":o()},d=e.callTap(i,{onError:function(t){return n(i,t,a,p)},onResult:r&&function(t){return r(i,t,a,p)},onDone:!r&&a,rethrowIfPossible:s&&(0>u||u>i)});h=function(){return d}},d=this.options.taps.length-1;d>=0;d--)p(d);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}(),Ri=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),Li=new Ri,Di=function(t){return Li.setup(this,t),Li.create(t)},Ui=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=Di,r._call=void 0,r.call=void 0,r}return me(e,t),e}(Oi),Fi=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),Bi=new Fi,Vi=function(t){return Bi.setup(this,t),Bi.create(t)},Gi=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=Vi,r._call=void 0,r.call=void 0,r}return me(e,t),e}(Oi),ji=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),zi=new ji,Hi=function(){throw new Error("tapAsync is not supported on a SyncHook")},Wi=function(){throw new Error("tapPromise is not supported on a SyncHook")},Yi=function(t){return zi.setup(this,t),zi.create(t)},qi=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=Hi,r.tapPromise=Wi,r.compile=Yi,r}return me(e,t),e}(Oi),Xi=function(t){function e(){return t.apply(this,arguments)||this}return me(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}(Ii),Ki=new Xi,Zi=function(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")},Ji=function(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")},Qi=function(t){return Ki.setup(this,t),Ki.create(t)},$i=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=Zi,r.tapPromise=Ji,r.compile=Qi,r}return me(e,t),e}(qi),to=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function eo(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Be(e)?e+"px":e.toString(),s=di(n)?n.split(","):[n.value],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&0>to.indexOf(c)&&(c='"'+c+'"'),s[u]=c}return r+" "+i+" "+o+" "+a+" "+s.join(",")}var no=t.Syringe.defineToken("LayoutChildrenFactory"),ro=t.Syringe.defineToken("LayoutChildrenOptions");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 qr;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 qr;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:n}),n.promise},e}(),t.LayoutChildren=ue([ut(),ce(0,lt(t.LayoutContext)),ce(1,lt(ro)),le("design:paramtypes",[t.LayoutContext,Object])],t.LayoutChildren);var io=function(){};io.inputProperties=void 0,io.childrenInputProperties=void 0,io.layoutOptions=void 0;var oo,ao,so=t.Syringe.defineToken("LayoutEdgesFactory"),uo=t.Syringe.defineToken("LayoutEdgesOptions"),co=[0,0,0,0];t.LayoutEdges=function(e){var n,r,i,o,a,s,u,c,l,h,f,p,d,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(),T=null!==(n=null===(r=m.get(t.PropertyName.PADDING_TOP))||void 0===r?void 0:r.value)&&void 0!==n?n:0,S=null!==(i=null===(o=m.get(t.PropertyName.PADDING_END))||void 0===o?void 0:o.value)&&void 0!==i?i:0,b=null!==(a=null===(s=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===s?void 0:s.value)&&void 0!==a?a:0,E=null!==(u=null===(c=m.get(t.PropertyName.PADDING_START))||void 0===c?void 0:c.value)&&void 0!==u?u:0,k=null!==(l=null===(h=m.get(t.PropertyName.PADDING_TOP))||void 0===h?void 0:h.value)&&void 0!==l?l:0,x=null!==(f=null===(p=m.get(t.PropertyName.PADDING_END))||void 0===p?void 0:p.value)&&void 0!==f?f:0,w=null!==(d=null===(v=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===v?void 0:v.value)&&void 0!==d?d:0,P=null!==(y=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==y?y:0;this.blockStart=T+co[0]+k,this.inlineStart=S+co[1]+x,this.blockEnd=b+co[2]+w,this.inlineEnd=E+co[3]+P,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEdges=ue([ut(),ce(0,lt(uo)),le("design:paramtypes",[Object])],t.LayoutEdges),t.LayoutRegistry=((oo=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(ao.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)},ye(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],ao=oo),t.LayoutRegistry=ao=ue([ct()],t.LayoutRegistry);var lo=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=de(fe().mark((function t(e,n){return fe().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=de(fe().mark((function t(e){return fe().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=de(fe().mark((function t(e,n){var r;return fe().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=de(fe().mark((function e(n,r,i){var o,a,s,u,c,l,h,f,p,d,v;return fe().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),p=a.intrinsicSizes(l,h,f),(d=this.runWorkQueue(p,s.workQueue)).next(),e.next=13,lo();case 13:v=d.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=de(fe().mark((function t(e,n,r){var i;return fe().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=de(fe().mark((function e(n,r,i,o){var a,s,u,c,l,h,f,p,d,v,y,g,m;return fe().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}),p=r.getStyle.apply(r,l),d=s.layout(h,f,o,p),(v=this.runWorkQueue(d,u.workQueue)).next(),e.next=13,lo();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=fe().mark((function e(n,r){var i,o=this;return fe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Yr(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,p,d=e.getAllStyle();return{minContentInlineSize:(null===(n=d.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=d.get(t.PropertyName.WIDTH))||void 0===i?void 0:i.value)||0,maxContentInlineSize:(null===(o=d.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=d.get(t.PropertyName.WIDTH))||void 0===s?void 0:s.value)||0,minContentBlockSize:(null===(u=d.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=d.get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,maxContentBlockSize:(null===(h=d.get(t.PropertyName.MAX_HEIGHT))||void 0===h?void 0:h.value)||(null===(f=e.intrisicSizes)||void 0===f?void 0:f.maxContentBlockSize)||(null===(p=d.get(t.PropertyName.HEIGHT))||void 0===p?void 0:p.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=ue([ct(),ce(0,lt(t.LayoutRegistry)),ce(1,lt(Ce)),ce(2,lt(so)),le("design:paramtypes",[t.LayoutRegistry,Function,Function])],t.LayoutEngine);var ho=t.Syringe.defineToken("LayoutFragmentFactory"),fo=t.Syringe.defineToken("LayoutFragmentOptions");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=ue([ut(),ce(0,lt(t.LayoutContext)),ce(1,lt(fo)),le("design:paramtypes",[t.LayoutContext,Object])],t.LayoutFragment);var po,vo,yo,go,mo,To=n((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,p=l.length;for(c=0;p>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}));(po=t.UnitType||(t.UnitType={}))[po.kUnknown=0]="kUnknown",po[po.kNumber=1]="kNumber",po[po.kPercentage=2]="kPercentage",po[po.kEms=3]="kEms",po[po.kExs=4]="kExs",po[po.kPixels=5]="kPixels",po[po.kCentimeters=6]="kCentimeters",po[po.kMillimeters=7]="kMillimeters",po[po.kInches=8]="kInches",po[po.kPoints=9]="kPoints",po[po.kPicas=10]="kPicas",po[po.kQuarterMillimeters=11]="kQuarterMillimeters",po[po.kViewportWidth=12]="kViewportWidth",po[po.kViewportHeight=13]="kViewportHeight",po[po.kViewportInlineSize=14]="kViewportInlineSize",po[po.kViewportBlockSize=15]="kViewportBlockSize",po[po.kViewportMin=16]="kViewportMin",po[po.kViewportMax=17]="kViewportMax",po[po.kSmallViewportWidth=18]="kSmallViewportWidth",po[po.kSmallViewportHeight=19]="kSmallViewportHeight",po[po.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",po[po.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",po[po.kSmallViewportMin=22]="kSmallViewportMin",po[po.kSmallViewportMax=23]="kSmallViewportMax",po[po.kLargeViewportWidth=24]="kLargeViewportWidth",po[po.kLargeViewportHeight=25]="kLargeViewportHeight",po[po.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",po[po.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",po[po.kLargeViewportMin=28]="kLargeViewportMin",po[po.kLargeViewportMax=29]="kLargeViewportMax",po[po.kDynamicViewportWidth=30]="kDynamicViewportWidth",po[po.kDynamicViewportHeight=31]="kDynamicViewportHeight",po[po.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",po[po.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",po[po.kDynamicViewportMin=34]="kDynamicViewportMin",po[po.kDynamicViewportMax=35]="kDynamicViewportMax",po[po.kContainerWidth=36]="kContainerWidth",po[po.kContainerHeight=37]="kContainerHeight",po[po.kContainerInlineSize=38]="kContainerInlineSize",po[po.kContainerBlockSize=39]="kContainerBlockSize",po[po.kContainerMin=40]="kContainerMin",po[po.kContainerMax=41]="kContainerMax",po[po.kRems=42]="kRems",po[po.kChs=43]="kChs",po[po.kUserUnits=44]="kUserUnits",po[po.kDegrees=45]="kDegrees",po[po.kRadians=46]="kRadians",po[po.kGradians=47]="kGradians",po[po.kTurns=48]="kTurns",po[po.kMilliseconds=49]="kMilliseconds",po[po.kSeconds=50]="kSeconds",po[po.kHertz=51]="kHertz",po[po.kKilohertz=52]="kKilohertz",po[po.kDotsPerPixel=53]="kDotsPerPixel",po[po.kDotsPerInch=54]="kDotsPerInch",po[po.kDotsPerCentimeter=55]="kDotsPerCentimeter",po[po.kFraction=56]="kFraction",po[po.kInteger=57]="kInteger",po[po.kQuirkyEms=58]="kQuirkyEms",(vo=t.UnitCategory||(t.UnitCategory={}))[vo.kUNumber=0]="kUNumber",vo[vo.kUPercent=1]="kUPercent",vo[vo.kULength=2]="kULength",vo[vo.kUAngle=3]="kUAngle",vo[vo.kUTime=4]="kUTime",vo[vo.kUFrequency=5]="kUFrequency",vo[vo.kUResolution=6]="kUResolution",vo[vo.kUOther=7]="kUOther",(yo=t.ValueRange||(t.ValueRange={}))[yo.kAll=0]="kAll",yo[yo.kNonNegative=1]="kNonNegative",yo[yo.kInteger=2]="kInteger",yo[yo.kNonNegativeInteger=3]="kNonNegativeInteger",yo[yo.kPositiveInteger=4]="kPositiveInteger",(go=t.Nested||(t.Nested={}))[go.kYes=0]="kYes",go[go.kNo=1]="kNo",(mo=t.ParenLess||(t.ParenLess={}))[mo.kYes=0]="kYes",mo[mo.kNo=1]="kNo";var So,bo=[{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}];(So=t.CSSStyleValueType||(t.CSSStyleValueType={}))[So.kUnknownType=0]="kUnknownType",So[So.kUnparsedType=1]="kUnparsedType",So[So.kKeywordType=2]="kKeywordType",So[So.kUnitType=3]="kUnitType",So[So.kSumType=4]="kSumType",So[So.kProductType=5]="kProductType",So[So.kNegateType=6]="kNegateType",So[So.kInvertType=7]="kInvertType",So[So.kMinType=8]="kMinType",So[So.kMaxType=9]="kMaxType",So[So.kClampType=10]="kClampType",So[So.kTransformType=11]="kTransformType",So[So.kPositionType=12]="kPositionType",So[So.kURLImageType=13]="kURLImageType",So[So.kColorType=14]="kColorType",So[So.kUnsupportedColorType=15]="kUnsupportedColorType";var Eo,ko,xo=function(){function e(){}e.parse=function(t,e){return[][0]},e.parseAll=function(t,e){return[]},e.unitFromName=function(e){return e?"number"===e?t.UnitType.kNumber:"percent"===e||"%"===e?t.UnitType.kPercentage:this.stringToUnitType(e):t.UnitType.kUnknown},e.unitTypeToUnitCategory=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return t.UnitCategory.kUNumber;case t.UnitType.kPercentage:return t.UnitCategory.kUPercent;case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:return t.UnitCategory.kULength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.UnitCategory.kUTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.UnitCategory.kUAngle;case t.UnitType.kHertz:case t.UnitType.kKilohertz:return t.UnitCategory.kUFrequency;case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:return t.UnitCategory.kUResolution;default:return t.UnitCategory.kUOther}},e.unitTypeToString=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:case t.UnitType.kUserUnits:return"";case t.UnitType.kPercentage:return"%";case t.UnitType.kEms:case t.UnitType.kQuirkyEms: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""},e.stringToUnitType=function(t){return bo.find((function(e){return e.name===t})).unit_type},e.canonicalUnitTypeForCategory=function(e){switch(e){case t.UnitCategory.kUNumber:return t.UnitType.kNumber;case t.UnitCategory.kULength:return t.UnitType.kPixels;case t.UnitCategory.kUPercent:return t.UnitType.kPercentage;case t.UnitCategory.kUTime:return t.UnitType.kSeconds;case t.UnitCategory.kUAngle:return t.UnitType.kDegrees;case t.UnitCategory.kUFrequency:return t.UnitType.kHertz;case t.UnitCategory.kUResolution:return t.UnitType.kDotsPerPixel;default:return t.UnitType.kUnknown}},e.conversionToCanonicalUnitsScaleFactor=function(e){var n=1;switch(e){case t.UnitType.kPixels:case t.UnitType.kUserUnits:case t.UnitType.kDegrees:case t.UnitType.kSeconds:case t.UnitType.kHertz:break;case t.UnitType.kMilliseconds:n=.001;break;case t.UnitType.kCentimeters:case t.UnitType.kDotsPerCentimeter:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kDotsPerInch:case t.UnitType.kPoints:case t.UnitType.kPicas:break;case t.UnitType.kRadians:n=180/Math.PI;break;case t.UnitType.kGradians:n=.9;break;case t.UnitType.kTurns:n=360;break;case t.UnitType.kKilohertz:n=1e3}return n},e.isAngle=function(e){return e===t.UnitType.kDegrees||e===t.UnitType.kRadians||e===t.UnitType.kGradians||e===t.UnitType.kTurns},e.isViewportPercentageLength=function(e){return e>=t.UnitType.kViewportWidth&&t.UnitType.kDynamicViewportMax>=e},e.isContainerPercentageLength=function(e){return e>=t.UnitType.kContainerWidth&&t.UnitType.kContainerMax>=e},e.isLength=function(e){return e>=t.UnitType.kEms&&t.UnitType.kUserUnits>=e||e==t.UnitType.kQuirkyEms},e.isRelativeUnit=function(e){return e===t.UnitType.kPercentage||e===t.UnitType.kEms||e===t.UnitType.kExs||e===t.UnitType.kRems||e===t.UnitType.kChs||this.isViewportPercentageLength(e)||this.isContainerPercentageLength(e)},e.isTime=function(e){return e===t.UnitType.kSeconds||e===t.UnitType.kMilliseconds},e.isFrequency=function(e){return e==t.UnitType.kHertz||e==t.UnitType.kKilohertz},e.isResolution=function(e){return e>=t.UnitType.kDotsPerPixel&&t.UnitType.kDotsPerCentimeter>=e},e.isFlex=function(e){return e===t.UnitType.kFraction};var n=e.prototype;return n.toString=function(){return this.buildCSSText(t.Nested.kNo,t.ParenLess.kNo,"")},n.isNumericValue=function(){return this.getType()>=t.CSSStyleValueType.kUnitType&&this.getType()<=t.CSSStyleValueType.kClampType},e}(),wo=function(e){function n(t){var n;return(n=e.call(this)||this).colorSpace=void 0,n.colorSpace=t,n}me(n,e);var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.kColorType},r.to=function(t){return this},n}(xo),Po=function(e){function n(t){var n;return(n=e.call(this)||this).value=void 0,n.value=t,n}me(n,e);var r=n.prototype;return r.clone=function(){return new n(this.value)},r.getType=function(){return t.CSSStyleValueType.kKeywordType},r.buildCSSText=function(t,e,n){return n+this.value},n}(xo);function Mo(e){switch(De(e,t.UnitType.kNumber),e){case t.UnitType.kEms:case t.UnitType.kExs:case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:case t.UnitType.kViewportWidth:case t.UnitType.kViewportHeight:case t.UnitType.kViewportInlineSize:case t.UnitType.kViewportBlockSize:case t.UnitType.kViewportMin:case t.UnitType.kViewportMax:case t.UnitType.kSmallViewportWidth:case t.UnitType.kSmallViewportHeight:case t.UnitType.kSmallViewportInlineSize:case t.UnitType.kSmallViewportBlockSize:case t.UnitType.kSmallViewportMin:case t.UnitType.kSmallViewportMax:case t.UnitType.kLargeViewportWidth:case t.UnitType.kLargeViewportHeight:case t.UnitType.kLargeViewportInlineSize:case t.UnitType.kLargeViewportBlockSize:case t.UnitType.kLargeViewportMin:case t.UnitType.kLargeViewportMax:case t.UnitType.kDynamicViewportWidth:case t.UnitType.kDynamicViewportHeight:case t.UnitType.kDynamicViewportInlineSize:case t.UnitType.kDynamicViewportBlockSize:case t.UnitType.kDynamicViewportMin:case t.UnitType.kDynamicViewportMax:case t.UnitType.kContainerWidth:case t.UnitType.kContainerHeight:case t.UnitType.kContainerInlineSize:case t.UnitType.kContainerBlockSize:case t.UnitType.kContainerMin:case t.UnitType.kContainerMax:case t.UnitType.kRems:case t.UnitType.kChs:return t.BaseType.kLength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.BaseType.kTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.BaseType.kAngle;case t.UnitType.kHertz:case t.UnitType.kKilohertz:return t.BaseType.kFrequency;case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:return t.BaseType.kResolution;case t.UnitType.kFraction:return t.BaseType.kFlex;case t.UnitType.kPercentage:return t.BaseType.kPercent;default:return t.BaseType.kLength}}function Co(e){switch(e){case t.BaseType.kLength:return"length";case t.BaseType.kAngle:return"angle";case t.BaseType.kTime:return"time";case t.BaseType.kFrequency:return"frequency";case t.BaseType.kResolution:return"resolution";case t.BaseType.kFlex:return"flex";case t.BaseType.kPercent:return"percent"}return""}(Eo=t.CSSMathOperator||(t.CSSMathOperator={})).kAdd="+",Eo.kSubtract="-",Eo.kMultiply="*",Eo.kDivide="/",Eo.kMin="min",Eo.kMax="max",Eo.kClamp="clamp",Eo.kInvalid="",(ko=t.BaseType||(t.BaseType={}))[ko.kLength=0]="kLength",ko[ko.kAngle=1]="kAngle",ko[ko.kTime=2]="kTime",ko[ko.kFrequency=3]="kFrequency",ko[ko.kResolution=4]="kResolution",ko[ko.kFlex=5]="kFlex",ko[ko.kPercent=6]="kPercent",ko[ko.kNumBaseTypes=7]="kNumBaseTypes";var No=function(){function e(e,n){void 0===e&&(e=t.UnitType.kNumber),void 0===n&&(n=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=t.BaseType.kPercent,this.hasPercentHint=!1,this.exponents=new Array(t.BaseType.kNumBaseTypes).fill(0),e!==t.UnitType.kNumber&&this.setExponent(Mo(e),n)}var n=e.prototype;return n.applyPercentHint=function(e){De(e,t.BaseType.kPercent),this.setExponent(e,this.exponent(e)+this.exponent(t.BaseType.kPercent)),this.setExponent(t.BaseType.kPercent,0),this.percentHint=e,this.hasPercentHint=!0},n.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},n.isOnlyNonZeroEntry=function(t,e){return De(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(e){return De(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)&&!this.hasPercentHint},n.matchesPercentage=function(){return this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesBaseTypePercentage=function(e){return De(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},n.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},e.add=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint),Le(e.percentHint,n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;if(e.exponents[i]!==n.exponents[i]&&(o!==t.BaseType.kPercent&&(e.applyPercentHint(o),n.applyPercentHint(o)),e.exponents[i]!==n.exponents[i]))return e}return e},e.multiply=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;e.setExponent(o,e.exponent(o)+n.exponent(o))}return e},e}(),_o=function(e){function n(t){var n;return(n=e.call(this)||this).type_=void 0,n.type_=t,n}me(n,e),n.fromNumberish=function(e){return"number"==typeof e?new Do(e,t.UnitType.kNumber):e},n.fromPercentish=function(e){return"number"==typeof e?new Do(100*e,t.UnitType.kPercentage):e};var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.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=Ao(n);return i.every((function(e){return t.equals(e)}))},r.add=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kSumType,i,this);var o=Ro(i,t.CSSMathOperator.kAdd);return o||Wo.create(i)},r.sub=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);i=i.map((function(t){return t.negate()})),Oo(t.CSSStyleValueType.kSumType,i,this);var o=Ro(i,t.CSSMathOperator.kAdd);return o||Wo.create(i)},r.mul=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kProductType,i,this);var o=Lo(i);return o||Yo.create(i)},r.div=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);i=i.map((function(t){return t.invert()})),Oo(t.CSSStyleValueType.kProductType,i,this);var o=Lo(i);return o||Yo.create(i)},r.min=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kMinType,i,this);var o=Ro(i,t.CSSMathOperator.kMin);return o||zo.create(i)},r.max=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ao(n);Oo(t.CSSStyleValueType.kMaxType,i,this);var o=Ro(i,t.CSSMathOperator.kMax);return o||Ho.create(i)},r.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=Io(e[0]);return r?(n="string"==typeof t?Do.unitFromName(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(n.unitFromName(a)))return null}var s=this.sumValue();if(!s.length)return null;for(var u,c=[],l=we(s);!(u=l()).done;){var h=u.value,f=Io(h);if(!f)return null;c.push(f)}if(0===e.length){c.sort((function(t,e){return t.unit-e.unit}));var p=Wo.create(c);return Re(!!p),p}for(var d=[],v=function(){var t=n.unitFromName(g[y]);Re(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);d.push(new Do(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 Wo.create(d)},r.type=function(){var e={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},n=this.type_.exponent(t.BaseType.kLength);return n&&(e.length=n),(n=this.type_.exponent(t.BaseType.kAngle))&&(e.angle=n),(n=this.type_.exponent(t.BaseType.kTime))&&(e.time=n),(n=this.type_.exponent(t.BaseType.kFrequency))&&(e.frequency=n),(n=this.type_.exponent(t.BaseType.kResolution))&&(e.resolution=n),(n=this.type_.exponent(t.BaseType.kFlex))&&(e.flex=n),(n=this.type_.exponent(t.BaseType.kPercent))&&(e.percent=n),this.type_.hasPercentHint&&(e.percentHint=Co(this.type_.percentHint)),e},n.isValidUnit=function(e){return e!==t.UnitType.kUserUnits&&!!(e===t.UnitType.kNumber||e==t.UnitType.kPercentage||this.isLength(e)||this.isAngle(e)||this.isTime(e)||this.isFrequency(e)||this.isResolution(e)||this.isFlex(e))},r.negate=function(){return Bo.create(this)},r.invert=function(){return Fo.create(this)},n}(xo);function Ao(t){return t.map(_o.fromNumberish)}function Oo(t,e,n){Re(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Io(t){return 0===Object.keys(t.units).length?new Do(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Do(t.value,Number(Object.keys(t.units)[0])):null}function Ro(e,n){Re(!!e.length);var r=e[0]instanceof Do?e[0]:null;if(!r)return null;for(var i=r.value,o=1;e.length>o;o++){var a=e[o]instanceof Do?e[o]:null;if(!a||a.unit!==r.unit)return null;n===t.CSSMathOperator.kAdd?i+=a.value:n===t.CSSMathOperator.kMax?i=Math.max(i,a.value):n===t.CSSMathOperator.kMin&&(i=Math.min(i,a.value))}return new Do(i,r.unit)}function Lo(e){Re(!!e.length);for(var n=t.UnitType.kNumber,r=1,i=0;e.length>i;i++){var o=e[i]instanceof Do?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 Do(r,n)}var Do=function(e){function n(r,i){var o,a;return void 0===i&&(i=t.UnitType.kNumber),a="string"==typeof i?n.unitFromName(i):i,Re(n.isValidUnit(a)),(o=e.call(this,new No(a))||this).unit=void 0,o.value=void 0,o.unit=a,o.value=r,o}me(n,e),n.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},n.toCanonicalUnitIfPossible=function(e){var n=this.toCanonicalUnit(e);return n===t.UnitType.kUnknown?e:n},n.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Re(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},n.formatNumber=function(t,e){return void 0===e&&(e=""),t+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=n.toCanonicalUnit(this.unit);if(r!==n.toCanonicalUnit(e)||r===t.UnitType.kUnknown)return null;var i=xo.conversionToCanonicalUnitsScaleFactor(this.unit)/xo.conversionToCanonicalUnitsScaleFactor(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 t.CSSStyleValueType.kUnitType},r.sumValue=function(){var e=[],r={};return this.unit!==t.UnitType.kNumber&&(r[n.toCanonicalUnitIfPossible(this.unit)]=1),e.push({value:this.value*xo.conversionToCanonicalUnitsScaleFactor(this.unit),units:r}),e},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):Fo.create(this)},r.buildCSSText=function(e,r,i){var o;switch(this.unit){case t.UnitType.kUnknown:break;case t.UnitType.kInteger:o=Number(this.value).toFixed(0);break;case t.UnitType.kNumber:case t.UnitType.kPercentage:case t.UnitType.kEms:case t.UnitType.kQuirkyEms:case t.UnitType.kExs:case t.UnitType.kRems:case t.UnitType.kChs:case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:case t.UnitType.kHertz:case t.UnitType.kKilohertz:case t.UnitType.kTurns:case t.UnitType.kFraction:case t.UnitType.kViewportWidth:case t.UnitType.kViewportHeight:case t.UnitType.kViewportInlineSize:case t.UnitType.kViewportBlockSize:case t.UnitType.kViewportMin:case t.UnitType.kViewportMax:case t.UnitType.kSmallViewportWidth:case t.UnitType.kSmallViewportHeight:case t.UnitType.kSmallViewportInlineSize:case t.UnitType.kSmallViewportBlockSize:case t.UnitType.kSmallViewportMin:case t.UnitType.kSmallViewportMax:case t.UnitType.kLargeViewportWidth:case t.UnitType.kLargeViewportHeight:case t.UnitType.kLargeViewportInlineSize:case t.UnitType.kLargeViewportBlockSize:case t.UnitType.kLargeViewportMin:case t.UnitType.kLargeViewportMax:case t.UnitType.kDynamicViewportWidth:case t.UnitType.kDynamicViewportHeight:case t.UnitType.kDynamicViewportInlineSize:case t.UnitType.kDynamicViewportBlockSize:case t.UnitType.kDynamicViewportMin:case t.UnitType.kDynamicViewportMax:case t.UnitType.kContainerWidth:case t.UnitType.kContainerHeight:case t.UnitType.kContainerInlineSize:case t.UnitType.kContainerBlockSize:case t.UnitType.kContainerMin:case t.UnitType.kContainerMax:var a=this.value,s=n.unitTypeToString(this.unit);if(-999999>a||a>999999){var u=n.unitTypeToString(this.unit);o=!Number.isFinite(a)||Number.isNaN(a)?n.formatInfinityOrNaN(a,u):n.formatNumber(a,u)}else o=""+a+s}return i+=o},n}(_o),Uo=function(t){function e(){return t.apply(this,arguments)||this}return me(e,t),e.prototype.isUnitValue=function(){return!1},e}(_o),Fo=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="invert",r.value=t,r}me(n,e),n.create=function(t){return new n(t,No.negateExponents(t.type_))};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kInvertType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kInvertType&&this.value.equals(e.value)},r.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)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="1 / "),n===t.ParenLess.kNo&&(r+=")"),r},n}(Uo),Bo=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="negate",r.value=t,r}me(n,e),n.create=function(t){return new n(t,t.type_)};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kNegateType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kNegateType&&this.value.equals(e.value)},r.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="-"),n===t.ParenLess.kNo&&(r+=")"),r},n}(Uo);function Vo(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 Go,jo=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).values=void 0,r.values=e,r}me(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}(Uo),zo=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).operator="min",t}me(n,e),n.create=function(t){return new n(t,Vo(t,No.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMinType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=we(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},r.buildCSSText=function(e,n,r){r+="min(";for(var i,o=!0,a=we(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}(jo),Ho=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).operator="max",t}me(n,e),n.create=function(t){return new n(t,Vo(t,No.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMaxType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=we(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},r.buildCSSText=function(e,n,r){r+="max(";for(var i,o=!0,a=we(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}(jo),Wo=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).operator="sum",t}me(n,e),n.create=function(t){return new n(t,Vo(t,No.add))},n.numericTypeFromUnitMap=function(t){var e=new No;return Object.keys(t).forEach((function(n){var r=t[n];e=No.multiply(e,new No(Number(n),r),false),Re(!0)})),e},n.canCreateNumericTypeFromSumValue=function(t){var e=this;Re(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return No.add(n,e.numericTypeFromUnitMap(t.units),false),!0}))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kSumType},r.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(ge({},e)):t[n].value+=e.value}))})),n.canCreateNumericTypeFromSumValue(t)?t:null},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kNegateType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" - "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" + ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}(jo),Yo=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).operator="product",t}me(n,e),n.create=function(t){return new n(t,Vo(t,No.multiply))},n.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){De(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 r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kProductType},r.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(e){var r=e.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(e){i.push({value:t.value*e.value,units:n.multiplyUnitMaps(t.units,e.units)})}))})),t=i})),t},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kInvertType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" / "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" * ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}(jo),qo=new Do(0,"px"),Xo=new Do(0,"deg"),Ko=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}me(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}(wo);(Go=t.GradientType||(t.GradientType={}))[Go.Constant=0]="Constant",Go[Go.LinearGradient=1]="LinearGradient",Go[Go.RadialGradient=2]="RadialGradient";var Zo=function(e){function n(t,n){var r;return(r=e.call(this)||this).type=void 0,r.value=void 0,r.type=t,r.value=n,r}me(n,e);var r=n.prototype;return r.clone=function(){return new n(this.type,this.value)},r.buildCSSText=function(t,e,n){return n},r.getType=function(){return t.CSSStyleValueType.kColorType},n}(xo);function Jo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qo(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $o(){}var ta=.7,ea=1/ta,na="\\s*([+-]?\\d+)\\s*",ra="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ia="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oa=/^#([0-9a-f]{3,8})$/,aa=new RegExp("^rgb\\("+[na,na,na]+"\\)$"),sa=new RegExp("^rgb\\("+[ia,ia,ia]+"\\)$"),ua=new RegExp("^rgba\\("+[na,na,na,ra]+"\\)$"),ca=new RegExp("^rgba\\("+[ia,ia,ia,ra]+"\\)$"),la=new RegExp("^hsl\\("+[ra,ia,ia]+"\\)$"),ha=new RegExp("^hsla\\("+[ra,ia,ia,ra]+"\\)$"),fa={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 pa(){return this.rgb().formatHex()}function da(){return this.rgb().formatRgb()}function va(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=oa.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ya(e):3===n?new Ta(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ga(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ga(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=aa.exec(t))?new Ta(e[1],e[2],e[3],1):(e=sa.exec(t))?new Ta(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ua.exec(t))?ga(e[1],e[2],e[3],e[4]):(e=ca.exec(t))?ga(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=la.exec(t))?ka(e[1],e[2]/100,e[3]/100,1):(e=ha.exec(t))?ka(e[1],e[2]/100,e[3]/100,e[4]):fa.hasOwnProperty(t)?ya(fa[t]):"transparent"===t?new Ta(NaN,NaN,NaN,0):null}function ya(t){return new Ta(t>>16&255,t>>8&255,255&t,1)}function ga(t,e,n,r){return r>0||(t=e=n=NaN),new Ta(t,e,n,r)}function ma(t){return t instanceof $o||(t=va(t)),t?new Ta((t=t.rgb()).r,t.g,t.b,t.opacity):new Ta}function Ta(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Sa(){return"#"+Ea(this.r)+Ea(this.g)+Ea(this.b)}function ba(){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 Ea(t){return(16>(t=Math.max(0,Math.min(255,Math.round(t)||0)))?"0":"")+t.toString(16)}function ka(t,e,n,r){return r>0?n>0&&1>n?e>0||(t=NaN):t=e=NaN:t=e=n=NaN,new wa(t,e,n,r)}function xa(t){if(t instanceof wa)return new wa(t.h,t.s,t.l,t.opacity);if(t instanceof $o||(t=va(t)),!t)return new wa;if(t instanceof wa)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 wa(a,s,u,t.opacity)}function wa(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Pa(t,e,n){return 255*(60>t?e+(n-e)*t/60:180>t?n:240>t?e+(n-e)*(240-t)/60:e)}Jo($o,va,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:pa,formatHex:pa,formatHsl:function(){return xa(this).formatHsl()},formatRgb:da,toString:da}),Jo(Ta,(function(t,e,n,r){return 1===arguments.length?ma(t):new Ta(t,e,n,null==r?1:r)}),Qo($o,{brighter:function(t){return t=null==t?ea:Math.pow(ea,t),new Ta(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?ta:Math.pow(ta,t),new Ta(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:Sa,formatHex:Sa,formatRgb:ba,toString:ba})),Jo(wa,(function(t,e,n,r){return 1===arguments.length?xa(t):new wa(t,e,n,null==r?1:r)}),Qo($o,{brighter:function(t){return t=null==t?ea:Math.pow(ea,t),new wa(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?ta:Math.pow(ta,t),new wa(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 Ta(Pa(240>t?t+120:t-240,i,r),Pa(t,i,r),Pa(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 Ma=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Ca=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Na=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,_a=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Aa={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},Oa=fi((function(t){return"angular"===t.type?Number(t.value):Aa[t.value]||0})),Ia=fi((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}})),Ra=fi((function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return ei(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(!Fe(u)&&!Fe(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,$r(t)]}));if("linear-gradient"===r)return new Zo(t.GradientType.LinearGradient,{angle:i?Oa(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=Ia(i[0].at);return new Zo(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=Ma.exec(e);if(r){var i,o=(null===(i=r[2].match(_a))||void 0===i?void 0:i.map((function(t){return t.split(":")})))||[];return[new Zo(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=Ca.exec(t);if(e){var n;return{cx:.5,cy:.5,steps:((null===(n=e[4].match(_a))||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(!di(a))return[new Zo(t.GradientType.RadialGradient,a)];e=a}}else if("p"===n)return function(t){var e=Na.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 La(t){return je(t)&&!!t.image}var Da=fi((function(t){if(La(t))return ge({repetition:"repeat"},t);if(Fe(t)&&(t=""),"transparent"===t)return new Ko(0,0,0,0);"currentColor"===t&&(t="black");var e=Ra(t);if(e)return e;var n=va(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),be(Ko,r)}));function Ua(t,e){if(t instanceof Ko&&e instanceof Ko)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(yr(e[n],0,255));return e[3]=yr(e[3],0,1),"rgba("+e.join(",")+")"}]}var Fa,Ba=function(){function t(t,e){this.center=Nn(),this.halfExtents=Nn(),this.min=Nn(),this.max=Nn(),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&&In(this.center,t),e&&In(this.halfExtents,e||On(0,0,0)),this.min=qn(this.min,this.center,this.halfExtents),this.max=Ln(this.max,this.center,this.halfExtents)},e.setMinMax=function(t,e){Ln(this.center,e,t),Fn(this.center,this.center,.5),qn(this.halfExtents,e,t),Fn(this.halfExtents,this.halfExtents,.5),In(this.min,t),In(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,p=i+u,d=o-c,v=o+c,y=e.center,g=y[0],m=y[1],T=y[2],S=e.halfExtents,b=S[0],E=S[1],k=S[2],x=g-b,w=g+b,P=m-E,M=m+E,C=T-k,N=T+k;l>x&&(l=x),w>h&&(h=w),f>P&&(f=P),M>p&&(p=M),d>C&&(d=C),N>v&&(v=N),n[0]=.5*(l+h),n[1]=.5*(f+p),n[2]=.5*(d+v),a[0]=.5*(h-l),a[1]=.5*(p-f),a[2]=.5*(v-d),this.min[0]=l,this.min[1]=f,this.min[2]=d,this.max[0]=h,this.max[1]=p,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],p=e[6],d=e[10],v=Math.abs(a),y=Math.abs(s),g=Math.abs(u),m=Math.abs(c),T=Math.abs(l),S=Math.abs(h),b=Math.abs(f),E=Math.abs(p),k=Math.abs(d);Rn(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]+p*i[1]+d*i[2]),Rn(r,v*o[0]+y*o[1]+g*o[2],m*o[0]+T*o[1]+S*o[2],b*o[0]+E*o[1]+k*o[2]),this.min=qn(this.min,n,r),this.max=Ln(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=Nn(),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}(Nn(),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?In(Nn(),this.min):272===t.pnVertexFlag?On(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?On(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?On(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?On(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?On(this.max[0],this.min[1],this.max[2]):On(this.max[0],this.max[1],1===t.pnVertexFlag?this.min[2]:this.max[2])},e.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?In(Nn(),this.max):272===t.pnVertexFlag?On(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?On(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?On(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?On(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?On(this.min[0],this.max[1],this.min[2]):On(this.min[0],this.min[1],1===t.pnVertexFlag?this.max[2]:this.min[2])},t}(),Va=Nn(),Ga=function(){function t(t,e){this.center=void 0,this.radius=void 0,this.center=t||Nn(),this.radius=e||.5}var e=t.prototype;return e.containsPoint=function(t){return qn(Va,t,this.center),An(Va)<this.radius*this.radius},e.intersects=function(t){qn(Va,t.center,this.center);var e=t.radius+this.radius;return An(Va)<=e*e},t}(),ja=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||On(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 Gn(t,this.normal)-this.distance},e.normalize=function(){var t=1/Zn(this.normal);Fn(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&&zn(n,t,e,i),o},t}();(Fa=t.Mask||(t.Mask={}))[Fa.OUTSIDE=4294967295]="OUTSIDE",Fa[Fa.INSIDE=0]="INSIDE",Fa[Fa.INDETERMINATE=2147483647]="INDETERMINATE";var za=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;6>e;e++)this.planes.push(new ja)}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],p=t[12],d=t[13],v=t[14],y=t[15];Rn(this.planes[0].normal,i-e,u-o,f-c),this.planes[0].distance=y-p,Rn(this.planes[1].normal,i+e,u+o,f+c),this.planes[1].distance=y+p,Rn(this.planes[2].normal,i+n,u+a,f+l),this.planes[2].distance=y+d,Rn(this.planes[3].normal,i-n,u-a,f-l),this.planes[3].distance=y-d,Rn(this.planes[4].normal,i-r,u-s,f-h),this.planes[4].distance=y-v,Rn(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}(),Ha=Nn(),Wa=Nn(),Ya=Nn(),qa=Nn(),Xa=Nn(),Ka=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||Nn(),this.direction=e||On(0,0,-1)}var e=t.prototype;return e.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},e.intersectsSphere=function(t,e){var n=qn(Ha,this.origin,t.center);Vn(Wa,In(Wa,this.direction));var r=Gn(n,Wa),i=Gn(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(0>o)return!1;var a=Math.abs(-r-Math.sqrt(o));return e&&(In(e,this.direction),Bn(e,this.origin,e,a)),!0},e.intersectsPlane=function(t,e){var n=(t.distance-Gn(t.normal,this.origin))/Gn(t.normal,this.direction),r=n>=0;return r&&e&&Bn(e,this.origin,this.direction,n),r},e.intersectsAABBWithoutIntersection=function(t){var e=Ha,n=Wa,r=Ya,i=qa,o=Xa,a=this.direction;return qn(e,this.origin,t.center),Rn(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),Xn(r,e,a),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(Rn(o,Math.abs(a[0]),Math.abs(a[1]),Math.abs(a[2])),jn(n,a,e),Rn(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},e.intersectAABBWithIntersection=function(t,e){var n=In(Nn(),t.getMin());qn(n,n,this.origin);var r=In(Nn(),t.getMax());qn(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=0>n[0]?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=0>r[0]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=0>n[1]?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=0>r[1]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=0>n[2]?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=0>r[2]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=Rn(Ya,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),a=Rn(qa,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),s=Math.min(Math.min(a[0],a[1]),a[2]),u=Math.max(Math.max(o[0],o[1]),o[2]),c=s>=u&&u>=0;return c&&(In(e,this.direction),Bn(e,this.origin,e,u)),c},t}(),Za=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}(),Ja=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 Qa(t,e){if(Fe(e))return new Do(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return new Do(Number(e),"px");if("deg".search(t)>=0)return new Do(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 new Do(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}function $a(t){return Qa(new RegExp("px","g"),t)}function ts(t){return Be(t)?new Do(t,"px"):Qa(new RegExp("px|%|em|rem","g"),t)}function es(t){return Qa(new RegExp("deg|rad|grad|turn","g"),t)}function ns(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,u=Do.toCanonicalUnit(t.unit),c=t.convertTo(u),l=e.convertTo(u);return c&&l?(a=c.value,s=l.value,o=Do.unitTypeToString(t.unit)):(Do.isLength(t.unit)||Do.isLength(e.unit))&&(a=as(t,i,n),s=as(e,i,n),o="px"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function rs(e){var n=0;return e.unit===t.UnitType.kDegrees?n=e.value:e.unit===t.UnitType.kRadians?n=Sr(Number(e.value)):e.unit===t.UnitType.kTurns&&(n=br(Number(e.value))),n}function is(t){return di(t)?t.split(" ").map((function(t){return ts(t)})):t.map((function(t){return ts(t.toString())}))}function os(t,e,n){if(t.length===e.length){var r=t[0].unit;return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t.map((function(t){return new Do(t,r)})).join(" ")}]}}function as(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 Ba.isEmpty(i)||(o=2*i.halfExtents[n]),Number(e.value)/100*o}return 0}function ss(t){return t.toString()}function us(t){return"number"==typeof t?new Do(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new Do(Number(t)):new Do(0)}function cs(t,e){return[t.value,e.value,ss]}function ls(t,e){return function(n,r){return[n.value,r.value,function(n){return ss(yr(n,t,e))}]}}function hs(t){return t.map((function(t){return Array.isArray(t)?he([],t,!0):t}))}function fs(t,e){return void 0===e&&(e="off"),function(t,e){if("off"===e)return hs(t);var n="number"!=typeof e||1>e?1:Math.pow(10,e);return t.map((function(t){var r=t.slice(1).map(Number).map((function(t){return e?Math.round(t*n)/n:Math.round(t)}));return he([t[0]],r,!0)}))}(t,e).map((function(t){return t[0]+t.slice(1).join(" ")})).join("")}var ps={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function ds(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 vs={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ys(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return vs[e]===t.length-1&&"achlmqstvz".includes(e)}))}function gs(t){return ys(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function ms(t){return gs(t)&&t.every((function(t){return"ACLMQZ".includes(t[0])}))}function Ts(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=vs[n]&&("m"===n&&r.length>2?(t.segments.push(he([e],r.splice(0,2),!0)),n="l",e="m"===e?"l":"L"):t.segments.push(he([e],r.splice(0,vs[n]),!0)),vs[n]););}function Ss(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 bs(t){return t>=48&&57>=t||43===t||45===t||46===t}function Es(t){return t>=48&&57>=t}function ks(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)),Es(e)||46===e){if(46!==e){if(a=48===e,e=r.charCodeAt(o+=1),a&&n>o&&e&&Es(e))return void(t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number');for(;n>o&&Es(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(c=!0,o+=1;Es(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||!Es(r.charCodeAt(o)))return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent');for(;n>o&&Es(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 xs(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 ws(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=vs[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,xs(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?ks(t):Ss(t),t.err.length)return;t.data.push(t.param),xs(t),e>t.index&&44===n.charCodeAt(t.index)&&(t.index+=1,xs(t))}if(t.index>=t.max)break;if(!bs(n.charCodeAt(t.index)))break}Ts(t)}else Ts(t);else t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command'}var Ps=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 Ms(t){if(gs(t))return hs(t);var e=function(t){if(ys(t))return hs(t);var e=new Ps(t);for(xs(e);e.max>e.index&&!e.err.length;)ws(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:e=he([u],a.map((function(t,e){return t+(e%2?r:n)})),!0)}else e=he([u],a,!0);var c=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[c-2],r=e[c-1],"M"===u&&(i=n,o=r)}return e}))}function Cs(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=he(["C",c,l],s,!0)}else if("T"===n){var h=2*r-e.qx,f=2*i-e.qy;e.qx=h,e.qy=f,u=he(["Q",h,f],s,!0)}else if("Q"===n){var p=s[1];e.qx=s[0],e.qy=p}return u}function Ns(t){if(ms(t))return hs(t);for(var e=Ms(t),n=se({},ps),r=[],i=e.length,o=0;i>o;o+=1){r[o]=e[o][0],e[o]=Cs(e[o],n);var a=e[o],s=a.length;n.x1=+a[s-2],n.y1=+a[s-1],n.x2=+a[s-4]||n.x1,n.y2=+a[s-3]||n.y1}return e}function _s(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function As(t,e,n,r,i,o,a,s,u,c){var l,h,f,p,d,v=t,y=e,g=n,m=r,T=s,S=u,b=120*Math.PI/180,E=Math.PI/180*(+i||0),k=[];if(c)h=c[0],f=c[1],p=c[2],d=c[3];else{y=(l=_s(v,y,-E)).y;var x=((v=l.x)-(T=(l=_s(T,S,-E)).x))/2,w=(y-(S=l.y))/2,P=x*x/(g*g)+w*w/(m*m);P>1&&(g*=P=Math.sqrt(P),m*=P);var M=g*g,C=m*m,N=(o===a?-1:1)*Math.sqrt(Math.abs((M*C-M*w*w-C*x*x)/(M*w*w+C*x*x)));p=N*g*w/m+(v+T)/2,d=N*-m*x/g+(y+S)/2,h=Math.asin(((y-d)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),f=Math.asin(((S-d)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),h=p>v?Math.PI-h:h,f=p>T?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 _=f-h;if(Math.abs(_)>b){var A=f,O=T,I=S;f=h+b*(a&&f>h?1:-1),k=As(T=p+g*Math.cos(f),S=d+m*Math.sin(f),g,m,i,0,a,O,I,[f,A,p,d])}_=f-h;var R=Math.cos(h),L=Math.sin(h),D=Math.cos(f),U=Math.sin(f),F=Math.tan(_/4),B=4/3*g*F,V=4/3*m*F,G=[v,y],j=[v+B*L,y-V*R],z=[T+B*U,S-V*D],H=[T,S];if(j[0]=2*G[0]-j[0],j[1]=2*G[1]-j[1],c)return he(he(he(he([],j,!0),z,!0),H,!0),k,!0);for(var W=[],Y=0,q=(k=he(he(he(he([],j,!0),z,!0),H,!0),k,!0)).length;q>Y;Y+=1)W[Y]=Y%2?_s(k[Y-1],k[Y],E).y:_s(k[Y],k[Y+1],E).x;return W}function Os(t,e,n,r,i,o){var a=1/3,s=2/3;return[a*t+s*n,a*e+s*r,a*i+s*n,a*o+s*r,i,o]}function Is(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function Rs(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ls(t,e,n,r,i){var o=Rs([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(0<i)if(i<o){var s=Is([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 Ds(t,e,n,r){var i=.5,o=[t,e],a=[n,r],s=Is(o,a,i),u=Is(a,s,i),c=Is(s,u,i),l=Is(u,c,i),h=Is(c,l,i),f=he(he(he(he(he([],o,!0),s,!0),c,!0),h,!0),[i],!1),p=Ls.apply(void 0,f).point,d=he(he(he(he(he([],h,!0),l,!0),u,!0),a,!0),[0],!1),v=Ls.apply(void 0,d).point;return[p.x,p.y,v.x,v.y,n,r]}function Us(t,e){var n,r=t[0],i=t.slice(1).map(Number),o=i[0],a=i[1],s=e.x1,u=e.y1,c=e.x,l=e.y;switch("TQ".includes(r)||(e.qx=null,e.qy=null),r){case"M":return e.x=o,e.y=a,t;case"A":return n=he([s,u],i,!0),he(["C"],As.apply(void 0,n),!0);case"Q":return e.qx=o,e.qy=a,n=he([s,u],i,!0),he(["C"],Os.apply(void 0,n),!0);case"L":return he(["C"],Ds(s,u,o,a),!0);case"Z":return s===c&&u===l?["C",s,u,c,l,c,l]:he(["C"],Ds(s,u,c,l),!0)}return t}function Fs(t,e){if(void 0===e&&(e=!1),function(t){return ms(t)&&t.every((function(t){return"MC".includes(t[0])}))}(t)){var n=hs(t);return e?[n,[]]:n}for(var r,i,o=Ns(t),a=se({},ps),s=[],u="",c=o.length,l=[],h=0;c>h;h+=1){o[h]&&(u=o[h][0]),s[h]=u;var f=Us(o[h],a);o[h]=f,ds(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 Bs(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 Vs(t,e,n,r,i,o,a,s,u,c){var l=Math.abs,h=Math.sin,f=Math.cos,p=Math.sqrt,d=Math.PI,v=l(n),y=l(r),g=(i%360+360)%360*(d/180);if(t===s&&e===u)return{x:t,y:e};if(0===v||0===y)return Ls(t,e,s,u,c).point;var m=(t-s)/2,T=(e-u)/2,S={x:f(g)*m+h(g)*T,y:-h(g)*m+f(g)*T},b=Math.pow(S.x,2)/Math.pow(v,2)+Math.pow(S.y,2)/Math.pow(y,2);b>1&&(v*=p(b),y*=p(b));var E=(Math.pow(v,2)*Math.pow(y,2)-Math.pow(v,2)*Math.pow(S.y,2)-Math.pow(y,2)*Math.pow(S.x,2))/(Math.pow(v,2)*Math.pow(S.y,2)+Math.pow(y,2)*Math.pow(S.x,2)),k=(o!==a?1:-1)*p(E=0>E?0:E),x=k*(v*S.y/y),w=k*(-y*S.x/v),P=f(g)*x-h(g)*w+(t+s)/2,M=h(g)*x+f(g)*w+(e+u)/2,C={x:(S.x-x)/v,y:(S.y-w)/y},N=Bs({x:1,y:0},C),_=Bs(C,{x:(-S.x-x)/v,y:(-S.y-w)/y});!a&&_>0?_-=2*d:a&&0>_&&(_+=2*d);var A=N+(_%=2*d)*c,O=v*f(A),I=y*h(A);return{x:f(g)*O-h(g)*I+P,y:h(g)*O+f(g)*I+M}}function Gs(t,e,n,r,i,o,a,s,u,c){var l,h="number"==typeof c,f=t,p=e,d=0,v=[f,p,d],y=[f,p],g={x:0,y:0},m=[{x:f,y:p}];h&&0>=c&&(g={x:f,y:p});for(var T=0;100>=T;T+=1){if(l=Vs(t,e,n,r,i,o,a,s,u,T/100),m=m.concat({x:f=l.x,y:p=l.y}),d+=Rs(y,[f,p]),y=[f,p],h&&d>=c&&c>v[2]){var S=(d-c)/(d-v[2]);g={x:y[0]*(1-S)+v[0]*S,y:y[1]*(1-S)+v[1]*S}}v=[f,p,d]}return h&&c>=d&&(g={x:s,y:u}),{length:d,point:g,min:{x:Math.min.apply(Math,m.map((function(t){return t.x}))),y:Math.min.apply(Math,m.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,m.map((function(t){return t.x}))),y:Math.max.apply(Math,m.map((function(t){return t.y})))}}}function js(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 zs(t,e,n,r,i,o,a,s,u){var c,l="number"==typeof u,h=t,f=e,p=0,d=[h,f,p],v=[h,f],y={x:0,y:0},g=[{x:h,y:f}];l&&0>=u&&(y={x:h,y:f});for(var m=0;30>=m;m+=1){if(c=js(t,e,n,r,i,o,a,s,m/30),g=g.concat({x:h=c.x,y:f=c.y}),p+=Rs(v,[h,f]),v=[h,f],l&&p>=u&&u>d[2]){var T=(p-u)/(p-d[2]);y={x:v[0]*(1-T)+d[0]*T,y:v[1]*(1-T)+d[1]*T}}d=[h,f,p]}return l&&u>=p&&(y={x:a,y:s}),{length:p,point:y,min:{x:Math.min.apply(Math,g.map((function(t){return t.x}))),y:Math.min.apply(Math,g.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,g.map((function(t){return t.x}))),y:Math.max.apply(Math,g.map((function(t){return t.y})))}}}function Hs(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 Ws(t,e,n,r,i,o,a){var s,u="number"==typeof a,c=t,l=e,h=0,f=[c,l,h],p=[c,l],d={x:0,y:0},v=[{x:c,y:l}];u&&0>=a&&(d={x:c,y:l});for(var y=0;30>=y;y+=1){if(s=Hs(t,e,n,r,i,o,y/30),v=v.concat({x:c=s.x,y:l=s.y}),h+=Rs(p,[c,l]),p=[c,l],u&&h>=a&&a>f[2]){var g=(h-a)/(h-f[2]);d={x:p[0]*(1-g)+f[0]*g,y:p[1]*(1-g)+f[1]*g}}f=[c,l,h]}return u&&a>=h&&(d={x:i,y:o}),{length:h,point:d,min:{x:Math.min.apply(Math,v.map((function(t){return t.x}))),y:Math.min.apply(Math,v.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,v.map((function(t){return t.x}))),y:Math.max.apply(Math,v.map((function(t){return t.y})))}}}function Ys(t,e){for(var n,r,i,o,a,s,u,c,l,h=Ns(t),f="number"==typeof e,p=[],d=0,v=0,y=0,g=0,m=[],T=[],S=0,b={x:0,y:0},E=b,k=b,x=b,w=0,P=0,M=h.length;M>P;P+=1)p=(u="M"===(c=(l=h[P])[0]))?p:he([d,v],l.slice(1),!0),u?(E=b={x:y=l[1],y:g=l[2]},S=0,f&&.001>e&&(x=b)):"L"===c?(S=(n=Ls.apply(void 0,he(he([],p,!1),[(e||0)-w],!1))).length,b=n.min,E=n.max,k=n.point):"A"===c?(S=(r=Gs.apply(void 0,he(he([],p,!1),[(e||0)-w],!1))).length,b=r.min,E=r.max,k=r.point):"C"===c?(S=(i=zs.apply(void 0,he(he([],p,!1),[(e||0)-w],!1))).length,b=i.min,E=i.max,k=i.point):"Q"===c?(S=(o=Ws.apply(void 0,he(he([],p,!1),[(e||0)-w],!1))).length,b=o.min,E=o.max,k=o.point):"Z"===c&&(S=(a=Ls.apply(void 0,he(he([],p=[d,v,y,g],!1),[(e||0)-w],!1))).length,b=a.min,E=a.max,k=a.point),f&&e>w&&w+S>=e&&(x=k),T=he(he([],T,!0),[E],!1),m=he(he([],m,!0),[b],!1),w+=S,d=(s="Z"!==c?l.slice(-2):[y,g])[0],v=s[1];return f&&e>=w&&(x={x:d,y:v}),{length:w,point:x,min:{x:Math.min.apply(Math,m.map((function(t){return t.x}))),y:Math.min.apply(Math,m.map((function(t){return t.y})))},max:{x:Math.max.apply(Math,T.map((function(t){return t.x}))),y:Math.max.apply(Math,T.map((function(t){return t.y})))}}}function qs(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}function Xs(t){return function(t){var e=0,n=0,r=0;return Fs(t).map((function(t){var i;return"M"===t[0]?(e=t[1],n=t[2],0):(r=qs.apply(void 0,he([e,n],t.slice(1),!1)),i=t.slice(-2),e=i[0],n=i[1],r)})).reduce((function(t,e){return t+e}),0)}(t)>=0}function Ks(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?zs.apply(void 0,r).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=Is(n,r,e),s=Is(r,i,e),u=Is(i,o,e),c=Is(a,s,e),l=Is(s,u,e),h=Is(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function Zs(t,e,n){var r=Ks(t),i=Ks(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],p=[h-o,h-a],d=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 p[e]-=(d=n&&p[e]&&t.l>=f[e])?1:0,d?t.ss:[t.s]})).flat()}));return v[0].length===v[1].length?v:Zs(v[0],v[1],h)}var Js=fi((function(t){var e;try{if(Array.isArray(t)&&0===t.length)throw new Error;e=Ns(t)}catch(n){e=Ns(""),console.error("[g]: Invalid SVG Path definition: "+t)}var n=wi(e),r=Pi(e),i=r.polygons,o=r.polylines,a=Fs(e,!0),s=a[0],u=a[1],c=Mi(s),l=function(t){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var e=Ys(t),n=e.min,r=n.x,i=n.y,o=e.max,a=o.x,s=o.y,u=a-r,c=s-i;return{length:e.length,width:u,height:c,x:r,y:i,x2:a,y2:s,cx:r+u/2,cy:i+c/2,cz:Math.max(u,c)+Math.min(u,c)/2}}(e),h=l.x,f=l.y,p=l.width,d=l.height;return{absolutePath:e,hasArc:n,segments:c,polygons:i,polylines:o,curve:s,totalLength:l.length,zCommandIndexes:u,rect:new Ja(Number.isFinite(h)?h:0,Number.isFinite(f)?f:0,Number.isFinite(p)?p:0,Number.isFinite(d)?d:0)}}),(function(t){return di(t)?t:fs(t)}));function Qs(t,e){var n=Js(t);return e&&(e.parsedStyle.defX=n.rect.x,e.parsedStyle.defY=n.rect.y),n}function $s(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=Zs(r,i));var a,s,u,c,l,h,f,p,d=Xs(o[0])!==Xs(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))})))):hs(o[0]);return[d,(u=o[1],c=d,l=u.length-1,h=[],f=0,p=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),p.forEach((function(t,e){u.slice(1).forEach((function(t,n){f+=Rs(u[(e+n)%l].slice(-2),c[n%l].slice(-2))})),h[e]=f,f=0})),p[h.indexOf(Math.min.apply(null,h))]),function(t){return t}]}function tu(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function eu(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}}var nu={box:function(t,e,n,r){return eu([t,n],[e,r])},length:function(t,e,n,r){return tu(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?tu(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?tu(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 ru=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+=tu(r[0],r[1],i[0],i[1])}return e}(t)};function iu(t,e){var n;n=di(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=ru(n);n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=nu.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 ou=function(t){return Qa(/deg|rad|grad|turn|px|%/g,t)},au=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function su(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,au.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return ou(t)||Da(t)}))}),n.lastIndex===t.length)return r}return[]}var uu=function(){var t=new Float32Array(16);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};var cu=function(t){var e=new Float32Array(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};var lu=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],p=t[12],d=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*d)+(e*u-i*o)*(l*v-h*d)+(n*s-r*a)*(c*y-f*p)-(n*u-i*a)*(c*v-h*p)+(r*u-i*s)*(c*d-l*p)};var hu=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],p=e[11],d=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,S=n*c-o*a,b=r*u-i*s,E=r*c-o*s,k=i*c-o*u,x=l*v-h*d,w=l*y-f*d,P=l*g-p*d,M=h*y-f*v,C=h*g-p*v,N=f*g-p*y,_=m*N-T*C+S*M+b*P-E*w+k*x;if(!_)return null;return t[0]=(s*N-u*C+c*M)*(_=1/_),t[1]=(i*C-r*N-o*M)*_,t[2]=(v*k-y*E+g*b)*_,t[3]=(f*E-h*k-p*b)*_,t[4]=(u*P-a*N-c*w)*_,t[5]=(n*N-i*P+o*w)*_,t[6]=(y*S-d*k-g*T)*_,t[7]=(l*k-f*S+p*T)*_,t[8]=(a*C-s*P+c*x)*_,t[9]=(r*P-n*C-o*x)*_,t[10]=(d*E-v*S+g*m)*_,t[11]=(h*S-l*E-p*m)*_,t[12]=(s*w-a*M-u*x)*_,t[13]=(n*M-r*w+i*x)*_,t[14]=(v*T-d*b-y*m)*_,t[15]=(l*b-h*T+f*m)*_,t};var fu=function(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};var pu=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t};var du={length:function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)},normalize:pu,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},cross:function(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}},vu=uu(),yu=uu(),gu=[0,0,0,0],mu=[[0,0,0],[0,0,0],[0,0,0]],Tu=[0,0,0];function Su(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}var bu={number:function(t){return new Do(t)},percent:function(t){return new Do(t,"%")},px:function(t){return new Do(t,"px")},em:function(t){return new Do(t,"em")},rem:function(t){return new Do(t,"rem")},deg:function(t){return new Do(t,"deg")},grad:function(t){return new Do(t,"grad")},rad:function(t){return new Do(t,"rad")},turn:function(t){return new Do(t,"turn")},s:function(t){return new Do(t,"s")},ms:function(t){return new Do(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;Dt.get(ni).registerMetadata({name:e,inherited:n,interpolable:r,defaultValue:i,syntax:o})},registerLayout:function(e,n){Dt.get(t.LayoutRegistry).registerLayout(e,n)}},Eu=null;function ku(t){return function(e){var n=0;return t.map((function(t){return t===Eu?e[n++]:t}))}}function xu(t){return t}var wu={matrix:["NNNNNN",[Eu,Eu,0,0,Eu,Eu,0,0,0,0,1,0,Eu,Eu,0,1],xu],matrix3d:["NNNNNNNNNNNNNNNN",xu],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ku([Eu,Eu,bu.number(1)]),xu],scalex:["N",ku([Eu,bu.number(1),bu.number(1)]),ku([Eu,bu.number(1)])],scaley:["N",ku([bu.number(1),Eu,bu.number(1)]),ku([bu.number(1),Eu])],scalez:["N",ku([bu.number(1),bu.number(1),Eu])],scale3d:["NNN",xu],skew:["Aa",null,xu],skewx:["A",null,ku([Eu,Xo])],skewy:["A",null,ku([Xo,Eu])],translate:["Tt",ku([Eu,Eu,qo]),xu],translatex:["T",ku([Eu,qo,qo]),ku([Eu,qo])],translatey:["T",ku([qo,Eu,qo]),ku([qo,Eu])],translatez:["L",ku([qo,qo,Eu])],translate3d:["TTL",xu]};function Pu(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=wu[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],p=void 0;if(void 0===(p=h?{A:function(t){return"0"===t.trim()?Xo:es(t)},N:us,T:ts,L:$a}[f.toUpperCase()](h):{a:Xo,n:c[0],t:qo}[f]))return[];c.push(p)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function Mu(t){var e,n,r,i;switch(t.t){case"rotatex":return i=Tr(rs(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=Tr(rs(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=Tr(rs(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=Tr(rs(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=Tr(rs(t.d[0])),h=Tr(rs(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=Tr(rs(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=Tr(rs(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=as(t.d[0],0,null)||0,n=as(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=as(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=as(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=as(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=as(t.d[0],0,null)||0,n=as(t.d[1],0,null)||0,r=as(t.d[2],0,null)||0,1];case"perspective":var f=as(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 Cu(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 Nu(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(e||(e=[0,0,0]),n||(n=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0,1]),o||(o=[0,0,0,1]),!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}(vu,t))return!1;if(cu(yu),yu[3]=0,yu[7]=0,yu[11]=0,yu[15]=1,Math.abs(1e-8>lu(yu)))return!1;var a,s,u,c,l,h,f,p=vu[3],d=vu[7],v=vu[11],y=vu[12],g=vu[13],m=vu[14],T=vu[15];if(0!==p||0!==d||0!==v){if(gu[0]=p,gu[1]=d,gu[2]=v,gu[3]=T,!hu(yu,yu))return!1;fu(yu,yu),(a=i)[0]=(u=yu)[0]*(c=(s=gu)[0])+u[4]*(l=s[1])+u[8]*(h=s[2])+u[12]*(f=s[3]),a[1]=u[1]*c+u[5]*l+u[9]*h+u[13]*f,a[2]=u[2]*c+u[6]*l+u[10]*h+u[14]*f,a[3]=u[3]*c+u[7]*l+u[11]*h+u[15]*f}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=y,e[1]=g,e[2]=m,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(mu,vu),n[0]=du.length(mu[0]),du.normalize(mu[0],mu[0]),r[0]=du.dot(mu[0],mu[1]),Su(mu[1],mu[1],mu[0],1,-r[0]),n[1]=du.length(mu[1]),du.normalize(mu[1],mu[1]),r[0]/=n[1],r[1]=du.dot(mu[0],mu[2]),Su(mu[2],mu[2],mu[0],1,-r[1]),r[2]=du.dot(mu[1],mu[2]),Su(mu[2],mu[2],mu[1],1,-r[2]),n[2]=du.length(mu[2]),du.normalize(mu[2],mu[2]),r[1]/=n[2],r[2]/=n[2],du.cross(Tu,mu[1],mu[2]),0>du.dot(mu[0],Tu))for(var S=0;3>S;S++)n[S]*=-1,mu[S][0]*=-1,mu[S][1]*=-1,mu[S][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+mu[0][0]-mu[1][1]-mu[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-mu[0][0]+mu[1][1]-mu[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-mu[0][0]-mu[1][1]+mu[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+mu[0][0]+mu[1][1]+mu[2][2],0)),mu[2][1]>mu[1][2]&&(o[0]=-o[0]),mu[0][2]>mu[2][0]&&(o[1]=-o[1]),mu[1][0]>mu[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(Mu).reduce(Cu)}(t),e,n,r,i,o),[[e,n,r,o,i]]}var _u=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],p=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(h*h+f*f),d[0][1]=2*(l*h-f*p),d[0][2]=2*(l*f+h*p),d[1][0]=2*(l*h+f*p),d[1][1]=1-2*(l*l+f*f),d[1][2]=2*(h*f-l*p),d[2][0]=2*(l*f-h*p),d[2][1]=2*(h*f+l*p),d[2][2]=1-2*(l*l+h*h),a=t(a,d);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 Au(t){return t.toFixed(6).replace(".000000","")}function Ou(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=Nu(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=Nu(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=yr(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 _u(t[0],t[1],t[2],e,t[4]).map(Au).join(",")}])}function Iu(t){return t.replace(/[xy]/,"")}function Ru(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function Lu(e,n,r){var i=!1;if(!e.length||!n.length){e.length||(i=!0,e=n,n=[]);for(var o=function(t){var r=e[t],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;n.push({t:i,d:o.map((function(t){return"number"==typeof t?new Do(a):new Do(a,t.unit)}))})},a=0;e.length>a;a++)o(a)}var s,u,c=[],l=[],h=[];if(e.length!==n.length){var f=Ou(e,n);c=[f[0]],l=[f[1]],h=[["matrix",[f[2]]]]}else for(var p=0;e.length>p;p++){var d=e[p].t,v=n[p].t,y=e[p].d,g=n[p].d,m=wu[d],T=wu[v],S=void 0;if(u=v,"perspective"===(s=d)&&"perspective"===u||!("matrix"!==s&&"matrix3d"!==s||"matrix"!==u&&"matrix3d"!==u)){var b=Ou([e[p]],[n[p]]);c.push(b[0]),l.push(b[1]),h.push(["matrix",[b[2]]])}else{if(d===v)S=d;else if(m[2]&&T[2]&&Iu(d)===Iu(v))S=Iu(d),y=m[2](y),g=T[2](g);else{if(!m[1]||!T[1]||Ru(d)!==Ru(v)){var E=Ou(e,n);c=[E[0]],l=[E[1]],h=[["matrix",[E[2]]]];break}S=Ru(d),y=m[1](y),g=T[1](g)}for(var k=[],x=[],w=[],P=0;y.length>P;P++){var M=(y[P].unit===t.UnitType.kNumber?cs:ns)(y[P],g[P],r,!1,P);k[P]=M[0],x[P]=M[1],w.push(M[2])}c.push(k),l.push(x),h.push([S,w])}}if(i){var C=c;c=l,l=C}return[c,l,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return h[e][1][n](t)})).join(",");return"matrix"===h[e][0]&&16===n.split(",").length&&(h[e][0]="matrix3d"),"matrix3d"===h[e][0]&&6===n.split(",").length&&(h[e][0]="matrix"),h[e][0]+"("+n+")"})).join(" ")}]}function Du(t){if(di(t)){if("text-anchor"===t)return[new Do(0,"px"),new Do(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:[ts(Uu(e[0])),ts(Uu(e[1]))]}return[new Do(t[0]||0,"px"),new Do(t[1]||0,"px")]}function Uu(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var Fu,Bu=t.Syringe.defineToken("CSSPropertySyntaxFactory"),Vu=t.Syringe.defineToken("CSSProperty");t.CSSPropertyAngle=function(){function t(){this.parser=es,this.mixer=ns}return t.prototype.calculator=function(t,e,n,r){return new Do(rs(n),"deg")},t}(),t.CSSPropertyAngle=ue([ct({token:{token:Vu,named:t.PropertySyntax.ANGLE}})],t.CSSPropertyAngle),(Fu=t.ElementEvent||(t.ElementEvent={})).DESTROY="destroy",Fu.ATTR_MODIFIED="DOMAttrModified",Fu.INSERTED="DOMNodeInserted",Fu.CHILD_INSERTED="child-inserted",Fu.REMOVED="removed",Fu.CHILD_REMOVED="child-removed",Fu.MOUNTED="DOMNodeInsertedIntoDocument",Fu.UNMOUNTED="DOMNodeRemovedFromDocument",Fu.BOUNDS_CHANGED="bounds-changed",Fu.RENDER_ORDER_CHANGED="render-order-changed",Fu.CULLED="culled";var Gu,ju=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 Za,this.page=new Za,this.canvas=new Za,this.viewport=new Za,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(){},ye(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}(),zu=function(t){function e(e,n){var r;return(r=t.call(this,null)||this).type=e,r.detail=n,Object.assign(ke(r),n),r}return me(e,t),e}(ju),Hu=function(){function t(){this.emitter=new To.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=Ge(n)&&n||je(n)&&n.capture,i=je(n)&&n.once,o=Ve(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=Ve(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=Ge(n)&&n||je(n)&&n.capture,o=Ve(e)?void 0:e;return t=i?t+"capture":t,e=Ve(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 zu(t,e))},e.dispatchEvent=function(t){if(!(t instanceof ju))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e,n;if(this.document)e=this;else if(this.defaultView)e=this.defaultView;else{var r;e=null===(r=this.ownerDocument)||void 0===r?void 0:r.defaultView}e&&(t.manager=e.getEventService()||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t));return!t.defaultPrevented},t}(),Wu=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}me(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("Method not implemented.")},r.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},r.lookupPrefix=function(t){throw new Error("Method not implemented.")},r.normalize=function(){throw new Error("Method not implemented.")},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 p=h.parentNode.childNodes;return p.indexOf(h)<p.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)}))},ye(n,[{key:"textContent",get:function(){var e="";this.nodeName===t.Shape.TEXT&&(e+=this.style.text);for(var n,r=we(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,!0)})),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}(Hu);Wu.DOCUMENT_POSITION_DISCONNECTED=1,Wu.DOCUMENT_POSITION_PRECEDING=2,Wu.DOCUMENT_POSITION_FOLLOWING=4,Wu.DOCUMENT_POSITION_CONTAINS=8,Wu.DOCUMENT_POSITION_CONTAINED_BY=16,Wu.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,(Gu=t.Strategy||(t.Strategy={}))[Gu.Standard=0]="Standard";var Yu=function(){function e(){this.strategy=t.Strategy.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return e.prototype.isCulled=function(){return this.enable&&!this.visible},e}();Yu.tag="c-cullable";var qu=function(){this.contentBounds=void 0,this.renderBounds=void 0};qu.tag="c-geometry";var Xu=function(){this.aabb=void 0};Xu.tag="c-rbush-node";var Ku=t.Syringe.defineToken("RBushRoot"),Zu=function(){this.bounds=void 0,this.boundsDirty=!0,this.renderBounds=void 0,this.renderBoundsDirty=!0,this.dirtyRenderBounds=void 0,this.dirty=!1};Zu.tag="c-renderable";var Ju=function(){this.dirty=!1,this.sorted=void 0,this.lastSortedIndex=void 0,this.renderOrder=0};Ju.tag="c-sortable";var Qu=function(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=On(0,0,0),this.localRotation=hr(0,0,0,1),this.localScale=On(1,1,1),this.localTransform=on(),this.localSkew=vr(0,0),this.position=On(0,0,0),this.rotation=hr(0,0,0,1),this.scaling=On(1,1,1),this.worldTransform=on(),this.origin=On(0,0,0)};Qu.tag="c-transform";var $u=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 me(e,t),e}(ju);$u.ADDITION=2,$u.MODIFICATION=1,$u.REMOVAL=3;var tc=0,ec=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).sceneGraphService=Dt.get(ul),t.entity=tc++,t.renderable=new Zu,t.cullable=new Yu,t.transformable=new Qu,t.sortable=new Ju,t.geometry=new qu,t.rBushNode=new Xu,t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={},t.parsedStyle={},t.attributes={},t}me(n,e),n.isElement=function(t){return!!t.getAttribute};var r=n.prototype;return r.cloneNode=function(t){throw new Error("Method not implemented.")},r.appendChild=function(e,n){return this.sceneGraphService.attach(e,this,n),this.dispatchEvent(new zu(t.ElementEvent.CHILD_INSERTED,{child:e})),e.dispatchEvent(new $u(t.ElementEvent.INSERTED,this,"","","",0,"","")),e},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,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},r.removeChild=function(e,n){return void 0===n&&(n=!0),e.dispatchEvent(new $u(t.ElementEvent.REMOVED,this,"","","",0,"","")),n&&(e.dispatchEvent(new zu(t.ElementEvent.DESTROY)),e.destroyed=!0),this.dispatchEvent(new zu(t.ElementEvent.CHILD_REMOVED,{child:e})),this.sceneGraphService.detach(e),n&&e.emitter.removeAllListeners(),e},r.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},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(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},r.destroy=function(){this.dispatchEvent(new zu(t.ElementEvent.DESTROY)),this.remove(!1),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=ki(t.toString(),"");e=this.attributes[n[0]]}return Fe(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("Method not implemented.")},r.getAttributeNode=function(t){throw new Error("Method not implemented.")},r.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},r.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},r.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},r.removeAttributeNode=function(t){throw new Error("Method not implemented.")},r.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},r.setAttributeNode=function(t){throw new Error("Method not implemented.")},r.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},r.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},ye(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}(Wu);t.DisplayObjectPool=function(){function e(){this.pool={},this.htmlPool=[]}var n=e.prototype;return n.getByEntity=function(t){return this.pool[t]},n.add=function(e,n){this.pool[e]=n,n.nodeName===t.Shape.HTML&&this.htmlPool.push(n)},n.remove=function(e){var n=this.pool[e];if(delete this.pool[e],n.nodeName===t.Shape.HTML){var r=this.htmlPool.indexOf(n);this.htmlPool.splice(r,1)}},n.getHTMLs=function(){return this.htmlPool},e}(),t.DisplayObjectPool=ue([ct()],t.DisplayObjectPool);var nc={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:""},rc=function(e){function n(n){var r,i;return(i=e.call(this)||this).config=void 0,i.styleValueRegistry=Dt.get(ni),i.isCustomElement=!1,i.activeAnimations=[],i.mutationEvent=new $u(t.ElementEvent.ATTR_MODIFIED,ke(i),null,null,null,$u.MODIFICATION,null,null),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=ge({},nc,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"),i.style=new Proxy(ge({},i.attributes,{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.initAttributes(i.config.style),Dt.get(t.DisplayObjectPool).add(i.entity,ke(i)),i}me(n,e);var r=n.prototype;return r.destroy=function(){e.prototype.destroy.call(this),Dt.get(t.DisplayObjectPool).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},r.cloneNode=function(t,e){var r=ge({},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),e.dirty=!0},r.setAttribute=function(t,n,r){void 0===r&&(r=!1);var i=ki(t,n),o=i[0],a=i[1];Ue(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 $u(t.ElementEvent.ATTR_MODIFIED,e,o,o,"clipPath",$u.MODIFICATION,o,o)),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback("clipPath",o,o)})),a.dirty=!0;var c=this.parsedStyle[e];this.isConnected&&(this.mutationEvent.prevValue=s,this.mutationEvent.newValue=n,this.mutationEvent.attrName=e,this.mutationEvent.prevParsedValue=u,this.mutationEvent.newParsedValue=c,this.dispatchEvent(this.mutationEvent)),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 Ja(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,mr(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,mr(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,mr(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,mr(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,mr(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=mr(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},r.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=mr(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=Er(Nn(),this.sceneGraphService.getWorldTransform(this));return Sr(t[2])},r.getLocalEulerAngles=function(){var t=Er(Nn(),this.sceneGraphService.getLocalRotation(this));return Sr(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 Fe(e)&&Fe(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},r.rotate=function(t,e,n){return Fe(e)&&Fe(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 delete this.parsedStyle.transform,i?i.play(new nl(this,t,e)):null},r.show=function(){this.style.visibility="visible"},r.hide=function(){this.style.visibility="hidden"},r.isVisible=function(){var t,e;return"visible"===(null===(t=this.parsedStyle)||void 0===t||null===(e=t.visibility)||void 0===e?void 0:e.value)},r.isInteractive=function(){var t,e;return"none"!==(null===(t=this.parsedStyle)||void 0===t||null===(e=t.pointerEvents)||void 0===e?void 0:e.value)},r.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},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.getCount=function(){return this.childElementCount},r.getParent=function(){return this.parentElement},r.getChildren=function(){return this.children},r.getFirst=function(){return this.firstElementChild},r.getLast=function(){return this.lastElementChild},r.getChildByIndex=function(t){return this.children[t]||null},r.add=function(t,e){return this.appendChild(t,e)},r.setClip=function(t){this.style.clipPath=t},r.getClip=function(){return this.style.clipPath||null},r.set=function(t,e){this.config[t]=e},r.get=function(t){return this.config[t]},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?je(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.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.setZIndex=function(t){return this.style.zIndex=t,this},r.getMatrix=function(t){var e=t||this.getWorldTransform(),n=mn(Nn(),e),r=n[0],i=n[1],o=Tn(Nn(),e),a=o[0],s=o[1],u=Sn($n(),e),c=Er(Nn(),u);return kr(c[0]||c[2],r,i,a,s)},r.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},r.setMatrix=function(t){var e=wr(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=wr(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setLocalEulerAngles(e[4]).setLocalPosition(n,r).setLocalScale(i,o)},ye(n,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),n}(ec),ic=["style"],oc=function(t){function e(e){var n,r=void 0===e?{}:e,i=r.style,o=Ee(r,ic);return(n=t.call(this,ge({style:ge({x:"",y:""},i)},o))||this).isCustomElement=!0,n}return me(e,t),e}(rc),ac=["style"],sc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,ac);return e.call(this,ge({type:t.Shape.CIRCLE,style:ge({cx:"",cy:"",r:""},i)},o))||this}return me(n,e),n}(rc),uc=["style"],cc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,uc);return e.call(this,ge({type:t.Shape.ELLIPSE,style:ge({cx:"",cy:"",rx:"",ry:""},i)},o))||this}return me(n,e),n}(rc),lc=["style"],hc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,lc);return e.call(this,ge({type:t.Shape.GROUP,style:ge({x:"",y:"",width:"",height:""},i)},o))||this}return me(n,e),n}(rc),fc=["style"],pc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,fc);return e.call(this,ge({type:t.Shape.IMAGE,style:ge({x:"",y:"",img:"",width:"",height:""},i)},o))||this}return me(n,e),n}(rc),dc=["style"],vc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=Ee(i,dc);(r=e.call(this,ge({type:t.Shape.LINE,style:ge({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 rc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),c&&c instanceof rc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}me(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 rc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof rc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof rc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof rc&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},r.transformMarker=function(t){var e=this.parsedStyle,n=e.markerStartOffset,r=e.markerEndOffset,i=e.x1,o=e.x2,a=e.y1,s=e.y2,u=e.defX,c=e.defY,l=t?e.markerStart:e.markerEnd;if(l&&l instanceof rc){var h,f,p,d,v,y,g;t?(d=i.value-u,v=a.value-c,f=o.value-i.value,p=s.value-a.value,y=(null==n?void 0:n.value)||0,g=this.markerStartAngle):(d=o.value-u,v=s.value-c,f=i.value-o.value,p=a.value-s.value,y=(null==r?void 0:r.value)||0,g=this.markerEndAngle),h=Math.atan2(p,f),l.setLocalEulerAngles(180*h/Math.PI+g),l.setLocalPosition(d+Math.cos(h)*y,v+Math.sin(h)*y)}},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=nu.pointAt(e.x1.value,e.y1.value,e.x2.value,e.y2.value,t),o=i.x,a=i.y,s=Hn(Nn(),On(o-n,a-r,0),this.getLocalTransform());return new Za(s[0],s[1])},r.getTotalLength=function(){var t=this.parsedStyle;return nu.length(t.x1.value,t.y1.value,t.x2.value,t.y2.value)},n}(rc),yc=["style"],gc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=Ee(i,yc);(r=e.call(this,ge({type:t.Shape.PATH,style:ge({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 rc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof rc&&r.placeMarkerMid(l),c&&c instanceof rc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}me(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 rc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof rc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof rc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof rc&&(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 rc){var s,u,c,l,h,f,p;if(t){var d=this.getStartTangent(),v=d[0],y=d[1];l=y[0]-i,h=y[1]-o,u=v[0]-y[0],c=v[1]-y[1],f=(null==n?void 0:n.value)||0,p=this.markerStartAngle}else{var g=this.getEndTangent(),m=g[0],T=g[1];l=T[0]-i,h=T[1]-o,u=m[0]-T[0],c=m[1]-T[1],f=(null==r?void 0:r.value)||0,p=this.markerEndAngle}s=Math.atan2(c,u),a.setLocalEulerAngles(180*s/Math.PI+p),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 rc)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 this.parsedStyle.path.totalLength},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=e.path,o=function(t,e){return Ys(t,e).point}(i.absolutePath,t*i.totalLength),a=o.x,s=o.y,u=Hn(Nn(),On(a-n,s-r,0),this.getLocalTransform());return new Za(u[0],u[1])},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}(rc),mc=["style"],Tc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=Ee(i,mc);(r=e.call(this,ge({type:t.Shape.POLYGON,style:ge({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 rc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof rc&&r.placeMarkerMid(l),c&&c instanceof rc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}me(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 rc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof rc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof rc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof rc&&(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.points.points,o=e.defX,a=e.defY,s=t?e.markerStart:e.markerEnd;if(s&&s instanceof rc){var u,c,l,h,f,p,d;if(h=i[0][0]-o,f=i[0][1]-a,t)c=i[1][0]-i[0][0],l=i[1][1]-i[0][1],p=(null==n?void 0:n.value)||0,d=this.markerStartAngle;else{var v=i.length;this.style.isClosed?(c=i[v-1][0]-i[0][0],l=i[v-1][1]-i[0][1]):(h=i[v-1][0]-o,f=i[v-1][1]-a,c=i[v-2][0]-i[v-1][0],l=i[v-2][1]-i[v-1][1]),p=(null==r?void 0:r.value)||0,d=this.markerEndAngle}u=Math.atan2(l,c),s.setLocalEulerAngles(180*u/Math.PI+d),s.setLocalPosition(h+Math.cos(u)*p,f+Math.sin(u)*p)}},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()})),t&&t instanceof rc)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}(rc),Sc=["style"],bc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,Sc);return e.call(this,ge({type:t.Shape.POLYLINE,style:ge({points:"",miterLimit:"",isClosed:!1},i)},o))||this}me(n,e);var r=n.prototype;return r.getTotalLength=function(){return this.parsedStyle.points.totalLength},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=nu.pointAt(o[s][0],o[s][1],o[s+1][0],o[s+1][1],a),c=u.x,l=u.y,h=Hn(Nn(),On(c-n,l-r,0),this.getLocalTransform());return new Za(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}(Tc),Ec=["style"],kc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,Ec);return e.call(this,ge({type:t.Shape.RECT,style:ge({x:"",y:"",width:"",height:"",radius:""},i)},o))||this}return me(n,e),n}(rc),xc=["style"],wc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=Ee(r,xc);return e.call(this,ge({type:t.Shape.TEXT,style:ge({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},i)},o))||this}me(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}(rc),Pc=["style"],Mc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=Ee(i,Pc);return(r=e.call(this,ge({type:t.Shape.HTML,style:ge({x:"",y:"",width:"auto",height:"auto",innerHTML:""},o)},a))||this).cullable.enable=!1,r}me(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 Ba;return a.setMinMax(On(i,o,0),On(i+n.width,o+n.height,0)),a}return null},r.getLocalBounds=function(){if(this.parentNode){var t=ln(on(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Ba.isEmpty(e)){var n=new Ba;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},n}(rc),Cc=function(t){function e(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 me(e,t),e}(ju),Nc=0,_c=function(){function t(t,e){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._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=t,t.animation=this,this.timeline=e,this.id=""+Nc++,this._inEffect=!!this.effect.update(0),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("Method not implemented.")},e.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.dispatchEvent=function(t){throw new Error("Method not implemented.")},e.commitStyles=function(){throw new Error("Method not implemented.")},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 Cc(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 Cc(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},ye(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(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}();function Ac(t,e){return Number(t.id)-Number(e.id)}var Oc,Ic,Rc=function(){function t(t){var e=this;this.document=void 0,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.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(Ac),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t){var e=new _c(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(Ac),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}(),Lc=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",n.timeline=new Rc(ke(n));var r={};return Nl.forEach((function(e){var n=e.defaultValue;e.inherited&&n&&(r[e.name]=Ve(n)?n(t.Shape.GROUP):n)})),n.documentElement=new hc({id:"g-root",style:r}),n.documentElement.ownerDocument=ke(n),n.documentElement.parentNode=ke(n),n.childNodes=[n.documentElement],n}me(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?wc:hc);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("Method not implemented.")},r.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},r.elementFromPoint=function(){var t=de(fe().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return fe().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=de(fe().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return fe().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("Use document.documentElement instead.")},r.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},r.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},r.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},r.append=function(){throw new Error("Use document.documentElement instead.")},r.prepend=function(){throw new Error("Use document.documentElement instead.")},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)},ye(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}(Wu),Dc=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 Za,e.movement=new Za,e.offset=new Za,e.global=new Za,e.screen=new Za,e}me(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("Method not implemented.")},ye(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}(ju),Uc=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}me(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!")},e}(Dc),Fc=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 me(e,t),e}(Dc),Bc=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=ri,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 ye(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=ci(t),this._easing=t}}]),t}(),Vc=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}(),Gc=0,jc=new WeakMap,zc=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:Ic&&function(t){return t===Ic||t===Oc}(t)?Ic:null}(e[n-1],t);if(r)return void(e[n-1]=r)}else Xc.push(this.observer),qc||(qc=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(Kc):Kc());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=jc.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=Wc("attributes",r=e.target)).attributeName=i,n.attributeNamespace=o;var a=e.attrChange===$u.ADDITION?null:e.prevValue;Yc(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 Ic||((Ic=Vc.copy(Oc)).oldValue=t,Ic)}(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=Wc("childList",r=e.relatedNode)).addedNodes=s,n.removedNodes=u,n.previousSibling=l,n.nextSibling=h,Yc(r,(function(t){if(t.childList)return n}))}Oc=Ic=void 0},e}(),Hc=function(){function t(t){this.callback=void 0,this.nodes=[],this.records=[],this.uid=Gc++,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=jc.get(t);r||jc.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 zc(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=jc.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 Wc(t,e){return Oc=new Vc(t,e)}function Yc(t,e){for(var n=t;n;n=n.parentNode){var r=jc.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 qc=!1,Xc=[];function Kc(){qc=!1;var t=Xc;Xc=[],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=jc.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&Kc()}function Zc(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(Fe(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(!Fe(s)&&!Fe(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 Jc="backwards|forwards|both|none".split("|"),Qc="reverse|alternate|alternate-reverse".split("|");function $c(t,e){var n=new Bc;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===Jc.indexOf(t[e]))return;if("direction"===e&&-1===Qc.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function tl(t,e){var n;return $c(t=el(null!==(n=t)&&void 0!==n?n:{duration:"auto"}),e)}function el(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var nl=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=tl(n,!1),this.timing.effect=this,this.timing.activeDuration=li(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Zc(e,this.timing),this.interpolations=vi(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=hi(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=Zc(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}(),rl=function(){function e(){this.registry={},this.define(t.Shape.CIRCLE,sc),this.define(t.Shape.ELLIPSE,cc),this.define(t.Shape.RECT,kc),this.define(t.Shape.IMAGE,pc),this.define(t.Shape.LINE,vc),this.define(t.Shape.GROUP,hc),this.define(t.Shape.PATH,gc),this.define(t.Shape.POLYGON,Tc),this.define(t.Shape.POLYLINE,bc),this.define(t.Shape.TEXT,wc),this.define(t.Shape.HTML,Mc)}var n=e.prototype;return n.define=function(t,e){this.registry[t]=e},n.get=function(t){return this.registry[t]},e}(),il=t.Syringe.defineToken("SceneGraphSelectorFactory"),ol=t.Syringe.defineToken("SceneGraphSelector",{multiple:!1}),al=/\[\s*(.*)=(.*)\s*\]/;function sl(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}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(al),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 Fe(n)?"":n.toString?n.toString():""},t}(),t.DefaultSceneGraphSelector=ue([ct({token:ol})],t.DefaultSceneGraphSelector);var ul=t.Syringe.defineToken("SceneGraphService");t.DefaultSceneGraphService=function(){function e(){var e,n,r,i,o,a,s=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new zu(t.ElementEvent.BOUNDS_CHANGED),this.rotate=(e=$n(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=On(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=$n();ir(a,n[0],n[1],n[2]);var u=s.getRotation(t),c=s.getRotation(t.parentNode);fr(e,c),rr(e,e),er(a,e,a),er(o.localRotation,a,u),dr(o.localRotation,o.localRotation),s.dirtifyLocal(t,o)}else s.rotateLocal(t,n)}),this.rotateLocal=(n=$n(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=On(e,r,i));var o=t.transformable;ir(n,e[0],e[1],e[2]),pr(o.localRotation,o.localRotation,n),s.dirtifyLocal(t,o)}),this.setEulerAngles=(r=$n(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=On(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){ir(o.localRotation,e[0],e[1],e[2]);var a=s.getRotation(t.parentNode);fr(r,rr($n(),a)),pr(o.localRotation,o.localRotation,r),s.dirtifyLocal(t,o)}else s.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=On(e,n,r));var i=t.transformable;Wn(e,Nn())||(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,p=o*c-r*h,d=r*l-i*c,v=2*n[3];l*=v,h*=v,p*=2,d*=2,t[0]=a+(c*=v)+(f*=2),t[1]=s+l+p,t[2]=u+h+d}(e,e,i.localRotation),Ln(i.localPosition,i.localPosition,e),s.dirtifyLocal(t,i))},this.setPosition=(i=on(),o=Nn(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,Wn(s.getPosition(t),o)||(In(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(sn(i,t.parentNode.transformable.worldTransform),ln(i,i),Hn(n.localPosition,o,i)):In(n.localPosition,o),s.dirtifyLocal(t,n))}),this.setLocalPosition=function(){var t=Nn();return function(e,n){var r=e.transformable;t[0]=n[0],t[1]=n[1],t[2]=n[2]||0,Wn(r.localPosition,t)||(In(r.localPosition,t),s.dirtifyLocal(e,r))}}(),this.translate=(a=Nn(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=On(e,n,r)),Wn(e,Nn())||(Ln(a,s.getPosition(t),e),s.setPosition(t,a))}),this.setRotation=function(){var t=$n();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=hr(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var u=s.getRotation(e.parentNode);fr(t,u),rr(t,t),er(a.localRotation,t,n),dr(a.localRotation,a.localRotation),s.dirtifyLocal(e,a)}else s.setLocalRotation(e,n)}}}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){t.parentNode&&this.detach(t),t.parentNode=e,Fe(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0);var i=t.transformable;i&&this.dirtifyWorld(t,i),i.frozen&&this.unfreezeParentToRoot(t)},n.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var r=t.parentNode.childNodes.indexOf(t);r>-1&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),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=On(e,n,r));var i=t.transformable;if(!Wn(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=On(e,n,r));var i=t.transformable;ir(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},n.scaleLocal=function(t,e){var n=t.transformable;Un(n.localScale,n.localScale,On(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},n.setLocalScale=function(t,e){var n=t.transformable,r=On(e[0],e[1],e[2]||n.localScale[2]);Wn(r,n.localScale)||(In(n.localScale,r),this.dirtifyLocal(t,n))},n.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=hr(e,n,r,i));var o=t.transformable;fr(o.localRotation,e),this.dirtifyLocal(t,o)},n.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=vr(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 mn(e.position,this.getWorldTransform(t,e))},n.getRotation=function(t){var e=t.transformable;return Sn(e.rotation,this.getWorldTransform(t,e))},n.getScale=function(t){var e=t.transformable;return Tn(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.calcLocalTransform=function(t){if(bn(t.localTransform,t.localRotation,t.localPosition,On(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=cn(on());e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),hn(t.localTransform,t.localTransform,e)}var n=bn(on(),hr(0,0,0,1),Nn(),t.localScale,t.origin);hn(t.localTransform,t.localTransform,n)},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=mn(Nn(),e),r=Sn($n(),e),i=Tn(Nn(),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){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(Ba.isEmpty(n))return null;var r=new Ba;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r},n.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new Ba},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=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(i?i.add(r):(i=new Ba).update(r.center,r.halfExtents))}));var o=t.parsedStyle.clipPath;if(o){var a,s=this.getTransformedGeometryBounds(o,!0);s&&(a=new Ba).setFromTransformedAABB(s,this.getWorldTransform(t)),i?a&&(i=a.intersection(i)):i=a}return i&&(e?r.renderBounds=i:r.bounds=i),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,i||new Ba},n.getLocalBounds=function(t){if(t.parentNode){var e=on();t.parentNode.transformable&&(e=ln(on(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Ba.isEmpty(n)){var r=new Ba;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},n.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);Ba.isEmpty(i)||(r=new Ba).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 Ja(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),c[0]-s,c[1]-u)}return new Ja((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?hn(e.worldTransform,r.worldTransform,e.localTransform):sn(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}(),ue([lt(il),le("design:type",Function)],t.DefaultSceneGraphService.prototype,"sceneGraphSelectorFactory",void 0),t.DefaultSceneGraphService=ue([ct({token:ul})],t.DefaultSceneGraphService);var cl,ll=t.Syringe.defineToken("ContextService",{multiple:!1});(cl=t.RenderReason||(t.RenderReason={}))[cl.CAMERA_CHANGED=0]="CAMERA_CHANGED",cl[cl.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",cl[cl.NONE=2]="NONE";var hl,fl,pl,dl=t.Syringe.defineToken("RenderingContext"),vl=t.Syringe.defineToken("DefaultCamera");(hl=t.CameraType||(t.CameraType={}))[hl.ORBITING=0]="ORBITING",hl[hl.EXPLORING=1]="EXPLORING",hl[hl.TRACKING=2]="TRACKING",(fl=t.CameraTrackingMode||(t.CameraTrackingMode={}))[fl.DEFAULT=0]="DEFAULT",fl[fl.ROTATIONAL=1]="ROTATIONAL",fl[fl.TRANSLATIONAL=2]="TRANSLATIONAL",fl[fl.CINEMATIC=3]="CINEMATIC",(pl=t.CameraProjectionMode||(t.CameraProjectionMode={}))[pl.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",pl[pl.PERSPECTIVE=1]="PERSPECTIVE";var yl={UPDATED:"updated"},gl=Math.PI/180,ml=180/Math.PI,Tl=2e-4,Sl=function(e){function n(n,r){var i;return void 0===n&&(n=t.CameraType.EXPLORING),void 0===r&&(r=t.CameraTrackingMode.DEFAULT),(i=e.call(this)||this).canvas=void 0,i.matrix=on(),i.right=On(1,0,0),i.up=On(0,1,0),i.forward=On(0,0,1),i.position=On(0,0,1),i.focalPoint=On(0,0,0),i.distanceVector=On(0,0,-1),i.distance=1,i.azimuth=0,i.elevation=0,i.roll=0,i.relAzimuth=0,i.relElevation=0,i.relRoll=0,i.dollyingStep=0,i.maxDistance=1/0,i.minDistance=-1/0,i.zoom=1,i.rotateWorld=!1,i.fov=30,i.near=.1,i.far=1e3,i.aspect=1,i.left=void 0,i.rright=void 0,i.top=void 0,i.bottom=void 0,i.projectionMatrix=on(),i.projectionMatrixInverse=on(),i.jitteredProjectionMatrix=void 0,i.view=void 0,i.enableUpdate=!0,i.type=t.CameraType.EXPLORING,i.trackingMode=t.CameraTrackingMode.DEFAULT,i.projectionMode=t.CameraProjectionMode.PERSPECTIVE,i.frustum=new za,i.landmarks=[],i.landmarkAnimationID=void 0,i.orthoMatrix=on(),i.setType(n,r),i}me(n,e);var r=n.prototype;return r.isOrtho=function(){return this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC},r.getProjectionMode=function(){return this.projectionMode},r.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},r.getPerspectiveInverse=function(){return this.projectionMatrixInverse},r.getFrustum=function(){return this.frustum},r.getPosition=function(){return this.position},r.getFocalPoint=function(){return this.focalPoint},r.getDollyingStep=function(){return this.dollyingStep},r.getNear=function(){return this.near},r.getFar=function(){return this.far},r.getZoom=function(){return this.zoom},r.getOrthoMatrix=function(){return this.orthoMatrix},r.getView=function(){return this.view},r.setEnableUpdate=function(t){this.enableUpdate=t},r.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},r.setProjectionMode=function(t){return this.projectionMode=t,this},r.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},r.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},r.getViewTransform=function(){return ln(on(),this.matrix)},r.getWorldTransform=function(){return this.matrix},r.jitterProjectionMatrix=function(t,e){var n=yn(on(),[t,e,0]);this.jitteredProjectionMatrix=hn(on(),n,this.projectionMatrix)},r.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},r.setMatrix=function(t){return this.matrix=t,this._update(),this},r.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},r.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},r.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},r.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},r.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},r.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},r.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},r.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(.5*gl*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 xr(this.projectionMatrix,c,c+u,a,a-s,e,this.far),pn(this.projectionMatrix,this.projectionMatrix,On(1,-1,1)),ln(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},r.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,p=l+u,d=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;p=(f+=y*this.view.offsetX)+y*this.view.width,v=(d-=g*this.view.offsetY)-g*this.view.height}return wn(this.projectionMatrix,f,p,v,d,o,a),pn(this.projectionMatrix,this.projectionMatrix,On(1,-1,1)),ln(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},r.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=mr(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},r.setFocalPoint=function(e,n,r){void 0===n&&(n=this.focalPoint[1]),void 0===r&&(r=this.focalPoint[2]);var i=On(0,1,0);if(this.focalPoint=mr(e,n,r),this.trackingMode===t.CameraTrackingMode.CINEMATIC){var o=Dn(Nn(),this.focalPoint,this.position);e=o[0],n=o[1],r=o[2];var a=An(o),s=Math.asin(n/a)*ml,u=90+Math.atan2(r,e)*ml,c=on();vn(c,c,u*gl),dn(c,c,s*gl),i=Hn(Nn(),[0,1,0],c)}return ln(this.matrix,Pn(on(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},r.getDistance=function(){return this.distance},r.setDistance=function(t){if(this.distance===t||0>t)return this;this.distance=t,Tl>this.distance&&(this.distance=Tl),this.dollyingStep=this.distance/100;var e=Nn(),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},r.setMaxDistance=function(t){return this.maxDistance=t,this},r.setMinDistance=function(t){return this.minDistance=t,this},r.setAzimuth=function(e){return this.azimuth=gr(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},r.getAzimuth=function(){return this.azimuth},r.setElevation=function(e){return this.elevation=gr(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},r.getElevation=function(){return this.elevation},r.setRoll=function(e){return this.roll=gr(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},r.getRoll=function(){return this.roll},r.rotate=function(e,n,r){if(this.relElevation=gr(n),this.relAzimuth=gr(e),this.relRoll=gr(r),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===t.CameraType.EXPLORING){var i=tr($n(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*gl),o=tr($n(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*gl),a=tr($n(),[0,0,1],this.relRoll*gl),s=er($n(),o,i);s=er($n(),s,a);var u=En(on(),s);fn(this.matrix,this.matrix,[0,0,-this.distance]),hn(this.matrix,this.matrix,u),fn(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}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},r.pan=function(t,e){var n=mr(t,e,0),r=_n(this.position);return Ln(r,r,Fn(Nn(),this.right,n[0])),Ln(r,r,Fn(Nn(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},r.dolly=function(e){var n,r=this.forward,i=_n(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&&Ln(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},r.createLandmark=function(t,e){void 0===e&&(e={});var r=e.position,i=void 0===r?this.position:r,o=e.focalPoint,a=void 0===o?this.focalPoint:o,s=e.roll,u=e.zoom,c=new n;c.setType(this.type,void 0),c.setPosition(i[0],i[1]||this.position[1],i[2]||this.position[2]),c.setFocalPoint(a[0],a[1]||this.focalPoint[1],a[2]||this.focalPoint[2]),c.setRoll(s||this.roll),c.setZoom(u||this.zoom);var l={name:t,matrix:an(c.matrix),right:_n(c.right),up:_n(c.up),forward:_n(c.forward),position:_n(c.position),focalPoint:_n(c.focalPoint),distanceVector:_n(c.distanceVector),distance:c.distance,dollyingStep:c.dollyingStep,azimuth:c.azimuth,elevation:c.elevation,roll:c.roll,relAzimuth:c.relAzimuth,relElevation:c.relElevation,relRoll:c.relRoll,zoom:c.zoom};return this.landmarks.push(l),l},r.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=di(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Be(e)?{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 p,d=r.position,v=r.focalPoint,y=r.zoom,g=r.roll,m=l||ci(a),T=function(){n.setFocalPoint(v),n.setPosition(d),n.setRoll(g),n.setZoom(y),n.computeMatrix(),n.triggerUpdate(),f&&f()};this.canvas.requestAnimationFrame((function t(e){void 0===p&&(p=e);var r=e-p;if(u<r)T();else{var i,o,a=m(r/u),s=Nn(),c=Nn();zn(s,n.focalPoint,v,a),zn(c,n.position,d,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),Kn(s,v)+Kn(c,d)>.01?(n.computeMatrix(),n.triggerUpdate(),u>r&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))):T()}}))}},r._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},r.computeMatrix=function(){var e=tr($n(),[0,0,1],this.roll*gl);cn(this.matrix);var n=tr($n(),[1,0,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.elevation*gl),r=tr($n(),[0,1,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.azimuth*gl),i=er($n(),r,n);i=er($n(),i,e);var o=En(on(),i);this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?(fn(this.matrix,this.matrix,this.focalPoint),hn(this.matrix,this.matrix,o),fn(this.matrix,this.matrix,[0,0,this.distance])):this.type===t.CameraType.TRACKING&&(fn(this.matrix,this.matrix,this.position),hn(this.matrix,this.matrix,o))},r._setPosition=function(t,e,n){this.position=mr(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()},r._getAxes=function(){In(this.right,mr(Qn(Jn(),[1,0,0,0],this.matrix))),In(this.up,mr(Qn(Jn(),[0,1,0,0],this.matrix))),In(this.forward,mr(Qn(Jn(),[0,0,1,0],this.matrix))),Vn(this.right,this.right),Vn(this.up,this.up),Vn(this.forward,this.forward)},r._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=An(this.distanceVector);if(0===i)return this.elevation=0,void(this.azimuth=0);this.type===t.CameraType.TRACKING||this.rotateWorld?(this.elevation=Math.asin(n/i)*ml,this.azimuth=Math.atan2(-e,-r)*ml):(this.elevation=-Math.asin(n/i)*ml,this.azimuth=-Math.atan2(-e,-r)*ml)},r._getPosition=function(){In(this.position,mr(Qn(Jn(),[0,0,0,1],this.matrix))),this._getDistance()},r._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=rn(),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)),Ln(this.focalPoint,this.position,this.distanceVector),this._getDistance()},r._getDistance=function(){this.distanceVector=Dn(Nn(),this.focalPoint,this.position),this.distance=An(this.distanceVector),this.dollyingStep=this.distance/100},r._getOrthoMatrix=function(){if(this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC){var e=this.position,n=tr($n(),[0,0,1],-this.roll*Math.PI/180);bn(this.orthoMatrix,n,On((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),On(this.zoom,this.zoom,1),e)}},r.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=hn(on(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(yl.UPDATED)}},r.syncFromLandmark=function(t){this.matrix=sn(this.matrix,t.matrix),this.right=In(this.right,t.right),this.up=In(this.up,t.up),this.forward=In(this.forward,t.forward),this.position=In(this.position,t.position),this.focalPoint=In(this.focalPoint,t.focalPoint),this.distanceVector=In(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},n}(To.EventEmitter),bl=t.Syringe.defineToken("RenderingPluginContribution");t.RenderingService=function(){function e(){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 zu(t.ElementEvent.RENDER_ORDER_CHANGED),this.hooks={init:new Ui,dirtycheck:new $i(["object"]),cull:new $i(["object","camera"]),beginFrame:new qi([]),beforeRender:new qi(["objectToRender"]),render:new qi(["objectToRender"]),afterRender:new qi(["objectToRender"]),endFrame:new qi([]),destroy:new qi([]),pick:new Gi(["result"]),pointerDown:new qi(["event"]),pointerUp:new qi(["event"]),pointerMove:new qi(["event"]),pointerOut:new qi(["event"]),pointerOver:new qi(["event"]),pointerWheel:new qi(["event"]),pointerCancel:new qi(["event"])}}var n=e.prototype;return n.init=function(){var t=de(fe().mark((function t(){var e=this;return fe().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(sl),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}(),ue([Ft(bl),le("design:type",Object)],t.RenderingService.prototype,"renderingPluginProvider",void 0),ue([lt(xi),le("design:type",Object)],t.RenderingService.prototype,"canvasConfig",void 0),ue([lt(dl),le("design:type",Object)],t.RenderingService.prototype,"renderingContext",void 0),ue([lt(ul),le("design:type",Object)],t.RenderingService.prototype,"sceneGraphService",void 0),ue([lt(ni),le("design:type",Object)],t.RenderingService.prototype,"styleValueRegistry",void 0),ue([lt(vl),le("design:type",Sl)],t.RenderingService.prototype,"camera",void 0),t.RenderingService=ue([ct()],t.RenderingService);t.EventService=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).renderingContext=void 0,e.contextService=void 0,e.canvasConfig=void 0,e.displayObjectPool=void 0,e.rootTarget=void 0,e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.pickHandler=void 0,e.onPointerDown=function(){var t=de(fe().mark((function t(n){var r;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:e.dispatchEvent(r=t.sent,"pointerdown"),"touch"===r.pointerType?e.dispatchEvent(r,"touchstart"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||e.dispatchEvent(r,2===r.button?"rightdown":"mousedown"),e.trackingData(n.pointerId).pressTargetsByButton[n.button]=r.composedPath(),e.freeEvent(r);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUp=function(){var t=de(fe().mark((function t(n){var r,i,o,a,s,u,c,l,h;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return r=performance.now(),t.next=5,e.createPointerEvent(n);case 5:if(e.dispatchEvent(i=t.sent,"pointerup"),"touch"===i.pointerType?e.dispatchEvent(i,"touchend"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.dispatchEvent(i,2===i.button?"rightup":"mouseup"),o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.pressTargetsByButton[n.button]),s=a,a&&!i.composedPath().includes(a)){for(u=a;u&&!i.composedPath().includes(u);)i.currentTarget=u,e.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType?e.notifyTarget(i,"touchendoutside"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),Wu.isNode(u)&&(u=u.parentNode);delete o.pressTargetsByButton[n.button],s=u}s&&((l=e.clonePointerEvent(i,"click")).target=s,l.path=[],o.clicksByButton[n.button]||(o.clicksByButton[n.button]={clickCount:0,target:l.target,timeStamp:r}),(h=o.clicksByButton[n.button]).target===l.target&&200>r-h.timeStamp?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=r,l.detail=h.clickCount,(null===(c=i.detail)||void 0===c?void 0:c.preventClick)||e.dispatchEvent(l,"mouse"===l.pointerType||"touch"===l.pointerType?"click":"pointertap"),e.freeEvent(l)),e.freeEvent(i);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerMove=function(){var t=de(fe().mark((function t(n){var r,i,o,a,s,u,c,l,h,f;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:if(i="mouse"===(r=t.sent).pointerType||"pen"===r.pointerType,o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.overTargets),!o.overTargets||a===r.target){t.next=23;break}return s="mousemove"===n.type?"mouseout":"pointerout",t.next=12,e.createPointerEvent(n,s,a||void 0);case 12:if(e.dispatchEvent(u=t.sent,"pointerout"),i&&e.dispatchEvent(u,"mouseout"),r.composedPath().includes(a)){t.next=22;break}return t.next=18,e.createPointerEvent(n,"pointerleave",a||void 0);case 18:for((c=t.sent).eventPhase=c.AT_TARGET;c.target&&!r.composedPath().includes(c.target);)c.currentTarget=c.target,e.notifyTarget(c),i&&e.notifyTarget(c,"mouseleave"),Wu.isNode(c.target)&&(c.target=c.target.parentNode);e.freeEvent(c);case 22:e.freeEvent(u);case 23:if(a===r.target){t.next=38;break}l=e.clonePointerEvent(r,"mousemove"===n.type?"mouseover":"pointerover"),e.dispatchEvent(l,"pointerover"),i&&e.dispatchEvent(l,"mouseover"),h=a&&Wu.isNode(a)&&a.parentNode;case 29:if(!h||h===(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode)){t.next=35;break}if(h!==r.target){t.next=32;break}return t.abrupt("break",35);case 32:h=h.parentNode,t.next=29;break;case 35:if(!h||h===(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode)){for((f=e.clonePointerEvent(r,"pointerenter")).eventPhase=f.AT_TARGET;f.target&&f.target!==a&&f.target!==(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode);)f.currentTarget=f.target,e.notifyTarget(f),i&&e.notifyTarget(f,"mouseenter"),Wu.isNode(f.target)&&(f.target=f.target.parentNode);e.freeEvent(f)}e.freeEvent(l);case 38:e.dispatchEvent(r,"pointermove"),"touch"===r.pointerType&&e.dispatchEvent(r,"touchmove"),i&&(e.dispatchEvent(r,"mousemove"),e.cursor=e.getCursor(r.target)),o.overTargets=r.composedPath(),e.freeEvent(r);case 43:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOut=function(){var t=de(fe().mark((function t(n){var r,i,o,a,s;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:if(!(r=e.trackingData(n.pointerId)).overTargets){t.next=19;break}return i="mouse"===n.pointerType||"pen"===n.pointerType,o=e.findMountedTarget(r.overTargets),t.next=8,e.createPointerEvent(n,"pointerout",o||void 0);case 8:return e.dispatchEvent(a=t.sent),i&&e.dispatchEvent(a,"mouseout"),t.next=13,e.createPointerEvent(n,"pointerleave",o||void 0);case 13:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&s.target!==(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode);)s.currentTarget=s.target,e.notifyTarget(s),i&&e.notifyTarget(s,"mouseleave"),Wu.isNode(s.target)&&(s.target=s.target.parentNode);r.overTargets=null,e.freeEvent(a),e.freeEvent(s);case 19:e.cursor=null;case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOver=function(){var t=de(fe().mark((function t(n){var r,i,o,a;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),t.next=5,e.createPointerEvent(n);case 5:for(o="mouse"===(i=t.sent).pointerType||"pen"===i.pointerType,e.dispatchEvent(i,"pointerover"),o&&e.dispatchEvent(i,"mouseover"),"mouse"===i.pointerType&&(e.cursor=e.getCursor(i.target)),(a=e.clonePointerEvent(i,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(Wu.isNode(e.rootTarget)&&e.rootTarget.parentNode);)a.currentTarget=a.target,e.notifyTarget(a),o&&e.notifyTarget(a,"mouseenter"),Wu.isNode(a.target)&&(a.target=a.target.parentNode);r.overTargets=i.composedPath(),e.freeEvent(i),e.freeEvent(a);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUpOutside=function(){var t=de(fe().mark((function t(n){var r,i,o,a;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Uc){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),i=e.findMountedTarget(r.pressTargetsByButton[n.button]),t.next=6,e.createPointerEvent(n);case 6:if(o=t.sent,i){for(a=i;a;)o.currentTarget=a,e.notifyTarget(o,"pointerupoutside"),"touch"===o.pointerType||"mouse"!==o.pointerType&&"pen"!==o.pointerType||e.notifyTarget(o,2===o.button?"rightupoutside":"mouseupoutside"),Wu.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[n.button]}e.freeEvent(o);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onWheel=function(){var t=de(fe().mark((function t(n){var r;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof Fc){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createWheelEvent(n);case 4:e.dispatchEvent(r=t.sent),e.freeEvent(r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}me(e,t);var n=e.prototype;return n.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)},n.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Za(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},n.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Za(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},n.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=hn(on(),u,s),l=On(e/o*2-1,2*(1-n/a)-1,0);return Hn(l,l,c),new Za(l[0],l[1])},n.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=hn(on(),n,r),o=On(t.x,t.y,0);Hn(o,o,i);var a=this.canvasConfig;return new Za((o[0]+1)/2*a.width,(1-(o[1]+1)/2)*a.height)},n.setPickHandler=function(t){this.pickHandler=t},n.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}))},n.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)}},n.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},n.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}}},n.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++)Wu.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},n.hitTest=function(){var t=de(fe().mark((function t(e){var n,r,i,o,a;return fe().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)}}(),n.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},n.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e,n=we(this.displayObjectPool.getHTMLs());!(e=n()).done;){var r=e.value;if(t.nativeEvent.composedPath().indexOf(r)>-1)return r}return null},n.pickTarget=function(){var t=de(fe().mark((function t(e){return fe().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)}}(),n.createPointerEvent=function(){var t=de(fe().mark((function t(e,n,r){var i,o;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.allocateEvent(Uc),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)}}(),n.createWheelEvent=function(){var t=de(fe().mark((function t(e){var n,r;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Fc),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)}}(),n.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},n.clonePointerEvent=function(t,e){var n=this.allocateEvent(Uc);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},n.copyPointerData=function(t,e){t instanceof Uc&&e instanceof Uc&&(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)},n.copyMouseData=function(t,e){t instanceof Dc&&e instanceof Dc&&(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))},n.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},n.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)},n.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},n.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)},n.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)},n.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)},n.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||Wu.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},n.getCursor=function(t){for(var e=t;e;){var n=ec.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Wu.isNode(e)&&e.parentNode}},e}(To.EventEmitter),ue([lt(dl),le("design:type",Object)],t.EventService.prototype,"renderingContext",void 0),ue([lt(ll),le("design:type",Object)],t.EventService.prototype,"contextService",void 0),ue([lt(xi),le("design:type",Object)],t.EventService.prototype,"canvasConfig",void 0),ue([lt(t.DisplayObjectPool),le("design:type",t.DisplayObjectPool)],t.EventService.prototype,"displayObjectPool",void 0),ue([Y.postConstruct(),le("design:type",Function),le("design:paramtypes",[]),le("design:returntype",void 0)],t.EventService.prototype,"init",null),t.EventService=ue([ct()],t.EventService),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=ue([ct()],t.OffscreenCanvasCreator);var El={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]},kl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,xl=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),wl=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source);t.TextService=function(){function t(){var t=this;this.cache={},this.offscreenCanvas=void 0,this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!wl.exec(n)&&!xl.exec(e))},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}}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=El.MetricsString+El.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(El.BaselineSymbol).width),u=El.HeightMultiplier*s;s=s*El.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,p=0,d=!1;for(f=0;s>f;++f){for(var v=0;h>v;v+=4)if(255!==c[p+v]){d=!0;break}if(d)break;p+=h}for(n.ascent=s-f,p=l-h,d=!1,f=u;f>s;--f){for(var y=0;h>y;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p-=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=eo(e),p=this.measureFont(f,n);0===p.fontSize&&(p.fontSize=r.value,p.ascent=r.value);var d=this.offscreenCanvas.getOrCreateContext(n);d.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 T=d.measureText(v[m]).width+(v[m].length-1)*c.value;y[m]=T,g=Math.max(g,T)}var S=g+a.value,b=o.value||p.fontSize+a.value,E=Math.max(b,p.fontSize+a.value)+(v.length-1)*(b+h),k=0;return"middle"===s.value?k=-E/2:"bottom"===s.value||"alphabetic"===s.value||"ideographic"===s.value?k=-E:"top"!==s.value&&"hanging"!==s.value||(k=0),{font:f,width:S,height:E,lines:v,lineWidths:y,lineHeight:b+=h,maxLineWidth:g,fontProperties:p,lineMetrics:y.map((function(t,e){var n=0;return"center"===u.value?n-=t/2:"right"!==u.value&&"end"!==u.value||(n-=t),new Ja(n-a.value/2,k+e*b,t+a.value,b)}))}},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.value,c=[],l=0,h=0,f={},p=function(t){return r.getFromCache(t,a.value,f,s)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=p(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+=p(i||""))}h+=a,c[l]=(c[l]||"")+e})),c.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&El.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.isNewline=function(t){return"string"==typeof t&&El.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||!kl.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(!kl.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}(),ue([lt(t.OffscreenCanvasCreator),le("design:type",t.OffscreenCanvasCreator)],t.TextService.prototype,"offscreenCanvas",void 0),t.TextService=ue([ct()],t.TextService);var Pl=t.Syringe.defineToken("GeometryUpdaterFactory"),Ml=t.Syringe.defineToken("GeometryAABBUpdater");function Cl(t){var e=t.parsedStyle.fontSize;return e&&!Do.isRelativeUnit(e.unit)?e.clone():null}t.CircleUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n.value,height:2*n.value}},t}(),t.CircleUpdater=ue([ct({token:{token:Ml,named:t.Shape.CIRCLE}})],t.CircleUpdater),t.EllipseUpdater=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx.value,height:2*t.ry.value}},t}(),t.EllipseUpdater=ue([ct({token:{token:Ml,named:t.Shape.ELLIPSE}})],t.EllipseUpdater),t.RectUpdater=function(){function e(){}return e.prototype.update=function(e,n){var r=e.img,i=e.width,o=e.height,a=0,s=0;return i instanceof Do&&i.unit===t.UnitType.kPixels&&(a=i.value),o instanceof Do&&o.unit===t.UnitType.kPixels&&(s=o.value),r&&!di(r)&&(a||(a=r.width),s||(s=r.height)),i instanceof Do&&(i.value=a),o instanceof Do&&(o.value=s),{width:a,height:s}},e}(),t.RectUpdater=ue([ct({token:[{token:Ml,named:t.Shape.RECT},{token:Ml,named:t.Shape.IMAGE},{token:Ml,named:t.Shape.GROUP}]})],t.RectUpdater),t.TextUpdater=function(){function t(){this.textService=void 0}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&&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.lineHeight,p=h.fontProperties,d=On(h.width/2,h.height/2,0),v=[0,1],y=0;"center"===o.value?(y=a.value/2,v=[.5,1]):"right"!==o.value&&"end"!==o.value||(y=a.value,v=[1,1]);var g=0;return"middle"===s.value?g=d[1]:"top"===s.value||"hanging"===s.value?g=2*d[1]:"alphabetic"===s.value?g=f-p.ascent:"bottom"!==s.value&&"ideographic"!==s.value||(g=0),u&&(y+=u.value),c&&(g+=c.value),t.anchor=[new Do(v[0]),new Do(v[1]),new Do(0)],{width:2*d[0],height:2*d[1],offsetX:y,offsetY:g}},t}(),ue([lt(t.TextService),le("design:type",t.TextService)],t.TextUpdater.prototype,"textService",void 0),t.TextUpdater=ue([ct({token:{token:Ml,named:t.Shape.TEXT}})],t.TextUpdater),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.value,r.value),a=Math.max(e.value,r.value),s=Math.min(n.value,i.value);return{width:a-o,height:Math.max(n.value,i.value)-s}},t}(),t.LineUpdater=ue([ct({token:{token:Ml,named:t.Shape.LINE}})],t.LineUpdater),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=ue([ct({token:[{token:Ml,named:t.Shape.POLYLINE},{token:Ml,named:t.Shape.POLYGON}]})],t.PolylineUpdater),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=ue([ct({token:{token:Ml,named:t.Shape.PATH}})],t.PathUpdater),t.CSSPropertyClipPath=function(){function t(){this.sceneGraphService=void 0}return t.prototype.calculator=function(t,e,n,r){if(n instanceof Po&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets){var i=e.parsedStyle.clipPathTargets.indexOf(r);e.parsedStyle.clipPathTargets.splice(i,1)}return n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),this.sceneGraphService.dirtifyToRoot(r),n},t}(),ue([lt(ul),le("design:type",Object)],t.CSSPropertyClipPath.prototype,"sceneGraphService",void 0),t.CSSPropertyClipPath=ue([ct({token:{token:Vu,named:t.PropertySyntax.CLIP_PATH}})],t.CSSPropertyClipPath),t.CSSPropertyColor=function(){function t(){this.parser=Da,this.mixer=Ua}return t.prototype.calculator=function(t,e,n,r){return n instanceof Po?new Ko(0,0,0,0,"none"===n.value):n},t}(),t.CSSPropertyColor=ue([ct({token:[{token:Vu,named:t.PropertySyntax.PAINT},{token:Vu,named:t.PropertySyntax.COLOR}]})],t.CSSPropertyColor),t.CSSPropertyFilter=function(){function t(){this.parser=su}return t.prototype.calculator=function(t,e,n){return n instanceof Po?[]:n},t}(),t.CSSPropertyFilter=ue([ct({token:{token:Vu,named:t.PropertySyntax.FILTER}})],t.CSSPropertyFilter),t.CSSPropertyLengthOrPercentage=function(){function e(){this.parser=ts,this.mixer=ns}return e.prototype.calculator=function(e,n,r,i,o){if(!Do.isRelativeUnit(r.unit))return r.clone();if(r.unit===t.UnitType.kPercentage)return new Do(0,"px");if(r.unit===t.UnitType.kEms){if(i.parentNode){var a=Cl(i.parentNode);if(a)return a.value*=r.value,a;o.addUnresolveProperty(i,e)}return new Do(0,"px")}if(r.unit===t.UnitType.kRems){var s;if(null==i||null===(s=i.ownerDocument)||void 0===s?void 0:s.documentElement){var u=Cl(i.ownerDocument.documentElement);if(u)return u.value*=r.value,u;o.addUnresolveProperty(i,e)}return new Do(0,"px")}},e}(),t.CSSPropertyLengthOrPercentage=ue([ct({token:[{token:Vu,named:t.PropertySyntax.LENGTH_PERCENTAGE},{token:Vu,named:t.PropertySyntax.LENGTH}]})],t.CSSPropertyLengthOrPercentage),t.CSSPropertyLengthOrPercentage12=function(){function t(){this.mixer=os}return t.prototype.parser=function(t){var e=is(Be(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},t}(),t.CSSPropertyLengthOrPercentage12=ue([ct({token:{token:Vu,named:t.PropertySyntax.LENGTH_PERCENTAGE_12}})],t.CSSPropertyLengthOrPercentage12),t.CSSPropertyLengthOrPercentage14=function(){function t(){this.mixer=os}return t.prototype.parser=function(t){var e=is(Be(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]]},t}(),t.CSSPropertyLengthOrPercentage14=ue([ct({token:{token:Vu,named:t.PropertySyntax.LENGTH_PERCENTAGE_14}})],t.CSSPropertyLengthOrPercentage14),t.CSSPropertyLocalPosition=function(e){function n(){return e.apply(this,arguments)||this}return me(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;Fe(a)||(n=a.value),Fe(s)||(r=s.value);break;case t.Shape.LINE:var u=e.parsedStyle,c=u.y1,l=u.y2;n=Math.min(u.x1.value,u.x2.value),r=Math.min(c.value,l.value),i=0;break;case t.Shape.RECT:case t.Shape.IMAGE:case t.Shape.GROUP:case t.Shape.HTML:case t.Shape.TEXT:Fe(e.parsedStyle.x)||(n=e.parsedStyle.x.value),Fe(e.parsedStyle.y)||(r=e.parsedStyle.y.value)}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),!Fe(n)||!Fe(r)||!Fe(i)){var h=e.getLocalPosition(),f=h[0],p=h[1],d=h[2];e.setLocalPosition(Fe(n)?f:n,Fe(r)?p:r,Fe(i)?d:i)}},n}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyLocalPosition=ue([ct({token:{token:Vu,named:t.PropertySyntax.COORDINATE}})],t.CSSPropertyLocalPosition),t.CSSPropertyMarker=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i;n instanceof Po&&(n=null);var o=null===(i=n)||void 0===i?void 0:i.cloneNode(!0);return o&&(o.style.isMarker=!0),o},t}(),t.CSSPropertyMarker=ue([ct({token:{token:Vu,named:t.PropertySyntax.MARKER}})],t.CSSPropertyMarker),t.CSSPropertyNumber=function(){this.mixer=cs,this.parser=us},t.CSSPropertyNumber=ue([ct({token:{token:Vu,named:t.PropertySyntax.NUMBER}})],t.CSSPropertyNumber),t.CSSPropertyOffsetDistance=function(){function e(){this.parser=us,this.mixer=ls(0,1)}return e.prototype.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.value);r&&e.setLocalPosition(r.x,r.y)}}},e}(),t.CSSPropertyOffsetDistance=ue([ct({token:{token:Vu,named:t.PropertySyntax.OFFSET_DISTANCE}})],t.CSSPropertyOffsetDistance),t.CSSPropertyOffsetPath=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}(),t.CSSPropertyOffsetPath=ue([ct({token:{token:Vu,named:t.PropertySyntax.OFFSET_PATH}})],t.CSSPropertyOffsetPath),t.CSSPropertyOpacity=function(){this.parser=us,this.mixer=ls(0,1)},t.CSSPropertyOpacity=ue([ct({token:{token:Vu,named:t.PropertySyntax.OPACITY_VALUE}})],t.CSSPropertyOpacity),t.CSSPropertyPath=function(){function e(){this.parser=Qs,this.mixer=$s}var n=e.prototype;return n.calculator=function(t,e,n){return n instanceof Po&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new Ja(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}(),t.CSSPropertyPath=ue([ct({token:{token:Vu,named:t.PropertySyntax.PATH}})],t.CSSPropertyPath),t.CSSPropertyPoints=function(){function e(){this.parser=iu}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}(),t.CSSPropertyPoints=ue([ct({token:{token:Vu,named:t.PropertySyntax.LIST_OF_POINTS}})],t.CSSPropertyPoints),t.CSSPropertyShadowBlur=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=ls(0,1/0),e}return me(e,t),e}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyShadowBlur=ue([ct({token:{token:Vu,named:t.PropertySyntax.SHADOW_BLUR}})],t.CSSPropertyShadowBlur),t.CSSPropertyText=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Po?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),t.CSSPropertyText=ue([ct({token:{token:Vu,named:t.PropertySyntax.TEXT}})],t.CSSPropertyText),t.CSSPropertyTextTransform=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},t}(),t.CSSPropertyTextTransform=ue([ct({token:{token:Vu,named:t.PropertySyntax.TEXT_TRANSFORM}})],t.CSSPropertyTextTransform),t.CSSPropertyTransform=function(){function t(){this.parser=Pu,this.mixer=Lu}return t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.transform,r=e.defX,i=e.defY;n&&n.length&&(t.resetLocalTransform(),t.setLocalPosition(r,i),n.forEach((function(e){var n=e.t,o=e.d;if("scale"===n){var a=(null==o?void 0:o.map((function(t){return t.value})))||[1,1];t.scaleLocal(a[0],a[1],1)}else if("scalex"===n){var s=(null==o?void 0:o.map((function(t){return t.value})))||[1];t.scaleLocal(s[0],1,1)}else if("scaley"===n){var u=(null==o?void 0:o.map((function(t){return t.value})))||[1];t.scaleLocal(1,u[0],1)}else if("scalez"===n){var c=(null==o?void 0:o.map((function(t){return t.value})))||[1];t.scaleLocal(1,1,c[0])}else if("scale3d"===n){var l=(null==o?void 0:o.map((function(t){return t.value})))||[1,1,1];t.scaleLocal(l[0],l[1],l[2])}else if("translate"===n){var h=o||[qo,qo];t.translateLocal(h[0].value,h[1].value,0)}else if("translatex"===n){t.translateLocal((o||[qo])[0].value,0,0)}else if("translatey"===n){t.translateLocal(0,(o||[qo])[0].value,0)}else if("translatez"===n){t.translateLocal(0,0,(o||[qo])[0].value)}else if("translate3d"===n){var f=o||[qo,qo,qo];t.translateLocal(f[0].value,f[1].value,f[2].value)}else if("rotate"===n){t.rotateLocal(0,0,(o||[Xo])[0].value)}else if("rotatex"===n){t.rotateLocal((o||[Xo])[0].value,0,0)}else if("rotatey"===n){t.rotateLocal(0,(o||[Xo])[0].value,0)}else if("rotatez"===n){t.rotateLocal(0,0,(o||[Xo])[0].value)}else if("rotate3d"===n);else if("skew"===n){var p=(null==o?void 0:o.map((function(t){return t.value})))||[0,0];t.setLocalSkew(Tr(p[0]),Tr(p[1]))}else if("skewx"===n){var d=(null==o?void 0:o.map((function(t){return t.value})))||[0];t.setLocalSkew(Tr(d[0]),t.getLocalSkew()[1])}else if("skewy"===n){var v=(null==o?void 0:o.map((function(t){return t.value})))||[0];t.setLocalSkew(t.getLocalSkew()[0],Tr(v[0]))}else if("matrix"===n){var y=o.map((function(t){return t.value}));t.setLocalTransform(un(y[0],y[1],0,0,y[2],y[3],0,0,0,0,1,0,y[4]+r,y[5]+i,0,1))}else if("matrix3d"===n){var g=un.apply(Cn,o.map((function(t){return t.value})));g[12]+=r,g[13]+=i,t.setLocalTransform(g)}})))},t}(),t.CSSPropertyTransform=ue([ct({token:{token:Vu,named:t.PropertySyntax.TRANSFORM}})],t.CSSPropertyTransform),t.CSSPropertyTransformOrigin=function(){this.parser=Du},t.CSSPropertyTransformOrigin=ue([ct({token:{token:Vu,named:t.PropertySyntax.TRANSFORM_ORIGIN}})],t.CSSPropertyTransformOrigin),t.CSSPropertyZIndex=function(){function t(){this.parser=us}return t.prototype.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}(),t.CSSPropertyZIndex=ue([ct({token:{token:Vu,named:t.PropertySyntax.Z_INDEX}})],t.CSSPropertyZIndex);var Nl=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"shadowType",keywords:["inner","outer","both"],defaultValue:"outer",layoutDependent:!0},{name:"shadowColor",interpolable:!0,syntax:t.PropertySyntax.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:t.PropertySyntax.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:t.PropertySyntax.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:t.PropertySyntax.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.FILTER},{name:"clipPath",syntax:t.PropertySyntax.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"center":e===t.Shape.TEXT?"text-anchor":"left top"},layoutDependent:!0,syntax:t.PropertySyntax.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"0.5 0.5":"0 0"},layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:t.PropertySyntax.PATH,parsePriority:50},{name:"points",layoutDependent:!0,syntax:t.PropertySyntax.LIST_OF_POINTS,parsePriority:50},{name:"text",layoutDependent:!0,defaultValue:"",syntax:t.PropertySyntax.TEXT,parsePriority:50},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:t.PropertySyntax.TEXT_TRANSFORM,parsePriority:51},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"letterSpacing",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"miterLimit",layoutDependent:!0,syntax:t.PropertySyntax.NUMBER,defaultValue:function(e){return e===t.Shape.PATH||e===t.Shape.POLYGON||e===t.Shape.POLYLINE?"4":"10"}},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0},{name:"markerStart",syntax:t.PropertySyntax.MARKER},{name:"markerEnd",syntax:t.PropertySyntax.MARKER},{name:"markerMid",syntax:t.PropertySyntax.MARKER},{name:"markerStartOffset",syntax:t.PropertySyntax.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"},{name:"markerEndOffset",syntax:t.PropertySyntax.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"}];t.DefaultStyleValueRegistry=function(){function e(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.propertySyntaxFactory=void 0,this.sceneGraphService=void 0,this.cascadeProperties={}}var n=e.prototype;return n.init=function(){var t=this;Nl.forEach((function(e){t.registerMetadata(e)}))},n.registerMetadata=function(t){var e=this;[t.name].concat(t.alias||[]).forEach((function(n){e.cache[n]=t}))},n.unregisterMetadata=function(t){delete this.cache[t]},n.getMetadata=function(t){return this.cache[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});var i=n.skipUpdateAttribute,o=n.skipParse,a=!1;Object.keys(e).forEach((function(n){var o,s=ki(n,e[n]),u=s[0];i||(t.attributes[u]=s[1]),!a&&(null===(o=r.getMetadata(u))||void 0===o?void 0:o.layoutDependent)&&(a=!0)}));var s=Object.keys(e).sort((function(t,e){var n,i;return((null===(n=r.getMetadata(t))||void 0===n?void 0:n.parsePriority)||0)-((null===(i=r.getMetadata(e))||void 0===i?void 0:i.parsePriority)||0)}));o||s.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t)}));var u=!1;s.forEach((function(e){e in t.computedStyle&&(u=r.computeProperty(e,t.computedStyle[e],t))})),u?this.dirty=!0:(a&&this.updateGeometry(t),s.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),s.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=this.getMetadata(t),i=e;if((""===e||Fe(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)i=new Po(e);else if(r){var o=r.keywords,a=r.syntax,s=a&&this.getPropertySyntax(a);if(o&&o.indexOf(e)>-1)i=new Po(e);else if(s){s&&s.parser&&(i=s.parser(e,n))}}return i},n.computeProperty=function(t,e,n){var r=this.getMetadata(t),i="g-root"===n.id,o=e instanceof xo?e.clone():e;if(r){var a=r.syntax,s=r.defaultValue;if(e instanceof Po){var u=e.value;if("unset"===u&&(u=r.inherited&&!i?"inherit":"initial"),"initial"===u)Fe(s)||(e=this.parseProperty(t,Ve(s)?s(n.nodeName):s,n));else if("inherit"===u){var c=this.tryToResolveProperty(n,t,{inherited:!0});return c?(n.parsedStyle[t]=c,!1):(this.addUnresolveProperty(n,t),!0)}}var l=a&&this.getPropertySyntax(a);if(l)if(l.calculator)o=l.calculator(t,n.parsedStyle[t],e,n,this);else o=e;else o=e}return n.parsedStyle[t]=o,!1},n.postProcessProperty=function(t,e){var n=this.getMetadata(t);if(n&&n.syntax){var r=n.syntax&&this.getPropertySyntax(n.syntax);r&&r.postProcessor&&r.postProcessor(e)}},n.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},n.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},n.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];return(!(r instanceof Po)||"unset"!==r.value&&"initial"!==r.value&&"inherit"!==r.value)&&(!(r instanceof Do&&Do.isRelativeUnit(r.unit))&&r)}return!1},n.recalc=function(t){var e=this.unresolvedProperties[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete this.unresolvedProperties[t.entity]}},n.updateGeometry=function(e){var n=Dt.get(Pl)(e.nodeName);if(n){var r,i=e.geometry;i.contentBounds||(i.contentBounds=new Ba),i.renderBounds||(i.renderBounds=new Ba);var o=e.parsedStyle,a=n.update(o,e),s=a.width,u=a.height,c=a.depth,l=void 0===c?0:c,h=a.offsetX,f=void 0===h?0:h,p=a.offsetY,d=void 0===p?0:p,v=a.offsetZ,y=void 0===v?0:v,g=0>s,m=0>u,T=On(Math.abs(s)/2,Math.abs(u)/2,l/2),S=o.stroke,b=o.lineWidth,E=o.increasedLineWidthForHitTesting,k=o.shadowType,x=o.shadowColor,w=o.filter,P=void 0===w?[]:w,M=o.transformOrigin,C=o.anchor;e.nodeName===t.Shape.TEXT&&delete o.anchor;var N=On((1-2*(C&&C[0].value||0))*s/2+f,(1-2*(C&&C[1].value||0))*u/2+d,(1-2*(C&&(null===(r=C[2])||void 0===r?void 0:r.value)||0))*T[2]+y);i.contentBounds.update(N,T);var _=e.nodeName===t.Shape.POLYLINE||e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.PATH?Math.SQRT2:.5;if(S&&!S.isNone){var A=(((null==b?void 0:b.value)||0)+((null==E?void 0:E.value)||0))*_;Ln(T,T,On(A,A,0))}if(i.renderBounds.update(N,T),x&&"inner"!==(null==k?void 0:k.value)){var O=i.renderBounds,I=O.min,R=O.max,L=o.shadowBlur,D=o.shadowOffsetX,U=o.shadowOffsetY,F=L&&L.value||0,B=D&&D.value||0,V=U&&U.value||0,G=R[0]+F+B,j=I[1]-F+V,z=R[1]+F+V;I[0]=Math.min(I[0],I[0]-F+B),R[0]=Math.max(R[0],G),I[1]=Math.min(I[1],j),R[1]=Math.max(R[1],z),i.renderBounds.setMinMax(I,R)}P.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var r=n[0].value;i.renderBounds.update(i.renderBounds.center,Ln(i.renderBounds.halfExtents,i.renderBounds.halfExtents,On(r,r,0)))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,u=i.renderBounds,c=u.min,l=u.max,h=l[0]+s+o,f=c[1]-s+a,p=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],p),i.renderBounds.setMinMax(c,l)}})),C=o.anchor;var H=(g?-1:1)*as(M[0],0,e),W=(m?-1:1)*as(M[1],1,e);e.setOrigin(H-=(g?-1:1)*(C&&C[0].value||0)*i.contentBounds.halfExtents[0]*2,W-=(m?-1:1)*(C&&C[1].value||0)*i.contentBounds.halfExtents[1]*2),this.sceneGraphService.dirtifyToRoot(e)}},n.isPropertyInheritable=function(t){var e=this.getMetadata(t);return!!e&&e.inherited},e}(),ue([lt(Bu),le("design:type",Function)],t.DefaultStyleValueRegistry.prototype,"propertySyntaxFactory",void 0),ue([lt(ul),le("design:type",Object)],t.DefaultStyleValueRegistry.prototype,"sceneGraphService",void 0),ue([Y.postConstruct(),le("design:type",Function),le("design:paramtypes",[]),le("design:returntype",void 0)],t.DefaultStyleValueRegistry.prototype,"init",null),t.DefaultStyleValueRegistry=ue([ct({token:ni})],t.DefaultStyleValueRegistry);var _l=At((function(e){Y.decorate(ut(),To.EventEmitter),e(t.DisplayObjectPool),e(t.DefaultSceneGraphSelector),e({token:il,useFactory:function(t){return function(){return t.container.get(ol)}}}),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:Pl,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Ml,n)&&(e[n]=t.container.getNamed(Ml,n)),e[n]}}}),e(t.CSSPropertyNumber),e(t.CSSPropertyAngle),e(t.CSSPropertyClipPath),e(t.CSSPropertyColor),e(t.CSSPropertyFilter),e(t.CSSPropertyLengthOrPercentage),e(t.CSSPropertyLengthOrPercentage12),e(t.CSSPropertyLengthOrPercentage14),e(t.CSSPropertyLocalPosition),e(t.CSSPropertyOffsetDistance),e(t.CSSPropertyOffsetPath),e(t.CSSPropertyOpacity),e(t.CSSPropertyPath),e(t.CSSPropertyPoints),e(t.CSSPropertyShadowBlur),e(t.CSSPropertyText),e(t.CSSPropertyTextTransform),e(t.CSSPropertyTransform),e(t.CSSPropertyTransformOrigin),e(t.CSSPropertyZIndex),e(t.CSSPropertyMarker),e({token:Bu,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Vu,n)&&(e[n]=t.container.getNamed(Vu,n)),e[n]}}}),e(t.DefaultStyleValueRegistry),e(t.LayoutRegistry),e(t.LayoutEngine),e(t.LayoutEdges),e({token:so,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:uo,useValue:n}),r.get(t.LayoutEdges)}}}),e({token:Ce,useFactory:function(e){return function(n){var r=e.container.createChild();r.register(t.LayoutContext),r.register(t.LayoutChildren),r.register({token:no,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:ro,useValue:n}),r.get(t.LayoutChildren)}}}),r.register(t.FragmentResult),r.register({token:Ae,useFactory:function(e){return function(n,r){var i=e.container.createChild();return i.register({token:Oe,useValue:n}),i.register({token:Ie,useValue:r}),i.get(t.FragmentResult)}}}),r.register(t.LayoutFragment),r.register({token:ho,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:fo,useValue:n}),r.get(t.LayoutFragment)}}});var i=r.get(no),o=r.get(ho),a=r.get(Ae);return r.register({token:Ne,useValue:ge({},n,{layoutChildrenFactory:i,layoutFragmentFactory:o,fragmentResultFactory:a})}),r.get(t.LayoutContext)}}})})),Al=function(){function t(t){this.plugins=[],this.config=void 0,this.config=ge({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(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}();let Ol=1;const Il="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},Rl=Date.now();let Ll={},Dl=Date.now();const Ul=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-Dl,r=n>16?0:16-n,i=Ol++;return Ll[i]=t,Object.keys(Ll).length>1||setTimeout((()=>{Dl=e;const t=Ll;Ll={},Object.keys(t).forEach((e=>t[e](Il.performance&&"function"==typeof Il.performance.now?Il.performance.now():Date.now()-Rl)))}),r),i},Fl=t=>{delete Ll[t]},Bl=t=>"string"!=typeof t?Ul:""===t?Il.requestAnimationFrame:Il[t+"RequestAnimationFrame"],Vl=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],(t=>!!Bl(t))),Gl=Bl(Vl),jl="string"!=typeof(zl=Vl)?Fl:""===zl?Il.cancelAnimationFrame:Il[zl+"CancelAnimationFrame"]||Il[zl+"CancelRequestAnimationFrame"];var zl,Hl,Wl;Il.requestAnimationFrame=Gl,Il.cancelAnimationFrame=jl,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Gl,cancelAnimationFrame:jl});var Yl,ql,Xl=t.Syringe.defineToken("CullingStrategyContribution"),Kl=(Hl=function(){function e(){this.strategyProvider=void 0,this.renderingContext=void 0}return e.prototype.apply=function(e){var n=this,r=this.strategyProvider.getContributions();e.hooks.cull.tap(Wl.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)})),!i.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new zu(t.ElementEvent.CULLED)),null)}return e})),e.hooks.afterRender.tap(Wl.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},e}(),Hl.tag="Culling",Wl=Hl);ue([Ft(Xl),le("design:type",Object)],Kl.prototype,"strategyProvider",void 0),ue([lt(dl),le("design:type",Object)],Kl.prototype,"renderingContext",void 0),Kl=Wl=ue([ct({contrib:bl})],Kl);var Zl,Jl,Ql=(Yl=function(){function t(){}return t.prototype.apply=function(t){t.hooks.dirtycheck.tap(ql.tag,(function(e){return e?e.renderable.dirty||t.disableDirtyRectangleRendering()?e:null:e}))},t}(),Yl.tag="DirtyCheck",ql=Yl);Ql=ql=ue([ct({contrib:bl})],Ql);var $l=(Zl=function(){function t(){var t=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 Uc(null),this.rootWheelEvent=new Fc(null),this.onPointerMove=function(e){var n,r,i=null===(n=t.renderingContext.root)||void 0===n||null===(r=n.ownerDocument)||void 0===r?void 0:r.defaultView;if(!i.supportsTouchEvents||"touch"!==e.pointerType){for(var o,a=we(t.normalizeToPointerEvent(e,i));!(o=a()).done;){var s=t.bootstrapEvent(t.rootPointerEvent,o.value,i);t.eventService.mapEvent(s)}t.setCursor(t.eventService.cursor)}}}var e=t.prototype;return e.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var t=de(fe().mark((function t(n){return fe().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(Jl.tag,(function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap(Jl.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=we(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(Jl.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=we(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(Jl.tag,this.onPointerMove),t.hooks.pointerOver.tap(Jl.tag,this.onPointerMove),t.hooks.pointerOut.tap(Jl.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 Za(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=Qr[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 Za(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];Ue(i.button)&&(i.button=0),Ue(i.buttons)&&(i.buttons=1),Ue(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),Ue(i.width)&&(i.width=i.radiusX||1),Ue(i.height)&&(i.height=i.radiusY||1),Ue(i.tiltX)&&(i.tiltX=0),Ue(i.tiltY)&&(i.tiltY=0),Ue(i.pointerType)&&(i.pointerType="touch"),Ue(i.pointerId)&&(i.pointerId=i.identifier||0),Ue(i.pressure)&&(i.pressure=i.force||.5),Ue(i.twist)&&(i.twist=0),Ue(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;Ue(o.isPrimary)&&(o.isPrimary=!0),Ue(o.width)&&(o.width=1),Ue(o.height)&&(o.height=1),Ue(o.tiltX)&&(o.tiltX=0),Ue(o.tiltY)&&(o.tiltY=0),Ue(o.pointerType)&&(o.pointerType="mouse"),Ue(o.pointerId)&&(o.pointerId=1),Ue(o.pressure)&&(o.pressure=.5),Ue(o.twist)&&(o.twist=0),Ue(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t}(),Zl.tag="Event",Jl=Zl);ue([lt(xi),le("design:type",Object)],$l.prototype,"canvasConfig",void 0),ue([lt(ll),le("design:type",Object)],$l.prototype,"contextService",void 0),ue([lt(t.RenderingService),le("design:type",t.RenderingService)],$l.prototype,"renderingService",void 0),ue([lt(dl),le("design:type",Object)],$l.prototype,"renderingContext",void 0),ue([lt(t.EventService),le("design:type",t.EventService)],$l.prototype,"eventService",void 0),$l=Jl=ue([ct({contrib:bl})],$l);var th,eh,nh=[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],rh=function(){function e(){this.camera=void 0}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(Ba.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=nh.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>Gn(h,n.getPositiveFarPoint(i[s]))+f)return t.Mask.OUTSIDE;0>Gn(h,n.getNegativeFarPoint(i[s]))+f&&(o|=c)}}return o},e}();ue([lt(vl),le("design:type",Sl)],rh.prototype,"camera",void 0),rh=ue([ct({contrib:Xl})],rh);var ih=(th=function(){function e(){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set}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(eh.tag,de(fe().mark((function e(){return fe().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(eh.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(eh.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&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=i.getMin(),a=o[0],s=o[1],u=i.getMax();r.aabb={id:n.entity,minX:a,minY:s,maxX:u[0],maxY:u[1]}}r.aabb&&e.push(r.aabb)})),this.rBush.load(e),e.length=0,this.toSync.clear()},e}(),th.tag="Prepare",eh=th);ue([lt(dl),le("design:type",Object)],ih.prototype,"renderingContext",void 0),ue([lt(ni),le("design:type",Object)],ih.prototype,"styleValueRegistry",void 0),ue([lt(ul),le("design:type",Object)],ih.prototype,"sceneGraphService",void 0),ue([lt(Ku),le("design:type",zt)],ih.prototype,"rBush",void 0),ih=eh=ue([ct({contrib:bl})],ih);var oh,ah=At((function(e){t.Contribution.register(e,bl,{cache:!1}),t.Contribution.register(e,Xl,{cache:!1}),e({token:Ku,useValue:new zt}),e(t.RenderingService),e(t.EventService),e($l),e(ih),e(Ql),e(Kl),e(rh)}));(oh=t.CanvasEvent||(t.CanvasEvent={})).READY="ready",oh.BEFORE_RENDER="beforerender",oh.AFTER_RENDER="afterrender",oh.BEFORE_DESTROY="beforedestroy",oh.AFTER_DESTROY="afterdestroy",oh.RESIZE="resize",oh.DIRTY_RECTANGLE="dirtyrectangle";var sh=function(e){function n(n){var r;(r=e.call(this)||this).container=Dt.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=rc,r.frameId=void 0,r.eventService=void 0,r.renderingService=void 0,r.inited=!1,r.readyPromise=void 0,r.resolveReadyPromise=void 0,r.document=new Lc,r.document.defaultView=ke(r),r.customElements=new rl;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,p=n.document,d=n.requestAnimationFrame,v=n.cancelAnimationFrame,y=n.createImage,g=n.supportsPointerEvents,m=n.supportsTouchEvents,T=n.isTouchEvent,S=n.isMouseEvent;We(i,ke(r));var b=s,E=u,k=c;return o&&(k=1>(k=c||Ye&&window.devicePixelRatio||1)?1:Math.ceil(k),b=s||Zr(o)||o.width/k,E=u||Jr(o)||o.height/k),r.devicePixelRatio=k,r.requestAnimationFrame=null!=d?d:Gl.bind(globalThis),r.cancelAnimationFrame=null!=v?v:jl.bind(globalThis),r.supportsTouchEvents=null!=m?m:"ontouchstart"in globalThis,r.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,r.isTouchEvent=null!=T?T:function(t){return r.supportsTouchEvents&&t instanceof globalThis.TouchEvent},r.isMouseEvent=null!=S?S:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!r.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:o,width:b,height:E,renderer:l,offscreenCanvas:a,devicePixelRatio:k,cursor:f||"default",background:h,createImage:y,document:p}),r.initDefaultCamera(b,E),de(fe().mark((function e(){return fe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.initRenderer(l);case 2:r.dispatchEvent(new zu(t.CanvasEvent.READY)),r.readyPromise&&r.resolveReadyPromise();case 4:case"end":return e.stop()}}),e)})))(),r}me(n,e);var r=n.prototype;return r.initRenderingContext=function(e){var n=this;this.container.register({token:xi,useValue:e}),this.container.register({token:dl,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=(new Sl).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(dl);r.on(yl.UPDATED,(function(){i.renderReasons.add(t.RenderReason.CAMERA_CHANGED)})),this.container.register({token:vl,useValue:r})},r.getConfig=function(){return this.container.get(xi)},r.getContainer=function(){return this.container},r.getRoot=function(){return this.document.documentElement},r.getCamera=function(){return this.container.get(vl)},r.getContextService=function(){return this.container.get(ll)},r.getEventService=function(){return this.eventService},r.getRenderingService=function(){return this.renderingService},r.getRenderingContext=function(){return this.container.get(dl)},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 zu(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 zu(t.CanvasEvent.AFTER_DESTROY))},r.changeSize=function(t,e){this.resize(t,e)},r.resize=function(e,n){var r=this.container.get(xi);r.width=e,r.height=n,this.getContextService().resize(e,n);var i=this.container.get(vl),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 zu(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,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},r.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},r.render=function(){(this.dispatchEvent(new zu(t.CanvasEvent.BEFORE_RENDER)),this.container.isBound(t.RenderingService))&&this.container.get(t.RenderingService).render(this.getConfig());this.dispatchEvent(new zu(t.CanvasEvent.AFTER_RENDER))},r.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},r.initRenderer=function(){var e=de(fe().mark((function e(n){var r;return fe().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(ll),this.renderingService=this.container.get(t.RenderingService),this.eventService=this.container.get(t.EventService),e.next=11,r.init();case 11:return e.next=13,this.renderingService.init();case 13: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 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.loadCommonContainerModule=function(){this.container.unload(ah),this.container.load(ah,!0)},r.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.container=e.container,t.init()}))},r.setRenderer=function(){var t=de(fe().mark((function t(e){var n,r;return fe().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(xi).cursor=t,this.getContextService().applyCursorStyle(t)},r.unmountChildren=function(e){var n=this;if(this.inited){var r=[];e.forEach((function(t){t.isConnected&&r.push(t)})),r.reverse().forEach((function(e){e instanceof oc&&e.disconnectedCallback&&e.disconnectedCallback(),e.dispatchEvent(new zu(t.ElementEvent.UNMOUNTED)),e!==n.document.documentElement&&(e.ownerDocument=null),e.isConnected=!1}))}},r.mountChildren=function(e){var n=this;this.inited?e.forEach((function(e){e.isConnected||(e.ownerDocument=n.document,e.isConnected=!0,e.dispatchEvent(new zu(t.ElementEvent.MOUNTED)),e instanceof oc&&e.connectedCallback&&e.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: ",e.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})},ye(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}(Hu);Dt.load(_l);var uh=Dt.get(t.LayoutEngine);t.AABB=Ba,t.AbstractLayoutDefinition=io,t.AbstractRenderer=Al,t.AbstractRendererPlugin=function(){this.container=void 0},t.Animation=_c,t.AnimationEffectTiming=Bc,t.AnimationEvent=Cc,t.AnimationTimeline=Rc,t.AsyncParallelHook=Ui,t.AsyncSeriesWaterfallHook=Gi,t.BUILT_IN_PROPERTIES=Nl,t.BoundingSphere=Ga,t.CSS=bu,t.CSSColorValue=wo,t.CSSGradientValue=Zo,t.CSSKeywordValue=Po,t.CSSMathInvert=Fo,t.CSSMathMax=Ho,t.CSSMathMin=zo,t.CSSMathNegate=Bo,t.CSSMathProduct=Yo,t.CSSMathSum=Wo,t.CSSMathValue=Uo,t.CSSMathVariadic=jo,t.CSSNumericValue=_o,t.CSSNumericValueType=No,t.CSSProperty=Vu,t.CSSPropertySyntaxFactory=Bu,t.CSSRGB=Ko,t.CSSStyleValue=xo,t.CSSUnitValue=Do,t.Camera=Sl,t.CameraEvent=yl,t.Canvas=sh,t.CanvasConfig=xi,t.Circle=sc,t.Container=Lt,t.ContextNode=Ie,t.ContextService=ll,t.Cullable=Yu,t.CustomElement=oc,t.CustomElementRegistry=rl,t.CustomEvent=zu,t.DCHECK=Re,t.DCHECK_EQ=Le,t.DCHECK_NE=De,t.DELEGATION_SPLITTER=":",t.DefaultCamera=vl,t.DefaultContributionProvider=wt,t.Deferred=qr,t.DisplayObject=rc,t.Document=Lc,t.EasingFunctions=Hr,t.Element=ec,t.Ellipse=cc,t.EventTarget=Hu,t.FederatedEvent=ju,t.FederatedMouseEvent=Dc,t.FederatedPointerEvent=Uc,t.FederatedWheelEvent=Fc,t.FragmentResultFactory=Ae,t.FragmentResultOptions=Oe,t.Frustum=za,t.Geometry=qu,t.GeometryAABBUpdater=Ml,t.GeometryUpdaterFactory=Pl,t.GlobalContainer=Dt,t.Group=hc,t.HTML=Mc,t.Image=pc,t.KeyframeEffect=nl,t.LayoutChildrenFactory=no,t.LayoutChildrenOptions=ro,t.LayoutContextFactory=Ce,t.LayoutContextOptions=Ne,t.LayoutEdgesFactory=so,t.LayoutEdgesOptions=uo,t.LayoutFragmentFactory=ho,t.LayoutFragmentOptions=fo,t.LayoutObject=Me,t.Line=vc,t.MOUSE_POINTER_ID=1,t.Module=At,t.MutationEvent=$u,t.MutationObserver=Hc,t.MutationRecord=Vc,t.Node=Wu,t.ObjectTyped=Xr,t.Odeg=Xo,t.OptionSymbol=ft,t.Opx=qo,t.Path=gc,t.Plane=ja,t.Point=Za,t.Polygon=Tc,t.Polyline=bc,t.Provider=mt,t.RBush=zt,t.RBushNode=Xu,t.RBushRoot=Ku,t.Ray=Ka,t.Rect=kc,t.Rectangle=Ja,t.Registration=zc,t.Renderable=Zu,t.RenderingContext=dl,t.RenderingPluginContribution=bl,t.SceneGraphSelector=ol,t.SceneGraphSelectorFactory=il,t.SceneGraphService=ul,t.Sortable=Ju,t.StyleValueRegistry=ni,t.SyncHook=qi,t.SyncWaterfallHook=$i,t.SyringeModule=Nt,t.TOUCH_TO_POINTER=Qr,t.Text=wc,t.Transform=Qu,t.baseTypeToString=Co,t.camelCase=pi,t.clamp=yr,t.clampedMergeNumbers=ls,t.cleanExistedCanvas=We,t.colorStopToString=$r,t.compareAnimations=Ac,t.composeMatrix=_u,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.contrib=Ft,t.convertAngleUnit=rs,t.convertEffectInput=vi,t.convertItemToMatrix=Mu,t.convertPercentUnit=as,t.convertToDash=Pr,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.value,i.y1.value,i.x2.value,i.y2.value);break;case t.Shape.CIRCLE:var o=e.parsedStyle,a=o.r;r=Ci(a.value,a.value,o.cx.value,o.cy.value);break;case t.Shape.ELLIPSE:var s=e.parsedStyle;r=Ci(s.rx.value,s.ry.value,s.cx.value,s.cy.value);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,p=u.radius,d=p&&p.some((function(t){return 0!==t.value}));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.value,l.value,h.value,f.value,d&&p.map((function(t){return yr(t.value,0,Math.min(Math.abs(c.value)/2,Math.abs(l.value)/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=On(e[1]-a,e[2]-u,0);n&&Hn(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=On(e[1]-a,e[2]-u,0),c=On(e[3]-a,e[4]-u,0),l=On(e[5]-a,e[6]-u,0);n&&(Hn(s,s,r),Hn(c,c,r),Hn(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=On(e[6]-a,e[7]-u,0);n&&Hn(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=mr,t.decompose=wr,t.decorate=Y.decorate,t.deg2rad=Tr,t.deg2turn=function(t){return t/360},t.equalSet=function(t,e){if(t.size!==e.size)return!1;for(var n,r=we(t);!(n=r()).done;){if(!e.has(n.value))return!1}return!0},t.extractPolygons=Pi,t.formatAttribute=ki,t.fromRotationTranslationScale=kr,t.getAngle=gr,t.getEasingFunction=Wr,t.getEuler=Er,t.getHeight=Jr,t.getRotationInRadians=function(t){return Math.atan2(t[1],t[4])},t.getScaling=function(t,e){var n=e[3],r=e[4];return t[0]=Math.hypot(e[0],e[1]),t[1]=Math.hypot(n,r),t},t.getStyle=Kr,t.getTranslation=function(t,e){return t[0]=e[6],t[1]=e[7],t},t.getWidth=Zr,t.grad2deg=function(t){return 0>(t%=400)&&(t+=400),t/400*360},t.hasArcOrBezier=wi,t.inject=lt,t.injectable=ut,t.isBoolean=Ge,t.isBrowser=Ye,t.isComparison=function(e){return e===t.CSSMathOperator.kMin||e===t.CSSMathOperator.kMax||e===t.CSSMathOperator.kClamp},t.isFunction=Ve,t.isNil=Fe,t.isNumber=Be,t.isObject=je,t.isPattern=La,t.isString=di,t.isSyringeModule=_t,t.isUndefined=Ue,t.layoutEngine=uh,t.makePerspective=xr,t.makeQuerablePromise=Yr,t.makeTiming=$c,t.memoize=fi,t.mergeColors=Ua,t.mergeDimensionList=os,t.mergeDimensions=ns,t.mergeNumberLists=function(t,e){if(t.length===e.length)return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t}]},t.mergeNumbers=cs,t.mergePaths=$s,t.mergeTransforms=Lu,t.named=ht,t.normalizeKeyframes=Zc,t.normalizeTimingInput=tl,t.numberToString=ss,t.numericTimingToObject=el,t.optional=Y.optional,t.parseAngle=es,t.parseColor=Da,t.parseDimension=Qa,t.parseDimensionArray=is,t.parseFilter=su,t.parseGradient=ei,t.parseLength=$a,t.parseLengthOrPercentage=ts,t.parseNumber=us,t.parseNumberList=function(t){return di(t)?t.split(" ").map(us):t.map(us)},t.parseParam=ou,t.parsePath=Qs,t.parsePoints=iu,t.parseTransform=Pu,t.parseTransformOrigin=Du,t.parserPercentage=function(t){return Qa(new RegExp("%","g"),t)},t.path2Segments=Mi,t.postConstruct=Y.postConstruct,t.rad2deg=Sr,t.register=Ut,t.registerSideOption=function(t,e){Reflect.defineMetadata(ft,t,e)},t.setDOMSize=function(t,e,n){Ye&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")},t.singleton=ct,t.sortByZIndex=sl,t.toFontString=eo,t.transient=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(at(at({},e),{},{lifecycle:t.Syringe.Lifecycle.transient}))},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=br,t.typeCheck=Vo,t.unitTypeToBaseType=Mo,t.unmanaged=Y.unmanaged,Object.defineProperty(t,"__esModule",{value:!0})}));