iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 562 kB
JavaScript
/*! For license information please see 7351.0662991dac2ce1b7.js.LICENSE.txt */
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["7351"],{88618:function(t,e,i){i.d(e,{Wg:()=>h,qN:()=>a.q});i(71695),i(47021);var n,o,r=i(9065),s=i(50778),a=i(11911);const l=null!==(o=null===(n=window.ShadyDOM)||void 0===n?void 0:n.inUse)&&void 0!==o&&o;class h extends a.H{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||l)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}h.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,r.__decorate)([(0,s.Cb)({type:Boolean})],h.prototype,"disabled",void 0)},31622:function(t,e,i){i.r(e),i.d(e,{Button:()=>y});var n=i(9065),o=i(50778),r=(i(71695),i(47021),i(93695),i(16060),i(4428)),s=i(91532),a=i(57243),l=i(35359),h=i(20552);let d,c,u,f,p=t=>t;class v extends a.oi{constructor(){super(...arguments),this.raised=!1,this.unelevated=!1,this.outlined=!1,this.dense=!1,this.disabled=!1,this.trailingIcon=!1,this.fullwidth=!1,this.icon="",this.label="",this.expandContent=!1,this.shouldRenderRipple=!1,this.rippleHandlers=new s.A((()=>(this.shouldRenderRipple=!0,this.ripple)))}renderOverlay(){return(0,a.dy)(d||(d=p``))}renderRipple(){const t=this.raised||this.unelevated;return this.shouldRenderRipple?(0,a.dy)(c||(c=p`<mwc-ripple class="ripple" .primary="${0}" .disabled="${0}"></mwc-ripple>`),!t,this.disabled):""}focus(){const t=this.buttonElement;t&&(this.rippleHandlers.startFocus(),t.focus())}blur(){const t=this.buttonElement;t&&(this.rippleHandlers.endFocus(),t.blur())}getRenderClasses(){return{"mdc-button--raised":this.raised,"mdc-button--unelevated":this.unelevated,"mdc-button--outlined":this.outlined,"mdc-button--dense":this.dense}}render(){return(0,a.dy)(u||(u=p` <button id="button" class="mdc-button ${0}" ?disabled="${0}" aria-label="${0}" aria-haspopup="${0}" @focus="${0}" @blur="${0}" @mousedown="${0}" @mouseenter="${0}" @mouseleave="${0}" @touchstart="${0}" @touchend="${0}" @touchcancel="${0}"> ${0} ${0} <span class="leading-icon"> <slot name="icon"> ${0} </slot> </span> <span class="mdc-button__label">${0}</span> <span class="slot-container ${0}"> <slot></slot> </span> <span class="trailing-icon"> <slot name="trailingIcon"> ${0} </slot> </span> </button>`),(0,l.$)(this.getRenderClasses()),this.disabled,this.label||this.icon,(0,h.o)(this.ariaHasPopup),this.handleRippleFocus,this.handleRippleBlur,this.handleRippleActivate,this.handleRippleMouseEnter,this.handleRippleMouseLeave,this.handleRippleActivate,this.handleRippleDeactivate,this.handleRippleDeactivate,this.renderOverlay(),this.renderRipple(),this.icon&&!this.trailingIcon?this.renderIcon():"",this.label,(0,l.$)({flex:this.expandContent}),this.icon&&this.trailingIcon?this.renderIcon():"")}renderIcon(){return(0,a.dy)(f||(f=p` <mwc-icon class="mdc-button__icon"> ${0} </mwc-icon>`),this.icon)}handleRippleActivate(t){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}v.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,n.__decorate)([r.L,(0,o.Cb)({type:String,attribute:"aria-haspopup"})],v.prototype,"ariaHasPopup",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],v.prototype,"raised",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],v.prototype,"unelevated",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],v.prototype,"outlined",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean})],v.prototype,"dense",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],v.prototype,"disabled",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean,attribute:"trailingicon"})],v.prototype,"trailingIcon",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean,reflect:!0})],v.prototype,"fullwidth",void 0),(0,n.__decorate)([(0,o.Cb)({type:String})],v.prototype,"icon",void 0),(0,n.__decorate)([(0,o.Cb)({type:String})],v.prototype,"label",void 0),(0,n.__decorate)([(0,o.Cb)({type:Boolean})],v.prototype,"expandContent",void 0),(0,n.__decorate)([(0,o.IO)("#button")],v.prototype,"buttonElement",void 0),(0,n.__decorate)([(0,o.GC)("mwc-ripple")],v.prototype,"ripple",void 0),(0,n.__decorate)([(0,o.SB)()],v.prototype,"shouldRenderRipple",void 0),(0,n.__decorate)([(0,o.hO)({passive:!0})],v.prototype,"handleRippleActivate",null);var g=i(22344);let y=class extends v{};y.styles=[g.W],y=(0,n.__decorate)([(0,o.Mo)("mwc-button")],y)},22344:function(t,e,i){i.d(e,{W:()=>o});let n;const o=(0,i(57243).iv)(n||(n=(t=>t)`.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase)}.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:0 0}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:0}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}.mdc-button .mdc-button__icon[dir=rtl],[dir=rtl] .mdc-button .mdc-button__icon{margin-left:8px;margin-right:0}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{display:none}@media screen and (forced-colors:active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:calc(100% + 4px);width:calc(100% + 4px);display:block}}@media screen and (forced-colors:active)and (forced-colors:active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors:active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors:active)and (forced-colors:active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{border-color:CanvasText}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}.mdc-button__label+.mdc-button__icon[dir=rtl],[dir=rtl] .mdc-button__label+.mdc-button__icon{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(.4, 0, .2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:transparent}.mdc-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.mdc-button:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-button:disabled{color:rgba(0,0,0,.38)}.mdc-button .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.mdc-button--raised,.mdc-button--unelevated{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{background-color:rgba(0,0,0,.12)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{color:rgba(0,0,0,.38)}.mdc-button--raised .mdc-button__icon,.mdc-button--unelevated .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--raised .mdc-button__ripple,.mdc-button--unelevated .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.mdc-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.mdc-button--outlined:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-button--outlined:disabled{color:rgba(0,0,0,.38)}.mdc-button--outlined .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--outlined .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.mdc-button--outlined:not(:disabled){border-color:rgba(0,0,0,.12)}.mdc-button--outlined:disabled{border-color:rgba(0,0,0,.12)}.mdc-button--outlined.mdc-button--icon-trailing{padding:0 11px 0 15px}.mdc-button--outlined.mdc-button--icon-leading{padding:0 15px 0 11px}.mdc-button--outlined .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:1px}.mdc-button--outlined .mdc-button__touch{left:calc(-1 * 1px);width:calc(100% + 2 * 1px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.mdc-button--raised:focus,.mdc-button--raised:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12)}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0,0,0,.2),0px 8px 10px 1px rgba(0,0,0,.14),0px 3px 14px 2px rgba(0,0,0,.12)}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0,0,0,.2),0px 0px 0px 0px rgba(0,0,0,.14),0px 0px 0px 0px rgba(0,0,0,.12)}:host{display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:top}:host([fullwidth]){width:100%}:host([raised]),:host([unelevated]){--mdc-ripple-color:#fff;--mdc-ripple-focus-opacity:0.24;--mdc-ripple-hover-opacity:0.08;--mdc-ripple-press-opacity:0.24}.leading-icon .mdc-button__icon,.leading-icon ::slotted(*),.trailing-icon .mdc-button__icon,.trailing-icon ::slotted(*){margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.leading-icon .mdc-button__icon[dir=rtl],.leading-icon ::slotted([dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl],.trailing-icon ::slotted([dir=rtl]),[dir=rtl] .leading-icon .mdc-button__icon,[dir=rtl] .leading-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,[dir=rtl] .trailing-icon ::slotted(*){margin-left:8px;margin-right:0}.trailing-icon .mdc-button__icon,.trailing-icon ::slotted(*){margin-left:8px;margin-right:0}.trailing-icon .mdc-button__icon[dir=rtl],.trailing-icon ::slotted([dir=rtl]),[dir=rtl] .trailing-icon .mdc-button__icon,[dir=rtl] .trailing-icon ::slotted(*){margin-left:0;margin-right:8px}.slot-container{display:inline-flex;align-items:center;justify-content:center}.slot-container.flex{flex:auto}.mdc-button{flex:auto;overflow:hidden;padding-left:8px;padding-left:var(--mdc-button-horizontal-padding,8px);padding-right:8px;padding-right:var(--mdc-button-horizontal-padding,8px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);box-shadow:var(--mdc-button-raised-box-shadow,0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12))}.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12);box-shadow:var(--mdc-button-raised-box-shadow-focus,var(--mdc-button-raised-box-shadow-hover,0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12)))}.mdc-button--raised:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12);box-shadow:var(--mdc-button-raised-box-shadow-hover,0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12))}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0,0,0,.2),0px 8px 10px 1px rgba(0,0,0,.14),0px 3px 14px 2px rgba(0,0,0,.12);box-shadow:var(--mdc-button-raised-box-shadow-active,0px 5px 5px -3px rgba(0,0,0,.2),0px 8px 10px 1px rgba(0,0,0,.14),0px 3px 14px 2px rgba(0,0,0,.12))}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0,0,0,.2),0px 0px 0px 0px rgba(0,0,0,.14),0px 0px 0px 0px rgba(0,0,0,.12);box-shadow:var(--mdc-button-raised-box-shadow-disabled,0px 0px 0px 0px rgba(0,0,0,.2),0px 0px 0px 0px rgba(0,0,0,.14),0px 0px 0px 0px rgba(0,0,0,.12))}.mdc-button--raised,.mdc-button--unelevated{padding-left:16px;padding-left:var(--mdc-button-horizontal-padding,16px);padding-right:16px;padding-right:var(--mdc-button-horizontal-padding,16px)}.mdc-button--outlined{border-width:1px;border-width:var(--mdc-button-outline-width,1px);padding-left:calc(16px - 1px);padding-left:calc(var(--mdc-button-horizontal-padding,16px) - var(--mdc-button-outline-width,1px));padding-right:calc(16px - 1px);padding-right:calc(var(--mdc-button-horizontal-padding,16px) - var(--mdc-button-outline-width,1px))}.mdc-button--outlined:not(:disabled){border-color:rgba(0,0,0,.12);border-color:var(--mdc-button-outline-color,rgba(0,0,0,.12))}.mdc-button--outlined .ripple{top:calc(-1 * 1px);top:calc(-1 * var(--mdc-button-outline-width,1px));left:calc(-1 * 1px);left:calc(-1 * var(--mdc-button-outline-width,1px));right:initial;right:initial;border-width:1px;border-width:var(--mdc-button-outline-width,1px);border-style:solid;border-color:transparent}.mdc-button--outlined .ripple[dir=rtl],[dir=rtl] .mdc-button--outlined .ripple{left:initial;left:initial;right:calc(-1 * 1px);right:calc(-1 * var(--mdc-button-outline-width,1px))}.mdc-button--dense{height:28px;margin-top:0;margin-bottom:0}.mdc-button--dense .mdc-button__touch{height:100%}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-button{color:rgba(0,0,0,.38);color:var(--mdc-button-disabled-ink-color,rgba(0,0,0,.38))}:host([disabled]) .mdc-button--raised,:host([disabled]) .mdc-button--unelevated{background-color:rgba(0,0,0,.12);background-color:var(--mdc-button-disabled-fill-color,rgba(0,0,0,.12))}:host([disabled]) .mdc-button--outlined{border-color:rgba(0,0,0,.12);border-color:var(--mdc-button-disabled-outline-color,rgba(0,0,0,.12))}`))},4918:function(t,e,i){i.d(e,{a:()=>g});i(71695),i(40251),i(47021);var n=i(9065),o=i(80573),r={ROOT:"mdc-form-field"},s={LABEL_SELECTOR:".mdc-form-field > label"};const a=function(t){function e(i){var o=t.call(this,(0,n.__assign)((0,n.__assign)({},e.defaultAdapter),i))||this;return o.click=function(){o.handleClick()},o}return(0,n.__extends)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return r},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return s},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},e.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){t.adapter.deactivateInputRipple()}))},e}(o.K);var l=i(11911),h=i(88618),d=i(78611),c=i(57243),u=i(50778),f=i(35359);let p,v=t=>t;class g extends l.H{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=a}createAdapter(){return{registerInteractionHandler:(t,e)=>{this.labelEl.addEventListener(t,e)},deregisterInteractionHandler:(t,e)=>{this.labelEl.removeEventListener(t,e)},activateInputRipple:async()=>{const t=this.input;if(t instanceof h.Wg){const e=await t.ripple;e&&e.startPress()}},deactivateInputRipple:async()=>{const t=this.input;if(t instanceof h.Wg){const e=await t.ripple;e&&e.endPress()}}}}get input(){var t,e;return null!==(e=null===(t=this.slottedInputs)||void 0===t?void 0:t[0])&&void 0!==e?e:null}render(){const t={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return(0,c.dy)(p||(p=v` <div class="mdc-form-field ${0}"> <slot></slot> <label class="mdc-label" @click="${0}">${0}</label> </div>`),(0,f.$)(t),this._labelClick,this.label)}click(){this._labelClick()}_labelClick(){const t=this.input;t&&(t.focus(),t.click())}}(0,n.__decorate)([(0,u.Cb)({type:Boolean})],g.prototype,"alignEnd",void 0),(0,n.__decorate)([(0,u.Cb)({type:Boolean})],g.prototype,"spaceBetween",void 0),(0,n.__decorate)([(0,u.Cb)({type:Boolean})],g.prototype,"nowrap",void 0),(0,n.__decorate)([(0,u.Cb)({type:String}),(0,d.P)((async function(t){var e;null===(e=this.input)||void 0===e||e.setAttribute("aria-label",t)}))],g.prototype,"label",void 0),(0,n.__decorate)([(0,u.IO)(".mdc-form-field")],g.prototype,"mdcRoot",void 0),(0,n.__decorate)([(0,u.vZ)("",!0,"*")],g.prototype,"slottedInputs",void 0),(0,n.__decorate)([(0,u.IO)("label")],g.prototype,"labelEl",void 0)},6394:function(t,e,i){i.d(e,{W:()=>o});let n;const o=(0,i(57243).iv)(n||(n=(t=>t)`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}.mdc-form-field>label[dir=rtl],[dir=rtl] .mdc-form-field>label{margin-left:auto;margin-right:0}.mdc-form-field>label[dir=rtl],[dir=rtl] .mdc-form-field>label{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}.mdc-form-field--align-end>label[dir=rtl],[dir=rtl] .mdc-form-field--align-end>label{margin-left:0;margin-right:auto}.mdc-form-field--align-end>label[dir=rtl],[dir=rtl] .mdc-form-field--align-end>label{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}.mdc-form-field--space-between>label[dir=rtl],[dir=rtl] .mdc-form-field--space-between>label{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}::slotted(mwc-switch){margin-right:10px}::slotted(mwc-switch[dir=rtl]),[dir=rtl] ::slotted(mwc-switch){margin-left:10px}`))},93695:function(t,e,i){var n=i(9065),o=i(57243),r=i(50778);let s;const a=(0,o.iv)(s||(s=(t=>t)`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`));let l,h=t=>t,d=class extends o.oi{render(){return(0,o.dy)(l||(l=h`<span><slot></slot></span>`))}};d.styles=[a],d=(0,n.__decorate)([(0,r.Mo)("mwc-icon")],d)},67424:function(t,e,i){i.d(e,{L2:()=>qO,qg:()=>WO});i(63721),i(52247),i(60933),i(71695),i(92745),i(52805),i(61495),i(61893),i(32126),i(82328),i(55751),i(26200),i(25754),i(22246),i(43451),i(9359),i(56475),i(25677),i(31526),i(70104),i(48136),i(52924),i(77439),i(19423),i(39200),i(40251),i(91895),i(87672),i(19134),i(5740),i(11740),i(44495),i(97003),i(32114),i(81804),i(92789),i(36810),i(14953),i(58402),i(31503),i(16440),i(2213),i(57385),i(71375),i(15524),i(20267),i(21917),i(56193),i(25020),i(86913),i(47021),i(68289);function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={exports:{}},a=function(t){return t&&t.Math===Math&&t},l=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof o&&o)||function(){return this}()||o||Function("return this")(),h=function(t){try{return!!t()}catch(e){return!0}},d=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=d,u=Function.prototype,f=u.apply,p=u.call,v="object"==typeof Reflect&&Reflect.apply||(c?p.bind(f):function(){return p.apply(f,arguments)}),g=d,y=Function.prototype,m=y.call,b=g&&y.bind.bind(m,m),w=g?b:function(t){return function(){return m.apply(t,arguments)}},x=w,_=x({}.toString),k=x("".slice),E=function(t){return k(_(t),8,-1)},O=E,C=w,S=function(t){if("Function"===O(t))return C(t)},T="object"==typeof document&&document.all,P={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},I=P.all,M=P.IS_HTMLDDA?function(t){return"function"==typeof t||t===I}:function(t){return"function"==typeof t},D={},A=!h((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),B=d,F=Function.prototype.call,z=B?F.bind(F):function(){return F.apply(F,arguments)},N={},j={}.propertyIsEnumerable,R=Object.getOwnPropertyDescriptor,L=R&&!j.call({1:2},1);N.f=L?function(t){var e=R(this,t);return!!e&&e.enumerable}:j;var H,W,q=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},U=h,V=E,Y=Object,X=w("".split),$=U((function(){return!Y("z").propertyIsEnumerable(0)}))?function(t){return"String"===V(t)?X(t,""):Y(t)}:Y,G=function(t){return null==t},K=G,Z=TypeError,Q=function(t){if(K(t))throw new Z("Can't call method on "+t);return t},J=$,tt=Q,et=function(t){return J(tt(t))},it=M,nt=P.all,ot=P.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:it(t)||t===nt}:function(t){return"object"==typeof t?null!==t:it(t)},rt={},st=rt,at=l,lt=M,ht=function(t){return lt(t)?t:void 0},dt=function(t,e){return arguments.length<2?ht(st[t])||ht(at[t]):st[t]&&st[t][e]||at[t]&&at[t][e]},ct=w({}.isPrototypeOf),ut="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ft=l,pt=ut,vt=ft.process,gt=ft.Deno,yt=vt&&vt.versions||gt&>.version,mt=yt&&yt.v8;mt&&(W=(H=mt.split("."))[0]>0&&H[0]<4?1:+(H[0]+H[1])),!W&&pt&&(!(H=pt.match(/Edge\/(\d+)/))||H[1]>=74)&&(H=pt.match(/Chrome\/(\d+)/))&&(W=+H[1]);var bt=W,wt=bt,xt=h,_t=l.String,kt=!!Object.getOwnPropertySymbols&&!xt((function(){var t=Symbol("symbol detection");return!_t(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&wt&&wt<41})),Et=kt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ot=dt,Ct=M,St=ct,Tt=Object,Pt=Et?function(t){return"symbol"==typeof t}:function(t){var e=Ot("Symbol");return Ct(e)&&St(e.prototype,Tt(t))},It=String,Mt=function(t){try{return It(t)}catch(e){return"Object"}},Dt=M,At=Mt,Bt=TypeError,Ft=function(t){if(Dt(t))return t;throw new Bt(At(t)+" is not a function")},zt=Ft,Nt=G,jt=function(t,e){var i=t[e];return Nt(i)?void 0:zt(i)},Rt=z,Lt=M,Ht=ot,Wt=TypeError,qt={exports:{}},Ut=l,Vt=Object.defineProperty,Yt=function(t,e){try{Vt(Ut,t,{value:e,configurable:!0,writable:!0})}catch(i){Ut[t]=e}return e},Xt="__core-js_shared__",$t=l[Xt]||Yt(Xt,{}),Gt=$t;(qt.exports=function(t,e){return Gt[t]||(Gt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Kt=qt.exports,Zt=Q,Qt=Object,Jt=function(t){return Qt(Zt(t))},te=Jt,ee=w({}.hasOwnProperty),ie=Object.hasOwn||function(t,e){return ee(te(t),e)},ne=w,oe=0,re=Math.random(),se=ne(1..toString),ae=function(t){return"Symbol("+(void 0===t?"":t)+")_"+se(++oe+re,36)},le=Kt,he=ie,de=ae,ce=kt,ue=Et,fe=l.Symbol,pe=le("wks"),ve=ue?fe.for||fe:fe&&fe.withoutSetter||de,ge=function(t){return he(pe,t)||(pe[t]=ce&&he(fe,t)?fe[t]:ve("Symbol."+t)),pe[t]},ye=z,me=ot,be=Pt,we=jt,xe=function(t,e){var i,n;if("string"===e&&Lt(i=t.toString)&&!Ht(n=Rt(i,t)))return n;if(Lt(i=t.valueOf)&&!Ht(n=Rt(i,t)))return n;if("string"!==e&&Lt(i=t.toString)&&!Ht(n=Rt(i,t)))return n;throw new Wt("Can't convert object to primitive value")},_e=TypeError,ke=ge("toPrimitive"),Ee=function(t,e){if(!me(t)||be(t))return t;var i,n=we(t,ke);if(n){if(void 0===e&&(e="default"),i=ye(n,t,e),!me(i)||be(i))return i;throw new _e("Can't convert object to primitive value")}return void 0===e&&(e="number"),xe(t,e)},Oe=Pt,Ce=function(t){var e=Ee(t,"string");return Oe(e)?e:e+""},Se=ot,Te=l.document,Pe=Se(Te)&&Se(Te.createElement),Ie=function(t){return Pe?Te.createElement(t):{}},Me=Ie,De=!A&&!h((function(){return 7!==Object.defineProperty(Me("div"),"a",{get:function(){return 7}}).a})),Ae=A,Be=z,Fe=N,ze=q,Ne=et,je=Ce,Re=ie,Le=De,He=Object.getOwnPropertyDescriptor;D.f=Ae?He:function(t,e){if(t=Ne(t),e=je(e),Le)try{return He(t,e)}catch(i){}if(Re(t,e))return ze(!Be(Fe.f,t,e),t[e])};var We=h,qe=M,Ue=/#|\.prototype\./,Ve=function(t,e){var i=Xe[Ye(t)];return i===Ge||i!==$e&&(qe(e)?We(e):!!e)},Ye=Ve.normalize=function(t){return String(t).replace(Ue,".").toLowerCase()},Xe=Ve.data={},$e=Ve.NATIVE="N",Ge=Ve.POLYFILL="P",Ke=Ve,Ze=Ft,Qe=d,Je=S(S.bind),ti=function(t,e){return Ze(t),void 0===e?t:Qe?Je(t,e):function(){return t.apply(e,arguments)}},ei={},ii=A&&h((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ni=ot,oi=String,ri=TypeError,si=function(t){if(ni(t))return t;throw new ri(oi(t)+" is not an object")},ai=A,li=De,hi=ii,di=si,ci=Ce,ui=TypeError,fi=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,vi="enumerable",gi="configurable",yi="writable";ei.f=ai?hi?function(t,e,i){if(di(t),e=ci(e),di(i),"function"==typeof t&&"prototype"===e&&"value"in i&&yi in i&&!i[yi]){var n=pi(t,e);n&&n[yi]&&(t[e]=i.value,i={configurable:gi in i?i[gi]:n[gi],enumerable:vi in i?i[vi]:n[vi],writable:!1})}return fi(t,e,i)}:fi:function(t,e,i){if(di(t),e=ci(e),di(i),li)try{return fi(t,e,i)}catch(n){}if("get"in i||"set"in i)throw new ui("Accessors not supported");return"value"in i&&(t[e]=i.value),t};var mi=ei,bi=q,wi=A?function(t,e,i){return mi.f(t,e,bi(1,i))}:function(t,e,i){return t[e]=i,t},xi=l,_i=v,ki=S,Ei=M,Oi=D.f,Ci=Ke,Si=rt,Ti=ti,Pi=wi,Ii=ie,Mi=function(t){var e=function e(i,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,n)}return new t(i,n,o)}return _i(t,this,arguments)};return e.prototype=t.prototype,e},Di=function(t,e){var i,n,o,r,s,a,l,h,d,c=t.target,u=t.global,f=t.stat,p=t.proto,v=u?xi:f?xi[c]:(xi[c]||{}).prototype,g=u?Si:Si[c]||Pi(Si,c,{})[c],y=g.prototype;for(r in e)n=!(i=Ci(u?r:c+(f?".":"#")+r,t.forced))&&v&&Ii(v,r),a=g[r],n&&(l=t.dontCallGetSet?(d=Oi(v,r))&&d.value:v[r]),s=n&&l?l:e[r],n&&typeof a==typeof s||(h=t.bind&&n?Ti(s,xi):t.wrap&&n?Mi(s):p&&Ei(s)?ki(s):s,(t.sham||s&&s.sham||a&&a.sham)&&Pi(h,"sham",!0),Pi(g,r,h),p&&(Ii(Si,o=c+"Prototype")||Pi(Si,o,{}),Pi(Si[o],r,s),t.real&&y&&(i||!y[r])&&Pi(y,r,s)))},Ai=Di,Bi=A,Fi=ei.f;Ai({target:"Object",stat:!0,forced:Object.defineProperty!==Fi,sham:!Bi},{defineProperty:Fi});var zi=rt.Object,Ni=s.exports=function(t,e,i){return zi.defineProperty(t,e,i)};zi.defineProperty.sham&&(Ni.sham=!0);var ji=s.exports,Ri=ji,Li=r(Ri),Hi=E,Wi=Array.isArray||function(t){return"Array"===Hi(t)},qi=Math.ceil,Ui=Math.floor,Vi=Math.trunc||function(t){var e=+t;return(e>0?Ui:qi)(e)},Yi=function(t){var e=+t;return e!=e||0===e?0:Vi(e)},Xi=Yi,$i=Math.min,Gi=function(t){return t>0?$i(Xi(t),9007199254740991):0},Ki=function(t){return Gi(t.length)},Zi=TypeError,Qi=function(t){if(t>9007199254740991)throw Zi("Maximum allowed index exceeded");return t},Ji=Ce,tn=ei,en=q,nn=function(t,e,i){var n=Ji(e);n in t?tn.f(t,n,en(0,i)):t[n]=i},on={};on[ge("toStringTag")]="z";var rn="[object z]"===String(on),sn=rn,an=M,ln=E,hn=ge("toStringTag"),dn=Object,cn="Arguments"===ln(function(){return arguments}()),un=sn?ln:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(i){}}(e=dn(t),hn))?i:cn?ln(e):"Object"===(n=ln(e))&&an(e.callee)?"Arguments":n},fn=M,pn=$t,vn=w(Function.toString);fn(pn.inspectSource)||(pn.inspectSource=function(t){return vn(t)});var gn=pn.inspectSource,yn=w,mn=h,bn=M,wn=un,xn=gn,_n=function(){},kn=[],En=dt("Reflect","construct"),On=/^\s*(?:class|function)\b/,Cn=yn(On.exec),Sn=!On.test(_n),Tn=function(t){if(!bn(t))return!1;try{return En(_n,kn,t),!0}catch(e){return!1}},Pn=function(t){if(!bn(t))return!1;switch(wn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Sn||!!Cn(On,xn(t))}catch(e){return!0}};Pn.sham=!0;var In=!En||mn((function(){var t;return Tn(Tn.call)||!Tn(Object)||!Tn((function(){t=!0}))||t}))?Pn:Tn,Mn=Wi,Dn=In,An=ot,Bn=ge("species"),Fn=Array,zn=function(t){var e;return Mn(t)&&(e=t.constructor,(Dn(e)&&(e===Fn||Mn(e.prototype))||An(e)&&null===(e=e[Bn]))&&(e=void 0)),void 0===e?Fn:e},Nn=function(t,e){return new(zn(t))(0===e?0:e)},jn=h,Rn=bt,Ln=ge("species"),Hn=function(t){return Rn>=51||!jn((function(){var e=[];return(e.constructor={})[Ln]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Wn=Di,qn=h,Un=Wi,Vn=ot,Yn=Jt,Xn=Ki,$n=Qi,Gn=nn,Kn=Nn,Zn=Hn,Qn=bt,Jn=ge("isConcatSpreadable"),to=Qn>=51||!qn((function(){var t=[];return t[Jn]=!1,t.concat()[0]!==t})),eo=function(t){if(!Vn(t))return!1;var e=t[Jn];return void 0!==e?!!e:Un(t)};Wn({target:"Array",proto:!0,arity:1,forced:!to||!Zn("concat")},{concat:function(t){var e,i,n,o,r,s=Yn(this),a=Kn(s,0),l=0;for(e=-1,n=arguments.length;e<n;e++)if(eo(r=-1===e?s:arguments[e]))for(o=Xn(r),$n(l+o),i=0;i<o;i++,l++)i in r&&Gn(a,l,r[i]);else $n(l+1),Gn(a,l++,r);return a.length=l,a}});var io=un,no=String,oo=function(t){if("Symbol"===io(t))throw new TypeError("Cannot convert a Symbol value to a string");return no(t)},ro={},so=Yi,ao=Math.max,lo=Math.min,ho=function(t,e){var i=so(t);return i<0?ao(i+e,0):lo(i,e)},co=et,uo=ho,fo=Ki,po=function(t){return function(e,i,n){var o,r=co(e),s=fo(r),a=uo(n,s);if(t&&i!=i){for(;s>a;)if((o=r[a++])!=o)return!0}else for(;s>a;a++)if((t||a in r)&&r[a]===i)return t||a||0;return!t&&-1}},vo={includes:po(!0),indexOf:po(!1)},go={},yo=ie,mo=et,bo=vo.indexOf,wo=go,xo=w([].push),_o=function(t,e){var i,n=mo(t),o=0,r=[];for(i in n)!yo(wo,i)&&yo(n,i)&&xo(r,i);for(;e.length>o;)yo(n,i=e[o++])&&(~bo(r,i)||xo(r,i));return r},ko=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Eo=_o,Oo=ko,Co=Object.keys||function(t){return Eo(t,Oo)},So=A,To=ii,Po=ei,Io=si,Mo=et,Do=Co;ro.f=So&&!To?Object.defineProperties:function(t,e){Io(t);for(var i,n=Mo(e),o=Do(e),r=o.length,s=0;r>s;)Po.f(t,i=o[s++],n[i]);return t};var Ao,Bo=dt("document","documentElement"),Fo=ae,zo=Kt("keys"),No=function(t){return zo[t]||(zo[t]=Fo(t))},jo=si,Ro=ro,Lo=ko,Ho=go,Wo=Bo,qo=Ie,Uo="prototype",Vo="script",Yo=No("IE_PROTO"),Xo=function(){},$o=function(t){return"<"+Vo+">"+t+"</"+Vo+">"},Go=function(t){t.write($o("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ko=function(){try{Ao=new ActiveXObject("htmlfile")}catch(o){}var t,e,i;Ko="undefined"!=typeof document?document.domain&&Ao?Go(Ao):(e=qo("iframe"),i="java"+Vo+":",e.style.display="none",Wo.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write($o("document.F=Object")),t.close(),t.F):Go(Ao);for(var n=Lo.length;n--;)delete Ko[Uo][Lo[n]];return Ko()};Ho[Yo]=!0;var Zo=Object.create||function(t,e){var i;return null!==t?(Xo[Uo]=jo(t),i=new Xo,Xo[Uo]=null,i[Yo]=t):i=Ko(),void 0===e?i:Ro.f(i,e)},Qo={},Jo=_o,tr=ko.concat("length","prototype");Qo.f=Object.getOwnPropertyNames||function(t){return Jo(t,tr)};var er={},ir=ho,nr=Ki,or=nn,rr=Array,sr=Math.max,ar=function(t,e,i){for(var n=nr(t),o=ir(e,n),r=ir(void 0===i?n:i,n),s=rr(sr(r-o,0)),a=0;o<r;o++,a++)or(s,a,t[o]);return s.length=a,s},lr=E,hr=et,dr=Qo.f,cr=ar,ur="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];er.f=function(t){return ur&&"Window"===lr(t)?function(t){try{return dr(t)}catch(e){return cr(ur)}}(t):dr(hr(t))};var fr={};fr.f=Object.getOwnPropertySymbols;var pr=wi,vr=function(t,e,i,n){return n&&n.enumerable?t[e]=i:pr(t,e,i),t},gr=ei,yr=function(t,e,i){return gr.f(t,e,i)},mr={},br=ge;mr.f=br;var wr,xr,_r,kr=rt,Er=ie,Or=mr,Cr=ei.f,Sr=function(t){var e=kr.Symbol||(kr.Symbol={});Er(e,t)||Cr(e,t,{value:Or.f(t)})},Tr=z,Pr=dt,Ir=ge,Mr=vr,Dr=function(){var t=Pr("Symbol"),e=t&&t.prototype,i=e&&e.valueOf,n=Ir("toPrimitive");e&&!e[n]&&Mr(e,n,(function(t){return Tr(i,this)}),{arity:1})},Ar=un,Br=rn?{}.toString:function(){return"[object "+Ar(this)+"]"},Fr=rn,zr=ei.f,Nr=wi,jr=ie,Rr=Br,Lr=ge("toStringTag"),Hr=function(t,e,i,n){if(t){var o=i?t:t.prototype;jr(o,Lr)||zr(o,Lr,{configurable:!0,value:e}),n&&!Fr&&Nr(o,"toString",Rr)}},Wr=M,qr=l.WeakMap,Ur=Wr(qr)&&/native code/.test(String(qr)),Vr=l,Yr=ot,Xr=wi,$r=ie,Gr=$t,Kr=No,Zr=go,Qr="Object already initialized",Jr=Vr.TypeError,ts=Vr.WeakMap;if(Ur||Gr.state){var es=Gr.state||(Gr.state=new ts);es.get=es.get,es.has=es.has,es.set=es.set,wr=function(t,e){if(es.has(t))throw new Jr(Qr);return e.facade=t,es.set(t,e),e},xr=function(t){return es.get(t)||{}},_r=function(t){return es.has(t)}}else{var is=Kr("state");Zr[is]=!0,wr=function(t,e){if($r(t,is))throw new Jr(Qr);return e.facade=t,Xr(t,is,e),e},xr=function(t){return $r(t,is)?t[is]:{}},_r=function(t){return $r(t,is)}}var ns={set:wr,get:xr,has:_r,enforce:function(t){return _r(t)?xr(t):wr(t,{})},getterFor:function(t){return function(e){var i;if(!Yr(e)||(i=xr(e)).type!==t)throw new Jr("Incompatible receiver, "+t+" required");return i}}},os=ti,rs=$,ss=Jt,as=Ki,ls=Nn,hs=w([].push),ds=function(t){var e=1===t,i=2===t,n=3===t,o=4===t,r=6===t,s=7===t,a=5===t||r;return function(l,h,d,c){for(var u,f,p=ss(l),v=rs(p),g=os(h,d),y=as(v),m=0,b=c||ls,w=e?b(l,y):i||s?b(l,0):void 0;y>m;m++)if((a||m in v)&&(f=g(u=v[m],m,p),t))if(e)w[m]=f;else if(f)switch(t){case 3:return!0;case 5:return u;case 6:return m;case 2:hs(w,u)}else switch(t){case 4:return!1;case 7:hs(w,u)}return r?-1:n||o?o:w}},cs={forEach:ds(0),map:ds(1),filter:ds(2),some:ds(3),every:ds(4),find:ds(5),findIndex:ds(6),filterReject:ds(7)},us=Di,fs=l,ps=z,vs=w,gs=A,ys=kt,ms=h,bs=ie,ws=ct,xs=si,_s=et,ks=Ce,Es=oo,Os=q,Cs=Zo,Ss=Co,Ts=Qo,Ps=er,Is=fr,Ms=D,Ds=ei,As=ro,Bs=N,Fs=vr,zs=yr,Ns=Kt,js=go,Rs=ae,Ls=ge,Hs=mr,Ws=Sr,qs=Dr,Us=Hr,Vs=ns,Ys=cs.forEach,Xs=No("hidden"),$s="Symbol",Gs="prototype",Ks=Vs.set,Zs=Vs.getterFor($s),Qs=Object[Gs],Js=fs.Symbol,ta=Js&&Js[Gs],ea=fs.RangeError,ia=fs.TypeError,na=fs.QObject,oa=Ms.f,ra=Ds.f,sa=Ps.f,aa=Bs.f,la=vs([].push),ha=Ns("symbols"),da=Ns("op-symbols"),ca=Ns("wks"),ua=!na||!na[Gs]||!na[Gs].findChild,fa=function(t,e,i){var n=oa(Qs,e);n&&delete Qs[e],ra(t,e,i),n&&t!==Qs&&ra(Qs,e,n)},pa=gs&&ms((function(){return 7!==Cs(ra({},"a",{get:function(){return ra(this,"a",{value:7}).a}})).a}))?fa:ra,va=function(t,e){var i=ha[t]=Cs(ta);return Ks(i,{type:$s,tag:t,description:e}),gs||(i.description=e),i},ga=function(t,e,i){t===Qs&&ga(da,e,i),xs(t);var n=ks(e);return xs(i),bs(ha,n)?(i.enumerable?(bs(t,Xs)&&t[Xs][n]&&(t[Xs][n]=!1),i=Cs(i,{enumerable:Os(0,!1)})):(bs(t,Xs)||ra(t,Xs,Os(1,{})),t[Xs][n]=!0),pa(t,n,i)):ra(t,n,i)},ya=function(t,e){xs(t);var i=_s(e),n=Ss(i).concat(xa(i));return Ys(n,(function(e){gs&&!ps(ma,i,e)||ga(t,e,i[e])})),t},ma=function(t){var e=ks(t),i=ps(aa,this,e);return!(this===Qs&&bs(ha,e)&&!bs(da,e))&&(!(i||!bs(this,e)||!bs(ha,e)||bs(this,Xs)&&this[Xs][e])||i)},ba=function(t,e){var i=_s(t),n=ks(e);if(i!==Qs||!bs(ha,n)||bs(da,n)){var o=oa(i,n);return!o||!bs(ha,n)||bs(i,Xs)&&i[Xs][n]||(o.enumerable=!0),o}},wa=function(t){var e=sa(_s(t)),i=[];return Ys(e,(function(t){bs(ha,t)||bs(js,t)||la(i,t)})),i},xa=function(t){var e=t===Qs,i=sa(e?da:_s(t)),n=[];return Ys(i,(function(t){!bs(ha,t)||e&&!bs(Qs,t)||la(n,ha[t])})),n};ys||(Js=function(){if(ws(ta,this))throw new ia("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Es(arguments[0]):void 0,e=Rs(t);return gs&&ua&&pa(Qs,e,{configurable:!0,set:function t(i){var n=void 0===this?fs:this;n===Qs&&ps(t,da,i),bs(n,Xs)&&bs(n[Xs],e)&&(n[Xs][e]=!1);var o=Os(1,i);try{pa(n,e,o)}catch(r){if(!(r instanceof ea))throw r;fa(n,e,o)}}}),va(e,t)},Fs(ta=Js[Gs],"toString",(function(){return Zs(this).tag})),Fs(Js,"withoutSetter",(function(t){return va(Rs(t),t)})),Bs.f=ma,Ds.f=ga,As.f=ya,Ms.f=ba,Ts.f=Ps.f=wa,Is.f=xa,Hs.f=function(t){return va(Ls(t),t)},gs&&zs(ta,"description",{configurable:!0,get:function(){return Zs(this).description}})),us({global:!0,constructor:!0,wrap:!0,forced:!ys,sham:!ys},{Symbol:Js}),Ys(Ss(ca),(function(t){Ws(t)})),us({target:$s,stat:!0,forced:!ys},{useSetter:function(){ua=!0},useSimple:function(){ua=!1}}),us({target:"Object",stat:!0,forced:!ys,sham:!gs},{create:function(t,e){return void 0===e?Cs(t):ya(Cs(t),e)},defineProperty:ga,defineProperties:ya,getOwnPropertyDescriptor:ba}),us({target:"Object",stat:!0,forced:!ys},{getOwnPropertyNames:wa}),qs(),Us(Js,$s),js[Xs]=!0;var _a=kt&&!!Symbol.for&&!!Symbol.keyFor,ka=Di,Ea=dt,Oa=ie,Ca=oo,Sa=Kt,Ta=_a,Pa=Sa("string-to-symbol-registry"),Ia=Sa("symbol-to-string-registry");ka({target:"Symbol",stat:!0,forced:!Ta},{for:function(t){var e=Ca(t);if(Oa(Pa,e))return Pa[e];var i=Ea("Symbol")(e);return Pa[e]=i,Ia[i]=e,i}});var Ma=Di,Da=ie,Aa=Pt,Ba=Mt,Fa=_a,za=Kt("symbol-to-string-registry");Ma({target:"Symbol",stat:!0,forced:!Fa},{keyFor:function(t){if(!Aa(t))throw new TypeError(Ba(t)+" is not a symbol");if(Da(za,t))return za[t]}});var Na=w([].slice),ja=Wi,Ra=M,La=E,Ha=oo,Wa=w([].push),qa=Di,Ua=dt,Va=v,Ya=z,Xa=w,$a=h,Ga=M,Ka=Pt,Za=Na,Qa=function(t){if(Ra(t))return t;if(ja(t)){for(var e=t.length,i=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?Wa(i,o):"number"!=typeof o&&"Number"!==La(o)&&"String"!==La(o)||Wa(i,Ha(o))}var r=i.length,s=!0;return function(t,e){if(s)return s=!1,e;if(ja(this))return e;for(var n=0;n<r;n++)if(i[n]===t)return e}}},Ja=kt,tl=String,el=Ua("JSON","stringify"),il=Xa(/./.exec),nl=Xa("".charAt),ol=Xa("".charCodeAt),rl=Xa("".replace),sl=Xa(1..toString),al=/[\uD800-\uDFFF]/g,ll=/^[\uD800-\uDBFF]$/,hl=/^[\uDC00-\uDFFF]$/,dl=!Ja||$a((function(){var t=Ua("Symbol")("stringify detection");return"[null]"!==el([t])||"{}"!==el({a:t})||"{}"!==el(Object(t))})),cl=$a((function(){return'"\\udf06\\ud834"'!==el("\udf06\ud834")||'"\\udead"'!==el("\udead")})),ul=function(t,e){var i=Za(arguments),n=Qa(e);if(Ga(n)||void 0!==t&&!Ka(t))return i[1]=function(t,e){if(Ga(n)&&(e=Ya(n,this,tl(t),e)),!Ka(e))return e},Va(el,null,i)},fl=function(t,e,i){var n=nl(i,e-1),o=nl(i,e+1);return il(ll,t)&&!il(hl,o)||il(hl,t)&&!il(ll,n)?"\\u"+sl(ol(t,0),16):t};el&&qa({target:"JSON",stat:!0,arity:3,forced:dl||cl},{stringify:function(t,e,i){var n=Za(arguments),o=Va(dl?ul:el,null,n);return cl&&"string"==typeof o?rl(o,al,fl):o}});var pl=fr,vl=Jt;Di({target:"Object",stat:!0,forced:!kt||h((function(){pl.f(1)}))},{getOwnPropertySymbols:function(t){var e=pl.f;return e?e(vl(t)):[]}}),Sr("asyncIterator"),Sr("hasInstance"),Sr("isConcatSpreadable"),Sr("iterator"),Sr("match"),Sr("matchAll"),Sr("replace"),Sr("search"),Sr("species"),Sr("split");var gl=Dr;Sr("toPrimitive"),gl();var yl=dt,ml=Hr;Sr("toStringTag"),ml(yl("Symbol"),"Symbol"),Sr("unscopables"),Hr(l.JSON,"JSON",!0);var bl,wl,xl,_l=rt.Symbol,kl={},El=A,Ol=ie,Cl=Function.prototype,Sl=El&&Object.getOwnPropertyDescriptor,Tl=Ol(Cl,"name"),Pl={EXISTS:Tl,PROPER:Tl&&"something"===function(){}.name,CONFIGURABLE:Tl&&(!El||El&&Sl(Cl,"name").configurable)},Il=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Ml=ie,Dl=M,Al=Jt,Bl=Il,Fl=No("IE_PROTO"),zl=Object,Nl=zl.prototype,jl=Bl?zl.getPrototypeOf:function(t){var e=Al(t);if(Ml(e,Fl))return e[Fl];var i=e.constructor;return Dl(i)&&e instanceof i?i.prototype:e instanceof zl?Nl:null},Rl=h,Ll=M,Hl=ot,Wl=Zo,ql=jl,Ul=vr,Vl=ge("iterator"),Yl=!1;[].keys&&("next"in(xl=[].keys())?(wl=ql(ql(xl)))!==Object.prototype&&(bl=wl):Yl=!0);var Xl=!Hl(bl)||Rl((function(){var t={};return bl[Vl].call(t)!==t}));Ll((bl=Xl?{}:Wl(bl))[Vl])||Ul(bl,Vl,(function(){return this}));var $l={IteratorPrototype:bl,BUGGY_SAFARI_ITERATORS:Yl},Gl=$l.IteratorPrototype,Kl=Zo,Zl=q,Ql=Hr,Jl=kl,th=function(){return this},eh=w,ih=Ft,nh=M,oh=String,rh=TypeError,sh=function(t,e,i){try{return eh(ih(Object.getOwnPropertyDescriptor(t,e)[i]))}catch(n){}},ah=si,lh=function(t){if("object"==typeof t||nh(t))return t;throw new rh("Can't set "+oh(t)+" as a prototype")},hh=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=sh(Object.prototype,"__proto__","set"))(i,[]),e=i instanceof Array}catch(n){}return function(i,n){return ah(i),lh(n),e?t(i,n):i.__proto__=n,i}}():void 0),dh=Di,ch=z,uh=Pl,fh=function(t,e,i,n){var o=e+" Iterator";return t.prototype=Kl(Gl,{next:Zl(+!n,i)}),Ql(t,o,!1,!0),Jl[o]=th,t},ph=jl,vh=Hr,gh=vr,yh=kl,mh=$l,bh=uh.PROPER,wh=mh.BUGGY_SAFARI_ITERATORS,xh=ge("iterator"),_h="keys",kh="values",Eh="entries",Oh=function(){return this},Ch=function(t,e,i,n,o,r,s){fh(i,e,n);var a,l,h,d=function(t){if(t===o&&v)return v;if(!wh&&t&&t in f)return f[t];switch(t){case _h:case kh:case Eh:return function(){return new i(this,t)}}return function(){return new i(this)}},c=e+" Iterator",u=!1,f=t.prototype,p=f[xh]||f["@@iterator"]||o&&f[o],v=!wh&&p||d(o),g="Array"===e&&f.entries||p;if(g&&(a=ph(g.call(new t)))!==Object.prototype&&a.next&&(vh(a,c,!0,!0),yh[c]=Oh),bh&&o===kh&&p&&p.name!==kh&&(u=!0,v=function(){return ch(p,this)}),o)if(l={values:d(kh),keys:r?v:d(_h),entries:d(Eh)},s)for(h in l)(wh||u||!(h in f))&&gh(f,h,l[h]);else dh({target:e,proto:!0,forced:wh||u},l);return s&&f[xh]!==v&&gh(f,xh,v,{name:o}),yh[e]=v,l},Sh=function(t,e){return{value:t,done:e}},Th=et,Ph=kl,Ih=ns;ei.f;var Mh=Ch,Dh=Sh,Ah="Array Iterator",Bh=Ih.set,Fh=Ih.getterFor(Ah);Mh(Array,"Array",(function(t,e){Bh(this,{type:Ah,target:Th(t),index:0,kind:e})}),(function(){var t=Fh(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=void 0,Dh(void 0,!0);switch(t.kind){case"keys":return Dh(i,!1);case"values":return Dh(e[i],!1)}return Dh([i,e[i]],!1)}),"values"),Ph.Arguments=Ph.Array;var zh={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Nh=l,jh=un,Rh=wi,Lh=kl,Hh=ge("toStringTag");for(var Wh in zh){var qh=Nh[Wh],Uh=qh&&qh.prototype;Uh&&jh(Uh)!==Hh&&Rh(Uh,Hh,Wh),Lh[Wh]=Lh.Array}var Vh=_l,Yh=ge,Xh=ei.f,$h=Yh("metadata"),Gh=Function.prototype;void 0===Gh[$h]&&Xh(Gh,$h,{value:null}),Sr("asyncDispose"),Sr("dispose"),Sr("metadata");var Kh=Vh,Zh=w,Qh=dt("Symbol"),Jh=Qh.keyFor,td=Zh(Qh.prototype.valueOf),ed=Qh.isRegisteredSymbol||function(t){try{return void 0!==Jh(td(t))}catch(e){return!1}};Di({target:"Symbol",stat:!0},{isRegisteredSymbol:ed});for(var id=Kt,nd=dt,od=w,rd=Pt,sd=ge,ad=nd("Symbol"),ld=ad.isWellKnownSymbol,hd=nd("Object","getOwnPropertyNames"),dd=od(ad.prototype.valueOf),cd=id("wks"),ud=0,fd=hd(ad),pd=fd.length;ud<pd;ud++)try{var vd=fd[ud];rd(ad[vd])&&sd(vd)}catch(UO){}var gd=function(t){if(ld&&ld(t))return!0;try{for(var e=dd(t),i=0,n=hd(cd),o=n.length;i<o;i++)if(cd[n[i]]==e)return!0}catch(UO){}return!1};Di({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:gd}),Sr("matcher"),Sr("observable"),Di({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:ed}),Di({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:gd}),Sr("metadataKey"),Sr("patternMatch"),Sr("replaceAll");var yd=Kh,md=r(yd),bd=w,wd=Yi,xd=oo,_d=Q,kd=bd("".charAt),Ed=bd("".charCodeAt),Od=bd("".slice),Cd=function(t){return function(e,i){var n,o,r=xd(_d(e)),s=wd(i),a=r.length;return s<0||s>=a?t?"":void 0:(n=Ed(r,s))<55296||n>56319||s+1===a||(o=Ed(r,s+1))<56320||o>57343?t?kd(r,s):n:t?Od(r,s,s+2):o-56320+(n-55296<<10)+65536}},Sd={codeAt:Cd(!1),charAt:Cd(!0)}.charAt,Td=oo,Pd=ns,Id=Ch,Md=Sh,Dd="String Iterator",Ad=Pd.set,Bd=Pd.getterFor(Dd);Id(String,"String",(function(t){Ad(this,{type:Dd,string:Td(t),index:0})}),(function(){var t,e=Bd(this),i=e.string,n=e.index;return n>=i.length?Md(void 0,!0):(t=Sd(i,n),e.index+=t.length,Md(t,!1))}));var Fd=mr.f("iterator"),zd=Fd,Nd=r(zd);function jd(t){return jd="function"==typeof md&&"symbol"==typeof Nd?function(t){return typeof t}:function(t){return t&&"function"==typeof md&&t.constructor===md&&t!==md.prototype?"symbol":typeof t},jd(t)}var Rd=r(mr.f("toPrimitive"));function Ld(t){var e=function(t,e){if("object"!==jd(t)||null===t)return t;var i=t[Rd];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==jd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===jd(e)?e:String(e)}function Hd(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Li(t,Ld(n.key),n)}}function Wd(t,e,i){return e&&Hd(t.prototype,e),i&&Hd(t,i),Li(t,"prototype",{writable:!1}),t}function qd(t,e,i){return(e=Ld(e))in t?Li(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Ud=w,Vd=Ft,Yd=ot,Xd=ie,$d=Na,Gd=d,Kd=Function,Zd=Ud([].concat),Qd=Ud([].join),Jd={},tc=Gd?Kd.bind:function(t){var e=Vd(this),i=e.prototype,n=$d(arguments,1),o=function(){var i=Zd(n,$d(arguments));return this instanceof o?function(t,e,i){if(!Xd(Jd,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Jd[e]=Kd("C,a","return new C("+Qd(n,",")+")")}return Jd[e](t,i)}(e,i.length,i):e.apply(t,i)};return Yd(i)&&(o.prototype=i),o},ec=tc;Di({target:"Function",proto:!0,forced:Function.bind!==ec},{bind:ec});var ic=l,nc=rt,oc=function(t,e){var i=nc[t+"Prototype"],n=i&&i[e];if(n)return n;var o=ic[t],r=o&&o.prototype;return r&&r[e]},rc=oc("Function","bind"),sc=ct,ac=rc,lc=Function.prototype,hc=function(t){var e=t.bind;return t===lc||sc(lc,t)&&e===lc.bind?ac:e},dc=r(hc),cc=Ft,uc=Jt,fc=$,pc=Ki,vc=TypeError,gc=function(t){return function(e,i,n,o){cc(i);var r=uc(e),s=fc(r),a=pc(r),l=t?a-1:0,h=t?-1:1;if(n<2)for(;;){if(l in s){o=s[l],l+=h;break}if(l+=h,t?l<0:a<=l)throw new vc("Reduce of empty array with no initial value")}for(;t?l>=0:a>l;l+=h)l in s&&(o=i(o,s[l],l,r));return o}},yc={left:gc(!1),right:gc(!0)},mc=h,bc=function(t,e){var i=[][t];return!!i&&mc((function(){i.call(null,e||function(){return 1},1)}))},wc="process"===E(l.process),xc=yc.left;Di({target:"Array",proto:!0,forced:!wc&&bt>79&&bt<83||!bc("reduce")},{reduce:function(t){var e=arguments.length;return xc(this,t,e,e>1?arguments[1]:void 0)}});var _c=oc("Array","reduce"),kc=ct,Ec=_c,Oc=Array.prototype,Cc=r((function(t){var e=t.reduce;return t===Oc||kc(Oc,t)&&e===Oc.reduce?Ec:e})),Sc=cs.filter;Di({target:"Array",proto:!0,forced:!Hn("filter")},{filter:function(t){return Sc(this,t,arguments.length>1?arguments[1]:void 0)}});var Tc=oc("Array","filter"),Pc=ct,Ic=Tc,Mc=Array.prototype,Dc=r((function(t){var e=t.filter;return t===Mc||Pc(Mc,t)&&e===Mc.filter?Ic:e})),Ac=cs.map;Di({target:"Array",proto:!0,forced:!Hn("map")},{map:function(t){return Ac(this,t,arguments.length>1?arguments[1]:void 0)}});var Bc=oc("Array","map"),Fc=ct,zc=Bc,Nc=Array.prototype,jc=r((function(t){var e=t.map;return t===Nc||Fc(Nc,t)&&e===Nc.map?zc:e})),Rc=Wi,Lc=Ki,Hc=Qi,Wc=ti,qc=function t(e,i,n,o,r,s,a,l){for(var h,d=r,c=0,u=!!a&&Wc(a,l);c<o;)c in n&&(h=u?u(n[c],c,i):n[c],s>0&&Rc(h)?d=t(e,i,h,Lc(h),d,s-1)-1:(Hc(d+1),e[d]=h),d++),c++;return d},Uc=qc,Vc=Ft,Yc=Jt,Xc=Ki,$c=Nn;Di({target:"Array",proto:!0},{flatMap:function(t){var e,i=Yc(this),n=Xc(i);return Vc(t),(e=$c(i,0)).length=Uc(e,i,i,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}});oc("Array","flatMap"),Array.prototype;var Gc=z,Kc=si,Zc=jt,Qc=function(t,e,i){var n,o;Kc(t);try{if(!(n=Zc(t,"return"))){if("throw"===e)throw i;return i}n=Gc(n,t)}catch(UO){o=!0,n=UO}if("throw"===e)throw i;if(o)throw n;return Kc(n),i},Jc=si,tu=Qc,eu=kl,iu=ge("iterator"),nu=Array.prototype,ou=function(t){return void 0!==t&&(eu.Array===t||nu[iu]===t)},ru=un,su=jt,au=G,lu=kl,hu=ge("iterator"),du=function(t){if(!au(t))return su(t,hu)||su(t,"@@iterator")||lu[ru(t)]},cu=z,uu=Ft,fu=si,pu=Mt,vu=du,gu=TypeError,yu=function(t,e){var i=arguments.length<2?vu(t):e;if(uu(i))return fu(cu(i,t));throw new gu(pu(t)+" is not iterable")},mu=ti,bu=z,wu=Jt,xu=function(t,e,i,n){try{return n?e(Jc(i)[0],i[1]):e(i)}catch(UO){tu(t,"throw",UO)}},_u=ou,ku=In,Eu=Ki,Ou=nn,Cu=yu,Su=du,Tu=Array,Pu=ge("iterator"),Iu=!1;try{var Mu=0,Du={next:function(){return{done:!!Mu++}},return:function(){Iu=!0}};Du[Pu]=function(){return this},Array.from(Du,(function(){throw 2}))}catch(UO){}var Au=function(t,e){try{if(!e&&!Iu)return!1}catch(UO){return!1}var i=!1;try{var n={};n[Pu]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(UO){}return i},Bu=function(t){var e=wu(t),i=ku(this),n=arguments.length,o=n>1?arguments[1]:void 0,r=void 0!==o;r&&(o=mu(o,n>2?arguments[2]:void 0));var s,a,l,h,d,c,u=Su(e),f=0;if(!u||this===Tu&&_u(u))for(s=Eu(e),a=i?new this(s):Tu(s);s>f;f++)c=r?o(e[f],f):e[f],Ou(a,f,c);else for(d=(h=Cu(e,u)).next,a=i?new this:[];!(l=bu(d,h)).done;f++)c=r?xu(h,o,[l.value,f],!0):l.value,Ou(a,f,c);return a.length=f,a};Di({target:"Array",stat:!0,forced:!Au((function(t){Array.from(t)}))},{from:Bu});var Fu=rt.Array.from,zu=r(Fu),Nu=du,ju=r(Nu),Ru=r(Nu);Di({target:"Array",stat:!0},{isArray:Wi});var Lu=rt.Array.isArray,Hu=r(Lu);var Wu=A,qu=Wi,Uu=TypeError,Vu=Object.getOwnPropertyDescriptor,Yu=Wu&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(UO){return UO instanceof TypeError}}()?function(t,e){if(qu(t)&&!Vu(t,"length").writable)throw new Uu("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Xu=Jt,$u=Ki,Gu=Yu,Ku=Qi;Di({target:"Array",proto:!0,arity:1,forced:h((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(UO){return UO instanceof TypeError}}()},{push:function(t){var e=Xu(this),i=$u(e),n=arguments.length;Ku(i+n);for(var o=0;o<n;o++)e[i]=arguments[o],i++;return Gu(e,i),i}});var Zu=oc("Array","push"),Qu=ct,Ju=Zu,tf=Array.prototype,ef=function(t){var e=t.push;return t===tf||Qu(tf,t)&&e===tf.push?Ju:e},nf=r(ef);var of=Di,rf=Wi,sf=In,af=ot,lf=ho,hf=Ki,df=et,cf=nn,uf=ge,ff=Na,pf=Hn("slice"),vf=uf("species"),gf=Array,yf=Math.max;of({target:"Array",proto:!0,forced:!pf},{slice:function(t,e){var i,n,o,r=df(this),s=hf(r),a=lf(t,s),l=lf(void 0===e?s:e,s);if(rf(r)&&(i=r.constructor,(sf(i)&&(i===gf||rf(i.prototype))||af(i)&&null===(i=i[vf]))&&(i=void 0),i===gf||void 0===i))return ff(r,a,l);for(n=new(void 0===i?gf:i)(yf(l-a,0)),o=0;a<l;a++,o++)a in r&&cf(n,o,r[a]);return n.length=o,n}});var mf=oc("Array","slice"),bf=ct,wf=mf,xf=Array.prototype,_f=function(t){var e=t.slice;return t===xf||bf(xf,t)&&e===xf.slice?wf:e},kf=_f,Ef=r(kf),Of=r(Fu);function Cf(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function Sf(t,e){var i;if(t){if("string"==typeof t)return Cf(t,e);var n=Ef(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Of(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cf(t,e):void 0}}function Tf(t,e){return function(t){if(Hu(t))return t}(t)||function(t,e){var i=null==t?null:void 0!==md&&ju(t)||t["@@iterator"];if(null!=i){var n,o,r,s,a=[],l=!0,h=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(nf(a).call(a,n.value),a.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(h)throw o}}return a}}(t,e)||Sf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pf(t){return function(t){if(Hu(t))return Cf(t)}(t)||function(t){if(void 0!==md&&null!=ju(t)||null!=t["@@iterator"])return Of(t)}(t)||Sf(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.")}()}var If=r(Vh),Mf=oc("Array","concat"),Df=ct,Af=Mf,Bf=Array.prototype,Ff=r((function(t){var e=t.concat;return t===Bf||Df(Bf,t)&&e===Bf.concat?Af:e})),zf=r(_f),Nf=dt,jf=Qo,Rf=fr,Lf=si,Hf=w([].concat),Wf=Nf("Reflect","ownKeys")||function(t){var e=jf.f(Lf(t)),i=Rf.f;return i?Hf(e,i(t)):e};Di({target:"Reflect",stat:!0},{ownKeys:Wf});var qf=r(rt.Reflect.ownKeys),Uf=r(Lu),Vf=Jt,Yf=Co;Di({target:"Object",stat:!0,forced:h((function(){Yf(1)}))},{keys:function(t){return Yf(Vf(t))}});var Xf=r(rt.Object.keys),$f=cs.forEach,Gf=bc("forEach")?[].forEach:function(t){return $f(this,t,arguments.length>1?arguments[1]:void 0)};Di({target:"Array",proto:!0,forced:[].forEach!==Gf},{forEach:Gf});var Kf=oc("Array","forEach"),Zf=un,Qf=ie,Jf=ct,tp=Kf,ep=Array.prototype,ip={DOMTokenList:!0,NodeList:!0},np=function(t){var e=t.forEach;return t===ep||Jf(ep,t)&&e===ep.forEach||Qf(ip,Zf(t))?tp:e},op=r(np),rp=Di,sp=Wi,ap=w([].reverse),lp=[1,2];rp({target:"Array",proto:!0,forced:String(lp)===String(lp.reverse())},{reverse:function(){return sp(this)&&(this.length=this.length),ap(this)}});var hp=oc("Array","reverse"),dp=ct,cp=hp,up=Array.prototype,fp=function(t){var e=t.reverse;return t===up||dp(up,t)&&e===up.reverse?cp:e},pp=r(fp),vp=Mt,gp=TypeError,yp=function(t,e){if(!delete t[e])throw new gp("Cannot delete property "+vp(e)+" of "+vp(t))},mp=Di,bp=Jt,wp=ho,xp=Yi,_p=Ki,kp=Yu,Ep=Qi,Op=Nn,Cp=nn,Sp=yp,Tp=Hn("splice"),Pp=Math.max,Ip=Math.min;mp({target:"Array",proto:!0,forced:!Tp},{splice:function(t,e){var i,n,o,r,s,a,l=bp(this),h=_p(l),d=wp(t,h),c=arguments.length;for(0===c?i=n=0:1===c?(i=0,n=h-d):(i=c-2,n=Ip(Pp(xp(e),0),h-d)),Ep(h+i-n),o=Op(l,n),r=0;r<n;r++)(s=d+r)in l&&Cp(o,r,l[s]);if(o.length=n,i<n){for(r=d;r<h-n;r++)a=r+i,(s=r+n)in l?l[a]=l[s]:Sp(l,a);for(r=h;r>h-n+i;r--)Sp(l,r-1)}else if(i>n)for(r=h-n;r>d;r--)a=r+i-1,(s=r+n-1)in l?l[a]=l[s]:Sp(l,a);for(r=0;r<i;r++)l[r+d]=arguments[r+2];return kp(l,h-n+i),o}});var Mp=oc("Array","splice"),Dp=ct,Ap=Mp,Bp=Array.prototype,Fp=r((function(t){var e=t.splice;return t===Bp||Dp(Bp,t)&&e===Bp.splice?Ap:e})),zp=A,Np=w,jp=z,Rp=h,Lp=Co,Hp=fr,Wp=N,qp=Jt,Up=$,Vp=Object.assign,Yp=Object.defineProperty,Xp=Np([].concat),$p=!Vp||Rp((function(){if(zp&&1!==Vp({b:1},Vp(Yp({},"a",{enumerable:!0,get:function(){Yp(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach((function(t){e[t]=t})),7!==Vp({},t)[i]||Lp(Vp({},e)).join("")!==n}))?function(t,e){for(var i=qp(t),n=arguments.length,o=1,r=Hp.f,s=Wp.f;n>o;)for(var a,l=Up(arguments[o++]),h=r?Xp(Lp(l),r(l)):Lp(l),d=h.length,c=0;d>c;)a=h[c++],zp&&!jp(s,l,a)||(i[a]=l[a]);return i}:Vp,Gp=$p;Di({target:"Object",stat:!0,arity:2,forced:Object.assign!==Gp},{assign:Gp});var Kp=r(rt.Object.assign),Zp=Jt,Qp=jl,Jp=Il;Di({target:"Object",stat:!0,forced:h((function(){Qp(1)})),sham:!Jp},{getPrototypeOf:function(t){return Qp(Zp(t))}});var tv=rt.Object.getPrototypeOf;Di({target:"Object",stat:!0,sham:!A},{create:Zo});var ev=rt.Object,iv=function(t,e){return ev.create(t,e)},nv=r(iv),ov=rt,rv=v;ov.JSON||(ov.JSON={stringify:JSON.stringify});var sv=function(t,e,i){return rv(ov.JSON.stringify,null,arguments)},av=r(sv),lv="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,hv=TypeError,dv=function(t,e){if(t<e)throw new hv("Not enough arguments");return t},cv=l,uv=v,fv=M,pv=lv,vv=ut,gv=Na,yv=dv,mv=cv.Function,bv=/MSIE .\./.test(vv)||pv&&function(){var t=cv.Bun.version.split(".");return t.length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2])}(),wv=function(t,e){var i=e?2:1;return bv?function(n,o){var r=yv(arguments.length,1)>i,s=fv(n)?n:mv(n),a=r?gv(arguments,i):[],l=r?function(){uv(s,this,a)}:s;return e?t(l,o):t(l)}:t},xv=Di,_v=l,kv=wv(_v.setInterval,!0);xv({global:!0,bind:!0,forced:_v.setInterval!==kv},{setInterval:kv});var Ev=Di,Ov=l,Cv=wv(Ov.setTimeout,!0);Ev({global:!0,bind:!0,forced:Ov.setTimeout!==Cv},{setTimeout:Cv});var Sv=r(rt.setTimeout),Tv={exports:{}};!function(t){function e(t){if(t)return function(t){return Object.assign(t,e.prototype),t._callbacks=new Map,t}(t);this._callbacks=new Map}e.prototype.on=function(t,e){var i;const n=null!==(i=this._callbacks.get(t))&&void 0!==i?i:[];return n.push(e),this._callbacks.set(t,n),this},e.prototype.once=function(t,e){const i=(...n)=>{this.off(t,i),e.apply(this,n)};return i.fn=e,this.on(t,i),this},e.prototype.off=function(t,e){if(void 0===t&&void 0===e)return this._callbacks.clear(),this;if(void 0===e)return this._callbacks.delete(t),this;const i=this._callbacks.get(t);if(i){for(const[t,n]of i.entries())if(n===e||n.fn===e){i.splice(t,1);break}0===i.length?this._callbacks.delete(t):this._callbacks.set(t,i)}return this},e.prototype.emit=function(t,...e){const i=this._callbacks.get(t);if(i){const t=[...i];for(const i of t)i.apply(this,e)}return this},e.prototype.listeners=function(t){var e;return null!==(e=this._callbacks.get(t))&&void 0!==e?e:[]},e.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let e=0;for(const i of this._callbacks.values())e+=i.length;return e},e.prototype.hasListeners=function(t){return this.listenerCount(t)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,t.exports=e}(Tv);var Pv,Iv=r(Tv.exports);function Mv(){return Mv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Mv.apply(this,arguments)}function Dv(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Av(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Pv="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign;var Bv,Fv=Pv,zv=["","webkit","Moz","MS","ms","o"],Nv="undefined"==typeof document?{style:{}}:document.createElement("div"),jv=Math.round,Rv=Math.abs,Lv=Date.now;function Hv(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),r=0;r<zv.length;){if((n=(i=zv[r])?i+o:e)in t)return n;r++}}Bv="undefined"==typeof window?{}:window;var Wv=Hv(Nv.style,"touchAction"),qv=void 0!==Wv;var Uv="compute",Vv="auto",Yv="manipulation",Xv="none",$v="pan-x",Gv="pan-y",Kv=function(){if(!qv)return!1;var t={},e=Bv.CSS&&Bv.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||Bv.CSS.supports("touch-action",i)})),t}(),Zv="ontouchstart"in Bv,Qv=void 0!==Hv(Bv,"PointerEvent"),Jv=Zv&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),tg="touch",eg="mouse",ig=16,ng=24,og=["x","y"],rg=["clientX","clientY"];function sg(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function ag(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function lg(t,e){return t.indexOf(e)>-1}var hg=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Uv&&(t=this.compute()),qv&&this.manager.element.style&&Kv[t]&&(this.manager.element.style[Wv]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return sg(this.manager.recognizers,(function(e){ag(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(lg(t,Xv))return Xv;var e=lg(t,$v),i=lg(t,Gv);return e&&i?Xv:e||i?e?$v:Gv:lg(t,Yv)?Yv:Vv}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,o=lg(n,Xv)&&!Kv[Xv],r=lg(n,Gv)&&!Kv[Gv],s=lg(n,$v)&&!Kv[$v];if(o){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}if(!s||!r)return o||r&&6&i||s&&i&ng?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function dg(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function cg(t){var e=t.length;if(1===e)return{x:jv(t[0].clientX),y:jv(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:jv(i/e),y:jv(n/e)}}function ug(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:jv(t.pointers[i].clientX),clientY:jv(t.pointers[i].clientY)},i++;return{timeStamp:Lv(),pointers:e,center:cg(e),deltaX:t.deltaX,deltaY:t.deltaY}}function fg(t,e,i){i||(i=og);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function pg(t,e,i){i||(i=og);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function vg(t,e){return t===e?1:Rv(t)>=Rv(e)?t<0?2:4:e<0?8:ig}function gg(t,e,i){return{x:e/t||0,y:i/t||0}}function yg(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=ug(e)),o>1&&!i.firstMultiple?i.firstMultiple=ug(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,l=e.center=cg(n);e.timeStamp=Lv(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=pg(a,l),e.distance=fg(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=vg(e.deltaX,e.deltaY);var h,d,c=gg(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=Rv(c.x)>Rv(c.y)?c.x:c.y,e.scale=s?(h=s.pointers,fg((d=n)[0],d[1],rg)/fg(h[0],h[1],rg)):1,e.rotation=s?function(t,e){return pg(e[1],e[0],rg)+pg(t[1],t[0],rg)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(8!==e.eventType&&(a>25||void 0===s.velocity)){var l=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,d=gg(a,l,h);n=d.x,o=d.y,i=Rv(d.x)>Rv(d.y)?d.x:d.y,r=vg(l,h),t.lastInterval=e}else i=s.velocity,n=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=r}(i,e);var u,f=t.element,p=e.srcEvent;dg(u=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,f)&&(f=u),e.target=f}function mg(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=1&e&&n-o==0,s=12&e&&n-o==0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,yg(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function bg(t){return t.trim().split(/\s+/g)}function wg(t,e,i){sg(bg(e),(function(e){t.addEventListener(e,i,!1)}))}function xg(t,e,i){sg(bg(e),(function(e){t.removeEventListener(e,i,!1)}))}function _g(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var kg=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){ag(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&wg(this.element,this.evEl,this.domHandler),this.evTarget&&wg(this.target,this.evTarget,this.domHandler),this.evWin&&wg(_g(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&xg(this.element,this.evEl,this.domHandler),this.evTarget&&xg(this.target,this.evTarget,this.domHandler),this.evWin&&xg(_g(this.element),this.evWin,this.domHandler)},t}();function Eg(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}var Og={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Cg={2:tg,3:"pen",4:eg,5:"kinect"},Sg="pointerdown",Tg="pointermove pointerup pointercancel";Bv.MSPointerEvent&&!Bv.PointerEvent&&(Sg="MSPointerDown",Tg="MSPointerMove MSPointerUp MSPointerCancel");var Pg=function(t){function e(){var i,n=e.prototype;return n.evEl=Sg,n.evWin=Tg,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Dv(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Og[n],r=Cg[t.pointerType]||t.pointerType,s=r===tg,a=Eg(e,t.pointerId,"pointerId");1&o&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&o&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))},e}(kg);function Ig(t){return Array.prototype.slice.call(t,0)}function Mg(t,e,i){for(var n=[],o=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];Eg(o,s)<0&&n.push(t[r]),o[r]=s,r++}return i&&(n=e?n.sort((function(t,i){return t[e]>i[e]})):n.sort()),n}var Dg={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Ag=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return Dv(e,t),e.prototype.handler=function(t){var e=Dg[t.type],i=Bg.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:tg,srcEvent:t})},e}(kg);function Bg(t,e){var i,n,o=Ig(t.touches),r=this.targetIds;if(3&e&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=Ig(t.changedTouches),a=[],l=this.target;if(n=o.filter((function(t){return dg(t.target,l)})),1===e)for(i=0;i<n.length;)r[n[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),12&e&&delete r[s[i].identifier],i++;return a.length?[Mg(n.concat(a),"identifier",!0),a]:void 0}var Fg={mousedown:1,mousemove:2,mouseup:4},zg=function(t){function e(){var i,n=e.prototype;return n.evEl="mousedown",n.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return Dv(e,t),e.prototype.handler=function(t){var e=Fg[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:eg,srcEvent:t}))},e}(kg);function Ng(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)}),2500)}}function jg(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,Ng.call(this,e)):12&t&&Ng.call(this,e)}function Rg(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],r=Math.abs(e-o.x),s=Math.abs(i-o.y);if(r<=25&&s<=25)return!0}return!1}var Lg=function(){return function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handler=function(t,e,i){var o=i.pointerType===tg,r=i.pointerType===eg;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)jg.call(Av(Av(n)),e,i);else if(r&&Rg.call(Av(Av(n)),i))return;n.callback(t,e,i)}},n.touch=new Ag(n.manager,n.handler),n.mouse=new zg(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return Dv(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(kg)}();function Hg(t,e,i){return!!Array.isArray(t)&&(sg(t,i[e],i),!0)}var Wg=32,qg=1;function Ug(t,e){var i=e.manager;return i?i.get(t):t}function Vg(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var Yg=function(){function t(t){void 0===t&&(t={}),this.options=Mv({enable:!0},t),this.id=qg++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return Fv(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Hg(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Ug(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Hg(t,"dropRecognizeWith",this)||(t=Ug(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Hg(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Eg(e,t=Ug(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Hg(t,"dropRequireFailure",this))return this;t=Ug(t,this);var e=Eg(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+Vg(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+Vg(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Wg},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=Fv({},t);if(!ag(this.options.enable,[this,e]))return this.reset(),void(this.state=Wg);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Xg=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Mv({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}Dv(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Yv]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&r&&n){if(4!==t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||fg(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&s?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.interval),2):8}return Wg},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=Wg}),this.options.interval),Wg},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(Yg),$g=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Mv({pointers:1},e))||this}Dv(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,n=6&e,o=this.attrTest(t);return n&&(8&i||!o)?16|e:n||o?4&i?8|e:2&e?4|e:2:Wg},e}(Yg);function Gg(t){return t===ig?"down":8===t?"up":2===t?"left":4===t?"right":""}var Kg=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Mv({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}Dv(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(Gv),t&ng&&e.push($v),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;return o&e.direction||(6&e.direction?(o=0===r?1:r<0?2:4,i=r!==this.pX,n=Math.abs(t.deltaX)):(o=0===s?1:s<0?8:ig,i=s!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return $g.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Gg(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}($g),Zg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Mv({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}Dv(e,t);var i=e.prototype;return i.getTouchAction=function(){return Kg.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return 30&n?i=e.overallVelocity:6&n?i=e.overallVelocityX:n&ng&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Rv(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=Gg(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}($g),Qg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Mv({event:"pinch",threshold:0,pointers:2},e))||this}Dv(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Xv]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}($g),Jg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Mv({event:"rotate",threshold:0,pointers:2},e))||this}Dv(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Xv]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}($g),ty=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Mv({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Dv(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Vv]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime>i.time;if(this._input=t,!o||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(4&t.eventType)return 8;return Wg},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Lv(),this.manager.emit(this.options.event,this._input)))},e}(Yg),ey={domEvents:!1,touchAction:Uv,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},iy=[[Jg,{enable:!1}],[Qg,{enable:!1},["rotate"]],[Zg,{direction:6}],[Kg,{direction:6},["swipe"]],[Xg],[Xg,{event:"doubletap",taps:2},["tap"]],[ty]];function ny(t,e){var i,n=t.element;n.style&&(sg(t.options.cssProps,(function(o,r){i=Hv(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var oy=function(){function t(t,e){var i,n=this;this.options=Fv({},ey,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Qv?Pg:Jv?Ag:Zv?Lg:zg))(i,mg),this.touchAction=new hg(this,this.options.touchAction),ny(this,!0),sg(this.options.recognizers,(function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return Fv(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var r=0;r<n.length;)i=n[r],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),r++}},e.get=function(t){if(t instanceof Yg)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(Hg(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(Hg(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=Eg(i,e);-1!==n&&(i.splice(n,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return sg(bg(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return sg(bg(t),(function(t){e?i[t]&&i[t].splice(Eg(i[t],e),1):delete i[t]})),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},e.destroy=function(){this.element&&ny(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),ry={touchstart:1,touchmove:2,touchend:4,touchcancel:8},sy=function(t){function e(){var i,n=e.prototype;return n.evTarget="touchstart",n.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return Dv(e,t),e.prototype.handler=function(t){var e=ry[t.type];if(1===e&&(this.started=!0),this.started){var i=ay.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:tg,srcEvent:t})}},e}(kg);function ay(t,e){var i=Ig(t.touches),n=Ig(t.changedTouches);return 12&e&&(i=Mg(i.concat(n),"identifier",!0)),[i,n]}function ly(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,i),t.apply(this,arguments)}}var hy=ly((function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;)(!i||i&&void 0===t[n[o]])&&(t[n[o]]=e[n[o]]),o++;return t}),"extend","Use `assign`."),dy=ly((function(t,e){return hy(t,e,!0)}),"merge","Use `assign`.");function cy(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&Fv(n,i)}function uy(t,e){return function(){return t.apply(e,arguments)}}var fy=function(){var t=function(t,e){return void 0===e&&(e={}),new oy(t,Mv({recognizers:iy.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=ig,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=ng,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=ig,t.INPUT_START=1,t.INPUT_MOVE=2,t.INPUT_END=4,t.INPUT_CANCEL=8,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=Wg,t.Manager=oy,t.Input=kg,t.TouchAction=hg,t.TouchInput=Ag,t.MouseInput=zg,t.PointerEventInput=Pg,t.TouchMouseInput=Lg,t.SingleTouchInput=sy,t.Recognizer=Yg,t.AttrRecognizer=$g,t.Tap=Xg,t.Pan=Kg,t.Swipe=Zg,t.Pinch=Qg,t.Rotate=Jg,t.Press=ty,t.on=wg,t.off=xg,t.each=sg,t.merge=dy,t.extend=hy,t.bindFn=uy,t.assign=Fv,t.inherit=cy,t.bindFn=uy,t.prefixed=Hv,t.toArray=Ig,t.inArray=Eg,t.uniqueArray=Mg,t.splitStr=bg,t.boolOrFn=ag,t.hasParent=dg,t.addEventListeners=wg,t.removeEventListeners=xg,t.defaults=Fv({},ey,{preset:iy}),t}();function py(t,e){var i=void 0!==If&&Ru(t)||t["@@iterator"];if(!i){if(Uf(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return vy(t,e);var n=zf(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return zu(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vy(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function vy(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var gy=If("DELETE");function yy(){var t=my.apply(void 0,arguments);return wy(t),t}function my(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<2)return e[0];var n;if(e.length>2)return my.apply(void 0,Ff(n=[yy(e[0],e[1])]).call(n,Pf(zf(e).call(e,2))));var o=e[0],r=e[1];if(o instanceof Date&&r instanceof Date)return o.setTime(r.getTime()),o;var s,a=py(qf(r));try{for(a.s();!(s=a.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(r,l)&&(r[l]===gy?delete o[l]:null===o[l]||null===r[l]||"object"!=typeof o[l]||"object"!=typeof r[l]||Uf(o[l])||Uf(r[l])?o[l]=by(r[l]):o[l]=my(o[l],r[l]))}}catch(h){a.e(h)}finally{a.f()}return o}function by(t){return Uf(t)?jc(t).call(t,(function(t){return by(t)})):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):my({},t):t}function wy(t){for(var e=0,i=Xf(t);e<i.length;e++){var n=i[e];t[n]===gy?delete t[n]:"object"==typeof t[n]&&null!==t[n]&&wy(t[n])}}var xy="undefined"!=typeof window?window.Hammer||fy:function(){return function(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get(){return{set:t}}}}()};function _y(t){var e,i=this;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)}));var n=xy(this._dom.overlay);n.on("tap",dc(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push((function(){n.destroy()}));var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];op(o).call(o,(function(t){n.on(t,(function(t){t.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(e){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener("click",i._onClick)}))),this._escListener=function(t){("key"in t?"Escape"===t.key:27===t.keyCode)&&i.deactivate()}}Iv(_y.prototype),_y.current=null,_y.prototype.destroy=function(){var t,e;this.deactivate();var i,n=py(pp(t=Fp(e=this._cleanupQueue).call(e,0)).call(t));try{for(n.s();!(i=n.n()).done;){(0,i.value)()}}catch(o){n.e(o)}finally{n.f()}},_y.prototype.activate=function(){_y.current&&_y.current.deactivate(),_y.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},_y.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},_y.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};var ky=In,Ey=Mt,Oy=TypeError,Cy=function(t){if(ky(t))return t;throw new Oy(Ey(t)+" is not a constructor")},Sy=Di,Ty=v,Py=tc,Iy=Cy,My=si,Dy=ot,Ay=Zo,By=h,Fy=dt("Reflect","construct"),zy=Object.prototype,Ny=[].push,jy=By((function(){function t(){}return!(Fy((function(){}),[],t)instanceof t)})),Ry=!By((function(){Fy((function(){}))})),Ly=jy||Ry;Sy({target:"Reflect",stat:!0,forced:Ly,sham:Ly},{construct:function(t,e){Iy(t),My(e);var i=arguments.length<3?t:Iy(arguments[2]);if(Ry&&!jy)return Fy(t,e,i);if(t===i){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return Ty(Ny,n,e),new(Ty(Py,t,n))}var o=i.prototype,r=Ay(Dy(o)?o:zy),s=Ty(t,r,e);return Dy(s)?s:r}});var Hy=r(rt.Reflect.construct),Wy=r(rt.Object.getOwnPropertySymbols),qy={exports:{}},Uy=Di,Vy=h,Yy=et,Xy=D.f,$y=A;Uy({target:"Object",stat:!0,forced:!$y||Vy((function(){Xy(1)})),sham:!$y},{getOwnPropertyDescriptor:function(t,e){return Xy(Yy(t),e)}});var Gy=rt.Object,Ky=qy.exports=function(t,e){return Gy.getOwnPropertyDescriptor(t,e)};Gy.getOwnPropertyDescriptor.sham&&(Ky.sham=!0);var Zy=r(qy.exports),Qy=Wf,Jy=et,tm=D,em=nn;Di({target:"Object",stat:!0,sham:!A},{getOwnPropertyDescriptors:function(t){for(var e,i,n=Jy(t),o=tm.f,r=Qy(n),s={},a=0;r.length>a;)void 0!==(i=o(n,e=r[a++]))&&em(s,e,i);return s}});var im=r(rt.Object.getOwnPropertyDescriptors),nm={exports:{}},om=Di,rm=A,sm=ro.f;om({target:"Object",stat:!0,forced:Object.defineProperties!==sm,sham:!rm},{defineProperties:sm});var am=rt.Object,lm=nm.exports=function(t,e){return am.defineProperties(t,e)};am.defineProperties.sham&&(lm.sham=!0);var hm=r(nm.exports),dm=r(ji);function cm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var um=iv,fm=r(um);Di({target:"Object",stat:!0},{setPrototypeOf:hh});var pm=rt.Object.setPrototypeOf,vm=r(pm),gm=r(hc);function ym(t,e){var i;return ym=vm?gm(i=vm).call(i):function(t,e){return t.__proto__=e,t},ym(t,e)}function mm(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=fm(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Li(t,"prototype",{writable:!1}),e&&ym(t,e)}function bm(t,e){if(e&&("object"===jd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return cm(t)}var wm=tv,xm=r(wm);function _m(t){var e;return _m=vm?gm(e=xm).call(e):function(t){return t.__proto__||xm(t)},_m(t)}var km={exports:{}},Em={exports:{}};!function(t){var e=yd,i=zd;function n(o){return t.exports=n="function"==typeof e&&"symbol"==typeof i?function(t){return typeof t}:function(t){return t&&"function"==typeof e&&t.constructor===e&&t!==e.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Em);var Om=Em.exports,Cm=np,Sm=ie,Tm=Wf,Pm=D,Im=ei,Mm=ot,Dm=wi,Am=Error,Bm=w("".replace),Fm=String(new Am("zxcasd").stack),zm=/\n\s*at [^:]*:[^\n]*/,Nm=zm.test(Fm),jm=q,Rm=!h((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",jm(1,7)),7!==t.stack)})),Lm=wi,Hm=function(t,e){if(Nm&&"string"==typeof t&&!Am.prepareStackTrace)for(;e--;)t=Bm(t,zm,"");return t},Wm=Rm,qm=Error.captureStackTrace,Um=ti,Vm=z,Ym=si,Xm=Mt,$m=ou,Gm=Ki,Km=ct,Zm=yu,Qm=du,Jm=Qc,tb=TypeError,eb=function(t,e){this.stopped=t,this.result=e},ib=eb.prototype,nb=function(t,e,i){var n,o,r,s,a,l,h,d=i&&i.that,c=!(!i||!i.AS_ENTRIES),u=!(!i||!i.IS_RECORD),f=!(!i||!i.IS_ITERATOR),p=!(!i||!i.INTERRUPTED),v=Um(e,d),g=function(t){return n&&Jm(n,"normal",t),new eb(!0,t)},y=function(t){return c?(Ym(t),p?v(t[0],t[1],g):v(t[0],t[1])):p?v(t,g):v(t)};if(u)n=t.iterator;else if(f)n=t;else{if(!(o=Qm(t)))throw new tb(Xm(t)+" is not iterable");if($m(o)){for(r=0,s=Gm(t);s>r;r++)if((a=y(t[r]))&&Km(ib,a))return a;return new eb(!1)}n=Zm(t,o)}for(l=u?t.next:n.next;!(h=Vm(l,n)).done;){try{a=y(h.value)}catch(UO){Jm(n,"throw",UO)}if("object"==typeof a&&a&&Km(ib,a))return a}return new eb(!1)},ob=oo,rb=Di,sb=ct,ab=jl,lb=hh,hb=function(t,e,i){for(var n=Tm(e),o=Im.f,r=Pm.f,s=0;s<n.length;s++){var a=n[s];Sm(t,a)||i&&Sm(i,a)||o(t,a,r(e,a))}},db=Zo,cb=wi,ub=q,fb=function(t,e){Mm(e)&&"cause"in e&&Dm(t,"cause",e.cause)},pb=function(t,e,i,n){Wm&&(qm?qm(t,e):Lm(t,"stack",Hm(i,n)))},vb=nb,gb=function(t,e){return void 0===t?arguments.length<2?"":e:ob(t)},yb=ge("toStringTag"),mb=Error,bb=[].push,wb=function(t,e){var i,n=sb(xb,this);lb?i=lb(new mb,n?ab(this):xb):(i=n?this:db(xb),cb(i,yb,"Error")),void 0!==e&&cb(i,"message",gb(e)),pb(i,wb,i.stack,1),arguments.length>2&&fb(i,arguments[2]);var o=[];return vb(t,bb,{that:o}),cb(i,"errors",o),i};lb?lb(wb,mb):hb(wb,mb,{name:!0});var xb=wb.prototype=db(mb.prototype,{constructor:ub(1,wb),message:ub(1,""),name:ub(1,"AggregateError")});rb({global:!0,constructor:!0,arity:2},{AggregateError:wb});var _b,kb,Eb,Ob,Cb=dt,Sb=yr,Tb=A,Pb=ge("species"),Ib=function(t){var e=Cb(t);Tb&&e&&!e[Pb]&&Sb(e,Pb,{configurable:!0,get:function(){return this}})},Mb=ct,Db=TypeError,Ab=function(t,e){if(Mb(e,t))return t;throw new Db("Incorrect invocation")},Bb=si,Fb=Cy,zb=G,Nb=ge("species"),jb=function(t,e){var i,n=Bb(t).constructor;return void 0===n||zb(i=Bb(n)[Nb])?e:Fb(i)},Rb=/(?:ipad|iphone|ipod).*applewebkit/i.test(ut),Lb=l,Hb=v,Wb=ti,qb=M,Ub=ie,Vb=h,Yb=Bo,Xb=Na,$b=Ie,Gb=dv,Kb=Rb,Zb=wc,Qb=Lb.setImmediate,Jb=Lb.clearImmediate,tw=Lb.process,ew=Lb.Dispatch,iw=Lb.Function,nw=Lb.MessageChannel,ow=Lb.String,rw=0,sw={},aw="onreadystatechange";Vb((function(){_b=Lb.location}));var lw=function(t){if(Ub(sw,t)){var e=sw[t];delete sw[t],e()}},hw=function(t){return function(){lw(t)}},dw=function(t){lw(t.data)},cw=function(t){Lb.postMessage(ow(t),_b.protocol+"//"+_b.host)};Qb&&Jb||(Qb=function(t){Gb(arguments.length,1);var e=qb(t)?t:iw(t),i=Xb(arguments,1);return sw[++rw]=function(){Hb(e,void 0,i)},kb(rw),rw},Jb=function(t){delete sw[t]},Zb?kb=function(t){tw.nextTick(hw(t))}:ew&&ew.now?kb=function(t){ew.now(hw(t))}:nw&&!Kb?(Ob=(Eb=new nw).port2,Eb.port1.onmessage=dw,kb=Wb(Ob.postMessage,Ob)):Lb.addEventListener&&qb(Lb.postMessage)&&!Lb.importScripts&&_b&&"file:"!==_b.protocol&&!Vb(cw)?(kb=cw,Lb.addEventListener("message",dw,!1)):kb=aw in $b("script")?function(t){Yb.appendChild($b("script"))[aw]=function(){Yb.removeChild(this),lw(t)}}:function(t){setTimeout(hw(t),0)});var uw={set:Qb,clear:Jb},fw=function(){this.head=null,this.tail=null};fw.prototype={add:function(t){var e={item:t,next:null},i=this.tail;i?i.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var pw,vw,gw,yw,mw,bw=fw,ww=/ipad|iphone|ipod/i.test(ut)&&"undefined"!=typeof Pebble,xw=/web0s(?!.*chrome)/i.test(ut),_w=l,kw=ti,Ew=D.f,Ow=uw.set,Cw=bw,Sw=Rb,Tw=ww,Pw=xw,Iw=wc,Mw=_w.MutationObserver||_w.WebKitMutationObserver,Dw=_w.document,Aw=_w.process,Bw=_w.Promise,Fw=Ew(_w,"queueMicrotask"),zw=Fw&&Fw.value;if(!zw){var Nw=new Cw,jw=function(){var t,e;for(Iw&&(t=Aw.domain)&&t.exit();e=Nw.get();)try{e()}catch(UO){throw Nw.head&&pw(),UO}t&&t.enter()};Sw||Iw||Pw||!Mw||!Dw?!Tw&&Bw&&Bw.resolve?((yw=Bw.resolve(void 0)).constructor=Bw,mw=kw(yw.then,yw),pw=function(){mw(jw)}):Iw?pw=function(){Aw.nextTick(jw)}:(Ow=kw(Ow,_w),pw=function(){Ow(jw)}):(vw=!0,gw=Dw.createTextNode(""),new Mw(jw).observe(gw,{characterData:!0}),pw=function(){gw.data=vw=!vw}),zw=function(t){Nw.head||pw(),Nw.add(t)}}var Rw=zw,Lw=function(t){try{return{error:!1,value:t()}}catch(UO){return{error:!0,value:UO}}},Hw=l.Promise,Ww="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,qw=!Ww&&!wc&&"object"==typeof window&&"object"==typeof document,Uw=l,Vw=Hw,Yw=M,Xw=Ke,$w=gn,Gw=ge,Kw=qw,Zw=Ww,Qw=bt,Jw=Vw&&Vw.prototype,tx=Gw("species"),ex=!1,ix=Yw(Uw.PromiseRejectionEvent),nx=Xw("Promise",(function(){var t=$w(Vw),e=t!==String(Vw);if(!e&&66===Qw)return!0;if(!Jw.catch||!Jw.finally)return!0;if(!Qw||Qw<51||!/native code/.test(t)){var i=new Vw((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((i.constructor={})[tx]=n,!(ex=i.then((function(){}))instanceof n))return!0}return!e&&(Kw||Zw)&&!ix})),ox={CONSTRUCTOR:nx,REJECTION_EVENT:ix,SUBCLASSING:ex},rx={},sx=Ft,ax=TypeError,lx=function(t){var e,i;this.promise=new t((function(t,n){if(void 0!==e||void 0!==i)throw new ax("Bad Promise constructor");e=t,i=n})),this.resolve=sx(e),this.reject=sx(i)};rx.f=function(t){return new lx(t)};var hx,dx,cx=Di,ux=wc,fx=l,px=z,vx=vr,gx=Hr,yx=Ib,mx=Ft,bx=M,wx=ot,xx=Ab,_x=jb,kx=uw.set,Ex=Rw,Ox=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(UO){}},Cx=Lw,Sx=bw,Tx=ns,Px=Hw,Ix=ox,Mx=rx,Dx="Promise",Ax=Ix.CONSTRUCTOR,Bx=Ix.REJECTION_EVENT,Fx=Tx.getterFor(Dx),zx=Tx.set,Nx=Px&&Px.prototype,jx=Px,Rx=Nx,Lx=fx.TypeError,Hx=fx.document,Wx=fx.process,qx=Mx.f,Ux=qx,Vx=!!(Hx&&Hx.createEvent&&fx.dispatchEvent),Yx="unhandledrejection",Xx=function(t){var e;return!(!wx(t)||!bx(e=t.then))&&e},$x=function(t,e){var i,n,o,r=e.value,s=1===e.state,a=s?t.ok:t.fail,l=t.resolve,h=t.reject,d=t.domain;try{a?(s||(2===e.rejection&&Jx(e),e.rejection=1),!0===a?i=r:(d&&d.enter(),i=a(r),d&&(d.exit(),o=!0)),i===t.promise?h(new Lx("Promise-chain cycle")):(n=Xx(i))?px(n,i,l,h):l(i)):h(r)}catch(UO){d&&!o&&d.exit(),h(UO)}},Gx=function(t,e){t.notified||(t.notified=!0,Ex((function(){for(var i,n=t.reactions;i=n.get();)$x(i,t);t.notified=!1,e&&!t.rejection&&Zx(t)})))},Kx=function(t,e,i){var n,o;Vx?((n=Hx.createEvent("Event")).promise=e,n.reason=i,n.initEvent(t,!1,!0),fx.dispatchEvent(n)):n={promise:e,reason:i},!Bx&&(o=fx["on"+t])?o(n):t===Yx&&Ox("Unhandled promise rejection",i)},Zx=function(t){px(kx,fx,(function(){var e,i=t.facade,n=t.value;if(Qx(t)&&(e=Cx((function(){ux?Wx.emit("unhandledRejection",n,i):Kx(Yx,i,n)})),t.rejection=ux||Qx(t)?2:1,e.error))throw e.value}))},Qx=function(t){return 1!==t.rejection&&!t.parent},Jx=function(t){px(kx,fx,(function(){var e=t.facade;ux?Wx.emit("rejectionHandled",e):Kx("rejectionhandled",e,t.value)}))},t_=function(t,e,i){return function(n){t(e,n,i)}},e_=function(t,e,i){t.done||(t.done=!0,i&&(t=i),t.value=e,t.state=2,Gx(t,!0))},i_=function t(e,i,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===i)throw new Lx("Promise can't be resolved itself");var o=Xx(i);o?Ex((function(){var n={done:!1};try{px(o,i,t_(t,n,e),t_(e_,n,e))}catch(UO){e_(n,UO,e)}})):(e.value=i,e.state=1,Gx(e,!1))}catch(UO){e_({done:!1},UO,e)}}};Ax&&(Rx=(jx=function(t){xx(this,Rx),mx(t),px(hx,this);var e=Fx(this);try{t(t_(i_,e),t_(e_,e))}catch(UO){e_(e,UO)}}).prototype,(hx=function(t){zx(this,{type:Dx,done:!1,notified:!1,parent:!1,reactions:new Sx,rejection:!1,state:0,value:void 0})}).prototype=vx(Rx,"then",(function(t,e){var i=Fx(this),n=qx(_x(this,jx));return i.parent=!0,n.ok=!bx(t)||t,n.fail=bx(e)&&e,n.domain=ux?Wx.domain:void 0,0===i.state?i.reactions.add(n):Ex((function(){$x(n,i)})),n.promise})),dx=function(){var t=new hx,e=Fx(t);this.promise=t,this.resolve=t_(i_,e),this.reject=t_(e_,e)},Mx.f=qx=function(t){return t===jx||undefined===t?new dx(t):Ux(t)}),cx({global:!0,constructor:!0,wrap:!0,forced:Ax},{Promise:jx}),gx(jx,Dx,!1,!0),yx(Dx);var n_=Hw,o_=ox.CONSTRUCTOR||!Au((function(t){n_.all(t).then(void 0,(function(){}))})),r_=z,s_=Ft,a_=rx,l_=Lw,h_=nb;Di({target:"Promise",stat:!0,forced:o_},{all:function(t){var e=this,i=a_.f(e),n=i.resolve,o=i.reject,r=l_((function(){var i=s_(e.resolve),r=[],s=0,a=1;h_(t,(function(t){var l=s++,h=!1;a++,r_(i,e,t).then((function(t){h||(h=!0,r[l]=t,--a||n(r))}),o)})),--a||n(r)}));return r.error&&o(r.value),i.promise}});var d_=Di,c_=ox.CONSTRUCTOR;Hw&&Hw.prototype,d_({target:"Promise",proto:!0,forced:c_,real:!0},{catch:function(t){return this.then(void 0,t)}});var u_=z,f_=Ft,p_=rx,v_=Lw,g_=nb;Di({target:"Promise",stat:!0,forced:o_},{race:function(t){var e=this,i=p_.f(e),n=i.reject,o=v_((function(){var o=f_(e.resolve);g_(t,(function(t){u_(o,e,t).then(i.resolve,n)}))}));return o.error&&n(o.value),i.promise}});var y_=z,m_=rx;Di({target:"Promise",stat:!0,forced:ox.CONSTRUCTOR},{reject:function(t){var e=m_.f(this);return y_(e.reject,void 0,t),e.promise}});var b_=si,w_=ot,x_=rx,__=function(t,e){if(b_(t),w_(e)&&e.constructor===t)return e;var i=x_.f(t);return(0,i.resolve)(e),i.promise},k_=Di,E_=Hw,O_=ox.CONSTRUCTOR,C_=__,S_=dt("Promise"),T_=!O_;k_({target:"Promise",stat:!0,forced:true},{resolve:function(t){return C_(T_&&this===S_?E_:this,t)}});var P_=z,I_=Ft,M_=rx,D_=Lw,A_=nb;Di({target:"Promise",stat:!0,forced:o_},{allSettled:function(t){var e=this,i=M_.f(e),n=i.resolve,o=i.reject,r=D_((function(){var i=I_(e.resolve),o=[],r=0,s=1;A_(t,(function(t){var a=r++,l=!1;s++,P_(i,e,t).then((function(t){l||(l=!0,o[a]={status:"fulfilled",value:t},--s||n(o))}),(function(t){l||(l=!0,o[a]={status:"rejected",reason:t},--s||n(o))}))})),--s||n(o)}));return r.error&&o(r.value),i.promise}});var B_=z,F_=Ft,z_=dt,N_=rx,j_=Lw,R_=nb,L_="No one promise resolved";Di({target:"Promise",stat:!0,forced:o_},{any:function(t){var e=this,i=z_("AggregateError"),n=N_.f(e),o=n.resolve,r=n.reject,s=j_((function(){var n=F_(e.resolve),s=[],a=0,l=1,h=!1;R_(t,(function(t){var d=a++,c=!1;l++,B_(n,e,t).then((function(t){c||h||(h=!0,o(t))}),(function(t){c||h||(c=!0,s[d]=t,--l||r(new i(s,L_)))}))})),--l||r(new i(s,L_))}));return s.error&&r(s.value),n.promise}});var H_=Di,W_=Hw,q_=h,U_=dt,V_=M,Y_=jb,X_=__,$_=W_&&W_.prototype;H_({target:"Promise",proto:!0,real:!0,forced:!!W_&&q_((function(){$_.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=Y_(this,U_("Promise")),i=V_(t);return this.then(i?function(i){return X_(e,t()).then((function(){return i}))}:t,i?function(i){return X_(e,t()).then((function(){throw i}))}:t)}});var G_=rt.Promise,K_=rx;Di({target:"Promise",stat:!0},{withResolvers:function(){var t=K_.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var Z_=G_,Q_=rx,J_=Lw;Di({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=Q_.f(this),i=J_(t);return(i.error?e.reject:e.resolve)(i.value),e.promise}});var tk=Z_,ek=fp;!function(t){var e=Om.default,i=Ri,n=yd,o=um,r=wm,s=Cm,a=ef,l=pm,h=tk,d=ek,c=kf;function u(){t.exports=u=function(){return p},t.exports.__esModule=!0,t.exports.default=t.exports;var f,p={},v=Object.prototype,g=v.hasOwnProperty,y=i||function(t,e,i){t[e]=i.value},m="function"==typeof n?n:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",x=m.toStringTag||"@@toStringTag";function _(t,e,n){return i(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{_({},"")}catch(f){_=function(t,e,i){return t[e]=i}}function k(t,e,i,n){var r=e&&e.prototype instanceof I?e:I,s=o(r.prototype),a=new W(n||[]);return y(s,"_invoke",{value:j(t,i,a)}),s}function E(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}p.wrap=k;var O="suspendedStart",C="suspendedYield",S="executing",T="completed",P={};function I(){}function M(){}function D(){}var A={};_(A,b,(function(){return this}));var B=r&&r(r(q([])));B&&B!==v&&g.call(B,b)&&(A=B);var F=D.prototype=I.prototype=o(A);function z(t){var e;s(e=["next","throw","return"]).call(e,(function(e){_(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,i){function n(o,r,s,a){var l=E(t[o],t,r);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==e(d)&&g.call(d,"__await")?i.resolve(d.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):i.resolve(d).then((function(t){h.value=t,s(h)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var o;y(this,"_invoke",{value:function(t,e){function r(){return new i((function(i,o){n(t,e,i,o)}))}return o=o?o.then(r,r):r()}})}function j(t,e,i){var n=O;return function(o,r){if(n===S)throw new Error("Generator is already running");if(n===T){if("throw"===o)throw r;return{value:f,done:!0}}for(i.method=o,i.arg=r;;){var s=i.delegate;if(s){var a=R(s,i);if(a){if(a===P)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===O)throw n=T,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=S;var l=E(t,e,i);if("normal"===l.type){if(n=i.done?T:C,l.arg===P)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=T,i.method="throw",i.arg=l.arg)}}}function R(t,e){var i=e.method,n=t.iterator[i];if(n===f)return e.delegate=null,"throw"===i&&t.iterator.return&&(e.method="return",e.arg=f,R(t,e),"throw"===e.method)||"return"!==i&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+i+"' method")),P;var o=E(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,P;var r=o.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=f),e.delegate=null,P):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,P)}function L(t){var e,i={tryLoc:t[0]};1 in t&&(i.catchLoc=t[1]),2 in t&&(i.finallyLoc=t[2],i.afterLoc=t[3]),a(e=this.tryEntries).call(e,i)}function H(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function W(t){this.tryEntries=[{tryLoc:"root"}],s(t).call(t,L,this),this.reset(!0)}function q(t){if(t||""===t){var i=t[b];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(g.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=f,e.done=!0,e};return o.next=o}}throw new TypeError(e(t)+" is not iterable")}return M.prototype=D,y(F,"constructor",{value:D,configurable:!0}),y(D,"constructor",{value:M,configurable:!0}),M.displayName=_(D,x,"GeneratorFunction"),p.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===M||"GeneratorFunction"===(e.displayName||e.name))},p.mark=function(t){return l?l(t,D):(t.__proto__=D,_(t,x,"GeneratorFunction")),t.prototype=o(F),t},p.awrap=function(t){return{__await:t}},z(N.prototype),_(N.prototype,w,(function(){return this})),p.AsyncIterator=N,p.async=function(t,e,i,n,o){void 0===o&&(o=h);var r=new N(k(t,e,i,n),o);return p.isGeneratorFunction(e)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},z(F),_(F,x,"Generator"),_(F,b,(function(){return this})),_(F,"toString",(function(){return"[object Generator]"})),p.keys=function(t){var e=Object(t),i=[];for(var n in e)a(i).call(i,n);return d(i).call(i),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},p.values=q,W.prototype={constructor:W,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,s(e=this.tryEntries).call(e,H),!t)for(var i in this)"t"===i.charAt(0)&&g.call(this,i)&&!isNaN(+c(i).call(i,1))&&(this[i]=f)},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 i(i,n){return r.type="throw",r.arg=t,e.next=i,n&&(e.method="next",e.arg=f),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=g.call(o,"catchLoc"),a=g.call(o,"finallyLoc");if(s&&a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var r=o?o.completion:{};return r.type=t,r.arg=e,o?(this.method="next",this.next=o.finallyLoc,P):this.complete(r)},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),P},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),H(i),P}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;H(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:q(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=f),P}},p}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports}(km);var ik=(0,km.exports)(),nk=ik;try{regeneratorRuntime=ik}catch(VO){"object"==typeof globalThis?globalThis.regeneratorRuntime=ik:Function("r","regeneratorRuntime = r")(ik)}var ok=r(nk),rk={exports:{}},sk=h((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),ak=h,lk=ot,hk=E,dk=sk,ck=Object.isExtensible,uk=ak((function(){ck(1)}))||dk?function(t){return!!lk(t)&&((!dk||"ArrayBuffer"!==hk(t))&&(!ck||ck(t)))}:ck,fk=!h((function(){return Object.isExtensible(Object.preventExtensions({}))})),pk=Di,vk=w,gk=go,yk=ot,mk=ie,bk=ei.f,wk=Qo,xk=er,_k=uk,kk=fk,Ek=!1,Ok=ae("meta"),Ck=0,Sk=function(t){bk(t,Ok,{value:{objectID:"O"+Ck++,weakData:{}}})},Tk=rk.exports={enable:function(){Tk.enable=function(){},Ek=!0;var t=wk.f,e=vk([].splice),i={};i[Ok]=1,t(i).length&&(wk.f=function(i){for(var n=t(i),o=0,r=n.length;o<r;o++)if(n[o]===Ok){e(n,o,1);break}return n},pk({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:xk.f}))},fastKey:function(t,e){if(!yk(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!mk(t,Ok)){if(!_k(t))return"F";if(!e)return"E";Sk(t)}return t[Ok].objectID},getWeakData:function(t,e){if(!mk(t,Ok)){if(!_k(t))return!0;if(!e)return!1;Sk(t)}return t[Ok].weakData},onFreeze:function(t){return kk&&Ek&&_k(t)&&!mk(t,Ok)&&Sk(t),t}};gk[Ok]=!0;var Pk=rk.exports,Ik=Di,Mk=l,Dk=Pk,Ak=h,Bk=wi,Fk=nb,zk=Ab,Nk=M,jk=ot,Rk=G,Lk=Hr,Hk=ei.f,Wk=cs.forEach,qk=A,Uk=ns.set,Vk=ns.getterFor,Yk=function(t,e,i){var n,o=-1!==t.indexOf("Map"),r=-1!==t.indexOf("Weak"),s=o?"set":"add",a=Mk[t],l=a&&a.prototype,h={};if(qk&&Nk(a)&&(r||l.forEach&&!Ak((function(){(new a).entries().next()})))){var d=(n=e((function(e,i){Uk(zk(e,d),{type:t,collection:new a}),Rk(i)||Fk(i,e[s],{that:e,AS_ENTRIES:o})}))).prototype,c=Vk(t);Wk(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in l)||r&&"clear"===t||Bk(d,t,(function(i,n){var o=c(this).collection;if(!e&&r&&!jk(i))return"get"===t&&void 0;var s=o[t](0===i?0:i,n);return e?this:s}))})),r||Hk(d,"size",{configurable:!0,get:function(){return c(this).collection.size}})}else n=i.getConstructor(e,t,o,s),Dk.enable();return Lk(n,t,!1,!0),h[t]=n,Ik({global:!0,forced:!0},h),r||i.setStrong(n,t,o),n},Xk=vr,$k=Zo,Gk=yr,Kk=function(t,e,i){for(var n in e)i&&i.unsafe&&t[n]?t[n]=e[n]:Xk(t,n,e[n],i);return t},Zk=ti,Qk=Ab,Jk=G,tE=nb,eE=Ch,iE=Sh,nE=Ib,oE=A,rE=Pk.fastKey,sE=ns.set,aE=ns.getterFor,lE={getConstructor:function(t,e,i,n){var o=t((function(t,o){Qk(t,r),sE(t,{type:e,index:$k(null),first:void 0,last:void 0,size:0}),oE||(t.size=0),Jk(o)||tE(o,t[n],{that:t,AS_ENTRIES:i})})),r=o.prototype,s=aE(e),a=function(t,e,i){var n,o,r=s(t),a=l(t,e);return a?a.value=i:(r.last=a={index:o=rE(e,!0),key:e,value:i,previous:n=r.last,next:void 0,removed:!1},r.first||(r.first=a),n&&(n.next=a),oE?r.size++:t.size++,"F"!==o&&(r.index[o]=a)),t},l=function(t,e){var i,n=s(t),o=rE(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key===e)return i};return Kk(r,{clear:function(){for(var t=s(this),e=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete e[i.index],i=i.next;t.first=t.last=void 0,oE?t.size=0:this.size=0},delete:function(t){var e=this,i=s(e),n=l(e,t);if(n){var o=n.next,r=n.previous;delete i.index[n.index],n.removed=!0,r&&(r.next=o),o&&(o.previous=r),i.first===n&&(i.first=o),i.last===n&&(i.last=r),oE?i.size--:e.size--}return!!n},forEach:function(t){for(var e,i=s(this),n=Zk(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!l(this,t)}}),Kk(r,i?{get:function(t){var e=l(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),oE&&Gk(r,"size",{configurable:!0,get:function(){return s(this).size}}),o},setStrong:function(t,e,i){var n=e+" Iterator",o=aE(e),r=aE(n);eE(t,e,(function(t,e){sE(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=r(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?iE("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=void 0,iE(void 0,!0))}),i?"entries":"values",!i,!0),nE(e)}};Yk("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),lE);var hE=r(rt.Map),dE=cs.some;Di({target:"Array",proto:!0,forced:!bc("some")},{some:function(t){return dE(this,t,arguments.length>1?arguments[1]:void 0)}});var cE=oc("Array","some"),uE=ct,fE=cE,pE=Array.prototype,vE=r((function(t){var e=t.some;return t===pE||uE(pE,t)&&e===pE.some?fE:e})),gE=oc("Array","keys"),yE=un,mE=ie,bE=ct,wE=gE,xE=Array.prototype,_E={DOMTokenList:!0,NodeList:!0},kE=r((function(t){var e=t.keys;return t===xE||bE(xE,t)&&e===xE.keys||mE(_E,yE(t))?wE:e})),EE=ar,OE=Math.floor,CE=function(t,e){for(var i,n,o=t.length,r=1;r<o;){for(n=r,i=t[r];n&&e(t[n-1],i)>0;)t[n]=t[--n];n!==r++&&(t[n]=i)}return t},SE=function(t,e,i,n){for(var o=e.length,r=i.length,s=0,a=0;s<o||a<r;)t[s+a]=s<o&&a<r?n(e[s],i[a])<=0?e[s++]:i[a++]:s<o?e[s++]:i[a++];return t},TE=function t(e,i){var n=e.length,o=OE(n/2);return n<8?CE(e,i):SE(e,t(EE(e,0,o),i),t(EE(e,o),i),i)},PE=ut.match(/firefox\/(\d+)/i),IE=!!PE&&+PE[1],ME=/MSIE|Trident/.test(ut),DE=ut.match(/AppleWebKit\/(\d+)\./),AE=!!DE&&+DE[1],BE=Di,FE=w,zE=Ft,NE=Jt,jE=Ki,RE=yp,LE=oo,HE=h,WE=TE,qE=bc,UE=IE,VE=ME,YE=bt,XE=AE,$E=[],GE=FE($E.sort),KE=FE($E.push),ZE=HE((function(){$E.sort(void 0)})),QE=HE((function(){$E.sort(null)})),JE=qE("sort"),tO=!HE((function(){if(YE)return YE<70;if(!(UE&&UE>3)){if(VE)return!0;if(XE)return XE<603;var t,e,i,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)$E.push({k:e+n,v:i})}for($E.sort((function(t,e){return e.v-t.v})),n=0;n<$E.length;n++)e=$E[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));BE({target:"Array",proto:!0,forced:ZE||!QE||!JE||!tO},{sort:function(t){void 0!==t&&zE(t);var e=NE(this);if(tO)return void 0===t?GE(e):GE(e,t);var i,n,o=[],r=jE(e);for(n=0;n<r;n++)n in e&&KE(o,e[n]);for(WE(o,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:LE(e)>LE(i)?1:-1}}(t)),i=jE(o),n=0;n<i;)e[n]=o[n++];for(;n<r;)RE(e,n++);return e}});var eO=oc("Array","sort"),iO=ct,nO=eO,oO=Array.prototype,rO=r((function(t){var e=t.sort;return t===oO||iO(oO,t)&&e===oO.sort?nO:e})),sO=oc("Array","values"),aO=un,lO=ie,hO=ct,dO=sO,cO=Array.prototype,uO={DOMTokenList:!0,NodeList:!0},fO=r((function(t){var e=t.values;return t===cO||hO(cO,t)&&e===cO.values||lO(uO,aO(t))?dO:e})),pO=r(Fd),vO=oc("Array","entries"),gO=un,yO=ie,mO=ct,bO=vO,wO=Array.prototype,xO={DOMTokenList:!0,NodeList:!0},_O=r((function(t){var e=t.entries;return t===wO||mO(wO,t)&&e===wO.entries||yO(xO,gO(t))?bO:e}));let kO;const EO=new Uint8Array(16);function OO(){if(!kO&&(kO="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!kO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kO(EO)}const CO=[];for(let YO=0;YO<256;++YO)CO.push((YO+256).toString(16).slice(1));var SO={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function TO(t,e,i){if(SO.randomUUID&&!e&&!t)return SO.randomUUID();const n=(t=t||{}).random||(t.rng||OO)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(let t=0;t<16;++t)e[i+t]=n[t];return e}return function(t,e=0){return CO[t[e+0]]+CO[t[e+1]]+CO[t[e+2]]+CO[t[e+3]]+"-"+CO[t[e+4]]+CO[t[e+5]]+"-"+CO[t[e+6]]+CO[t[e+7]]+"-"+CO[t[e+8]]+CO[t[e+9]]+"-"+CO[t[e+10]]+CO[t[e+11]]+CO[t[e+12]]+CO[t[e+13]]+CO[t[e+14]]+CO[t[e+15]]}(n)}function PO(t){return"string"==typeof t||"number"==typeof t}var IO=function(){function t(e){n(this,t),qd(this,"_queue",[]),qd(this,"_timeout",null),qd(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}return Wd(t,[{key:"setOptions",value:function(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var t=this._extended.object,e=this._extended.methods,i=0;i<e.length;i++){var n=e[i];n.original?t[n.name]=n.original:delete t[n.name]}this._extended=null}}},{key:"replace",value:function(t,e){var i=this,n=t[e];if(!n)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];i.queue({args:e,fn:n,context:this})}}},{key:"queue",value:function(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var t=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Sv((function(){t.flush()}),this.delay))}},{key:"flush",value:function(){var t,e;op(t=Fp(e=this._queue).call(e,0)).call(t,(function(t){t.fn.apply(t.context||t.fn,t.args||[])}))}}],[{key:"extend",value:function(e,i){var n=new t(i);if(void 0!==e.flush)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var o=[{name:"flush",original:void 0}];if(i&&i.replace)for(var r=0;r<i.replace.length;r++){var s=i.replace[r];o.push({name:s,original:e[s]}),n.replace(e,s)}return n._extended={object:e,methods:o},n}}]),t}(),MO=function(){function t(){n(this,t),qd(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),qd(this,"subscribe",t.prototype.on),qd(this,"unsubscribe",t.prototype.off)}return Wd(t,[{key:"_trigger",value:function(t,e,i){var n,o;if("*"===t)throw new Error("Cannot trigger event *");op(n=Ff(o=[]).call(o,Pf(this._subscribers[t]),Pf(this._subscribers["*"]))).call(n,(function(n){n(t,e,null!=i?i:null)}))}},{key:"on",value:function(t,e){"function"==typeof e&&this._subscribers[t].push(e)}},{key:"off",value:function(t,e){var i;this._subscribers[t]=Dc(i=this._subscribers[t]).call(i,(function(t){return t!==e}))}}]),t}();Yk("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),lE);var DO=r(rt.Set),AO=r(yu);function BO(t,e){var i=void 0!==If&&Ru(t)||t["@@iterator"];if(!i){if(Uf(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return FO(t,e);var n=zf(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return zu(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FO(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function FO(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var zO=function(t){function e(t){n(this,e),this._pairs=t}return Wd(e,[{key:t,value:ok.mark((function t(){var e,i,n,o,r;return ok.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=BO(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Tf(i.value,2),o=n[0],r=n[1],t.next=7,[o,r];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"entries",value:ok.mark((function t(){var e,i,n,o,r;return ok.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=BO(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Tf(i.value,2),o=n[0],r=n[1],t.next=7,[o,r];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"keys",value:ok.mark((function t(){var e,i,n,o;return ok.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=BO(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Tf(i.value,1),o=n[0],t.next=7,o;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"values",value:ok.mark((function t(){var e,i,n,o;return ok.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=BO(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Tf(i.value,2),o=n[1],t.next=7,o;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"toIdArray",value:function(){var t;return jc(t=Pf(this._pairs)).call(t,(function(t){return t[0]}))}},{key:"toItemArray",value:function(){var t;return jc(t=Pf(this._pairs)).call(t,(function(t){return t[1]}))}},{key:"toEntryArray",value:function(){return Pf(this._pairs)}},{key:"toObjectMap",value:function(){var t,e=nv(null),i=BO(this._pairs);try{for(i.s();!(t=i.n()).done;){var n=Tf(t.value,2),o=n[0],r=n[1];e[o]=r}}catch(s){i.e(s)}finally{i.f()}return e}},{key:"toMap",value:function(){return new hE(this._pairs)}},{key:"toIdSet",value:function(){return new DO(this.toIdArray())}},{key:"toItemSet",value:function(){return new DO(this.toItemArray())}},{key:"cache",value:function(){return new e(Pf(this._pairs))}},{key:"distinct",value:function(t){var e,i=new DO,n=BO(this._pairs);try{for(n.s();!(e=n.n()).done;){var o=Tf(e.value,2),r=o[0],s=o[1];i.add(t(s,r))}}catch(a){n.e(a)}finally{n.f()}return i}},{key:"filter",value:function(t){var i=this._pairs;return new e({[pO](){return ok.mark((function e(){var n,o,r,s,a;return ok.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=BO(i),e.prev=1,n.s();case 3:if((o=n.n()).done){e.next=10;break}if(r=Tf(o.value,2),s=r[0],a=r[1],!t(a,s)){e.next=8;break}return e.next=8,[s,a];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])}))()}})}},{key:"forEach",value:function(t){var e,i=BO(this._pairs);try{for(i.s();!(e=i.n()).done;){var n=Tf(e.value,2),o=n[0];t(n[1],o)}}catch(r){i.e(r)}finally{i.f()}}},{key:"map",value:function(t){var i=this._pairs;return new e({[pO](){return ok.mark((function e(){var n,o,r,s,a;return ok.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=BO(i),e.prev=1,n.s();case 3:if((o=n.n()).done){e.next=9;break}return r=Tf(o.value,2),s=r[0],a=r[1],e.next=7,[s,t(a,s)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))()}})}},{key:"max",value:function(t){var e=AO(this._pairs),i=e.next();if(i.done)return null;for(var n=i.value[1],o=t(i.value[1],i.value[0]);!(i=e.next()).done;){var r=Tf(i.value,2),s=r[0],a=r[1],l=t(a,s);l>o&&(o=l,n=a)}return n}},{key:"min",value:function(t){var e=AO(this._pairs),i=e.next();if(i.done)return null;for(var n=i.value[1],o=t(i.value[1],i.value[0]);!(i=e.next()).done;){var r=Tf(i.value,2),s=r[0],a=r[1],l=t(a,s);l<o&&(o=l,n=a)}return n}},{key:"reduce",value:function(t,e){var i,n=BO(this._pairs);try{for(n.s();!(i=n.n()).done;){var o=Tf(i.value,2),r=o[0];e=t(e,o[1],r)}}catch(s){n.e(s)}finally{n.f()}return e}},{key:"sort",value:function(t){var i=this;return new e({[pO]:function(){var e;return AO(rO(e=Pf(i._pairs)).call(e,(function(e,i){var n=Tf(e,2),o=n[0],r=n[1],s=Tf(i,2),a=s[0],l=s[1];return t(r,l,o,a)})))}})}}]),e}(pO);function NO(t,e){var i=Xf(t);if(Wy){var n=Wy(t);e&&(n=Dc(n).call(n,(function(e){return Zy(t,e).enumerable}))),i.push.apply(i,n)}return i}function jO(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?op(i=NO(Object(o),!0)).call(i,(function(e){qd(t,e,o[e])})):im?hm(t,im(o)):op(n=NO(Object(o))).call(n,(function(e){dm(t,e,Zy(o,e))}))}return t}function RO(t,e){var i=void 0!==If&&Ru(t)||t["@@iterator"];if(!i){if(Uf(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return LO(t,e);var n=zf(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return zu(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LO(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function LO(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function HO(t){var e=function(){if("undefined"==typeof Reflect||!Hy)return!1;if(Hy.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Hy(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=_m(t);if(e){var o=_m(this).constructor;i=Hy(n,arguments,o)}else i=n.apply(this,arguments);return bm(this,i)}}var WO=function(t){mm(i,t);var e=HO(i);function i(t,o){var r;return n(this,i),qd(cm(r=e.call(this)),"_queue",null),t&&!Uf(t)&&(o=t,t=[]),r._options=o||{},r._data=new hE,r.length=0,r._idProp=r._options.fieldId||"id",t&&t.length&&r.add(t),r.setOptions(o),r}return Wd(i,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=IO.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"==typeof t.queue&&this._queue.setOptions(t.queue)))}},{key:"add",value:function(t,e){var i,n=this,o=[];if(Uf(t)){var r=jc(t).call(t,(function(t){return t[n._idProp]}));if(vE(r).call(r,(function(t){return n._data.has(t)})))throw new Error("A duplicate id was found in the parameter array.");for(var s=0,a=t.length;s<a;s++)i=this._addItem(t[s]),o.push(i)}else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");i=this._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o}},{key:"update",value:function(t,e){var i=this,n=[],o=[],r=[],s=[],a=this._idProp,l=function(t){var e=t[a];if(null!=e&&i._data.has(e)){var l=t,h=Kp({},i._data.get(e)),d=i._updateItem(l);o.push(d),s.push(l),r.push(h)}else{var c=i._addItem(t);n.push(c)}};if(Uf(t))for(var h=0,d=t.length;h<d;h++)t[h]&&"object"==typeof t[h]?l(t[h]):console.warn("Ignoring input item, which is not an object at index "+h);else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");l(t)}if(n.length&&this._trigger("add",{items:n},e),o.length){var c={items:o,oldData:r,data:s};this._trigger("update",c,e)}return Ff(n).call(n,o)}},{key:"updateOnly",value:function(t,e){var i,n=this;Uf(t)||(t=[t]);var o=jc(i=jc(t).call(t,(function(t){var e=n._data.get(t[n._idProp]);if(null==e)throw new Error("Updating non-existent items is not allowed.");return{oldData:e,update:t}}))).call(i,(function(t){var e=t.oldData,i=t.update,o=e[n._idProp],r=function(t){for(var e,i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return yy.apply(void 0,Ff(e=[{},t]).call(e,n))}(e,i);return n._data.set(o,r),{id:o,oldData:e,updatedData:r}}));if(o.length){var r={items:jc(o).call(o,(function(t){return t.id})),oldData:jc(o).call(o,(function(t){return t.oldData})),data:jc(o).call(o,(function(t){return t.updatedData}))};return this._trigger("update",r,e),r.items}return[]}},{key:"get",value:function(t,e){var i=void 0,n=void 0,o=void 0;PO(t)?(i=t,o=e):Uf(t)?(n=t,o=e):o=t;var r,s=o&&"Object"===o.returnType?"Object":"Array",a=o&&Dc(o),l=[],h=void 0,d=void 0,c=void 0;if(null!=i)(h=this._data.get(i))&&a&&!a(h)&&(h=void 0);else if(null!=n)for(var u=0,f=n.length;u<f;u++)null==(h=this._data.get(n[u]))||a&&!a(h)||l.push(h);else for(var p,v=0,g=(d=Pf(kE(p=this._data).call(p))).length;v<g;v++)c=d[v],null==(h=this._data.get(c))||a&&!a(h)||l.push(h);if(o&&o.order&&null==i&&this._sort(l,o.order),o&&o.fields){var y=o.fields;if(null!=i&&null!=h)h=this._filterFields(h,y);else for(var m=0,b=l.length;m<b;m++)l[m]=this._filterFields(l[m],y)}if("Object"==s){for(var w={},x=0,_=l.length;x<_;x++){var k=l[x];w[k[this._idProp]]=k}return w}return null!=i?null!==(r=h)&&void 0!==r?r:null:l}},{key:"getIds",value:function(t){var e=this._data,i=t&&Dc(t),n=t&&t.order,o=Pf(kE(e).call(e)),r=[];if(i)if(n){for(var s=[],a=0,l=o.length;a<l;a++){var h=o[a],d=this._data.get(h);null!=d&&i(d)&&s.push(d)}this._sort(s,n);for(var c=0,u=s.length;c<u;c++)r.push(s[c][this._idProp])}else for(var f=0,p=o.length;f<p;f++){var v=o[f],g=this._data.get(v);null!=g&&i(g)&&r.push(g[this._idProp])}else if(n){for(var y=[],m=0,b=o.length;m<b;m++){var w=o[m];y.push(e.get(w))}this._sort(y,n);for(var x=0,_=y.length;x<_;x++)r.push(y[x][this._idProp])}else for(var k=0,E=o.length;k<E;k++){var O=o[k],C=e.get(O);null!=C&&r.push(C[this._idProp])}return r}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(t,e){var i=e&&Dc(e),n=this._data,o=Pf(kE(n).call(n));if(e&&e.order)for(var r=this.get(e),s=0,a=r.length;s<a;s++){var l=r[s];t(l,l[this._idProp])}else for(var h=0,d=o.length;h<d;h++){var c=o[h],u=this._data.get(c);null==u||i&&!i(u)||t(u,c)}}},{key:"map",value:function(t,e){for(var i=e&&Dc(e),n=[],o=this._data,r=Pf(kE(o).call(o)),s=0,a=r.length;s<a;s++){var l=r[s],h=this._data.get(l);null==h||i&&!i(h)||n.push(t(h,l))}return e&&e.order&&this._sort(n,e.order),n}},{key:"_filterFields",value:function(t,e){var i;return t?Cc(i=Uf(e)?e:Xf(e)).call(i,(function(e,i){return e[i]=t[i],e}),{}):t}},{key:"_sort",value:function(t,e){if("string"==typeof e){var i=e;rO(t).call(t,(function(t,e){var n=t[i],o=e[i];return n>o?1:n<o?-1:0}))}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");rO(t).call(t,e)}}},{key:"remove",value:function(t,e){for(var i=[],n=[],o=Uf(t)?t:[t],r=0,s=o.length;r<s;r++){var a=this._remove(o[r]);if(a){var l=a[this._idProp];null!=l&&(i.push(l),n.push(a))}}return i.length&&this._trigger("remove",{items:i,oldData:n},e),i}},{key:"_remove",value:function(t){var e;if(PO(t)?e=t:t&&"object"==typeof t&&(e=t[this._idProp]),null!=e&&this._data.has(e)){var i=this._data.get(e)||null;return this._data.delete(e),--this.length,i}return null}},{key:"clear",value:function(t){for(var e,i=Pf(kE(e=this._data).call(e)),n=[],o=0,r=i.length;o<r;o++)n.push(this._data.get(i[o]));return this._data.clear(),this.length=0,this._trigger("remove",{items:i,oldData:n},t),i}},{key:"max",value:function(t){var e,i,n=null,o=null,r=RO(fO(e=this._data).call(e));try{for(r.s();!(i=r.n()).done;){var s=i.value,a=s[t];"number"==typeof a&&(null==o||a>o)&&(n=s,o=a)}}catch(l){r.e(l)}finally{r.f()}return n||null}},{key:"min",value:function(t){var e,i,n=null,o=null,r=RO(fO(e=this._data).call(e));try{for(r.s();!(i=r.n()).done;){var s=i.value,a=s[t];"number"==typeof a&&(null==o||a<o)&&(n=s,o=a)}}catch(l){r.e(l)}finally{r.f()}return n||null}},{key:"distinct",value:function(t){for(var e=this._data,i=Pf(kE(e).call(e)),n=[],o=0,r=0,s=i.length;r<s;r++){for(var a=i[r],l=e.get(a)[t],h=!1,d=0;d<o;d++)if(n[d]==l){h=!0;break}h||void 0===l||(n[o]=l,o++)}return n}},{key:"_addItem",value:function(t){var e=function(t,e){return null==t[e]&&(t[e]=TO()),t}(t,this._idProp),i=e[this._idProp];if(this._data.has(i))throw new Error("Cannot add item: item with id "+i+" already exists");return this._data.set(i,e),++this.length,i}},{key:"_updateItem",value:function(t){var e=t[this._idProp];if(null==e)throw new Error("Cannot update item: item has no id (item: "+av(t)+")");var i=this._data.get(e);if(!i)throw new Error("Cannot update item: no item with id "+e+" found");return this._data.set(e,jO(jO({},i),t)),e}},{key:"stream",value:function(t){if(t){var e=this._data;return new zO({[pO](){return ok.mark((function i(){var n,o,r,s;return ok.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=RO(t),i.prev=1,n.s();case 3:if((o=n.n()).done){i.next=11;break}if(r=o.value,null==(s=e.get(r))){i.next=9;break}return i.next=9,[r,s];case 9:i.next=3;break;case 11:i.next=16;break;case 13:i.prev=13,i.t0=i.catch(1),n.e(i.t0);case 16:return i.prev=16,n.f(),i.finish(16);case 19:case"end":return i.stop()}}),i,null,[[1,13,16,19]])}))()}})}var i;return new zO({[pO]:dc(i=_O(this._data)).call(i,this._data)})}}]),i}(MO);function qO(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof op(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof jc(e)&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.stream&&function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.add&&"function"==typeof e.clear&&"function"==typeof e.distinct&&"function"==typeof op(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof jc(e)&&"function"==typeof e.max&&"function"==typeof e.min&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.remove&&"function"==typeof e.setOptions&&"function"==typeof e.stream&&"function"==typeof e.update&&"function"==typeof e.updateOnly}(t,e.getDataSet())}},11896:function(t,e,i){i.a(t,(async function(t,n){try{i.d(e,{Zc:()=>lP});var o=i(31948),r=(i(63721),i(52247),i(19083),i(71695),i(92745),i(52805),i(61495),i(61893),i(84283),i(82328),i(55751),i(26200),i(25754),i(22246),i(43451),i(9359),i(68107),i(56475),i(31526),i(70104),i(48136),i(52924),i(77439),i(66662),i(19423),i(39200),i(95078),i(23669),i(40251),i(87672),i(69235),i(12385),i(19134),i(5740),i(11740),i(61006),i(44495),i(97003),i(32114),i(81804),i(92789),i(36810),i(14953),i(58402),i(31503),i(16440),i(2213),i(57385),i(71375),i(15524),i(20267),i(47919),i(22139),i(21917),i(56193),i(25020),i(86913),i(47021),i(68289),i(67424)),s=t([o]);o=(s.then?(await s)():s)[0];var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function aO(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var l=function(t){return t&&t.Math===Math&&t},h=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof a&&a)||function(){return this}()||a||Function("return this")(),d=function(t){try{return!!t()}catch(e){return!0}},c=!d((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=c,f=Function.prototype,p=f.apply,v=f.call,g="object"==typeof Reflect&&Reflect.apply||(u?v.bind(p):function(){return v.apply(p,arguments)}),y=c,m=Function.prototype,b=m.call,w=y&&m.bind.bind(b,b),x=y?w:function(t){return function(){return b.apply(t,arguments)}},_=x,k=_({}.toString),E=_("".slice),O=function(t){return E(k(t),8,-1)},C=O,S=x,T=function(t){if("Function"===C(t))return S(t)},P="object"==typeof document&&document.all,I={all:P,IS_HTMLDDA:void 0===P&&void 0!==P},M=I.all,D=I.IS_HTMLDDA?function(t){return"function"==typeof t||t===M}:function(t){return"function"==typeof t},A={},B=!d((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),F=c,z=Function.prototype.call,N=F?z.bind(z):function(){return z.apply(z,arguments)},j={},R={}.propertyIsEnumerable,L=Object.getOwnPropertyDescriptor,H=L&&!R.call({1:2},1);j.f=H?function(t){var e=L(this,t);return!!e&&e.enumerable}:R;var W,q,U=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},V=d,Y=O,X=Object,$=x("".split),G=V((function(){return!X("z").propertyIsEnumerable(0)}))?function(t){return"String"===Y(t)?$(t,""):X(t)}:X,K=function(t){return null==t},Z=K,Q=TypeError,J=function(t){if(Z(t))throw new Q("Can't call method on "+t);return t},tt=G,et=J,it=function(t){return tt(et(t))},nt=D,ot=I.all,rt=I.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:nt(t)||t===ot}:function(t){return"object"==typeof t?null!==t:nt(t)},st={},at=st,lt=h,ht=D,dt=function(t){return ht(t)?t:void 0},ct=function(t,e){return arguments.length<2?dt(at[t])||dt(lt[t]):at[t]&&at[t][e]||lt[t]&<[t][e]},ut=x({}.isPrototypeOf),ft="undefined"!=typeof navigator&&String(navigator.userAgent)||"",pt=h,vt=ft,gt=pt.process,yt=pt.Deno,mt=gt&>.versions||yt&&yt.version,bt=mt&&mt.v8;bt&&(q=(W=bt.split("."))[0]>0&&W[0]<4?1:+(W[0]+W[1])),!q&&vt&&(!(W=vt.match(/Edge\/(\d+)/))||W[1]>=74)&&(W=vt.match(/Chrome\/(\d+)/))&&(q=+W[1]);var wt=q,xt=wt,_t=d,kt=h.String,Et=!!Object.getOwnPropertySymbols&&!_t((function(){var t=Symbol("symbol detection");return!kt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&xt&&xt<41})),Ot=Et&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ct=ct,St=D,Tt=ut,Pt=Object,It=Ot?function(t){return"symbol"==typeof t}:function(t){var e=Ct("Symbol");return St(e)&&Tt(e.prototype,Pt(t))},Mt=String,Dt=function(t){try{return Mt(t)}catch(e){return"Object"}},At=D,Bt=Dt,Ft=TypeError,zt=function(t){if(At(t))return t;throw new Ft(Bt(t)+" is not a function")},Nt=zt,jt=K,Rt=function(t,e){var i=t[e];return jt(i)?void 0:Nt(i)},Lt=N,Ht=D,Wt=rt,qt=TypeError,Ut={exports:{}},Vt=h,Yt=Object.defineProperty,Xt=function(t,e){try{Yt(Vt,t,{value:e,configurable:!0,writable:!0})}catch(i){Vt[t]=e}return e},$t="__core-js_shared__",Gt=h[$t]||Xt($t,{}),Kt=Gt;(Ut.exports=function(t,e){return Kt[t]||(Kt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Zt=Ut.exports,Qt=J,Jt=Object,te=function(t){return Jt(Qt(t))},ee=te,ie=x({}.hasOwnProperty),ne=Object.hasOwn||function(t,e){return ie(ee(t),e)},oe=x,re=0,se=Math.random(),ae=oe(1..toString),le=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ae(++re+se,36)},he=Zt,de=ne,ce=le,ue=Et,fe=Ot,pe=h.Symbol,ve=he("wks"),ge=fe?pe.for||pe:pe&&pe.withoutSetter||ce,ye=function(t){return de(ve,t)||(ve[t]=ue&&de(pe,t)?pe[t]:ge("Symbol."+t)),ve[t]},me=N,be=rt,we=It,xe=Rt,_e=function(t,e){var i,n;if("string"===e&&Ht(i=t.toString)&&!Wt(n=Lt(i,t)))return n;if(Ht(i=t.valueOf)&&!Wt(n=Lt(i,t)))return n;if("string"!==e&&Ht(i=t.toString)&&!Wt(n=Lt(i,t)))return n;throw new qt("Can't convert object to primitive value")},ke=TypeError,Ee=ye("toPrimitive"),Oe=function(t,e){if(!be(t)||we(t))return t;var i,n=xe(t,Ee);if(n){if(void 0===e&&(e="default"),i=me(n,t,e),!be(i)||we(i))return i;throw new ke("Can't convert object to primitive value")}return void 0===e&&(e="number"),_e(t,e)},Ce=It,Se=function(t){var e=Oe(t,"string");return Ce(e)?e:e+""},Te=rt,Pe=h.document,Ie=Te(Pe)&&Te(Pe.createElement),Me=function(t){return Ie?Pe.createElement(t):{}},De=Me,Ae=!B&&!d((function(){return 7!==Object.defineProperty(De("div"),"a",{get:function(){return 7}}).a})),Be=B,Fe=N,ze=j,Ne=U,je=it,Re=Se,Le=ne,He=Ae,We=Object.getOwnPropertyDescriptor;A.f=Be?We:function(t,e){if(t=je(t),e=Re(e),He)try{return We(t,e)}catch(i){}if(Le(t,e))return Ne(!Fe(ze.f,t,e),t[e])};var qe=d,Ue=D,Ve=/#|\.prototype\./,Ye=function(t,e){var i=$e[Xe(t)];return i===Ke||i!==Ge&&(Ue(e)?qe(e):!!e)},Xe=Ye.normalize=function(t){return String(t).replace(Ve,".").toLowerCase()},$e=Ye.data={},Ge=Ye.NATIVE="N",Ke=Ye.POLYFILL="P",Ze=Ye,Qe=zt,Je=c,ti=T(T.bind),ei=function(t,e){return Qe(t),void 0===e?t:Je?ti(t,e):function(){return t.apply(e,arguments)}},ii={},ni=B&&d((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),oi=rt,ri=String,si=TypeError,ai=function(t){if(oi(t))return t;throw new si(ri(t)+" is not an object")},li=B,hi=Ae,di=ni,ci=ai,ui=Se,fi=TypeError,pi=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,gi="enumerable",yi="configurable",mi="writable";ii.f=li?di?function(t,e,i){if(ci(t),e=ui(e),ci(i),"function"==typeof t&&"prototype"===e&&"value"in i&&mi in i&&!i[mi]){var n=vi(t,e);n&&n[mi]&&(t[e]=i.value,i={configurable:yi in i?i[yi]:n[yi],enumerable:gi in i?i[gi]:n[gi],writable:!1})}return pi(t,e,i)}:pi:function(t,e,i){if(ci(t),e=ui(e),ci(i),hi)try{return pi(t,e,i)}catch(n){}if("get"in i||"set"in i)throw new fi("Accessors not supported");return"value"in i&&(t[e]=i.value),t};var bi=ii,wi=U,xi=B?function(t,e,i){return bi.f(t,e,wi(1,i))}:function(t,e,i){return t[e]=i,t},_i=h,ki=g,Ei=T,Oi=D,Ci=A.f,Si=Ze,Ti=st,Pi=ei,Ii=xi,Mi=ne,Di=function(t){var e=function e(i,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,n)}return new t(i,n,o)}return ki(t,this,arguments)};return e.prototype=t.prototype,e},Ai=function(t,e){var i,n,o,r,s,a,l,h,d,c=t.target,u=t.global,f=t.stat,p=t.proto,v=u?_i:f?_i[c]:(_i[c]||{}).prototype,g=u?Ti:Ti[c]||Ii(Ti,c,{})[c],y=g.prototype;for(r in e)n=!(i=Si(u?r:c+(f?".":"#")+r,t.forced))&&v&&Mi(v,r),a=g[r],n&&(l=t.dontCallGetSet?(d=Ci(v,r))&&d.value:v[r]),s=n&&l?l:e[r],n&&typeof a==typeof s||(h=t.bind&&n?Pi(s,_i):t.wrap&&n?Di(s):p&&Oi(s)?Ei(s):s,(t.sham||s&&s.sham||a&&a.sham)&&Ii(h,"sham",!0),Ii(g,r,h),p&&(Mi(Ti,o=c+"Prototype")||Ii(Ti,o,{}),Ii(Ti[o],r,s),t.real&&y&&(i||!y[r])&&Ii(y,r,s)))},Bi=Math.ceil,Fi=Math.floor,zi=Math.trunc||function(t){var e=+t;return(e>0?Fi:Bi)(e)},Ni=function(t){var e=+t;return e!=e||0===e?0:zi(e)},ji=Ni,Ri=Math.max,Li=Math.min,Hi=function(t,e){var i=ji(t);return i<0?Ri(i+e,0):Li(i,e)},Wi=Ni,qi=Math.min,Ui=function(t){return t>0?qi(Wi(t),9007199254740991):0},Vi=function(t){return Ui(t.length)},Yi=it,Xi=Hi,$i=Vi,Gi=function(t){return function(e,i,n){var o,r=Yi(e),s=$i(r),a=Xi(n,s);if(t&&i!=i){for(;s>a;)if((o=r[a++])!=o)return!0}else for(;s>a;a++)if((t||a in r)&&r[a]===i)return t||a||0;return!t&&-1}},Ki={includes:Gi(!0),indexOf:Gi(!1)},Zi={},Qi=ne,Ji=it,tn=Ki.indexOf,en=Zi,nn=x([].push),on=function(t,e){var i,n=Ji(t),o=0,r=[];for(i in n)!Qi(en,i)&&Qi(n,i)&&nn(r,i);for(;e.length>o;)Qi(n,i=e[o++])&&(~tn(r,i)||nn(r,i));return r},rn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],sn=on,an=rn,ln=Object.keys||function(t){return sn(t,an)},hn={};hn.f=Object.getOwnPropertySymbols;var dn=B,cn=x,un=N,fn=d,pn=ln,vn=hn,gn=j,yn=te,mn=G,bn=Object.assign,wn=Object.defineProperty,xn=cn([].concat),_n=!bn||fn((function(){if(dn&&1!==bn({b:1},bn(wn({},"a",{enumerable:!0,get:function(){wn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach((function(t){e[t]=t})),7!==bn({},t)[i]||pn(bn({},e)).join("")!==n}))?function(t,e){for(var i=yn(t),n=arguments.length,o=1,r=vn.f,s=gn.f;n>o;)for(var a,l=mn(arguments[o++]),h=r?xn(pn(l),r(l)):pn(l),d=h.length,c=0;d>c;)a=h[c++],dn&&!un(s,l,a)||(i[a]=l[a]);return i}:bn,kn=_n;Ai({target:"Object",stat:!0,arity:2,forced:Object.assign!==kn},{assign:kn});var En=aO(st.Object.assign),On=x([].slice),Cn=x,Sn=zt,Tn=rt,Pn=ne,In=On,Mn=c,Dn=Function,An=Cn([].concat),Bn=Cn([].join),Fn={},zn=Mn?Dn.bind:function(t){var e=Sn(this),i=e.prototype,n=In(arguments,1),o=function(){var i=An(n,In(arguments));return this instanceof o?function(t,e,i){if(!Pn(Fn,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Fn[e]=Dn("C,a","return new C("+Bn(n,",")+")")}return Fn[e](t,i)}(e,i.length,i):e.apply(t,i)};return Tn(i)&&(o.prototype=i),o},Nn=zn;Ai({target:"Function",proto:!0,forced:Function.bind!==Nn},{bind:Nn});var jn=st,Rn=function(t){return jn[t+"Prototype"]},Ln=Rn("Function").bind,Hn=ut,Wn=Ln,qn=Function.prototype,Un=function(t){var e=t.bind;return t===qn||Hn(qn,t)&&e===qn.bind?Wn:e},Vn=Un,Yn=aO(Vn);function lO(t,e,i,n){t.beginPath(),t.arc(e,i,n,0,2*Math.PI,!1),t.closePath()}function hO(t,e,i,n){t.beginPath(),t.rect(e-n,i-n,2*n,2*n),t.closePath()}function dO(t,e,i,n){t.beginPath(),i+=.275*(n*=1.15);var o=2*n,r=o/2,s=Math.sqrt(3)/6*o,a=Math.sqrt(o*o-r*r);t.moveTo(e,i-(a-s)),t.lineTo(e+r,i+s),t.lineTo(e-r,i+s),t.lineTo(e,i-(a-s)),t.closePath()}function cO(t,e,i,n){t.beginPath(),i-=.275*(n*=1.15);var o=2*n,r=o/2,s=Math.sqrt(3)/6*o,a=Math.sqrt(o*o-r*r);t.moveTo(e,i+(a-s)),t.lineTo(e+r,i-s),t.lineTo(e-r,i-s),t.lineTo(e,i+(a-s)),t.closePath()}function uO(t,e,i,n){t.beginPath(),i+=.1*(n*=.82);for(var o=0;o<10;o++){var r=o%2==0?1.3*n:.5*n;t.lineTo(e+r*Math.sin(2*o*Math.PI/10),i-r*Math.cos(2*o*Math.PI/10))}t.closePath()}function fO(t,e,i,n){t.beginPath(),t.lineTo(e,i+n),t.lineTo(e+n,i),t.lineTo(e,i-n),t.lineTo(e-n,i),t.closePath()}function pO(t,e,i,n,o,r){var s=Math.PI/180;n-2*r<0&&(r=n/2),o-2*r<0&&(r=o/2),t.beginPath(),t.moveTo(e+r,i),t.lineTo(e+n-r,i),t.arc(e+n-r,i+r,r,270*s,360*s,!1),t.lineTo(e+n,i+o-r),t.arc(e+n-r,i+o-r,r,0,90*s,!1),t.lineTo(e+r,i+o),t.arc(e+r,i+o-r,r,90*s,180*s,!1),t.lineTo(e,i+r),t.arc(e+r,i+r,r,180*s,270*s,!1),t.closePath()}function vO(t,e,i,n,o){var r=.5522848,s=n/2*r,a=o/2*r,l=e+n,h=i+o,d=e+n/2,c=i+o/2;t.beginPath(),t.moveTo(e,c),t.bezierCurveTo(e,c-a,d-s,i,d,i),t.bezierCurveTo(d+s,i,l,c-a,l,c),t.bezierCurveTo(l,c+a,d+s,h,d,h),t.bezierCurveTo(d-s,h,e,c+a,e,c),t.closePath()}function gO(t,e,i,n,o){var r=o*(1/3),s=.5522848,a=n/2*s,l=r/2*s,h=e+n,d=i+r,c=e+n/2,u=i+r/2,f=i+(o-r/2),p=i+o;t.beginPath(),t.moveTo(h,u),t.bezierCurveTo(h,u+l,c+a,d,c,d),t.bezierCurveTo(c-a,d,e,u+l,e,u),t.bezierCurveTo(e,u-l,c-a,i,c,i),t.bezierCurveTo(c+a,i,h,u-l,h,u),t.lineTo(h,f),t.bezierCurveTo(h,f+l,c+a,p,c,p),t.bezierCurveTo(c-a,p,e,f+l,e,f),t.lineTo(e,u)}function yO(t,e,i,n,o,r){t.beginPath(),t.moveTo(e,i);for(var s=r.length,a=n-e,l=o-i,h=l/a,d=Math.sqrt(a*a+l*l),c=0,u=!0,f=0,p=+r[0];d>=.1;)(p=+r[c++%s])>d&&(p=d),f=Math.sqrt(p*p/(1+h*h)),e+=f=a<0?-f:f,i+=h*f,!0===u?t.lineTo(e,i):t.moveTo(e,i),d-=p,u=!u}function mO(t,e,i,n){t.beginPath();var o=2*Math.PI/6;t.moveTo(e+n,i);for(var r=1;r<6;r++)t.lineTo(e+n*Math.cos(o*r),i+n*Math.sin(o*r));t.closePath()}var Xn={circle:lO,dashedLine:yO,database:gO,diamond:fO,ellipse:vO,ellipse_vis:vO,hexagon:mO,roundRect:pO,square:hO,star:uO,triangle:dO,triangleDown:cO};var $n={exports:{}};!function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((i=n[o])===e||i.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(i){n=0;for(var o=(i=i.slice(0)).length;n<o;++n)i[n].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}}($n);var Gn=aO($n.exports),Kn=ye("toStringTag"),Zn={};Zn[Kn]="z";var Qn,Jn,to,eo="[object z]"===String(Zn),io=eo,no=D,oo=O,ro=ye("toStringTag"),so=Object,ao="Arguments"===oo(function(){return arguments}()),lo=io?oo:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(i){}}(e=so(t),ro))?i:ao?oo(e):"Object"===(n=oo(e))&&no(e.callee)?"Arguments":n},ho=lo,co=String,uo=function(t){if("Symbol"===ho(t))throw new TypeError("Cannot convert a Symbol value to a string");return co(t)},fo=x,po=Ni,vo=uo,go=J,yo=fo("".charAt),mo=fo("".charCodeAt),bo=fo("".slice),wo=function(t){return function(e,i){var n,o,r=vo(go(e)),s=po(i),a=r.length;return s<0||s>=a?t?"":void 0:(n=mo(r,s))<55296||n>56319||s+1===a||(o=mo(r,s+1))<56320||o>57343?t?yo(r,s):n:t?bo(r,s,s+2):o-56320+(n-55296<<10)+65536}},xo={codeAt:wo(!1),charAt:wo(!0)},_o=D,ko=h.WeakMap,Eo=_o(ko)&&/native code/.test(String(ko)),Oo=le,Co=Zt("keys"),So=function(t){return Co[t]||(Co[t]=Oo(t))},To=Eo,Po=h,Io=rt,Mo=xi,Do=ne,Ao=Gt,Bo=So,Fo=Zi,zo="Object already initialized",No=Po.TypeError,jo=Po.WeakMap;if(To||Ao.state){var Ro=Ao.state||(Ao.state=new jo);Ro.get=Ro.get,Ro.has=Ro.has,Ro.set=Ro.set,Qn=function(t,e){if(Ro.has(t))throw new No(zo);return e.facade=t,Ro.set(t,e),e},Jn=function(t){return Ro.get(t)||{}},to=function(t){return Ro.has(t)}}else{var Lo=Bo("state");Fo[Lo]=!0,Qn=function(t,e){if(Do(t,Lo))throw new No(zo);return e.facade=t,Mo(t,Lo,e),e},Jn=function(t){return Do(t,Lo)?t[Lo]:{}},to=function(t){return Do(t,Lo)}}var Ho={set:Qn,get:Jn,has:to,enforce:function(t){return to(t)?Jn(t):Qn(t,{})},getterFor:function(t){return function(e){var i;if(!Io(e)||(i=Jn(e)).type!==t)throw new No("Incompatible receiver, "+t+" required");return i}}},Wo=B,qo=ne,Uo=Function.prototype,Vo=Wo&&Object.getOwnPropertyDescriptor,Yo=qo(Uo,"name"),Xo={EXISTS:Yo,PROPER:Yo&&"something"===function(){}.name,CONFIGURABLE:Yo&&(!Wo||Wo&&Vo(Uo,"name").configurable)},$o={},Go=B,Ko=ni,Zo=ii,Qo=ai,Jo=it,tr=ln;$o.f=Go&&!Ko?Object.defineProperties:function(t,e){Qo(t);for(var i,n=Jo(e),o=tr(e),r=o.length,s=0;r>s;)Zo.f(t,i=o[s++],n[i]);return t};var er,ir=ct("document","documentElement"),nr=ai,or=$o,rr=rn,sr=Zi,ar=ir,lr=Me,hr="prototype",dr="script",cr=So("IE_PROTO"),ur=function(){},fr=function(t){return"<"+dr+">"+t+"</"+dr+">"},pr=function(t){t.write(fr("")),t.close();var e=t.parentWindow.Object;return t=null,e},vr=function(){try{er=new ActiveXObject("htmlfile")}catch(o){}var t,e,i;vr="undefined"!=typeof document?document.domain&&er?pr(er):(e=lr("iframe"),i="java"+dr+":",e.style.display="none",ar.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(fr("document.F=Object")),t.close(),t.F):pr(er);for(var n=rr.length;n--;)delete vr[hr][rr[n]];return vr()};sr[cr]=!0;var gr,yr,mr,br=Object.create||function(t,e){var i;return null!==t?(ur[hr]=nr(t),i=new ur,ur[hr]=null,i[cr]=t):i=vr(),void 0===e?i:or.f(i,e)},wr=!d((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),xr=ne,_r=D,kr=te,Er=wr,Or=So("IE_PROTO"),Cr=Object,Sr=Cr.prototype,Tr=Er?Cr.getPrototypeOf:function(t){var e=kr(t);if(xr(e,Or))return e[Or];var i=e.constructor;return _r(i)&&e instanceof i?i.prototype:e instanceof Cr?Sr:null},Pr=xi,Ir=function(t,e,i,n){return n&&n.enumerable?t[e]=i:Pr(t,e,i),t},Mr=d,Dr=D,Ar=rt,Br=br,Fr=Tr,zr=Ir,Nr=ye("iterator"),jr=!1;[].keys&&("next"in(mr=[].keys())?(yr=Fr(Fr(mr)))!==Object.prototype&&(gr=yr):jr=!0);var Rr=!Ar(gr)||Mr((function(){var t={};return gr[Nr].call(t)!==t}));Dr((gr=Rr?{}:Br(gr))[Nr])||zr(gr,Nr,(function(){return this}));var Lr={IteratorPrototype:gr,BUGGY_SAFARI_ITERATORS:jr},Hr=lo,Wr=eo?{}.toString:function(){return"[object "+Hr(this)+"]"},qr=eo,Ur=ii.f,Vr=xi,Yr=ne,Xr=Wr,$r=ye("toStringTag"),Gr=function(t,e,i,n){if(t){var o=i?t:t.prototype;Yr(o,$r)||Ur(o,$r,{configurable:!0,value:e}),n&&!qr&&Vr(o,"toString",Xr)}},Kr={},Zr=Lr.IteratorPrototype,Qr=br,Jr=U,ts=Gr,es=Kr,is=function(){return this},ns=x,os=zt,rs=D,ss=String,as=TypeError,ls=function(t,e,i){try{return ns(os(Object.getOwnPropertyDescriptor(t,e)[i]))}catch(n){}},hs=ai,ds=function(t){if("object"==typeof t||rs(t))return t;throw new as("Can't set "+ss(t)+" as a prototype")},cs=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=ls(Object.prototype,"__proto__","set"))(i,[]),e=i instanceof Array}catch(n){}return function(i,n){return hs(i),ds(n),e?t(i,n):i.__proto__=n,i}}():void 0),us=Ai,fs=N,ps=Xo,vs=function(t,e,i,n){var o=e+" Iterator";return t.prototype=Qr(Zr,{next:Jr(+!n,i)}),ts(t,o,!1,!0),es[o]=is,t},gs=Tr,ys=Gr,ms=Ir,bs=Kr,ws=Lr,xs=ps.PROPER,_s=ws.BUGGY_SAFARI_ITERATORS,ks=ye("iterator"),Es="keys",Os="values",Cs="entries",Ss=function(){return this},Ts=function(t,e,i,n,o,r,s){vs(i,e,n);var a,l,h,d=function(t){if(t===o&&v)return v;if(!_s&&t&&t in f)return f[t];switch(t){case Es:case Os:case Cs:return function(){return new i(this,t)}}return function(){return new i(this)}},c=e+" Iterator",u=!1,f=t.prototype,p=f[ks]||f["@@iterator"]||o&&f[o],v=!_s&&p||d(o),g="Array"===e&&f.entries||p;if(g&&(a=gs(g.call(new t)))!==Object.prototype&&a.next&&(ys(a,c,!0,!0),bs[c]=Ss),xs&&o===Os&&p&&p.name!==Os&&(u=!0,v=function(){return fs(p,this)}),o)if(l={values:d(Os),keys:r?v:d(Es),entries:d(Cs)},s)for(h in l)(_s||u||!(h in f))&&ms(f,h,l[h]);else us({target:e,proto:!0,forced:_s||u},l);return s&&f[ks]!==v&&ms(f,ks,v,{name:o}),bs[e]=v,l},Ps=function(t,e){return{value:t,done:e}},Is=xo.charAt,Ms=uo,Ds=Ho,As=Ts,Bs=Ps,Fs="String Iterator",zs=Ds.set,Ns=Ds.getterFor(Fs);As(String,"String",(function(t){zs(this,{type:Fs,string:Ms(t),index:0})}),(function(){var t,e=Ns(this),i=e.string,n=e.index;return n>=i.length?Bs(void 0,!0):(t=Is(i,n),e.index+=t.length,Bs(t,!1))}));var js=N,Rs=ai,Ls=Rt,Hs=function(t,e,i){var n,o;Rs(t);try{if(!(n=Ls(t,"return"))){if("throw"===e)throw i;return i}n=js(n,t)}catch(r){o=!0,n=r}if("throw"===e)throw i;if(o)throw n;return Rs(n),i},Ws=ai,qs=Hs,Us=Kr,Vs=ye("iterator"),Ys=Array.prototype,Xs=function(t){return void 0!==t&&(Us.Array===t||Ys[Vs]===t)},$s=D,Gs=Gt,Ks=x(Function.toString);$s(Gs.inspectSource)||(Gs.inspectSource=function(t){return Ks(t)});var Zs=Gs.inspectSource,Qs=x,Js=d,ta=D,ea=lo,ia=Zs,na=function(){},oa=[],ra=ct("Reflect","construct"),sa=/^\s*(?:class|function)\b/,aa=Qs(sa.exec),la=!sa.test(na),ha=function(t){if(!ta(t))return!1;try{return ra(na,oa,t),!0}catch(e){return!1}},da=function(t){if(!ta(t))return!1;switch(ea(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return la||!!aa(sa,ia(t))}catch(e){return!0}};da.sham=!0;var ca=!ra||Js((function(){var t;return ha(ha.call)||!ha(Object)||!ha((function(){t=!0}))||t}))?da:ha,ua=Se,fa=ii,pa=U,va=function(t,e,i){var n=ua(e);n in t?fa.f(t,n,pa(0,i)):t[n]=i},ga=lo,ya=Rt,ma=K,ba=Kr,wa=ye("iterator"),xa=function(t){if(!ma(t))return ya(t,wa)||ya(t,"@@iterator")||ba[ga(t)]},_a=N,ka=zt,Ea=ai,Oa=Dt,Ca=xa,Sa=TypeError,Ta=function(t,e){var i=arguments.length<2?Ca(t):e;if(ka(i))return Ea(_a(i,t));throw new Sa(Oa(t)+" is not iterable")},Pa=ei,Ia=N,Ma=te,Da=function(t,e,i,n){try{return n?e(Ws(i)[0],i[1]):e(i)}catch(o){qs(t,"throw",o)}},Aa=Xs,Ba=ca,Fa=Vi,za=va,Na=Ta,ja=xa,Ra=Array,La=ye("iterator"),Ha=!1;try{var Wa=0,qa={next:function(){return{done:!!Wa++}},return:function(){Ha=!0}};qa[La]=function(){return this},Array.from(qa,(function(){throw 2}))}catch(rO){}var Ua=function(t){var e=Ma(t),i=Ba(this),n=arguments.length,o=n>1?arguments[1]:void 0,r=void 0!==o;r&&(o=Pa(o,n>2?arguments[2]:void 0));var s,a,l,h,d,c,u=ja(e),f=0;if(!u||this===Ra&&Aa(u))for(s=Fa(e),a=i?new this(s):Ra(s);s>f;f++)c=r?o(e[f],f):e[f],za(a,f,c);else for(d=(h=Na(e,u)).next,a=i?new this:[];!(l=Ia(d,h)).done;f++)c=r?Da(h,o,[l.value,f],!0):l.value,za(a,f,c);return a.length=f,a},Va=function(t,e){try{if(!e&&!Ha)return!1}catch(rO){return!1}var i=!1;try{var n={};n[La]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(rO){}return i};Ai({target:"Array",stat:!0,forced:!Va((function(t){Array.from(t)}))},{from:Ua});var Ya=st.Array.from,Xa=aO(Ya),$a=it,Ga=Kr,Ka=Ho;ii.f;var Za=Ts,Qa=Ps,Ja="Array Iterator",tl=Ka.set,el=Ka.getterFor(Ja);Za(Array,"Array",(function(t,e){tl(this,{type:Ja,target:$a(t),index:0,kind:e})}),(function(){var t=el(this),e=t.target,i=t.kind,n=t.index++;if(!e||n>=e.length)return t.target=void 0,Qa(void 0,!0);switch(i){case"keys":return Qa(n,!1);case"values":return Qa(e[n],!1)}return Qa([n,e[n]],!1)}),"values"),Ga.Arguments=Ga.Array;var il=xa,nl={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ol=h,rl=lo,sl=xi,al=Kr,ll=ye("toStringTag");for(var hl in nl){var dl=ol[hl],cl=dl&&dl.prototype;cl&&rl(cl)!==ll&&sl(cl,ll,hl),al[hl]=al.Array}var ul=il,fl=aO(ul),pl=aO(ul);function bO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var vl={exports:{}},gl=Ai,yl=B,ml=ii.f;gl({target:"Object",stat:!0,forced:Object.defineProperty!==ml,sham:!yl},{defineProperty:ml});var bl=st.Object,wl=vl.exports=function(t,e,i){return bl.defineProperty(t,e,i)};bl.defineProperty.sham&&(wl.sham=!0);var xl=vl.exports,_l=aO(xl),kl=O,El=Array.isArray||function(t){return"Array"===kl(t)},Ol=TypeError,Cl=function(t){if(t>9007199254740991)throw Ol("Maximum allowed index exceeded");return t},Sl=El,Tl=ca,Pl=rt,Il=ye("species"),Ml=Array,Dl=function(t){var e;return Sl(t)&&(e=t.constructor,(Tl(e)&&(e===Ml||Sl(e.prototype))||Pl(e)&&null===(e=e[Il]))&&(e=void 0)),void 0===e?Ml:e},Al=function(t,e){return new(Dl(t))(0===e?0:e)},Bl=d,Fl=wt,zl=ye("species"),Nl=function(t){return Fl>=51||!Bl((function(){var e=[];return(e.constructor={})[zl]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},jl=Ai,Rl=d,Ll=El,Hl=rt,Wl=te,ql=Vi,Ul=Cl,Vl=va,Yl=Al,Xl=Nl,$l=wt,Gl=ye("isConcatSpreadable"),Kl=$l>=51||!Rl((function(){var t=[];return t[Gl]=!1,t.concat()[0]!==t})),Zl=function(t){if(!Hl(t))return!1;var e=t[Gl];return void 0!==e?!!e:Ll(t)};jl({target:"Array",proto:!0,arity:1,forced:!Kl||!Xl("concat")},{concat:function(t){var e,i,n,o,r,s=Wl(this),a=Yl(s,0),l=0;for(e=-1,n=arguments.length;e<n;e++)if(Zl(r=-1===e?s:arguments[e]))for(o=ql(r),Ul(l+o),i=0;i<o;i++,l++)i in r&&Vl(a,l,r[i]);else Ul(l+1),Vl(a,l++,r);return a.length=l,a}});var Ql={},Jl=on,th=rn.concat("length","prototype");Ql.f=Object.getOwnPropertyNames||function(t){return Jl(t,th)};var eh={},ih=Hi,nh=Vi,oh=va,rh=Array,sh=Math.max,ah=function(t,e,i){for(var n=nh(t),o=ih(e,n),r=ih(void 0===i?n:i,n),s=rh(sh(r-o,0)),a=0;o<r;o++,a++)oh(s,a,t[o]);return s.length=a,s},lh=O,hh=it,dh=Ql.f,ch=ah,uh="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];eh.f=function(t){return uh&&"Window"===lh(t)?function(t){try{return dh(t)}catch(rO){return ch(uh)}}(t):dh(hh(t))};var fh=ii,ph=function(t,e,i){return fh.f(t,e,i)},vh={},gh=ye;vh.f=gh;var yh=st,mh=ne,bh=vh,wh=ii.f,xh=function(t){var e=yh.Symbol||(yh.Symbol={});mh(e,t)||wh(e,t,{value:bh.f(t)})},_h=N,kh=ct,Eh=ye,Oh=Ir,Ch=function(){var t=kh("Symbol"),e=t&&t.prototype,i=e&&e.valueOf,n=Eh("toPrimitive");e&&!e[n]&&Oh(e,n,(function(t){return _h(i,this)}),{arity:1})},Sh=ei,Th=G,Ph=te,Ih=Vi,Mh=Al,Dh=x([].push),Ah=function(t){var e=1===t,i=2===t,n=3===t,o=4===t,r=6===t,s=7===t,a=5===t||r;return function(l,h,d,c){for(var u,f,p=Ph(l),v=Th(p),g=Sh(h,d),y=Ih(v),m=0,b=c||Mh,w=e?b(l,y):i||s?b(l,0):void 0;y>m;m++)if((a||m in v)&&(f=g(u=v[m],m,p),t))if(e)w[m]=f;else if(f)switch(t){case 3:return!0;case 5:return u;case 6:return m;case 2:Dh(w,u)}else switch(t){case 4:return!1;case 7:Dh(w,u)}return r?-1:n||o?o:w}},Bh={forEach:Ah(0),map:Ah(1),filter:Ah(2),some:Ah(3),every:Ah(4),find:Ah(5),findIndex:Ah(6),filterReject:Ah(7)},Fh=Ai,zh=h,Nh=N,jh=x,Rh=B,Lh=Et,Hh=d,Wh=ne,qh=ut,Uh=ai,Vh=it,Yh=Se,Xh=uo,$h=U,Gh=br,Kh=ln,Zh=Ql,Qh=eh,Jh=hn,td=A,ed=ii,id=$o,nd=j,od=Ir,rd=ph,sd=Zt,ad=Zi,ld=le,hd=ye,dd=vh,cd=xh,ud=Ch,fd=Gr,pd=Ho,vd=Bh.forEach,gd=So("hidden"),yd="Symbol",md="prototype",bd=pd.set,wd=pd.getterFor(yd),xd=Object[md],_d=zh.Symbol,kd=_d&&_d[md],Ed=zh.RangeError,Od=zh.TypeError,Cd=zh.QObject,Sd=td.f,Td=ed.f,Pd=Qh.f,Id=nd.f,Md=jh([].push),Dd=sd("symbols"),Ad=sd("op-symbols"),Bd=sd("wks"),Fd=!Cd||!Cd[md]||!Cd[md].findChild,zd=function(t,e,i){var n=Sd(xd,e);n&&delete xd[e],Td(t,e,i),n&&t!==xd&&Td(xd,e,n)},Nd=Rh&&Hh((function(){return 7!==Gh(Td({},"a",{get:function(){return Td(this,"a",{value:7}).a}})).a}))?zd:Td,jd=function(t,e){var i=Dd[t]=Gh(kd);return bd(i,{type:yd,tag:t,description:e}),Rh||(i.description=e),i},Rd=function(t,e,i){t===xd&&Rd(Ad,e,i),Uh(t);var n=Yh(e);return Uh(i),Wh(Dd,n)?(i.enumerable?(Wh(t,gd)&&t[gd][n]&&(t[gd][n]=!1),i=Gh(i,{enumerable:$h(0,!1)})):(Wh(t,gd)||Td(t,gd,$h(1,{})),t[gd][n]=!0),Nd(t,n,i)):Td(t,n,i)},Ld=function(t,e){Uh(t);var i=Vh(e),n=Kh(i).concat(Ud(i));return vd(n,(function(e){Rh&&!Nh(Hd,i,e)||Rd(t,e,i[e])})),t},Hd=function(t){var e=Yh(t),i=Nh(Id,this,e);return!(this===xd&&Wh(Dd,e)&&!Wh(Ad,e))&&(!(i||!Wh(this,e)||!Wh(Dd,e)||Wh(this,gd)&&this[gd][e])||i)},Wd=function(t,e){var i=Vh(t),n=Yh(e);if(i!==xd||!Wh(Dd,n)||Wh(Ad,n)){var o=Sd(i,n);return!o||!Wh(Dd,n)||Wh(i,gd)&&i[gd][n]||(o.enumerable=!0),o}},qd=function(t){var e=Pd(Vh(t)),i=[];return vd(e,(function(t){Wh(Dd,t)||Wh(ad,t)||Md(i,t)})),i},Ud=function(t){var e=t===xd,i=Pd(e?Ad:Vh(t)),n=[];return vd(i,(function(t){!Wh(Dd,t)||e&&!Wh(xd,t)||Md(n,Dd[t])})),n};Lh||(_d=function(){if(qh(kd,this))throw new Od("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Xh(arguments[0]):void 0,e=ld(t);return Rh&&Fd&&Nd(xd,e,{configurable:!0,set:function t(i){this===xd&&Nh(t,Ad,i),Wh(this,gd)&&Wh(this[gd],e)&&(this[gd][e]=!1);var n=$h(1,i);try{Nd(this,e,n)}catch(rO){if(!(rO instanceof Ed))throw rO;zd(this,e,n)}}}),jd(e,t)},od(kd=_d[md],"toString",(function(){return wd(this).tag})),od(_d,"withoutSetter",(function(t){return jd(ld(t),t)})),nd.f=Hd,ed.f=Rd,id.f=Ld,td.f=Wd,Zh.f=Qh.f=qd,Jh.f=Ud,dd.f=function(t){return jd(hd(t),t)},Rh&&rd(kd,"description",{configurable:!0,get:function(){return wd(this).description}})),Fh({global:!0,constructor:!0,wrap:!0,forced:!Lh,sham:!Lh},{Symbol:_d}),vd(Kh(Bd),(function(t){cd(t)})),Fh({target:yd,stat:!0,forced:!Lh},{useSetter:function(){Fd=!0},useSimple:function(){Fd=!1}}),Fh({target:"Object",stat:!0,forced:!Lh,sham:!Rh},{create:function(t,e){return void 0===e?Gh(t):Ld(Gh(t),e)},defineProperty:Rd,defineProperties:Ld,getOwnPropertyDescriptor:Wd}),Fh({target:"Object",stat:!0,forced:!Lh},{getOwnPropertyNames:qd}),ud(),fd(_d,yd),ad[gd]=!0;var Vd=Et&&!!Symbol.for&&!!Symbol.keyFor,Yd=Ai,Xd=ct,$d=ne,Gd=uo,Kd=Zt,Zd=Vd,Qd=Kd("string-to-symbol-registry"),Jd=Kd("symbol-to-string-registry");Yd({target:"Symbol",stat:!0,forced:!Zd},{for:function(t){var e=Gd(t);if($d(Qd,e))return Qd[e];var i=Xd("Symbol")(e);return Qd[e]=i,Jd[i]=e,i}});var tc=Ai,ec=ne,ic=It,nc=Dt,oc=Vd,rc=Zt("symbol-to-string-registry");tc({target:"Symbol",stat:!0,forced:!oc},{keyFor:function(t){if(!ic(t))throw new TypeError(nc(t)+" is not a symbol");if(ec(rc,t))return rc[t]}});var sc=El,ac=D,lc=O,hc=uo,dc=x([].push),cc=Ai,uc=ct,fc=g,pc=N,vc=x,gc=d,yc=D,mc=It,bc=On,wc=function(t){if(ac(t))return t;if(sc(t)){for(var e=t.length,i=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?dc(i,o):"number"!=typeof o&&"Number"!==lc(o)&&"String"!==lc(o)||dc(i,hc(o))}var r=i.length,s=!0;return function(t,e){if(s)return s=!1,e;if(sc(this))return e;for(var n=0;n<r;n++)if(i[n]===t)return e}}},xc=Et,_c=String,kc=uc("JSON","stringify"),Ec=vc(/./.exec),Oc=vc("".charAt),Cc=vc("".charCodeAt),Sc=vc("".replace),Tc=vc(1..toString),Pc=/[\uD800-\uDFFF]/g,Ic=/^[\uD800-\uDBFF]$/,Mc=/^[\uDC00-\uDFFF]$/,Dc=!xc||gc((function(){var t=uc("Symbol")("stringify detection");return"[null]"!==kc([t])||"{}"!==kc({a:t})||"{}"!==kc(Object(t))})),Ac=gc((function(){return'"\\udf06\\ud834"'!==kc("\udf06\ud834")||'"\\udead"'!==kc("\udead")})),Bc=function(t,e){var i=bc(arguments),n=wc(e);if(yc(n)||void 0!==t&&!mc(t))return i[1]=function(t,e){if(yc(n)&&(e=pc(n,this,_c(t),e)),!mc(e))return e},fc(kc,null,i)},Fc=function(t,e,i){var n=Oc(i,e-1),o=Oc(i,e+1);return Ec(Ic,t)&&!Ec(Mc,o)||Ec(Mc,t)&&!Ec(Ic,n)?"\\u"+Tc(Cc(t,0),16):t};kc&&cc({target:"JSON",stat:!0,arity:3,forced:Dc||Ac},{stringify:function(t,e,i){var n=bc(arguments),o=fc(Dc?Bc:kc,null,n);return Ac&&"string"==typeof o?Sc(o,Pc,Fc):o}});var zc=hn,Nc=te;Ai({target:"Object",stat:!0,forced:!Et||d((function(){zc.f(1)}))},{getOwnPropertySymbols:function(t){var e=zc.f;return e?e(Nc(t)):[]}}),xh("asyncIterator"),xh("hasInstance"),xh("isConcatSpreadable"),xh("iterator"),xh("match"),xh("matchAll"),xh("replace"),xh("search"),xh("species"),xh("split");var jc=Ch;xh("toPrimitive"),jc();var Rc=ct,Lc=Gr;xh("toStringTag"),Lc(Rc("Symbol"),"Symbol"),xh("unscopables"),Gr(h.JSON,"JSON",!0);var Hc=st.Symbol,Wc=ye,qc=ii.f,Uc=Wc("metadata"),Vc=Function.prototype;void 0===Vc[Uc]&&qc(Vc,Uc,{value:null}),xh("asyncDispose"),xh("dispose"),xh("metadata");var Yc=Hc,Xc=x,$c=ct("Symbol"),Gc=$c.keyFor,Kc=Xc($c.prototype.valueOf),Zc=$c.isRegisteredSymbol||function(t){try{return void 0!==Gc(Kc(t))}catch(rO){return!1}};Ai({target:"Symbol",stat:!0},{isRegisteredSymbol:Zc});for(var Qc=Zt,Jc=ct,tu=x,eu=It,iu=ye,nu=Jc("Symbol"),ou=nu.isWellKnownSymbol,ru=Jc("Object","getOwnPropertyNames"),su=tu(nu.prototype.valueOf),au=Qc("wks"),lu=0,hu=ru(nu),du=hu.length;lu<du;lu++)try{var cu=hu[lu];eu(nu[cu])&&iu(cu)}catch(rO){}var uu=function(t){if(ou&&ou(t))return!0;try{for(var e=su(t),i=0,n=ru(au),o=n.length;i<o;i++)if(au[n[i]]==e)return!0}catch(rO){}return!1};Ai({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:uu}),xh("matcher"),xh("observable"),Ai({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Zc}),Ai({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:uu}),xh("metadataKey"),xh("patternMatch"),xh("replaceAll");var fu=aO(Yc),pu=aO(vh.f("iterator"));function wO(t){return wO="function"==typeof fu&&"symbol"==typeof pu?function(t){return typeof t}:function(t){return t&&"function"==typeof fu&&t.constructor===fu&&t!==fu.prototype?"symbol":typeof t},wO(t)}var vu=aO(vh.f("toPrimitive"));function xO(t,e){if("object"!==wO(t)||null===t)return t;var i=t[vu];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==wO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _O(t){var e=xO(t,"string");return"symbol"===wO(e)?e:String(e)}function kO(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_l(t,_O(n.key),n)}}function EO(t,e,i){return e&&kO(t.prototype,e),i&&kO(t,i),_l(t,"prototype",{writable:!1}),t}Ai({target:"Array",stat:!0},{isArray:El});var gu=st.Array.isArray,yu=aO(gu);function OO(t){if(yu(t))return t}var mu=B,bu=El,wu=TypeError,xu=Object.getOwnPropertyDescriptor,_u=mu&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(rO){return rO instanceof TypeError}}()?function(t,e){if(bu(t)&&!xu(t,"length").writable)throw new wu("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},ku=Ai,Eu=te,Ou=Vi,Cu=_u,Su=Cl,Tu=d((function(){return 4294967297!==[].push.call({length:4294967296},1)}));ku({target:"Array",proto:!0,arity:1,forced:Tu||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(rO){return rO instanceof TypeError}}()},{push:function(t){var e=Eu(this),i=Ou(e),n=arguments.length;Su(i+n);for(var o=0;o<n;o++)e[i]=arguments[o],i++;return Cu(e,i),i}});var Pu=Rn("Array").push,Iu=ut,Mu=Pu,Du=Array.prototype,Au=function(t){var e=t.push;return t===Du||Iu(Du,t)&&e===Du.push?Mu:e},Bu=aO(Au);function CO(t,e){var i=null==t?null:void 0!==fu&&fl(t)||t["@@iterator"];if(null!=i){var n,o,r,s,a=[],l=!0,h=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(Bu(a).call(a,n.value),a.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(h)throw o}}return a}}var Fu=Ai,zu=El,Nu=ca,ju=rt,Ru=Hi,Lu=Vi,Hu=it,Wu=va,qu=ye,Uu=On,Vu=Nl("slice"),Yu=qu("species"),Xu=Array,$u=Math.max;Fu({target:"Array",proto:!0,forced:!Vu},{slice:function(t,e){var i,n,o,r=Hu(this),s=Lu(r),a=Ru(t,s),l=Ru(void 0===e?s:e,s);if(zu(r)&&(i=r.constructor,(Nu(i)&&(i===Xu||zu(i.prototype))||ju(i)&&null===(i=i[Yu]))&&(i=void 0),i===Xu||void 0===i))return Uu(r,a,l);for(n=new(void 0===i?Xu:i)($u(l-a,0)),o=0;a<l;a++,o++)a in r&&Wu(n,o,r[a]);return n.length=o,n}});var Gu=Rn("Array").slice,Ku=ut,Zu=Gu,Qu=Array.prototype,Ju=function(t){var e=t.slice;return t===Qu||Ku(Qu,t)&&e===Qu.slice?Zu:e},tf=Ju,ef=aO(tf),nf=aO(Ya);function SO(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function TO(t,e){var i;if(t){if("string"==typeof t)return SO(t,e);var n=ef(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?nf(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?SO(t,e):void 0}}function PO(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function IO(t,e){return OO(t)||CO(t,e)||TO(t,e)||PO()}function MO(t){if(yu(t))return SO(t)}function DO(t){if(void 0!==fu&&null!=fl(t)||null!=t["@@iterator"])return nf(t)}function AO(){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 BO(t){return MO(t)||DO(t)||TO(t)||AO()}var of=aO(Hc),rf=Rn("Array").concat,sf=ut,af=rf,lf=Array.prototype,hf=function(t){var e=t.concat;return t===lf||sf(lf,t)&&e===lf.concat?af:e},df=aO(hf),cf=aO(tf),uf=ct,ff=Ql,pf=hn,vf=ai,gf=x([].concat),yf=uf("Reflect","ownKeys")||function(t){var e=ff.f(vf(t)),i=pf.f;return i?gf(e,i(t)):e},mf=aO(gu),bf=Bh.map;Ai({target:"Array",proto:!0,forced:!Nl("map")},{map:function(t){return bf(this,t,arguments.length>1?arguments[1]:void 0)}});var wf=Rn("Array").map,xf=ut,_f=wf,kf=Array.prototype,Ef=function(t){var e=t.map;return t===kf||xf(kf,t)&&e===kf.map?_f:e},Of=aO(Ef),Cf=te,Sf=ln;Ai({target:"Object",stat:!0,forced:d((function(){Sf(1)}))},{keys:function(t){return Sf(Cf(t))}});var Tf=aO(st.Object.keys),Pf=Ai,If=Date,Mf=x(If.prototype.getTime);Pf({target:"Date",stat:!0},{now:function(){return Mf(new If)}});var Df=aO(st.Date.now),Af=d,Bf=function(t,e){var i=[][t];return!!i&&Af((function(){i.call(null,e||function(){return 1},1)}))},Ff=Bh.forEach,zf=Bf("forEach")?[].forEach:function(t){return Ff(this,t,arguments.length>1?arguments[1]:void 0)};Ai({target:"Array",proto:!0,forced:[].forEach!==zf},{forEach:zf});var Nf=Rn("Array").forEach,jf=lo,Rf=ne,Lf=ut,Hf=Nf,Wf=Array.prototype,qf={DOMTokenList:!0,NodeList:!0},Uf=function(t){var e=t.forEach;return t===Wf||Lf(Wf,t)&&e===Wf.forEach||Rf(qf,jf(t))?Hf:e},Vf=aO(Uf),Yf=Ai,Xf=El,$f=x([].reverse),Gf=[1,2];Yf({target:"Array",proto:!0,forced:String(Gf)===String(Gf.reverse())},{reverse:function(){return Xf(this)&&(this.length=this.length),$f(this)}});var Kf=Rn("Array").reverse,Zf=ut,Qf=Kf,Jf=Array.prototype,tp=function(t){var e=t.reverse;return t===Jf||Zf(Jf,t)&&e===Jf.reverse?Qf:e},ep=aO(tp),ip=Dt,np=TypeError,op=function(t,e){if(!delete t[e])throw new np("Cannot delete property "+ip(e)+" of "+ip(t))},rp=Ai,sp=te,ap=Hi,lp=Ni,hp=Vi,dp=_u,cp=Cl,up=Al,fp=va,pp=op,vp=Nl("splice"),gp=Math.max,yp=Math.min;rp({target:"Array",proto:!0,forced:!vp},{splice:function(t,e){var i,n,o,r,s,a,l=sp(this),h=hp(l),d=ap(t,h),c=arguments.length;for(0===c?i=n=0:1===c?(i=0,n=h-d):(i=c-2,n=yp(gp(lp(e),0),h-d)),cp(h+i-n),o=up(l,n),r=0;r<n;r++)(s=d+r)in l&&fp(o,r,l[s]);if(o.length=n,i<n){for(r=d;r<h-n;r++)a=r+i,(s=r+n)in l?l[a]=l[s]:pp(l,a);for(r=h;r>h-n+i;r--)pp(l,r-1)}else if(i>n)for(r=h-n;r>d;r--)a=r+i-1,(s=r+n-1)in l?l[a]=l[s]:pp(l,a);for(r=0;r<i;r++)l[r+d]=arguments[r+2];return dp(l,h-n+i),o}});var mp=Rn("Array").splice,bp=ut,wp=mp,xp=Array.prototype,_p=function(t){var e=t.splice;return t===xp||bp(xp,t)&&e===xp.splice?wp:e},kp=aO(_p),Ep=Ki.includes;Ai({target:"Array",proto:!0,forced:d((function(){return!Array(1).includes()}))},{includes:function(t){return Ep(this,t,arguments.length>1?arguments[1]:void 0)}});var Op=Rn("Array").includes,Cp=rt,Sp=O,Tp=ye("match"),Pp=function(t){var e;return Cp(t)&&(void 0!==(e=t[Tp])?!!e:"RegExp"===Sp(t))},Ip=TypeError,Mp=ye("match"),Dp=Ai,Ap=function(t){if(Pp(t))throw new Ip("The method doesn't accept regular expressions");return t},Bp=J,Fp=uo,zp=function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[Mp]=!1,"/./"[t](e)}catch(n){}}return!1},Np=x("".indexOf);Dp({target:"String",proto:!0,forced:!zp("includes")},{includes:function(t){return!!~Np(Fp(Bp(this)),Fp(Ap(t)),arguments.length>1?arguments[1]:void 0)}});var jp=Rn("String").includes,Rp=ut,Lp=Op,Hp=jp,Wp=Array.prototype,qp=String.prototype,Up=function(t){var e=t.includes;return t===Wp||Rp(Wp,t)&&e===Wp.includes?Lp:"string"==typeof t||t===qp||Rp(qp,t)&&e===qp.includes?Hp:e},Vp=aO(Up),Yp=te,Xp=Tr,$p=wr;Ai({target:"Object",stat:!0,forced:d((function(){Xp(1)})),sham:!$p},{getPrototypeOf:function(t){return Xp(Yp(t))}});var Gp=st.Object.getPrototypeOf,Kp=aO(Gp),Zp=Bh.filter;Ai({target:"Array",proto:!0,forced:!Nl("filter")},{filter:function(t){return Zp(this,t,arguments.length>1?arguments[1]:void 0)}});var Qp=Rn("Array").filter,Jp=ut,tv=Qp,ev=Array.prototype,iv=function(t){var e=t.filter;return t===ev||Jp(ev,t)&&e===ev.filter?tv:e},nv=aO(iv),ov="\t\n\v\f\r \u2028\u2029\ufeff",rv=J,sv=uo,av=ov,lv=x("".replace),hv=RegExp("^["+av+"]+"),dv=RegExp("(^|[^"+av+"])["+av+"]+$"),cv=function(t){return function(e){var i=sv(rv(e));return 1&t&&(i=lv(i,hv,"")),2&t&&(i=lv(i,dv,"$1")),i}},uv={start:cv(1),end:cv(2),trim:cv(3)},fv=h,pv=d,vv=x,gv=uo,yv=uv.trim,mv=ov,bv=fv.parseInt,wv=fv.Symbol,xv=wv&&wv.iterator,_v=/^[+-]?0x/i,kv=vv(_v.exec),Ev=8!==bv(mv+"08")||22!==bv(mv+"0x16")||xv&&!pv((function(){bv(Object(xv))}))?function(t,e){var i=yv(gv(t));return bv(i,e>>>0||(kv(_v,i)?16:10))}:bv;Ai({global:!0,forced:parseInt!==Ev},{parseInt:Ev});var Ov=aO(st.parseInt),Cv=Ai,Sv=Ki.indexOf,Tv=Bf,Pv=T([].indexOf),Iv=!!Pv&&1/Pv([1],1,-0)<0;Cv({target:"Array",proto:!0,forced:Iv||!Tv("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Iv?Pv(this,t,e)||0:Sv(this,t,e)}});var Mv=Rn("Array").indexOf,Dv=ut,Av=Mv,Bv=Array.prototype,Fv=function(t){var e=t.indexOf;return t===Bv||Dv(Bv,t)&&e===Bv.indexOf?Av:e},zv=aO(Fv);Ai({target:"Object",stat:!0,sham:!B},{create:br});var Nv=st.Object,jv=function(t,e){return Nv.create(t,e)},Rv=aO(jv),Lv=st,Hv=g;Lv.JSON||(Lv.JSON={stringify:JSON.stringify});var Wv=function(t,e,i){return Hv(Lv.JSON.stringify,null,arguments)},qv=aO(Wv),Uv="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Vv=TypeError,Yv=h,Xv=g,$v=D,Gv=Uv,Kv=ft,Zv=On,Qv=function(t,e){if(t<e)throw new Vv("Not enough arguments");return t},Jv=Yv.Function,tg=/MSIE .\./.test(Kv)||Gv&&function(){var t=Yv.Bun.version.split(".");return t.length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2])}(),eg=function(t,e){var i=e?2:1;return tg?function(n,o){var r=Qv(arguments.length,1)>i,s=$v(n)?n:Jv(n),a=r?Zv(arguments,i):[],l=r?function(){Xv(s,this,a)}:s;return e?t(l,o):t(l)}:t},ig=Ai,ng=h,og=eg(ng.setInterval,!0);ig({global:!0,bind:!0,forced:ng.setInterval!==og},{setInterval:og});var rg=Ai,sg=h,ag=eg(sg.setTimeout,!0);rg({global:!0,bind:!0,forced:sg.setTimeout!==ag},{setTimeout:ag});var lg=aO(st.setTimeout),hg=te,dg=Hi,cg=Vi,ug=function(t){for(var e=hg(this),i=cg(e),n=arguments.length,o=dg(n>1?arguments[1]:void 0,i),r=n>2?arguments[2]:void 0,s=void 0===r?i:dg(r,i);s>o;)e[o++]=t;return e};Ai({target:"Array",proto:!0},{fill:ug});var fg,pg=Rn("Array").fill,vg=ut,gg=pg,yg=Array.prototype,mg=function(t){var e=t.fill;return t===yg||vg(yg,t)&&e===yg.fill?gg:e},bg=aO(mg);function FO(){return FO=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},FO.apply(this,arguments)}function zO(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function NO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}fg="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign;var wg,xg=fg,_g=["","webkit","Moz","MS","ms","o"],kg="undefined"==typeof document?{style:{}}:document.createElement("div"),Eg=Math.round,Og=Math.abs,Cg=Date.now;function jO(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),r=0;r<_g.length;){if((n=(i=_g[r])?i+o:e)in t)return n;r++}}wg="undefined"==typeof window?{}:window;var Sg=jO(kg.style,"touchAction"),Tg=void 0!==Sg;function RO(){if(!Tg)return!1;var t={},e=wg.CSS&&wg.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||wg.CSS.supports("touch-action",i)})),t}var Pg="compute",Ig="auto",Mg="manipulation",Dg="none",Ag="pan-x",Bg="pan-y",Fg=RO(),zg="ontouchstart"in wg,Ng=void 0!==jO(wg,"PointerEvent"),jg=zg&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Rg="touch",Lg="mouse",Hg=16,Wg=24,qg=["x","y"],Ug=["clientX","clientY"];function LO(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function HO(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function WO(t,e){return t.indexOf(e)>-1}function qO(t){if(WO(t,Dg))return Dg;var e=WO(t,Ag),i=WO(t,Bg);return e&&i?Dg:e||i?e?Ag:Bg:WO(t,Mg)?Mg:Ig}var Vg=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Pg&&(t=this.compute()),Tg&&this.manager.element.style&&Fg[t]&&(this.manager.element.style[Sg]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return LO(this.manager.recognizers,(function(e){HO(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),qO(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,o=WO(n,Dg)&&!Fg[Dg],r=WO(n,Bg)&&!Fg[Bg],s=WO(n,Ag)&&!Fg[Ag];if(o){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}if(!s||!r)return o||r&&6&i||s&&i&Wg?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function UO(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function VO(t){var e=t.length;if(1===e)return{x:Eg(t[0].clientX),y:Eg(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:Eg(i/e),y:Eg(n/e)}}function YO(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:Eg(t.pointers[i].clientX),clientY:Eg(t.pointers[i].clientY)},i++;return{timeStamp:Cg(),pointers:e,center:VO(e),deltaX:t.deltaX,deltaY:t.deltaY}}function XO(t,e,i){i||(i=qg);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function $O(t,e,i){i||(i=qg);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function GO(t,e){return t===e?1:Og(t)>=Og(e)?t<0?2:4:e<0?8:Hg}function KO(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}function ZO(t,e,i){return{x:e/t||0,y:i/t||0}}function QO(t,e){return $O(e[1],e[0],Ug)+$O(t[1],t[0],Ug)}function JO(t,e){var i,n,o,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(8!==e.eventType&&(a>25||void 0===s.velocity)){var l=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,d=ZO(a,l,h);n=d.x,o=d.y,i=Og(d.x)>Og(d.y)?d.x:d.y,r=GO(l,h),t.lastInterval=e}else i=s.velocity,n=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=r}function tC(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=YO(e)),o>1&&!i.firstMultiple?i.firstMultiple=YO(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,l=e.center=VO(n);e.timeStamp=Cg(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=$O(a,l),e.distance=XO(a,l),KO(i,e),e.offsetDirection=GO(e.deltaX,e.deltaY);var h,d,c=ZO(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=Og(c.x)>Og(c.y)?c.x:c.y,e.scale=s?(h=s.pointers,XO((d=n)[0],d[1],Ug)/XO(h[0],h[1],Ug)):1,e.rotation=s?QO(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,JO(i,e);var u,f=t.element,p=e.srcEvent;UO(u=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,f)&&(f=u),e.target=f}function eC(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=1&e&&n-o==0,s=12&e&&n-o==0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,tC(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function iC(t){return t.trim().split(/\s+/g)}function nC(t,e,i){LO(iC(e),(function(e){t.addEventListener(e,i,!1)}))}function oC(t,e,i){LO(iC(e),(function(e){t.removeEventListener(e,i,!1)}))}function rC(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Yg=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){HO(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&nC(this.element,this.evEl,this.domHandler),this.evTarget&&nC(this.target,this.evTarget,this.domHandler),this.evWin&&nC(rC(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&oC(this.element,this.evEl,this.domHandler),this.evTarget&&oC(this.target,this.evTarget,this.domHandler),this.evWin&&oC(rC(this.element),this.evWin,this.domHandler)},t}();function sC(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}var Xg={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},$g={2:Rg,3:"pen",4:Lg,5:"kinect"},Gg="pointerdown",Kg="pointermove pointerup pointercancel";wg.MSPointerEvent&&!wg.PointerEvent&&(Gg="MSPointerDown",Kg="MSPointerMove MSPointerUp MSPointerCancel");var Zg=function(t){function e(){var i,n=e.prototype;return n.evEl=Gg,n.evWin=Kg,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return zO(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Xg[n],r=$g[t.pointerType]||t.pointerType,s=r===Rg,a=sC(e,t.pointerId,"pointerId");1&o&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&o&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))},e}(Yg);function aC(t){return Array.prototype.slice.call(t,0)}function lC(t,e,i){for(var n=[],o=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];sC(o,s)<0&&n.push(t[r]),o[r]=s,r++}return i&&(n=e?n.sort((function(t,i){return t[e]>i[e]})):n.sort()),n}var Qg={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Jg=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return zO(e,t),e.prototype.handler=function(t){var e=Qg[t.type],i=hC.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Rg,srcEvent:t})},e}(Yg);function hC(t,e){var i,n,o=aC(t.touches),r=this.targetIds;if(3&e&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=aC(t.changedTouches),a=[],l=this.target;if(n=o.filter((function(t){return UO(t.target,l)})),1===e)for(i=0;i<n.length;)r[n[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),12&e&&delete r[s[i].identifier],i++;return a.length?[lC(n.concat(a),"identifier",!0),a]:void 0}var ty={mousedown:1,mousemove:2,mouseup:4},ey=function(t){function e(){var i,n=e.prototype;return n.evEl="mousedown",n.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return zO(e,t),e.prototype.handler=function(t){var e=ty[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Lg,srcEvent:t}))},e}(Yg);function dC(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)}),2500)}}function cC(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,dC.call(this,e)):12&t&&dC.call(this,e)}function uC(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],r=Math.abs(e-o.x),s=Math.abs(i-o.y);if(r<=25&&s<=25)return!0}return!1}var iy=function(){return function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handler=function(t,e,i){var o=i.pointerType===Rg,r=i.pointerType===Lg;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)cC.call(NO(NO(n)),e,i);else if(r&&uC.call(NO(NO(n)),i))return;n.callback(t,e,i)}},n.touch=new Jg(n.manager,n.handler),n.mouse=new ey(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return zO(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(Yg)}();function fC(t,e,i){return!!Array.isArray(t)&&(LO(t,i[e],i),!0)}var ny=32,oy=1;function pC(t,e){var i=e.manager;return i?i.get(t):t}function vC(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var ry=function(){function t(t){void 0===t&&(t={}),this.options=FO({enable:!0},t),this.id=oy++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return xg(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(fC(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=pC(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return fC(t,"dropRecognizeWith",this)||(t=pC(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(fC(t,"requireFailure",this))return this;var e=this.requireFail;return-1===sC(e,t=pC(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(fC(t,"dropRequireFailure",this))return this;t=pC(t,this);var e=sC(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+vC(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+vC(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=ny},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=xg({},t);if(!HO(this.options.enable,[this,e]))return this.reset(),void(this.state=ny);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),sy=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,FO({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}zO(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Mg]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&r&&n){if(4!==t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||XO(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&s?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.interval),2):8}return ny},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=ny}),this.options.interval),ny},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(ry),ay=function(t){function e(e){return void 0===e&&(e={}),t.call(this,FO({pointers:1},e))||this}zO(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,n=6&e,o=this.attrTest(t);return n&&(8&i||!o)?16|e:n||o?4&i?8|e:2&e?4|e:2:ny},e}(ry);function gC(t){return t===Hg?"down":8===t?"up":2===t?"left":4===t?"right":""}var ly=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,FO({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}zO(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(Bg),t&Wg&&e.push(Ag),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;return o&e.direction||(6&e.direction?(o=0===r?1:r<0?2:4,i=r!==this.pX,n=Math.abs(t.deltaX)):(o=0===s?1:s<0?8:Hg,i=s!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return ay.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=gC(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(ay),hy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,FO({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}zO(e,t);var i=e.prototype;return i.getTouchAction=function(){return ly.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return 30&n?i=e.overallVelocity:6&n?i=e.overallVelocityX:n&Wg&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Og(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=gC(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(ay),dy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,FO({event:"pinch",threshold:0,pointers:2},e))||this}zO(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Dg]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(ay),cy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,FO({event:"rotate",threshold:0,pointers:2},e))||this}zO(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Dg]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(ay),uy=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,FO({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}zO(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Ig]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime>i.time;if(this._input=t,!o||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(4&t.eventType)return 8;return ny},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Cg(),this.manager.emit(this.options.event,this._input)))},e}(ry),fy={domEvents:!1,touchAction:Pg,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},py=[[cy,{enable:!1}],[dy,{enable:!1},["rotate"]],[hy,{direction:6}],[ly,{direction:6},["swipe"]],[sy],[sy,{event:"doubletap",taps:2},["tap"]],[uy]];function yC(t,e){var i,n=t.element;n.style&&(LO(t.options.cssProps,(function(o,r){i=jO(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}function mC(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}var vy=function(){function t(t,e){var i,n=this;this.options=xg({},fy,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Ng?Zg:jg?Jg:zg?iy:ey))(i,eC),this.touchAction=new Vg(this,this.options.touchAction),yC(this,!0),LO(this.options.recognizers,(function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return xg(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var r=0;r<n.length;)i=n[r],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),r++}},e.get=function(t){if(t instanceof ry)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(fC(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(fC(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=sC(i,e);-1!==n&&(i.splice(n,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return LO(iC(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return LO(iC(t),(function(t){e?i[t]&&i[t].splice(sC(i[t],e),1):delete i[t]})),this},e.emit=function(t,e){this.options.domEvents&&mC(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},e.destroy=function(){this.element&&yC(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),gy={touchstart:1,touchmove:2,touchend:4,touchcancel:8},yy=function(t){function e(){var i,n=e.prototype;return n.evTarget="touchstart",n.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return zO(e,t),e.prototype.handler=function(t){var e=gy[t.type];if(1===e&&(this.started=!0),this.started){var i=bC.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Rg,srcEvent:t})}},e}(Yg);function bC(t,e){var i=aC(t.touches),n=aC(t.changedTouches);return 12&e&&(i=lC(i.concat(n),"identifier",!0)),[i,n]}function wC(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,i),t.apply(this,arguments)}}var my=wC((function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;)(!i||i&&void 0===t[n[o]])&&(t[n[o]]=e[n[o]]),o++;return t}),"extend","Use `assign`."),by=wC((function(t,e){return my(t,e,!0)}),"merge","Use `assign`.");function xC(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&xg(n,i)}function _C(t,e){return function(){return t.apply(e,arguments)}}var wy=function(){var t=function(t,e){return void 0===e&&(e={}),new vy(t,FO({recognizers:py.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=Hg,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=Wg,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=Hg,t.INPUT_START=1,t.INPUT_MOVE=2,t.INPUT_END=4,t.INPUT_CANCEL=8,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=ny,t.Manager=vy,t.Input=Yg,t.TouchAction=Vg,t.TouchInput=Jg,t.MouseInput=ey,t.PointerEventInput=Zg,t.TouchMouseInput=iy,t.SingleTouchInput=yy,t.Recognizer=ry,t.AttrRecognizer=ay,t.Tap=sy,t.Pan=ly,t.Swipe=hy,t.Pinch=dy,t.Rotate=cy,t.Press=uy,t.on=nC,t.off=oC,t.each=LO,t.merge=by,t.extend=my,t.bindFn=_C,t.assign=xg,t.inherit=xC,t.bindFn=_C,t.prefixed=jO,t.toArray=aC,t.inArray=sC,t.uniqueArray=lC,t.splitStr=iC,t.boolOrFn=HO,t.hasParent=UO,t.addEventListeners=nC,t.removeEventListeners=oC,t.defaults=xg({},fy,{preset:py}),t}();wy.defaults;var xy=wy;function kC(t,e){var i=void 0!==of&&pl(t)||t["@@iterator"];if(!i){if(mf(t)||(i=EC(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function EC(t,e){var i;if(t){if("string"==typeof t)return OC(t,e);var n=cf(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Xa(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?OC(t,e):void 0}}function OC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function CC(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return SC(e.length?e:[Df()])}function SC(t){var e=IO(TC(t),3),i=e[0],n=e[1],o=e[2],r=1,s=function(){var t=2091639*i+2.3283064365386963e-10*r;return i=n,n=o,o=t-(r=0|t)};return s.uint32=function(){return 4294967296*s()},s.fract53=function(){return s()+11102230246251565e-32*(2097152*s()|0)},s.algorithm="Alea",s.seed=t,s.version="0.9",s}function TC(){for(var t,e=(t=4022871197,function(e){for(var i=e.toString(),n=0;n<i.length;n++){var o=.02519603282416938*(t+=i.charCodeAt(n));o-=t=o>>>0,t=(o*=t)>>>0,t+=4294967296*(o-=t)}return 2.3283064365386963e-10*(t>>>0)}),i=e(" "),n=e(" "),o=e(" "),r=0;r<arguments.length;r++)(i-=e(r<0||arguments.length<=r?void 0:arguments[r]))<0&&(i+=1),(n-=e(r<0||arguments.length<=r?void 0:arguments[r]))<0&&(n+=1),(o-=e(r<0||arguments.length<=r?void 0:arguments[r]))<0&&(o+=1);return[i,n,o]}function PC(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}of("DELETE");var _y="undefined"!=typeof window?window.Hammer||xy:function(){return PC()};function IC(t){var e,i=this;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)}));var n=_y(this._dom.overlay);n.on("tap",Yn(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push((function(){n.destroy()}));var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Vf(o).call(o,(function(t){n.on(t,(function(t){t.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(e){MC(e.target,t)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener("click",i._onClick)}))),this._escListener=function(t){("key"in t?"Escape"===t.key:27===t.keyCode)&&i.deactivate()}}function MC(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}Gn(IC.prototype),IC.current=null,IC.prototype.destroy=function(){var t,e;this.deactivate();var i,n=kC(ep(t=kp(e=this._cleanupQueue).call(e,0)).call(t));try{for(n.s();!(i=n.n()).done;){(0,i.value)()}}catch(o){n.e(o)}finally{n.f()}},IC.prototype.activate=function(){IC.current&&IC.current.deactivate(),IC.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},IC.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},IC.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};var ky=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ey=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Oy=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,Cy=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function DC(t){if(t)for(;!0===t.hasChildNodes();){var e=t.firstChild;e&&(DC(e),t.removeChild(e))}}function AC(t){return t instanceof String||"string"==typeof t}function BC(t){return"object"===wO(t)&&null!==t}function FC(t,e,i,n){var o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]),o?delete t[i]:t[i]=e[i]}function zC(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var n in t)if(void 0!==e[n])if(null===e[n]||"object"!==wO(e[n]))FC(t,e,n,i);else{var o=t[n],r=e[n];BC(o)&&BC(r)&&zC(o,r,i)}}function NC(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(mf(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o=0;o<t.length;o++){var r=t[o];if(Object.prototype.hasOwnProperty.call(i,r))if(i[r]&&i[r].constructor===Object)void 0===e[r]&&(e[r]={}),e[r].constructor===Object?RC(e[r],i[r],!1,n):FC(e,i,r,n);else{if(mf(i[r]))throw new TypeError("Arrays are not supported by deepExtend");FC(e,i,r,n)}}return e}function jC(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(mf(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&!Vp(t).call(t,o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?RC(e[o],i[o]):FC(e,i,o,n);else if(mf(i[o])){e[o]=[];for(var r=0;r<i[o].length;r++)e[o].push(i[o][r])}else FC(e,i,o,n);return e}function RC(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)||!0===i)if("object"===wO(e[o])&&null!==e[o]&&Kp(e[o])===Object.prototype)void 0===t[o]?t[o]=RC({},e[o],i):"object"===wO(t[o])&&null!==t[o]&&Kp(t[o])===Object.prototype?RC(t[o],e[o],i):FC(t,e,o,n);else if(mf(e[o])){var r;t[o]=cf(r=e[o]).call(r)}else FC(t,e,o,n);return t}function LC(t,e){var i;return df(i=[]).call(i,BO(t),[e])}function HC(t){return t.getBoundingClientRect().top}function WC(t,e){if(mf(t))for(var i=t.length,n=0;n<i;n++)e(t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e(t[o],o,t)}function qC(t){var e;switch(t.length){case 3:case 4:return(e=Ey.exec(t))?{r:Ov(e[1]+e[1],16),g:Ov(e[2]+e[2],16),b:Ov(e[3]+e[3],16)}:null;case 6:case 7:return(e=ky.exec(t))?{r:Ov(e[1],16),g:Ov(e[2],16),b:Ov(e[3],16)}:null;default:return null}}function UC(t,e){if(Vp(t).call(t,"rgba"))return t;if(Vp(t).call(t,"rgb")){var i=t.substr(zv(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}var n=qC(t);return null==n?t:"rgba("+n.r+","+n.g+","+n.b+","+e+")"}function VC(t,e,i){var n;return"#"+cf(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function YC(t,e){if(AC(t)){var i=t;if(QC(i)){var n,o=Of(n=i.substr(4).substr(0,i.length-5).split(",")).call(n,(function(t){return Ov(t)}));i=VC(o[0],o[1],o[2])}if(!0===ZC(i)){var r=KC(i),s={h:r.h,s:.8*r.s,v:Math.min(1,1.02*r.v)},a={h:r.h,s:Math.min(1,1.25*r.s),v:.8*r.v},l=GC(a.h,a.s,a.v),h=GC(s.h,s.s,s.v);return{background:i,border:l,highlight:{background:h,border:l},hover:{background:h,border:l}}}return{background:i,border:i,highlight:{background:i,border:i},hover:{background:i,border:i}}}return e?{background:t.background||e.background,border:t.border||e.border,highlight:AC(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||e.highlight.background,border:t.highlight&&t.highlight.border||e.highlight.border},hover:AC(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||e.hover.border,background:t.hover&&t.hover.background||e.hover.background}}:{background:t.background||void 0,border:t.border||void 0,highlight:AC(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:AC(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}}}function XC(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));return n===o?{h:0,s:0,v:n}:{h:60*((t===n?3:i===n?1:5)-(t===n?e-i:i===n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}}function $C(t,e,i){var n,o,r,s=Math.floor(6*t),a=6*t-s,l=i*(1-e),h=i*(1-a*e),d=i*(1-(1-a)*e);switch(s%6){case 0:n=i,o=d,r=l;break;case 1:n=h,o=i,r=l;break;case 2:n=l,o=i,r=d;break;case 3:n=l,o=h,r=i;break;case 4:n=d,o=l,r=i;break;case 5:n=i,o=l,r=h}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*r)}}function GC(t,e,i){var n=$C(t,e,i);return VC(n.r,n.g,n.b)}function KC(t){var e=qC(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return XC(e.r,e.g,e.b)}function ZC(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function QC(t){return Oy.test(t)}function JC(t){return Cy.test(t)}function tS(t){if(null===t||"object"!==wO(t))return null;if(t instanceof Element)return t;var e=Rv(t);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==wO(t[i])&&(e[i]=tS(t[i]));return e}function eS(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=function(t){return null!=t},r=function(t){return null!==t&&"object"===wO(t)};if(!r(t))throw new Error("Parameter mergeTarget must be an object");if(!r(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!r(n))throw new Error("Parameter globalOptions must be an object");var s=e[i],a=r(n)&&!function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(n)?n[i]:void 0,l=a?a.enabled:void 0;if(void 0!==s){if("boolean"==typeof s)return r(t[i])||(t[i]={}),void(t[i].enabled=s);if(null===s&&!r(t[i])){if(!o(a))return;t[i]=Rv(a)}if(r(s)){var h=!0;void 0!==s.enabled?h=s.enabled:void 0!==l&&(h=a.enabled),function(t,e,i){r(t[i])||(t[i]={});var n=e[i],o=t[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}(t,e,i),t[i].enabled=h}}}var Sy={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}};function iS(t,e){var i;mf(e)||(e=[e]);var n,o=kC(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;if(r){i=r[e[0]];for(var s=1;s<e.length;s++)i&&(i=i[e[s]]);if(void 0!==i)break}}}catch(a){o.e(a)}finally{o.f()}return i}var Ty={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},Py=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;bO(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return EO(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return Ty[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i,n=this._isColorString(t);if(void 0!==n&&(t=n),!0===AC(t)){if(!0===QC(t)){var o=t.substr(4).substr(0,t.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(!0===JC(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===ZC(t)){var s=qC(t);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var a=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:a}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+qv(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=En({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",lg((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=En({},t)),this.color=t;var e=XC(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),r=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=XC(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=$C(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=XC(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),bg(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var r=document.createElement("DIV");r.style.color="red",r.style.fontWeight="bold",r.style.padding="10px",r.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(r)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(a){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(a){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=Yn(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=Yn(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=Yn(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=Yn(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new _y(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",(function(e){e.isFirst&&t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,o,r=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,r,s),this.centerCoordinates={x:.5*r,y:.5*s},this.r=.49*r;var a,l=2*Math.PI/360,h=1/360,d=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(l*n),i=this.centerCoordinates.y+o*Math.cos(l*n),a=$C(n*h,o*d,1),t.fillStyle="rgb("+a.r+","+a.g+","+a.b+")",t.fillRect(e-.5,i-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,r,s)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,r=.5*this.colorPickerDiv.clientWidth,s=i-r,a=n-o,l=Math.atan2(s,a),h=.98*Math.min(Math.sqrt(s*s+a*a),r),d=Math.cos(l)*h+o,c=Math.sin(l)*h+r;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";var u=l/(2*Math.PI);u=u<0?u+1:u;var f=h/this.r,p=XC(this.color.r,this.color.g,this.color.b);p.h=u,p.s=f;var v=$C(p.h,p.s,p.v);v.a=this.color.a,this.color=v,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();function nS(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<1)throw new TypeError("Invalid arguments.");if(1===e.length)return document.createTextNode(e[0]);var n=document.createElement(e[0]);return n.appendChild(nS.apply(void 0,BO(cf(e).call(e,1)))),n}var Iy,My=function(){function t(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1};bO(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.hideOption=r,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},En(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Py(o),this.wrapper=void 0}return EO(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(mf(t))this.options.filter=t.join();else if("object"===wO(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==nv(t)&&(this.options.filter=nv(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===nv(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=nv(this.options),e=0,i=!1;for(var n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?i=(i=t(n,[]))||this._handleObject(this.configureOptions[n],[n],!0):!0!==t&&-1===zv(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}},{key:"_makeItem",value:function(t){if(!0===this.allowCreation){var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return Vf(n).call(n,(function(t){e.appendChild(t)})),this.domElements.push(e),this.domElements.length}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerText=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(nS("i","b",t))}else n.innerText=t+":";return n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==e&&-1!==zv(t).call(t,e)&&(o=zv(t).call(t,e));for(var r=0;r<t.length;r++){var s=document.createElement("option");s.value=t[r],r===o&&(s.selected="selected"),s.innerText=t[r],n.appendChild(s)}var a=this;n.onchange=function(){a._update(this.value,i)};var l=this._makeLabel(i[i.length-1],i);this._makeItem(i,l,n)}},{key:"_makeRange",value:function(t,e,i){var n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=r}catch(v){}a.step=s;var l="",h=0;if(void 0!==e){var d=1.2;e<0&&e*d<o?(a.min=Math.ceil(e*d),h=a.min,l="range increased"):e/d<o&&(a.min=Math.ceil(e/d),h=a.min,l="range increased"),e*d>r&&1!==r&&(a.max=Math.ceil(e*d),h=a.max,l="range increased"),a.value=e}else a.value=n;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var u=this;a.onchange=function(){c.value=this.value,u._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var f=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,f,a,c);""!==l&&this.popupHistory[p]!==h&&(this.popupHistory[p]=h,this._setupPopup(l,p))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var n=document.createElement("div");n.id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerText=t,n.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:e}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+"px",this.popupDiv.html.style.top=e.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=lg((function(){t.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=lg((function(){t._removePopup()}),1800)}}},{key:"_makeCheckbox",value:function(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"===wO(t)?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));var o=this;n.onchange=function(){o._update(this.checked,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeTextInput",value:function(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});var o=this;n.onchange=function(){o._update(this.value,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeColorField",value:function(t,e,i){var n=this,o=t[1],r=document.createElement("div");"none"!==(e=void 0===e?o:e)?(r.className="vis-configuration vis-config-colorBlock",r.style.backgroundColor=e):r.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,r.onclick=function(){n._showColorPicker(e,r,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,r)}},{key:"_showColorPicker",value:function(t,e,i){var n=this;e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((function(t){var o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,n._update(o,i)})),this.colorPicker.setCloseCallback((function(){e.onclick=function(){n._showColorPicker(t,e,i)}}))}},{key:"_handleObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=nv(this.options),r=!1;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){n=!0;var a=t[s],l=LC(e,s);if("function"==typeof o&&!1===(n=o(s,e))&&!mf(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i),!1!==n){r=!0;var h=this._getValue(l);if(mf(a))this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){if(!this.hideOption(e,s,this.moduleOptions))if(void 0!==a.enabled){var d=LC(l,"enabled"),c=this._getValue(d);if(!0===c){var u=this._makeLabel(s,l,!0);this._makeItem(l,u),r=this._handleObject(a,l)||r}else this._makeCheckbox(a,c,l)}else{var f=this._makeLabel(s,l,!0);this._makeItem(l,f),r=this._handleObject(a,l)||r}}else console.error("dont know how to handle",a,s,l)}}return r}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(var o=0;o<e.length;o++)"global"!==e[o]&&(void 0===n[e[o]]&&(n[e[o]]={}),o!==e.length-1?n=n[e[o]]:n[e[o]]=t);return i}},{key:"_printOptions",value:function(){for(var t=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(nS("pre","const options = "+qv(t,null,2)))}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]),t}(),Dy=function(){function t(e,i){bO(this,t),this.container=e,this.overflowMethod=i||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return EO(t,[{key:"setPosition",value:function(t,e){this.x=Ov(t),this.y=Ov(e)}},{key:"setText",value:function(t){if(t instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(t)}else this.frame.innerText=t}},{key:"show",value:function(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,r=0,s=0;if("flip"==this.overflowMethod){var a=!1,l=!0;this.y-e<this.padding&&(l=!1),this.x+i>o-this.padding&&(a=!0),r=a?this.x-i:this.x,s=l?this.y-e:this.y}else(s=this.y-e)+e+this.padding>n&&(s=n-e-this.padding),s<this.padding&&(s=this.padding),(r=this.x)+i+this.padding>o&&(r=o-i-this.padding),r<this.padding&&(r=this.padding);this.frame.style.left=r+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),t}(),Ay=!1,By="background: #FFeeee; color: #dd0000",Fy=function(){function t(){bO(this,t)}return EO(t,null,[{key:"validate",value:function(e,i,n){Ay=!1,Iy=i;var o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),Ay}},{key:"parse",value:function(e,i,n){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.check(o,e,i,n)}},{key:"check",value:function(e,i,n,o){if(void 0!==n[e]||void 0!==n.__any__){var r=e,s=!0;void 0===n[e]&&void 0!==n.__any__&&(r="__any__",s="object"===t.getType(i[e]));var a=n[r];s&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,r,a,o)}else t.getSuggestion(e,n,o)}},{key:"checkFields",value:function(e,i,n,o,r,s){var a=function(i){console.error("%c"+i+t.printLocation(s,e),By)},l=t.getType(i[e]),h=r[l];void 0!==h?"array"===t.getType(h)&&-1===zv(h).call(h,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+i[e]+'". '),Ay=!0):"object"===l&&"__any__"!==o&&(s=LC(s,e),t.parse(i[e],n[o],s)):void 0===r.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(Tf(r))+". Received ["+l+'] "'+i[e]+'"'),Ay=!0)}},{key:"getType",value:function(t){var e=wO(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":mf(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(e,i,n){var o,r=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,Iy,[],!0);o=void 0!==r.indexMatch?" in "+t.printLocation(r.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+r.indexMatch+'"?\n\n':s.distance<=4&&r.distance>s.distance?" in "+t.printLocation(r.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):r.distance<=8?'. Did you mean "'+r.closestMatch+'"?'+t.printLocation(r.path,e):". Did you mean one of these: "+t.print(Tf(i))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+o,By),Ay=!0}},{key:"findInOptions",value:function(e,i,n){var o,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,a="",l=[],h=e.toLowerCase(),d=void 0;for(var c in i){var u=void 0;if(void 0!==i[c].__type__&&!0===r){var f=t.findInOptions(e,i[c],LC(n,c));s>f.distance&&(a=f.closestMatch,l=f.path,s=f.distance,d=f.indexMatch)}else{var p;-1!==zv(p=c.toLowerCase()).call(p,h)&&(d=c),s>(u=t.levenshteinDistance(e,c))&&(a=c,l=cf(o=n).call(o),s=u)}}return{closestMatch:a,path:l,distance:s,indexMatch:d}}},{key:"printLocation",value:function(t,e){for(var i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n",n=0;n<t.length;n++){for(var o=0;o<n+1;o++)i+=" ";i+=t[n]+": {\n"}for(var r=0;r<t.length+1;r++)i+=" ";i+=e+"\n";for(var s=0;s<t.length+1;s++){for(var a=0;a<t.length-s;a++)i+=" ";i+="}\n"}return i+"\n\n"}},{key:"print",value:function(t){return qv(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,n,o=[];for(i=0;i<=e.length;i++)o[i]=[i];for(n=0;n<=t.length;n++)o[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)==t.charAt(n-1)?o[i][n]=o[i-1][n-1]:o[i][n]=Math.min(o[i-1][n-1]+1,Math.min(o[i][n-1]+1,o[i-1][n]+1));return o[e.length][t.length]}}]),t}(),zy=IC,Ny=My,jy=_y,Ry=Dy,Ly=By,Hy=Fy;function oS(t){return Yy=t,pS()}var Wy={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},qy=Rv(Wy);qy.color="color.color",qy.style="dashes";var Uy={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},Vy={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Yy="",Xy=0,$y="",Gy="",Ky=Uy.NULL;function rS(){Xy++,$y=Yy.charAt(Xy)}function sS(){return Yy.charAt(Xy+1)}function aS(t){var e=t.charCodeAt(0);return e<47?35===e||46===e:e<59?e>47:e<91?e>64:e<96?95===e:e<123&&e>96}function lS(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function hS(t,e,i){for(var n=e.split("."),o=t;n.length;){var r=n.shift();n.length?(o[r]||(o[r]={}),o=o[r]):o[r]=i}}function dS(t,e){for(var i,n,o=null,r=[t],s=t;s.parent;)r.push(s.parent),s=s.parent;if(s.nodes)for(i=0,n=s.nodes.length;i<n;i++)if(e.id===s.nodes[i].id){o=s.nodes[i];break}for(o||(o={id:e.id},t.node&&(o.attr=lS(o.attr,t.node))),i=r.length-1;i>=0;i--){var a,l=r[i];l.nodes||(l.nodes=[]),-1===zv(a=l.nodes).call(a,o)&&l.nodes.push(o)}e.attr&&(o.attr=lS(o.attr,e.attr))}function cS(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=lS({},t.edge);e.attr=lS(i,e.attr)}}function uS(t,e,i,n,o){var r={from:e,to:i,type:n};return t.edge&&(r.attr=lS({},t.edge)),r.attr=lS(r.attr||{},o),null!=o&&o.hasOwnProperty("arrows")&&null!=o.arrows&&(r.arrows={to:{enabled:!0,type:o.arrows.type}},o.arrows=null),r}function fS(){for(Ky=Uy.NULL,Gy="";" "===$y||"\t"===$y||"\n"===$y||"\r"===$y;)rS();do{var t=!1;if("#"===$y){for(var e=Xy-1;" "===Yy.charAt(e)||"\t"===Yy.charAt(e);)e--;if("\n"===Yy.charAt(e)||""===Yy.charAt(e)){for(;""!=$y&&"\n"!=$y;)rS();t=!0}}if("/"===$y&&"/"===sS()){for(;""!=$y&&"\n"!=$y;)rS();t=!0}if("/"===$y&&"*"===sS()){for(;""!=$y;){if("*"===$y&&"/"===sS()){rS(),rS();break}rS()}t=!0}for(;" "===$y||"\t"===$y||"\n"===$y||"\r"===$y;)rS()}while(t);if(""!==$y){var i=$y+sS();if(Vy[i])return Ky=Uy.DELIMITER,Gy=i,rS(),void rS();if(Vy[$y])return Ky=Uy.DELIMITER,Gy=$y,void rS();if(aS($y)||"-"===$y){for(Gy+=$y,rS();aS($y);)Gy+=$y,rS();return"false"===Gy?Gy=!1:"true"===Gy?Gy=!0:isNaN(Number(Gy))||(Gy=Number(Gy)),void(Ky=Uy.IDENTIFIER)}if('"'===$y){for(rS();""!=$y&&('"'!=$y||'"'===$y&&'"'===sS());)'"'===$y?(Gy+=$y,rS()):"\\"===$y&&"n"===sS()?(Gy+="\n",rS()):Gy+=$y,rS();if('"'!=$y)throw _S('End of string " expected');return rS(),void(Ky=Uy.IDENTIFIER)}for(Ky=Uy.UNKNOWN;""!=$y;)Gy+=$y,rS();throw new SyntaxError('Syntax error in part "'+kS(Gy,30)+'"')}Ky=Uy.DELIMITER}function pS(){var t={};if(Xy=0,$y=Yy.charAt(0),fS(),"strict"===Gy&&(t.strict=!0,fS()),"graph"!==Gy&&"digraph"!==Gy||(t.type=Gy,fS()),Ky===Uy.IDENTIFIER&&(t.id=Gy,fS()),"{"!=Gy)throw _S("Angle bracket { expected");if(fS(),vS(t),"}"!=Gy)throw _S("Angle bracket } expected");if(fS(),""!==Gy)throw _S("End of file expected");return fS(),delete t.node,delete t.edge,delete t.graph,t}function vS(t){for(;""!==Gy&&"}"!=Gy;)gS(t),";"===Gy&&fS()}function gS(t){var e=yS(t);if(e)wS(t,e);else if(!mS(t)){if(Ky!=Uy.IDENTIFIER)throw _S("Identifier expected");var i=Gy;if(fS(),"="===Gy){if(fS(),Ky!=Uy.IDENTIFIER)throw _S("Identifier expected");t[i]=Gy,fS()}else bS(t,i)}}function yS(t){var e=null;if("subgraph"===Gy&&((e={}).type="subgraph",fS(),Ky===Uy.IDENTIFIER&&(e.id=Gy,fS())),"{"===Gy){if(fS(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,vS(e),"}"!=Gy)throw _S("Angle bracket } expected");fS(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function mS(t){return"node"===Gy?(fS(),t.node=xS(),"node"):"edge"===Gy?(fS(),t.edge=xS(),"edge"):"graph"===Gy?(fS(),t.graph=xS(),"graph"):null}function bS(t,e){var i={id:e},n=xS();n&&(i.attr=n),dS(t,i),wS(t,e)}function wS(t,e){for(;"->"===Gy||"--"===Gy;){var i,n=Gy;fS();var o=yS(t);if(o)i=o;else{if(Ky!=Uy.IDENTIFIER)throw _S("Identifier or subgraph expected");dS(t,{id:i=Gy}),fS()}cS(t,uS(t,e,i,n,xS())),e=i}}function xS(){for(var t,e,i=null,n={dashed:!0,solid:!1,dotted:[1,5]},o={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},r=new Array,s=new Array;"["===Gy;){for(fS(),i={};""!==Gy&&"]"!=Gy;){if(Ky!=Uy.IDENTIFIER)throw _S("Attribute name expected");var a=Gy;if(fS(),"="!=Gy)throw _S("Equal sign = expected");if(fS(),Ky!=Uy.IDENTIFIER)throw _S("Attribute value expected");var l=Gy;"style"===a&&(l=n[l]),"arrowhead"===a&&(a="arrows",l={to:{enabled:!0,type:o[l]}}),"arrowtail"===a&&(a="arrows",l={from:{enabled:!0,type:o[l]}}),r.push({attr:i,name:a,value:l}),s.push(a),fS(),","==Gy&&fS()}if("]"!=Gy)throw _S("Bracket ] expected");fS()}if(Vp(s).call(s,"dir")){var h={arrows:{}};for(t=0;t<r.length;t++)if("arrows"===r[t].name)if(null!=r[t].value.to)h.arrows.to=t;else{if(null==r[t].value.from)throw _S("Invalid value of arrows");h.arrows.from=t}else"dir"===r[t].name&&(h.dir=t);var d,c,u=r[h.dir].value;if(!Vp(s).call(s,"arrows"))if("both"===u)r.push({attr:r[h.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),h.arrows.to=r.length-1,r.push({attr:r[h.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),h.arrows.from=r.length-1;else if("forward"===u)r.push({attr:r[h.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),h.arrows.to=r.length-1;else if("back"===u)r.push({attr:r[h.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),h.arrows.from=r.length-1;else{if("none"!==u)throw _S('Invalid dir type "'+u+'"');r.push({attr:r[h.dir].attr,name:"arrows",value:""}),h.arrows.to=r.length-1}if("both"===u)h.arrows.to&&h.arrows.from?(c=r[h.arrows.to].value.to.type,d=r[h.arrows.from].value.from.type,r[h.arrows.to]={attr:r[h.arrows.to].attr,name:r[h.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}},kp(r).call(r,h.arrows.from,1)):h.arrows.to?(c=r[h.arrows.to].value.to.type,d="arrow",r[h.arrows.to]={attr:r[h.arrows.to].attr,name:r[h.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):h.arrows.from&&(c="arrow",d=r[h.arrows.from].value.from.type,r[h.arrows.from]={attr:r[h.arrows.from].attr,name:r[h.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}});else if("back"===u)h.arrows.to&&h.arrows.from?(c="",d=r[h.arrows.from].value.from.type,r[h.arrows.from]={attr:r[h.arrows.from].attr,name:r[h.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):h.arrows.to?(c="",d="arrow",h.arrows.from=h.arrows.to,r[h.arrows.from]={attr:r[h.arrows.from].attr,name:r[h.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):h.arrows.from&&(c="",d=r[h.arrows.from].value.from.type,r[h.arrows.to]={attr:r[h.arrows.from].attr,name:r[h.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}),r[h.arrows.from]={attr:r[h.arrows.from].attr,name:r[h.arrows.from].name,value:{from:{enabled:!0,type:r[h.arrows.from].value.from.type}}};else if("none"===u){var f;r[f=h.arrows.to?h.arrows.to:h.arrows.from]={attr:r[f].attr,name:r[f].name,value:""}}else{if("forward"!==u)throw _S('Invalid dir type "'+u+'"');h.arrows.to&&h.arrows.from||h.arrows.to?(c=r[h.arrows.to].value.to.type,d="",r[h.arrows.to]={attr:r[h.arrows.to].attr,name:r[h.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):h.arrows.from&&(c="arrow",d="",h.arrows.to=h.arrows.from,r[h.arrows.to]={attr:r[h.arrows.to].attr,name:r[h.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}),r[h.arrows.to]={attr:r[h.arrows.to].attr,name:r[h.arrows.to].name,value:{to:{enabled:!0,type:r[h.arrows.to].value.to.type}}}}kp(r).call(r,h.dir,1)}if(Vp(s).call(s,"penwidth")){var p=[];for(e=r.length,t=0;t<e;t++)"width"!==r[t].name&&("penwidth"===r[t].name&&(r[t].name="width"),p.push(r[t]));r=p}for(e=r.length,t=0;t<e;t++)hS(r[t].attr,r[t].name,r[t].value);return i}function _S(t){return new SyntaxError(t+', got "'+kS(Gy,30)+'" (char '+Xy+")")}function kS(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function ES(t,e,i){for(var n=e.split("."),o=n.pop(),r=t,s=0;s<n.length;s++){var a=n[s];a in r||(r[a]={}),r=r[a]}return r[o]=i,t}function OS(t,e){var i={};for(var n in t)if(t.hasOwnProperty(n)){var o=e[n];mf(o)?Vf(o).call(o,(function(e){ES(i,e,t[n])})):ES(i,"string"==typeof o?o:n,t[n])}return i}function CS(t){var e,i=oS(t),n={nodes:[],edges:[],options:{}};i.nodes&&Vf(e=i.nodes).call(e,(function(t){var e={id:t.id,label:String(t.label||t.id)};lS(e,OS(t.attr,Wy)),e.image&&(e.shape="image"),n.nodes.push(e)}));if(i.edges){var o,r=function(t){var e={from:t.from,to:t.to};return lS(e,OS(t.attr,qy)),null==e.arrows&&"->"===t.type&&(e.arrows="to"),e};Vf(o=i.edges).call(o,(function(t){var e,i,o,s,a,l,h;(e=t.from instanceof Object?t.from.nodes:{id:t.from},i=t.to instanceof Object?t.to.nodes:{id:t.to},t.from instanceof Object&&t.from.edges)&&Vf(o=t.from.edges).call(o,(function(t){var e=r(t);n.edges.push(e)}));(a=i,l=function(e,i){var o=uS(n,e.id,i.id,t.type,t.attr),s=r(o);n.edges.push(s)},mf(s=e)?Vf(s).call(s,(function(t){mf(a)?Vf(a).call(a,(function(e){l(t,e)})):l(t,a)})):mf(a)?Vf(a).call(a,(function(t){l(s,t)})):l(s,a),t.to instanceof Object&&t.to.edges)&&Vf(h=t.to.edges).call(h,(function(t){var e=r(t);n.edges.push(e)}))}))}return i.attr&&(n.options=i.attr),n}function SS(t,e){var i,n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};null!=e&&(null!=e.fixed&&(n.nodes.fixed=e.fixed),null!=e.parseColor&&(n.nodes.parseColor=e.parseColor),null!=e.inheritColor&&(n.edges.inheritColor=e.inheritColor));var o=t.edges,r=Of(o).call(o,(function(t){var e={from:t.source,id:t.id,to:t.target};return null!=t.attributes&&(e.attributes=t.attributes),null!=t.label&&(e.label=t.label),null!=t.attributes&&null!=t.attributes.title&&(e.title=t.attributes.title),"Directed"===t.type&&(e.arrows="to"),t.color&&!1===n.edges.inheritColor&&(e.color=t.color),e}));return{nodes:Of(i=t.nodes).call(i,(function(t){var e={id:t.id,fixed:n.nodes.fixed&&null!=t.x&&null!=t.y};return null!=t.attributes&&(e.attributes=t.attributes),null!=t.label&&(e.label=t.label),null!=t.size&&(e.size=t.size),null!=t.attributes&&null!=t.attributes.title&&(e.title=t.attributes.title),null!=t.title&&(e.title=t.title),null!=t.x&&(e.x=t.x),null!=t.y&&(e.y=t.y),null!=t.color&&(!0===n.nodes.parseColor?e.color=t.color:e.color={background:t.color,border:t.color,highlight:{background:t.color,border:t.color},hover:{background:t.color,border:t.color}}),e})),edges:r}}var Zy=Object.freeze({__proto__:null,cn:{addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},cs:{addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},de:{addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},en:{addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},es:{addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},fr:{addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},it:{addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},nl:{addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},pt:{addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},ru:{addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},uk:{addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"}});function TS(t,e){try{var i=IO(e.split(/[-_ /]/,2),2),n=i[0],o=i[1],r=null!=n?n.toLowerCase():null,s=null!=o?o.toUpperCase():null;if(r&&s){var a,l=r+"-"+s;if(Object.prototype.hasOwnProperty.call(t,l))return l;console.warn(df(a="Unknown variant ".concat(s," of language ")).call(a,r,"."))}if(r){var h=r;if(Object.prototype.hasOwnProperty.call(t,h))return h;console.warn("Unknown language ".concat(r))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(rO){return console.error(rO),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}var Qy=function(){function t(){bO(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return EO(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var i=Math.floor(e/2),n=Math.floor(e/4),o=Math.floor(e/8),r=Math.floor(e/16),s=Math.floor(t/2),a=Math.floor(t/4),l=Math.floor(t/8),h=Math.floor(t/16);this.canvas.width=3*a,this.canvas.height=i,this.coordinates=[[0,0,s,i],[s,0,a,n],[s,n,l,o],[5*l,n,h,r]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var i=1;i<this.NUM_ITERATIONS;i++){var n=this.coordinates[i-1],o=this.coordinates[i];t.drawImage(this.canvas,n[0],n[1],n[2],n[3],o[0],o[1],o[2],o[3])}}},{key:"drawImageAtPosition",value:function(t,e,i,n,o,r){if(this.initialized())if(e>2){e*=.5;for(var s=0;e>2&&s<this.NUM_ITERATIONS;)e*=.5,s+=1;s>=this.NUM_ITERATIONS&&(s=this.NUM_ITERATIONS-1);var a=this.coordinates[s];t.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,n,o,r)}else t.drawImage(this.image,i,n,o,r)}}]),t}(),Jy=function(){function t(e){bO(this,t),this.images={},this.imageBroken={},this.callback=e}return EO(t,[{key:"_tryloadBrokenUrl",value:function(t,e,i){void 0!==t&&void 0!==i&&(void 0!==e?(i.image.onerror=function(){console.error("Could not load brokenImage:",e)},i.image.src=e):console.warn("No broken url image defined"))}},{key:"_redrawWithImage",value:function(t){this.callback&&this.callback(t)}},{key:"load",value:function(t,e){var i=this,n=this.images[t];if(n)return n;var o=new Qy;return this.images[t]=o,o.image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",t),i._tryloadBrokenUrl(t,e,o)},o.image.src=t,o}},{key:"_fixImageCoordinates",value:function(t){0===t.width&&(document.body.appendChild(t),t.width=t.offsetWidth,t.height=t.offsetHeight,document.body.removeChild(t))}}]),t}(),tm={exports:{}},em=d((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),im=d,nm=rt,om=O,rm=em,sm=Object.isExtensible,am=im((function(){sm(1)}))||rm?function(t){return!!nm(t)&&((!rm||"ArrayBuffer"!==om(t))&&(!sm||sm(t)))}:sm,lm=!d((function(){return Object.isExtensible(Object.preventExtensions({}))})),hm=Ai,dm=x,cm=Zi,um=rt,fm=ne,pm=ii.f,vm=Ql,gm=eh,ym=am,mm=lm,bm=!1,wm=le("meta"),xm=0,_m=function(t){pm(t,wm,{value:{objectID:"O"+xm++,weakData:{}}})},km=tm.exports={enable:function(){km.enable=function(){},bm=!0;var t=vm.f,e=dm([].splice),i={};i[wm]=1,t(i).length&&(vm.f=function(i){for(var n=t(i),o=0,r=n.length;o<r;o++)if(n[o]===wm){e(n,o,1);break}return n},hm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:gm.f}))},fastKey:function(t,e){if(!um(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!fm(t,wm)){if(!ym(t))return"F";if(!e)return"E";_m(t)}return t[wm].objectID},getWeakData:function(t,e){if(!fm(t,wm)){if(!ym(t))return!0;if(!e)return!1;_m(t)}return t[wm].weakData},onFreeze:function(t){return mm&&bm&&ym(t)&&!fm(t,wm)&&_m(t),t}};cm[wm]=!0;var Em=tm.exports,Om=ei,Cm=N,Sm=ai,Tm=Dt,Pm=Xs,Im=Vi,Mm=ut,Dm=Ta,Am=xa,Bm=Hs,Fm=TypeError,zm=function(t,e){this.stopped=t,this.result=e},Nm=zm.prototype,jm=function(t,e,i){var n,o,r,s,a,l,h,d=i&&i.that,c=!(!i||!i.AS_ENTRIES),u=!(!i||!i.IS_RECORD),f=!(!i||!i.IS_ITERATOR),p=!(!i||!i.INTERRUPTED),v=Om(e,d),g=function(t){return n&&Bm(n,"normal",t),new zm(!0,t)},y=function(t){return c?(Sm(t),p?v(t[0],t[1],g):v(t[0],t[1])):p?v(t,g):v(t)};if(u)n=t.iterator;else if(f)n=t;else{if(!(o=Am(t)))throw new Fm(Tm(t)+" is not iterable");if(Pm(o)){for(r=0,s=Im(t);s>r;r++)if((a=y(t[r]))&&Mm(Nm,a))return a;return new zm(!1)}n=Dm(t,o)}for(l=u?t.next:n.next;!(h=Cm(l,n)).done;){try{a=y(h.value)}catch(rO){Bm(n,"throw",rO)}if("object"==typeof a&&a&&Mm(Nm,a))return a}return new zm(!1)},Rm=ut,Lm=TypeError,Hm=function(t,e){if(Rm(e,t))return t;throw new Lm("Incorrect invocation")},Wm=Ai,qm=h,Um=Em,Vm=d,Ym=xi,Xm=jm,$m=Hm,Gm=D,Km=rt,Zm=K,Qm=Gr,Jm=ii.f,tb=Bh.forEach,eb=B,ib=Ho.set,nb=Ho.getterFor,ob=function(t,e,i){var n,o=-1!==t.indexOf("Map"),r=-1!==t.indexOf("Weak"),s=o?"set":"add",a=qm[t],l=a&&a.prototype,h={};if(eb&&Gm(a)&&(r||l.forEach&&!Vm((function(){(new a).entries().next()})))){var d=(n=e((function(e,i){ib($m(e,d),{type:t,collection:new a}),Zm(i)||Xm(i,e[s],{that:e,AS_ENTRIES:o})}))).prototype,c=nb(t);tb(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in l)||r&&"clear"===t||Ym(d,t,(function(i,n){var o=c(this).collection;if(!e&&r&&!Km(i))return"get"===t&&void 0;var s=o[t](0===i?0:i,n);return e?this:s}))})),r||Jm(d,"size",{configurable:!0,get:function(){return c(this).collection.size}})}else n=i.getConstructor(e,t,o,s),Um.enable();return Qm(n,t,!1,!0),h[t]=n,Wm({global:!0,forced:!0},h),r||i.setStrong(n,t,o),n},rb=Ir,sb=function(t,e,i){for(var n in e)i&&i.unsafe&&t[n]?t[n]=e[n]:rb(t,n,e[n],i);return t},ab=ct,lb=ph,hb=B,db=ye("species"),cb=br,ub=ph,fb=sb,pb=ei,vb=Hm,gb=K,yb=jm,mb=Ts,bb=Ps,wb=function(t){var e=ab(t);hb&&e&&!e[db]&&lb(e,db,{configurable:!0,get:function(){return this}})},xb=B,_b=Em.fastKey,kb=Ho.set,Eb=Ho.getterFor,Ob={getConstructor:function(t,e,i,n){var o=t((function(t,o){vb(t,r),kb(t,{type:e,index:cb(null),first:void 0,last:void 0,size:0}),xb||(t.size=0),gb(o)||yb(o,t[n],{that:t,AS_ENTRIES:i})})),r=o.prototype,s=Eb(e),a=function(t,e,i){var n,o,r=s(t),a=l(t,e);return a?a.value=i:(r.last=a={index:o=_b(e,!0),key:e,value:i,previous:n=r.last,next:void 0,removed:!1},r.first||(r.first=a),n&&(n.next=a),xb?r.size++:t.size++,"F"!==o&&(r.index[o]=a)),t},l=function(t,e){var i,n=s(t),o=_b(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key===e)return i};return fb(r,{clear:function(){for(var t=s(this),e=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete e[i.index],i=i.next;t.first=t.last=void 0,xb?t.size=0:this.size=0},delete:function(t){var e=this,i=s(e),n=l(e,t);if(n){var o=n.next,r=n.previous;delete i.index[n.index],n.removed=!0,r&&(r.next=o),o&&(o.previous=r),i.first===n&&(i.first=o),i.last===n&&(i.last=r),xb?i.size--:e.size--}return!!n},forEach:function(t){for(var e,i=s(this),n=pb(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!l(this,t)}}),fb(r,i?{get:function(t){var e=l(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),xb&&ub(r,"size",{configurable:!0,get:function(){return s(this).size}}),o},setStrong:function(t,e,i){var n=e+" Iterator",o=Eb(e),r=Eb(n);mb(t,e,(function(t,e){kb(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=r(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?bb("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=void 0,bb(void 0,!0))}),i?"entries":"values",!i,!0),wb(e)}};ob("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Ob);var Cb=aO(st.Map),Sb=function(){function t(){bO(this,t),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},En(this.options,this.defaultOptions)}return EO(t,[{key:"setOptions",value:function(t){var e=["useDefaultGroups"];if(void 0!==t)for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&-1===zv(e).call(e,i)){var n=t[i];this.add(i,n)}}},{key:"clear",value:function(){this._groups=new Cb,this._groupNames=[]}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this._groups.get(t);if(void 0===i&&e)if(!1===this.options.useDefaultGroups&&this._groupNames.length>0){var n=this._groupIndex%this._groupNames.length;++this._groupIndex,(i={}).color=this._groups.get(this._groupNames[n]),this._groups.set(t,i)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,(i={}).color=this._defaultGroups[o],this._groups.set(t,i)}return i}},{key:"add",value:function(t,e){return this._groups.has(t)||this._groupNames.push(t),this._groups.set(t,e),e}}]),t}();Ai({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var Tb=aO(st.Number.isNaN),Pb=h.isFinite,Ib=Number.isFinite||function(t){return"number"==typeof t&&Pb(t)};Ai({target:"Number",stat:!0},{isFinite:Ib});var Mb=aO(st.Number.isFinite),Db=Bh.some;Ai({target:"Array",proto:!0,forced:!Bf("some")},{some:function(t){return Db(this,t,arguments.length>1?arguments[1]:void 0)}});var Ab=Rn("Array").some,Bb=ut,Fb=Ab,zb=Array.prototype,Nb=function(t){var e=t.some;return t===zb||Bb(zb,t)&&e===zb.some?Fb:e},jb=aO(Nb),Rb=aO(st.Object.getOwnPropertySymbols),Lb={exports:{}},Hb=Ai,Wb=d,qb=it,Ub=A.f,Vb=B;Hb({target:"Object",stat:!0,forced:!Vb||Wb((function(){Ub(1)})),sham:!Vb},{getOwnPropertyDescriptor:function(t,e){return Ub(qb(t),e)}});var Yb=st.Object,Xb=Lb.exports=function(t,e){return Yb.getOwnPropertyDescriptor(t,e)};Yb.getOwnPropertyDescriptor.sham&&(Xb.sham=!0);var $b=Lb.exports,Gb=aO($b),Kb=yf,Zb=it,Qb=A,Jb=va;Ai({target:"Object",stat:!0,sham:!B},{getOwnPropertyDescriptors:function(t){for(var e,i,n=Zb(t),o=Qb.f,r=Kb(n),s={},a=0;r.length>a;)void 0!==(i=o(n,e=r[a++]))&&Jb(s,e,i);return s}});var tw=aO(st.Object.getOwnPropertyDescriptors),ew={exports:{}},iw=Ai,nw=B,ow=$o.f;iw({target:"Object",stat:!0,forced:Object.defineProperties!==ow,sham:!nw},{defineProperties:ow});var rw=st.Object,sw=ew.exports=function(t,e){return rw.defineProperties(t,e)};rw.defineProperties.sham&&(sw.sham=!0);var aw=aO(ew.exports),lw=aO(xl);function PS(t,e,i){return(e=_O(e))in t?_l(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var hw=h,dw=d,cw=uo,uw=uv.trim,fw=ov,pw=x("".charAt),vw=hw.parseFloat,gw=hw.Symbol,yw=gw&&gw.iterator,mw=1/vw(fw+"-0")!=-1/0||yw&&!dw((function(){vw(Object(yw))}))?function(t){var e=uw(cw(t)),i=vw(e);return 0===i&&"-"===pw(e,0)?-0:i}:vw;Ai({global:!0,forced:parseFloat!==mw},{parseFloat:mw});var bw=aO(st.parseFloat),ww=Ai,xw=d,_w=eh.f;ww({target:"Object",stat:!0,forced:xw((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:_w});var kw=st.Object,Ew=function(t){return kw.getOwnPropertyNames(t)},Ow=aO(Ew);function IS(t,e){var i=["node","edge","label"],n=!0,o=iS(e,"chosen");if("boolean"==typeof o)n=o;else if("object"===wO(o)){if(-1===zv(i).call(i,t))throw new Error("choosify: subOption '"+t+"' should be one of '"+i.join("', '")+"'");var r=iS(e,["chosen",t]);"boolean"!=typeof r&&"function"!=typeof r||(n=r)}return n}function MS(t,e,i){if(t.width<=0||t.height<=0)return!1;if(void 0!==i){var n={x:e.x-i.x,y:e.y-i.y};if(0!==i.angle){var o=-i.angle;e={x:Math.cos(o)*n.x-Math.sin(o)*n.y,y:Math.sin(o)*n.x+Math.cos(o)*n.y}}else e=n}var r=t.x+t.width,s=t.y+t.width;return t.left<e.x&&r>e.x&&t.top<e.y&&s>e.y}function DS(t){return"string"==typeof t&&""!==t}function AS(t,e,i,n){var o=n.x,r=n.y;if("function"==typeof n.distanceToBorder){var s=n.distanceToBorder(t,e),a=Math.sin(e)*s,l=Math.cos(e)*s;l===s?(o+=s,r=n.y):a===s?(o=n.x,r-=s):(o+=l,r-=a)}else n.shape.width>n.shape.height?(o=n.x+.5*n.shape.width,r=n.y-i):(o=n.x+i,r=n.y-.5*n.shape.height);return{x:o,y:r}}var Cw=Rn("Array").values,Sw=lo,Tw=ne,Pw=ut,Iw=Cw,Mw=Array.prototype,Dw={DOMTokenList:!0,NodeList:!0},Aw=function(t){var e=t.values;return t===Mw||Pw(Mw,t)&&e===Mw.values||Tw(Dw,Sw(t))?Iw:e},Bw=aO(Aw),Fw=function(){function t(e){bO(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return EO(t,[{key:"_add",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[t]&&(this.lines[t]={width:0,height:0,blocks:[]});var n=e;void 0!==e&&""!==e||(n=" ");var o=this.measureText(n,i),r=En({},Bw(o));r.text=e,r.width=o.width,r.mod=i,void 0!==e&&""!==e||(r.width=0),this.lines[t].blocks.push(r),this.lines[t].width+=r.width}},{key:"curWidth",value:function(){var t=this.lines[this.current];return void 0===t?0:t.width}},{key:"append",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e)}},{key:"newLine",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e),this.current++}},{key:"determineLineHeights",value:function(){for(var t=0;t<this.lines.length;t++){var e=this.lines[t],i=0;if(void 0!==e.blocks)for(var n=0;n<e.blocks.length;n++){var o=e.blocks[n];i<o.height&&(i=o.height)}e.height=i}}},{key:"determineLabelSize",value:function(){for(var t=0,e=0,i=0;i<this.lines.length;i++){var n=this.lines[i];n.width>t&&(t=n.width),e+=n.height}this.width=t,this.height=e}},{key:"removeEmptyBlocks",value:function(){for(var t=[],e=0;e<this.lines.length;e++){var i=this.lines[e];if(0!==i.blocks.length&&(e!==this.lines.length-1||0!==i.width)){var n={};En(n,i),n.blocks=[];for(var o=void 0,r=[],s=0;s<i.blocks.length;s++){var a=i.blocks[s];0!==a.width?r.push(a):void 0===o&&(o=a)}0===r.length&&void 0!==o&&r.push(o),n.blocks=r,t.push(n)}}return t}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var t=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:t}}}]),t}(),zw={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},Nw=function(){function t(e){bO(this,t),this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return EO(t,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(t){" "===t&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)}},{key:"parseWS",value:function(t){return!!/[ \t]/.test(t)&&(this.mono?this.add(t):this.spacing=!0,!0)}},{key:"setTag",value:function(t){this.emitBlock(),this[t]=!0,this.modStack.unshift(t)}},{key:"unsetTag",value:function(t){this.emitBlock(),this[t]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(t,e){return!(this.mono||this[t]||!this.match(e))&&(this.setTag(t),!0)}},{key:"match",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=IO(this.prepareRegExp(t),2),n=i[0],o=i[1],r=n.test(this.text.substr(this.position,o));return r&&e&&(this.position+=o-1),r}},{key:"parseEndTag",value:function(t,e,i){var n=this.mod()===t;return!(!(n="mono"===t?n&&this.mono:n&&!this.mono)||!this.match(e))&&(void 0!==i?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(t):this.unsetTag(t),!0)}},{key:"replace",value:function(t,e){return!!this.match(t)&&(this.add(e),this.position+=length-1,!0)}},{key:"prepareRegExp",value:function(t){var e,i;if(t instanceof RegExp)i=t,e=1;else{var n=zw[t];i=void 0!==n?n:new RegExp(t),e=t.length}return[i,e]}}]),t}(),jw=function(){function t(e,i,n,o){var r=this;bO(this,t),this.ctx=e,this.parent=i,this.selected=n,this.hover=o;this.lines=new Fw((function(t,i){if(void 0===t)return 0;var s=r.parent.getFormattingValues(e,n,o,i),a=0;""!==t&&(a=r.ctx.measureText(t).width);return{width:a,values:s}}))}return EO(t,[{key:"process",value:function(t){if(!DS(t))return this.lines.finalize();var e=this.parent.fontOptions;t=(t=t.replace(/\r\n/g,"\n")).replace(/\r/g,"\n");var i=String(t).split("\n"),n=i.length;if(e.multi)for(var o=0;o<n;o++){var r=this.splitBlocks(i[o],e.multi);if(void 0!==r)if(0!==r.length){if(e.maxWdt>0)for(var s=0;s<r.length;s++){var a=r[s].mod,l=r[s].text;this.splitStringIntoLines(l,a,!0)}else for(var h=0;h<r.length;h++){var d=r[h].mod,c=r[h].text;this.lines.append(c,d)}this.lines.newLine()}else this.lines.newLine("")}else if(e.maxWdt>0)for(var u=0;u<n;u++)this.splitStringIntoLines(i[u]);else for(var f=0;f<n;f++)this.lines.newLine(i[f]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(t){var e="none";return"markdown"===t||"md"===t?e="markdown":!0!==t&&"html"!==t||(e="html"),e}},{key:"splitHtmlBlocks",value:function(t){for(var e=new Nw(t),i=function(t){return!!/&/.test(t)&&(e.replace(e.text,"<","<")||e.replace(e.text,"&","&")||e.add("&"),!0)};e.position<e.text.length;){var n=e.text.charAt(e.position);e.parseWS(n)||/</.test(n)&&(e.parseStartTag("bold","<b>")||e.parseStartTag("ital","<i>")||e.parseStartTag("mono","<code>")||e.parseEndTag("bold","</b>")||e.parseEndTag("ital","</i>")||e.parseEndTag("mono","</code>"))||i(n)||e.add(n),e.position++}return e.emitBlock(),e.blocks}},{key:"splitMarkdownBlocks",value:function(t){for(var e=this,i=new Nw(t),n=!0,o=function(t){return!!/\\/.test(t)&&(i.position<e.text.length+1&&(i.position++,t=e.text.charAt(i.position),/ \t/.test(t)?i.spacing=!0:(i.add(t),n=!1)),!0)};i.position<i.text.length;){var r=i.text.charAt(i.position);i.parseWS(r)||o(r)||(n||i.spacing)&&(i.parseStartTag("bold","*")||i.parseStartTag("ital","_")||i.parseStartTag("mono","`"))||i.parseEndTag("bold","*","afterBold")||i.parseEndTag("ital","_","afterItal")||i.parseEndTag("mono","`","afterMono")||(i.add(r),n=!1),i.position++}return i.emitBlock(),i.blocks}},{key:"splitBlocks",value:function(t,e){var i=this.decodeMarkupSystem(e);return"none"===i?[{text:t,mod:"normal"}]:"markdown"===i?this.splitMarkdownBlocks(t):"html"===i?this.splitHtmlBlocks(t):void 0}},{key:"overMaxWidth",value:function(t){var e=this.ctx.measureText(t).width;return this.lines.curWidth()+e>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(t){for(var e="",i=0;i<t.length;){var n=e+(""===e?"":" ")+t[i];if(this.overMaxWidth(n))break;e=n,i++}return i}},{key:"getLongestFitWord",value:function(t){for(var e=0;e<t.length&&!this.overMaxWidth(cf(t).call(t,0,e));)e++;return e}},{key:"splitStringIntoLines",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.parent.getFormattingValues(this.ctx,this.selected,this.hover,e);for(var n=(t=(t=t.replace(/^( +)/g,"$1\r")).replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r")).split("\r");n.length>0;){var o=this.getLongestFit(n);if(0===o){var r=n[0],s=this.getLongestFitWord(r);this.lines.newLine(cf(r).call(r,0,s),e),n[0]=cf(r).call(r,s)}else{var a=o;" "===n[o-1]?o--:" "===n[a]&&a++;var l=cf(n).call(n,0,o).join("");o==n.length&&i?this.lines.append(l,e):this.lines.newLine(l,e),n=cf(n).call(n,a)}}}}]),t}(),Rw=["bold","ital","boldital","mono"],Lw=function(){function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];bO(this,t),this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(i),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}return EO(t,[{key:"setOptions",value:function(t){if(this.elementOptions=t,this.initFontOptions(t.font),DS(t.label)?this.labelDirty=!0:t.label=void 0,void 0!==t.font&&null!==t.font)if("string"==typeof t.font)this.baseSize=this.fontOptions.size;else if("object"===wO(t.font)){var e=t.font.size;void 0!==e&&(this.baseSize=e)}}},{key:"initFontOptions",value:function(e){var i=this;WC(Rw,(function(t){i.fontOptions[t]={}})),t.parseFontString(this.fontOptions,e)?this.fontOptions.vadjust=0:WC(e,(function(t,e){null!=t&&"object"!==wO(t)&&(i.fontOptions[e]=t)}))}},{key:"constrain",value:function(t){var e={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=iS(t,"widthConstraint");if("number"==typeof i)e.maxWdt=Number(i),e.minWdt=Number(i);else if("object"===wO(i)){var n=iS(t,["widthConstraint","maximum"]);"number"==typeof n&&(e.maxWdt=Number(n));var o=iS(t,["widthConstraint","minimum"]);"number"==typeof o&&(e.minWdt=Number(o))}var r=iS(t,"heightConstraint");if("number"==typeof r)e.minHgt=Number(r);else if("object"===wO(r)){var s=iS(t,["heightConstraint","minimum"]);"number"==typeof s&&(e.minHgt=Number(s));var a=iS(t,["heightConstraint","valign"]);"string"==typeof a&&("top"!==a&&"bottom"!==a||(e.valign=a))}return e}},{key:"update",value:function(t,e){this.setOptions(t,!0),this.propagateFonts(e),RC(this.fontOptions,this.constrain(e)),this.fontOptions.chooser=IS("label",e)}},{key:"adjustSizes",value:function(t){var e=t?t.right+t.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=e,this.fontOptions.minWdt-=e);var i=t?t.top+t.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(t,e){for(var i=0;i<e.length;++i)this.addFontToPile(t,e[i])}},{key:"addFontToPile",value:function(t,e){if(void 0!==e&&void 0!==e.font&&null!==e.font){var i=e.font;t.push(i)}}},{key:"getBasicOptions",value:function(e){for(var i={},n=0;n<e.length;++n){var o=e[n],r={};t.parseFontString(r,o)&&(o=r),WC(o,(function(t,e){void 0!==t&&(Object.prototype.hasOwnProperty.call(i,e)||(-1!==zv(Rw).call(Rw,e)?i[e]={}:i[e]=t))}))}return i}},{key:"getFontOption",value:function(e,i,n){for(var o,r=0;r<e.length;++r){var s=e[r];if(Object.prototype.hasOwnProperty.call(s,i)){if(null==(o=s[i]))continue;var a={};if(t.parseFontString(a,o)&&(o=a),Object.prototype.hasOwnProperty.call(o,n))return o[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}},{key:"getFontOptions",value:function(t,e){for(var i={},n=["color","size","face","mod","vadjust"],o=0;o<n.length;++o){var r=n[o];i[r]=this.getFontOption(t,e,r)}return i}},{key:"propagateFonts",value:function(t){var e=this,i=[];this.addFontOptionsToPile(i,t),this.fontOptions=this.getBasicOptions(i);for(var n=function(){var t=Rw[o],n=e.fontOptions[t];WC(e.getFontOptions(i,t),(function(t,e){n[e]=t})),n.size=Number(n.size),n.vadjust=Number(n.vadjust)},o=0;o<Rw.length;++o)n()}},{key:"draw",value:function(t,e,i,n,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";if(void 0!==this.elementOptions.label){var s=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&s<this.elementOptions.scaling.label.drawThreshold-1||(s>=this.elementOptions.scaling.label.maxVisible&&(s=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(t,n,o,e,i,r),this._drawBackground(t),this._drawText(t,e,this.size.yLine,r,s))}}},{key:"_drawBackground",value:function(t){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){t.fillStyle=this.fontOptions.background;var e=this.getSize();t.fillRect(e.left,e.top,e.width,e.height)}}},{key:"_drawText",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,r=IO(this._setAlignment(t,e,i,n),2);e=r[0],i=r[1],t.textAlign="left",e-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(i-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(i+=(this.size.height-this.size.labelHeight)/2));for(var s=0;s<this.lineCount;s++){var a=this.lines[s];if(a&&a.blocks){var l=0;this.isEdgeLabel||"center"===this.fontOptions.align?l+=(this.size.width-a.width)/2:"right"===this.fontOptions.align&&(l+=this.size.width-a.width);for(var h=0;h<a.blocks.length;h++){var d=a.blocks[h];t.font=d.font;var c=IO(this._getColor(d.color,o,d.strokeColor),2),u=c[0],f=c[1];d.strokeWidth>0&&(t.lineWidth=d.strokeWidth,t.strokeStyle=f,t.lineJoin="round"),t.fillStyle=u,d.strokeWidth>0&&t.strokeText(d.text,e+l,i+d.vadjust),t.fillText(d.text,e+l,i+d.vadjust),l+=d.width}i+=a.height}}}},{key:"_setAlignment",value:function(t,e,i,n){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf){e=0,i=0;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=4):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=4):t.textBaseline="middle"}else t.textBaseline=n;return[e,i]}},{key:"_getColor",value:function(t,e,i){var n=t||"#000000",o=i||"#ffffff";if(e<=this.elementOptions.scaling.label.drawThreshold){var r=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-e)));n=UC(n,r),o=UC(o,r)}return[n,o]}},{key:"getTextSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._processLabel(t,e,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var t=this.size.left,e=this.size.top-1;if(this.isEdgeLabel){var i=.5*-this.size.width;switch(this.fontOptions.align){case"middle":t=i,e=.5*-this.size.height;break;case"top":t=i,e=-(this.size.height+2);break;case"bottom":t=i,e=2}}return{left:t,top:e,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(t,e,i),this.size.left=n-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===r&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(t,e,i,n){var o=function(t,e,i){return"normal"===e?"mod"===i?"":t[i]:void 0!==t[e][i]?t[e][i]:t[i]},r={color:o(this.fontOptions,n,"color"),size:o(this.fontOptions,n,"size"),face:o(this.fontOptions,n,"face"),mod:o(this.fontOptions,n,"mod"),vadjust:o(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(e||i)&&("normal"===n&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?r.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(r,this.elementOptions.id,e,i));var s="";return void 0!==r.mod&&""!==r.mod&&(s+=r.mod+" "),s+=r.size+"px "+r.face,t.font=s.replace(/"/g,""),r.font=t.font,r.height=r.size,r}},{key:"differentState",value:function(t,e){return t!==this.selectedState||e!==this.hoverState}},{key:"_processLabelText",value:function(t,e,i,n){return new jw(t,this,e,i).process(n)}},{key:"_processLabel",value:function(t,e,i){if(!1!==this.labelDirty||this.differentState(e,i)){var n=this._processLabelText(t,e,i,this.elementOptions.label);this.fontOptions.minWdt>0&&n.width<this.fontOptions.minWdt&&(n.width=this.fontOptions.minWdt),this.size.labelHeight=n.height,this.fontOptions.minHgt>0&&n.height<this.fontOptions.minHgt&&(n.height=this.fontOptions.minHgt),this.lines=n.lines,this.lineCount=n.lines.length,this.size.width=n.width,this.size.height=n.height,this.selectedState=e,this.hoverState=i,this.labelDirty=!1}}},{key:"visible",value:function(){return 0!==this.size.width&&0!==this.size.height&&void 0!==this.elementOptions.label&&!(this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(t,e){if(!e||"string"!=typeof e)return!1;var i=e.split(" ");return t.size=+i[0].replace("px",""),t.face=i[1],t.color=i[2],!0}}]),t}(),Hw=ca,Ww=Dt,qw=TypeError,Uw=Ai,Vw=g,Yw=zn,Xw=function(t){if(Hw(t))return t;throw new qw(Ww(t)+" is not a constructor")},$w=ai,Gw=rt,Kw=br,Zw=d,Qw=ct("Reflect","construct"),Jw=Object.prototype,tx=[].push,ex=Zw((function(){function t(){}return!(Qw((function(){}),[],t)instanceof t)})),ix=!Zw((function(){Qw((function(){}))})),nx=ex||ix;Uw({target:"Reflect",stat:!0,forced:nx,sham:nx},{construct:function(t,e){Xw(t),$w(e);var i=arguments.length<3?t:Xw(arguments[2]);if(ix&&!ex)return Qw(t,e,i);if(t===i){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return Vw(tx,n,e),new(Vw(Yw,t,n))}var o=i.prototype,r=Kw(Gw(o)?o:Jw),s=Vw(t,r,e);return Gw(s)?s:r}});var ox=aO(st.Reflect.construct),rx=aO(jv);Ai({target:"Object",stat:!0},{setPrototypeOf:cs});var sx=aO(st.Object.setPrototypeOf),ax=aO(Vn);function BS(t,e){var i;return BS=sx?ax(i=sx).call(i):function(t,e){return t.__proto__=e,t},BS(t,e)}function FS(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=rx(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),_l(t,"prototype",{writable:!1}),e&&BS(t,e)}function zS(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function NS(t,e){if(e&&("object"===wO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zS(t)}var lx=aO(Gp);function jS(t){var e;return jS=sx?ax(e=lx).call(e):function(t){return t.__proto__||lx(t)},jS(t)}var hx=function(){function t(e,i,n){bO(this,t),this.body=i,this.labelModule=n,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return EO(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"_setMargins",value:function(t){this.margin={},this.options.margin&&("object"==wO(this.options.margin)?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),t.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(t,e){var i=this.options.borderWidth;return t&&this.resize(t),Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}},{key:"enableShadow",value:function(t,e){e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(t,e){if(!1!==e.borderDashes)if(void 0!==t.setLineDash){var i=e.borderDashes;!0===i&&(i=[5,15]),t.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,e.borderDashes=!1}},{key:"disableBorderDashes",value:function(t,e){!1!==e.borderDashes&&(void 0!==t.setLineDash?t.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,e.borderDashes=!1))}},{key:"needsRefresh",value:function(t,e){return!0===this.refreshNeeded?(this.refreshNeeded=!1,!0):void 0===this.width||this.labelModule.differentState(t,e)}},{key:"initContextForDraw",value:function(t,e){var i=e.borderWidth/this.body.view.scale;t.lineWidth=Math.min(this.width,i),t.strokeStyle=e.borderColor,t.fillStyle=e.color}},{key:"performStroke",value:function(t,e){var i=e.borderWidth/this.body.view.scale;t.save(),i>0&&(this.enableBorderDashes(t,e),t.stroke(),this.disableBorderDashes(t,e)),t.restore()}},{key:"performFill",value:function(t,e){t.save(),t.fillStyle=e.color,this.enableShadow(t,e),bg(t).call(t),this.disableShadow(t,e),t.restore(),this.performStroke(t,e)}},{key:"_addBoundingBoxMargin",value:function(t){this.boundingBox.left-=t,this.boundingBox.top-=t,this.boundingBox.bottom+=t,this.boundingBox.right+=t}},{key:"_updateBoundingBox",value:function(t,e,i,n,o){void 0!==i&&this.resize(i,n,o),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(t,e,i,n,o){this._updateBoundingBox(t,e,i,n,o)}},{key:"getDimensionsFromLabel",value:function(t,e,i){this.textSize=this.labelModule.getTextSize(t,e,i);var n=this.textSize.width,o=this.textSize.height;return 0===n&&(n=14,o=14),{width:n,height:o}}}]),t}();function RS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var dx=function(t){FS(o,t);var e,i,n=(e=o,i=RS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i))._setMargins(i),r}return EO(o,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,n,o,r){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,r),pO(t,this.left,this.top,this.width,this.height,r.borderRadius),this.performFill(t,r),this.updateBoundingBox(e,i,t,n,o),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,o)}},{key:"updateBoundingBox",value:function(t,e,i,n,o){this._updateBoundingBox(t,e,i,n,o);var r=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(r)}},{key:"distanceToBorder",value:function(t,e){t&&this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),o}(hx);function LS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var cx=function(t){FS(o,t);var e,i,n=(e=o,i=LS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i)).labelOffset=0,r.selected=!1,r}return EO(o,[{key:"setOptions",value:function(t,e,i){this.options=t,void 0===e&&void 0===i||this.setImages(e,i)}},{key:"setImages",value:function(t,e){e&&this.selected?(this.imageObj=e,this.imageObjAlt=t):(this.imageObj=t,this.imageObjAlt=e)}},{key:"switchImages",value:function(t){var e=t&&!this.selected||!t&&this.selected;if(this.selected=t,void 0!==this.imageObjAlt&&e){var i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}},{key:"_getImagePadding",value:function(){var t={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var e=this.options.imagePadding;"object"==wO(e)?(t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left):(t.top=e,t.right=e,t.bottom=e,t.left=e)}return t}},{key:"_resizeImage",value:function(){var t,e;if(!1===this.options.shapeProperties.useImageSize){var i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),t=2*this.options.size*i,e=2*this.options.size*n}else{var o=this._getImagePadding();t=this.imageObj.width+o.left+o.right,e=this.imageObj.height+o.top+o.bottom}this.width=t,this.height=e,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(t,e,i,n){this.initContextForDraw(t,n),lO(t,e,i,n.size),this.performFill(t,n)}},{key:"_drawImageAtPosition",value:function(t,e){if(0!=this.imageObj.width){t.globalAlpha=void 0!==e.opacity?e.opacity:1,this.enableShadow(t,e);var i=1;!0===this.options.shapeProperties.interpolation&&(i=this.imageObj.width/this.width/this.body.view.scale);var n=this._getImagePadding(),o=this.left+n.left,r=this.top+n.top,s=this.width-n.left-n.right,a=this.height-n.top-n.bottom;this.imageObj.drawImageAtPosition(t,i,o,r,s,a),this.disableShadow(t,e)}}},{key:"_drawImageLabel",value:function(t,e,i,n,o){var r=0;if(void 0!==this.height){r=.5*this.height;var s=this.labelModule.getTextSize(t,n,o);s.lineCount>=1&&(r+=s.height/2)}var a=i+r;this.options.label&&(this.labelOffset=r),this.labelModule.draw(t,e,a,n,o,"hanging")}}]),o}(hx);function HS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var ux=function(t){FS(o,t);var e,i,n=(e=o,i=HS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i))._setMargins(i),r}return EO(o,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i),o=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=o/2,this.width=o,this.height=o,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,n,o,r){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,r),this.updateBoundingBox(e,i),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,i,n,o)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size}},{key:"distanceToBorder",value:function(t){return t&&this.resize(t),.5*this.width}}]),o}(cx);function WS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var fx=function(t){FS(o,t);var e,i,n=(e=o,i=WS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i,r,s){var a;return bO(this,o),(a=n.call(this,t,e,i)).setImages(r,s),a}return EO(o,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var n=2*this.options.size;return this.width=n,this.height=n,void(this.radius=.5*this.width)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,n,o,r){this.switchImages(n),this.resize();var s=e,a=i;"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=e,this.top=i,s+=this.width/2,a+=this.height/2):(this.left=e-this.width/2,this.top=i-this.height/2),this._drawRawCircle(t,s,a,r),t.save(),t.clip(),this._drawImageAtPosition(t,r),t.restore(),this._drawImageLabel(t,s,a,n,o),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){"top-left"===this.options.shapeProperties.coordinateOrigin?(this.boundingBox.top=e,this.boundingBox.left=t,this.boundingBox.right=t+2*this.options.size,this.boundingBox.bottom=e+2*this.options.size):(this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(t){return t&&this.resize(t),.5*this.width}}]),o}(cx);function qS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var px=function(t){FS(o,t);var e,i,n=(e=o,i=qS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};if(this.needsRefresh(e,i)){var o,r;this.labelModule.getTextSize(t,e,i);var s=2*n.size;this.width=null!==(o=this.customSizeWidth)&&void 0!==o?o:s,this.height=null!==(r=this.customSizeHeight)&&void 0!==r?r:s,this.radius=.5*this.width}}},{key:"_drawShape",value:function(t,e,i,n,o,r,s,a){var l,h=this;return this.resize(t,r,s,a),this.left=n-this.width/2,this.top=o-this.height/2,this.initContextForDraw(t,a),(l=e,Object.prototype.hasOwnProperty.call(Xn,l)?Xn[l]:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];CanvasRenderingContext2D.prototype[l].call(t,i)})(t,n,o,a.size),this.performFill(t,a),void 0!==this.options.icon&&void 0!==this.options.icon.code&&(t.font=(r?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",t.fillText(this.options.icon.code,n,o)),{drawExternalLabel:function(){if(void 0!==h.options.label){h.labelModule.calculateLabelSize(t,r,s,n,o,"hanging");var e=o+.5*h.height+.5*h.labelModule.size.height;h.labelModule.draw(t,n,e,r,s,"hanging")}h.updateBoundingBox(n,o)}}}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),o}(hx);function US(t,e){var i=Tf(t);if(Rb){var n=Rb(t);e&&(n=nv(n).call(n,(function(e){return Gb(t,e).enumerable}))),i.push.apply(i,n)}return i}function VS(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?Vf(i=US(Object(o),!0)).call(i,(function(e){PS(t,e,o[e])})):tw?aw(t,tw(o)):Vf(n=US(Object(o))).call(n,(function(e){lw(t,e,Gb(o,e))}))}return t}function YS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var vx=function(t){FS(o,t);var e,i,n=(e=o,i=YS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i,r){var s;return bO(this,o),(s=n.call(this,t,e,i,r)).ctxRenderer=r,s}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){this.resize(t,n,o,r),this.left=e-this.width/2,this.top=i-this.height/2,t.save();var s=this.ctxRenderer({ctx:t,id:this.options.id,x:e,y:i,state:{selected:n,hover:o},style:VS({},r),label:this.options.label});if(null!=s.drawNode&&s.drawNode(),t.restore(),s.drawExternalLabel){var a=s.drawExternalLabel;s.drawExternalLabel=function(){t.save(),a(),t.restore()}}return s.nodeDimensions&&(this.customSizeWidth=s.nodeDimensions.width,this.customSizeHeight=s.nodeDimensions.height),s}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(px);function XS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var gx=function(t){FS(o,t);var e,i,n=(e=o,i=XS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i))._setMargins(i),r}return EO(o,[{key:"resize",value:function(t,e,i){if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i).width+this.margin.right+this.margin.left;this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,n,o,r){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,r),gO(t,e-this.width/2,i-this.height/2,this.width,this.height),this.performFill(t,r),this.updateBoundingBox(e,i,t,n,o),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(hx);function $S(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var yx=function(t){FS(o,t);var e,i,n=(e=o,i=$S(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){return this._drawShape(t,"diamond",4,e,i,n,o,r)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(px);function GS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var mx=function(t){FS(o,t);var e,i,n=(e=o,i=GS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){return this._drawShape(t,"circle",2,e,i,n,o,r)}},{key:"distanceToBorder",value:function(t){return t&&this.resize(t),this.options.size}}]),o}(px);function KS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var bx=function(t){FS(o,t);var e,i,n=(e=o,i=KS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i);this.height=2*n.height,this.width=n.width+n.height,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,i,n,o,r){this.resize(t,n,o),this.left=e-.5*this.width,this.top=i-.5*this.height,this.initContextForDraw(t,r),vO(t,this.left,this.top,this.width,this.height),this.performFill(t,r),this.updateBoundingBox(e,i,t,n,o),this.labelModule.draw(t,e,i,n,o)}},{key:"distanceToBorder",value:function(t,e){t&&this.resize(t);var i=.5*this.width,n=.5*this.height,o=Math.sin(e)*i,r=Math.cos(e)*n;return i*n/Math.sqrt(o*o+r*r)}}]),o}(hx);function ZS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var wx=function(t){FS(o,t);var e,i,n=(e=o,i=ZS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i))._setMargins(i),r}return EO(o,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,n,o,r){var s=this;return this.resize(t,n,o),this.options.icon.size=this.options.icon.size||50,this.left=e-this.width/2,this.top=i-this.height/2,this._icon(t,e,i,n,o,r),{drawExternalLabel:function(){if(void 0!==s.options.label){s.labelModule.draw(t,s.left+s.iconSize.width/2+s.margin.left,i+s.height/2+5,n)}s.updateBoundingBox(e,i)}}}},{key:"updateBoundingBox",value:function(t,e){if(this.boundingBox.top=e-.5*this.options.icon.size,this.boundingBox.left=t-.5*this.options.icon.size,this.boundingBox.right=t+.5*this.options.icon.size,this.boundingBox.bottom=e+.5*this.options.icon.size,void 0!==this.options.label&&this.labelModule.size.width>0){this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5)}}},{key:"_icon",value:function(t,e,i,n,o,r){var s=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=[null!=this.options.icon.weight?this.options.icon.weight:n?"bold":"",(null!=this.options.icon.weight&&n?5:0)+s+"px",this.options.icon.face].join(" "),t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t,r),t.fillText(this.options.icon.code,e,i),this.disableShadow(t,r)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(hx);function QS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var xx=function(t){FS(o,t);var e,i,n=(e=o,i=QS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i,r,s){var a;return bO(this,o),(a=n.call(this,t,e,i)).setImages(r,s),a}return EO(o,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var n=2*this.options.size;return this.width=n,void(this.height=n)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,n,o,r){t.save(),this.switchImages(n),this.resize();var s=e,a=i;if("top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=e,this.top=i,s+=this.width/2,a+=this.height/2):(this.left=e-this.width/2,this.top=i-this.height/2),!0===this.options.shapeProperties.useBorderWithImage){var l=this.options.borderWidth,h=this.options.borderWidthSelected||2*this.options.borderWidth,d=(n?h:l)/this.body.view.scale;t.lineWidth=Math.min(this.width,d),t.beginPath();var c=n?this.options.color.highlight.border:o?this.options.color.hover.border:this.options.color.border,u=n?this.options.color.highlight.background:o?this.options.color.hover.background:this.options.color.background;void 0!==r.opacity&&(c=UC(c,r.opacity),u=UC(u,r.opacity)),t.strokeStyle=c,t.fillStyle=u,t.rect(this.left-.5*t.lineWidth,this.top-.5*t.lineWidth,this.width+t.lineWidth,this.height+t.lineWidth),bg(t).call(t),this.performStroke(t,r),t.closePath()}this._drawImageAtPosition(t,r),this._drawImageLabel(t,s,a,n,o),this.updateBoundingBox(e,i),t.restore()}},{key:"updateBoundingBox",value:function(t,e){this.resize(),"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=t,this.top=e):(this.left=t-this.width/2,this.top=e-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(cx);function JS(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var _x=function(t){FS(o,t);var e,i,n=(e=o,i=JS(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){return this._drawShape(t,"square",2,e,i,n,o,r)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(px);function tT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var kx=function(t){FS(o,t);var e,i,n=(e=o,i=tT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){return this._drawShape(t,"hexagon",4,e,i,n,o,r)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(px);function eT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var Ex=function(t){FS(o,t);var e,i,n=(e=o,i=eT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){return this._drawShape(t,"star",4,e,i,n,o,r)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(px);function iT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var Ox=function(t){FS(o,t);var e,i,n=(e=o,i=iT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i))._setMargins(i),r}return EO(o,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.textSize=this.labelModule.getTextSize(t,e,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,n,o,r){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this.enableShadow(t,r),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,o),this.disableShadow(t,r),this.updateBoundingBox(e,i,t,n,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(hx);function nT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var Cx=function(t){FS(o,t);var e,i,n=(e=o,i=nT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){return this._drawShape(t,"triangle",3,e,i,n,o,r)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(px);function oT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var Sx=function(t){FS(o,t);var e,i,n=(e=o,i=oT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"draw",value:function(t,e,i,n,o,r){return this._drawShape(t,"triangleDown",3,e,i,n,o,r)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),o}(px);function rT(t,e){var i=Tf(t);if(Rb){var n=Rb(t);e&&(n=nv(n).call(n,(function(e){return Gb(t,e).enumerable}))),i.push.apply(i,n)}return i}function sT(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?Vf(i=rT(Object(o),!0)).call(i,(function(e){PS(t,e,o[e])})):tw?aw(t,tw(o)):Vf(n=rT(Object(o))).call(n,(function(e){lw(t,e,Gb(o,e))}))}return t}var Tx=function(){function t(e,i,n,o,r,s){bO(this,t),this.options=tS(r),this.globalOptions=r,this.defaultOptions=s,this.body=i,this.edges=[],this.id=void 0,this.imagelist=n,this.grouplist=o,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new Lw(this.body,this.options,!1),this.setOptions(e)}return EO(t,[{key:"attachEdge",value:function(t){var e;-1===zv(e=this.edges).call(e,t)&&this.edges.push(t)}},{key:"detachEdge",value:function(t){var e,i,n=zv(e=this.edges).call(e,t);-1!=n&&kp(i=this.edges).call(i,n,1)}},{key:"setOptions",value:function(e){var i=this.options.shape;if(e){if(void 0!==e.color&&(this._localColor=e.color),void 0!==e.id&&(this.id=e.id),void 0===this.id)throw new Error("Node must have an id");t.checkMass(e,this.id),void 0!==e.x&&(null===e.x?(this.x=void 0,this.predefinedPosition=!1):(this.x=Ov(e.x),this.predefinedPosition=!0)),void 0!==e.y&&(null===e.y?(this.y=void 0,this.predefinedPosition=!1):(this.y=Ov(e.y),this.predefinedPosition=!0)),void 0!==e.size&&(this.baseSize=e.size),void 0!==e.value&&(e.value=bw(e.value)),t.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var n=[e,this.options,this.defaultOptions];return this.chooser=IS("node",n),this._load_images(),this.updateLabelModule(e),void 0!==e.opacity&&t.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(i),void 0!==e.hidden||void 0!==e.physics}}},{key:"_load_images",value:function(){if(("circularImage"===this.options.shape||"image"===this.options.shape)&&void 0===this.options.image)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(void 0!==this.options.image){if(void 0===this.imagelist)throw new Error("Internal Error: No images provided");if("string"==typeof this.options.image)this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(void 0===this.options.image.unselected)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),void 0!==this.options.image.selected?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var t={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?!0===this.chooser?this.selected?(null!=this.options.borderWidthSelected?t.borderWidth=this.options.borderWidthSelected:t.borderWidth*=2,t.color=this.options.color.highlight.background,t.borderColor=this.options.color.highlight.border,t.shadow=this.options.shadow.enabled):this.hover&&(t.color=this.options.color.hover.background,t.borderColor=this.options.color.hover.border,t.shadow=this.options.shadow.enabled):"function"==typeof this.chooser&&(this.chooser(t,this.options.id,this.selected,this.hover),!1===t.shadow&&(t.shadowColor===this.options.shadow.color&&t.shadowSize===this.options.shadow.size&&t.shadowX===this.options.shadow.x&&t.shadowY===this.options.shadow.y||(t.shadow=!0))):t.shadow=this.options.shadow.enabled,void 0!==this.options.opacity){var e=this.options.opacity;t.borderColor=UC(t.borderColor,e),t.color=UC(t.color,e),t.shadowColor=UC(t.shadowColor,e)}return t}},{key:"updateLabelModule",value:function(e){void 0!==this.options.label&&null!==this.options.label||(this.options.label=""),t.updateGroupOptions(this.options,sT(sT({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var i=this.grouplist.get(this.options.group,!1),n=[e,this.options,i,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(t){if(t===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new dx(this.options,this.body,this.labelModule);break;case"circle":this.shape=new ux(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new fx(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new vx(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new gx(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new yx(this.options,this.body,this.labelModule);break;case"dot":this.shape=new mx(this.options,this.body,this.labelModule);break;case"ellipse":default:this.shape=new bx(this.options,this.body,this.labelModule);break;case"icon":this.shape=new wx(this.options,this.body,this.labelModule);break;case"image":this.shape=new xx(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new _x(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new kx(this.options,this.body,this.labelModule);break;case"star":this.shape=new Ex(this.options,this.body,this.labelModule);break;case"text":this.shape=new Ox(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Cx(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Sx(this.options,this.body,this.labelModule)}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(t,e){return this.shape.distanceToBorder(t,e)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(t,e,i){if(void 0!==this.options.value){var n=this.options.scaling.customScalingFunction(t,e,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var r=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*r}this.options.size=this.options.scaling.min+n*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(t){var e=this.getFormattingValues();return this.shape.draw(t,this.x,this.y,this.selected,this.hover,e)||{}}},{key:"updateBoundingBox",value:function(t){this.shape.updateBoundingBox(this.x,this.y,t)}},{key:"resize",value:function(t){var e=this.getFormattingValues();this.shape.resize(t,this.selected,this.hover,e)}},{key:"getItemsOnPoint",value:function(t){var e=[];return this.labelModule.visible()&&MS(this.labelModule.getSize(),t)&&e.push({nodeId:this.id,labelId:0}),MS(this.shape.boundingBox,t)&&e.push({nodeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){return this.shape.left<t.right&&this.shape.left+this.shape.width>t.left&&this.shape.top<t.bottom&&this.shape.top+this.shape.height>t.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.left<t.right&&this.shape.boundingBox.right>t.left&&this.shape.boundingBox.top<t.bottom&&this.shape.boundingBox.bottom>t.top}}],[{key:"checkOpacity",value:function(t){return 0<=t&&t<=1}},{key:"checkCoordinateOrigin",value:function(t){return void 0===t||"center"===t||"top-left"===t}},{key:"updateGroupOptions",value:function(e,i,n){var o;if(void 0!==n){var r=e.group;if(void 0!==i&&void 0!==i.group&&r!==i.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof r||"string"==typeof r&&""!=r){var s=n.get(r);void 0!==s.opacity&&void 0===i.opacity&&(t.checkOpacity(s.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+s.opacity),s.opacity=void 0));var a=nv(o=Ow(i)).call(o,(function(t){return null!=i[t]}));a.push("font"),jC(a,e,s),e.color=YC(e.color)}}}},{key:"parseOptions",value:function(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4?arguments[4]:void 0;if(jC(["color","fixed","shadow"],e,i,n),t.checkMass(i),void 0!==e.opacity&&(t.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),void 0!==i.opacity&&(t.checkOpacity(i.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+i.opacity),i.opacity=void 0)),i.shapeProperties&&!t.checkCoordinateOrigin(i.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+i.shapeProperties.coordinateOrigin),eS(e,i,"shadow",o),void 0!==i.color&&null!==i.color){var s=YC(i.color);zC(e.color,s)}else!0===n&&null===i.color&&(e.color=tS(o.color));void 0!==i.fixed&&null!==i.fixed&&("boolean"==typeof i.fixed?(e.fixed.x=i.fixed,e.fixed.y=i.fixed):(void 0!==i.fixed.x&&"boolean"==typeof i.fixed.x&&(e.fixed.x=i.fixed.x),void 0!==i.fixed.y&&"boolean"==typeof i.fixed.y&&(e.fixed.y=i.fixed.y))),!0===n&&null===i.font&&(e.font=tS(o.font)),t.updateGroupOptions(e,i,r),void 0!==i.scaling&&eS(e.scaling,i.scaling,"label",o.scaling)}},{key:"checkMass",value:function(t,e){if(void 0!==t.mass&&t.mass<=0){var i="";void 0!==e&&(i=" in node id: "+e),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",Ly),t.mass=1}}}]),t}();function aT(t,e){var i=void 0!==of&&pl(t)||t["@@iterator"];if(!i){if(mf(t)||(i=lT(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function lT(t,e){var i;if(t){if("string"==typeof t)return hT(t,e);var n=cf(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Xa(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hT(t,e):void 0}}function hT(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var Px=function(){function t(e,i,n,o){var r,s=this;if(bO(this,t),this.body=e,this.images=i,this.groups=n,this.layoutEngine=o,this.body.functions.createNode=Yn(r=this.create).call(r,this),this.nodesListeners={add:function(t,e){s.add(e.items)},update:function(t,e){s.update(e.items,e.data,e.oldData)},remove:function(t,e){s.remove(e.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,n){if(e===t)return.5;var o=1/(e-t);return Math.max(0,(n-t)*o)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=tS(this.defaultOptions),this.bindEventListeners()}return EO(t,[{key:"bindEventListeners",value:function(){var t,e,i=this;this.body.emitter.on("refreshNodes",Yn(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",Yn(e=this.refresh).call(e,this)),this.body.emitter.on("destroy",(function(){WC(i.nodesListeners,(function(t,e){i.body.data.nodes&&i.body.data.nodes.off(e,t)})),delete i.body.functions.createNode,delete i.nodesListeners.add,delete i.nodesListeners.update,delete i.nodesListeners.remove,delete i.nodesListeners}))}},{key:"setOptions",value:function(t){if(void 0!==t){if(Tx.parseOptions(this.options,t),void 0!==t.opacity&&(Tb(t.opacity)||!Mb(t.opacity)||t.opacity<0||t.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity):this.options.opacity=t.opacity),void 0!==t.shape)for(var e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].updateShape();if(void 0!==t.font||void 0!==t.widthConstraint||void 0!==t.heightConstraint)for(var i=0,n=Tf(this.body.nodes);i<n.length;i++){var o=n[i];this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh()}if(void 0!==t.size)for(var r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.body.nodes[r].needsRefresh();void 0===t.hidden&&void 0===t.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.data.nodes;if((0,r.L2)("id",t))this.body.data.nodes=t;else if(mf(t))this.body.data.nodes=new r.qg,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new r.qg}if(i&&WC(this.nodesListeners,(function(t,e){i.off(e,t)})),this.body.nodes={},this.body.data.nodes){var n=this;WC(this.nodesListeners,(function(t,e){n.body.data.nodes.on(e,t)}));var o=this.body.data.nodes.getIds();this.add(o,!0)}!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],o=0;o<t.length;o++){e=t[o];var r=this.body.data.nodes.get(e),s=this.create(r);n.push(s),this.body.nodes[e]=s}this.layoutEngine.positionInitially(n),!1===i&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(t,e,i){for(var n=this.body.nodes,o=!1,r=0;r<t.length;r++){var s=t[r],a=n[s],l=e[r];void 0!==a?a.setOptions(l)&&(o=!0):(o=!0,a=this.create(l),n[s]=a)}o||void 0===i||(o=jb(e).call(e,(function(t,e){var n=i[e];return n&&n.level!==t.level}))),!0===o?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(t){for(var e=this.body.nodes,i=0;i<t.length;i++){delete e[t[i]]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(t){return new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tx)(t,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];WC(this.body.nodes,(function(i,n){var o=t.body.data.nodes.get(n);void 0!==o&&(!0===e&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(o))}))}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(!0===mf(t)){for(var i=0;i<t.length;i++)if(void 0!==this.body.nodes[t[i]]){var n=this.body.nodes[t[i]];e[t[i]]={x:Math.round(n.x),y:Math.round(n.y)}}}else if(void 0!==this.body.nodes[t]){var o=this.body.nodes[t];e[t]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var r=0;r<this.body.nodeIndices.length;r++){var s=this.body.nodes[this.body.nodeIndices[r]];e[this.body.nodeIndices[r]]={x:Math.round(s.x),y:Math.round(s.y)}}return e}},{key:"getPosition",value:function(t){if(null==t)throw new TypeError("No id was specified for getPosition method.");if(null==this.body.nodes[t])throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(t));return{x:Math.round(this.body.nodes[t].x),y:Math.round(this.body.nodes[t].y)}}},{key:"storePositions",value:function(){var t,e=[],i=this.body.data.nodes.getDataSet(),n=aT(i.get());try{for(n.s();!(t=n.n()).done;){var o=t.value,r=o.id,s=this.body.nodes[r],a=Math.round(s.x),l=Math.round(s.y);o.x===a&&o.y===l||e.push({id:r,x:a,y:l})}}catch(h){n.e(h)}finally{n.f()}i.update(e)}},{key:"getBoundingBox",value:function(t){if(void 0!==this.body.nodes[t])return this.body.nodes[t].shape.boundingBox}},{key:"getConnectedNodes",value:function(t,e){var i=[];if(void 0!==this.body.nodes[t])for(var n=this.body.nodes[t],o={},r=0;r<n.edges.length;r++){var s=n.edges[r];"to"!==e&&s.toId==n.id?void 0===o[s.fromId]&&(i.push(s.fromId),o[s.fromId]=!0):"from"!==e&&s.fromId==n.id&&void 0===o[s.toId]&&(i.push(s.toId),o[s.toId]=!0)}return i}},{key:"getConnectedEdges",value:function(t){var e=[];if(void 0!==this.body.nodes[t])for(var i=this.body.nodes[t],n=0;n<i.edges.length;n++)e.push(i.edges[n].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",t);return e}},{key:"moveNode",value:function(t,e,i){var n=this;void 0!==this.body.nodes[t]?(this.body.nodes[t].x=Number(e),this.body.nodes[t].y=Number(i),lg((function(){n.body.emitter.emit("startSimulation")}),0)):console.error("Node id supplied to moveNode does not exist. Provided: ",t)}}]),t}(),Ix=ne,Mx=N,Dx=rt,Ax=ai,Bx=function(t){return void 0!==t&&(Ix(t,"value")||Ix(t,"writable"))},Fx=A,zx=Tr;function dT(t,e){var i,n,o=arguments.length<3?t:arguments[2];return Ax(t)===o?t[e]:(i=Fx.f(t,e))?Bx(i)?i.value:void 0===i.get?void 0:Mx(i.get,o):Dx(n=zx(t))?dT(n,e,o):void 0}Ai({target:"Reflect",stat:!0},{get:dT});var Nx=aO(st.Reflect.get),jx=aO($b);function cT(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jS(t)););return t}function uT(){var t;"undefined"!=typeof Reflect&&Nx?uT=ax(t=Nx).call(t):uT=function(t,e,i){var n=cT(t,e);if(n){var o=jx(n,e);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return uT.apply(this,arguments)}var Rx=Ai,Lx=Math.hypot,Hx=Math.abs,Wx=Math.sqrt;Rx({target:"Math",stat:!0,arity:2,forced:!!Lx&&Lx(1/0,NaN)!==1/0},{hypot:function(t,e){for(var i,n,o=0,r=0,s=arguments.length,a=0;r<s;)a<(i=Hx(arguments[r++]))?(o=o*(n=a/i)*n+1,a=i):o+=i>0?(n=i/a)*n:i;return a===1/0?1/0:a*Wx(o)}});var qx=aO(st.Math.hypot);function fT(t){var e=pT();return function(){var i,n=jS(t);if(e){var o=jS(this).constructor;i=ox(n,arguments,o)}else i=n.apply(this,arguments);return NS(this,i)}}function pT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var Ux=function(){function t(){bO(this,t)}return EO(t,null,[{key:"transform",value:function(t,e){mf(t)||(t=[t]);for(var i=e.point.x,n=e.point.y,o=e.angle,r=e.length,s=0;s<t.length;++s){var a=t[s],l=a.x*Math.cos(o)-a.y*Math.sin(o),h=a.x*Math.sin(o)+a.y*Math.cos(o);a.x=i+r*l,a.y=n+r*h}}},{key:"drawPath",value:function(t,e){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var i=1;i<e.length;++i)t.lineTo(e[i].x,e[i].y);t.closePath()}}]),t}(),Vx=function(t){FS(i,t);var e=fT(i);function i(){return bO(this,i),e.apply(this,arguments)}return EO(i,null,[{key:"draw",value:function(t,e){if(e.image){t.save(),t.translate(e.point.x,e.point.y),t.rotate(Math.PI/2+e.angle);var i=null!=e.imageWidth?e.imageWidth:e.image.width,n=null!=e.imageHeight?e.imageHeight:e.image.height;e.image.drawImageAtPosition(t,1,-i/2,0,i,n),t.restore()}return!1}}]),i}(Ux),Yx=function(t){FS(i,t);var e=fT(i);function i(){return bO(this,i),e.apply(this,arguments)}return EO(i,null,[{key:"draw",value:function(t,e){var i=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),i}(Ux),Xx=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),t}(),$x=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i={x:-.4,y:0};Ux.transform(i,e),t.strokeStyle=t.fillStyle,t.fillStyle="rgba(0, 0, 0, 0)";var n=Math.PI,o=e.angle-n/2,r=e.angle+n/2;return t.beginPath(),t.arc(i.x,i.y,.4*e.length,o,r,!1),t.stroke(),!0}}]),t}(),Gx=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i={x:-.3,y:0};Ux.transform(i,e),t.strokeStyle=t.fillStyle,t.fillStyle="rgba(0, 0, 0, 0)";var n=Math.PI,o=e.angle+n/2,r=e.angle+3*n/2;return t.beginPath(),t.arc(i.x,i.y,.4*e.length,o,r,!1),t.stroke(),!0}}]),t}(),Kx=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),t}(),Zx=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),t}(),Qx=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i={x:-.4,y:0};return Ux.transform(i,e),lO(t,i.x,i.y,.4*e.length),!0}}]),t}(),Jx=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),t}(),t_=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),t}(),e_=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),t}(),i_=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Ux.transform(i,e),Ux.drawPath(t,i),!0}}]),t}(),n_=function(){function t(){bO(this,t)}return EO(t,null,[{key:"draw",value:function(t,e){var i;switch(e.type&&(i=e.type.toLowerCase()),i){case"image":return Vx.draw(t,e);case"circle":return Qx.draw(t,e);case"box":return t_.draw(t,e);case"crow":return Xx.draw(t,e);case"curve":return $x.draw(t,e);case"diamond":return e_.draw(t,e);case"inv_curve":return Gx.draw(t,e);case"triangle":return Kx.draw(t,e);case"inv_triangle":return Zx.draw(t,e);case"bar":return Jx.draw(t,e);case"vee":return i_.draw(t,e);default:return Yx.draw(t,e)}}}]),t}();function vT(t,e){var i=Tf(t);if(Rb){var n=Rb(t);e&&(n=nv(n).call(n,(function(e){return Gb(t,e).enumerable}))),i.push.apply(i,n)}return i}function gT(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?Vf(i=vT(Object(o),!0)).call(i,(function(e){PS(t,e,o[e])})):tw?aw(t,tw(o)):Vf(n=vT(Object(o))).call(n,(function(e){lw(t,e,Gb(o,e))}))}return t}var o_=function(){function t(e,i,n){bO(this,t),this._body=i,this._labelModule=n,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}return EO(t,[{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(t){this.options=t,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(t,e,i,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getViaNode();t.strokeStyle=this.getColor(t,e),t.lineWidth=e.width,!1!==e.dashes?this._drawDashedLine(t,e,o):this._drawLine(t,e,o)}},{key:"_drawLine",value:function(t,e,i,n,o){if(this.from!=this.to)this._line(t,e,i,n,o);else{var r=IO(this._getCircleData(t),3),s=r[0],a=r[1],l=r[2];this._circle(t,e,s,a,l)}}},{key:"_drawDashedLine",value:function(t,e,i,n,o){t.lineCap="round";var r=mf(e.dashes)?e.dashes:[5,5];if(void 0!==t.setLineDash){if(t.save(),t.setLineDash(r),t.lineDashOffset=0,this.from!=this.to)this._line(t,e,i);else{var s=IO(this._getCircleData(t),3),a=s[0],l=s[1],h=s[2];this._circle(t,e,a,l,h)}t.setLineDash([0]),t.lineDashOffset=0,t.restore()}else{if(this.from!=this.to)yO(t,this.from.x,this.from.y,this.to.x,this.to.y,r);else{var d=IO(this._getCircleData(t),3),c=d[0],u=d[1],f=d[2];this._circle(t,e,c,u,f)}this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}}},{key:"findBorderPosition",value:function(t,e,i){return this.from!=this.to?this._findBorderPosition(t,e,i):this._findBorderPositionCircle(t,e,i)}},{key:"findBorderPositions",value:function(t){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,t),to:this._findBorderPosition(this.to,t)};var e,i=IO(cf(e=this._getCircleData(t)).call(e,0,2),2),n=i[0],o=i[1];return{from:this._findBorderPositionCircle(this.from,t,{x:n,y:o,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,t,{x:n,y:o,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(t){var e=this.options.selfReference.size;void 0!==t&&void 0===this.from.shape.width&&this.from.shape.resize(t);var i=AS(t,this.options.selfReference.angle,e,this.from);return[i.x,i.y,e]}},{key:"_pointOnCircle",value:function(t,e,i,n){var o=2*n*Math.PI;return{x:t+i*Math.cos(o),y:e-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){var n,o=i.x,r=i.y,s=i.low,a=i.high,l=i.direction,h=this.options.selfReference.size,d=.5*(s+a),c=0;!0===this.options.arrowStrikethrough&&(-1===l?c=this.options.endPointOffset.from:1===l&&(c=this.options.endPointOffset.to));var u=0;do{d=.5*(s+a),n=this._pointOnCircle(o,r,h,d);var f=Math.atan2(t.y-n.y,t.x-n.x),p=t.distanceToBorder(e,f)+c-Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2));if(Math.abs(p)<.05)break;p>0?l>0?s=d:a=d:l>0?a=d:s=d,++u}while(s<=a&&u<10);return gT(gT({},n),{},{t:d})}},{key:"getLineWidth",value:function(t,e){return!0===t?Math.max(this.selectionWidth,.3/this._body.view.scale):!0===e?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(t,e){if(!1!==e.inheritsColor){if("both"===e.inheritsColor&&this.from.id!==this.to.id){var i=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),n=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return!1===this.from.selected&&!1===this.to.selected?(n=UC(this.from.options.color.border,e.opacity),o=UC(this.to.options.color.border,e.opacity)):!0===this.from.selected&&!1===this.to.selected?o=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(n=this.from.options.color.border),i.addColorStop(0,n),i.addColorStop(1,o),i}return"to"===e.inheritsColor?UC(this.to.options.color.border,e.opacity):UC(this.from.options.color.border,e.opacity)}return UC(e.color,e.opacity)}},{key:"_circle",value:function(t,e,i,n,o){this.enableShadow(t,e);var r=0,s=2*Math.PI;if(!this.options.selfReference.renderBehindTheNode){var a=this.options.selfReference.angle,l=this.options.selfReference.angle+Math.PI,h=this._findBorderPositionCircle(this.from,t,{x:i,y:n,low:a,high:l,direction:-1}),d=this._findBorderPositionCircle(this.from,t,{x:i,y:n,low:a,high:l,direction:1});r=Math.atan2(h.y-n,h.x-i),s=Math.atan2(d.y-n,d.x-i)}t.beginPath(),t.arc(i,n,o,r,s,!1),t.stroke(),this.disableShadow(t,e)}},{key:"getDistanceToEdge",value:function(t,e,i,n,o,r){if(this.from!=this.to)return this._getDistanceToEdge(t,e,i,n,o,r);var s=IO(this._getCircleData(void 0),3),a=s[0],l=s[1],h=s[2],d=a-o,c=l-r;return Math.abs(Math.sqrt(d*d+c*c)-h)}},{key:"_getDistanceToLine",value:function(t,e,i,n,o,r){var s=i-t,a=n-e,l=((o-t)*s+(r-e)*a)/(s*s+a*a);l>1?l=1:l<0&&(l=0);var h=t+l*s-o,d=e+l*a-r;return Math.sqrt(h*h+d*d)}},{key:"getArrowData",value:function(t,e,i,n,o,r){var s,a,l,h,d,c,u,f=r.width;"from"===e?(l=this.from,h=this.to,d=r.fromArrowScale<0,c=Math.abs(r.fromArrowScale),u=r.fromArrowType):"to"===e?(l=this.to,h=this.from,d=r.toArrowScale<0,c=Math.abs(r.toArrowScale),u=r.toArrowType):(l=this.to,h=this.from,d=r.middleArrowScale<0,c=Math.abs(r.middleArrowScale),u=r.middleArrowType);var p=15*c+3*f;if(l!=h){var v=p/qx(l.x-h.x,l.y-h.y);if("middle"!==e)if(!0===this.options.smooth.enabled){var g=this._findBorderPosition(l,t,{via:i}),y=this.getPoint(g.t+v*("from"===e?1:-1),i);s=Math.atan2(g.y-y.y,g.x-y.x),a=g}else s=Math.atan2(l.y-h.y,l.x-h.x),a=this._findBorderPosition(l,t);else{var m=(d?-v:v)/2,b=this.getPoint(.5+m,i),w=this.getPoint(.5-m,i);s=Math.atan2(b.y-w.y,b.x-w.x),a=this.getPoint(.5,i)}}else{var x=IO(this._getCircleData(t),3),_=x[0],k=x[1],E=x[2];if("from"===e){var O=this.options.selfReference.angle,C=this.options.selfReference.angle+Math.PI,S=this._findBorderPositionCircle(this.from,t,{x:_,y:k,low:O,high:C,direction:-1});s=-2*S.t*Math.PI+1.5*Math.PI+.1*Math.PI,a=S}else if("to"===e){var T=this.options.selfReference.angle,P=this.options.selfReference.angle+Math.PI,I=this._findBorderPositionCircle(this.from,t,{x:_,y:k,low:T,high:P,direction:1});s=-2*I.t*Math.PI+1.5*Math.PI-1.1*Math.PI,a=I}else{var M=this.options.selfReference.angle/(2*Math.PI);a=this._pointOnCircle(_,k,E,M),s=-2*M*Math.PI+1.5*Math.PI+.1*Math.PI}}return{point:a,core:{x:a.x-.9*p*Math.cos(s),y:a.y-.9*p*Math.sin(s)},angle:s,length:p,type:u}}},{key:"drawArrowHead",value:function(t,e,i,n,o){t.strokeStyle=this.getColor(t,e),t.fillStyle=t.strokeStyle,t.lineWidth=e.width,n_.draw(t,o)&&(this.enableShadow(t,e),bg(t).call(t),this.disableShadow(t,e))}},{key:"enableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}},{key:"drawBackground",value:function(t,e){if(!1!==e.background){var i={strokeStyle:t.strokeStyle,lineWidth:t.lineWidth,dashes:t.dashes};t.strokeStyle=e.backgroundColor,t.lineWidth=e.backgroundSize,this.setStrokeDashed(t,e.backgroundDashes),t.stroke(),t.strokeStyle=i.strokeStyle,t.lineWidth=i.lineWidth,t.dashes=i.dashes,this.setStrokeDashed(t,e.dashes)}}},{key:"setStrokeDashed",value:function(t,e){if(!1!==e)if(void 0!==t.setLineDash){var i=mf(e)?e:[5,5];t.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else void 0!==t.setLineDash?t.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),t}();function yT(t,e){var i=Tf(t);if(Rb){var n=Rb(t);e&&(n=nv(n).call(n,(function(e){return Gb(t,e).enumerable}))),i.push.apply(i,n)}return i}function mT(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?Vf(i=yT(Object(o),!0)).call(i,(function(e){PS(t,e,o[e])})):tw?aw(t,tw(o)):Vf(n=yT(Object(o))).call(n,(function(e){lw(t,e,Gb(o,e))}))}return t}function bT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var r_=function(t){FS(o,t);var e,i,n=(e=o,i=bT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"_findBorderPositionBezier",value:function(t,e){var i,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),r=!1,s=1,a=0,l=this.to,h=this.options.endPointOffset?this.options.endPointOffset.to:0;t.id===this.from.id&&(l=this.from,r=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),!1===this.options.arrowStrikethrough&&(h=0);var d=0;do{n=.5*(a+s),i=this.getPoint(n,o);var c=Math.atan2(l.y-i.y,l.x-i.x),u=l.distanceToBorder(e,c)+h-Math.sqrt(Math.pow(i.x-l.x,2)+Math.pow(i.y-l.y,2));if(Math.abs(u)<.2)break;u<0?!1===r?a=n:s=n:!1===r?s=n:a=n,++d}while(a<=s&&d<10);return mT(mT({},i),{},{t:n})}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,n,o,r,s){var a,l,h,d,c,u=1e9,f=t,p=e;for(l=1;l<10;l++)h=.1*l,d=Math.pow(1-h,2)*t+2*h*(1-h)*s.x+Math.pow(h,2)*i,c=Math.pow(1-h,2)*e+2*h*(1-h)*s.y+Math.pow(h,2)*n,l>0&&(u=(a=this._getDistanceToLine(f,p,d,c,o,r))<u?a:u),f=d,p=c;return u}},{key:"_bezierCurve",value:function(t,e,i,n){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),null!=i&&null!=i.x?null!=n&&null!=n.x?t.bezierCurveTo(i.x,i.y,n.x,n.y,this.toPoint.x,this.toPoint.y):t.quadraticCurveTo(i.x,i.y,this.toPoint.x,this.toPoint.y):t.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(t,e),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),o}(o_);function wT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var s_=function(t){FS(o,t);var e,i,n=(e=o,i=wT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i)).via=r.via,r._boundFunction=function(){r.positionBezierNode()},r._body.emitter.on("_repositionBezierNodes",r._boundFunction),r}return EO(o,[{key:"setOptions",value:function(t){uT(jS(o.prototype),"setOptions",this).call(this,t);var e=!1;this.options.physics!==t.physics&&(e=!0),this.options=t,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),!0===e&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],void 0===this.from||void 0===this.to||!1===this.options.physics||this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),void 0!==this.via&&(delete this._body.nodes[this.via.id],this.via=void 0,!0)}},{key:"setupSupportNode",value:function(){if(void 0===this.via){var t="edgeId:"+this.id,e=this._body.functions.createNode({id:t,shape:"circle",physics:!0,hidden:!0});this._body.nodes[t]=e,this.via=e,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){void 0!==this.via&&void 0!==this.from&&void 0!==this.to?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):void 0!==this.via&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(t,e,i){this._bezierCurve(t,e,i)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.via;if(this.from===this.to){var i=IO(this._getCircleData(),3),n=i[0],o=i[1],r=i[2],s=2*Math.PI*(1-t);return{x:n+r*Math.sin(s),y:o+r-r*(1-Math.cos(s))}}return{x:Math.pow(1-t,2)*this.fromPoint.x+2*t*(1-t)*e.x+Math.pow(t,2)*this.toPoint.x,y:Math.pow(1-t,2)*this.fromPoint.y+2*t*(1-t)*e.y+Math.pow(t,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,r){return this._getDistanceToBezierEdge(t,e,i,n,o,r,this.via)}}]),o}(r_);function xT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var a_=function(t){FS(o,t);var e,i,n=(e=o,i=xT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"_line",value:function(t,e,i){this._bezierCurve(t,e,i)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var t,e,i=this.options.smooth.roundness,n=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),r=Math.abs(this.from.y-this.to.y);if("discrete"===n||"diagonalCross"===n){var s,a;s=a=o<=r?i*r:i*o,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(a=-a);var l=this.from.x+s,h=this.from.y+a;return"discrete"===n&&(o<=r?l=o<i*r?this.from.x:l:h=r<i*o?this.from.y:h),{x:l,y:h}}if("straightCross"===n){var d=(1-i)*o,c=(1-i)*r;return o<=r?(d=0,this.from.y<this.to.y&&(c=-c)):(this.from.x<this.to.x&&(d=-d),c=0),{x:this.to.x+d,y:this.to.y+c}}if("horizontal"===n){var u=(1-i)*o;return this.from.x<this.to.x&&(u=-u),{x:this.to.x+u,y:this.from.y}}if("vertical"===n){var f=(1-i)*r;return this.from.y<this.to.y&&(f=-f),{x:this.from.x,y:this.to.y+f}}if("curvedCW"===n){o=this.to.x-this.from.x,r=this.from.y-this.to.y;var p=Math.sqrt(o*o+r*r),v=Math.PI,g=(Math.atan2(r,o)+(.5*i+.5)*v)%(2*v);return{x:this.from.x+(.5*i+.5)*p*Math.sin(g),y:this.from.y+(.5*i+.5)*p*Math.cos(g)}}if("curvedCCW"===n){o=this.to.x-this.from.x,r=this.from.y-this.to.y;var y=Math.sqrt(o*o+r*r),m=Math.PI,b=(Math.atan2(r,o)+(.5*-i+.5)*m)%(2*m);return{x:this.from.x+(.5*i+.5)*y*Math.sin(b),y:this.from.y+(.5*i+.5)*y*Math.cos(b)}}t=e=o<=r?i*r:i*o,this.from.x>this.to.x&&(t=-t),this.from.y>=this.to.y&&(e=-e);var w=this.from.x+t,x=this.from.y+e;return o<=r?w=this.from.x<=this.to.x?this.to.x<w?this.to.x:w:this.to.x>w?this.to.x:w:x=this.from.y>=this.to.y?this.to.y>x?this.to.y:x:this.to.y<x?this.to.y:x,{x:w,y:x}}},{key:"_findBorderPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,i.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,r){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,i,n,o,r,s)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=t;return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y}}}]),o}(r_);function _T(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var l_=function(t){FS(o,t);var e,i,n=(e=o,i=_T(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"_getDistanceToBezierEdge2",value:function(t,e,i,n,o,r,s,a){for(var l=1e9,h=t,d=e,c=[0,0,0,0],u=1;u<10;u++){var f=.1*u;c[0]=Math.pow(1-f,3),c[1]=3*f*Math.pow(1-f,2),c[2]=3*Math.pow(f,2)*(1-f),c[3]=Math.pow(f,3);var p=c[0]*t+c[1]*s.x+c[2]*a.x+c[3]*i,v=c[0]*e+c[1]*s.y+c[2]*a.y+c[3]*n;if(u>0){var g=this._getDistanceToLine(h,d,p,v,o,r);l=g<l?g:l}h=p,d=v}return l}}]),o}(r_);function kT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var h_=function(t){FS(o,t);var e,i,n=(e=o,i=kT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"_line",value:function(t,e,i){var n=i[0],o=i[1];this._bezierCurve(t,e,n,o)}},{key:"_getViaCoordinates",value:function(){var t,e,i,n,o=this.from.x-this.to.x,r=this.from.y-this.to.y,s=this.options.smooth.roundness;return(Math.abs(o)>Math.abs(r)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(e=this.from.y,n=this.to.y,t=this.from.x-s*o,i=this.to.x+s*o):(e=this.from.y-s*r,n=this.to.y+s*r,t=this.from.x,i=this.to.x),[{x:t,y:e},{x:i,y:n}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,r){var s=IO(arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),2),a=s[0],l=s[1];return this._getDistanceToBezierEdge2(t,e,i,n,o,r,a,l)}},{key:"getPoint",value:function(t){var e=IO(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),2),i=e[0],n=e[1],o=t,r=[Math.pow(1-o,3),3*o*Math.pow(1-o,2),3*Math.pow(o,2)*(1-o),Math.pow(o,3)];return{x:r[0]*this.fromPoint.x+r[1]*i.x+r[2]*n.x+r[3]*this.toPoint.x,y:r[0]*this.fromPoint.y+r[1]*i.y+r[2]*n.y+r[3]*this.toPoint.y}}}]),o}(l_);function ET(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var d_=function(t){FS(o,t);var e,i,n=(e=o,i=ET(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"_line",value:function(t,e){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){var i=this.to,n=this.from;t.id===this.from.id&&(i=this.from,n=this.to);var o=Math.atan2(i.y-n.y,i.x-n.x),r=i.x-n.x,s=i.y-n.y,a=Math.sqrt(r*r+s*s),l=(a-t.distanceToBorder(e,o))/a;return{x:(1-l)*n.x+l*i.x,y:(1-l)*n.y+l*i.y,t:0}}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,r){return this._getDistanceToLine(t,e,i,n,o,r)}}]),o}(o_),c_=function(){function t(e,i,n,o,r){if(bO(this,t),void 0===i)throw new Error("No body provided");this.options=tS(o),this.globalOptions=o,this.defaultOptions=r,this.body=i,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Lw(this.body,this.options,!0),this.setOptions(e)}return EO(t,[{key:"setOptions",value:function(e){if(e){var i=void 0!==e.physics&&this.options.physics!==e.physics||void 0!==e.hidden&&(this.options.hidden||!1)!==(e.hidden||!1)||void 0!==e.from&&this.options.from!==e.from||void 0!==e.to&&this.options.to!==e.to;t.parseOptions(this.options,e,!0,this.globalOptions),void 0!==e.id&&(this.id=e.id),void 0!==e.from&&(this.fromId=e.from),void 0!==e.to&&(this.toId=e.to),void 0!==e.title&&(this.title=e.title),void 0!==e.value&&(e.value=bw(e.value));var n=[e,this.options,this.defaultOptions];return this.chooser=IS("edge",n),this.updateLabelModule(e),i=this.updateEdgeType()||i,this._setInteractionWidths(),this.connect(),i}}},{key:"getFormattingValues",value:function(){var t=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,e=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,i=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,n=this.options.color.inherit,o={toArrow:t,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:e,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(!0===this.chooser){if(this.selected){var r=this.options.selectionWidth;"function"==typeof r?o.width=r(o.width):"number"==typeof r&&(o.width+=r),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var s=this.options.hoverWidth;"function"==typeof s?o.width=s(o.width):"number"==typeof s&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else"function"==typeof this.chooser&&(this.chooser(o,this.options.id,this.selected,this.hover),void 0!==o.color&&(o.inheritsColor=!1),!1===o.shadow&&(o.shadowColor===this.options.shadow.color&&o.shadowSize===this.options.shadow.size&&o.shadowX===this.options.shadow.x&&o.shadowY===this.options.shadow.y||(o.shadow=!0)));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(t){var e=[t,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var t=this.options.smooth,e=!1,i=!0;return void 0!==this.edgeType&&((this.edgeType instanceof s_&&!0===t.enabled&&"dynamic"===t.type||this.edgeType instanceof h_&&!0===t.enabled&&"cubicBezier"===t.type||this.edgeType instanceof a_&&!0===t.enabled&&"dynamic"!==t.type&&"cubicBezier"!==t.type||this.edgeType instanceof d_&&!1===t.type.enabled)&&(i=!1),!0===i&&(e=this.cleanup())),!0===i?!0===t.enabled?"dynamic"===t.type?(e=!0,this.edgeType=new s_(this.options,this.body,this.labelModule)):"cubicBezier"===t.type?this.edgeType=new h_(this.options,this.body,this.labelModule):this.edgeType=new a_(this.options,this.body,this.labelModule):this.edgeType=new d_(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),e}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(t,e,i){if(void 0!==this.options.value){var n=this.options.scaling.customScalingFunction(t,e,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var r=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*r}this.options.width=this.options.scaling.min+n*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var i=this.edgeType.getViaNode();this.edgeType.drawLine(t,e,this.selected,this.hover,i),this.drawLabel(t,i)}}},{key:"drawArrows",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,e.fromArrow&&(n.from=this.edgeType.getArrowData(t,"from",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.fromPoint=n.from.core),e.fromArrowSrc&&(n.from.image=this.imagelist.load(e.fromArrowSrc)),e.fromArrowImageWidth&&(n.from.imageWidth=e.fromArrowImageWidth),e.fromArrowImageHeight&&(n.from.imageHeight=e.fromArrowImageHeight)),e.toArrow&&(n.to=this.edgeType.getArrowData(t,"to",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.toPoint=n.to.core),e.toArrowSrc&&(n.to.image=this.imagelist.load(e.toArrowSrc)),e.toArrowImageWidth&&(n.to.imageWidth=e.toArrowImageWidth),e.toArrowImageHeight&&(n.to.imageHeight=e.toArrowImageHeight)),e.middleArrow&&(n.middle=this.edgeType.getArrowData(t,"middle",i,this.selected,this.hover,e),e.middleArrowSrc&&(n.middle.image=this.imagelist.load(e.middleArrowSrc)),e.middleArrowImageWidth&&(n.middle.imageWidth=e.middleArrowImageWidth),e.middleArrowImageHeight&&(n.middle.imageHeight=e.middleArrowImageHeight)),e.fromArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,n.from),e.middleArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,n.middle),e.toArrow&&this.edgeType.drawArrowHead(t,e,this.selected,this.hover,n.to)}}},{key:"drawLabel",value:function(t,e){if(void 0!==this.options.label){var i,n=this.from,o=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(t,this.selected,this.hover),n.id!=o.id){this.labelModule.pointToSelf=!1,i=this.edgeType.getPoint(.5,e),t.save();var r=this._getRotation(t);0!=r.angle&&(t.translate(r.x,r.y),t.rotate(r.angle)),this.labelModule.draw(t,i.x,i.y,this.selected,this.hover),t.restore()}else{this.labelModule.pointToSelf=!0;var s=AS(t,this.options.selfReference.angle,this.options.selfReference.size,n);i=this._pointOnCircle(s.x,s.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(t,i.x,i.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(t){var e=[];if(this.labelModule.visible()){var i=this._getRotation();MS(this.labelModule.getSize(),t,i)&&e.push({edgeId:this.id,labelId:0})}var n={left:t.x,top:t.y};return this.isOverlappingWith(n)&&e.push({edgeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=this.from.x,i=this.from.y,n=this.to.x,o=this.to.y,r=t.left,s=t.top;return this.edgeType.getDistanceToEdge(e,i,n,o,r,s)<10}return!1}},{key:"_getRotation",value:function(t){var e=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,e);void 0!==t&&this.labelModule.calculateLabelSize(t,this.selected,this.hover,i.x,i.y);var n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return n;if("horizontal"===this.options.font.align)return n;var o=this.from.y-this.to.y,r=this.from.x-this.to.x,s=Math.atan2(o,r);return(s<-1&&r<0||s>0&&r<0)&&(s+=Math.PI),n.angle=s,n}},{key:"_pointOnCircle",value:function(t,e,i,n){return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(NC(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],t,e,i),void 0!==e.endPointOffset&&void 0!==e.endPointOffset.from&&(Mb(e.endPointOffset.from)?t.endPointOffset.from=e.endPointOffset.from:(t.endPointOffset.from=void 0!==n.endPointOffset.from?n.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),void 0!==e.endPointOffset&&void 0!==e.endPointOffset.to&&(Mb(e.endPointOffset.to)?t.endPointOffset.to=e.endPointOffset.to:(t.endPointOffset.to=void 0!==n.endPointOffset.to?n.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),DS(e.label)?t.label=e.label:DS(t.label)||(t.label=void 0),eS(t,e,"smooth",n),eS(t,e,"shadow",n),eS(t,e,"background",n),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:!0===i&&null===e.dashes&&(t.dashes=Rv(n.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),eS(t.scaling,e.scaling,"label",n.scaling)):!0===i&&null===e.scaling&&(t.scaling=Rv(n.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var r=e.arrows.toLowerCase();t.arrows.to.enabled=-1!=zv(r).call(r,"to"),t.arrows.middle.enabled=-1!=zv(r).call(r,"middle"),t.arrows.from.enabled=-1!=zv(r).call(r,"from")}else{if("object"!==wO(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+qv(e.arrows));eS(t.arrows,e.arrows,"to",n.arrows),eS(t.arrows,e.arrows,"middle",n.arrows),eS(t.arrows,e.arrows,"from",n.arrows)}else!0===i&&null===e.arrows&&(t.arrows=Rv(n.arrows));if(void 0!==e.color&&null!==e.color){var s=AC(e.color)?{color:e.color,highlight:e.color,hover:e.color,inherit:!1,opacity:1}:e.color,a=t.color;if(o)RC(a,n.color,!1,i);else for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&delete a[l];if(AC(a))a.color=a,a.highlight=a,a.hover=a,a.inherit=!1,void 0===s.opacity&&(a.opacity=1);else{var h=!1;void 0!==s.color&&(a.color=s.color,h=!0),void 0!==s.highlight&&(a.highlight=s.highlight,h=!0),void 0!==s.hover&&(a.hover=s.hover,h=!0),void 0!==s.inherit&&(a.inherit=s.inherit),void 0!==s.opacity&&(a.opacity=Math.min(1,Math.max(0,s.opacity))),!0===h?a.inherit=!1:void 0===a.inherit&&(a.inherit="from")}}else!0===i&&null===e.color&&(t.color=tS(n.color));!0===i&&null===e.font&&(t.font=tS(n.font)),Object.prototype.hasOwnProperty.call(e,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),t.selfReference.size=e.selfReferenceSize)}}]),t}(),u_=function(){function t(e,i,n){var o,r=this;bO(this,t),this.body=e,this.images=i,this.groups=n,this.body.functions.createEdge=Yn(o=this.create).call(o,this),this.edgesListeners={add:function(t,e){r.add(e.items)},update:function(t,e){r.update(e.items)},remove:function(t,e){r.remove(e.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,n){if(e===t)return.5;var o=1/(e-t);return Math.max(0,(n-t)*o)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},RC(this.options,this.defaultOptions),this.bindEventListeners()}return EO(t,[{key:"bindEventListeners",value:function(){var t,e,i=this;this.body.emitter.on("_forceDisableDynamicCurves",(function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"dynamic"===t&&(t="continuous");var n=!1;for(var o in i.body.edges)if(Object.prototype.hasOwnProperty.call(i.body.edges,o)){var r=i.body.edges[o],s=i.body.data.edges.get(o);if(null!=s){var a=s.smooth;void 0!==a&&!0===a.enabled&&"dynamic"===a.type&&(void 0===t?r.setOptions({smooth:!1}):r.setOptions({smooth:{type:t}}),n=!0)}}!0===e&&!0===n&&i.body.emitter.emit("_dataChanged")})),this.body.emitter.on("_dataUpdated",(function(){i.reconnectEdges()})),this.body.emitter.on("refreshEdges",Yn(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",Yn(e=this.refresh).call(e,this)),this.body.emitter.on("destroy",(function(){WC(i.edgesListeners,(function(t,e){i.body.data.edges&&i.body.data.edges.off(e,t)})),delete i.body.functions.createEdge,delete i.edgesListeners.add,delete i.edgesListeners.update,delete i.edgesListeners.remove,delete i.edgesListeners}))}},{key:"setOptions",value:function(t){if(void 0!==t){c_.parseOptions(this.options,t,!0,this.defaultOptions,!0);var e=!1;if(void 0!==t.smooth)for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(e=this.body.edges[i].updateEdgeType()||e);if(void 0!==t.font)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&this.body.edges[n].updateLabelModule();void 0===t.hidden&&void 0===t.physics&&!0!==e||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.body.data.edges;if((0,r.L2)("id",t))this.body.data.edges=t;else if(mf(t))this.body.data.edges=new r.qg,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new r.qg}if(n&&WC(this.edgesListeners,(function(t,e){n.off(e,t)})),this.body.edges={},this.body.data.edges){WC(this.edgesListeners,(function(t,i){e.body.data.edges.on(i,t)}));var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===i&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,n=this.body.data.edges,o=0;o<t.length;o++){var r=t[o],s=i[r];s&&s.disconnect();var a=n.get(r,{showInternalIds:!0});i[r]=this.create(a)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(t){for(var e=this.body.edges,i=this.body.data.edges,n=!1,o=0;o<t.length;o++){var r=t[o],s=i.get(r),a=e[r];void 0!==a?(a.disconnect(),n=a.setOptions(s)||n,a.connect()):(this.body.edges[r]=this.create(s),n=!0)}!0===n?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0!==t.length){var i=this.body.edges;WC(t,(function(t){var e=i[t];void 0!==e&&e.remove()})),e&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var t=this;WC(this.body.edges,(function(e,i){var n=t.body.data.edges.get(i);void 0!==n&&e.setOptions(n)}))}},{key:"create",value:function(t){return new c_(t,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var t,e=this.body.nodes,i=this.body.edges;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t].edges=[]);for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var n=i[t];n.from=null,n.to=null,n.connect()}}},{key:"getConnectedNodes",value:function(t){var e=[];if(void 0!==this.body.edges[t]){var i=this.body.edges[t];void 0!==i.fromId&&e.push(i.fromId),void 0!==i.toId&&e.push(i.toId)}return e}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var t=this,e=[];WC(this.body.edges,(function(i,n){var o=t.body.nodes[i.toId],r=t.body.nodes[i.fromId];void 0!==o&&!0===o.isCluster||void 0!==r&&!0===r.isCluster||void 0!==o&&void 0!==r||e.push(n)})),this.remove(e,!1)}},{key:"_addMissingEdges",value:function(){var t=this.body.data.edges;if(null!=t){var e=this.body.edges,i=[];Vf(t).call(t,(function(t,n){void 0===e[n]&&i.push(n)})),this.add(i,!0)}}}]),t}(),f_=function(){function t(e,i,n){bO(this,t),this.body=e,this.physicsBody=i,this.barnesHutTree,this.setOptions(n),this._rng=CC("BARNES HUT SOLVER")}return EO(t,[{key:"setOptions",value:function(t){this.options=t,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(0!==this.options.gravitationalConstant&&this.physicsBody.physicsNodeIndices.length>0){var t,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,o=this._formBarnesHutTree(e,i);this.barnesHutTree=o;for(var r=0;r<n;r++)(t=e[i[r]]).options.mass>0&&this._getForceContributions(o.root,t)}}},{key:"_getForceContributions",value:function(t,e){this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=t.centerOfMass.x-e.x,n=t.centerOfMass.y-e.y,o=Math.sqrt(i*i+n*n);o*t.calcSize>this.thetaInversed?this._calculateForces(o,i,n,e,t):4===t.childrenCount?this._getForceContributions(t,e):t.children.data.id!=e.id&&this._calculateForces(o,i,n,e,t)}}},{key:"_calculateForces",value:function(t,e,i,n,o){0===t&&(e=t=.1),this.overlapAvoidanceFactor<1&&n.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,t-n.shape.radius));var r=this.options.gravitationalConstant*o.mass*n.options.mass/Math.pow(t,3),s=e*r,a=i*r;this.physicsBody.forces[n.id].x+=s,this.physicsBody.forces[n.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i,n=e.length,o=t[e[0]].x,r=t[e[0]].y,s=t[e[0]].x,a=t[e[0]].y,l=1;l<n;l++){var h=t[e[l]],d=h.x,c=h.y;h.options.mass>0&&(d<o&&(o=d),d>s&&(s=d),c<r&&(r=c),c>a&&(a=c))}var u=Math.abs(s-o)-Math.abs(a-r);u>0?(r-=.5*u,a+=.5*u):(o+=.5*u,s-=.5*u);var f=Math.max(1e-5,Math.abs(s-o)),p=.5*f,v=.5*(o+s),g=.5*(r+a),y={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:v-p,maxX:v+p,minY:g-p,maxY:g+p},size:f,calcSize:1/f,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(y.root);for(var m=0;m<n;m++)(i=t[e[m]]).options.mass>0&&this._placeInTree(y.root,i);return y}},{key:"_updateBranchMass",value:function(t,e){var i=t.centerOfMass,n=t.mass+e.options.mass,o=1/n;i.x=i.x*t.mass+e.x*e.options.mass,i.x*=o,i.y=i.y*t.mass+e.y*e.options.mass,i.y*=o,t.mass=n;var r=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidth<r?r:t.maxWidth}},{key:"_placeInTree",value:function(t,e,i){1==i&&void 0!==i||this._updateBranchMass(t,e);var n,o=t.children.NW.range;n=o.maxX>e.x?o.maxY>e.y?"NW":"SW":o.maxY>e.y?"NE":"SE",this._placeInRegion(t,e,n)}},{key:"_placeInRegion",value:function(t,e,i){var n=t.children[i];switch(n.childrenCount){case 0:n.children.data=e,n.childrenCount=1,this._updateBranchMass(n,e);break;case 1:n.children.data.x===e.x&&n.children.data.y===e.y?(e.x+=this._rng(),e.y+=this._rng()):(this._splitBranch(n),this._placeInTree(n,e));break;case 4:this._placeInTree(n,e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i,n,o,r,s=.5*t.size;switch(e){case"NW":i=t.range.minX,n=t.range.minX+s,o=t.range.minY,r=t.range.minY+s;break;case"NE":i=t.range.minX+s,n=t.range.maxX,o=t.range.minY,r=t.range.minY+s;break;case"SW":i=t.range.minX,n=t.range.minX+s,o=t.range.minY+s,r=t.range.maxY;break;case"SE":i=t.range.minX+s,n=t.range.maxX,o=t.range.minY+s,r=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:o,maxY:r},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}(),p_=function(){function t(e,i,n){bO(this,t),this._rng=CC("REPULSION SOLVER"),this.body=e,this.physicsBody=i,this.setOptions(n)}return EO(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i,n,o,r,s,a,l=this.body.nodes,h=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,c=this.options.nodeDistance,u=-2/3/c,f=4/3,p=0;p<h.length-1;p++){s=l[h[p]];for(var v=p+1;v<h.length;v++)t=(a=l[h[v]]).x-s.x,e=a.y-s.y,0===(i=Math.sqrt(t*t+e*e))&&(t=i=.1*this._rng()),i<2*c&&(r=i<.5*c?1:u*i+f,n=t*(r/=i),o=e*r,d[s.id].x-=n,d[s.id].y-=o,d[a.id].x+=n,d[a.id].y+=o)}}}]),t}(),v_=function(){function t(e,i,n){bO(this,t),this.body=e,this.physicsBody=i,this.setOptions(n)}return EO(t,[{key:"setOptions",value:function(t){this.options=t,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}},{key:"solve",value:function(){for(var t=this.body.nodes,e=this.physicsBody.physicsNodeIndices,i=this.physicsBody.forces,n=this.options.nodeDistance,o=0;o<e.length-1;o++)for(var r=t[e[o]],s=o+1;s<e.length;s++){var a=t[e[s]];if(r.level===a.level){var l=n+this.overlapAvoidanceFactor*((r.shape.radius||0)/2+(a.shape.radius||0)/2),h=a.x-r.x,d=a.y-r.y,c=Math.sqrt(h*h+d*d),u=void 0;u=c<l?-Math.pow(.05*c,2)+Math.pow(.05*l,2):0,0!==c&&(u/=c);var f=h*u,p=d*u;i[r.id].x-=f,i[r.id].y-=p,i[a.id].x+=f,i[a.id].y+=p}}}}]),t}(),g_=function(){function t(e,i,n){bO(this,t),this.body=e,this.physicsBody=i,this.setOptions(n)}return EO(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i,n,o,r=this.physicsBody.physicsEdgeIndices,s=this.body.edges,a=0;a<r.length;a++)!0===(e=s[r[a]]).connected&&e.toId!==e.fromId&&void 0!==this.body.nodes[e.toId]&&void 0!==this.body.nodes[e.fromId]&&(void 0!==e.edgeType.via?(t=void 0===e.options.length?this.options.springLength:e.options.length,i=e.to,n=e.edgeType.via,o=e.from,this._calculateSpringForce(i,n,.5*t),this._calculateSpringForce(n,o,.5*t)):(t=void 0===e.options.length?1.5*this.options.springLength:e.options.length,this._calculateSpringForce(e.from,e.to,t)))}},{key:"_calculateSpringForce",value:function(t,e,i){var n=t.x-e.x,o=t.y-e.y,r=Math.max(Math.sqrt(n*n+o*o),.01),s=this.options.springConstant*(i-r)/r,a=n*s,l=o*s;void 0!==this.physicsBody.forces[t.id]&&(this.physicsBody.forces[t.id].x+=a,this.physicsBody.forces[t.id].y+=l),void 0!==this.physicsBody.forces[e.id]&&(this.physicsBody.forces[e.id].x-=a,this.physicsBody.forces[e.id].y-=l)}}]),t}(),y_=function(){function t(e,i,n){bO(this,t),this.body=e,this.physicsBody=i,this.setOptions(n)}return EO(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i,n,o,r,s,a,l,h,d=this.body.edges,c=.5,u=this.physicsBody.physicsEdgeIndices,f=this.physicsBody.physicsNodeIndices,p=this.physicsBody.forces,v=0;v<f.length;v++){var g=f[v];p[g].springFx=0,p[g].springFy=0}for(var y=0;y<u.length;y++)!0===(e=d[u[y]]).connected&&(t=void 0===e.options.length?this.options.springLength:e.options.length,i=e.from.x-e.to.x,n=e.from.y-e.to.y,a=0===(a=Math.sqrt(i*i+n*n))?.01:a,o=i*(s=this.options.springConstant*(t-a)/a),r=n*s,e.to.level!=e.from.level?(void 0!==p[e.toId]&&(p[e.toId].springFx-=o,p[e.toId].springFy-=r),void 0!==p[e.fromId]&&(p[e.fromId].springFx+=o,p[e.fromId].springFy+=r)):(void 0!==p[e.toId]&&(p[e.toId].x-=c*o,p[e.toId].y-=c*r),void 0!==p[e.fromId]&&(p[e.fromId].x+=c*o,p[e.fromId].y+=c*r)));s=1;for(var m=0;m<f.length;m++){var b=f[m];l=Math.min(s,Math.max(-s,p[b].springFx)),h=Math.min(s,Math.max(-s,p[b].springFy)),p[b].x+=l,p[b].y+=h}for(var w=0,x=0,_=0;_<f.length;_++){var k=f[_];w+=p[k].x,x+=p[k].y}for(var E=w/f.length,O=x/f.length,C=0;C<f.length;C++){var S=f[C];p[S].x-=E,p[S].y-=O}}}]),t}(),m_=function(){function t(e,i,n){bO(this,t),this.body=e,this.physicsBody=i,this.setOptions(n)}return EO(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i,n,o=this.body.nodes,r=this.physicsBody.physicsNodeIndices,s=this.physicsBody.forces,a=0;a<r.length;a++){t=-(n=o[r[a]]).x,e=-n.y,i=Math.sqrt(t*t+e*e),this._calculateForces(i,t,e,s,n)}}},{key:"_calculateForces",value:function(t,e,i,n,o){var r=0===t?0:this.options.centralGravity/t;n[o.id].x=e*r,n[o.id].y=i*r}}]),t}();function OT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var b_=function(t){FS(o,t);var e,i,n=(e=o,i=OT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){var r;return bO(this,o),(r=n.call(this,t,e,i))._rng=CC("FORCE ATLAS 2 BASED REPULSION SOLVER"),r}return EO(o,[{key:"_calculateForces",value:function(t,e,i,n,o){0===t&&(e=t=.1*this._rng()),this.overlapAvoidanceFactor<1&&n.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,t-n.shape.radius));var r=n.edges.length+1,s=this.options.gravitationalConstant*o.mass*n.options.mass*r/Math.pow(t,2),a=e*s,l=i*s;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=l}}]),o}(f_);function CT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var w_=function(t){FS(o,t);var e,i,n=(e=o,i=CT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i){return bO(this,o),n.call(this,t,e,i)}return EO(o,[{key:"_calculateForces",value:function(t,e,i,n,o){if(t>0){var r=o.edges.length+1,s=this.options.centralGravity*r*o.options.mass;n[o.id].x=e*s,n[o.id].y=i*s}}}]),o}(m_),x_=function(){function t(e){bO(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},En(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return EO(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("initPhysics",(function(){t.initPhysics()})),this.body.emitter.on("_layoutFailed",(function(){t.layoutFailed=!0})),this.body.emitter.on("resetPhysics",(function(){t.stopSimulation(),t.ready=!1})),this.body.emitter.on("disablePhysics",(function(){t.physicsEnabled=!1,t.stopSimulation()})),this.body.emitter.on("restorePhysics",(function(){t.setOptions(t.options),!0===t.ready&&t.startSimulation()})),this.body.emitter.on("startSimulation",(function(){!0===t.ready&&t.startSimulation()})),this.body.emitter.on("stopSimulation",(function(){t.stopSimulation()})),this.body.emitter.on("destroy",(function(){t.stopSimulation(!1),t.body.emitter.off()})),this.body.emitter.on("_dataChanged",(function(){t.updatePhysicsData()}))}},{key:"setOptions",value:function(t){if(void 0!==t)if(!1===t)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(!0===t)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,jC(["stabilization"],this.options,t),eS(this.options,t,"stabilization"),void 0===t.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation());var e=this.options.wind;e&&(("number"!=typeof e.x||Tb(e.x))&&(e.x=0),("number"!=typeof e.y||Tb(e.y))&&(e.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var t;"forceAtlas2Based"===this.options.solver?(t=this.options.forceAtlas2Based,this.nodesSolver=new b_(this.body,this.physicsBody,t),this.edgesSolver=new g_(this.body,this.physicsBody,t),this.gravitySolver=new w_(this.body,this.physicsBody,t)):"repulsion"===this.options.solver?(t=this.options.repulsion,this.nodesSolver=new p_(this.body,this.physicsBody,t),this.edgesSolver=new g_(this.body,this.physicsBody,t),this.gravitySolver=new m_(this.body,this.physicsBody,t)):"hierarchicalRepulsion"===this.options.solver?(t=this.options.hierarchicalRepulsion,this.nodesSolver=new v_(this.body,this.physicsBody,t),this.edgesSolver=new y_(this.body,this.physicsBody,t),this.gravitySolver=new m_(this.body,this.physicsBody,t)):(t=this.options.barnesHut,this.nodesSolver=new f_(this.body,this.physicsBody,t),this.edgesSolver=new g_(this.body,this.physicsBody,t),this.gravitySolver=new m_(this.body,this.physicsBody,t)),this.modelOptions=t}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){var t;!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=Yn(t=this.simulationStep).call(t,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,!0===t&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,!0===t&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Df();this.physicsTick(),(Df()-t<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&lg((function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0}),0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}},{key:"physicsTick",value:function(){if(this._startStabilizing(),!0!==this.stabilized){if(!0===this.adaptiveTimestep&&!0===this.adaptiveTimestepEnabled)this.adaptiveCounter%this.adaptiveInterval==0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1;else this.timestep=this.options.timestep,this.physicsStep();!0===this.stabilized&&this.revert(),this.stabilizationIterations++}}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var t=this.body.nodes,e=this.body.edges;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&!0===t[i].options.physics&&this.physicsBody.physicsNodeIndices.push(t[i].id);for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&!0===e[n].options.physics&&this.physicsBody.physicsEdgeIndices.push(e[n].id);for(var o=0;o<this.physicsBody.physicsNodeIndices.length;o++){var r=this.physicsBody.physicsNodeIndices[o];this.physicsBody.forces[r]={x:0,y:0},void 0===this.physicsBody.velocities[r]&&(this.physicsBody.velocities[r]={x:0,y:0})}for(var s in this.physicsBody.velocities)void 0===t[s]&&delete this.physicsBody.velocities[s]}},{key:"revert",value:function(){var t=Tf(this.previousStates),e=this.body.nodes,i=this.physicsBody.velocities;this.referenceState={};for(var n=0;n<t.length;n++){var o=t[n];void 0!==e[o]?!0===e[o].options.physics&&(this.referenceState[o]={positions:{x:e[o].x,y:e[o].y}},i[o].x=this.previousStates[o].vx,i[o].y=this.previousStates[o].vy,e[o].x=this.previousStates[o].x,e[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var t,e,i=this.body.nodes,n=this.referenceState;for(var o in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,o)&&void 0!==i[o]&&(t=i[o].x-n[o].positions.x,e=i[o].y-n[o].positions.y,Math.sqrt(Math.pow(t,2)+Math.pow(e,2))>.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=0,i=0,n=0;n<t.length;n++){var o=t[n],r=this._performStep(o);e=Math.max(e,r),i+=r}this.adaptiveTimestepEnabled=i/t.length<5,this.stabilized=e<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(t,e,i){t+=(e-this.modelOptions.damping*t)/i*this.timestep;var n=this.options.maxVelocity||1e9;return Math.abs(t)>n&&(t=t>0?n:-n),t}},{key:"_performStep",value:function(t){var e=this.body.nodes[t],i=this.physicsBody.forces[t];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);var n=this.physicsBody.velocities[t];return this.previousStates[t]={x:e.x,y:e.y,vx:n.x,vy:n.y},!1===e.options.fixed.x?(n.x=this.calculateComponentVelocity(n.x,i.x,e.options.mass),e.x+=n.x*this.timestep):(i.x=0,n.x=0),!1===e.options.fixed.y?(n.y=this.calculateComponentVelocity(n.y,i.y,e.options.mass),e.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].x&&t[e].y){var i=t[e].options.fixed;this.freezeCache[e]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;"number"!=typeof e&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),0!==this.physicsBody.physicsNodeIndices.length?(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,lg((function(){return t._stabilizationBatch()}),0)):this.ready=!0}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var t=this,e=function(){return!1===t.stabilized&&t.stabilizationIterations<t.targetIterations},i=function(){t.body.emitter.emit("stabilizationProgress",{iterations:t.stabilizationIterations,total:t.targetIterations})};this._startStabilizing()&&i();for(var n,o=0;e()&&o<this.options.stabilization.updateInterval;)this.physicsTick(),o++;(i(),e())?lg(Yn(n=this._stabilizationBatch).call(n,this),0):this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),!0===this.options.stabilization.fit&&this.body.emitter.emit("fit"),!0===this.options.stabilization.onlyDynamicEdges&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),!0===this.stabilized?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(t){for(var e=0;e<this.physicsBody.physicsNodeIndices.length;e++){var i=this.physicsBody.physicsNodeIndices[e],n=this.body.nodes[i],o=this.physicsBody.forces[i],r=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),s=Math.min(Math.max(5,r),15),a=3*s,l=GC((180-180*Math.min(1,Math.max(0,.03*r)))/360,1,1),h={x:n.x+20*o.x,y:n.y+20*o.y};t.lineWidth=s,t.strokeStyle=l,t.beginPath(),t.moveTo(n.x,n.y),t.lineTo(h.x,h.y),t.stroke();var d=Math.atan2(o.y,o.x);t.fillStyle=l,n_.draw(t,{type:"arrow",point:h,angle:d,length:a}),bg(t).call(t)}}}]),t}();let ST;const TT=new Uint8Array(16);function PT(){if(!ST&&(ST="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ST))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ST(TT)}const IT=[];for(let hP=0;hP<256;++hP)IT.push((hP+256).toString(16).slice(1));function MT(t,e=0){return IT[t[e+0]]+IT[t[e+1]]+IT[t[e+2]]+IT[t[e+3]]+"-"+IT[t[e+4]]+IT[t[e+5]]+"-"+IT[t[e+6]]+IT[t[e+7]]+"-"+IT[t[e+8]]+IT[t[e+9]]+"-"+IT[t[e+10]]+IT[t[e+11]]+IT[t[e+12]]+IT[t[e+13]]+IT[t[e+14]]+IT[t[e+15]]}var __={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function DT(t,e,i){if(__.randomUUID&&!e&&!t)return __.randomUUID();const n=(t=t||{}).random||(t.rng||PT)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(let t=0;t<16;++t)e[i+t]=n[t];return e}return MT(n)}var k_=function(){function t(){bO(this,t)}return EO(t,null,[{key:"getRange",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=1e9,o=-1e9,r=1e9,s=-1e9;if(i.length>0)for(var a=0;a<i.length;a++)r>(e=t[i[a]]).shape.boundingBox.left&&(r=e.shape.boundingBox.left),s<e.shape.boundingBox.right&&(s=e.shape.boundingBox.right),n>e.shape.boundingBox.top&&(n=e.shape.boundingBox.top),o<e.shape.boundingBox.bottom&&(o=e.shape.boundingBox.bottom);return 1e9===r&&-1e9===s&&1e9===n&&-1e9===o&&(n=0,o=0,r=0,s=0),{minX:r,maxX:s,minY:n,maxY:o}}},{key:"getRangeCore",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=1e9,o=-1e9,r=1e9,s=-1e9;if(i.length>0)for(var a=0;a<i.length;a++)r>(e=t[i[a]]).x&&(r=e.x),s<e.x&&(s=e.x),n>e.y&&(n=e.y),o<e.y&&(o=e.y);return 1e9===r&&-1e9===s&&1e9===n&&-1e9===o&&(n=0,o=0,r=0,s=0),{minX:r,maxX:s,minY:n,maxY:o}}},{key:"findCenter",value:function(t){return{x:.5*(t.maxX+t.minX),y:.5*(t.maxY+t.minY)}}},{key:"cloneOptions",value:function(t,e){var i={};return void 0===e||"node"===e?(RC(i,t.options,!0),i.x=t.x,i.y=t.y,i.amountOfConnections=t.edges.length):RC(i,t.options,!0),i}}]),t}();function AT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var E_=function(t){FS(o,t);var e,i,n=(e=o,i=AT(),function(){var t,n=jS(e);if(i){var o=jS(this).constructor;t=ox(n,arguments,o)}else t=n.apply(this,arguments);return NS(this,t)});function o(t,e,i,r,s,a){var l;return bO(this,o),(l=n.call(this,t,e,i,r,s,a)).isCluster=!0,l.containedNodes={},l.containedEdges={},l}return EO(o,[{key:"_openChildCluster",value:function(t){var e=this,i=this.body.nodes[t];if(void 0===this.containedNodes[t])throw new Error("node with id: "+t+" not in current cluster");if(!i.isCluster)throw new Error("node with id: "+t+" is not a cluster");delete this.containedNodes[t],WC(i.edges,(function(t){delete e.containedEdges[t.id]})),WC(i.containedNodes,(function(t,i){e.containedNodes[i]=t})),i.containedNodes={},WC(i.containedEdges,(function(t,i){e.containedEdges[i]=t})),i.containedEdges={},WC(i.edges,(function(t){WC(e.edges,(function(i){var n,o,r=zv(n=i.clusteringEdgeReplacingIds).call(n,t.id);-1!==r&&(WC(t.clusteringEdgeReplacingIds,(function(t){i.clusteringEdgeReplacingIds.push(t),e.body.edges[t].edgeReplacedById=i.id})),kp(o=i.clusteringEdgeReplacingIds).call(o,r,1))}))})),i.edges=[]}}]),o}(Tx),O_=function(){function t(e){var i=this;bO(this,t),this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},En(this.options,this.defaultOptions),this.body.emitter.on("_resetData",(function(){i.clusteredNodes={},i.clusteredEdges={}}))}return EO(t,[{key:"clusterByHubsize",value:function(t,e){void 0===t?t=this._getHubSize():"object"===wO(t)&&(e=this._checkOptions(t),t=this._getHubSize());for(var i=[],n=0;n<this.body.nodeIndices.length;n++){var o=this.body.nodes[this.body.nodeIndices[n]];o.edges.length>=t&&i.push(o.id)}for(var r=0;r<i.length;r++)this.clusterByConnection(i[r],e,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===e.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);var n={},o={};WC(this.body.nodes,(function(i,r){i.options&&!0===e.joinCondition(i.options)&&(n[r]=i,WC(i.edges,(function(e){void 0===t.clusteredEdges[e.id]&&(o[e.id]=e)})))})),this._cluster(n,o,e,i)}},{key:"clusterByEdgeCount",value:function(t,e){var i=this,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=this._checkOptions(e);for(var o,r,s,a=[],l={},h=function(){var n={},h={},c=i.body.nodeIndices[d],u=i.body.nodes[c];if(void 0===l[c]){s=0,r=[];for(var f=0;f<u.edges.length;f++)o=u.edges[f],void 0===i.clusteredEdges[o.id]&&(o.toId!==o.fromId&&s++,r.push(o));if(s===t){for(var p=function(t){if(void 0===e.joinCondition||null===e.joinCondition)return!0;var i=k_.cloneOptions(t);return e.joinCondition(i)},v=!0,g=0;g<r.length;g++){o=r[g];var y=i._getConnectedId(o,c);if(!p(u)){v=!1;break}h[o.id]=o,n[c]=u,n[y]=i.body.nodes[y],l[c]=!0}if(Tf(n).length>0&&Tf(h).length>0&&!0===v){var m=function(){for(var t=0;t<a.length;++t)for(var e in n)if(void 0!==a[t].nodes[e])return a[t]}();if(void 0!==m){for(var b in n)void 0===m.nodes[b]&&(m.nodes[b]=n[b]);for(var w in h)void 0===m.edges[w]&&(m.edges[w]=h[w])}else a.push({nodes:n,edges:h})}}}},d=0;d<this.body.nodeIndices.length;d++)h();for(var c=0;c<a.length;c++)this._cluster(a[c].nodes,a[c].edges,e,!1);!0===n&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var i,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[t];void 0===(e=this._checkOptions(e,o)).clusterNodeProperties.x&&(e.clusterNodeProperties.x=o.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=o.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=o.options.fixed.x,e.clusterNodeProperties.fixed.y=o.options.fixed.y);var r={},s={},a=o.id,l=k_.cloneOptions(o);r[a]=o;for(var h=0;h<o.edges.length;h++){var d=o.edges[h];if(void 0===this.clusteredEdges[d.id]){var c=this._getConnectedId(d,a);if(void 0===this.clusteredNodes[c])if(c!==a)if(void 0===e.joinCondition)s[d.id]=d,r[c]=this.body.nodes[c];else{var u=k_.cloneOptions(this.body.nodes[c]);!0===e.joinCondition(l,u)&&(s[d.id]=d,r[c]=this.body.nodes[c])}else s[d.id]=d}}var f=Of(i=Tf(r)).call(i,(function(t){return r[t].id}));for(var p in r)if(Object.prototype.hasOwnProperty.call(r,p))for(var v=r[p],g=0;g<v.edges.length;g++){var y=v.edges[g];zv(f).call(f,this._getConnectedId(y,v.id))>-1&&(s[y.id]=y)}this._cluster(r,s,e,n)}},{key:"_createClusterEdges",value:function(t,e,i,n){for(var o,r,s,a,l,h,d=Tf(t),c=[],u=0;u<d.length;u++){s=t[r=d[u]];for(var f=0;f<s.edges.length;f++)o=s.edges[f],void 0===this.clusteredEdges[o.id]&&(o.toId==o.fromId?e[o.id]=o:o.toId==r?(a=i.id,h=l=o.fromId):(a=o.toId,l=i.id,h=a),void 0===t[h]&&c.push({edge:o,fromId:l,toId:a}))}for(var p=[],v=function(t){for(var e=0;e<p.length;e++){var i=p[e],n=t.fromId===i.fromId&&t.toId===i.toId,o=t.fromId===i.toId&&t.toId===i.fromId;if(n||o)return i}return null},g=0;g<c.length;g++){var y=c[g],m=y.edge,b=v(y);null===b?(b=this._createClusteredEdge(y.fromId,y.toId,m,n),p.push(b)):b.clusteringEdgeReplacingIds.push(m.id),this.body.edges[m.id].edgeReplacedById=b.id,this._backupEdgeOptions(m),m.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,i){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&void 0!==this.clusteredNodes[r]&&o.push(r);for(var s=0;s<o.length;++s)delete t[o[s]];if(0!=Tf(t).length&&(1!=Tf(t).length||1==i.clusterNodeProperties.allowSingleNodeCluster)){var a=RC({},i.clusterNodeProperties);if(void 0!==i.processProperties){var l=[];for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)){var d=k_.cloneOptions(t[h]);l.push(d)}var c=[];for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)&&"clusterEdge:"!==u.substr(0,12)){var f=k_.cloneOptions(e[u],"edge");c.push(f)}if(!(a=i.processProperties(a,l,c)))throw new Error("The processProperties function does not return properties!")}void 0===a.id&&(a.id="cluster:"+DT());var p=a.id;void 0===a.label&&(a.label="cluster");var v=void 0;void 0===a.x&&(v=this._getClusterPosition(t),a.x=v.x),void 0===a.y&&(void 0===v&&(v=this._getClusterPosition(t)),a.y=v.y),a.id=p;var g=this.body.functions.createNode(a,E_);g.containedNodes=t,g.containedEdges=e,g.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[a.id]=g,this._clusterEdges(t,e,a,i.clusterEdgeProperties),a.id=void 0,!0===n&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(t){void 0===this.clusteredEdges[t.id]&&(this.clusteredEdges[t.id]={physics:t.options.physics})}},{key:"_restoreEdge",value:function(t){var e=this.clusteredEdges[t.id];void 0!==e&&(t.setOptions({physics:e.physics}),delete this.clusteredEdges[t.id])}},{key:"isCluster",value:function(t){return void 0!==this.body.nodes[t]?!0===this.body.nodes[t].isCluster:(console.error("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(t){for(var e,i=Tf(t),n=t[i[0]].x,o=t[i[0]].x,r=t[i[0]].y,s=t[i[0]].y,a=1;a<i.length;a++)n=(e=t[i[a]]).x<n?e.x:n,o=e.x>o?e.x:o,r=e.y<r?e.y:r,s=e.y>s?e.y:s;return{x:.5*(n+o),y:.5*(r+s)}}},{key:"openCluster",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");var n=this.body.nodes[t];if(void 0===n)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==n.isCluster||void 0===n.containedNodes||void 0===n.containedEdges)throw new Error("The node:"+t+" is not a valid cluster.");var o=this.findNode(t),r=zv(o).call(o,t)-1;if(r>=0){var s=o[r];return this.body.nodes[s]._openChildCluster(t),delete this.body.nodes[t],void(!0===i&&this.body.emitter.emit("_dataChanged"))}var a=n.containedNodes,l=n.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var h={},d={x:n.x,y:n.y};for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var u=this.body.nodes[c];h[c]={x:u.x,y:u.y}}var f=e.releaseFunction(d,h);for(var p in a)if(Object.prototype.hasOwnProperty.call(a,p)){var v=this.body.nodes[p];void 0!==f[p]&&(v.x=void 0===f[p].x?n.x:f[p].x,v.y=void 0===f[p].y?n.y:f[p].y)}}else WC(a,(function(t){!1===t.options.fixed.x&&(t.x=n.x),!1===t.options.fixed.y&&(t.y=n.y)}));for(var g in a)if(Object.prototype.hasOwnProperty.call(a,g)){var y=this.body.nodes[g];y.vx=n.vx,y.vy=n.vy,y.setOptions({physics:!0}),delete this.clusteredNodes[g]}for(var m=[],b=0;b<n.edges.length;b++)m.push(n.edges[b]);for(var w=0;w<m.length;w++){for(var x=m[w],_=this._getConnectedId(x,t),k=this.clusteredNodes[_],E=0;E<x.clusteringEdgeReplacingIds.length;E++){var O=x.clusteringEdgeReplacingIds[E],C=this.body.edges[O];if(void 0!==C)if(void 0!==k){var S=this.body.nodes[k.clusterId];S.containedEdges[C.id]=C,delete l[C.id];var T=C.fromId,P=C.toId;C.toId==_?P=k.clusterId:T=k.clusterId,this._createClusteredEdge(T,P,C,S.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(C)}x.remove()}for(var I in l)Object.prototype.hasOwnProperty.call(l,I)&&this._restoreEdge(l[I]);delete this.body.nodes[t],!0===i&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(t){var e=[];if(!0===this.isCluster(t)){var i=this.body.nodes[t].containedNodes;for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&e.push(this.body.nodes[n].id)}return e}},{key:"findNode",value:function(t){for(var e,i=[],n=0;void 0!==this.clusteredNodes[t]&&n<100;){if(void 0===(e=this.body.nodes[t]))return[];i.push(e.id),t=this.clusteredNodes[t].clusterId,n++}return void 0===(e=this.body.nodes[t])?[]:(i.push(e.id),ep(i).call(i),i)}},{key:"updateClusteredNode",value:function(t,e){if(void 0===t)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(void 0===e)throw new Error("No newOptions supplied to updateClusteredNode.");if(void 0===this.body.nodes[t])throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[t].setOptions(e),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(t,e){if(void 0===t)throw new Error("No startEdgeId supplied to updateEdge.");if(void 0===e)throw new Error("No newOptions supplied to updateEdge.");if(void 0===this.body.edges[t])throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var i=this.getClusteredEdges(t),n=0;n<i.length;n++){this.body.edges[i[n]].setOptions(e)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(t){for(var e=[],i=0;void 0!==t&&void 0!==this.body.edges[t]&&i<100;)e.push(this.body.edges[t].id),t=this.body.edges[t].edgeReplacedById,i++;return ep(e).call(e),e}},{key:"getBaseEdge",value:function(t){return this.getBaseEdges(t)[0]}},{key:"getBaseEdges",value:function(t){for(var e=[t],i=[],n=[],o=0;e.length>0&&o<100;){var r=e.pop();if(void 0!==r){var s=this.body.edges[r];if(void 0!==s){o++;var a=s.clusteringEdgeReplacingIds;if(void 0===a)n.push(r);else for(var l=0;l<a.length;++l){var h=a[l];-1===zv(e).call(e,a)&&-1===zv(i).call(i,a)&&e.push(h)}i.push(r)}}}return n}},{key:"_getConnectedId",value:function(t,e){return t.toId!=e?t.toId:(t.fromId,t.fromId)}},{key:"_getHubSize",value:function(){for(var t=0,e=0,i=0,n=0,o=0;o<this.body.nodeIndices.length;o++){var r=this.body.nodes[this.body.nodeIndices[o]];r.edges.length>n&&(n=r.edges.length),t+=r.edges.length,e+=Math.pow(r.edges.length,2),i+=1}t/=i;var s=(e/=i)-Math.pow(t,2),a=Math.sqrt(s),l=Math.floor(t+2*a);return l>n&&(l=n),l}},{key:"_createClusteredEdge",value:function(t,e,i,n,o){var r=k_.cloneOptions(i,"edge");RC(r,n),r.from=t,r.to=e,r.id="clusterEdge:"+DT(),void 0!==o&&RC(r,o);var s=this.body.functions.createEdge(r);return s.clusteringEdgeReplacingIds=[i.id],s.connect(),this.body.edges[s.id]=s,s}},{key:"_clusterEdges",value:function(t,e,i,n){if(e instanceof c_){var o=e,r={};r[o.id]=o,e=r}if(t instanceof Tx){var s=t,a={};a[s.id]=s,t=a}if(null==i)throw new Error("_clusterEdges: parameter clusterNode required");for(var l in void 0===n&&(n=i.clusterEdgeProperties),this._createClusterEdges(t,e,i,n),e)if(Object.prototype.hasOwnProperty.call(e,l)&&void 0!==this.body.edges[l]){var h=this.body.edges[l];this._backupEdgeOptions(h),h.setOptions({physics:!1})}for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(this.clusteredNodes[d]={clusterId:i.id,node:this.body.nodes[d]},this.body.nodes[d].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(t){if(void 0!==t){var e=this.clusteredNodes[t];if(void 0!==e){var i=e.clusterId;if(void 0!==i)return this.body.nodes[i]}}}},{key:"_filter",value:function(t,e){var i=[];return WC(t,(function(t){e(t)&&i.push(t)})),i}},{key:"_updateState",value:function(){var t,e=this,i=[],n={},o=function(t){WC(e.body.nodes,(function(e){!0===e.isCluster&&t(e)}))};for(t in this.clusteredNodes){if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,t))void 0===this.body.nodes[t]&&i.push(t)}o((function(t){for(var e=0;e<i.length;e++)delete t.containedNodes[i[e]]}));for(var r=0;r<i.length;r++)delete this.clusteredNodes[i[r]];WC(this.clusteredEdges,(function(t){var i=e.body.edges[t];void 0!==i&&i.endPointsValid()||(n[t]=t)})),o((function(t){WC(t.containedEdges,(function(t,e){t.endPointsValid()||n[e]||(n[e]=e)}))})),WC(this.body.edges,(function(t,i){var o=!0,r=t.clusteringEdgeReplacingIds;if(void 0!==r){var s=0;WC(r,(function(t){var i=e.body.edges[t];void 0!==i&&i.endPointsValid()&&(s+=1)})),o=s>0}t.endPointsValid()&&o||(n[i]=i)})),o((function(t){WC(n,(function(i){delete t.containedEdges[i],WC(t.edges,(function(o,r){o.id!==i?o.clusteringEdgeReplacingIds=e._filter(o.clusteringEdgeReplacingIds,(function(t){return!n[t]})):t.edges[r]=null})),t.edges=e._filter(t.edges,(function(t){return null!==t}))}))})),WC(n,(function(t){delete e.clusteredEdges[t]})),WC(n,(function(t){delete e.body.edges[t]})),WC(Tf(this.body.edges),(function(t){var i=e.body.edges[t],n=e._isClusteredNode(i.fromId)||e._isClusteredNode(i.toId);if(n!==e._isClusteredEdge(i.id))if(n){var o=e._getClusterNodeForNode(i.fromId);void 0!==o&&e._clusterEdges(e.body.nodes[i.fromId],i,o);var r=e._getClusterNodeForNode(i.toId);void 0!==r&&e._clusterEdges(e.body.nodes[i.toId],i,r)}else delete e._clusterEdges[t],e._restoreEdge(i)}));for(var s=!1,a=!0,l=function(){var t=[];o((function(e){var i=Tf(e.containedNodes).length,n=!0===e.options.allowSingleNodeCluster;(n&&i<1||!n&&i<2)&&t.push(e.id)}));for(var i=0;i<t.length;++i)e.openCluster(t[i],{},!1);a=t.length>0,s=s||a};a;)l();s&&this._updateState()}},{key:"_isClusteredNode",value:function(t){return void 0!==this.clusteredNodes[t]}},{key:"_isClusteredEdge",value:function(t){return void 0!==this.clusteredEdges[t]}}]),t}();var C_=function(){function t(e,i){var n;bO(this,t),void 0!==window&&(n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===n?function(t){t()}:n,this.body=e,this.canvas=i,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},En(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return EO(t,[{key:"bindEventListeners",value:function(){var t,e=this;this.body.emitter.on("dragStart",(function(){e.dragging=!0})),this.body.emitter.on("dragEnd",(function(){e.dragging=!1})),this.body.emitter.on("zoom",(function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=lg((function(){var t;e.zooming=!1,Yn(t=e._requestRedraw).call(t,e)()}),250)})),this.body.emitter.on("_resizeNodes",(function(){e._resizeNodes()})),this.body.emitter.on("_redraw",(function(){!1===e.renderingActive&&e._redraw()})),this.body.emitter.on("_blockRedraw",(function(){e.allowRedraw=!1})),this.body.emitter.on("_allowRedraw",(function(){e.allowRedraw=!0,e.redrawRequested=!1})),this.body.emitter.on("_requestRedraw",Yn(t=this._requestRedraw).call(t,this)),this.body.emitter.on("_startRendering",(function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()})),this.body.emitter.on("_stopRendering",(function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0})),this.body.emitter.on("destroy",(function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,!0===e.requiresTimeout?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()}))}},{key:"setOptions",value:function(t){if(void 0!==t){NC(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,t)}}},{key:"_requestNextFrame",value:function(t,e){if("undefined"!=typeof window){var i,n=window;return!0===this.requiresTimeout?i=lg(t,e):n.requestAnimationFrame&&(i=n.requestAnimationFrame(t)),i}}},{key:"_startRendering",value:function(){var t;!0===this.renderingActive&&(void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(Yn(t=this._renderStep).call(t,this),this.simulationInterval)))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame((function(){t._redraw(!1)}),0))}},{key:"_redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e={drawExternalLabels:null};0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var i=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,n,o),0===this.canvas.frame.clientWidth)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawEdges(i),!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag){var r=this._drawNodes(i,t).drawExternalLabels;e.drawExternalLabels=r}!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawArrows(i),null!=e.drawExternalLabels&&e.drawExternalLabels(),!1===t&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),!0===t&&i.clearRect(0,0,n,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var t=this.canvas.getContext();t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e,i=this.body.nodes;for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&((e=i[n]).resize(t),e.updateBoundingBox(t,e.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e,i,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.body.nodes,r=this.body.nodeIndices,s=[],a=[],l=this.canvas.DOMtoCanvas({x:-20,y:-20}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),d={top:l.y,left:l.x,bottom:h.y,right:h.x},c=[],u=0;u<r.length;u++)if((e=o[r[u]]).hover)a.push(r[u]);else if(e.isSelected())s.push(r[u]);else if(!0===n){var f=e.draw(t);null!=f.drawExternalLabel&&c.push(f.drawExternalLabel)}else if(!0===e.isBoundingBoxOverlappingWith(d)){var p=e.draw(t);null!=p.drawExternalLabel&&c.push(p.drawExternalLabel)}else e.updateBoundingBox(t,e.selected);var v=s.length,g=a.length;for(i=0;i<v;i++){var y=(e=o[s[i]]).draw(t);null!=y.drawExternalLabel&&c.push(y.drawExternalLabel)}for(i=0;i<g;i++){var m=(e=o[a[i]]).draw(t);null!=m.drawExternalLabel&&c.push(m.drawExternalLabel)}return{drawExternalLabels:function(){for(var t=0,e=c;t<e.length;t++){(0,e[t])()}}}}},{key:"_drawEdges",value:function(t){for(var e=this.body.edges,i=this.body.edgeIndices,n=0;n<i.length;n++){var o=e[i[n]];!0===o.connected&&o.draw(t)}}},{key:"_drawArrows",value:function(t){for(var e=this.body.edges,i=this.body.edgeIndices,n=0;n<i.length;n++){var o=e[i[n]];!0===o.connected&&o.drawArrows(t)}}},{key:"_determineBrowserMethod",value:function(){if("undefined"!=typeof window){var t=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,(-1!=zv(t).call(t,"msie 9.0")||-1!=zv(t).call(t,"safari")&&zv(t).call(t,"chrome")<=-1)&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}},{key:"_drawSelectionBox",value:function(t){if(this.body.selectionBox.show){t.beginPath();var e=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,i=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;t.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,e,i),t.fillStyle="rgba(151, 194, 252, 0.2)",t.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,e,i),t.strokeStyle="rgba(151, 194, 252, 1)",t.stroke()}else t.closePath()}}]),t}(),S_=aO(st.setInterval);function BT(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}function FT(t,e){return e.inputHandler=function(t){t.isFinal&&e(t)},t.on("hammer.input",e.inputHandler)}var T_=function(){function t(e){bO(this,t),this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},En(this.options,this.defaultOptions),this.bindEventListeners()}return EO(t,[{key:"bindEventListeners",value:function(){var t,e=this;this.body.emitter.once("resize",(function(t){0!==t.width&&(e.body.view.translation.x=.5*t.width),0!==t.height&&(e.body.view.translation.y=.5*t.height)})),this.body.emitter.on("setSize",Yn(t=this.setSize).call(t,this)),this.body.emitter.on("destroy",(function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()}))}},{key:"setOptions",value:function(t){var e=this;if(void 0!==t){NC(["width","height","autoResize"],this.options,t)}if(this._cleanUp(),!0===this.options.autoResize){var i;if(window.ResizeObserver){var n=new ResizeObserver((function(){!0===e.setSize()&&e.body.emitter.emit("_requestRedraw")})),o=this.frame;n.observe(o),this._cleanupCallbacks.push((function(){n.unobserve(o)}))}else{var r=S_((function(){!0===e.setSize()&&e.body.emitter.emit("_requestRedraw")}),1e3);this._cleanupCallbacks.push((function(){clearInterval(r)}))}var s=Yn(i=this._onResize).call(i,this);window.addEventListener("resize",s),this._cleanupCallbacks.push((function(){window.removeEventListener("resize",s)}))}}},{key:"_cleanUp",value:function(){var t,e,i;Vf(t=ep(e=kp(i=this._cleanupCallbacks).call(i,0)).call(e)).call(t,(function(t){try{t()}catch(rO){console.error(rO)}}))}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:n.x-this.cameraState.position.x,y:n.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==zv(t).call(t,"%")||-1!==zv(t).call(t,"px"))return t;if(-1===zv(t).call(t,"%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new jy(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:jy.DIRECTION_ALL}),BT(this.hammer,(function(e){t.body.eventListeners.onTouch(e)})),this.hammer.on("tap",(function(e){t.body.eventListeners.onTap(e)})),this.hammer.on("doubletap",(function(e){t.body.eventListeners.onDoubleTap(e)})),this.hammer.on("press",(function(e){t.body.eventListeners.onHold(e)})),this.hammer.on("panstart",(function(e){t.body.eventListeners.onDragStart(e)})),this.hammer.on("panmove",(function(e){t.body.eventListeners.onDrag(e)})),this.hammer.on("panend",(function(e){t.body.eventListeners.onDragEnd(e)})),this.hammer.on("pinch",(function(e){t.body.eventListeners.onPinch(e)})),this.frame.canvas.addEventListener("wheel",(function(e){t.body.eventListeners.onMouseWheel(e)})),this.frame.canvas.addEventListener("mousemove",(function(e){t.body.eventListeners.onMouseMove(e)})),this.frame.canvas.addEventListener("contextmenu",(function(e){t.body.eventListeners.onContext(e)})),this.hammerFrame=new jy(this.frame),FT(this.hammerFrame,(function(e){t.body.eventListeners.onRelease(e)}))}},{key:"setSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,n=this.frame.canvas.width,o=this.frame.canvas.height,r=this.pixelRatio;if(this._setPixelRatio(),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e)this._getCameraState(r),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var s=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),a=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===s&&this.frame.canvas.height===a||this._getCameraState(r),this.frame.canvas.width!==s&&(this.frame.canvas.width=s,i=!0),this.frame.canvas.height!==a&&(this.frame.canvas.height=a,i=!0)}return!0===i&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");var e=1;return"undefined"!=typeof window&&(e=window.devicePixelRatio||1),e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();function zT(t,e){var i=En({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},null!=t?t:{});if(!mf(i.nodes))throw new TypeError("Nodes has to be an array of ids.");if(0===i.nodes.length&&(i.nodes=e),!("number"==typeof i.minZoomLevel&&i.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!("number"==typeof i.maxZoomLevel&&i.minZoomLevel<=i.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return i}var P_=function(){function t(e,i){var n,o,r=this;bO(this,t),this.body=e,this.canvas=i,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",Yn(n=this.fit).call(n,this)),this.body.emitter.on("animationFinished",(function(){r.body.emitter.emit("_stopRendering")})),this.body.emitter.on("unlockNode",Yn(o=this.releaseNode).call(o,this))}return EO(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=zT(t,this.body.nodeIndices);var i,n,o=this.canvas.frame.canvas.clientWidth,r=this.canvas.frame.canvas.clientHeight;if(0===o||0===r)n=1,i=k_.getRange(this.body.nodes,t.nodes);else if(!0===e){var s=0;for(var a in this.body.nodes){if(Object.prototype.hasOwnProperty.call(this.body.nodes,a))!0===this.body.nodes[a].predefinedPosition&&(s+=1)}if(s>.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=k_.getRange(this.body.nodes,t.nodes),n=12.662/(this.body.nodeIndices.length+7.4147)+.0964822,n*=Math.min(o/600,r/600)}else{this.body.emitter.emit("_resizeNodes"),i=k_.getRange(this.body.nodes,t.nodes);var l=o/(1.1*Math.abs(i.maxX-i.minX)),h=r/(1.1*Math.abs(i.maxY-i.minY));n=l<=h?l:h}n>t.maxZoomLevel?n=t.maxZoomLevel:n<t.minZoomLevel&&(n=t.minZoomLevel);var d={position:k_.findCenter(i),scale:n,animation:t.animation};this.moveTo(d)}},{key:"focus",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.error("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){if(void 0!==t){if(null!=t.offset){if(null!=t.offset.x){if(t.offset.x=+t.offset.x,!Mb(t.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else t.offset.x=0;if(null!=t.offset.y){if(t.offset.y=+t.offset.y,!Mb(t.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else t.offset.x=0}else t.offset={x:0,y:0};if(null!=t.position){if(null!=t.position.x){if(t.position.x=+t.position.x,!Mb(t.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else t.position.x=0;if(null!=t.position.y){if(t.position.y=+t.position.y,!Mb(t.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else t.position.x=0}else t.position=this.getViewPosition();if(null!=t.scale){if(t.scale=+t.scale,!(t.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else t.scale=this.body.view.scale;void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t)}else t={}}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e,i,n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),o=n.x-t.position.x,r=n.y-t.position.y;if(this.targetTranslation={x:this.sourceTranslation.x+o*this.targetScale+t.offset.x,y:this.sourceTranslation.y+r*this.targetScale+t.offset.y},0===t.animation.duration)if(null!=this.lockedOnNodeId)this.viewFunction=Yn(e=this._lockedRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction);else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=Yn(i=this._transitionRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}},{key:"_lockedRedraw",value:function(){var t=this.body.nodes[this.lockedOnNodeId].x,e=this.body.nodes[this.lockedOnNodeId].y,i=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n=i.x-t,o=i.y-e,r=this.body.view.translation,s={x:r.x+n*this.body.view.scale+this.lockedOnNodeOffset.x,y:r.y+o*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e=Sy[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1){var i;if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,null!=this.lockedOnNodeId)this.viewFunction=Yn(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction);this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();function NT(t){var e,i=t&&t.preventDefault||!1,n=t&&t.container||window,o={},r={keydown:{},keyup:{}},s={};for(e=97;e<=122;e++)s[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)s[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)s[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)s["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)s["num"+e]={code:96+e,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(t){h(t,"keydown")},l=function(t){h(t,"keyup")},h=function(t,e){if(void 0!==r[e][t.keyCode]){for(var n=r[e][t.keyCode],o=0;o<n.length;o++)(void 0===n[o].shift||1==n[o].shift&&1==t.shiftKey||0==n[o].shift&&0==t.shiftKey)&&n[o].fn(t);1==i&&t.preventDefault()}};return o.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);void 0===r[i][s[t].code]&&(r[i][s[t].code]=[]),r[i][s[t].code].push({fn:e,shift:s[t].shift})},o.bindAll=function(t,e){for(var i in void 0===e&&(e="keydown"),s)s.hasOwnProperty(i)&&o.bind(i,t,e)},o.getKey=function(t){for(var e in s)if(s.hasOwnProperty(e)){if(1==t.shiftKey&&1==s[e].shift&&t.keyCode==s[e].code)return e;if(0==t.shiftKey&&0==s[e].shift&&t.keyCode==s[e].code)return e;if(t.keyCode==s[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},o.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=r[i][s[t].code];if(void 0!==o)for(var a=0;a<o.length;a++)o[a].fn==e&&o[a].shift==s[t].shift||n.push(r[i][s[t].code][a]);r[i][s[t].code]=n}else r[i][s[t].code]=[]},o.reset=function(){r={keydown:{},keyup:{}}},o.destroy=function(){r={keydown:{},keyup:{}},n.removeEventListener("keydown",a,!0),n.removeEventListener("keyup",l,!0)},n.addEventListener("keydown",a,!0),n.addEventListener("keyup",l,!0),o}var I_=function(){function t(e,i){var n=this;bO(this,t),this.body=e,this.canvas=i,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",(function(){n.activated=!0,n.configureKeyboardBindings()})),this.body.emitter.on("deactivate",(function(){n.activated=!1,n.configureKeyboardBindings()})),this.body.emitter.on("destroy",(function(){void 0!==n.keycharm&&n.keycharm.destroy()})),this.options={}}return EO(t,[{key:"setOptions",value:function(t){void 0!==t&&(this.options=t,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var t=0;t<this.navigationHammers.length;t++)this.navigationHammers[t].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var t=this;this.cleanNavigation(),this.navigationDOM={};var e=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],i=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var n=0;n<e.length;n++){this.navigationDOM[e[n]]=document.createElement("div"),this.navigationDOM[e[n]].className="vis-button vis-"+e[n],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[n]]);var o,r,s=new jy(this.navigationDOM[e[n]]);if("_fit"===i[n])BT(s,Yn(o=this._fit).call(o,this));else BT(s,Yn(r=this.bindToRedraw).call(r,this,i[n]));this.navigationHammers.push(s)}var a=new jy(this.canvas.frame);FT(a,(function(){t._stopMovement()})),this.navigationHammers.push(a),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(t){var e;void 0===this.boundFunctions[t]&&(this.boundFunctions[t]=Yn(e=this[t]).call(e,this),this.body.emitter.on("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_startRendering"))}},{key:"unbindFromRedraw",value:function(t){void 0!==this.boundFunctions[t]&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[t])}},{key:"_fit",value:function(){(new Date).valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,r=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:r},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,r=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:r},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t,e,i,n,o,r,s,a,l,h,d,c,u,f,p,v,g,y,m,b,w,x,_,k,E=this;(void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled)&&(!0===this.options.keyboard.bindToWindow?this.keycharm=NT({container:window,preventDefault:!0}):this.keycharm=NT({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(Yn(t=this.keycharm).call(t,"up",(function(){E.bindToRedraw("_moveUp")}),"keydown"),Yn(e=this.keycharm).call(e,"down",(function(){E.bindToRedraw("_moveDown")}),"keydown"),Yn(i=this.keycharm).call(i,"left",(function(){E.bindToRedraw("_moveLeft")}),"keydown"),Yn(n=this.keycharm).call(n,"right",(function(){E.bindToRedraw("_moveRight")}),"keydown"),Yn(o=this.keycharm).call(o,"=",(function(){E.bindToRedraw("_zoomIn")}),"keydown"),Yn(r=this.keycharm).call(r,"num+",(function(){E.bindToRedraw("_zoomIn")}),"keydown"),Yn(s=this.keycharm).call(s,"num-",(function(){E.bindToRedraw("_zoomOut")}),"keydown"),Yn(a=this.keycharm).call(a,"-",(function(){E.bindToRedraw("_zoomOut")}),"keydown"),Yn(l=this.keycharm).call(l,"[",(function(){E.bindToRedraw("_zoomOut")}),"keydown"),Yn(h=this.keycharm).call(h,"]",(function(){E.bindToRedraw("_zoomIn")}),"keydown"),Yn(d=this.keycharm).call(d,"pageup",(function(){E.bindToRedraw("_zoomIn")}),"keydown"),Yn(c=this.keycharm).call(c,"pagedown",(function(){E.bindToRedraw("_zoomOut")}),"keydown"),Yn(u=this.keycharm).call(u,"up",(function(){E.unbindFromRedraw("_moveUp")}),"keyup"),Yn(f=this.keycharm).call(f,"down",(function(){E.unbindFromRedraw("_moveDown")}),"keyup"),Yn(p=this.keycharm).call(p,"left",(function(){E.unbindFromRedraw("_moveLeft")}),"keyup"),Yn(v=this.keycharm).call(v,"right",(function(){E.unbindFromRedraw("_moveRight")}),"keyup"),Yn(g=this.keycharm).call(g,"=",(function(){E.unbindFromRedraw("_zoomIn")}),"keyup"),Yn(y=this.keycharm).call(y,"num+",(function(){E.unbindFromRedraw("_zoomIn")}),"keyup"),Yn(m=this.keycharm).call(m,"num-",(function(){E.unbindFromRedraw("_zoomOut")}),"keyup"),Yn(b=this.keycharm).call(b,"-",(function(){E.unbindFromRedraw("_zoomOut")}),"keyup"),Yn(w=this.keycharm).call(w,"[",(function(){E.unbindFromRedraw("_zoomOut")}),"keyup"),Yn(x=this.keycharm).call(x,"]",(function(){E.unbindFromRedraw("_zoomIn")}),"keyup"),Yn(_=this.keycharm).call(_,"pageup",(function(){E.unbindFromRedraw("_zoomIn")}),"keyup"),Yn(k=this.keycharm).call(k,"pagedown",(function(){E.unbindFromRedraw("_zoomOut")}),"keyup")))}}]),t}();function jT(t,e){var i=void 0!==of&&pl(t)||t["@@iterator"];if(!i){if(mf(t)||(i=RT(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function RT(t,e){var i;if(t){if("string"==typeof t)return LT(t,e);var n=cf(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Xa(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LT(t,e):void 0}}function LT(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var M_=function(){function t(e,i,n){var o,r,s,a,l,h,d,c,u,f,p,v,g;bO(this,t),this.body=e,this.canvas=i,this.selectionHandler=n,this.navigationHandler=new I_(e,i),this.body.eventListeners.onTap=Yn(o=this.onTap).call(o,this),this.body.eventListeners.onTouch=Yn(r=this.onTouch).call(r,this),this.body.eventListeners.onDoubleTap=Yn(s=this.onDoubleTap).call(s,this),this.body.eventListeners.onHold=Yn(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=Yn(l=this.onDragStart).call(l,this),this.body.eventListeners.onDrag=Yn(h=this.onDrag).call(h,this),this.body.eventListeners.onDragEnd=Yn(d=this.onDragEnd).call(d,this),this.body.eventListeners.onMouseWheel=Yn(c=this.onMouseWheel).call(c,this),this.body.eventListeners.onPinch=Yn(u=this.onPinch).call(u,this),this.body.eventListeners.onMouseMove=Yn(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=Yn(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=Yn(v=this.onContext).call(v,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=Yn(g=this.getPointer).call(g,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},En(this.options,this.defaultOptions),this.bindEventListeners()}return EO(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("destroy",(function(){clearTimeout(t.popupTimer),delete t.body.functions.getPointer}))}},{key:"setOptions",value:function(t){if(void 0!==t){jC(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,t),eS(this.options,t,"keyboard"),t.tooltip&&(En(this.options.tooltip,t.tooltip),t.tooltip.color&&(this.options.tooltip.color=YC(t.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(t){return{x:t.x-(e=this.canvas.frame.canvas,e.getBoundingClientRect().left),y:t.y-HC(this.canvas.frame.canvas)};var e}},{key:"onTouch",value:function(t){(new Date).valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,i),this.selectionHandler.commitAndEmit(e,t),this.selectionHandler.generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler.generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,i),this.selectionHandler.commitAndEmit(e,t),this.selectionHandler.generateClickEvent("click",t,e),this.selectionHandler.generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler.generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler.generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t){!0===(arguments.length>1&&void 0!==arguments[1]&&arguments[1])?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t)}},{key:"_determineDifference",value:function(t,e){var i=function(t,e){for(var i=[],n=0;n<t.length;n++){var o=t[n];-1===zv(e).call(e,o)&&i.push(o)}return i};return{nodes:i(t.nodes,e.nodes),edges:i(t.edges,e.edges)}}},{key:"onDragStart",value:function(t){if(!this.drag.dragging){void 0===this.drag.pointer&&this.onTouch(t);var e=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=En({},this.body.view.translation),this.drag.nodeId=void 0,t.srcEvent.shiftKey){this.body.selectionBox.show=!0;var i=this.getPointer(t.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)}}else if(void 0!==e&&!0===this.options.dragNodes){this.drag.nodeId=e.id,!1===e.isSelected()&&this.selectionHandler.setSelection({nodes:[e.id]}),this.selectionHandler.generateClickEvent("dragStart",t,this.drag.pointer);var n,o=jT(this.selectionHandler.getSelectedNodes());try{for(o.s();!(n=o.n()).done;){var r=n.value,s={id:r.id,node:r,x:r.x,y:r.y,xFixed:r.options.fixed.x,yFixed:r.options.fixed.y};r.options.fixed.x=!0,r.options.fixed.y=!0,this.drag.selection.push(s)}}catch(a){o.e(a)}finally{o.f()}}else this.selectionHandler.generateClickEvent("dragStart",t,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(t){var e=this;if(!0!==this.drag.pinched){this.body.emitter.emit("unlockNode");var i=this.getPointer(t.center),n=this.drag.selection;if(n&&n.length&&!0===this.options.dragNodes){this.selectionHandler.generateClickEvent("dragging",t,i);var o=i.x-this.drag.pointer.x,r=i.y-this.drag.pointer.y;Vf(n).call(n,(function(t){var i=t.node;!1===t.xFixed&&(i.x=e.canvas._XconvertDOMtoCanvas(e.canvas._XconvertCanvasToDOM(t.x)+o)),!1===t.yFixed&&(i.y=e.canvas._YconvertDOMtoCanvas(e.canvas._YconvertCanvasToDOM(t.y)+r))})),this.body.emitter.emit("startSimulation")}else{if(t.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",t,i,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(t);this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.emitter.emit("_requestRedraw")}if(!0===this.options.dragView&&!t.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",t,i,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(t);var s=i.x-this.drag.pointer.x,a=i.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+s,y:this.drag.translation.y+a},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(t){var e=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var i;this.body.selectionBox.show=!1;var n=this.body.selectionBox.position,o={minX:Math.min(n.start.x,n.end.x),minY:Math.min(n.start.y,n.end.y),maxX:Math.max(n.start.x,n.end.x),maxY:Math.max(n.start.y,n.end.y)},r=nv(i=this.body.nodeIndices).call(i,(function(t){var i=e.body.nodes[t];return i.x>=o.minX&&i.x<=o.maxX&&i.y>=o.minY&&i.y<=o.maxY}));Vf(r).call(r,(function(t){return e.selectionHandler.selectObject(e.body.nodes[t])}));var s=this.getPointer(t.center);this.selectionHandler.commitAndEmit(s,t),this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var a=this.drag.selection;a&&a.length?(Vf(a).call(a,(function(t){t.node.options.fixed.x=t.xFixed,t.node.options.fixed.y=t.yFixed})),this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",t,this.getPointer(t.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(t){var e=this.getPointer(t.center);this.drag.pinched=!0,void 0===this.pinch.scale&&(this.pinch.scale=1);var i=this.pinch.scale*t.scale;this.zoom(i,e)}},{key:"zoom",value:function(t,e){if(!0===this.options.zoomView){var i=this.body.view.scale;t<1e-5&&(t=1e-5),t>10&&(t=10);var n=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,r=t/i,s=(1-r)*e.x+o.x*r,a=(1-r)*e.y+o.y*r;if(this.body.view.scale=t,this.body.view.translation={x:s,y:a},null!=n){var l=this.canvas.canvasToDOM(n);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),i<t?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:e}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:e})}}},{key:"onMouseWheel",value:function(t){if(!0===this.options.zoomView){if(0!==t.deltaY){var e=this.body.view.scale;e*=1+(t.deltaY<0?1:-1)*(.1*this.options.zoomSpeed);var i=this.getPointer({x:t.clientX,y:t.clientY});this.zoom(e,i)}t.preventDefault()}}},{key:"onMouseMove",value:function(t){var e=this,i=this.getPointer({x:t.clientX,y:t.clientY}),n=!1;void 0!==this.popup&&(!1===this.popup.hidden&&this._checkHidePopup(i),!1===this.popup.hidden&&(n=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.autoFocus&&!1===this.options.keyboard.bindToWindow&&!0===this.options.keyboard.enabled&&this.canvas.frame.focus(),!1===n&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=lg((function(){return e._checkShowPopup(i)}),this.options.tooltipDelay))),!0===this.options.hover&&this.selectionHandler.hoverObject(t,i)}},{key:"_checkShowPopup",value:function(t){var e=this.canvas._XconvertDOMtoCanvas(t.x),i=this.canvas._YconvertDOMtoCanvas(t.y),n={left:e,top:i,right:e,bottom:i},o=void 0===this.popupObj?void 0:this.popupObj.id,r=!1,s="node";if(void 0===this.popupObj){for(var a,l=this.body.nodeIndices,h=this.body.nodes,d=[],c=0;c<l.length;c++)!0===(a=h[l[c]]).isOverlappingWith(n)&&(r=!0,void 0!==a.getTitle()&&d.push(l[c]));d.length>0&&(this.popupObj=h[d[d.length-1]],r=!0)}if(void 0===this.popupObj&&!1===r){for(var u,f=this.body.edgeIndices,p=this.body.edges,v=[],g=0;g<f.length;g++)!0===(u=p[f[g]]).isOverlappingWith(n)&&!0===u.connected&&void 0!==u.getTitle()&&v.push(f[g]);v.length>0&&(this.popupObj=p[v[v.length-1]],s="edge")}void 0!==this.popupObj?this.popupObj.id!==o&&(void 0===this.popup&&(this.popup=new Ry(this.canvas.frame)),this.popup.popupTargetType=s,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var n=this.selectionHandler.getNodeAt(t);i=void 0!==n&&n.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===i&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();ob("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Ob);var D_=aO(st.Set),A_=x,B_=sb,F_=Em.getWeakData,z_=Hm,N_=ai,j_=K,R_=rt,L_=jm,H_=ne,W_=Ho.set,q_=Ho.getterFor,U_=Bh.find,V_=Bh.findIndex,Y_=A_([].splice),X_=0,$_=function(t){return t.frozen||(t.frozen=new G_)},G_=function(){this.entries=[]},K_=function(t,e){return U_(t.entries,(function(t){return t[0]===e}))};G_.prototype={get:function(t){var e=K_(this,t);if(e)return e[1]},has:function(t){return!!K_(this,t)},set:function(t,e){var i=K_(this,t);i?i[1]=e:this.entries.push([t,e])},delete:function(t){var e=V_(this.entries,(function(e){return e[0]===t}));return~e&&Y_(this.entries,e,1),!!~e}};var Z_,Q_={getConstructor:function(t,e,i,n){var o=t((function(t,o){z_(t,r),W_(t,{type:e,id:X_++,frozen:void 0}),j_(o)||L_(o,t[n],{that:t,AS_ENTRIES:i})})),r=o.prototype,s=q_(e),a=function(t,e,i){var n=s(t),o=F_(N_(e),!0);return!0===o?$_(n).set(e,i):o[n.id]=i,t};return B_(r,{delete:function(t){var e=s(this);if(!R_(t))return!1;var i=F_(t);return!0===i?$_(e).delete(t):i&&H_(i,e.id)&&delete i[e.id]},has:function(t){var e=s(this);if(!R_(t))return!1;var i=F_(t);return!0===i?$_(e).has(t):i&&H_(i,e.id)}}),B_(r,i?{get:function(t){var e=s(this);if(R_(t)){var i=F_(t);return!0===i?$_(e).get(t):i?i[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},J_=lm,tk=h,ek=x,ik=sb,nk=Em,ok=ob,rk=Q_,sk=rt,ak=Ho.enforce,lk=d,hk=Eo,dk=Object,ck=Array.isArray,uk=dk.isExtensible,fk=dk.isFrozen,pk=dk.isSealed,vk=dk.freeze,gk=dk.seal,yk={},mk={},bk=!tk.ActiveXObject&&"ActiveXObject"in tk,wk=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},xk=ok("WeakMap",wk,rk),_k=xk.prototype,kk=ek(_k.set);if(hk)if(bk){Z_=rk.getConstructor(wk,"WeakMap",!0),nk.enable();var Ek=ek(_k.delete),Ok=ek(_k.has),Ck=ek(_k.get);ik(_k,{delete:function(t){if(sk(t)&&!uk(t)){var e=ak(this);return e.frozen||(e.frozen=new Z_),Ek(this,t)||e.frozen.delete(t)}return Ek(this,t)},has:function(t){if(sk(t)&&!uk(t)){var e=ak(this);return e.frozen||(e.frozen=new Z_),Ok(this,t)||e.frozen.has(t)}return Ok(this,t)},get:function(t){if(sk(t)&&!uk(t)){var e=ak(this);return e.frozen||(e.frozen=new Z_),Ok(this,t)?Ck(this,t):e.frozen.get(t)}return Ck(this,t)},set:function(t,e){if(sk(t)&&!uk(t)){var i=ak(this);i.frozen||(i.frozen=new Z_),Ok(this,t)?kk(this,t,e):i.frozen.set(t,e)}else kk(this,t,e);return this}})}else J_&&lk((function(){var t=vk([]);return kk(new xk,t,1),!fk(t)}))&&ik(_k,{set:function(t,e){var i;return ck(t)&&(fk(t)?i=yk:pk(t)&&(i=mk)),kk(this,t,e),i===yk&&vk(t),i===mk&&gk(t),this}});var Sk,Tk,Pk,Ik,Mk,Dk=aO(st.WeakMap);function HT(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)}function WT(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i}function qT(t,e){var i=void 0!==of&&pl(t)||t["@@iterator"];if(!i){if(mf(t)||(i=UT(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function UT(t,e){var i;if(t){if("string"==typeof t)return VT(t,e);var n=cf(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Xa(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VT(t,e):void 0}}function VT(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function YT(t,e){var i,n=new D_,o=qT(e);try{for(o.s();!(i=o.n()).done;){var r=i.value;t.has(r)||n.add(r)}}catch(s){o.e(s)}finally{o.f()}return n}"function"==typeof SuppressedError&&SuppressedError;var Ak=function(){function t(){bO(this,t),Sk.set(this,new D_),Tk.set(this,new D_)}return EO(t,[{key:"size",get:function(){return HT(this,Tk,"f").size}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var n=0,o=e;n<o.length;n++){var r=o[n];HT(this,Tk,"f").add(r)}}},{key:"delete",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var n=0,o=e;n<o.length;n++){var r=o[n];HT(this,Tk,"f").delete(r)}}},{key:"clear",value:function(){HT(this,Tk,"f").clear()}},{key:"getSelection",value:function(){return BO(HT(this,Tk,"f"))}},{key:"getChanges",value:function(){return{added:BO(YT(HT(this,Sk,"f"),HT(this,Tk,"f"))),deleted:BO(YT(HT(this,Tk,"f"),HT(this,Sk,"f"))),previous:BO(new D_(HT(this,Sk,"f"))),current:BO(new D_(HT(this,Tk,"f")))}}},{key:"commit",value:function(){var t=this.getChanges();WT(this,Sk,HT(this,Tk,"f"),"f"),WT(this,Tk,new D_(HT(this,Sk,"f")),"f");var e,i=qT(t.added);try{for(i.s();!(e=i.n()).done;){e.value.select()}}catch(r){i.e(r)}finally{i.f()}var n,o=qT(t.deleted);try{for(o.s();!(n=o.n()).done;){n.value.unselect()}}catch(r){o.e(r)}finally{o.f()}return t}}]),t}();Sk=new Dk,Tk=new Dk;var Bk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};bO(this,t),Pk.set(this,new Ak),Ik.set(this,new Ak),Mk.set(this,void 0),WT(this,Mk,e,"f")}return EO(t,[{key:"sizeNodes",get:function(){return HT(this,Pk,"f").size}},{key:"sizeEdges",get:function(){return HT(this,Ik,"f").size}},{key:"getNodes",value:function(){return HT(this,Pk,"f").getSelection()}},{key:"getEdges",value:function(){return HT(this,Ik,"f").getSelection()}},{key:"addNodes",value:function(){var t;(t=HT(this,Pk,"f")).add.apply(t,arguments)}},{key:"addEdges",value:function(){var t;(t=HT(this,Ik,"f")).add.apply(t,arguments)}},{key:"deleteNodes",value:function(t){HT(this,Pk,"f").delete(t)}},{key:"deleteEdges",value:function(t){HT(this,Ik,"f").delete(t)}},{key:"clear",value:function(){HT(this,Pk,"f").clear(),HT(this,Ik,"f").clear()}},{key:"commit",value:function(){for(var t,e,i={nodes:HT(this,Pk,"f").commit(),edges:HT(this,Ik,"f").commit()},n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=HT(this,Mk,"f")).call.apply(t,df(e=[this,i]).call(e,o)),i}}]),t}();function XT(t,e){var i=void 0!==of&&pl(t)||t["@@iterator"];if(!i){if(mf(t)||(i=$T(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function $T(t,e){var i;if(t){if("string"==typeof t)return GT(t,e);var n=cf(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Xa(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?GT(t,e):void 0}}function GT(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}Pk=new Dk,Ik=new Dk,Mk=new Dk;var Fk=function(){function t(e,i){var n=this;bO(this,t),this.body=e,this.canvas=i,this._selectionAccumulator=new Bk,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},En(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",(function(){n.updateSelection()}))}return EO(t,[{key:"setOptions",value:function(t){if(void 0!==t){NC(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,t)}}},{key:"selectOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);this.unselectAll(),void 0!==i&&(e=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return e}},{key:"selectAdditionalOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);void 0!==i&&(e=!0,!0===i.isSelected()?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return e}},{key:"_initBaseEvent",value:function(t,e){var i={};return i.pointer={DOM:{x:e.x,y:e.y},canvas:this.canvas.DOMtoCanvas(e)},i.event=t,i}},{key:"generateClickEvent",value:function(t,e,i,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=this._initBaseEvent(e,i);if(!0===o)r.nodes=[],r.edges=[];else{var s=this.getSelection();r.nodes=s.nodes,r.edges=s.edges}void 0!==n&&(r.previousSelection=n),"click"==t&&(r.items=this.getClickedItems(i)),void 0!==e.controlEdge&&(r.controlEdge=e.controlEdge),this.body.emitter.emit(t,r)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;if(void 0!==t){if(t instanceof Tx){var i;if(!0===e)(i=this._selectionAccumulator).addEdges.apply(i,BO(t.edges));this._selectionAccumulator.addNodes(t)}else this._selectionAccumulator.addEdges(t);return!0}return!1}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],i=this.body.nodes,n=0;n<this.body.nodeIndices.length;n++){var o=this.body.nodeIndices[n];i[o].isOverlappingWith(t)&&e.push(o)}return e}},{key:"_pointerToPositionObject",value:function(t){var e=this.canvas.DOMtoCanvas(t);return{left:e.x-1,top:e.y+1,right:e.x+1,bottom:e.y-1}}},{key:"getNodeAt",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(t),n=this._getAllNodesOverlappingWith(i);return n.length>0?!0===e?this.body.nodes[n[n.length-1]]:n[n.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,n=0;n<this.body.edgeIndices.length;n++){var o=this.body.edgeIndices[n];i[o].isOverlappingWith(t)&&e.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(t){var e=[];return this._getEdgesOverlappingWith(t,e),e}},{key:"getEdgeAt",value:function(t){for(var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(t),n=10,o=null,r=this.body.edges,s=0;s<this.body.edgeIndices.length;s++){var a=this.body.edgeIndices[s],l=r[a];if(l.connected){var h=l.from.x,d=l.from.y,c=l.to.x,u=l.to.y,f=l.edgeType.getDistanceToEdge(h,d,c,u,i.x,i.y);f<n&&(o=a,n=f)}}return null!==o?!0===e?this.body.edges[o]:o:void 0}},{key:"_addToHover",value:function(t){t instanceof Tx?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t}},{key:"_removeFromSelection",value:function(t){var e;t instanceof Tx?(this._selectionAccumulator.deleteNodes(t),(e=this._selectionAccumulator).deleteEdges.apply(e,BO(t.edges))):this._selectionAccumulator.deleteEdges(t)}},{key:"unselectAll",value:function(){this._selectionAccumulator.clear()}},{key:"getSelectedNodeCount",value:function(){return this._selectionAccumulator.sizeNodes}},{key:"getSelectedEdgeCount",value:function(){return this._selectionAccumulator.sizeEdges}},{key:"_hoverConnectedEdges",value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.hover=!0,this._addToHover(i)}}},{key:"emitBlurEvent",value:function(t,e,i){var n=this._initBaseEvent(t,e);!0===i.hover&&(i.hover=!1,i instanceof Tx?(n.node=i.id,this.body.emitter.emit("blurNode",n)):(n.edge=i.id,this.body.emitter.emit("blurEdge",n)))}},{key:"emitHoverEvent",value:function(t,e,i){var n=this._initBaseEvent(t,e),o=!1;return!1===i.hover&&(i.hover=!0,this._addToHover(i),o=!0,i instanceof Tx?(n.node=i.id,this.body.emitter.emit("hoverNode",n)):(n.edge=i.id,this.body.emitter.emit("hoverEdge",n))),o}},{key:"hoverObject",value:function(t,e){var i=this.getNodeAt(e);void 0===i&&(i=this.getEdgeAt(e));var n=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(void 0===i||i instanceof Tx&&i.id!=o||i instanceof c_)&&(this.emitBlurEvent(t,e,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],n=!0);for(var r in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,r)&&(!0===n?(this.hoverObj.edges[r].hover=!1,delete this.hoverObj.edges[r]):(void 0===i||i instanceof c_&&i.id!=r||i instanceof Tx&&!i.hover)&&(this.emitBlurEvent(t,e,this.hoverObj.edges[r]),delete this.hoverObj.edges[r],n=!0));if(void 0!==i){var s=Tf(this.hoverObj.edges).length,a=Tf(this.hoverObj.nodes).length;(n||i instanceof c_&&0===s&&0===a||i instanceof Tx&&0===s&&0===a)&&(n=this.emitHoverEvent(t,e,i)),i instanceof Tx&&!0===this.options.hoverConnectedEdges&&this._hoverConnectedEdges(i)}!0===n&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(t,e){var i=!1,n=this._selectionAccumulator.commit(),o={nodes:n.nodes.previous,edges:n.edges.previous};n.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",e,t,o),i=!0),n.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",e,t,o),i=!0),n.nodes.added.length>0&&(this.generateClickEvent("selectNode",e,t),i=!0),n.edges.added.length>0&&(this.generateClickEvent("selectEdge",e,t),i=!0),!0===i&&this.generateClickEvent("select",e,t)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var t;return Of(t=this._selectionAccumulator.getNodes()).call(t,(function(t){return t.id}))}},{key:"getSelectedEdgeIds",value:function(){var t;return Of(t=this._selectionAccumulator.getEdges()).call(t,(function(t){return t.id}))}},{key:"setSelection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!t.nodes&&!t.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes){var i,n=XT(t.nodes);try{for(n.s();!(i=n.n()).done;){var o=i.value,r=this.body.nodes[o];if(!r)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(r,e.highlightEdges)}}catch(d){n.e(d)}finally{n.f()}}if(t.edges){var s,a=XT(t.edges);try{for(a.s();!(s=a.n()).done;){var l=s.value,h=this.body.edges[l];if(!h)throw new RangeError('Edge with id "'+l+'" not found');this.selectObject(h)}}catch(d){a.e(d)}finally{a.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,t.id)||this._selectionAccumulator.deleteNodes(t);for(var e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),i=[],n=this.body.nodeIndices,o=this.body.nodes,r=n.length-1;r>=0;r--){var s=o[n[r]].getItemsOnPoint(e);i.push.apply(i,s)}for(var a=this.body.edgeIndices,l=this.body.edges,h=a.length-1;h>=0;h--){var d=l[a[h]].getItemsOnPoint(e);i.push.apply(i,d)}return i}}]),t}(),zk=ah,Nk=Math.floor,jk=function(t,e){for(var i,n,o=t.length,r=1;r<o;){for(n=r,i=t[r];n&&e(t[n-1],i)>0;)t[n]=t[--n];n!==r++&&(t[n]=i)}return t},Rk=function(t,e,i,n){for(var o=e.length,r=i.length,s=0,a=0;s<o||a<r;)t[s+a]=s<o&&a<r?n(e[s],i[a])<=0?e[s++]:i[a++]:s<o?e[s++]:i[a++];return t},Lk=function t(e,i){var n=e.length,o=Nk(n/2);return n<8?jk(e,i):Rk(e,t(zk(e,0,o),i),t(zk(e,o),i),i)},Hk=ft.match(/firefox\/(\d+)/i),Wk=!!Hk&&+Hk[1],qk=/MSIE|Trident/.test(ft),Uk=ft.match(/AppleWebKit\/(\d+)\./),Vk=!!Uk&&+Uk[1],Yk=Ai,Xk=x,$k=zt,Gk=te,Kk=Vi,Zk=op,Qk=uo,Jk=d,tE=Lk,eE=Bf,iE=Wk,nE=qk,oE=wt,rE=Vk,sE=[],aE=Xk(sE.sort),lE=Xk(sE.push),hE=Jk((function(){sE.sort(void 0)})),dE=Jk((function(){sE.sort(null)})),cE=eE("sort"),uE=!Jk((function(){if(oE)return oE<70;if(!(iE&&iE>3)){if(nE)return!0;if(rE)return rE<603;var t,e,i,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)sE.push({k:e+n,v:i})}for(sE.sort((function(t,e){return e.v-t.v})),n=0;n<sE.length;n++)e=sE[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));Yk({target:"Array",proto:!0,forced:hE||!dE||!cE||!uE},{sort:function(t){void 0!==t&&$k(t);var e=Gk(this);if(uE)return void 0===t?aE(e):aE(e,t);var i,n,o=[],r=Kk(e);for(n=0;n<r;n++)n in e&&lE(o,e[n]);for(tE(o,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:Qk(e)>Qk(i)?1:-1}}(t)),i=Kk(o),n=0;n<i;)e[n]=o[n++];for(;n<r;)Zk(e,n++);return e}});var fE=Rn("Array").sort,pE=ut,vE=fE,gE=Array.prototype,yE=function(t){var e=t.sort;return t===gE||pE(gE,t)&&e===gE.sort?vE:e},mE=aO(yE),bE=zt,wE=te,xE=G,_E=Vi,kE=TypeError,EE=function(t){return function(e,i,n,o){bE(i);var r=wE(e),s=xE(r),a=_E(r),l=t?a-1:0,h=t?-1:1;if(n<2)for(;;){if(l in s){o=s[l],l+=h;break}if(l+=h,t?l<0:a<=l)throw new kE("Reduce of empty array with no initial value")}for(;t?l>=0:a>l;l+=h)l in s&&(o=i(o,s[l],l,r));return o}},OE={left:EE(!1),right:EE(!0)},CE="process"===O(h.process),SE=OE.left;Ai({target:"Array",proto:!0,forced:!CE&&wt>79&&wt<83||!Bf("reduce")},{reduce:function(t){var e=arguments.length;return SE(this,t,e,e>1?arguments[1]:void 0)}});var TE=Rn("Array").reduce,PE=ut,IE=TE,ME=Array.prototype,DE=function(t){var e=t.reduce;return t===ME||PE(ME,t)&&e===ME.reduce?IE:e},AE=aO(DE);function KT(t){var e=ZT();return function(){var i,n=jS(t);if(e){var o=jS(this).constructor;i=ox(n,arguments,o)}else i=n.apply(this,arguments);return NS(this,i)}}function ZT(){if("undefined"==typeof Reflect||!ox)return!1;if(ox.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ox(Boolean,[],(function(){}))),!0}catch(t){return!1}}var BE=function(){function t(){bO(this,t)}return EO(t,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(t){return this.fake_use(t),this.abstract()}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,i),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),t}(),FE=function(t){FS(i,t);var e=KT(i);function i(t){var n;return bO(this,i),(n=e.call(this)).layout=t,n}return EO(i,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){mE(t).call(t,(function(t,e){return t.x-e.x}))}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),i}(BE),zE=function(t){FS(i,t);var e=KT(i);function i(t){var n;return bO(this,i),(n=e.call(this)).layout=t,n}return EO(i,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){mE(t).call(t,(function(t,e){return t.y-e.y}))}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),i}(BE),NE=Bh.every;Ai({target:"Array",proto:!0,forced:!Bf("every")},{every:function(t){return NE(this,t,arguments.length>1?arguments[1]:void 0)}});var jE=Rn("Array").every,RE=ut,LE=jE,HE=Array.prototype,WE=function(t){var e=t.every;return t===HE||RE(HE,t)&&e===HE.every?LE:e},qE=aO(WE);function QT(t,e){var i=void 0!==of&&pl(t)||t["@@iterator"];if(!i){if(mf(t)||(i=JT(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function JT(t,e){var i;if(t){if("string"==typeof t)return tP(t,e);var n=cf(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Xa(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tP(t,e):void 0}}function tP(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function eP(t,e){var i=new D_;return Vf(t).call(t,(function(t){var e;Vf(e=t.edges).call(e,(function(t){t.connected&&i.add(t)}))})),Vf(i).call(i,(function(t){var i=t.from.id,n=t.to.id;null==e[i]&&(e[i]=0),(null==e[n]||e[i]>=e[n])&&(e[n]=e[i]+1)})),e}function iP(t){return oP((function(e){var i,n;return qE(i=nv(n=e.edges).call(n,(function(e){return t.has(e.toId)}))).call(i,(function(t){return t.to===e}))}),(function(t,e){return e>t}),"from",t)}function nP(t){return oP((function(e){var i,n;return qE(i=nv(n=e.edges).call(n,(function(e){return t.has(e.toId)}))).call(i,(function(t){return t.from===e}))}),(function(t,e){return e<t}),"to",t)}function oP(t,e,i,n){var o,r,s=Rv(null),a=AE(o=BO(Bw(n).call(n))).call(o,(function(t,e){return t+1+e.edges.length}),0),l=i+"Id",h="to"===i?1:-1,d=QT(n);try{var c,u=function(){var o=IO(r.value,2),d=o[0],c=o[1];if(!n.has(d)||!t(c))return 0;s[d]=0;for(var u,f,p=[c],v=0,g=function(){var t,o;if(!n.has(d))return 0;var r=s[u.id]+h;if(Vf(t=nv(o=u.edges).call(o,(function(t){return t.connected&&t.to!==t.from&&t[i]!==u&&n.has(t.toId)&&n.has(t.fromId)}))).call(t,(function(t){var n=t[l],o=s[n];(null==o||e(r,o))&&(s[n]=r,p.push(t[i]))})),v>a)return{v:{v:eP(n,s)}};++v};u=p.pop();)if(0!==(f=g())&&f)return f.v};for(d.s();!(r=d.n()).done;)if(0!==(c=u())&&c)return c.v}catch(f){d.e(f)}finally{d.f()}return s}var UE=function(){function t(){bO(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return EO(t,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(this.parentReference[t].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var e=this,i={};return function t(n){if(void 0!==i[n])return i[n];var o=e.levels[n];if(e.childrenReference[n]){var r=e.childrenReference[n];if(r.length>0)for(var s=0;s<r.length;s++)o=Math.max(o,t(r[s]))}return i[n]=o,o}(t)}},{key:"levelDownstream",value:function(t,e){void 0===this.levels[e.id]&&(void 0===this.levels[t.id]&&(this.levels[t.id]=0),this.levels[e.id]=this.levels[t.id]+1)}},{key:"setMinLevelToZero",value:function(t){var e=1e9;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&void 0!==this.levels[i]&&(e=Math.min(this.levels[i],e));for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&void 0!==this.levels[n]&&(this.levels[n]-=e)}},{key:"getTreeSize",value:function(t,e){var i=1e9,n=-1e9,o=1e9,r=-1e9;for(var s in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,s)&&this.trees[s]===e){var a=t[s];i=Math.min(a.x,i),n=Math.max(a.x,n),o=Math.min(a.y,o),r=Math.max(a.y,r)}return{min_x:i,max_x:n,min_y:o,max_y:r}}},{key:"hasSameParent",value:function(t,e){var i=this.parentReference[t.id],n=this.parentReference[e.id];if(void 0===i||void 0===n)return!1;for(var o=0;o<i.length;o++)for(var r=0;r<n.length;r++)if(i[o]==n[r])return!0;return!1}},{key:"inSameSubNetwork",value:function(t,e){return this.trees[t.id]===this.trees[e.id]}},{key:"getLevels",value:function(){return Tf(this.distributionOrdering)}},{key:"addToOrdering",value:function(t,e){void 0===this.distributionOrdering[e]&&(this.distributionOrdering[e]=[]);var i=!1,n=this.distributionOrdering[e];for(var o in n)if(n[o]===t){i=!0;break}i||(this.distributionOrdering[e].push(t),this.distributionIndex[t.id]=this.distributionOrdering[e].length-1)}}]),t}(),VE=function(){function t(e){bO(this,t),this.body=e,this._resetRNG(Math.random()+":"+Df()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},En(this.options,this.defaultOptions),this.bindEventListeners()}return EO(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("_dataChanged",(function(){t.setupHierarchicalLayout()})),this.body.emitter.on("_dataLoaded",(function(){t.layoutNetwork()})),this.body.emitter.on("_resetHierarchicalLayout",(function(){t.setupHierarchicalLayout()})),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",(function(){if(!0===t.options.hierarchical.enabled){var e=t.direction.curveType();t.body.emitter.emit("_forceDisableDynamicCurves",e,!1)}}))}},{key:"setOptions",value:function(t,e){if(void 0!==t){var i=this.options.hierarchical,n=i.enabled;if(NC(["randomSeed","improvedLayout","clusterThreshold"],this.options,t),eS(this.options,t,"hierarchical"),void 0!==t.randomSeed&&this._resetRNG(t.randomSeed),!0===i.enabled)return!0===n&&this.body.emitter.emit("refresh",!0),"RL"===i.direction||"DU"===i.direction?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===n)return this.body.emitter.emit("refresh"),RC(e,this.optionsBackup)}return e}},{key:"_resetRNG",value:function(t){this.initialRandomSeed=t,this._rng=CC(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===wO(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:i};else{var n=t.edges.smooth;void 0!==n.type&&"dynamic"!==n.type&&(i=n.type),this.optionsBackup.edges={smooth:{enabled:void 0===n.enabled||n.enabled,type:void 0===n.type?"dynamic":n.type,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}},t.edges.smooth={enabled:void 0===n.enabled||n.enabled,type:i,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return t}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this._resetRNG(this.initialRandomSeed);for(var e=t.length+50,i=0;i<t.length;i++){var n=t[i],o=2*Math.PI*this._rng();void 0===n.x&&(n.x=e*Math.cos(o)),void 0===n.y&&(n.y=e*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(!0!==this.options.hierarchical.enabled&&!0===this.options.improvedLayout){for(var t=this.body.nodeIndices,e=0,i=0;i<t.length;i++){!0===this.body.nodes[t[i]].predefinedPosition&&(e+=1)}if(e<.5*t.length){var n=0,o=this.options.clusterThreshold,r={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(t.length>o){for(var s=t.length;t.length>o&&n<=10;){n+=1;var a=t.length;if(n%3==0?this.body.modules.clustering.clusterBridges(r):this.body.modules.clustering.clusterOutliers(r),a==t.length&&n%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*s)})}n>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var l=0;l<t.length;l++){var h=this.body.nodes[t[l]];!1===h.predefinedPosition&&(h.x+=70*(.5-this._rng()),h.y+=70*(.5-this._rng()))}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var t=k_.getRangeCore(this.body.nodes,this.body.nodeIndices),e=k_.findCenter(t),i=0;i<this.body.nodeIndices.length;i++){var n=this.body.nodes[this.body.nodeIndices[i]];n.x-=e.x,n.y-=e.y}}},{key:"_declusterAll",value:function(){for(var t=!0;!0===t;){t=!1;for(var e=0;e<this.body.nodeIndices.length;e++)!0===this.body.nodes[this.body.nodeIndices[e]].isCluster&&(t=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[e],{},!1));!0===t&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(!0===this.options.hierarchical.enabled&&this.body.nodeIndices.length>0){var t,e,i=!1,n=!1;for(e in this.lastNodeOnLevel={},this.hierarchical=new UE,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&(void 0!==(t=this.body.nodes[e]).options.level?(i=!0,this.hierarchical.levels[e]=t.options.level):n=!0);if(!0===n&&!0===i)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===n){var o=this.options.hierarchical.sortMethod;"hubsize"===o?this._determineLevelsByHubsize():"directed"===o?this._determineLevelsDirected():"custom"===o&&this._determineLevelsCustomCallback()}for(var r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.hierarchical.ensureLevel(r);var s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},n=function(e,i){var n=t.hierarchical.trees;for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&n[o]===e&&t.direction.shift(o,i)},o=function(){for(var e=[],i=0;i<t.hierarchical.numTrees();i++)e.push(t.direction.getTreeSize(i));return e},r=function e(i,n){if(!n[i.id]&&(n[i.id]=!0,t.hierarchical.childrenReference[i.id])){var o=t.hierarchical.childrenReference[i.id];if(o.length>0)for(var r=0;r<o.length;r++)e(t.body.nodes[o[r]],n)}},s=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e9,n=1e9,o=1e9,r=1e9,s=-1e9;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=t.body.nodes[a],h=t.hierarchical.levels[l.id],d=t.direction.getPosition(l),c=IO(t._getSpaceAroundNode(l,e),2),u=c[0],f=c[1];n=Math.min(u,n),o=Math.min(f,o),h<=i&&(r=Math.min(d,r),s=Math.max(d,s))}return[r,s,n,o]},a=function(e,i,n){for(var o=t.hierarchical,r=0;r<i.length;r++){var s=i[r],a=o.distributionOrdering[s];if(a.length>1)for(var l=0;l<a.length-1;l++){var h=a[l],d=a[l+1];o.hasSameParent(h,d)&&o.inSameSubNetwork(h,d)&&e(h,d,n)}}},l=function(i,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=t.direction.getPosition(i),l=t.direction.getPosition(n),h=Math.abs(l-a),d=t.options.hierarchical.nodeSpacing;if(h>d){var c={},u={};r(i,c),r(n,u);var f=function(e,i){var n=t.hierarchical.getMaxLevel(e.id),o=t.hierarchical.getMaxLevel(i.id);return Math.min(n,o)}(i,n),p=s(c,f),v=s(u,f),g=p[1],y=v[0],m=v[2];if(Math.abs(g-y)>d){var b=g-y+d;b<-m+d&&(b=-m+d),b<0&&(t._shiftBlock(n.id,b),e=!0,!0===o&&t._centerParent(n))}}},h=function(n,o){for(var a=o.id,l=o.edges,h=t.hierarchical.levels[o.id],d=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,c={},u=[],f=0;f<l.length;f++){var p=l[f];if(p.toId!=p.fromId){var v=p.toId==a?p.from:p.to;c[l[f].id]=v,t.hierarchical.levels[v.id]<h&&u.push(p)}}var g=function(e,i){for(var n=0,o=0;o<i.length;o++)if(void 0!==c[i[o].id]){var r=t.direction.getPosition(c[i[o].id])-e;n+=r/Math.sqrt(r*r+d)}return n},y=function(e,i){for(var n=0,o=0;o<i.length;o++)if(void 0!==c[i[o].id]){var r=t.direction.getPosition(c[i[o].id])-e;n-=d*Math.pow(r*r+d,-1.5)}return n},m=function(e,i){for(var n=t.direction.getPosition(o),r={},s=0;s<e;s++){var a=g(n,i),l=y(n,i);if(void 0!==r[n-=Math.max(-40,Math.min(40,Math.round(a/l)))])break;r[n]=s}return n},b=m(n,u);!function(n){var a=t.direction.getPosition(o);if(void 0===i[o.id]){var l={};r(o,l),i[o.id]=l}var h=s(i[o.id]),d=h[2],c=h[3],u=n-a,f=0;u>0?f=Math.min(u,c-t.options.hierarchical.nodeSpacing):u<0&&(f=-Math.min(-u,d-t.options.hierarchical.nodeSpacing)),0!=f&&(t._shiftBlock(o.id,f),e=!0)}(b),function(i){var n=t.direction.getPosition(o),r=IO(t._getSpaceAroundNode(o),2),s=r[0],a=r[1],l=i-n,h=n;l>0?h=Math.min(n+(a-t.options.hierarchical.nodeSpacing),i):l<0&&(h=Math.max(n-(s-t.options.hierarchical.nodeSpacing),i)),h!==n&&(t.direction.setPosition(o,h),e=!0)}(b=m(n,l))};!0===this.options.hierarchical.blockShifting&&(function(i){var n=t.hierarchical.getLevels();n=ep(n).call(n);for(var o=0;o<i&&(e=!1,a(l,n,!0),!0===e);o++);}(5),function(){for(var e in t.body.nodes)Object.prototype.hasOwnProperty.call(t.body.nodes,e)&&t._centerParent(t.body.nodes[e])}()),!0===this.options.hierarchical.edgeMinimization&&function(i){var n=t.hierarchical.getLevels();n=ep(n).call(n);for(var o=0;o<i;o++){e=!1;for(var r=0;r<n.length;r++)for(var s=n[r],a=t.hierarchical.distributionOrdering[s],l=0;l<a.length;l++)h(1e3,a[l]);if(!0!==e)break}}(20),!0===this.options.hierarchical.parentCentralization&&function(){var e=t.hierarchical.getLevels();e=ep(e).call(e);for(var i=0;i<e.length;i++)for(var n=e[i],o=t.hierarchical.distributionOrdering[n],r=0;r<o.length;r++)t._centerParent(o[r])}(),function(){for(var e=o(),i=0,r=0;r<e.length-1;r++){i+=e[r].max-e[r+1].min+t.options.hierarchical.treeSpacing,n(r+1,i)}}()}},{key:"_getSpaceAroundNode",value:function(t,e){var i=!0;void 0===e&&(i=!1);var n=this.hierarchical.levels[t.id];if(void 0!==n){var o=this.hierarchical.distributionIndex[t.id],r=this.direction.getPosition(t),s=this.hierarchical.distributionOrdering[n],a=1e9,l=1e9;if(0!==o){var h=s[o-1];if(!0===i&&void 0===e[h.id]||!1===i)a=r-this.direction.getPosition(h)}if(o!=s.length-1){var d=s[o+1];if(!0===i&&void 0===e[d.id]||!1===i){var c=this.direction.getPosition(d);l=Math.min(l,c-r)}}return[a,l]}return[0,0]}},{key:"_centerParent",value:function(t){if(this.hierarchical.parentReference[t.id])for(var e=this.hierarchical.parentReference[t.id],i=0;i<e.length;i++){var n=e[i],o=this.body.nodes[n],r=this.hierarchical.childrenReference[n];if(void 0!==r){var s=this._getCenterPosition(r),a=this.direction.getPosition(o),l=IO(this._getSpaceAroundNode(o),2),h=l[0],d=l[1],c=a-s;(c<0&&Math.abs(c)<d-this.options.hierarchical.nodeSpacing||c>0&&Math.abs(c)<h-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,s)}}}},{key:"_placeNodesByHierarchy",value:function(t){for(var e in this.positionedNodes={},t)if(Object.prototype.hasOwnProperty.call(t,e)){var i,n=Tf(t[e]);n=this._indexArrayToNodes(n),mE(i=this.direction).call(i,n);for(var o=0,r=0;r<n.length;r++){var s=n[r];if(void 0===this.positionedNodes[s.id]){var a=this.options.hierarchical.nodeSpacing,l=a*o;o>0&&(l=this.direction.getPosition(n[r-1])+a),this.direction.setPosition(s,l,e),this._validatePositionAndContinue(s,e,l),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){var i,n=this.hierarchical.childrenReference[t];if(void 0!==n){for(var o=[],r=0;r<n.length;r++)o.push(this.body.nodes[n[r]]);mE(i=this.direction).call(i,o);for(var s=0;s<o.length;s++){var a=o[s],l=this.hierarchical.levels[a.id];if(!(l>e&&void 0===this.positionedNodes[a.id]))return;var h=this.options.hierarchical.nodeSpacing,d=void 0;d=0===s?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(o[s-1])+h,this.direction.setPosition(a,d,l),this._validatePositionAndContinue(a,l,d)}var c=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[t],c,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,i){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(i-n<this.options.hierarchical.nodeSpacing){var o=n+this.options.hierarchical.nodeSpacing-i,r=this._findCommonParent(this.lastNodeOnLevel[e],t.id);this._shiftBlock(r.withChild,o)}}this.lastNodeOnLevel[e]=t.id,this.positionedNodes[t.id]=!0,this._placeBranchNodes(t.id,e)}}},{key:"_indexArrayToNodes",value:function(t){for(var e=[],i=0;i<t.length;i++)e.push(this.body.nodes[t[i]]);return e}},{key:"_getDistribution",value:function(){var t,e,i={};for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){e=this.body.nodes[t];var n=void 0===this.hierarchical.levels[t]?0:this.hierarchical.levels[t];this.direction.fix(e,n),void 0===i[n]&&(i[n]={}),i[n][t]=e}return i}},{key:"_getActiveEdges",value:function(t){var e=this,i=[];return WC(t.edges,(function(t){var n;-1!==zv(n=e.body.edgeIndices).call(n,t.id)&&i.push(t)})),i}},{key:"_getHubSizes",value:function(){var t=this,e={};WC(this.body.nodeIndices,(function(i){var n=t.body.nodes[i],o=t._getActiveEdges(n).length;e[o]=!0}));var i=[];return WC(e,(function(t){i.push(Number(t))})),mE(i).call(i,(function(t,e){return e-t})),i}},{key:"_determineLevelsByHubsize",value:function(){for(var t=this,e=function(e,i){t.hierarchical.levelDownstream(e,i)},i=this._getHubSizes(),n=function(){var n=i[o];if(0===n)return 1;WC(t.body.nodeIndices,(function(i){var o=t.body.nodes[i];n===t._getActiveEdges(o).length&&t._crawlNetwork(e,i)}))},o=0;o<i.length&&!n();++o);}},{key:"_determineLevelsCustomCallback",value:function(){var t=this;this._crawlNetwork((function(e,i,n){var o=t.hierarchical.levels[e.id];void 0===o&&(o=t.hierarchical.levels[e.id]=1e5);var r=(k_.cloneOptions(e,"node"),k_.cloneOptions(i,"node"),void k_.cloneOptions(n,"edge"));t.hierarchical.levels[i.id]=o+r})),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var t,e=this,i=AE(t=this.body.nodeIndices).call(t,(function(t,i){return t.set(i,e.body.nodes[i]),t}),new Cb);"roots"===this.options.hierarchical.shakeTowards?this.hierarchical.levels=nP(i):this.hierarchical.levels=iP(i),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var t=this;this._crawlNetwork((function(e,i){t.hierarchical.levels[i.id]>t.hierarchical.levels[e.id]&&t.hierarchical.addRelation(e.id,i.id)})),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0,n={},o=function i(o,r){if(void 0===n[o.id]){var s;t.hierarchical.setTreeIndex(o,r),n[o.id]=!0;for(var a=t._getActiveEdges(o),l=0;l<a.length;l++){var h=a[l];!0===h.connected&&(s=h.toId==o.id?h.from:h.to,o.id!=s.id&&(e(o,s,h),i(s,r)))}}};if(void 0===i)for(var r=0,s=0;s<this.body.nodeIndices.length;s++){var a=this.body.nodeIndices[s];if(void 0===n[a])o(this.body.nodes[a],r),r+=1}else{var l=this.body.nodes[i];if(void 0===l)return void console.error("Node not found:",i);o(l)}}},{key:"_shiftBlock",value:function(t,e){var i=this,n={};!function t(o){if(!n[o]){n[o]=!0,i.direction.shift(o,e);var r=i.hierarchical.childrenReference[o];if(void 0!==r)for(var s=0;s<r.length;s++)t(r[s])}}(t)}},{key:"_findCommonParent",value:function(t,e){var i=this,n={};return function t(e,n){var o=i.hierarchical.parentReference[n];if(void 0!==o)for(var r=0;r<o.length;r++){var s=o[r];e[s]=!0,t(e,s)}}(n,t),function t(e,n){var o=i.hierarchical.parentReference[n];if(void 0!==o)for(var r=0;r<o.length;r++){var s=o[r];if(void 0!==e[s])return{foundParent:s,withChild:n};var a=t(e,s);if(null!==a.foundParent)return a}return{foundParent:null,withChild:n}}(n,e)}},{key:"setDirectionStrategy",value:function(){var t="UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction;this.direction=t?new FE(this):new zE(this)}},{key:"_getCenterPosition",value:function(t){for(var e=1e9,i=-1e9,n=0;n<t.length;n++){var o=void 0;if(void 0!==t[n].id)o=t[n];else{var r=t[n];o=this.body.nodes[r]}var s=this.direction.getPosition(o);e=Math.min(e,s),i=Math.max(i,s)}return.5*(e+i)}}]),t}();function rP(t,e){var i=void 0!==of&&pl(t)||t["@@iterator"];if(!i){if(mf(t)||(i=sP(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function sP(t,e){var i;if(t){if("string"==typeof t)return aP(t,e);var n=cf(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Xa(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aP(t,e):void 0}}function aP(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var YE=function(){function t(e,i,n,o){var r,s,a=this;bO(this,t),this.body=e,this.canvas=i,this.selectionHandler=n,this.interactionHandler=o,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},En(this.options,this.defaultOptions),this.body.emitter.on("destroy",(function(){a._clean()})),this.body.emitter.on("_dataChanged",Yn(r=this._restore).call(r,this)),this.body.emitter.on("_resetData",Yn(s=this._restore).call(s,this))}return EO(t,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(t,e,i){void 0!==e&&(void 0!==e.locale?this.options.locale=e.locale:this.options.locale=i.locale,void 0!==e.locales?this.options.locales=e.locales:this.options.locales=i.locales),void 0!==t&&("boolean"==typeof t?this.options.enabled=t:(this.options.enabled=!0,RC(this.options,t)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){var t,e;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var i=this.selectionHandler.getSelectedNodeCount(),n=this.selectionHandler.getSelectedEdgeCount(),o=i+n,r=this.options.locales[this.options.locale],s=!1;!1!==this.options.addNode&&(this._createAddNodeButton(r),s=!0),!1!==this.options.addEdge&&(!0===s?this._createSeperator(1):s=!0,this._createAddEdgeButton(r)),1===i&&"function"==typeof this.options.editNode?(!0===s?this._createSeperator(2):s=!0,this._createEditNodeButton(r)):1===n&&0===i&&!1!==this.options.editEdge&&(!0===s?this._createSeperator(3):s=!0,this._createEditEdgeButton(r)),0!==o&&(i>0&&!1!==this.options.deleteNode||0===i&&!1!==this.options.deleteEdge)&&(!0===s&&this._createSeperator(4),this._createDeleteButton(r)),this._bindElementEvents(this.closeDiv,Yn(t=this.toggleEditMode).call(t,this)),this._temporaryBindEvent("select",Yn(e=this.showManipulatorToolbar).call(e,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var t;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled){var e,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,Yn(e=this.toggleEditMode).call(e,this))}this._temporaryBindEvent("click",Yn(t=this._performAddNode).call(t,this))}},{key:"editNode",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var e=this.selectionHandler.getSelectedNodes()[0];if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==e.isCluster){var i=RC({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,(function(e){null!=e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()}))}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var t,e,i,n,o;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled){var r,s=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(s),this._createSeperator(),this._createDescription(s.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,Yn(r=this.toggleEditMode).call(r,this))}this._temporaryBindUI("onTouch",Yn(t=this._handleConnect).call(t,this)),this._temporaryBindUI("onDragEnd",Yn(e=this._finishConnect).call(e,this)),this._temporaryBindUI("onDrag",Yn(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",Yn(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",Yn(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",(function(){}))}},{key:"editEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"!==wO(this.options.editEdge)||"function"!=typeof this.options.editEdge.editWithoutDrag||(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],void 0===this.edgeBeingEditedId)){if(!0===this.guiEnabled){var t,e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,Yn(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],void 0!==this.edgeBeingEditedId){var i,n,o,r,s=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(s.from.x,s.from.y),l=this._getNewTargetNode(s.to.x,s.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(l.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[l.id]=l,this.body.nodeIndices.push(l.id),this._temporaryBindUI("onTouch",Yn(i=this._controlNodeTouch).call(i,this)),this._temporaryBindUI("onTap",(function(){})),this._temporaryBindUI("onHold",(function(){})),this._temporaryBindUI("onDragStart",Yn(n=this._controlNodeDragStart).call(n,this)),this._temporaryBindUI("onDrag",Yn(o=this._controlNodeDrag).call(o,this)),this._temporaryBindUI("onDragEnd",Yn(r=this._controlNodeDragEnd).call(r,this)),this._temporaryBindUI("onMouseMove",(function(){})),this._temporaryBindEvent("beforeDrawing",(function(t){var e=s.edgeType.findBorderPositions(t);!1===a.selected&&(a.x=e.from.x,a.y=e.from.y),!1===l.selected&&(l.x=e.to.x,l.y=e.to.y)})),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}else{var h=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(h.from.id,h.to.id)}}},{key:"deleteSelected",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodeIds(),i=this.selectionHandler.getSelectedEdgeIds(),n=void 0;if(e.length>0){for(var o=0;o<e.length;o++)if(!0===this.body.nodes[e[o]].isCluster)return void alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);"function"==typeof this.options.deleteNode&&(n=this.options.deleteNode)}else i.length>0&&"function"==typeof this.options.deleteEdge&&(n=this.options.deleteEdge);if("function"==typeof n){var r={nodes:e,edges:i};if(2!==n.length)throw new Error("The function for delete does not support two arguments (data, callback)");n(r,(function(e){null!=e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){var t,e;(void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv)&&(this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",null!==(t=null===(e=this.options.locales[this.options.locale])||void 0===e?void 0:e.close)&&void 0!==t?t:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=RC({},this.options.controlNodeStyle);i.id="targetNode"+DT(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var n=this.body.functions.createNode(i);return n.shape.boundingBox={left:t,right:t,top:e,bottom:e},n}},{key:"_createEditButton",value:function(){var t;this._clean(),this.manipulationDOM={},DC(this.editModeDiv);var e=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",e.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,Yn(t=this.toggleEditMode).call(t,this))}},{key:"_clean",value:function(){this.inMode=!1,!0===this.guiEnabled&&(DC(this.editModeDiv),DC(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var t,e,i=rP(kp(t=this._domEventListenerCleanupQueue).call(t,0));try{for(i.s();!(e=i.n()).done;){(0,e.value)()}}catch(n){i.e(n)}finally{i.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),DC(this.manipulationDiv),DC(this.editModeDiv),DC(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+t]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+t].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+t])}},{key:"_createAddNodeButton",value:function(t){var e,i=this._createButton("addNode","vis-add",t.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,Yn(e=this.addNodeMode).call(e,this))}},{key:"_createAddEdgeButton",value:function(t){var e,i=this._createButton("addEdge","vis-connect",t.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,Yn(e=this.addEdgeMode).call(e,this))}},{key:"_createEditNodeButton",value:function(t){var e,i=this._createButton("editNode","vis-edit",t.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,Yn(e=this.editNode).call(e,this))}},{key:"_createEditEdgeButton",value:function(t){var e,i=this._createButton("editEdge","vis-edit",t.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,Yn(e=this.editEdgeMode).call(e,this))}},{key:"_createDeleteButton",value:function(t){var e,i;i=this.options.rtl?"vis-delete-rtl":"vis-delete";var n=this._createButton("delete",i,t.del||this.options.locales.en.del);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,Yn(e=this.deleteSelected).call(e,this))}},{key:"_createBackButton",value:function(t){var e,i=this._createButton("back","vis-back",t.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,Yn(e=this.showManipulatorToolbar).call(e,this))}},{key:"_createButton",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[t+"Div"]=document.createElement("button"),this.manipulationDOM[t+"Div"].className="vis-button "+e,this.manipulationDOM[t+"Label"]=document.createElement("div"),this.manipulationDOM[t+"Label"].className=n,this.manipulationDOM[t+"Label"].innerText=i,this.manipulationDOM[t+"Div"].appendChild(this.manipulationDOM[t+"Label"]),this.manipulationDOM[t+"Div"]}},{key:"_createDescription",value:function(t){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=t,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(t,e){this.temporaryEventFunctions.push({event:t,boundFunction:e}),this.body.emitter.on(t,e)}},{key:"_temporaryBindUI",value:function(t,e){if(void 0===this.body.eventListeners[t])throw new Error("This UI function does not exist. Typo? You tried: "+t+" possible are: "+qv(Tf(this.body.eventListeners)));this.temporaryUIFunctions[t]=this.body.eventListeners[t],this.body.eventListeners[t]=e}},{key:"_unbindTemporaryUIs",value:function(){for(var t in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,t)&&(this.body.eventListeners[t]=this.temporaryUIFunctions[t],delete this.temporaryUIFunctions[t]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var t=0;t<this.temporaryEventFunctions.length;t++){var e=this.temporaryEventFunctions[t].event,i=this.temporaryEventFunctions[t].boundFunction;this.body.emitter.off(e,i)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(t,e){var i=new jy(t,{});BT(i,e),this._domEventListenerCleanupQueue.push((function(){i.destroy()}));var n=function(t){var i=t.keyCode,n=t.key;"Enter"!==n&&" "!==n&&13!==i&&32!==i||e()};t.addEventListener("keyup",n,!1),this._domEventListenerCleanupQueue.push((function(){t.removeEventListener("keyup",n,!1)}))}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var t=0;t<this.temporaryIds.edges.length;t++){var e;this.body.edges[this.temporaryIds.edges[t]].disconnect(),delete this.body.edges[this.temporaryIds.edges[t]];var i,n=zv(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[t]);if(-1!==n)kp(i=this.body.edgeIndices).call(i,n,1)}for(var o=0;o<this.temporaryIds.nodes.length;o++){var r;delete this.body.nodes[this.temporaryIds.nodes[o]];var s,a=zv(r=this.body.nodeIndices).call(r,this.temporaryIds.nodes[o]);if(-1!==a)kp(s=this.body.nodeIndices).call(s,a,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(t){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=En({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var t=this.lastTouch,e=this.selectionHandler._pointerToPositionObject(t),i=this.body.nodes[this.temporaryIds.nodes[0]],n=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var r=i.isOverlappingWith(e),s=n.isOverlappingWith(e);!0===r?(this.selectedControlNode=i,o.edgeType.from=i):!0===s&&(this.selectedControlNode=n,o.edgeType.to=n),void 0!==this.selectedControlNode&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(t){this.body.emitter.emit("disablePhysics");var e=this.body.functions.getPointer(t.center),i=this.canvas.DOMtoCanvas(e);void 0!==this.selectedControlNode?(this.selectedControlNode.x=i.x,this.selectedControlNode.y=i.y):this.interactionHandler.onDrag(t),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),n=this.body.edges[this.edgeBeingEditedId];if(void 0!==this.selectedControlNode){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),r=void 0,s=o.length-1;s>=0;s--)if(o[s]!==this.selectedControlNode.id){r=this.body.nodes[o[s]];break}if(void 0!==r&&void 0!==this.selectedControlNode)if(!0===r.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(r.id,n.to.id):this._performEditEdge(n.from.id,r.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=En({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(!0===i.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);var o=this.body.functions.createEdge({id:"connectionEdge"+DT(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(o.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),n=void 0;void 0!==this.temporaryIds.edges[0]&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),r=void 0,s=o.length-1;s>=0;s--){var a;if(-1===zv(a=this.temporaryIds.nodes).call(a,o[s])){r=this.body.nodes[o[s]];break}}if(t.controlEdge={from:n,to:r?r.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",t,e),void 0!==this.temporaryIds.nodes[0]){var l=this.body.nodes[this.temporaryIds.nodes[0]];l.x=this.canvas._XconvertDOMtoCanvas(e.x),l.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(t)}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),n=void 0;void 0!==this.temporaryIds.edges[0]&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),r=void 0,s=o.length-1;s>=0;s--){var a;if(-1===zv(a=this.temporaryIds.nodes).call(a,o[s])){r=this.body.nodes[o[s]];break}}this._cleanupTemporaryNodesAndEdges(),void 0!==r&&(!0===r.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[n]&&void 0!==this.body.nodes[r.id]&&this._performAddEdge(n,r.id)),t.controlEdge={from:n,to:r?r.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",t,e),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(t){var e=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",t,e,void 0,!0)}},{key:"_performAddNode",value:function(t){var e=this,i={id:DT(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,(function(t){null!=t&&"addNode"===e.inMode&&e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar()}))}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,n={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(n,(function(t){null!=t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,n={id:this.edgeBeingEditedId,from:t,to:e,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if("object"===wO(o)&&(o=o.editWithoutDrag),"function"==typeof o){if(2!==o.length)throw new Error("The function for edit does not support two arguments (data, callback)");o(n,(function(t){null==t||"editEdge"!==i.inMode?(i.body.edges[n.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}(),XE="string",$E="boolean",GE="number",KE="array",ZE="object",QE=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],JE={borderWidth:{number:GE},borderWidthSelected:{number:GE,undefined:"undefined"},brokenImage:{string:XE,undefined:"undefined"},chosen:{label:{boolean:$E,function:"function"},node:{boolean:$E,function:"function"},__type__:{object:ZE,boolean:$E}},color:{border:{string:XE},background:{string:XE},highlight:{border:{string:XE},background:{string:XE},__type__:{object:ZE,string:XE}},hover:{border:{string:XE},background:{string:XE},__type__:{object:ZE,string:XE}},__type__:{object:ZE,string:XE}},opacity:{number:GE,undefined:"undefined"},fixed:{x:{boolean:$E},y:{boolean:$E},__type__:{object:ZE,boolean:$E}},font:{align:{string:XE},color:{string:XE},size:{number:GE},face:{string:XE},background:{string:XE},strokeWidth:{number:GE},strokeColor:{string:XE},vadjust:{number:GE},multi:{boolean:$E,string:XE},bold:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},boldital:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},ital:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},mono:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},__type__:{object:ZE,string:XE}},group:{string:XE,number:GE,undefined:"undefined"},heightConstraint:{minimum:{number:GE},valign:{string:XE},__type__:{object:ZE,boolean:$E,number:GE}},hidden:{boolean:$E},icon:{face:{string:XE},code:{string:XE},size:{number:GE},color:{string:XE},weight:{string:XE,number:GE},__type__:{object:ZE}},id:{string:XE,number:GE},image:{selected:{string:XE,undefined:"undefined"},unselected:{string:XE,undefined:"undefined"},__type__:{object:ZE,string:XE}},imagePadding:{top:{number:GE},right:{number:GE},bottom:{number:GE},left:{number:GE},__type__:{object:ZE,number:GE}},label:{string:XE,undefined:"undefined"},labelHighlightBold:{boolean:$E},level:{number:GE,undefined:"undefined"},margin:{top:{number:GE},right:{number:GE},bottom:{number:GE},left:{number:GE},__type__:{object:ZE,number:GE}},mass:{number:GE},physics:{boolean:$E},scaling:{min:{number:GE},max:{number:GE},label:{enabled:{boolean:$E},min:{number:GE},max:{number:GE},maxVisible:{number:GE},drawThreshold:{number:GE},__type__:{object:ZE,boolean:$E}},customScalingFunction:{function:"function"},__type__:{object:ZE}},shadow:{enabled:{boolean:$E},color:{string:XE},size:{number:GE},x:{number:GE},y:{number:GE},__type__:{object:ZE,boolean:$E}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:$E,array:KE},borderRadius:{number:GE},interpolation:{boolean:$E},useImageSize:{boolean:$E},useBorderWithImage:{boolean:$E},coordinateOrigin:{string:["center","top-left"]},__type__:{object:ZE}},size:{number:GE},title:{string:XE,dom:"dom",undefined:"undefined"},value:{number:GE,undefined:"undefined"},widthConstraint:{minimum:{number:GE},maximum:{number:GE},__type__:{object:ZE,boolean:$E,number:GE}},x:{number:GE},y:{number:GE},__type__:{object:ZE}},tO={configure:{enabled:{boolean:$E},filter:{boolean:$E,string:XE,array:KE,function:"function"},container:{dom:"dom"},showButton:{boolean:$E},__type__:{object:ZE,boolean:$E,string:XE,array:KE,function:"function"}},edges:{arrows:{to:{enabled:{boolean:$E},scaleFactor:{number:GE},type:{string:QE},imageHeight:{number:GE},imageWidth:{number:GE},src:{string:XE},__type__:{object:ZE,boolean:$E}},middle:{enabled:{boolean:$E},scaleFactor:{number:GE},type:{string:QE},imageWidth:{number:GE},imageHeight:{number:GE},src:{string:XE},__type__:{object:ZE,boolean:$E}},from:{enabled:{boolean:$E},scaleFactor:{number:GE},type:{string:QE},imageWidth:{number:GE},imageHeight:{number:GE},src:{string:XE},__type__:{object:ZE,boolean:$E}},__type__:{string:["from","to","middle"],object:ZE}},endPointOffset:{from:{number:GE},to:{number:GE},__type__:{object:ZE,number:GE}},arrowStrikethrough:{boolean:$E},background:{enabled:{boolean:$E},color:{string:XE},size:{number:GE},dashes:{boolean:$E,array:KE},__type__:{object:ZE,boolean:$E}},chosen:{label:{boolean:$E,function:"function"},edge:{boolean:$E,function:"function"},__type__:{object:ZE,boolean:$E}},color:{color:{string:XE},highlight:{string:XE},hover:{string:XE},inherit:{string:["from","to","both"],boolean:$E},opacity:{number:GE},__type__:{object:ZE,string:XE}},dashes:{boolean:$E,array:KE},font:{color:{string:XE},size:{number:GE},face:{string:XE},background:{string:XE},strokeWidth:{number:GE},strokeColor:{string:XE},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:GE},multi:{boolean:$E,string:XE},bold:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},boldital:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},ital:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},mono:{color:{string:XE},size:{number:GE},face:{string:XE},mod:{string:XE},vadjust:{number:GE},__type__:{object:ZE,string:XE}},__type__:{object:ZE,string:XE}},hidden:{boolean:$E},hoverWidth:{function:"function",number:GE},label:{string:XE,undefined:"undefined"},labelHighlightBold:{boolean:$E},length:{number:GE,undefined:"undefined"},physics:{boolean:$E},scaling:{min:{number:GE},max:{number:GE},label:{enabled:{boolean:$E},min:{number:GE},max:{number:GE},maxVisible:{number:GE},drawThreshold:{number:GE},__type__:{object:ZE,boolean:$E}},customScalingFunction:{function:"function"},__type__:{object:ZE}},selectionWidth:{function:"function",number:GE},selfReferenceSize:{number:GE},selfReference:{size:{number:GE},angle:{number:GE},renderBehindTheNode:{boolean:$E},__type__:{object:ZE}},shadow:{enabled:{boolean:$E},color:{string:XE},size:{number:GE},x:{number:GE},y:{number:GE},__type__:{object:ZE,boolean:$E}},smooth:{enabled:{boolean:$E},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:GE},forceDirection:{string:["horizontal","vertical","none"],boolean:$E},__type__:{object:ZE,boolean:$E}},title:{string:XE,undefined:"undefined"},width:{number:GE},widthConstraint:{maximum:{number:GE},__type__:{object:ZE,boolean:$E,number:GE}},value:{number:GE,undefined:"undefined"},__type__:{object:ZE}},groups:{useDefaultGroups:{boolean:$E},__any__:JE,__type__:{object:ZE}},interaction:{dragNodes:{boolean:$E},dragView:{boolean:$E},hideEdgesOnDrag:{boolean:$E},hideEdgesOnZoom:{boolean:$E},hideNodesOnDrag:{boolean:$E},hover:{boolean:$E},keyboard:{enabled:{boolean:$E},speed:{x:{number:GE},y:{number:GE},zoom:{number:GE},__type__:{object:ZE}},bindToWindow:{boolean:$E},autoFocus:{boolean:$E},__type__:{object:ZE,boolean:$E}},multiselect:{boolean:$E},navigationButtons:{boolean:$E},selectable:{boolean:$E},selectConnectedEdges:{boolean:$E},hoverConnectedEdges:{boolean:$E},tooltipDelay:{number:GE},zoomView:{boolean:$E},zoomSpeed:{number:GE},__type__:{object:ZE}},layout:{randomSeed:{undefined:"undefined",number:GE,string:XE},improvedLayout:{boolean:$E},clusterThreshold:{number:GE},hierarchical:{enabled:{boolean:$E},levelSeparation:{number:GE},nodeSpacing:{number:GE},treeSpacing:{number:GE},blockShifting:{boolean:$E},edgeMinimization:{boolean:$E},parentCentralization:{boolean:$E},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:ZE,boolean:$E}},__type__:{object:ZE}},manipulation:{enabled:{boolean:$E},initiallyActive:{boolean:$E},addNode:{boolean:$E,function:"function"},addEdge:{boolean:$E,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:ZE,boolean:$E,function:"function"}},deleteNode:{boolean:$E,function:"function"},deleteEdge:{boolean:$E,function:"function"},controlNodeStyle:JE,__type__:{object:ZE,boolean:$E}},nodes:JE,physics:{enabled:{boolean:$E},barnesHut:{theta:{number:GE},gravitationalConstant:{number:GE},centralGravity:{number:GE},springLength:{number:GE},springConstant:{number:GE},damping:{number:GE},avoidOverlap:{number:GE},__type__:{object:ZE}},forceAtlas2Based:{theta:{number:GE},gravitationalConstant:{number:GE},centralGravity:{number:GE},springLength:{number:GE},springConstant:{number:GE},damping:{number:GE},avoidOverlap:{number:GE},__type__:{object:ZE}},repulsion:{centralGravity:{number:GE},springLength:{number:GE},springConstant:{number:GE},nodeDistance:{number:GE},damping:{number:GE},__type__:{object:ZE}},hierarchicalRepulsion:{centralGravity:{number:GE},springLength:{number:GE},springConstant:{number:GE},nodeDistance:{number:GE},damping:{number:GE},avoidOverlap:{number:GE},__type__:{object:ZE}},maxVelocity:{number:GE},minVelocity:{number:GE},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:$E},iterations:{number:GE},updateInterval:{number:GE},onlyDynamicEdges:{boolean:$E},fit:{boolean:$E},__type__:{object:ZE,boolean:$E}},timestep:{number:GE},adaptiveTimestep:{boolean:$E},wind:{x:{number:GE},y:{number:GE},__type__:{object:ZE}},__type__:{object:ZE,boolean:$E}},autoResize:{boolean:$E},clickToUse:{boolean:$E},locale:{string:XE},locales:{__any__:{any:"any"},__type__:{object:ZE}},height:{string:XE},width:{string:XE},__type__:{object:ZE}},eO={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},iO=function(t,e,i){var n;return!(!Vp(t).call(t,"physics")||!Vp(n=eO.physics.solver).call(n,e)||i.physics.solver===e||"wind"===e)},nO=function(){function t(){bO(this,t)}return EO(t,[{key:"getDistances",value:function(t,e,i){for(var n={},o=t.edges,r=0;r<e.length;r++){var s={};n[e[r]]=s;for(var a=0;a<e.length;a++)s[e[a]]=r==a?0:1e9}for(var l=0;l<i.length;l++){var h=o[i[l]];!0===h.connected&&void 0!==n[h.fromId]&&void 0!==n[h.toId]&&(n[h.fromId][h.toId]=1,n[h.toId][h.fromId]=1)}for(var d=e.length,c=0;c<d;c++)for(var u=e[c],f=n[u],p=0;p<d-1;p++)for(var v=e[p],g=n[v],y=p+1;y<d;y++){var m=e[y],b=n[m],w=Math.min(g[m],g[u]+f[m]);g[m]=w,b[v]=w}return n}}]),t}(),oO=function(){function t(e,i,n){bO(this,t),this.body=e,this.springLength=i,this.springConstant=n,this.distanceSolver=new nO}return EO(t,[{key:"setOptions",value:function(t){t&&(t.springLength&&(this.springLength=t.springLength),t.springConstant&&(this.springConstant=t.springConstant))}},{key:"solve",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.distanceSolver.getDistances(this.body,t,e);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();for(var o=0,r=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),s=1e9,a=0,l=0,h=0,d=0,c=0;s>.01&&o<r;){o+=1;var u=IO(this._getHighestEnergyNode(i),4);for(a=u[0],s=u[1],l=u[2],h=u[3],d=s,c=0;d>1&&c<5;){c+=1,this._moveNode(a,l,h);var f=IO(this._getEnergy(a),3);d=f[0],l=f[1],h=f[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,n=0,o=e[0],r=0,s=0,a=0;a<e.length;a++){var l=e[a];if(!0!==i[l].predefinedPosition||!0===i[l].isCluster&&!0===t||!0!==i[l].options.fixed.x||!0!==i[l].options.fixed.y){var h=IO(this._getEnergy(l),3),d=h[0],c=h[1],u=h[2];n<d&&(n=d,o=l,r=c,s=u)}}return[o,n,r,s]}},{key:"_getEnergy",value:function(t){var e=IO(this.E_sums[t],2),i=e[0],n=e[1];return[Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),i,n]}},{key:"_moveNode",value:function(t,e,i){for(var n=this.body.nodeIndices,o=this.body.nodes,r=0,s=0,a=0,l=o[t].x,h=o[t].y,d=this.K_matrix[t],c=this.L_matrix[t],u=0;u<n.length;u++){var f=n[u];if(f!==t){var p=o[f].x,v=o[f].y,g=d[f],y=c[f],m=1/Math.pow(Math.pow(l-p,2)+Math.pow(h-v,2),1.5);r+=g*(1-y*Math.pow(h-v,2)*m),s+=g*(y*(l-p)*(h-v)*m),a+=g*(1-y*Math.pow(l-p,2)*m)}}var b=(e/r+i/s)/(s/r-a/s),w=-(s*b+e)/r;o[t].x+=w,o[t].y+=b,this._updateE_matrix(t)}},{key:"_createL_matrix",value:function(t){var e=this.body.nodeIndices,i=this.springLength;this.L_matrix=[];for(var n=0;n<e.length;n++){this.L_matrix[e[n]]={};for(var o=0;o<e.length;o++)this.L_matrix[e[n]][e[o]]=i*t[e[n]][e[o]]}}},{key:"_createK_matrix",value:function(t){var e=this.body.nodeIndices,i=this.springConstant;this.K_matrix=[];for(var n=0;n<e.length;n++){this.K_matrix[e[n]]={};for(var o=0;o<e.length;o++)this.K_matrix[e[n]][e[o]]=i*Math.pow(t[e[n]][e[o]],-2)}}},{key:"_createE_matrix",value:function(){var t=this.body.nodeIndices,e=this.body.nodes;this.E_matrix={},this.E_sums={};for(var i=0;i<t.length;i++)this.E_matrix[t[i]]=[];for(var n=0;n<t.length;n++){for(var o=t[n],r=e[o].x,s=e[o].y,a=0,l=0,h=n;h<t.length;h++){var d=t[h];if(d!==o){var c=e[d].x,u=e[d].y,f=1/Math.sqrt(Math.pow(r-c,2)+Math.pow(s-u,2));this.E_matrix[o][h]=[this.K_matrix[o][d]*(r-c-this.L_matrix[o][d]*(r-c)*f),this.K_matrix[o][d]*(s-u-this.L_matrix[o][d]*(s-u)*f)],this.E_matrix[d][n]=this.E_matrix[o][h],a+=this.E_matrix[o][h][0],l+=this.E_matrix[o][h][1]}}this.E_sums[o]=[a,l]}}},{key:"_updateE_matrix",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,n=this.E_matrix[t],o=this.K_matrix[t],r=this.L_matrix[t],s=i[t].x,a=i[t].y,l=0,h=0,d=0;d<e.length;d++){var c=e[d];if(c!==t){var u=n[d],f=u[0],p=u[1],v=i[c].x,g=i[c].y,y=1/Math.sqrt(Math.pow(s-v,2)+Math.pow(a-g,2)),m=o[c]*(s-v-r[c]*(s-v)*y),b=o[c]*(a-g-r[c]*(a-g)*y);n[d]=[m,b],l+=m,h+=b;var w=this.E_sums[c];w[0]+=m-f,w[1]+=b-p}}this.E_sums[t]=[l,h]}}]),t}();function lP(t,e,i){var n,o,r,s,a=this;if(!(this instanceof lP))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:Zy,clickToUse:!1},En(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:Yn(n=this.on).call(n,this),off:Yn(o=this.off).call(o,this),emit:Yn(r=this.emit).call(r,this),once:Yn(s=this.once).call(s,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new Jy((function(){return a.body.emitter.emit("_requestRedraw")})),this.groups=new Sb,this.canvas=new T_(this.body),this.selectionHandler=new Fk(this.body,this.canvas),this.interactionHandler=new M_(this.body,this.canvas,this.selectionHandler),this.view=new P_(this.body,this.canvas),this.renderer=new C_(this.body,this.canvas),this.physics=new x_(this.body),this.layoutEngine=new VE(this.body),this.clustering=new O_(this.body),this.manipulation=new YE(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Px(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new u_(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new oO(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(e)}Gn(lP.prototype),lP.prototype.setOptions=function(t){var e=this;if(null===t&&(t=void 0),void 0!==t){!0===Hy.validate(t,tO)&&console.error("%cErrors have been found in the supplied options object.",Ly);if(NC(["locale","locales","clickToUse"],this.options,t),void 0!==t.locale&&(t.locale=TS(t.locales||this.options.locales,t.locale)),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),void 0!==t.groups&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new Ny(this,this.body.container,eO,this.canvas.pixelRatio,iO)),this.configurator.setOptions(t.configure)),this.configurator&&!0===this.configurator.options.enabled){var i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};RC(i.nodes,this.nodesHandler.options),RC(i.edges,this.edgesHandler.options),RC(i.layout,this.layoutEngine.options),RC(i.interaction,this.selectionHandler.options),RC(i.interaction,this.renderer.options),RC(i.interaction,this.interactionHandler.options),RC(i.manipulation,this.manipulation.options),RC(i.physics,this.physics.options),RC(i.global,this.canvas.options),RC(i.global,this.options),this.configurator.setModuleOptions(i)}void 0!==t.clickToUse?!0===t.clickToUse?void 0===this.activator&&(this.activator=new zy(this.canvas.frame),this.activator.on("change",(function(){e.body.emitter.emit("activate")}))):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},lP.prototype._updateVisibleIndices=function(){var t=this.body.nodes,e=this.body.edges;for(var i in this.body.nodeIndices=[],this.body.edgeIndices=[],t)Object.prototype.hasOwnProperty.call(t,i)&&(this.clustering._isClusteredNode(i)||!1!==t[i].options.hidden||this.body.nodeIndices.push(t[i].id));for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=e[n],r=t[o.fromId],s=t[o.toId],a=void 0!==r&&void 0!==s;!this.clustering._isClusteredEdge(n)&&!1===o.options.hidden&&a&&!1===r.options.hidden&&!1===s.options.hidden&&this.body.edgeIndices.push(o.id)}},lP.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",(function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")})),this.body.emitter.on("_dataUpdated",(function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")}))},lP.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var e=CS(t.dot);this.setData(e)}else if(t&&t.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var i=SS(t.gephi);this.setData(i)}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},lP.prototype.destroy=function(){for(var t in this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(var e in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,e)&&delete this.body.edges[e];DC(this.body.container)},lP.prototype._updateValueRange=function(t){var e,i=void 0,n=void 0,o=0;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].getValue();void 0!==r&&(i=void 0===i?r:Math.min(r,i),n=void 0===n?r:Math.max(r,n),o+=r)}if(void 0!==i&&void 0!==n)for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&t[e].setValueRange(i,n,o)},lP.prototype.isActive=function(){return!this.activator||this.activator.active},lP.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},lP.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},lP.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},lP.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},lP.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},lP.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},lP.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},lP.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},lP.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},lP.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},lP.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},lP.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},lP.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},lP.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},lP.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},lP.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},lP.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},lP.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},lP.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},lP.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},lP.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},lP.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},lP.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},lP.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},lP.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},lP.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},lP.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},lP.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},lP.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},lP.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},lP.prototype.getConnectedNodes=function(t){return void 0!==this.body.nodes[t]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},lP.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},lP.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},lP.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},lP.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},lP.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},lP.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},lP.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)},lP.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)},lP.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},lP.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},lP.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},lP.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},lP.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()},lP.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},lP.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},lP.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},lP.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},lP.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},lP.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},lP.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},lP.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};n()}catch(sO){n(sO)}}))},82328:function(t,e,i){var n=i(40810),o=i(1569),r=i(11003),s=i(6567),a="ArrayBuffer",l=r[a];n({global:!0,constructor:!0,forced:o[a]!==l},{ArrayBuffer:l}),s(a)},66662:function(t,e,i){var n=i(40810),o=Math.hypot,r=Math.abs,s=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var i,n,o=0,a=0,l=arguments.length,h=0;a<l;)h<(i=r(arguments[a++]))?(o=o*(n=h/i)*n+1,h=i):o+=i>0?(n=i/h)*n:i;return h===1/0?1/0:h*s(o)}})},39200:function(t,e,i){i(40810)({target:"Object",stat:!0},{hasOwn:i(39129)})},53232:function(t,e,i){i.d(e,{E_:()=>g,OR:()=>l,_Y:()=>d,dZ:()=>a,fk:()=>c,hN:()=>s,hl:()=>f,i9:()=>p,pt:()=>r,ws:()=>v});var n=i(2841);const{I:o}=n.Al,r=t=>null===t||"object"!=typeof t&&"function"!=typeof t,s=(t,e)=>void 0===e?void 0!==(null==t?void 0:t._$litType$):(null==t?void 0:t._$litType$)===e,a=t=>{var e;return null!=(null===(e=null==t?void 0:t._$litType$)||void 0===e?void 0:e.h)},l=t=>void 0===t.strings,h=()=>document.createComment(""),d=(t,e,i)=>{var n;const r=t._$AA.parentNode,s=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=r.insertBefore(h(),s),n=r.insertBefore(h(),s);i=new o(e,n,t,t.options)}else{const e=i._$AB.nextSibling,o=i._$AM,a=o!==t;if(a){let e;null===(n=i._$AQ)||void 0===n||n.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==o._$AU&&i._$AP(e)}if(e!==s||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,s),t=e}}}return i},c=(t,e,i=t)=>(t._$AI(e,i),t),u={},f=(t,e=u)=>t._$AH=e,p=t=>t._$AH,v=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const n=t._$AB.nextSibling;for(;i!==n;){const t=i.nextSibling;i.remove(),i=t}},g=t=>{t._$AR()}},92903:function(t,e,i){i.d(e,{XM:()=>n.XM,Xe:()=>n.Xe,pX:()=>n.pX});var n=i(45779)}}]);
//# sourceMappingURL=7351.0662991dac2ce1b7.js.map