@rnacanvas/app-object 6.1.1 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.appObject=e():t.appObject=e()}(this,(()=>(()=>{var t={298:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{InvertedStraightBondsHider:()=>nr,SavableStraightBond:()=>Fn,SavedStraightBond:()=>er,StraightBond:()=>Ln});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Ae,move:()=>Ee,plot:()=>Te,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>wn,width:()=>vn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),w=t=>b.has(t.nodeName),v=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function A(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function T(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=T;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=A(t)).before(this),this},insertAfter:function(t){return(t=A(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,w=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:w.x,ry:w.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=A().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return T(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=A(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=A(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class wt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function vt(){}D(wt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends wt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=A(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return A(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return T(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return T(this.node.firstChild)}get(t){return T(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return T(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=T(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=T(e.node.parentNode));return e}put(t,e){return t=A(t),this.add(t,e),t}putIn(t,e){return A(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=A(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=T(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return T(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=A(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?A(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return v(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(w(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class At extends Pt{flatten(){return this.each((function(){if(this instanceof At)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(At,"Container");class Et extends At{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class Tt extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(Tt,"Shape");class Vt extends Tt{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends At{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends At{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends Tt{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends Tt{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends At{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class we extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const ve=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?we:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(ve(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=ve(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends Tt{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new we(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new we(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Ae(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Te(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=we,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new we)}))}}),D(Pe,"Path");class De extends Tt{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends Tt{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends Tt{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends wt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends wt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||vt,runner:e||vt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends At{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?T(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends At{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends Tt{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(w(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return v(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||w(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===T(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends Tt{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends Tt{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends At{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function wn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function vn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends At{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends At{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends At{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=we,D(Nn,"TextPath");class An extends Tt{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new An).use(t,e)}))}}),D(An,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(wt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(Tt,c("Shape")),I([At,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,we,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),Tn=n(725),jn=n(854);const Dn=["basePadding1","basePadding2"],kn={basePadding1:"setBasePadding1",basePadding2:"setBasePadding2"};class Ln{static between(t,e){let n=(new ee).node,r=new Ln(n,t,e);return r.assignUUID(),r.set(Ln.defaultValues),r.reposition(),r}constructor(t,e,n){this.line=t,this.base1=e,this.base2=n,this.cachedBasePadding1=(0,Tn.distance)(this.point1,this.base1.centerPoint),this.cachedBasePadding2=(0,Tn.distance)(this.point2,this.base2.centerPoint),e.addEventListener("move",(()=>this.reposition())),n.addEventListener("move",(()=>this.reposition()))}get basePair(){return[this.base1,this.base2]}get domNode(){return this.line}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){if((0,jn.isNonNullObject)(t))try{new ee(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,En.assignUUID)(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}getTotalLength(){return this.domNode.getTotalLength()}getPointAtLength(t){return this.domNode.getPointAtLength(t)}get point1(){return{x:this.domNode.x1.baseVal.value,y:this.domNode.y1.baseVal.value}}get point2(){return{x:this.domNode.x2.baseVal.value,y:this.domNode.y2.baseVal.value}}get basePadding1(){return this.cachedBasePadding1}set basePadding1(t){this.cachedBasePadding1=t,this.reposition()}setBasePadding1(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding1=Math.max(0,t))}get basePadding2(){return this.cachedBasePadding2}set basePadding2(t){this.cachedBasePadding2=t,this.reposition()}setBasePadding2(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding2=Math.max(0,t))}isInverted(){return this.basePadding1+this.basePadding2>(0,Tn.distance)(this.base1.centerPoint,this.base2.centerPoint)}set(t){try{this.setAttributes(t.attributes)}catch(t){}Dn.forEach((e=>{try{this[kn[e]](t[e])}catch(t){}}))}reposition(){let t=this.base1.centerPoint,e=this.base2.centerPoint,n=(0,Tn.direction)(t,e);this.setAttribute("x1",`${t.x+this.basePadding1*Math.cos(n)}`),this.setAttribute("y1",`${t.y+this.basePadding1*Math.sin(n)}`),this.setAttribute("x2",""+(e.x-this.basePadding2*Math.cos(n))),this.setAttribute("y2",""+(e.y-this.basePadding2*Math.sin(n)))}}Ln.defaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6};var Bn,In=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Fn{constructor(t){Bn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Bn,t)}toJSONSerializable(){let t=In(this,Bn,"f").id,e=In(this,Bn,"f").base1.id,n=In(this,Bn,"f").base2.id;if(!t)throw new Error("Straight bond ID is falsy.");if(!e)throw new Error("Base ID 1 is falsy.");if(!n)throw new Error("Base ID 2 is falsy.");return{id:t,baseID1:e,baseID2:n,basePadding1:In(this,Bn,"f").basePadding1,basePadding2:In(this,Bn,"f").basePadding2}}}Bn=new WeakMap;var Rn,Vn,zn,qn,Xn,Yn,Gn,Hn,Un,$n,Wn,Qn,Jn,Kn,Zn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},tr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class er{constructor(t,e){Rn.add(this),Vn.set(this,void 0),zn.set(this,void 0),Zn(this,Vn,t,"f"),Zn(this,zn,e,"f")}recreate(){let t=new Ln(tr(this,Rn,"a",Yn),tr(this,Rn,"a",$n),tr(this,Rn,"a",Wn));try{t.basePadding1=tr(this,Rn,"a",Jn)}catch(t){}try{t.basePadding2=tr(this,Rn,"a",Kn)}catch(t){}return t}}Vn=new WeakMap,zn=new WeakMap,Rn=new WeakSet,qn=function(t){let e=tr(this,Vn,"f")[t];if(!e)throw new Error(`No ID with name "${t}" was saved.`);if("string"!=typeof e)throw new Error(`The ID with name "${t}" is not a string: ${e}.`);return e},Xn=function(){try{return tr(this,Rn,"m",qn).call(this,"id")}catch(t){return tr(this,Rn,"m",qn).call(this,"lineId")}},Yn=function(){let t=tr(this,Rn,"a",Xn),e=tr(this,zn,"f").domNode.querySelector(`#${t}`);if(!e)throw new Error(`No DOM node in the drawing has the ID "${t}".`);if(!(e instanceof SVGLineElement))throw new Error(`The DOM node with ID "${t}" is not an SVG line element.`);return e},Gn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID1")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId1")}},Hn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID2")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId2")}},Un=function(t){let e={1:tr(this,Rn,"a",Gn),2:tr(this,Rn,"a",Hn)}[t],n=[...tr(this,zn,"f").bases].find((t=>t.id===e));if(!n)throw new Error(`No base in the drawing has the ID "${e}".`);return n},$n=function(){return tr(this,Rn,"m",Un).call(this,1)},Wn=function(){return tr(this,Rn,"m",Un).call(this,2)},Qn=function(t){let e=tr(this,Vn,"f")[`basePadding${t}`];if("number"!=typeof e)throw new Error(`Saved base padding ${t} is not a number: ${e}.`);return e},Jn=function(){return tr(this,Rn,"m",Qn).call(this,1)},Kn=function(){return tr(this,Rn,"m",Qn).call(this,2)};class nr{constructor(t,e){this.targetStraightBonds=t,new MutationObserver((t=>{let e=new Set([...this.targetStraightBonds].map((t=>t.domNode)));!t.some((t=>e.has(t.target)))||this.updateOpacities()})).observe(e,{attributes:!0,attributeFilter:["x1","y1","x2","y2"],subtree:!0})}updateOpacities(){[...this.targetStraightBonds].forEach((t=>{let e=t.isInverted()?"0":"1";t.setAttribute("opacity",e)}))}}})(),r})(),t.exports=e()},124:function(t){var e;e=()=>(()=>{var t={661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>u,Stems:()=>a,areStacked:()=>o,deepCopy:()=>e,parseDotBracket:()=>h,sorted:()=>s});var t=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function e(e){return e.map((function(e){return t([],e,!0)}))}var i=n(986);function s(t){var n=e(t);return n.forEach(i.sortNumbers),n.sort((function(t,e){return t[0]-e[0]})),n}function o(t,e){var n=s([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}var a=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=s(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||o(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),u=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(a.bind.apply(a,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(i.min),t.map(i.max)]}));t.forEach(i.sortNumbers),t.sort((function(t,e){return(0,i.min)(t)-(0,i.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var s=[],o=(0,i.max)(n),u=(0,i.min)(r),h=o;h<=u;h++)s.push(h);e.push(s),n=r,r=t.shift()}return e},t}();function h(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return s(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a});var t=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0];return this.targetStructure[1].map((function(e){return[t.indexOf(e[0])+1,t.indexOf(e[1])+1]}))},t}(),e=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");var n=e.flat(),r=t.findIndex((function(t){return n.includes(t)}));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]},t}(),i=n(986),s=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");var n=e.flat().map((function(e){return t.indexOf(e)}));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]},t}(),o=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");var n=(new(e.bind.apply(e,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)},t}(),a=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");var e=(new(s.bind.apply(s,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)},t}(),u=n(369),h=function(){function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return e.prototype.get=function(){var e=this.targetStructure[0],n=(new(t.bind.apply(t,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get();return new u.Stems(e,n).get().map((function(t){return t.map((function(t){return[e[t[0]-1],e[t[1]-1]]}))}))},e}(),l=function(){function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return e.prototype.get=function(){var e=this.targetStructure[0],n=(new(t.bind.apply(t,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get();return new u.Linkers(e,n).get().map((function(t){return t.map((function(t){return e[t-1]}))}))},e}()})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,h=Math.PI*a/2,l=Math.abs(i-h)<.001;this.wrappedCircularSegment=u||l?new e(n):i<h?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>u,Stems:()=>a,areStacked:()=>o,deepCopy:()=>e,parseDotBracket:()=>h,sorted:()=>s});var t=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function e(e){return e.map((function(e){return t([],e,!0)}))}var i=n(986);function s(t){var n=e(t);return n.forEach(i.sortNumbers),n.sort((function(t,e){return t[0]-e[0]})),n}function o(t,e){var n=s([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}var a=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=s(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||o(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),u=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(a.bind.apply(a,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(i.min),t.map(i.max)]}));t.forEach(i.sortNumbers),t.sort((function(t,e){return(0,i.min)(t)-(0,i.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var s=[],o=(0,i.max)(n),u=(0,i.min)(r),h=o;h<=u;h++)s.push(h);e.push(s),n=r,r=t.shift()}return e},t}();function h(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return s(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>l,MinCenterX:()=>a,MinCenterY:()=>h,NucleobaseMock:()=>t,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>B,rotate:()=>d,round:()=>S,shift:()=>e,stemmify:()=>v,straighten:()=>w});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class l{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var c=n(30);function d(t,e){if(0==t.length)return;let n=new s(t).get();t.forEach((t=>{let r=t.getCenterPoint(),s=(0,i.distance)(n,r),o=(0,c.direction)((0,i.displacement)(n,r));o+=e,t.setCenterPoint({x:n.x+s*Math.cos(o),y:n.y+s*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,c.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),h={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(h)}function w(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,c.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),h=a*Math.sin(o),{x:l,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:l,y:d}),l+=u,d+=h}))}function v(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),h=t.slice(a),l=new s(t),{x:c,y:p}=l.get(),m={x:c,y:p},g=new f(t).get();b(u,{spacing:o}),b(h,{spacing:o}),new f(u).set(-Math.PI/2),new f(h).set(Math.PI/2);let y=t[0],w=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(h,(0,i.displacement)(w.getCenterPoint(),{x:r,y:0})),d(t,g),l.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,h=a,l=new f(t).get(),c=n*(t.length-1);c+=r,Math.abs(c)<1e-5&&(c=1e-5);let p=c/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/c);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/c;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,l),i.set({x:u,y:h})}var _=n(173);function S(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),h=r*(t.length-1);if(h-u<.001)return void w(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let l=new _.CircularSegment(a,{arcLength:h}),d=l.parentCircleCenterPoint,f=l.parentCircleRadius,p=(0,c.direction)((0,i.displacement)(d,s.getCenterPoint())),m=l.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var M=n(127),O=n(369);class C{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class P{static of(...t){let[e,n]=t,r=new M.PositionPairs(...t).get();r=(0,O.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class N{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=P.of(...t),this.positionPairs=new M.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class A{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class E{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],h=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>h,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=Object.assign({},a.getCenterPoint());v(h,{basePairLength:n,basePairSpacing:r}),e(h,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class T{static in(t){return{[Symbol.iterator]:()=>new M.Stems(t.sequence,t.basePairs).get().map((t=>E.composedOf(t))).values()}}}class j{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),h=C.from(a).to(u).inclusive(),l=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),c=h.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(h.map((t=>o.mountainPlotTraversal[t]))).size&&!l;return{[Symbol.iterator]:()=>t.values(),indices:h,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=Object.assign({},r.getCenterPoint());v(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>l,isInOutermostLoop:()=>c,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;S(t,{spacing:n})}})}}}}}class D{static in(t){let e=new M.Linkers(t.sequence,t.basePairs).get().map((e=>j.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class k{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=A.correspondingTo(s).in(r),u=(0,o.min)(a),h=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),l=h.map((t=>r.sequence.indexOf(t))),c=h.filter((t=>r.pairedBases.has(t))),d=l.filter((t=>r.pairedIndices.has(t))),f=[s[0],...h,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:h,enclosedIndices:l,enclosedPairedBases:c,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),h=r.sequence.filter(((t,e)=>e>=n&&e<=u&&l.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>h.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:l}=r,c=(0,o.max)([h.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=C.from(1).to(c).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=Object.assign({},s[0].getCenterPoint());x([s[0],...d,...h,...f,s[1]],{spacing:l,terminiGap:l}),e([...s,...h],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class L{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function B(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new N(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let h=Object.assign({},new s(t).get()),l=new f(t).get(),c=T.in(u),d=D.in(u);x([...L.of(u)],{spacing:i,terminiGap:2*i});let p=[...c].map((t=>k.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&S(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(l),new s(t).set(h)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ConsecutiveBasesSelectingTool:()=>t,DraggingTool:()=>s,SelectedBases:()=>e});class t{constructor(t,e){this.targetDrawing=t,this.selectedBases=e,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),window.addEventListener("mouseover",(t=>this.handleMouseOver(t)))}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseUp(t){this.mouseIsDown=!1}handleMouseOver(t){if(!this.mouseIsDown)return;let e=this.lastMouseDown;if(!e)return;if(!e.shiftKey)return;if(!(t.target instanceof Node))return;if(!this.targetDrawing.domNode.contains(t.target))return;let n=[...this.targetDrawing.bases],r=n.findIndex((e=>e.domNode===t.target));if(r<0)return;let i=n.findIndex((t=>t.domNode===e.target));if(i<0)return;try{let t=n[i];if(!this.selectedBases.include(t))return}catch(t){console.error(t)}let s=Math.min(i,r),o=Math.max(i,r);this.selectedBases.addAll(n.slice(s,o+1))}}class e{constructor(t,e){this.targetDrawing=t,this.selectedSVGElements=e}[Symbol.iterator](){return[...this.targetDrawing.bases].filter((t=>this.selectedSVGElements.include(t.domNode))).values()}include(t){return this.selectedSVGElements.include(t.domNode)}addAll(t){this.selectedSVGElements.addAll([...t].map((t=>t.domNode)))}addEventListener(t,e){this.selectedSVGElements.addEventListener(t,e)}}var i=n(661);class s{constructor(t,e,n){this.targetDrawing=t,this.selectedElements=e,this.options=n,this.mouseIsDown=!1,this.dragged=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t)))}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0,this.dragged=!1}handleMouseMove(t){var e;if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.shiftKey)return;if(!(this.lastMouseDown.target instanceof SVGGraphicsElement))return;if(!this.selectedElements.svgElements.include(this.lastMouseDown.target))return;let n=t.movementX/this.targetDrawing.horizontalClientScaling,r=t.movementY/this.targetDrawing.verticalClientScaling;this.dragged||!(null===(e=this.options)||void 0===e?void 0:e.beforeDragging)||this.options.beforeDragging(),(0,i.shift)([...this.selectedElements.bases],{x:n,y:r}),this.dragged=!0}handleMouseUp(t){var e;this.mouseIsDown=!1,!this.dragged||!(null===(e=this.options)||void 0===e?void 0:e.afterDragging)||this.options.afterDragging(),this.dragged=!1}}})(),r})(),t.exports=e()},524:function(t){var e;e=()=>(()=>{var t={645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BoxHighlighting:()=>s,LiveSVGElementHighlightings:()=>a});var t,e=n(645),i=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class s{constructor(){t.set(this,.5),this.domNode=document.createElementNS("http://www.w3.org/2000/svg","g"),this.boxTrace=document.createElementNS("http://www.w3.org/2000/svg","path"),this.topLeftCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.topRightCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.bottomRightCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.bottomLeftCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.domNode.append(this.boxTrace,...this.cornerBoxes),this.domNode.style.pointerEvents="auto",this.boxTrace.setAttribute("stroke","blue"),this.boxTrace.setAttribute("stroke-width",`${i(this,t,"f")}`),this.boxTrace.setAttribute("fill","none"),this.cornerBoxes.forEach((e=>{e.setAttribute("stroke","blue"),e.setAttribute("stroke-width",`${i(this,t,"f")}`),e.setAttribute("fill","white")}))}get cornerBoxes(){return[this.topLeftCornerBox,this.topRightCornerBox,this.bottomRightCornerBox,this.bottomLeftCornerBox]}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}cornerBoxD({centerPoint:e}){return`M ${e.x-2.5*i(this,t,"f")} ${e.y-2.5*i(this,t,"f")} h `+5*i(this,t,"f")+" v "+5*i(this,t,"f")+" h "+-5*i(this,t,"f")+" z"}highlight(t){let n=e.Box.matching(t);this.boxTrace.setAttribute("d",`M ${n.x} ${n.y} h ${n.width} v ${n.height} h ${-n.width} z`),this.topLeftCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.minX,y:n.minY}})),this.topRightCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.maxX,y:n.minY}})),this.bottomRightCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.maxX,y:n.maxY}})),this.bottomLeftCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.minX,y:n.maxY}})),this.highlightedBox=n}get lineThickness(){return i(this,t,"f")}set lineThickness(e){(function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)})(this,t,e),[this.boxTrace,...this.cornerBoxes].forEach((t=>{t.setAttribute("stroke-width",`${e}`)})),!this.highlightedBox||this.highlight(this.highlightedBox)}setOpacity(t){this.domNode.setAttribute("opacity",`${t}`)}}t=new WeakMap;var o=n(726);class a{constructor(t,e){this.targetSVGElements=t,this.domNode=document.createElementNS("http://www.w3.org/2000/svg","g"),this.boxHighlightings=[],this.parentSVGDocCoordinateSystem=new o.CoordinateSystem(e),t.addEventListener("change",(()=>this.refresh())),new MutationObserver((()=>this.refresh())).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}refresh(){let t=[...this.targetSVGElements];t.slice(this.boxHighlightings.length).forEach((()=>{let t=new s;t.appendTo(this.domNode),this.boxHighlightings.push(t)}));let e=1/this.parentSVGDocCoordinateSystem.horizontalScaling;t.forEach(((t,n)=>{try{let r=this.boxHighlightings[n];r.highlight(t.getBBox()),r.lineThickness=e,r.setOpacity(1)}catch(t){console.error(t)}})),this.boxHighlightings.slice(t.length).forEach((t=>t.setOpacity(0)))}}})(),r})(),t.exports=e()},460:function(t){var e;e=()=>(()=>{var t={645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ClickSelectTool:()=>t,PinchToScaleFeature:()=>u,SelectingRect:()=>o});class t{constructor(t,e){this.targetSVGDoc=t,this.selectedSVGElements=e,t.addEventListener("mousedown",(t=>this.handleMouseDown(t)))}handleMouseDown(t){t.target!==this.targetSVGDoc?t.target instanceof SVGGraphicsElement&&this.targetSVGDoc.contains(t.target)&&(this.selectedSVGElements.include(t.target)?!t.shiftKey||this.selectedSVGElements.removeAll([t.target]):(t.shiftKey||this.selectedSVGElements.clear(),this.selectedSVGElements.addAll([t.target]))):t.shiftKey||this.selectedSVGElements.clear()}}var e=n(726),i=n(645);function s(t){return t instanceof SVGGraphicsElement}class o{constructor(t,n){this.targetSVGDoc=t,this.selectedSVGElements=n,this.defaultLineThickness=.5,this.lastMouseDownX=0,this.lastMouseDownY=0,this.mouseIsDown=!1,this.isDrawn=!1,this.targetSVGDocCoordinateSystem=new e.CoordinateSystem(t),this.domNode=document.createElementNS("http://www.w3.org/2000/svg","path"),this.domNode.setAttribute("stroke","blue"),this.refreshLineThickness(),this.domNode.setAttribute("fill","blue"),this.domNode.setAttribute("fill-opacity","0.1"),new MutationObserver((()=>this.refreshLineThickness())).observe(t,{attributes:!0,attributeFilter:["viewBox","width","height"]}),this.domNode.style.pointerEvents="none",this.domNode.style.visibility="hidden",window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t)))}refreshLineThickness(){this.domNode.setAttribute("stroke-width",""+this.defaultLineThickness/this.targetSVGDocCoordinateSystem.horizontalScaling)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}handleMouseDown(t){this.lastMouseDown=t,this.lastMouseDownX=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),this.lastMouseDownY=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetSVGDoc)return;let e=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),n=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),r=`M ${this.lastMouseDownX} ${this.lastMouseDownY} H ${e} V ${n} H ${this.lastMouseDownX} z`;this.domNode.setAttribute("d",r),this.domNode.style.visibility="visible",this.isDrawn=!0}handleMouseUp(t){var e;this.mouseIsDown=!1,this.domNode.style.visibility="hidden";let n=this.isDrawn;if(this.isDrawn=!1,!n)return;let r=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),o=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),a=i.Box.bounding([{x:this.lastMouseDownX,y:this.lastMouseDownY,width:0,height:0},{x:r,y:o,width:0,height:0}]),u=[...this.targetSVGDoc.children].filter(s).filter((t=>i.Box.matching(t.getBBox()).isBoundedBy(a)));(null===(e=this.lastMouseDown)||void 0===e?void 0:e.shiftKey)||this.selectedSVGElements.clear(),this.selectedSVGElements.addAll(u)}}var a=n(986);class u{constructor(t){this.targetSVGDoc=t,this.targetSVGDocCoordinateSystem=new e.CoordinateSystem(t),this.interactionScope=t,window.addEventListener("wheel",(t=>this.handleWheel(t)),{passive:!1})}handleWheel(t){var e,n,r,i;if(!t.ctrlKey)return;if(!(t.target instanceof Node))return;if(!this.interactionScope.contains(t.target))return;t.preventDefault();let s=1-(0,a.clamp)(t.deltaY,-25,25)/150,o=this.targetSVGDocCoordinateSystem.horizontalScaling,u=s*o;u=Number.isFinite(u)?u:1,u=(0,a.clamp)(u,.1,500),s=u/o;let h=s*(null!==(n=null===(e=this.horizontalScrollbar)||void 0===e?void 0:e.thumb.centerX)&&void 0!==n?n:0),l=s*(null!==(i=null===(r=this.verticalScrollbar)||void 0===r?void 0:r.thumb.centerY)&&void 0!==i?i:0);this.targetSVGDocCoordinateSystem.setScaling(u),!this.horizontalScrollbar||(this.horizontalScrollbar.thumb.centerX=h),!this.verticalScrollbar||(this.verticalScrollbar.thumb.centerY=l)}}})(),r})(),t.exports=e()},662:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>c,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function c(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>c,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function c(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,h=Math.PI*a/2,l=Math.abs(i-h)<.001;this.wrappedCircularSegment=u||l?new e(n):i<h?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>l,MinCenterX:()=>a,MinCenterY:()=>h,NucleobaseMock:()=>t,arrange:()=>C,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>I,rotate:()=>d,round:()=>S,shift:()=>e,stemmify:()=>v,straighten:()=>w});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class l{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var c=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,c.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,c.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),h={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(h)}function w(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,c.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),h=a*Math.sin(o),{x:l,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:l,y:d}),l+=u,d+=h}))}function v(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),h=t.slice(a),l=new s(t),{x:c,y:p}=l.get(),m={x:c,y:p},g=new f(t).get();b(u,{spacing:o}),b(h,{spacing:o}),new f(u).set(-Math.PI/2),new f(h).set(Math.PI/2);let y=t[0],w=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(h,(0,i.displacement)(w.getCenterPoint(),{x:r,y:0})),d(t,g),l.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,h=a,l=new f(t).get(),c=n*(t.length-1);c+=r,Math.abs(c)<1e-5&&(c=1e-5);let p=c/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/c);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/c;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,l),i.set({x:u,y:h})}var _=n(173);function S(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),h=r*(t.length-1);if(h-u<.001)return void w(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let l=new _.CircularSegment(a,{arcLength:h}),d=l.parentCircleCenterPoint,f=l.parentCircleRadius,p=(0,c.direction)((0,i.displacement)(d,s.getCenterPoint())),m=l.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var M=n(127),O=n(369);function C(t,n,r){var a,u,h;let{spacing:l}=r,c=null!==(a=r.basePairSpacing)&&void 0!==a?a:l,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:l,p=null!==(h=r.terminiGap)&&void 0!==h?h:l,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,M.knotless)(t,n);let w=new M.PositionPairs(t,n).get(),_=(0,O.mountainPlotTraversal)(t,w),C=t.filter(((t,e)=>0==_[e]));x(C,{spacing:l,terminiGap:p});let P=new M.Stems(t,n).get(),N=new Set(C),A=P.filter((t=>N.has(t[0][0]))),E=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),h={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];v(m,{basePairLength:l,basePairSpacing:c}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),h));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&_[e]==_[(0,o.min)(y)]+1)),w=new Set(b),x=P.filter((t=>w.has(t[0][0])));S([g[0],...b,g[1]],{spacing:x.length>0?l:d}),x.forEach((t=>E(t)))};A.forEach((t=>E(t))),new f(t).set(b),new s(t).set(y)}class P{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class N{static of(...t){let[e,n]=t,r=new M.PositionPairs(...t).get();r=(0,O.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class A{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=N.of(...t),this.positionPairs=new M.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class E{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class T{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],h=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>h,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=Object.assign({},a.getCenterPoint());v(h,{basePairLength:n,basePairSpacing:r}),e(h,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class j{static in(t){return{[Symbol.iterator]:()=>new M.Stems(t.sequence,t.basePairs).get().map((t=>T.composedOf(t))).values()}}}class D{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),h=P.from(a).to(u).inclusive(),l=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),c=h.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(h.map((t=>o.mountainPlotTraversal[t]))).size&&!l;return{[Symbol.iterator]:()=>t.values(),indices:h,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=Object.assign({},r.getCenterPoint());v(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>l,isInOutermostLoop:()=>c,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;S(t,{spacing:n})}})}}}}}class k{static in(t){let e=new M.Linkers(t.sequence,t.basePairs).get().map((e=>D.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class L{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=E.correspondingTo(s).in(r),u=(0,o.min)(a),h=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),l=h.map((t=>r.sequence.indexOf(t))),c=h.filter((t=>r.pairedBases.has(t))),d=l.filter((t=>r.pairedIndices.has(t))),f=[s[0],...h,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:h,enclosedIndices:l,enclosedPairedBases:c,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),h=r.sequence.filter(((t,e)=>e>=n&&e<=u&&l.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>h.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:l}=r,c=(0,o.max)([h.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=P.from(1).to(c).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=Object.assign({},s[0].getCenterPoint());x([s[0],...d,...h,...f,s[1]],{spacing:l,terminiGap:l}),e([...s,...h],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class B{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function I(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new A(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let h=Object.assign({},new s(t).get()),l=new f(t).get(),c=j.in(u),d=k.in(u);x([...B.of(u)],{spacing:i,terminiGap:2*i});let p=[...c].map((t=>L.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&S(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(l),new s(t).set(h)}})(),r})(),t.exports=e()},282:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>d,InnerXML:()=>b,OuterXML:()=>x,Scaling:()=>c,VerticalClientScaling:()=>f,assignUUID:()=>h,bringToFront:()=>p,sendToBack:()=>m});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));const u=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=i[a];return e}return function(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+u()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class c{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class d{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function p(t){let e=t.parentNode;e&&e.appendChild(t)}function m(t){let e=t.parentNode;e&&e.prepend(t)}var g,y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){g.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,g,t)}toString(){return y(this,g,"f").innerHTML}set(t){y(this,g,"f").innerHTML=t}}g=new WeakMap;var w,v=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class x{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return v(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=v(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...v(this,w,"f").attributes].forEach((t=>v(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>v(this,w,"f").setAttribute(t.name,t.value))),v(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return w=new WeakMap,e})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&0==t.length}function d(t){return l(t)&&t.length>0}function f(t){return l(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return l(t)&&t.every(r)}function g(t){return l(t)&&t.every(i)}function y(t){return l(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>l,isEmptyArray:()=>c,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{InvertedStraightBondsHider:()=>nr,SavableStraightBond:()=>Fn,SavedStraightBond:()=>er,StraightBond:()=>Ln});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Ae,move:()=>Ee,plot:()=>Te,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>wn,width:()=>vn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),w=t=>b.has(t.nodeName),v=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function A(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function T(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=T;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=A(t)).before(this),this},insertAfter:function(t){return(t=A(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,w=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:w.x,ry:w.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=A().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return T(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=A(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=A(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class wt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function vt(){}D(wt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends wt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=A(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return A(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return T(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return T(this.node.firstChild)}get(t){return T(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return T(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=T(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=T(e.node.parentNode));return e}put(t,e){return t=A(t),this.add(t,e),t}putIn(t,e){return A(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=A(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=T(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return T(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=A(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?A(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return v(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(w(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class At extends Pt{flatten(){return this.each((function(){if(this instanceof At)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(At,"Container");class Et extends At{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class Tt extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(Tt,"Shape");class Vt extends Tt{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends At{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends At{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends Tt{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends Tt{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends At{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class we extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const ve=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?we:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(ve(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=ve(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends Tt{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new we(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new we(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Ae(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Te(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=we,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new we)}))}}),D(Pe,"Path");class De extends Tt{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends Tt{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends Tt{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends wt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends wt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||vt,runner:e||vt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends At{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?T(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends At{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends Tt{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(w(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return v(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||w(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===T(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends Tt{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends Tt{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends At{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function wn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function vn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends At{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends At{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends At{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=we,D(Nn,"TextPath");class An extends Tt{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new An).use(t,e)}))}}),D(An,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(wt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(Tt,c("Shape")),I([At,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,we,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),Tn=n(725),jn=n(854);const Dn=["basePadding1","basePadding2"],kn={basePadding1:"setBasePadding1",basePadding2:"setBasePadding2"};class Ln{static between(t,e){let n=(new ee).node,r=new Ln(n,t,e);return r.assignUUID(),r.set(Ln.defaultValues),r.reposition(),r}constructor(t,e,n){this.line=t,this.base1=e,this.base2=n,this.cachedBasePadding1=(0,Tn.distance)(this.point1,this.base1.centerPoint),this.cachedBasePadding2=(0,Tn.distance)(this.point2,this.base2.centerPoint),e.centerPoint.addEventListener("move",(()=>this.reposition())),n.centerPoint.addEventListener("move",(()=>this.reposition()))}get basePair(){return[this.base1,this.base2]}get domNode(){return this.line}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){if((0,jn.isNonNullObject)(t))try{new ee(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,En.assignUUID)(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}getTotalLength(){return this.domNode.getTotalLength()}getPointAtLength(t){return this.domNode.getPointAtLength(t)}get point1(){return{x:this.domNode.x1.baseVal.value,y:this.domNode.y1.baseVal.value}}get point2(){return{x:this.domNode.x2.baseVal.value,y:this.domNode.y2.baseVal.value}}get basePadding1(){return this.cachedBasePadding1}set basePadding1(t){this.cachedBasePadding1=t,this.reposition()}setBasePadding1(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding1=Math.max(0,t))}get basePadding2(){return this.cachedBasePadding2}set basePadding2(t){this.cachedBasePadding2=t,this.reposition()}setBasePadding2(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding2=Math.max(0,t))}isInverted(){return this.basePadding1+this.basePadding2>(0,Tn.distance)(this.base1.centerPoint,this.base2.centerPoint)}set(t){try{this.setAttributes(t.attributes)}catch(t){}Dn.forEach((e=>{try{this[kn[e]](t[e])}catch(t){}}))}reposition(){let t=this.base1.centerPoint,e=this.base2.centerPoint,n=(0,Tn.direction)(t,e);this.setAttribute("x1",`${t.x+this.basePadding1*Math.cos(n)}`),this.setAttribute("y1",`${t.y+this.basePadding1*Math.sin(n)}`),this.setAttribute("x2",""+(e.x-this.basePadding2*Math.cos(n))),this.setAttribute("y2",""+(e.y-this.basePadding2*Math.sin(n)))}}Ln.defaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6};var Bn,In=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Fn{constructor(t){Bn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Bn,t)}toJSONSerializable(){let t=In(this,Bn,"f").id,e=In(this,Bn,"f").base1.id,n=In(this,Bn,"f").base2.id;if(!t)throw new Error("Straight bond ID is falsy.");if(!e)throw new Error("Base ID 1 is falsy.");if(!n)throw new Error("Base ID 2 is falsy.");return{id:t,baseID1:e,baseID2:n,basePadding1:In(this,Bn,"f").basePadding1,basePadding2:In(this,Bn,"f").basePadding2}}}Bn=new WeakMap;var Rn,Vn,zn,qn,Xn,Yn,Gn,Hn,Un,$n,Wn,Qn,Jn,Kn,Zn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},tr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class er{constructor(t,e){Rn.add(this),Vn.set(this,void 0),zn.set(this,void 0),Zn(this,Vn,t,"f"),Zn(this,zn,e,"f")}recreate(){let t=new Ln(tr(this,Rn,"a",Yn),tr(this,Rn,"a",$n),tr(this,Rn,"a",Wn));try{t.basePadding1=tr(this,Rn,"a",Jn)}catch(t){}try{t.basePadding2=tr(this,Rn,"a",Kn)}catch(t){}return t}}Vn=new WeakMap,zn=new WeakMap,Rn=new WeakSet,qn=function(t){let e=tr(this,Vn,"f")[t];if(!e)throw new Error(`No ID with name "${t}" was saved.`);if("string"!=typeof e)throw new Error(`The ID with name "${t}" is not a string: ${e}.`);return e},Xn=function(){try{return tr(this,Rn,"m",qn).call(this,"id")}catch(t){return tr(this,Rn,"m",qn).call(this,"lineId")}},Yn=function(){let t=tr(this,Rn,"a",Xn),e=tr(this,zn,"f").domNode.querySelector(`#${t}`);if(!e)throw new Error(`No DOM node in the drawing has the ID "${t}".`);if(!(e instanceof SVGLineElement))throw new Error(`The DOM node with ID "${t}" is not an SVG line element.`);return e},Gn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID1")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId1")}},Hn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID2")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId2")}},Un=function(t){let e={1:tr(this,Rn,"a",Gn),2:tr(this,Rn,"a",Hn)}[t],n=[...tr(this,zn,"f").bases].find((t=>t.id===e));if(!n)throw new Error(`No base in the drawing has the ID "${e}".`);return n},$n=function(){return tr(this,Rn,"m",Un).call(this,1)},Wn=function(){return tr(this,Rn,"m",Un).call(this,2)},Qn=function(t){let e=tr(this,Vn,"f")[`basePadding${t}`];if("number"!=typeof e)throw new Error(`Saved base padding ${t} is not a number: ${e}.`);return e},Jn=function(){return tr(this,Rn,"m",Qn).call(this,1)},Kn=function(){return tr(this,Rn,"m",Qn).call(this,2)};class nr{constructor(t,e){this.targetStraightBonds=t,new MutationObserver((t=>{let e=new Set([...this.targetStraightBonds].map((t=>t.domNode)));!t.some((t=>e.has(t.target)))||this.updateOpacities()})).observe(e,{attributes:!0,attributeFilter:["x1","y1","x2","y2"],subtree:!0})}updateOpacities(){[...this.targetStraightBonds].forEach((t=>{let e=t.isInverted()?"0":"1";t.setAttribute("opacity",e)}))}}})(),r})(),t.exports=e()},775:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{BaseOutline:()=>n});class n{constructor(t,e){this.domNode=t,this.owner=e,e.centerPoint.addEventListener("move",(()=>{t.setAttribute("cx",`${e.centerPoint.x}`),t.setAttribute("cy",`${e.centerPoint.y}`)}))}}return e})(),t.exports=e()},358:function(t){var e;e=()=>(()=>{var t={731:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CenterPoint:()=>h});var n,r,i,s,o,a=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},u=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class h{constructor(t){n.add(this),r.set(this,void 0),i.set(this,{move:[]}),s.set(this,void 0),a(this,r,t,"f"),a(this,s,new MutationObserver((()=>u(this,n,"m",o).call(this,"move"))),"f"),u(this,s,"f").observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}get x(){let t=u(this,r,"f").getBBox();return t.x+t.width/2}set x(t){let e=this.x,n=[...u(this,r,"f").x.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("x",n.join(", "))}get y(){let t=u(this,r,"f").getBBox();return t.y+t.height/2}set y(t){let e=this.y,n=[...u(this,r,"f").y.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("y",n.join(", "))}addEventListener(t,e){u(this,i,"f")[t].push(e)}removeEventListener(t,e){u(this,i,"f")[t]=u(this,i,"f")[t].filter((t=>t!==e))}}return r=new WeakMap,i=new WeakMap,s=new WeakMap,n=new WeakSet,o=function(t){u(this,i,"f")[t].forEach((t=>t()))},e})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>d,InnerXML:()=>b,OuterXML:()=>x,Scaling:()=>c,VerticalClientScaling:()=>f,assignUUID:()=>h,bringToFront:()=>p,sendToBack:()=>m});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));const u=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=i[a];return e}return function(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+u()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class c{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class d{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function p(t){let e=t.parentNode;e&&e.appendChild(t)}function m(t){let e=t.parentNode;e&&e.prepend(t)}var g,y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){g.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,g,t)}toString(){return y(this,g,"f").innerHTML}set(t){y(this,g,"f").innerHTML=t}}g=new WeakMap;var w,v=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class x{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return v(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=v(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...v(this,w,"f").attributes].forEach((t=>v(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>v(this,w,"f").setAttribute(t.name,t.value))),v(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return w=new WeakMap,e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Nucleobase:()=>Dn,SavableNucleobase:()=>Bn,SavedNucleobase:()=>Yn});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Ae,move:()=>Ee,plot:()=>Te,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>wn,width:()=>vn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),w=t=>b.has(t.nodeName),v=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function A(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function T(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=T;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=A(t)).before(this),this},insertAfter:function(t){return(t=A(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,w=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:w.x,ry:w.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=A().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return T(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=A(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=A(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class wt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function vt(){}D(wt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends wt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=A(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return A(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return T(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return T(this.node.firstChild)}get(t){return T(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return T(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=T(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=T(e.node.parentNode));return e}put(t,e){return t=A(t),this.add(t,e),t}putIn(t,e){return A(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=A(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=T(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return T(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=A(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?A(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return v(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(w(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class At extends Pt{flatten(){return this.each((function(){if(this instanceof At)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(At,"Container");class Et extends At{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class Tt extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(Tt,"Shape");class Vt extends Tt{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends At{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends At{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends Tt{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends Tt{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends At{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class we extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const ve=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?we:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(ve(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=ve(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends Tt{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new we(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new we(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Ae(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Te(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=we,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new we)}))}}),D(Pe,"Path");class De extends Tt{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends Tt{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends Tt{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends wt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends wt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||vt,runner:e||vt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends At{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?T(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends At{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends Tt{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(w(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return v(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||w(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===T(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends Tt{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends Tt{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends At{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function wn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function vn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends At{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends At{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends At{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=we,D(Nn,"TextPath");class An extends Tt{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new An).use(t,e)}))}}),D(An,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(wt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(Tt,c("Shape")),I([At,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,we,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),Tn=n(731),jn=n(986);class Dn{static create(t){let e=document.createElementNS("http://www.w3.org/2000/svg","text");e.textContent=t;let n=new Dn(e);return n.assignUUID(),n.setAttributes(Dn.defaultAttributes),n}constructor(t){this.textElement=t,this.centerPoint=new Tn.CenterPoint(t)}get domNode(){return this.textElement}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}bringToFront(){(0,En.bringToFront)(this.domNode)}sendToBack(){(0,En.sendToBack)(this.domNode)}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){try{new hn(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,En.assignUUID)(this.domNode)}get textContent(){return this.domNode.textContent}set textContent(t){this.domNode.textContent=t}get bbox(){return this.domNode.getBBox()}getCenterPoint(){return this.centerPoint}setCenterPoint(t){this.centerPoint.x=t.x,this.centerPoint.y=t.y}maintainingCenterPoint(t){let{x:e,y:n}=this.centerPoint;t(),this.centerPoint.x=e,this.centerPoint.y=n}get boundingClientRect(){return this.domNode.getBoundingClientRect()}get centerClientPoint(){let t=this.domNode.getBoundingClientRect();return{x:(0,jn.mean)([t.left,t.right]),y:(0,jn.mean)([t.top,t.bottom])}}getCenterClientPoint(){return this.centerClientPoint}}Dn.defaultAttributes={"font-family":"Arial","font-size":"9","font-weight":"700"},Dn.defaultAttributeNames=["font-family","font-size","font-weight"];var kn,Ln=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Bn{constructor(t){kn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,kn,t)}toJSONSerializable(){if(!Ln(this,kn,"f").id)throw new Error("Nucleobase has a falsy ID.");return{id:Ln(this,kn,"f").id}}}kn=new WeakMap;var In,Fn,Rn,Vn,zn,qn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Xn=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Yn{constructor(t,e){In.add(this),Fn.set(this,void 0),Rn.set(this,void 0),qn(this,Fn,t,"f"),qn(this,Rn,e,"f")}recreate(){return new Dn(Xn(this,In,"a",zn))}}Fn=new WeakMap,Rn=new WeakMap,In=new WeakSet,Vn=function(){let t=Xn(this,Fn,"f").id;if(t=null!=t?t:Xn(this,Fn,"f").textId,!t)throw new Error("Unable to find nucleobase ID.");if("string"!=typeof t)throw new Error("Nucleobase ID is not a string.");return t},zn=function(){let t=Xn(this,In,"a",Vn),e=Xn(this,Rn,"f").domNode.querySelector(`#${t}`);if(!e)throw new Error(`No DOM node in the drawing has the nucleobase ID "${t}".`);if(!(e instanceof SVGTextElement))throw new Error(`The DOM node with ID "${t}" is not an SVG text element.`);return e}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>d,InnerXML:()=>b,OuterXML:()=>x,Scaling:()=>c,VerticalClientScaling:()=>f,assignUUID:()=>h,bringToFront:()=>p,sendToBack:()=>m});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));const u=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=i[a];return e}return function(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+u()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class c{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class d{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function p(t){let e=t.parentNode;e&&e.appendChild(t)}function m(t){let e=t.parentNode;e&&e.prepend(t)}var g,y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){g.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,g,t)}toString(){return y(this,g,"f").innerHTML}set(t){y(this,g,"f").innerHTML=t}}g=new WeakMap;var w,v=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class x{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return v(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=v(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...v(this,w,"f").attributes].forEach((t=>v(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>v(this,w,"f").setAttribute(t.name,t.value))),v(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return w=new WeakMap,e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BaseOutline:()=>In.BaseOutline,DotBracketDrawer:()=>Kn,Drawing:()=>$n,Nucleobase:()=>Tn.Nucleobase,SchemaDrawer:()=>ir,StraightBond:()=>qn.StraightBond});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Ae,move:()=>Ee,plot:()=>Te,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>wn,width:()=>vn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),w=t=>b.has(t.nodeName),v=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function A(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function T(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=T;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=A(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=A(t)).before(this),this},insertAfter:function(t){return(t=A(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,w=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:w.x,ry:w.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=A().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return T(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=A(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=A(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class wt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function vt(){}D(wt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends wt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=A(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return A(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return T(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return T(this.node.firstChild)}get(t){return T(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return T(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=T(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=T(e.node.parentNode));return e}put(t,e){return t=A(t),this.add(t,e),t}putIn(t,e){return A(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=A(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=T(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return T(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=A(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?A(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return v(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(w(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class At extends Pt{flatten(){return this.each((function(){if(this instanceof At)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(At,"Container");class Et extends At{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class Tt extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(Tt,"Shape");class Vt extends Tt{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends At{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends At{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends Tt{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends Tt{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends At{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class we extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const ve=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?we:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(ve(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=ve(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends Tt{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new we(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new we(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Ae(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Te(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=we,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new we)}))}}),D(Pe,"Path");class De extends Tt{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends Tt{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends Tt{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends wt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends wt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||vt,runner:e||vt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends At{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?T(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends At{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends Tt{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(w(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return v(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||w(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===T(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends Tt{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends Tt{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends At{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function wn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function vn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends At{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends At{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends At{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=we,D(Nn,"TextPath");class An extends Tt{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new An).use(t,e)}))}}),D(An,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(wt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(Tt,c("Shape")),I([At,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,we,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),Tn=n(358);class jn{constructor(t,e){this.svgDoc=t,this.elements=e,new MutationObserver((t=>{t.some((t=>t.removedNodes.length>0))&&(this.elements=this.elements.filter((t=>this.svgDoc.contains(t.domNode))))})).observe(t,{childList:!0,subtree:!0})}}class Dn{constructor(t,e){this.svgDoc=t,this.elementsDrawing=new jn(t,e)}get bases(){return this.elementsDrawing.elements}append(t){t.appendTo(this.svgDoc),this.bases.push(t)}add(t){let e=Tn.Nucleobase.create(t);return this.append(e),e}}var kn,Ln,Bn,In=n(775),Fn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Rn=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Vn{constructor(t){this.domNode=t,kn.set(this,void 0),Ln.set(this,void 0),Fn(this,kn,new jn(t,[]),"f"),Fn(this,Ln,new MutationObserver((()=>{this.elements.forEach((t=>{this.domNode.contains(t.owner.domNode)||t.domNode.remove()}))})),"f"),Rn(this,Ln,"f").observe(t,{childList:!0,subtree:!0})}get elements(){return Rn(this,kn,"f").elements}}kn=new WeakMap,Ln=new WeakMap;class zn{constructor(t){this.domNode=t,Bn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Bn,new Vn(t))}get baseOutlines(){return function(t,e){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}(this,Bn).elements}append(t){this.domNode.append(t.domNode),this.baseOutlines.push(t)}outline(t){let e=document.createElementNS("http://www.w3.org/2000/svg","circle"),n=new In.BaseOutline(e,t);return t.domNode.insertAdjacentElement("beforebegin",n.domNode),this.baseOutlines.push(n),n}}Bn=new WeakMap;var qn=n(282);class Xn{constructor(t,e){this.svgDoc=t,this.elementsDrawing=new jn(t,e),new MutationObserver((()=>{this.bonds.forEach((t=>{this.svgDoc.contains(t.base1.domNode)&&this.svgDoc.contains(t.base2.domNode)||t.remove()}))})).observe(t,{childList:!0,subtree:!0})}get bonds(){return this.elementsDrawing.elements}set bonds(t){this.elementsDrawing.elements=t}}class Yn{constructor(t,e){this.svgDoc=t,this.primaryBondDefaultValues={attributes:{stroke:"#808080","stroke-width":"1"},basePadding1:6,basePadding2:6},this.bondsDrawing=new Xn(t,e)}get primaryBonds(){return this.bondsDrawing.bonds}set primaryBonds(t){this.bondsDrawing.bonds=t}append(t){t.appendTo(this.svgDoc),this.primaryBonds.push(t)}add(t,e){let n=qn.StraightBond.between(t,e);return n.set(this.primaryBondDefaultValues),this.append(n),n}}class Gn{constructor(t,e){this.svgDoc=t,this.secondaryBondDefaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6},this.bondsDrawing=new Xn(t,e)}get secondaryBonds(){return this.bondsDrawing.bonds}set secondaryBonds(t){this.bondsDrawing.bonds=t}append(t){t.appendTo(this.svgDoc),this.secondaryBonds.push(t)}add(t,e){let n=qn.StraightBond.between(t,e);return n.set(this.secondaryBondDefaultValues),this.append(n),n}}var Hn,Un=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class $n{constructor(){Hn.set(this,void 0),this.domNode=(new $e).node,this.domNode.setAttribute("viewBox","0 0 250 250"),this.domNode.setAttribute("width","250"),this.domNode.setAttribute("height","250"),this.basesDrawing=new Dn(this.domNode,[]),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Hn,new zn(this.domNode)),this.primaryBondsDrawing=new Yn(this.domNode,[]),this.secondaryBondsDrawing=new Gn(this.domNode,[])}get outerXML(){return this.domNode.outerHTML}get innerXML(){return this.domNode.innerHTML}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}get minX(){return this.domNode.viewBox.baseVal.x}set minX(t){let e=this.maxX-t,n=this.horizontalScaling;this.domNode.setAttribute("viewBox",`${t} ${this.minY} ${e} ${this.height}`),this.domNode.setAttribute("width",(n*e).toString())}get maxX(){return this.minX+this.width}set maxX(t){let e=t-this.minX,n=this.horizontalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${this.minY} ${e} ${this.height}`),this.domNode.setAttribute("width",(n*e).toString())}get minY(){return this.domNode.viewBox.baseVal.y}set minY(t){let e=this.maxY-t,n=this.verticalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${t} ${this.width} ${e}`),this.domNode.setAttribute("height",(n*e).toString())}get maxY(){return this.minY+this.height}set maxY(t){let e=t-this.minY,n=this.verticalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${this.minY} ${this.width} ${e}`),this.domNode.setAttribute("height",(n*e).toString())}setBoundaries({minX:t,maxX:e,minY:n,maxY:r}){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}get width(){return this.domNode.viewBox.baseVal.width}set width(t){this.maxX=this.minX+t}get height(){return this.domNode.viewBox.baseVal.height}set height(t){this.maxY=this.minY+t}get horizontalScaling(){let t=this.width;return this.domNode.width.baseVal.value/t}set horizontalScaling(t){let e=this.width;this.domNode.setAttribute("width",(t*e).toString())}get verticalScaling(){let t=this.height;return this.domNode.height.baseVal.value/t}set verticalScaling(t){let e=this.height;this.domNode.setAttribute("height",(t*e).toString())}setScaling(t){this.horizontalScaling=t,this.verticalScaling=t}get horizontalClientScaling(){return new En.HorizontalClientScaling(this.domNode).get()}get verticalClientScaling(){return new En.VerticalClientScaling(this.domNode).get()}get bases(){return this.basesDrawing.bases}appendBase(t){this.basesDrawing.append(t)}addBase(t){return this.basesDrawing.add(t)}get baseOutlines(){return Un(this,Hn,"f").baseOutlines}outlineBase(t){return Un(this,Hn,"f").outline(t)}appendBaseOutline(t){Un(this,Hn,"f").append(t)}get primaryBondDefaultValues(){return this.primaryBondsDrawing.primaryBondDefaultValues}set primaryBondDefaultValues(t){this.primaryBondsDrawing.primaryBondDefaultValues=t}get primaryBonds(){return this.primaryBondsDrawing.primaryBonds}set primaryBonds(t){this.primaryBondsDrawing.primaryBonds=[...t]}appendPrimaryBond(t){this.primaryBondsDrawing.append(t)}addPrimaryBond(t,e){return this.primaryBondsDrawing.add(t,e)}get secondaryBondDefaultValues(){return this.secondaryBondsDrawing.secondaryBondDefaultValues}set secondaryBondDefaultValues(t){this.secondaryBondsDrawing.secondaryBondDefaultValues=t}get secondaryBonds(){return this.secondaryBondsDrawing.secondaryBonds}set secondaryBonds(t){this.secondaryBondsDrawing.secondaryBonds=[...t]}appendSecondaryBond(t){this.secondaryBondsDrawing.append(t)}addSecondaryBond(t,e){return this.secondaryBondsDrawing.add(t,e)}get contentBBox(){return this.domNode.getBBox()}setPadding(t){let e=this.contentBBox;this.setBoundaries({minX:e.x-t,maxX:e.x+e.width+t,minY:e.y-t,maxY:e.y+e.height+t})}}Hn=new WeakMap;var Wn=n(127),Qn=n(661),Jn=n(986);class Kn{constructor(t){this.targetDrawing=t}draw(t,e){let n=[...t].map((t=>this.targetDrawing.addBase(t)));(0,Wn.consecutivePairs)(n).forEach((t=>this.targetDrawing.addPrimaryBond(...t)));let r=[...(0,Wn.parseDotBracket)(n,e)];r.forEach((t=>this.targetDrawing.addSecondaryBond(...t))),n.forEach((t=>t.bringToFront()));let i=1.87*(0,Jn.mean)(n.map((t=>t.bbox.height)));(0,Qn.radialize)(n,r,{spacing:i,basePairSpacing:i/2,hairpinLoopSpacing:i/2})}}var Zn,tr,er,nr,rr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class ir{constructor(t){Zn.add(this),tr.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,tr,t)}draw(t){t.rnaComplexes.forEach((e=>{e.rnaMolecules.forEach((e=>{let n=e.sequence.map((e=>rr(this,Zn,"m",er).call(this,e,t))),r=(0,Jn.mean)(n.map((t=>t.bbox.height)));rr(this,tr,"f").primaryBondDefaultValues.attributes["stroke-width"]=""+.125*r,rr(this,tr,"f").primaryBondDefaultValues.basePadding1=.6*r,rr(this,tr,"f").primaryBondDefaultValues.basePadding2=.6*r,(0,Wn.consecutivePairs)(n).forEach((t=>rr(this,tr,"f").addPrimaryBond(...t))),rr(this,tr,"f").secondaryBondDefaultValues.attributes["stroke-width"]=""+.15*r,rr(this,tr,"f").secondaryBondDefaultValues.basePadding1=.5*r,rr(this,tr,"f").secondaryBondDefaultValues.basePadding2=.5*r,new Set(e.basePairs.map((t=>JSON.stringify(t)))).forEach((e=>rr(this,Zn,"m",nr).call(this,JSON.parse(e),n,t)))}))}))}}tr=new WeakMap,Zn=new WeakSet,er=function(t,e){let n=rr(this,tr,"f").addBase(t.residueName);return t.classes.forEach((t=>{e.classes.filter((e=>e.name==t)).forEach((t=>n.setAttributes(Object.assign(Object.assign({},t),{name:void 0}))))})),n.centerPoint.x=t.x,n.centerPoint.y=t.y,n},nr=function(t,e,n){let r=e[t.residueIndex1],i=e[t.residueIndex2],s=rr(this,tr,"f").addSecondaryBond(r,i);return t.classes.forEach((t=>{n.classes.filter((e=>e.name==t)).forEach((t=>s.setAttributes(Object.assign(Object.assign({},t),{name:void 0}))))})),s}})(),r})(),t.exports=e()},628:function(t){var e;e=()=>(()=>{var t={661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>c,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function c(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,h=Math.PI*a/2,l=Math.abs(i-h)<.001;this.wrappedCircularSegment=u||l?new e(n):i<h?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>l,MinCenterX:()=>a,MinCenterY:()=>h,NucleobaseMock:()=>t,arrange:()=>C,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>I,rotate:()=>d,round:()=>S,shift:()=>e,stemmify:()=>v,straighten:()=>w});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class l{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var c=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,c.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,c.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),h={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(h)}function w(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,c.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),h=a*Math.sin(o),{x:l,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:l,y:d}),l+=u,d+=h}))}function v(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),h=t.slice(a),l=new s(t),{x:c,y:p}=l.get(),m={x:c,y:p},g=new f(t).get();b(u,{spacing:o}),b(h,{spacing:o}),new f(u).set(-Math.PI/2),new f(h).set(Math.PI/2);let y=t[0],w=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(h,(0,i.displacement)(w.getCenterPoint(),{x:r,y:0})),d(t,g),l.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,h=a,l=new f(t).get(),c=n*(t.length-1);c+=r,Math.abs(c)<1e-5&&(c=1e-5);let p=c/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/c);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/c;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,l),i.set({x:u,y:h})}var _=n(173);function S(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),h=r*(t.length-1);if(h-u<.001)return void w(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let l=new _.CircularSegment(a,{arcLength:h}),d=l.parentCircleCenterPoint,f=l.parentCircleRadius,p=(0,c.direction)((0,i.displacement)(d,s.getCenterPoint())),m=l.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var M=n(127),O=n(369);function C(t,n,r){var a,u,h;let{spacing:l}=r,c=null!==(a=r.basePairSpacing)&&void 0!==a?a:l,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:l,p=null!==(h=r.terminiGap)&&void 0!==h?h:l,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,M.knotless)(t,n);let w=new M.PositionPairs(t,n).get(),_=(0,O.mountainPlotTraversal)(t,w),C=t.filter(((t,e)=>0==_[e]));x(C,{spacing:l,terminiGap:p});let P=new M.Stems(t,n).get(),N=new Set(C),A=P.filter((t=>N.has(t[0][0]))),E=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),h={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];v(m,{basePairLength:l,basePairSpacing:c}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),h));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&_[e]==_[(0,o.min)(y)]+1)),w=new Set(b),x=P.filter((t=>w.has(t[0][0])));S([g[0],...b,g[1]],{spacing:x.length>0?l:d}),x.forEach((t=>E(t)))};A.forEach((t=>E(t))),new f(t).set(b),new s(t).set(y)}class P{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class N{static of(...t){let[e,n]=t,r=new M.PositionPairs(...t).get();r=(0,O.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class A{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=N.of(...t),this.positionPairs=new M.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class E{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class T{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],h=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>h,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=Object.assign({},a.getCenterPoint());v(h,{basePairLength:n,basePairSpacing:r}),e(h,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class j{static in(t){return{[Symbol.iterator]:()=>new M.Stems(t.sequence,t.basePairs).get().map((t=>T.composedOf(t))).values()}}}class D{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),h=P.from(a).to(u).inclusive(),l=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),c=h.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(h.map((t=>o.mountainPlotTraversal[t]))).size&&!l;return{[Symbol.iterator]:()=>t.values(),indices:h,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=Object.assign({},r.getCenterPoint());v(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>l,isInOutermostLoop:()=>c,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;S(t,{spacing:n})}})}}}}}class k{static in(t){let e=new M.Linkers(t.sequence,t.basePairs).get().map((e=>D.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class L{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=E.correspondingTo(s).in(r),u=(0,o.min)(a),h=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),l=h.map((t=>r.sequence.indexOf(t))),c=h.filter((t=>r.pairedBases.has(t))),d=l.filter((t=>r.pairedIndices.has(t))),f=[s[0],...h,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:h,enclosedIndices:l,enclosedPairedBases:c,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),h=r.sequence.filter(((t,e)=>e>=n&&e<=u&&l.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>h.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:l}=r,c=(0,o.max)([h.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=P.from(1).to(c).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=Object.assign({},s[0].getCenterPoint());x([s[0],...d,...h,...f,s[1]],{spacing:l,terminiGap:l}),e([...s,...h],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class B{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function I(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new A(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let h=Object.assign({},new s(t).get()),l=new f(t).get(),c=j.in(u),d=k.in(u);x([...B.of(u)],{spacing:i,terminiGap:2*i});let p=[...c].map((t=>L.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&S(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(l),new s(t).set(h)}})(),r})(),t.exports=e()},139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),h=n.n(u),l=n(56),c=n.n(l),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=c(),y.insert=h().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetForm)return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&0==t.length}function d(t){return l(t)&&t.length>0}function f(t){return l(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return l(t)&&t.every(r)}function g(t){return l(t)&&t.every(i)}function y(t){return l(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>l,isEmptyArray:()=>c,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()},660:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>l,JI:()=>h,nn:()=>a,t0:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".jw6xcAPwHpTbyf4_SKFC {\n margin-top: 29px;\n\n display: block;\n}\n\n.QEOfY8APPfT4dMtiFt6o {\n position: absolute;\n\n top: 54px;\n right: 82px;\n left: 66px;\n bottom: 60px;\n\n max-width: 311px;\n max-height: 553px;\n margin-right: auto;\n\n overflow: auto;\n\n border: 1px solid #2b0744;\n border-radius: 15px;\n box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.06);\n\n padding: 20px 0px 50px 32px;\n\n background-color: #f0f0ffc2;\n\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n}\n\n.kK_MqLhOkyrKMi9h7UXg .jw6xcAPwHpTbyf4_SKFC {\n display: none;\n}\n",""]);var a="jw6xcAPwHpTbyf4_SKFC",u="QEOfY8APPfT4dMtiFt6o",h="kK_MqLhOkyrKMi9h7UXg";const l=o},667:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,ML:()=>a,W5:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.WNihwtKaVrQbyLljtVy7 {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.X9F4MxqBx1g11R__XpPF {\n margin-left: 10px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n}\n',""]);var a="WNihwtKaVrQbyLljtVy7",u="X9F4MxqBx1g11R__XpPF";const h=o},882:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,b:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.QNds0QB68pNSdkS6_VtA {\n position: absolute;\n top: 13px;\n right: 17px;\n\n border: none;\n outline: none;\n\n padding: 3px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 16px;\n font-weight: 600;\n font-style: normal;\n color: #871414;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n background-color: transparent;\n}\n\n.QNds0QB68pNSdkS6_VtA:hover {\n background-color: #cab8d99c;\n}\n\n.QNds0QB68pNSdkS6_VtA:active {\n background-color: #aa8eba9e;\n}\n',""]);var a="QNds0QB68pNSdkS6_VtA";const u=o},95:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,k:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.yjbAlhImuUj51RJfDTzk {\n margin: 0px;\n\n border: none;\n\n padding: 4px 32px 4px 32px;\n border-radius: 2px;\n\n /* use before pseudo-element for background */\n background-color: transparent;\n position: relative;\n isolation: isolate;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.yjbAlhImuUj51RJfDTzk::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 2px;\n background-color: #0d0d82;\n box-shadow: 0 3px 3px rgba(213, 213, 255, 0.53);\n\n z-index: -1;\n}\n\n.yjbAlhImuUj51RJfDTzk:focus {\n outline: none;\n}\n\n.yjbAlhImuUj51RJfDTzk:hover::before {\n transform: scale(1.05);\n transition: transform 0.1s;\n}\n\n.yjbAlhImuUj51RJfDTzk:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="yjbAlhImuUj51RJfDTzk";const u=o},284:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,oP:()=>a,ps:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.giz4k0bsvRVjGqUbFrnw {\n margin-right: 1px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n}\n\n.KCO7RYM2lfygb0mgKjM2 {\n margin-top: 22px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n',""]);var a="giz4k0bsvRVjGqUbFrnw",u="KCO7RYM2lfygb0mgKjM2";const h=o},7:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,w:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.sAvvpQVOUFp11iP_95M9 {\n margin-top: 13px;\n margin-bottom: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 26px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n /**\n * So that the form can be dragged around while clicking on top of the header.\n */\n pointer-events: none;\n}\n',""]);var a="sAvvpQVOUFp11iP_95M9";const u=o},645:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,E:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.CUlsdtuZC4HUi_TGFoTy {\n margin: 0px;\n\n border: none;\n\n padding: 4px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: #06064a;\n\n background-color: rgba(219, 219, 255, 0.9);\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.CUlsdtuZC4HUi_TGFoTy:hover {\n background-color: rgba(175, 175, 255, 0.92);\n}\n\n.CUlsdtuZC4HUi_TGFoTy:active {\n background-color: rgba(147, 147, 255, 0.92);\n}\n\n.CUlsdtuZC4HUi_TGFoTy:focus {\n outline: none;\n}\n',""]);var a="CUlsdtuZC4HUi_TGFoTy";const u=o},501:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>d,D:()=>a,Ik:()=>l,Qs:()=>h,ho:()=>c,wx:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.ygDsd40iuV10Vt4ZbW_H {}\n\n.zq0Gcw10IK1yZ0jthmnv {\n margin: 0px;\n\n border: none;\n box-shadow: none;\n outline: none;\n\n padding: 0px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n background-color: transparent;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n text-decoration: none;\n}\n\n.zq0Gcw10IK1yZ0jthmnv:hover {\n text-decoration: underline;\n}\n\n.MTO3k3FJDGjcG1x6BN2J {\n margin: 10px 0px 0px 12px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: 6px;\n\n visibility: collapse;\n max-height: 0px;\n}\n\n.KwtC5QHDvQB26eEDDLhN {\n margin-top: 30px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n}\n\n.mgMgtND1gJZ5ghlkd5La .MTO3k3FJDGjcG1x6BN2J {\n visibility: visible;\n max-height: none;\n}\n\n.mgMgtND1gJZ5ghlkd5La .ygDsd40iuV10Vt4ZbW_H {\n transform: rotate(90deg);\n}\n',""]);var a="ygDsd40iuV10Vt4ZbW_H",u="zq0Gcw10IK1yZ0jthmnv",h="MTO3k3FJDGjcG1x6BN2J",l="KwtC5QHDvQB26eEDDLhN",c="mgMgtND1gJZ5ghlkd5La";const d=o},592:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,JU:()=>u,bw:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.FTmP1CyPvejRjLRIPReA {\n font-weight: 700;\n color: black;\n}\n\n.eVQFFR1fsbH0AJeSXW8h {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: #1b1b1c;\n\n user-select: none;\n -webkit-user-select: none;\n}\n',""]);var a="FTmP1CyPvejRjLRIPReA",u="eVQFFR1fsbH0AJeSXW8h";const h=o},213:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,O:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,".XewFrRrRMBKmyTamv1OX {\n margin-left: 16px;\n\n border: none;\n border-radius: 4px;\n box-shadow: 0px 0px 10px #d4d4dd;\n\n outline: none;\n\n width: 32px;\n height: 32px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n background-color: black;\n\n cursor: grab;\n\n pointer-events: auto;\n}\n\n.XewFrRrRMBKmyTamv1OX:hover {\n background-color: #404044;\n}\n\n.XewFrRrRMBKmyTamv1OX:active {\n background-color: #77777d;\n\n cursor: grabbing;\n}\n",""]);var a="XewFrRrRMBKmyTamv1OX";const u=o},61:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.UmFu1UlOQFScjilAm6UG {\n border: 1px solid #75758c;\n border-radius: 2px;\n\n outline: none;\n\n width: 78px;\n\n padding: 3px 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n pointer-events: auto;\n}\n\n.UmFu1UlOQFScjilAm6UG:hover {\n border-color: #0a0a0b;\n}\n\n.UmFu1UlOQFScjilAm6UG:focus {\n border-color: #0a0a0b;\n\n outline: none;\n}\n',""]);var a="UmFu1UlOQFScjilAm6UG";const u=o},713:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,k:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.ijR0HJEbMuBqwwunQNI8 {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n\n cursor: text;\n\n pointer-events: auto;\n}\n',""]);var a="ijR0HJEbMuBqwwunQNI8";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},692:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var s=[],o=Object.getPrototypeOf,a=s.slice,u=s.flat?function(t){return s.flat.call(t)}:function(t){return s.concat.apply([],t)},h=s.push,l=s.indexOf,c={},d=c.toString,f=c.hasOwnProperty,p=f.toString,m=p.call(Object),g={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},w=r.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,s=(n=n||w).createElement("script");if(s.text=t,e)for(r in v)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&s.setAttribute(r,i);n.head.appendChild(s).parentNode.removeChild(s)}function _(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[d.call(t)]||"object":typeof t}var S="3.7.1",M=/HTML$/i,O=function(t,e){return new O.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,n=_(t);return!y(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function P(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}O.fn=O.prototype={jquery:S,constructor:O,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=O.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return O.each(this,t)},map:function(t){return this.pushStack(O.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(O.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(O.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:s.sort,splice:s.splice},O.extend=O.fn.extend=function(){var t,e,n,r,i,s,o=arguments[0]||{},a=1,u=arguments.length,h=!1;for("boolean"==typeof o&&(h=o,o=arguments[a]||{},a++),"object"==typeof o||y(o)||(o={}),a===u&&(o=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&o!==r&&(h&&r&&(O.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[e],s=i&&!Array.isArray(n)?[]:i||O.isPlainObject(n)?n:{},i=!1,o[e]=O.extend(h,s,r)):void 0!==r&&(o[e]=r));return o},O.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t)||(e=o(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(C(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=O.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(C(Object(t))?O.merge(n,"string"==typeof t?[t]:t):h.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!M.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,s=t.length,o=!n;i<s;i++)!e(t[i],i)!==o&&r.push(t[i]);return r},map:function(t,e,n){var r,i,s=0,o=[];if(C(t))for(r=t.length;s<r;s++)null!=(i=e(t[s],s,n))&&o.push(i);else for(s in t)null!=(i=e(t[s],s,n))&&o.push(i);return u(o)},guid:1,support:g}),"function"==typeof Symbol&&(O.fn[Symbol.iterator]=s[Symbol.iterator]),O.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){c["[object "+e+"]"]=e.toLowerCase()}));var N=s.pop,A=s.sort,E=s.splice,T="[\\x20\\t\\r\\n\\f]",j=new RegExp("^"+T+"+|((?:^|[^\\\\])(?:\\\\.)*)"+T+"+$","g");O.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var D=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function k(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}O.escapeSelector=function(t){return(t+"").replace(D,k)};var L=w,B=h;!function(){var t,e,n,i,o,u,h,c,d,p,m=B,y=O.expando,b=0,w=0,v=tt(),x=tt(),_=tt(),S=tt(),M=function(t,e){return t===e&&(o=!0),0},C="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",D="(?:\\\\[\\da-fA-F]{1,6}"+T+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",k="\\["+T+"*("+D+")(?:"+T+"*([*^$|!~]?=)"+T+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+D+"))|)"+T+"*\\]",I=":("+D+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+k+")*)|.*)\\)|)",F=new RegExp(T+"+","g"),R=new RegExp("^"+T+"*,"+T+"*"),V=new RegExp("^"+T+"*([>+~]|"+T+")"+T+"*"),z=new RegExp(T+"|>"),q=new RegExp(I),X=new RegExp("^"+D+"$"),Y={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+T+"*(even|odd|(([+-]|)(\\d*)n|)"+T+"*(?:([+-]|)"+T+"*(\\d+)|))"+T+"*\\)|)","i"),bool:new RegExp("^(?:"+C+")$","i"),needsContext:new RegExp("^"+T+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+T+"*((?:-\\d)?\\d*)"+T+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,H=/^h\d$/i,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,W=new RegExp("\\\\[\\da-fA-F]{1,6}"+T+"?|\\\\([^\\r\\n\\f])","g"),Q=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ut()},K=dt((function(t){return!0===t.disabled&&P(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(s=a.call(L.childNodes),L.childNodes),s[L.childNodes.length].nodeType}catch(t){m={apply:function(t,e){B.apply(t,a.call(e))},call:function(t){B.apply(t,a.call(arguments,1))}}}function Z(t,e,n,r){var i,s,o,a,h,l,f,p=e&&e.ownerDocument,b=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return n;if(!r&&(ut(e),e=e||u,c)){if(11!==b&&(h=U.exec(t)))if(i=h[1]){if(9===b){if(!(o=e.getElementById(i)))return n;if(o.id===i)return m.call(n,o),n}else if(p&&(o=p.getElementById(i))&&Z.contains(e,o)&&o.id===i)return m.call(n,o),n}else{if(h[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=h[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(S[t+" "]||d&&d.test(t))){if(f=t,p=e,1===b&&(z.test(t)||V.test(t))){for((p=$.test(t)&&at(e.parentNode)||e)==e&&g.scope||((a=e.getAttribute("id"))?a=O.escapeSelector(a):e.setAttribute("id",a=y)),s=(l=lt(t)).length;s--;)l[s]=(a?"#"+a:":scope")+" "+ct(l[s]);f=l.join(",")}try{return m.apply(n,p.querySelectorAll(f)),n}catch(e){S(t,!0)}finally{a===y&&e.removeAttribute("id")}}}return bt(t.replace(j,"$1"),e,n,r)}function tt(){var t=[];return function n(r,i){return t.push(r+" ")>e.cacheLength&&delete n[t.shift()],n[r+" "]=i}}function et(t){return t[y]=!0,t}function nt(t){var e=u.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t){return function(e){return P(e,"input")&&e.type===t}}function it(t){return function(e){return(P(e,"input")||P(e,"button"))&&e.type===t}}function st(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&K(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ot(t){return et((function(e){return e=+e,et((function(n,r){for(var i,s=t([],n.length,e),o=s.length;o--;)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var n,r=t?t.ownerDocument||t:L;return r!=u&&9===r.nodeType&&r.documentElement?(h=(u=r).documentElement,c=!O.isXMLDoc(u),p=h.matches||h.webkitMatchesSelector||h.msMatchesSelector,h.msMatchesSelector&&L!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",J),g.getById=nt((function(t){return h.appendChild(t).id=O.expando,!u.getElementsByName||!u.getElementsByName(O.expando).length})),g.disconnectedMatch=nt((function(t){return p.call(t,"*")})),g.scope=nt((function(){return u.querySelectorAll(":scope")})),g.cssHas=nt((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),g.getById?(e.filter.ID=function(t){var e=t.replace(W,Q);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&c){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace(W,Q);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&c){var n,r,i,s=e.getElementById(t);if(s){if((n=s.getAttributeNode("id"))&&n.value===t)return[s];for(i=e.getElementsByName(t),r=0;s=i[r++];)if((n=s.getAttributeNode("id"))&&n.value===t)return[s]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&c)return e.getElementsByClassName(t)},d=[],nt((function(t){var e;h.appendChild(t).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||d.push("\\["+T+"*(?:value|"+C+")"),t.querySelectorAll("[id~="+y+"-]").length||d.push("~="),t.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),t.querySelectorAll(":checked").length||d.push(":checked"),(e=u.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(e=u.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||d.push("\\["+T+"*name"+T+"*="+T+"*(?:''|\"\")")})),g.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),M=function(t,e){if(t===e)return o=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===u||t.ownerDocument==L&&Z.contains(L,t)?-1:e===u||e.ownerDocument==L&&Z.contains(L,e)?1:i?l.call(i,t)-l.call(i,e):0:4&n?-1:1)},u):u}for(t in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(ut(t),c&&!S[e+" "]&&(!d||!d.test(e)))try{var n=p.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){S(e,!0)}return Z(e,u,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=u&&ut(t),O.contains(t,e)},Z.attr=function(t,n){(t.ownerDocument||t)!=u&&ut(t);var r=e.attrHandle[n.toLowerCase()],i=r&&f.call(e.attrHandle,n.toLowerCase())?r(t,n,!c):void 0;return void 0!==i?i:t.getAttribute(n)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},O.uniqueSort=function(t){var e,n=[],r=0,s=0;if(o=!g.sortStable,i=!g.sortStable&&a.call(t,0),A.call(t,M),o){for(;e=t[s++];)e===t[s]&&(r=n.push(s));for(;r--;)E.call(t,n[r],1)}return i=null,t},O.fn.uniqueSort=function(){return this.pushStack(O.uniqueSort(a.apply(this)))},e=O.expr={cacheLength:50,createPseudo:et,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(W,Q),t[3]=(t[3]||t[4]||t[5]||"").replace(W,Q),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&q.test(n)&&(e=lt(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(W,Q).toLowerCase();return"*"===t?function(){return!0}:function(t){return P(t,e)}},CLASS:function(t){var e=v[t+" "];return e||(e=new RegExp("(^|"+T+")"+t+"("+T+"|$)"))&&v(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=Z.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var s="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var h,l,c,d,f,p=s!==o?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),w=!u&&!a,v=!1;if(m){if(s){for(;p;){for(c=e;c=c[p];)if(a?P(c,g):1===c.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[o?m.firstChild:m.lastChild],o&&w){for(v=(d=(h=(l=m[y]||(m[y]={}))[t]||[])[0]===b&&h[1])&&h[2],c=d&&m.childNodes[d];c=++d&&c&&c[p]||(v=d=0)||f.pop();)if(1===c.nodeType&&++v&&c===e){l[t]=[b,d,v];break}}else if(w&&(v=d=(h=(l=e[y]||(e[y]={}))[t]||[])[0]===b&&h[1]),!1===v)for(;(c=++d&&c&&c[p]||(v=d=0)||f.pop())&&(!(a?P(c,g):1===c.nodeType)||!++v||(w&&((l=c[y]||(c[y]={}))[t]=[b,v]),c!==e)););return(v-=i)===r||v%r==0&&v/r>=0}}},PSEUDO:function(t,n){var r,i=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return i[y]?i(n):i.length>1?(r=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var r,s=i(t,n),o=s.length;o--;)t[r=l.call(t,s[o])]=!(e[r]=s[o])})):function(t){return i(t,0,r)}):i}},pseudos:{not:et((function(t){var e=[],n=[],r=yt(t.replace(j,"$1"));return r[y]?et((function(t,e,n,i){for(var s,o=r(t,null,i,[]),a=t.length;a--;)(s=o[a])&&(t[a]=!(e[a]=s))})):function(t,i,s){return e[0]=t,r(e,null,s,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Z(t,e).length>0}})),contains:et((function(t){return t=t.replace(W,Q),function(e){return(e.textContent||O.text(e)).indexOf(t)>-1}})),lang:et((function(t){return X.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(W,Q).toLowerCase(),function(e){var n;do{if(n=c?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=r.location&&r.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===h},focus:function(t){return t===function(){try{return u.activeElement}catch(t){}}()&&u.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:st(!1),disabled:st(!0),checked:function(t){return P(t,"input")&&!!t.checked||P(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return H.test(t.nodeName)},input:function(t){return G.test(t.nodeName)},button:function(t){return P(t,"input")&&"button"===t.type||P(t,"button")},text:function(t){var e;return P(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ot((function(){return[0]})),last:ot((function(t,e){return[e-1]})),eq:ot((function(t,e,n){return[n<0?n+e:n]})),even:ot((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:ot((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:ot((function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:ot((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},e.pseudos.nth=e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})e.pseudos[t]=rt(t);for(t in{submit:!0,reset:!0})e.pseudos[t]=it(t);function ht(){}function lt(t,n){var r,i,s,o,a,u,h,l=x[t+" "];if(l)return n?0:l.slice(0);for(a=t,u=[],h=e.preFilter;a;){for(o in r&&!(i=R.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(s=[])),r=!1,(i=V.exec(a))&&(r=i.shift(),s.push({value:r,type:i[0].replace(j," ")}),a=a.slice(r.length)),e.filter)!(i=Y[o].exec(a))||h[o]&&!(i=h[o](i))||(r=i.shift(),s.push({value:r,type:o,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?Z.error(t):x(t,u).slice(0)}function ct(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function dt(t,e,n){var r=e.dir,i=e.next,s=i||r,o=n&&"parentNode"===s,a=w++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i);return!1}:function(e,n,u){var h,l,c=[b,a];if(u){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||o)if(l=e[y]||(e[y]={}),i&&P(e,i))e=e[r]||e;else{if((h=l[s])&&h[0]===b&&h[1]===a)return c[2]=h[2];if(l[s]=c,c[2]=t(e,n,u))return!0}return!1}}function ft(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function pt(t,e,n,r,i){for(var s,o=[],a=0,u=t.length,h=null!=e;a<u;a++)(s=t[a])&&(n&&!n(s,r,i)||(o.push(s),h&&e.push(a)));return o}function mt(t,e,n,r,i,s){return r&&!r[y]&&(r=mt(r)),i&&!i[y]&&(i=mt(i,s)),et((function(s,o,a,u){var h,c,d,f,p=[],g=[],y=o.length,b=s||function(t,e,n){for(var r=0,i=e.length;r<i;r++)Z(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),w=!t||!s&&e?b:pt(b,p,t,a,u);if(n?n(w,f=i||(s?t:y||r)?[]:o,a,u):f=w,r)for(h=pt(f,g),r(h,[],a,u),c=h.length;c--;)(d=h[c])&&(f[g[c]]=!(w[g[c]]=d));if(s){if(i||t){if(i){for(h=[],c=f.length;c--;)(d=f[c])&&h.push(w[c]=d);i(null,f=[],h,u)}for(c=f.length;c--;)(d=f[c])&&(h=i?l.call(s,d):p[c])>-1&&(s[h]=!(o[h]=d))}}else f=pt(f===o?f.splice(y,f.length):f),i?i(null,o,f,u):m.apply(o,f)}))}function gt(t){for(var r,i,s,o=t.length,a=e.relative[t[0].type],u=a||e.relative[" "],h=a?1:0,c=dt((function(t){return t===r}),u,!0),d=dt((function(t){return l.call(r,t)>-1}),u,!0),f=[function(t,e,i){var s=!a&&(i||e!=n)||((r=e).nodeType?c(t,e,i):d(t,e,i));return r=null,s}];h<o;h++)if(i=e.relative[t[h].type])f=[dt(ft(f),i)];else{if((i=e.filter[t[h].type].apply(null,t[h].matches))[y]){for(s=++h;s<o&&!e.relative[t[s].type];s++);return mt(h>1&&ft(f),h>1&&ct(t.slice(0,h-1).concat({value:" "===t[h-2].type?"*":""})).replace(j,"$1"),i,h<s&>(t.slice(h,s)),s<o&>(t=t.slice(s)),s<o&&ct(t))}f.push(i)}return ft(f)}function yt(t,r){var i,s=[],o=[],a=_[t+" "];if(!a){for(r||(r=lt(t)),i=r.length;i--;)(a=gt(r[i]))[y]?s.push(a):o.push(a);a=_(t,function(t,r){var i=r.length>0,s=t.length>0,o=function(o,a,h,l,d){var f,p,g,y=0,w="0",v=o&&[],x=[],_=n,S=o||s&&e.find.TAG("*",d),M=b+=null==_?1:Math.random()||.1,C=S.length;for(d&&(n=a==u||a||d);w!==C&&null!=(f=S[w]);w++){if(s&&f){for(p=0,a||f.ownerDocument==u||(ut(f),h=!c);g=t[p++];)if(g(f,a||u,h)){m.call(l,f);break}d&&(b=M)}i&&((f=!g&&f)&&y--,o&&v.push(f))}if(y+=w,i&&w!==y){for(p=0;g=r[p++];)g(v,x,a,h);if(o){if(y>0)for(;w--;)v[w]||x[w]||(x[w]=N.call(l));x=pt(x)}m.apply(l,x),d&&!o&&x.length>0&&y+r.length>1&&O.uniqueSort(l)}return d&&(b=M,n=_),v};return i?et(o):o}(o,s)),a.selector=t}return a}function bt(t,n,r,i){var s,o,a,u,h,l="function"==typeof t&&t,d=!i&<(t=l.selector||t);if(r=r||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===n.nodeType&&c&&e.relative[o[1].type]){if(!(n=(e.find.ID(a.matches[0].replace(W,Q),n)||[])[0]))return r;l&&(n=n.parentNode),t=t.slice(o.shift().value.length)}for(s=Y.needsContext.test(t)?0:o.length;s--&&(a=o[s],!e.relative[u=a.type]);)if((h=e.find[u])&&(i=h(a.matches[0].replace(W,Q),$.test(o[0].type)&&at(n.parentNode)||n))){if(o.splice(s,1),!(t=i.length&&ct(o)))return m.apply(r,i),r;break}}return(l||yt(t,d))(i,n,!c,r,!n||$.test(t)&&at(n.parentNode)||n),r}ht.prototype=e.filters=e.pseudos,e.setFilters=new ht,g.sortStable=y.split("").sort(M).join("")===y,ut(),g.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(u.createElement("fieldset"))})),O.find=Z,O.expr[":"]=O.expr.pseudos,O.unique=O.uniqueSort,Z.compile=yt,Z.select=bt,Z.setDocument=ut,Z.tokenize=lt,Z.escape=O.escapeSelector,Z.getText=O.text,Z.isXML=O.isXMLDoc,Z.selectors=O.expr,Z.support=O.support,Z.uniqueSort=O.uniqueSort}();var I=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&O(t).is(n))break;r.push(t)}return r},F=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},R=O.expr.match.needsContext,V=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(t,e,n){return y(e)?O.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?O.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?O.grep(t,(function(t){return l.call(e,t)>-1!==n})):O.filter(e,t,n)}O.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?O.find.matchesSelector(r,t)?[r]:[]:O.find.matches(t,O.grep(e,(function(t){return 1===t.nodeType})))},O.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(O(t).filter((function(){for(e=0;e<r;e++)if(O.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)O.find(t,i[e],n);return r>1?O.uniqueSort(n):n},filter:function(t){return this.pushStack(z(this,t||[],!1))},not:function(t){return this.pushStack(z(this,t||[],!0))},is:function(t){return!!z(this,"string"==typeof t&&R.test(t)?O(t):t||[],!1).length}});var q,X=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(O.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||q,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:X.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof O?e[0]:e,O.merge(this,O.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:w,!0)),V.test(r[1])&&O.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=w.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(O):O.makeArray(t,this)}).prototype=O.fn,q=O(w);var Y=/^(?:parents|prev(?:Until|All))/,G={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}O.fn.extend({has:function(t){var e=O(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(O.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,s=[],o="string"!=typeof t&&O(t);if(!R.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&O.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?O.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?l.call(O(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(O.uniqueSort(O.merge(this.get(),O(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),O.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return I(t,"parentNode")},parentsUntil:function(t,e,n){return I(t,"parentNode",n)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return I(t,"nextSibling")},prevAll:function(t){return I(t,"previousSibling")},nextUntil:function(t,e,n){return I(t,"nextSibling",n)},prevUntil:function(t,e,n){return I(t,"previousSibling",n)},siblings:function(t){return F((t.parentNode||{}).firstChild,t)},children:function(t){return F(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(P(t,"template")&&(t=t.content||t),O.merge([],t.childNodes))}},(function(t,e){O.fn[t]=function(n,r){var i=O.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=O.filter(r,i)),this.length>1&&(G[t]||O.uniqueSort(i),Y.test(t)&&i.reverse()),this.pushStack(i)}}));var U=/[^\x20\t\r\n\f]+/g;function $(t){return t}function W(t){throw t}function Q(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}O.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return O.each(t.match(U)||[],(function(t,n){e[n]=!0})),e}(t):O.extend({},t);var e,n,r,i,s=[],o=[],a=-1,u=function(){for(i=i||t.once,r=e=!0;o.length;a=-1)for(n=o.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=s.length,n=!1);t.memory||(n=!1),e=!1,i&&(s=n?[]:"")},h={add:function(){return s&&(n&&!e&&(a=s.length-1,o.push(n)),function e(n){O.each(n,(function(n,r){y(r)?t.unique&&h.has(r)||s.push(r):r&&r.length&&"string"!==_(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return O.each(arguments,(function(t,e){for(var n;(n=O.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--})),this},has:function(t){return t?O.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return i=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return i=o=[],n||e||(s=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],o.push(n),e||u()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},O.extend({Deferred:function(t){var e=[["notify","progress",O.Callbacks("memory"),O.Callbacks("memory"),2],["resolve","done",O.Callbacks("once memory"),O.Callbacks("once memory"),0,"resolved"],["reject","fail",O.Callbacks("once memory"),O.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return O.Deferred((function(n){O.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];s[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var s=0;function o(t,e,n,i){return function(){var a=this,u=arguments,h=function(){var r,h;if(!(t<s)){if((r=n.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");h=r&&("object"==typeof r||"function"==typeof r)&&r.then,y(h)?i?h.call(r,o(s,e,$,i),o(s,e,W,i)):(s++,h.call(r,o(s,e,$,i),o(s,e,W,i),o(s,e,$,e.notifyWith))):(n!==$&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},l=i?h:function(){try{h()}catch(r){O.Deferred.exceptionHook&&O.Deferred.exceptionHook(r,l.error),t+1>=s&&(n!==W&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?l():(O.Deferred.getErrorHook?l.error=O.Deferred.getErrorHook():O.Deferred.getStackHook&&(l.error=O.Deferred.getStackHook()),r.setTimeout(l))}}return O.Deferred((function(r){e[0][3].add(o(0,r,y(i)?i:$,r.notifyWith)),e[1][3].add(o(0,r,y(t)?t:$)),e[2][3].add(o(0,r,y(n)?n:W))})).promise()},promise:function(t){return null!=t?O.extend(t,i):i}},s={};return O.each(e,(function(t,r){var o=r[2],a=r[5];i[r[1]]=o.add,a&&o.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),o.add(r[3].fire),s[r[0]]=function(){return s[r[0]+"With"](this===s?void 0:this,arguments),this},s[r[0]+"With"]=o.fireWith})),i.promise(s),t&&t.call(s,s),s},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),s=O.Deferred(),o=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||s.resolveWith(r,i)}};if(e<=1&&(Q(t,s.done(o(n)).resolve,s.reject,!e),"pending"===s.state()||y(i[n]&&i[n].then)))return s.then();for(;n--;)Q(i[n],o(n),s.reject);return s.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;O.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&J.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},O.readyException=function(t){r.setTimeout((function(){throw t}))};var K=O.Deferred();function Z(){w.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),O.ready()}O.fn.ready=function(t){return K.then(t).catch((function(t){O.readyException(t)})),this},O.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--O.readyWait:O.isReady)||(O.isReady=!0,!0!==t&&--O.readyWait>0||K.resolveWith(w,[O]))}}),O.ready.then=K.then,"complete"===w.readyState||"loading"!==w.readyState&&!w.documentElement.doScroll?r.setTimeout(O.ready):(w.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var tt=function(t,e,n,r,i,s,o){var a=0,u=t.length,h=null==n;if("object"===_(n))for(a in i=!0,n)tt(t,e,a,n[a],!0,s,o);else if(void 0!==r&&(i=!0,y(r)||(o=!0),h&&(o?(e.call(t,r),e=null):(h=e,e=function(t,e,n){return h.call(O(t),n)})),e))for(;a<u;a++)e(t[a],n,o?r:r.call(t[a],a,e(t[a],n)));return i?t:h?e.call(t):u?e(t[0],n):s},et=/^-ms-/,nt=/-([a-z])/g;function rt(t,e){return e.toUpperCase()}function it(t){return t.replace(et,"ms-").replace(nt,rt)}var st=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=O.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},st(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[it(e)]=n;else for(r in e)i[it(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][it(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(it):(e=it(e))in r?[e]:e.match(U)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||O.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!O.isEmptyObject(e)}};var at=new ot,ut=new ot,ht=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,lt=/[A-Z]/g;function ct(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(lt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:ht.test(t)?JSON.parse(t):t)}(n)}catch(t){}ut.set(t,e,n)}else n=void 0;return n}O.extend({hasData:function(t){return ut.hasData(t)||at.hasData(t)},data:function(t,e,n){return ut.access(t,e,n)},removeData:function(t,e){ut.remove(t,e)},_data:function(t,e,n){return at.access(t,e,n)},_removeData:function(t,e){at.remove(t,e)}}),O.fn.extend({data:function(t,e){var n,r,i,s=this[0],o=s&&s.attributes;if(void 0===t){if(this.length&&(i=ut.get(s),1===s.nodeType&&!at.get(s,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(r=o[n].name).indexOf("data-")&&(r=it(r.slice(5)),ct(s,r,i[r]));at.set(s,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){ut.set(this,t)})):tt(this,(function(e){var n;if(s&&void 0===e)return void 0!==(n=ut.get(s,t))||void 0!==(n=ct(s,t))?n:void 0;this.each((function(){ut.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){ut.remove(this,t)}))}}),O.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=at.get(t,e),n&&(!r||Array.isArray(n)?r=at.access(t,e,O.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=O.queue(t,e),r=n.length,i=n.shift(),s=O._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete s.stop,i.call(t,(function(){O.dequeue(t,e)}),s)),!r&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return at.get(t,n)||at.access(t,n,{empty:O.Callbacks("once memory").add((function(){at.remove(t,[e+"queue",n])}))})}}),O.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?O.queue(this[0],t):void 0===e?this:this.each((function(){var n=O.queue(this,t,e);O._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&O.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){O.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=O.Deferred(),s=this,o=this.length,a=function(){--r||i.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(n=at.get(s[o],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var dt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=new RegExp("^(?:([+-])=|)("+dt+")([a-z%]*)$","i"),pt=["Top","Right","Bottom","Left"],mt=w.documentElement,gt=function(t){return O.contains(t.ownerDocument,t)},yt={composed:!0};mt.getRootNode&&(gt=function(t){return O.contains(t.ownerDocument,t)||t.getRootNode(yt)===t.ownerDocument});var bt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&>(t)&&"none"===O.css(t,"display")};function wt(t,e,n,r){var i,s,o=20,a=r?function(){return r.cur()}:function(){return O.css(t,e,"")},u=a(),h=n&&n[3]||(O.cssNumber[e]?"":"px"),l=t.nodeType&&(O.cssNumber[e]||"px"!==h&&+u)&&ft.exec(O.css(t,e));if(l&&l[3]!==h){for(u/=2,h=h||l[3],l=+u||1;o--;)O.style(t,e,l+h),(1-s)*(1-(s=a()/u||.5))<=0&&(o=0),l/=s;l*=2,O.style(t,e,l+h),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=h,r.start=l,r.end=i)),i}var vt={};function xt(t){var e,n=t.ownerDocument,r=t.nodeName,i=vt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=O.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),vt[r]=i,i)}function _t(t,e){for(var n,r,i=[],s=0,o=t.length;s<o;s++)(r=t[s]).style&&(n=r.style.display,e?("none"===n&&(i[s]=at.get(r,"display")||null,i[s]||(r.style.display="")),""===r.style.display&&bt(r)&&(i[s]=xt(r))):"none"!==n&&(i[s]="none",at.set(r,"display",n)));for(s=0;s<o;s++)null!=i[s]&&(t[s].style.display=i[s]);return t}O.fn.extend({show:function(){return _t(this,!0)},hide:function(){return _t(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){bt(this)?O(this).show():O(this).hide()}))}});var St,Mt,Ot=/^(?:checkbox|radio)$/i,Ct=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Pt=/^$|^module$|\/(?:java|ecma)script/i;St=w.createDocumentFragment().appendChild(w.createElement("div")),(Mt=w.createElement("input")).setAttribute("type","radio"),Mt.setAttribute("checked","checked"),Mt.setAttribute("name","t"),St.appendChild(Mt),g.checkClone=St.cloneNode(!0).cloneNode(!0).lastChild.checked,St.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!St.cloneNode(!0).lastChild.defaultValue,St.innerHTML="<option></option>",g.option=!!St.lastChild;var Nt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function At(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&P(t,e)?O.merge([t],n):n}function Et(t,e){for(var n=0,r=t.length;n<r;n++)at.set(t[n],"globalEval",!e||at.get(e[n],"globalEval"))}Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,g.option||(Nt.optgroup=Nt.option=[1,"<select multiple='multiple'>","</select>"]);var Tt=/<|&#?\w+;/;function jt(t,e,n,r,i){for(var s,o,a,u,h,l,c=e.createDocumentFragment(),d=[],f=0,p=t.length;f<p;f++)if((s=t[f])||0===s)if("object"===_(s))O.merge(d,s.nodeType?[s]:s);else if(Tt.test(s)){for(o=o||c.appendChild(e.createElement("div")),a=(Ct.exec(s)||["",""])[1].toLowerCase(),u=Nt[a]||Nt._default,o.innerHTML=u[1]+O.htmlPrefilter(s)+u[2],l=u[0];l--;)o=o.lastChild;O.merge(d,o.childNodes),(o=c.firstChild).textContent=""}else d.push(e.createTextNode(s));for(c.textContent="",f=0;s=d[f++];)if(r&&O.inArray(s,r)>-1)i&&i.push(s);else if(h=gt(s),o=At(c.appendChild(s),"script"),h&&Et(o),n)for(l=0;s=o[l++];)Pt.test(s.type||"")&&n.push(s);return c}var Dt=/^([^.]*)(?:\.(.+)|)/;function kt(){return!0}function Lt(){return!1}function Bt(t,e,n,r,i,s){var o,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)Bt(t,a,n,r,e[a],s);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Lt;else if(!i)return t;return 1===s&&(o=i,i=function(t){return O().off(t),o.apply(this,arguments)},i.guid=o.guid||(o.guid=O.guid++)),t.each((function(){O.event.add(this,e,i,r,n)}))}function It(t,e,n){n?(at.set(t,e,!1),O.event.add(t,e,{namespace:!1,handler:function(t){var n,r=at.get(this,e);if(1&t.isTrigger&&this[e]){if(r)(O.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=a.call(arguments),at.set(this,e,r),this[e](),n=at.get(this,e),at.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else r&&(at.set(this,e,O.event.trigger(r[0],r.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=kt)}})):void 0===at.get(t,e)&&O.event.add(t,e,kt)}O.event={global:{},add:function(t,e,n,r,i){var s,o,a,u,h,l,c,d,f,p,m,g=at.get(t);if(st(t))for(n.handler&&(n=(s=n).handler,i=s.selector),i&&O.find.matchesSelector(mt,i),n.guid||(n.guid=O.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(e){return void 0!==O&&O.event.triggered!==e.type?O.event.dispatch.apply(t,arguments):void 0}),h=(e=(e||"").match(U)||[""]).length;h--;)f=m=(a=Dt.exec(e[h])||[])[1],p=(a[2]||"").split(".").sort(),f&&(c=O.event.special[f]||{},f=(i?c.delegateType:c.bindType)||f,c=O.event.special[f]||{},l=O.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&O.expr.match.needsContext.test(i),namespace:p.join(".")},s),(d=u[f])||((d=u[f]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(f,o)),c.add&&(c.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),O.event.global[f]=!0)},remove:function(t,e,n,r,i){var s,o,a,u,h,l,c,d,f,p,m,g=at.hasData(t)&&at.get(t);if(g&&(u=g.events)){for(h=(e=(e||"").match(U)||[""]).length;h--;)if(f=m=(a=Dt.exec(e[h])||[])[1],p=(a[2]||"").split(".").sort(),f){for(c=O.event.special[f]||{},d=u[f=(r?c.delegateType:c.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;s--;)l=d[s],!i&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(s,1),l.selector&&d.delegateCount--,c.remove&&c.remove.call(t,l));o&&!d.length&&(c.teardown&&!1!==c.teardown.call(t,p,g.handle)||O.removeEvent(t,f,g.handle),delete u[f])}else for(f in u)O.event.remove(t,f+e[h],n,r,!0);O.isEmptyObject(u)&&at.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,s,o,a=new Array(arguments.length),u=O.event.fix(t),h=(at.get(this,"events")||Object.create(null))[u.type]||[],l=O.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(o=O.event.handlers.call(this,u,h),e=0;(i=o[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(s=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==s.namespace&&!u.rnamespace.test(s.namespace)||(u.handleObj=s,u.data=s.data,void 0!==(r=((O.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,a))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,s,o,a=[],u=e.delegateCount,h=t.target;if(u&&h.nodeType&&!("click"===t.type&&t.button>=1))for(;h!==this;h=h.parentNode||this)if(1===h.nodeType&&("click"!==t.type||!0!==h.disabled)){for(s=[],o={},n=0;n<u;n++)void 0===o[i=(r=e[n]).selector+" "]&&(o[i]=r.needsContext?O(i,this).index(h)>-1:O.find(i,this,null,[h]).length),o[i]&&s.push(r);s.length&&a.push({elem:h,handlers:s})}return h=this,u<e.length&&a.push({elem:h,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(O.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[O.expando]?t:new O.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Ot.test(e.type)&&e.click&&P(e,"input")&&It(e,"click",!0),!1},trigger:function(t){var e=this||t;return Ot.test(e.type)&&e.click&&P(e,"input")&&It(e,"click"),!0},_default:function(t){var e=t.target;return Ot.test(e.type)&&e.click&&P(e,"input")&&at.get(e,"click")||P(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},O.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},O.Event=function(t,e){if(!(this instanceof O.Event))return new O.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?kt:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&O.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[O.expando]=!0},O.Event.prototype={constructor:O.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=kt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=kt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=kt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},O.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},O.event.addProp),O.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(w.documentMode){var n=at.get(this,"handle"),r=O.event.fix(t);r.type="focusin"===t.type?"focus":"blur",r.isSimulated=!0,n(t),r.target===r.currentTarget&&n(r)}else O.event.simulate(e,t.target,O.event.fix(t))}O.event.special[t]={setup:function(){var r;if(It(this,t,!0),!w.documentMode)return!1;(r=at.get(this,e))||this.addEventListener(e,n),at.set(this,e,(r||0)+1)},trigger:function(){return It(this,t),!0},teardown:function(){var t;if(!w.documentMode)return!1;(t=at.get(this,e)-1)?at.set(this,e,t):(this.removeEventListener(e,n),at.remove(this,e))},_default:function(e){return at.get(e.target,t)},delegateType:e},O.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=w.documentMode?this:r,s=at.get(i,e);s||(w.documentMode?this.addEventListener(e,n):r.addEventListener(t,n,!0)),at.set(i,e,(s||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=w.documentMode?this:r,s=at.get(i,e)-1;s?at.set(i,e,s):(w.documentMode?this.removeEventListener(e,n):r.removeEventListener(t,n,!0),at.remove(i,e))}}})),O.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){O.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||O.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),O.fn.extend({on:function(t,e,n,r){return Bt(this,t,e,n,r)},one:function(t,e,n,r){return Bt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,O(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Lt),this.each((function(){O.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,Rt=/checked\s*(?:[^=]|=\s*.checked.)/i,Vt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function zt(t,e){return P(t,"table")&&P(11!==e.nodeType?e:e.firstChild,"tr")&&O(t).children("tbody")[0]||t}function qt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Xt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Yt(t,e){var n,r,i,s,o,a;if(1===e.nodeType){if(at.hasData(t)&&(a=at.get(t).events))for(i in at.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)O.event.add(e,i,a[i][n]);ut.hasData(t)&&(s=ut.access(t),o=O.extend({},s),ut.set(e,o))}}function Gt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Ot.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Ht(t,e,n,r){e=u(e);var i,s,o,a,h,l,c=0,d=t.length,f=d-1,p=e[0],m=y(p);if(m||d>1&&"string"==typeof p&&!g.checkClone&&Rt.test(p))return t.each((function(i){var s=t.eq(i);m&&(e[0]=p.call(this,i,s.html())),Ht(s,e,n,r)}));if(d&&(s=(i=jt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=s),s||r)){for(a=(o=O.map(At(i,"script"),qt)).length;c<d;c++)h=i,c!==f&&(h=O.clone(h,!0,!0),a&&O.merge(o,At(h,"script"))),n.call(t[c],h,c);if(a)for(l=o[o.length-1].ownerDocument,O.map(o,Xt),c=0;c<a;c++)h=o[c],Pt.test(h.type||"")&&!at.access(h,"globalEval")&&O.contains(l,h)&&(h.src&&"module"!==(h.type||"").toLowerCase()?O._evalUrl&&!h.noModule&&O._evalUrl(h.src,{nonce:h.nonce||h.getAttribute("nonce")},l):x(h.textContent.replace(Vt,""),h,l))}return t}function Ut(t,e,n){for(var r,i=e?O.filter(e,t):t,s=0;null!=(r=i[s]);s++)n||1!==r.nodeType||O.cleanData(At(r)),r.parentNode&&(n&>(r)&&Et(At(r,"script")),r.parentNode.removeChild(r));return t}O.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,s,o,a=t.cloneNode(!0),u=gt(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||O.isXMLDoc(t)))for(o=At(a),r=0,i=(s=At(t)).length;r<i;r++)Gt(s[r],o[r]);if(e)if(n)for(s=s||At(t),o=o||At(a),r=0,i=s.length;r<i;r++)Yt(s[r],o[r]);else Yt(t,a);return(o=At(a,"script")).length>0&&Et(o,!u&&At(t,"script")),a},cleanData:function(t){for(var e,n,r,i=O.event.special,s=0;void 0!==(n=t[s]);s++)if(st(n)){if(e=n[at.expando]){if(e.events)for(r in e.events)i[r]?O.event.remove(n,r):O.removeEvent(n,r,e.handle);n[at.expando]=void 0}n[ut.expando]&&(n[ut.expando]=void 0)}}}),O.fn.extend({detach:function(t){return Ut(this,t,!0)},remove:function(t){return Ut(this,t)},text:function(t){return tt(this,(function(t){return void 0===t?O.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ht(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||zt(this,t).appendChild(t)}))},prepend:function(){return Ht(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=zt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(O.cleanData(At(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return O.clone(this,t,e)}))},html:function(t){return tt(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ft.test(t)&&!Nt[(Ct.exec(t)||["",""])[1].toLowerCase()]){t=O.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(O.cleanData(At(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ht(this,arguments,(function(e){var n=this.parentNode;O.inArray(this,t)<0&&(O.cleanData(At(this)),n&&n.replaceChild(e,this))}),t)}}),O.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){O.fn[t]=function(t){for(var n,r=[],i=O(t),s=i.length-1,o=0;o<=s;o++)n=o===s?this:this.clone(!0),O(i[o])[e](n),h.apply(r,n.get());return this.pushStack(r)}}));var $t=new RegExp("^("+dt+")(?!px)[a-z%]+$","i"),Wt=/^--/,Qt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},Jt=function(t,e,n){var r,i,s={};for(i in e)s[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=s[i];return r},Kt=new RegExp(pt.join("|"),"i");function Zt(t,e,n){var r,i,s,o,a=Wt.test(e),u=t.style;return(n=n||Qt(t))&&(o=n.getPropertyValue(e)||n[e],a&&o&&(o=o.replace(j,"$1")||void 0),""!==o||gt(t)||(o=O.style(t,e)),!g.pixelBoxStyles()&&$t.test(o)&&Kt.test(e)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=o,o=n.width,u.width=r,u.minWidth=i,u.maxWidth=s)),void 0!==o?o+"":o}function te(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){h.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",mt.appendChild(h).appendChild(l);var t=r.getComputedStyle(l);n="1%"!==t.top,u=12===e(t.marginLeft),l.style.right="60%",o=36===e(t.right),i=36===e(t.width),l.style.position="absolute",s=12===e(l.offsetWidth/3),mt.removeChild(h),l=null}}function e(t){return Math.round(parseFloat(t))}var n,i,s,o,a,u,h=w.createElement("div"),l=w.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===l.style.backgroundClip,O.extend(g,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),s},reliableTrDimensions:function(){var t,e,n,i;return null==a&&(t=w.createElement("table"),e=w.createElement("tr"),n=w.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",mt.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,mt.removeChild(t)),a}}))}();var ee=["Webkit","Moz","ms"],ne=w.createElement("div").style,re={};function ie(t){return O.cssProps[t]||re[t]||(t in ne?t:re[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=ee.length;n--;)if((t=ee[n]+e)in ne)return t}(t)||t)}var se=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},ae={letterSpacing:"0",fontWeight:"400"};function ue(t,e,n){var r=ft.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function he(t,e,n,r,i,s){var o="width"===e?1:0,a=0,u=0,h=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(h+=O.css(t,n+pt[o],!0,i)),r?("content"===n&&(u-=O.css(t,"padding"+pt[o],!0,i)),"margin"!==n&&(u-=O.css(t,"border"+pt[o]+"Width",!0,i))):(u+=O.css(t,"padding"+pt[o],!0,i),"padding"!==n?u+=O.css(t,"border"+pt[o]+"Width",!0,i):a+=O.css(t,"border"+pt[o]+"Width",!0,i));return!r&&s>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-u-a-.5))||0),u+h}function le(t,e,n){var r=Qt(t),i=(!g.boxSizingReliable()||n)&&"border-box"===O.css(t,"boxSizing",!1,r),s=i,o=Zt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if($t.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&P(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===O.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===O.css(t,"boxSizing",!1,r),(s=a in t)&&(o=t[a])),(o=parseFloat(o)||0)+he(t,e,n||(i?"border":"content"),s,r,o)+"px"}function ce(t,e,n,r,i){return new ce.prototype.init(t,e,n,r,i)}O.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Zt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,s,o,a=it(e),u=Wt.test(e),h=t.style;if(u||(e=ie(a)),o=O.cssHooks[e]||O.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(t,!1,r))?i:h[e];"string"==(s=typeof n)&&(i=ft.exec(n))&&i[1]&&(n=wt(t,e,i),s="number"),null!=n&&n==n&&("number"!==s||u||(n+=i&&i[3]||(O.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(h[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,r))||(u?h.setProperty(e,n):h[e]=n))}},css:function(t,e,n,r){var i,s,o,a=it(e);return Wt.test(e)||(e=ie(a)),(o=O.cssHooks[e]||O.cssHooks[a])&&"get"in o&&(i=o.get(t,!0,n)),void 0===i&&(i=Zt(t,e,r)),"normal"===i&&e in ae&&(i=ae[e]),""===n||n?(s=parseFloat(i),!0===n||isFinite(s)?s||0:i):i}}),O.each(["height","width"],(function(t,e){O.cssHooks[e]={get:function(t,n,r){if(n)return!se.test(O.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?le(t,e,r):Jt(t,oe,(function(){return le(t,e,r)}))},set:function(t,n,r){var i,s=Qt(t),o=!g.scrollboxSize()&&"absolute"===s.position,a=(o||r)&&"border-box"===O.css(t,"boxSizing",!1,s),u=r?he(t,e,r,a,s):0;return a&&o&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-he(t,e,"border",!1,s)-.5)),u&&(i=ft.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=O.css(t,e)),ue(0,n,u)}}})),O.cssHooks.marginLeft=te(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Jt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),O.each({margin:"",padding:"",border:"Width"},(function(t,e){O.cssHooks[t+e]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+pt[r]+e]=s[r]||s[r-2]||s[0];return i}},"margin"!==t&&(O.cssHooks[t+e].set=ue)})),O.fn.extend({css:function(t,e){return tt(this,(function(t,e,n){var r,i,s={},o=0;if(Array.isArray(e)){for(r=Qt(t),i=e.length;o<i;o++)s[e[o]]=O.css(t,e[o],!1,r);return s}return void 0!==n?O.style(t,e,n):O.css(t,e)}),t,e,arguments.length>1)}}),O.Tween=ce,ce.prototype={constructor:ce,init:function(t,e,n,r,i,s){this.elem=t,this.prop=n,this.easing=i||O.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=s||(O.cssNumber[n]?"":"px")},cur:function(){var t=ce.propHooks[this.prop];return t&&t.get?t.get(this):ce.propHooks._default.get(this)},run:function(t){var e,n=ce.propHooks[this.prop];return this.options.duration?this.pos=e=O.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ce.propHooks._default.set(this),this}},ce.prototype.init.prototype=ce.prototype,ce.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=O.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){O.fx.step[t.prop]?O.fx.step[t.prop](t):1!==t.elem.nodeType||!O.cssHooks[t.prop]&&null==t.elem.style[ie(t.prop)]?t.elem[t.prop]=t.now:O.style(t.elem,t.prop,t.now+t.unit)}}},ce.propHooks.scrollTop=ce.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},O.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},O.fx=ce.prototype.init,O.fx.step={};var de,fe,pe=/^(?:toggle|show|hide)$/,me=/queueHooks$/;function ge(){fe&&(!1===w.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ge):r.setTimeout(ge,O.fx.interval),O.fx.tick())}function ye(){return r.setTimeout((function(){de=void 0})),de=Date.now()}function be(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=pt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function we(t,e,n){for(var r,i=(ve.tweeners[e]||[]).concat(ve.tweeners["*"]),s=0,o=i.length;s<o;s++)if(r=i[s].call(n,e,t))return r}function ve(t,e,n){var r,i,s=0,o=ve.prefilters.length,a=O.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=de||ye(),n=Math.max(0,h.startTime+h.duration-e),r=1-(n/h.duration||0),s=0,o=h.tweens.length;s<o;s++)h.tweens[s].run(r);return a.notifyWith(t,[h,r,n]),r<1&&o?n:(o||a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:O.extend({},e),opts:O.extend(!0,{specialEasing:{},easing:O.easing._default},n),originalProperties:e,originalOptions:n,startTime:de||ye(),duration:n.duration,tweens:[],createTween:function(e,n){var r=O.Tween(t,h.opts,e,n,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(r),r},stop:function(e){var n=0,r=e?h.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)h.tweens[n].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),l=h.props;for(function(t,e){var n,r,i,s,o;for(n in t)if(i=e[r=it(n)],s=t[n],Array.isArray(s)&&(i=s[1],s=t[n]=s[0]),n!==r&&(t[r]=s,delete t[n]),(o=O.cssHooks[r])&&"expand"in o)for(n in s=o.expand(s),delete t[r],s)n in t||(t[n]=s[n],e[n]=i);else e[r]=i}(l,h.opts.specialEasing);s<o;s++)if(r=ve.prefilters[s].call(h,t,l,h.opts))return y(r.stop)&&(O._queueHooks(h.elem,h.opts.queue).stop=r.stop.bind(r)),r;return O.map(l,we,h),y(h.opts.start)&&h.opts.start.call(t,h),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always),O.fx.timer(O.extend(u,{elem:t,anim:h,queue:h.opts.queue})),h}O.Animation=O.extend(ve,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return wt(n.elem,t,ft.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(U);for(var n,r=0,i=t.length;r<i;r++)n=t[r],ve.tweeners[n]=ve.tweeners[n]||[],ve.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,s,o,a,u,h,l,c="width"in e||"height"in e,d=this,f={},p=t.style,m=t.nodeType&&bt(t),g=at.get(t,"fxshow");for(r in n.queue||(null==(o=O._queueHooks(t,"fx")).unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,d.always((function(){d.always((function(){o.unqueued--,O.queue(t,"fx").length||o.empty.fire()}))}))),e)if(i=e[r],pe.test(i)){if(delete e[r],s=s||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}f[r]=g&&g[r]||O.style(t,r)}if((u=!O.isEmptyObject(e))||!O.isEmptyObject(f))for(r in c&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(h=g&&g.display)&&(h=at.get(t,"display")),"none"===(l=O.css(t,"display"))&&(h?l=h:(_t([t],!0),h=t.style.display||h,l=O.css(t,"display"),_t([t]))),("inline"===l||"inline-block"===l&&null!=h)&&"none"===O.css(t,"float")&&(u||(d.done((function(){p.display=h})),null==h&&(l=p.display,h="none"===l?"":l)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(g?"hidden"in g&&(m=g.hidden):g=at.access(t,"fxshow",{display:h}),s&&(g.hidden=!m),m&&_t([t],!0),d.done((function(){for(r in m||_t([t]),at.remove(t,"fxshow"),f)O.style(t,r,f[r])}))),u=we(m?g[r]:0,r,d),r in g||(g[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?ve.prefilters.unshift(t):ve.prefilters.push(t)}}),O.speed=function(t,e,n){var r=t&&"object"==typeof t?O.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return O.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in O.fx.speeds?r.duration=O.fx.speeds[r.duration]:r.duration=O.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&O.dequeue(this,r.queue)},r},O.fn.extend({fadeTo:function(t,e,n,r){return this.filter(bt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=O.isEmptyObject(t),s=O.speed(e,n,r),o=function(){var e=ve(this,O.extend({},t),s);(i||at.get(this,"finish"))&&e.stop(!0)};return o.finish=o,i||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",s=O.timers,o=at.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&me.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem!==this||null!=t&&s[i].queue!==t||(s[i].anim.stop(n),e=!1,s.splice(i,1));!e&&n||O.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=at.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],s=O.timers,o=r?r.length:0;for(n.finish=!0,O.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<o;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),O.each(["toggle","show","hide"],(function(t,e){var n=O.fn[e];O.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(be(e,!0),t,r,i)}})),O.each({slideDown:be("show"),slideUp:be("hide"),slideToggle:be("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){O.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),O.timers=[],O.fx.tick=function(){var t,e=0,n=O.timers;for(de=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||O.fx.stop(),de=void 0},O.fx.timer=function(t){O.timers.push(t),O.fx.start()},O.fx.interval=13,O.fx.start=function(){fe||(fe=!0,ge())},O.fx.stop=function(){fe=null},O.fx.speeds={slow:600,fast:200,_default:400},O.fn.delay=function(t,e){return t=O.fx&&O.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=w.createElement("input"),e=w.createElement("select").appendChild(w.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=w.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var xe,_e=O.expr.attrHandle;O.fn.extend({attr:function(t,e){return tt(this,O.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){O.removeAttr(this,t)}))}}),O.extend({attr:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?O.prop(t,e,n):(1===s&&O.isXMLDoc(t)||(i=O.attrHooks[e.toLowerCase()]||(O.expr.match.bool.test(e)?xe:void 0)),void 0!==n?null===n?void O.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=O.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&P(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(U);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?O.removeAttr(t,n):t.setAttribute(n,n),n}},O.each(O.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=_e[e]||O.find.attr;_e[e]=function(t,e,r){var i,s,o=e.toLowerCase();return r||(s=_e[o],_e[o]=i,i=null!=n(t,e,r)?o:null,_e[o]=s),i}}));var Se=/^(?:input|select|textarea|button)$/i,Me=/^(?:a|area)$/i;function Oe(t){return(t.match(U)||[]).join(" ")}function Ce(t){return t.getAttribute&&t.getAttribute("class")||""}function Pe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(U)||[]}O.fn.extend({prop:function(t,e){return tt(this,O.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[O.propFix[t]||t]}))}}),O.extend({prop:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&O.isXMLDoc(t)||(e=O.propFix[e]||e,i=O.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=O.find.attr(t,"tabindex");return e?parseInt(e,10):Se.test(t.nodeName)||Me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(O.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),O.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){O.propFix[this.toLowerCase()]=this})),O.fn.extend({addClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){O(this).addClass(t.call(this,e,Ce(this)))})):(e=Pe(t)).length?this.each((function(){if(r=Ce(this),n=1===this.nodeType&&" "+Oe(r)+" "){for(s=0;s<e.length;s++)i=e[s],n.indexOf(" "+i+" ")<0&&(n+=i+" ");o=Oe(n),r!==o&&this.setAttribute("class",o)}})):this},removeClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){O(this).removeClass(t.call(this,e,Ce(this)))})):arguments.length?(e=Pe(t)).length?this.each((function(){if(r=Ce(this),n=1===this.nodeType&&" "+Oe(r)+" "){for(s=0;s<e.length;s++)for(i=e[s];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");o=Oe(n),r!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,s,o=typeof t,a="string"===o||Array.isArray(t);return y(t)?this.each((function(n){O(this).toggleClass(t.call(this,n,Ce(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Pe(t),this.each((function(){if(a)for(s=O(this),i=0;i<n.length;i++)r=n[i],s.hasClass(r)?s.removeClass(r):s.addClass(r);else void 0!==t&&"boolean"!==o||((r=Ce(this))&&at.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":at.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+Oe(Ce(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ne=/\r/g;O.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,O(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=O.map(i,(function(t){return null==t?"":t+""}))),(e=O.valHooks[this.type]||O.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=O.valHooks[i.type]||O.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ne,""):null==n?"":n:void 0}}),O.extend({valHooks:{option:{get:function(t){var e=O.find.attr(t,"value");return null!=e?e:Oe(O.text(t))}},select:{get:function(t){var e,n,r,i=t.options,s=t.selectedIndex,o="select-one"===t.type,a=o?null:[],u=o?s+1:i.length;for(r=s<0?u:o?s:0;r<u;r++)if(((n=i[r]).selected||r===s)&&!n.disabled&&(!n.parentNode.disabled||!P(n.parentNode,"optgroup"))){if(e=O(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,s=O.makeArray(e),o=i.length;o--;)((r=i[o]).selected=O.inArray(O.valHooks.option.get(r),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),O.each(["radio","checkbox"],(function(){O.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=O.inArray(O(t).val(),e)>-1}},g.checkOn||(O.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Ae=r.location,Ee={guid:Date.now()},Te=/\?/;O.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||O.error("Invalid XML: "+(n?O.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var je=/^(?:focusinfocus|focusoutblur)$/,De=function(t){t.stopPropagation()};O.extend(O.event,{trigger:function(t,e,n,i){var s,o,a,u,h,l,c,d,p=[n||w],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(o=d=a=n=n||w,3!==n.nodeType&&8!==n.nodeType&&!je.test(m+O.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),h=m.indexOf(":")<0&&"on"+m,(t=t[O.expando]?t:new O.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:O.makeArray(e,[t]),c=O.event.special[m]||{},i||!c.trigger||!1!==c.trigger.apply(n,e))){if(!i&&!c.noBubble&&!b(n)){for(u=c.delegateType||m,je.test(u+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||w)&&p.push(a.defaultView||a.parentWindow||r)}for(s=0;(o=p[s++])&&!t.isPropagationStopped();)d=o,t.type=s>1?u:c.bindType||m,(l=(at.get(o,"events")||Object.create(null))[t.type]&&at.get(o,"handle"))&&l.apply(o,e),(l=h&&o[h])&&l.apply&&st(o)&&(t.result=l.apply(o,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),e)||!st(n)||h&&y(n[m])&&!b(n)&&((a=n[h])&&(n[h]=null),O.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,De),n[m](),t.isPropagationStopped()&&d.removeEventListener(m,De),O.event.triggered=void 0,a&&(n[h]=a)),t.result}},simulate:function(t,e,n){var r=O.extend(new O.Event,n,{type:t,isSimulated:!0});O.event.trigger(r,null,e)}}),O.fn.extend({trigger:function(t,e){return this.each((function(){O.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return O.event.trigger(t,e,n,!0)}});var ke=/\[\]$/,Le=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,Ie=/^(?:input|select|textarea|keygen)/i;function Fe(t,e,n,r){var i;if(Array.isArray(e))O.each(e,(function(e,i){n||ke.test(t)?r(t,i):Fe(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==_(e))r(t,e);else for(i in e)Fe(t+"["+i+"]",e[i],n,r)}O.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!O.isPlainObject(t))O.each(t,(function(){i(this.name,this.value)}));else for(n in t)Fe(n,t[n],e,i);return r.join("&")},O.fn.extend({serialize:function(){return O.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=O.prop(this,"elements");return t?O.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!O(this).is(":disabled")&&Ie.test(this.nodeName)&&!Be.test(t)&&(this.checked||!Ot.test(t))})).map((function(t,e){var n=O(this).val();return null==n?null:Array.isArray(n)?O.map(n,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:n.replace(Le,"\r\n")}})).get()}});var Re=/%20/g,Ve=/#.*$/,ze=/([?&])_=[^&]*/,qe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Xe=/^(?:GET|HEAD)$/,Ye=/^\/\//,Ge={},He={},Ue="*/".concat("*"),$e=w.createElement("a");function We(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,s=e.toLowerCase().match(U)||[];if(y(n))for(;r=s[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Qe(t,e,n,r){var i={},s=t===He;function o(a){var u;return i[a]=!0,O.each(t[a]||[],(function(t,a){var h=a(e,n,r);return"string"!=typeof h||s||i[h]?s?!(u=h):void 0:(e.dataTypes.unshift(h),o(h),!1)})),u}return o(e.dataTypes[0])||!i["*"]&&o("*")}function Je(t,e){var n,r,i=O.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&O.extend(!0,t,r),t}$e.href=Ae.href,O.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":O.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Je(Je(t,O.ajaxSettings),e):Je(O.ajaxSettings,t)},ajaxPrefilter:We(Ge),ajaxTransport:We(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,s,o,a,u,h,l,c,d,f=O.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?O(p):O.event,g=O.Deferred(),y=O.Callbacks("once memory"),b=f.statusCode||{},v={},x={},_="canceled",S={readyState:0,getResponseHeader:function(t){var e;if(h){if(!o)for(o={};e=qe.exec(s);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return h?s:null},setRequestHeader:function(t,e){return null==h&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,v[t]=e),this},overrideMimeType:function(t){return null==h&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)S.always(t[S.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||_;return n&&n.abort(e),M(0,e),this}};if(g.promise(S),f.url=((t||f.url||Ae.href)+"").replace(Ye,Ae.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(U)||[""],null==f.crossDomain){u=w.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=$e.protocol+"//"+$e.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=O.param(f.data,f.traditional)),Qe(Ge,f,e,S),h)return S;for(c in(l=O.event&&f.global)&&0==O.active++&&O.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Xe.test(f.type),i=f.url.replace(Ve,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Re,"+")):(d=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Te.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(ze,"$1"),d=(Te.test(i)?"&":"?")+"_="+Ee.guid+++d),f.url=i+d),f.ifModified&&(O.lastModified[i]&&S.setRequestHeader("If-Modified-Since",O.lastModified[i]),O.etag[i]&&S.setRequestHeader("If-None-Match",O.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&S.setRequestHeader("Content-Type",f.contentType),S.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ue+"; q=0.01":""):f.accepts["*"]),f.headers)S.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(!1===f.beforeSend.call(p,S,f)||h))return S.abort();if(_="abort",y.add(f.complete),S.done(f.success),S.fail(f.error),n=Qe(He,f,e,S)){if(S.readyState=1,l&&m.trigger("ajaxSend",[S,f]),h)return S;f.async&&f.timeout>0&&(a=r.setTimeout((function(){S.abort("timeout")}),f.timeout));try{h=!1,n.send(v,M)}catch(t){if(h)throw t;M(-1,t)}}else M(-1,"No Transport");function M(t,e,o,u){var c,d,w,v,x,_=e;h||(h=!0,a&&r.clearTimeout(a),n=void 0,s=u||"",S.readyState=t>0?4:0,c=t>=200&&t<300||304===t,o&&(v=function(t,e,n){for(var r,i,s,o,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)s=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==u[0]&&u.unshift(s),n[s]}(f,S,o)),!c&&O.inArray("script",f.dataTypes)>-1&&O.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),v=function(t,e,n,r){var i,s,o,a,u,h={},l=t.dataTypes.slice();if(l[1])for(o in t.converters)h[o.toLowerCase()]=t.converters[o];for(s=l.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=s,s=l.shift())if("*"===s)s=u;else if("*"!==u&&u!==s){if(!(o=h[u+" "+s]||h["* "+s]))for(i in h)if((a=i.split(" "))[1]===s&&(o=h[u+" "+a[0]]||h["* "+a[0]])){!0===o?o=h[i]:!0!==h[i]&&(s=a[0],l.unshift(a[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+u+" to "+s}}}return{state:"success",data:e}}(f,v,S,c),c?(f.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(O.lastModified[i]=x),(x=S.getResponseHeader("etag"))&&(O.etag[i]=x)),204===t||"HEAD"===f.type?_="nocontent":304===t?_="notmodified":(_=v.state,d=v.data,c=!(w=v.error))):(w=_,!t&&_||(_="error",t<0&&(t=0))),S.status=t,S.statusText=(e||_)+"",c?g.resolveWith(p,[d,_,S]):g.rejectWith(p,[S,_,w]),S.statusCode(b),b=void 0,l&&m.trigger(c?"ajaxSuccess":"ajaxError",[S,f,c?d:w]),y.fireWith(p,[S,_]),l&&(m.trigger("ajaxComplete",[S,f]),--O.active||O.event.trigger("ajaxStop")))}return S},getJSON:function(t,e,n){return O.get(t,e,n,"json")},getScript:function(t,e){return O.get(t,void 0,e,"script")}}),O.each(["get","post"],(function(t,e){O[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),O.ajax(O.extend({url:t,type:e,dataType:i,data:n,success:r},O.isPlainObject(t)&&t))}})),O.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),O._evalUrl=function(t,e,n){return O.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){O.globalEval(t,e,n)}})},O.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=O(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){O(this).wrapInner(t.call(this,e))})):this.each((function(){var e=O(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){O(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){O(this).replaceWith(this.childNodes)})),this}}),O.expr.pseudos.hidden=function(t){return!O.expr.pseudos.visible(t)},O.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},O.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ke={0:200,1223:204},Ze=O.ajaxSettings.xhr();g.cors=!!Ze&&"withCredentials"in Ze,g.ajax=Ze=!!Ze,O.ajaxTransport((function(t){var e,n;if(g.cors||Ze&&!t.crossDomain)return{send:function(i,s){var o,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];for(o in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Ke[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),O.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),O.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return O.globalEval(t),t}}}),O.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),O.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=O("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),w.head.appendChild(e[0])},abort:function(){n&&n()}}}));var tn,en=[],nn=/(=)\?(?=&|$)|\?\?/;O.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=en.pop()||O.expando+"_"+Ee.guid++;return this[t]=!0,t}}),O.ajaxPrefilter("json jsonp",(function(t,e,n){var i,s,o,a=!1!==t.jsonp&&(nn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(nn,"$1"+i):!1!==t.jsonp&&(t.url+=(Te.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||O.error(i+" was not called"),o[0]},t.dataTypes[0]="json",s=r[i],r[i]=function(){o=arguments},n.always((function(){void 0===s?O(r).removeProp(i):r[i]=s,t[i]&&(t.jsonpCallback=e.jsonpCallback,en.push(i)),o&&y(s)&&s(o[0]),o=s=void 0})),"script"})),g.createHTMLDocument=((tn=w.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===tn.childNodes.length),O.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((r=(e=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,e.head.appendChild(r)):e=w),s=!n&&[],(i=V.exec(t))?[e.createElement(i[1])]:(i=jt([t],e,s),s&&s.length&&O(s).remove(),O.merge([],i.childNodes)));var r,i,s},O.fn.load=function(t,e,n){var r,i,s,o=this,a=t.indexOf(" ");return a>-1&&(r=Oe(t.slice(a)),t=t.slice(0,a)),y(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),o.length>0&&O.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){s=arguments,o.html(r?O("<div>").append(O.parseHTML(t)).find(r):t)})).always(n&&function(t,e){o.each((function(){n.apply(this,s||[t.responseText,e,t])}))}),this},O.expr.pseudos.animated=function(t){return O.grep(O.timers,(function(e){return t===e.elem})).length},O.offset={setOffset:function(t,e,n){var r,i,s,o,a,u,h=O.css(t,"position"),l=O(t),c={};"static"===h&&(t.style.position="relative"),a=l.offset(),s=O.css(t,"top"),u=O.css(t,"left"),("absolute"===h||"fixed"===h)&&(s+u).indexOf("auto")>-1?(o=(r=l.position()).top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,O.extend({},a))),null!=e.top&&(c.top=e.top-a.top+o),null!=e.left&&(c.left=e.left-a.left+i),"using"in e?e.using.call(t,c):l.css(c)}},O.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){O.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===O.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===O.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=O(t).offset()).top+=O.css(t,"borderTopWidth",!0),i.left+=O.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-O.css(r,"marginTop",!0),left:e.left-i.left-O.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===O.css(t,"position");)t=t.offsetParent;return t||mt}))}}),O.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;O.fn[t]=function(r){return tt(this,(function(t,r,i){var s;if(b(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===i)return s?s[e]:t[r];s?s.scrollTo(n?s.pageXOffset:i,n?i:s.pageYOffset):t[r]=i}),t,r,arguments.length)}})),O.each(["top","left"],(function(t,e){O.cssHooks[e]=te(g.pixelPosition,(function(t,n){if(n)return n=Zt(t,e),$t.test(n)?O(t).position()[e]+"px":n}))})),O.each({Height:"height",Width:"width"},(function(t,e){O.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){O.fn[r]=function(i,s){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===s?"margin":"border");return tt(this,(function(e,n,i){var s;return b(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===i?O.css(e,n,a):O.style(e,n,i,a)}),e,o?i:void 0,o)}}))})),O.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){O.fn[e]=function(t){return this.on(e,t)}})),O.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),O.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){O.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;O.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=a.call(arguments,2),i=function(){return t.apply(e||this,r.concat(a.call(arguments)))},i.guid=t.guid=t.guid||O.guid++,i},O.holdReady=function(t){t?O.readyWait++:O.ready(!0)},O.isArray=Array.isArray,O.parseJSON=JSON.parse,O.nodeName=P,O.isFunction=y,O.isWindow=b,O.camelCase=it,O.type=_,O.now=Date.now,O.isNumeric=function(t){var e=O.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},O.trim=function(t){return null==t?"":(t+"").replace(rn,"$1")},void 0===(n=function(){return O}.apply(e,[]))||(t.exports=n);var sn=r.jQuery,on=r.$;return O.noConflict=function(t){return r.$===O&&(r.$=on),t&&r.jQuery===O&&(r.jQuery=sn),O},void 0===i&&(r.jQuery=r.$=O),O}))},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{BasesLayoutForm:()=>Ir});var t={};n.r(t),n.d(t,{cx:()=>me,cy:()=>ge,height:()=>be,rx:()=>ce,ry:()=>de,width:()=>ye,x:()=>fe,y:()=>pe});var e={};n.r(e),n.d(e,{from:()=>_e,to:()=>Se});var i={};n.r(i),n.d(i,{MorphArray:()=>Ae,height:()=>De,width:()=>je,x:()=>Ee,y:()=>Te});var s={};n.r(s),n.d(s,{array:()=>un,clear:()=>hn,move:()=>ln,plot:()=>cn,size:()=>dn});var o={};n.r(o),n.d(o,{amove:()=>Vn,ax:()=>Fn,ay:()=>Rn,build:()=>zn,center:()=>In,cx:()=>Ln,cy:()=>Bn,length:()=>Tn,move:()=>kn,plain:()=>En,x:()=>jn,y:()=>Dn});var a={};n.r(a),n.d(a,{dmove:()=>Un,dx:()=>$n,dy:()=>Wn,height:()=>Qn,move:()=>Jn,size:()=>Kn,width:()=>Zn,x:()=>tr,y:()=>er});var u=n(692),h=n(72),l=n.n(h),c=n(825),d=n.n(c),f=n(659),p=n.n(f),m=n(56),g=n.n(m),y=n(540),b=n.n(y),w=n(113),v=n.n(w),x=n(660),_={};_.styleTagTransform=v(),_.setAttributes=g(),_.insert=p().bind(null,"head"),_.domAPI=d(),_.insertStyleElement=b(),l()(x.Ay,_),x.Ay&&x.Ay.locals&&x.Ay.locals;var S=n(7),M={};M.styleTagTransform=v(),M.setAttributes=g(),M.insert=p().bind(null,"head"),M.domAPI=d(),M.insertStyleElement=b(),l()(S.A,M),S.A&&S.A.locals&&S.A.locals;var O=n(592),C={};C.styleTagTransform=v(),C.setAttributes=g(),C.insert=p().bind(null,"head"),C.domAPI=d(),C.insertStyleElement=b(),l()(O.Ay,C),O.Ay&&O.Ay.locals&&O.Ay.locals;class P{constructor(t){this.selectedBases=t,this.numSpan=document.createElement("span"),u(this.numSpan).addClass(O.bw),this.trailingText=document.createElement("span"),this.domNode=document.createElement("p"),u(this.domNode).addClass(O.JU).append(this.numSpan,this.trailingText)}refresh(){let t=[...this.selectedBases].length;this.numSpan.textContent=t.toString(),this.trailingText.textContent=1==t?" base is selected.":" bases are selected."}}var N=n(667),A={};A.styleTagTransform=v(),A.setAttributes=g(),A.insert=p().bind(null,"head"),A.domAPI=d(),A.insertStyleElement=b(),l()(N.Ay,A),N.Ay&&N.Ay.locals&&N.Ay.locals;var E=n(61),T={};function j(){let t=document.createElement("input");return u(t).attr({type:"text"}).addClass(E._),t}T.styleTagTransform=v(),T.setAttributes=g(),T.insert=p().bind(null,"head"),T.domAPI=d(),T.insertStyleElement=b(),l()(E.A,T),E.A&&E.A.locals&&E.A.locals;var D=n(713),k={};function L(t,e){let n=document.createElement("label"),r=document.createElement("span");return u(r).append(t).css({paddingLeft:"8px"}),u(n).addClass(D.k).append(e,r),n}k.styleTagTransform=v(),k.setAttributes=g(),k.insert=p().bind(null,"head"),k.domAPI=d(),k.insertStyleElement=b(),l()(D.A,k),D.A&&D.A.locals&&D.A.locals;var B=n(661),I=n(854),F=n(986);class R{constructor(t,e,n){this.domNode=j(),this.coordinateName=t,this.selectedBases=e,this.options=n,this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()})),this.refresh()}refresh(){let t=new B.Centroid([...this.selectedBases]).get()[this.coordinateName];this.domNode.value=Number.parseFloat(t.toFixed(2)).toString()}handleSubmit(){var t,e;let n=Number.parseFloat(this.domNode.value);if(!(0,I.isFiniteNumber)(n))return;let r=new B.Centroid([...this.selectedBases]);(0,F.areWithin)(n,r.get()[this.coordinateName],.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set({x:r.get().x,y:r.get().y,[this.coordinateName]:n}),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases())}}class V{constructor(t,e){this.selectedBases=t,this.centroidXInput=new R("x",t,e),this.centroidYInput=new R("y",t,e);let n=L("X",this.centroidXInput.domNode),r=L("Y",this.centroidYInput.domNode);u(r).css({marginTop:"11px"});let i=document.createElement("div");u(i).append(n,r).css({display:"flex",flexDirection:"column"});let s=document.createElement("p");u(s).addClass(N.W5).append("Center"),this.domNode=document.createElement("div"),u(this.domNode).addClass(N.ML).append(i,s)}refresh(){this.centroidXInput.refresh(),this.centroidYInput.refresh()}}const z={},q=[];function X(t,e){if(Array.isArray(t))for(const n of t)X(n,e);else if("object"!=typeof t)G(Object.getOwnPropertyNames(e)),z[t]=Object.assign(z[t]||{},e);else for(const e in t)X(e,t[e])}function Y(t){return z[t]||{}}function G(t){q.push(...t)}function H(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function U(t){return t%360*Math.PI/180}function $(t){return t.charAt(0).toUpperCase()+t.slice(1)}function W(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function Q(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const J=new Set(["desc","metadata","title"]),K=t=>J.has(t.nodeName),Z=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},tt="http://www.w3.org/2000/svg",et="http://www.w3.org/2000/xmlns/",nt="http://www.w3.org/1999/xlink",rt={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class it{}const st={},ot="___SYMBOL___ROOT___";function at(t,e=tt){return rt.document.createElementNS(e,t)}function ut(t,e=!1){if(t instanceof it)return t;if("object"==typeof t)return ct(t);if(null==t)return new st[ot];if("string"==typeof t&&"<"!==t.charAt(0))return ct(rt.document.querySelector(t));const n=e?rt.document.createElement("div"):at("svg");return n.innerHTML=t,t=ct(n.firstChild),n.removeChild(n.firstChild),t}function ht(t,e){return e&&(e instanceof rt.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:at(t)}function lt(t){if(!t)return null;if(t.instance instanceof it)return t.instance;if("#document-fragment"===t.nodeName)return new st.Fragment(t);let e=$(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":st[e]||(e="Dom"),new st[e](t)}let ct=lt;function dt(t,e=t.name,n=!1){return st[e]=t,n&&(st[ot]=t),G(Object.getOwnPropertyNames(t.prototype)),t}let ft=1e3;function pt(t){return"Svgjs"+$(t)+ft++}function mt(t){for(let e=t.children.length-1;e>=0;e--)mt(t.children[e]);return t.id?(t.id=pt(t.nodeName),t):t}function gt(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function yt(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}X("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=ut(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=ut(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=ut(t)).before(this),this},insertAfter:function(t){return(t=ut(t)).after(this),this}});const bt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,wt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,vt=/rgb\((\d+),(\d+),(\d+)\)/,xt=/(#[a-z_][a-z0-9\-_]*)/i,_t=/\)\s*,?\s*/,St=/\s/g,Mt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Ot=/^rgb\(/,Ct=/^(\s+)?$/,Pt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Nt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,At=/[\s,]+/,Et=/[MLHVCSQTAZ]/i;function Tt(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function jt(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function Dt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}X("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(At)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),X("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||Ct.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||Ct.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),X("Dom",{data:function(t,e,n){if(null==t)return this.data(H(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),X("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class kt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof kt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new kt(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new kt(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new kt(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new kt(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new kt(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new kt(t,e,r,"lab")}if("grey"===t){const t=255*n();return new kt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Mt.test(t)||Ot.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new kt(0,0,0,1,"cmyk"):new kt((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new kt(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=jt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:jt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:jt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:jt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:jt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:jt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(Ot.test(t)){const e=t.replace(St,""),[n,r,i]=vt.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Mt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=wt.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new kt(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new kt(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new kt(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new kt(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*Dt(i,r,t+1/3),o=255*Dt(i,r,t),a=255*Dt(i,r,t-1/3);return new kt(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new kt(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(Tt);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new kt(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class Lt{constructor(...t){this.init(...t)}clone(){return new Lt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){It.isMatrixLike(t)||(t=new It(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function Bt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class It{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new Lt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new Lt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new Lt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,w=new Lt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:w.x,ry:w.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new It(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new It(t);return Bt(this.a,e.a)&&Bt(this.b,e.b)&&Bt(this.c,e.c)&&Bt(this.d,e.d)&&Bt(this.e,e.e)&&Bt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=It.fromArray([1,0,0,1,0,0]);return t=t instanceof oe?t.matrixify():"string"==typeof t?It.fromArray(t.split(At).map(parseFloat)):Array.isArray(t)?It.fromArray(t):"object"==typeof t&&It.isMatrixLike(t)?t:"object"==typeof t?(new It).transform(t):6===arguments.length?It.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof It?t:new It(t);return It.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof It?t:new It(t);return It.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=U(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=U(t),e=U(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(It.isMatrixLike(t))return new It(t).multiplyO(this);const e=It.formatTransforms(t),{x:n,y:r}=new Lt(e.ox,e.oy).transform(this),i=(new It).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new Lt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Ft(){if(!Ft.nodes){const t=ut().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){const t=rt.document.body||rt.document.documentElement;Ft.nodes.svg.addTo(t)}return Ft.nodes}function Rt(t){return!(t.width||t.height||t.x||t.y)}dt(It,"Matrix");class Vt{constructor(...t){this.init(...t)}addOffset(){return this.x+=rt.window.pageXOffset,this.y+=rt.window.pageYOffset,new Vt(this)}init(t){return t="string"==typeof t?t.split(At).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Rt(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new Vt(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof It||(t=new It(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new Lt(this.x,this.y),new Lt(this.x2,this.y),new Lt(this.x,this.y2),new Lt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new Vt(e,r,n-e,i-r)}}function zt(t,e,n){let r;try{if(r=e(t.node),Rt(r)&&(i=t.node)!==rt.document&&!(rt.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===rt.document}).call(rt.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}X({viewbox:{viewbox(t,e,n,r){return null==t?new Vt(this.attr("viewBox")):this.attr("viewBox",new Vt(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new Lt(n/2/s+i.x,r/2/o+i.y);const h=new Vt(i).transform(new It({scale:u,origin:e}));return this.viewbox(h)}}}),dt(Vt,"Box");class qt extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const Xt=qt;gt([qt],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const Yt=["toArray","constructor","each"];function Gt(t,e){return new Xt(H((e||rt.document).querySelectorAll(t),(function(t){return lt(t)})))}qt.extend=function(t){t=t.reduce(((t,e)=>(Yt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),gt([qt],t)};let Ht=0;const Ut={};function $t(t){let e=t.getEventHolder();return e===rt.window&&(e=Ut),e.events||(e.events={}),e.events}function Wt(t){return t.getEventTarget()}function Qt(t,e,n,r,i){const s=n.bind(r||t),o=ut(t),a=$t(o),u=Wt(o);e=Array.isArray(e)?e:e.split(At),n._svgjsListenerId||(n._svgjsListenerId=++Ht),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function Jt(t,e,n,r){const i=ut(t),s=$t(i),o=Wt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(At)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])Jt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&Jt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])Jt(o,[e,u].join("."));delete s[e]}}else{for(t in s)Jt(o,t);!function(t){let e=t.getEventHolder();e===rt.window&&(e=Ut),e.events&&(e.events={})}(i)}}))}class Kt extends it{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=Wt(t);return e instanceof rt.window.Event||(e=new rt.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return Jt(this,t,e,n),this}on(t,e,n,r){return Qt(this,t,e,n,r),this}removeEventListener(){}}function Zt(){}dt(Kt,"EventTarget");const te={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class ee extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(At).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class ne{constructor(...t){this.init(...t)}convert(t){return new ne(this.value,t)}divide(t){return t=new ne(t),new ne(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(bt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof ne&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new ne(t),new ne(this-t,this.unit||t.unit)}plus(t){return t=new ne(t),new ne(this+t,this.unit||t.unit)}times(t){return t=new ne(t),new ne(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const re=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),ie=[];class se extends Kt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=ut(t)).removeNamespace&&this.node instanceof rt.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return ut(t).put(this,e)}children(){return new Xt(H(this.node.children,(function(t){return lt(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=mt(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new se(at(t),e))}first(){return lt(this.node.firstChild)}get(t){return lt(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=pt(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return lt(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=lt(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=lt(e.node.parentNode));return e}put(t,e){return t=ut(t),this.add(t,e),t}putIn(t,e){return ut(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=ut(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,tt)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=lt(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=at("wrapper",n),i=rt.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}gt(se,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=Pt.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?te[t]:Pt.test(e)?parseFloat(e):e;"number"==typeof(e=ie.reduce(((e,n)=>n(t,e,this)),e))?e=new ne(e):re.has(t)&&kt.isColor(e)?e=new kt(e):e.constructor===Array&&(e=new ee(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Gt(t,this.node)},findOne:function(t){return lt(this.node.querySelector(t))}}),dt(se,"Dom");class oe extends se{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new ne(t).plus(this.x()))}dy(t=0){return this.y(new ne(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=ut(t));const n=new Xt;let r=this;for(;(r=r.parent())&&r.node!==rt.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(xt);return e?ut(e[1]):null}root(){const t=this.parent(st[ot]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=W(this,t,e);return this.width(new ne(n.width)).height(new ne(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return Z(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}gt(oe,{bbox:function(){const t=zt(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(Ft().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new Vt(t)},rbox:function(t){const e=zt(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new Vt(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new Lt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new It(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new It(e)}return new It(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new It}}}),dt(oe,"Element");const ae={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof kt||kt.isRgb(e)||e instanceof oe)this.attr(t,e);else for(n=ae[t].length-1;n>=0;n--)null!=e[ae[t][n]]&&this.attr(ae.prefix(t,ae[t][n]),e[ae[t][n]]);return this},X(["Element","Runner"],e)})),X(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new It(this):this.attr("transform",new It(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),X("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new ne(t)):this.rx(t).ry(e)}}),X("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Lt(this.node.getPointAtLength(t))}}),X(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),X("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),X("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(_t).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(At).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(It.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new It)},toParent:function(t,e){if(this===t)return this;if(K(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new It(this).decompose();return null==t?e:e[t]}It.isMatrixLike(t)||(t={...t,origin:Q(t,this)});const n=new It(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class ue extends oe{flatten(){return this.each((function(){if(this instanceof ue)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}dt(ue,"Container");class he extends ue{constructor(t,e=t){super(ht("defs",t),e)}flatten(){return this}ungroup(){return this}}dt(he,"Defs");class le extends oe{}function ce(t){return this.attr("rx",t)}function de(t){return this.attr("ry",t)}function fe(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function pe(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function me(t){return this.attr("cx",t)}function ge(t){return this.attr("cy",t)}function ye(t){return null==t?2*this.rx():this.rx(new ne(t).divide(2))}function be(t){return null==t?2*this.ry():this.ry(new ne(t).divide(2))}dt(le,"Shape");class we extends le{constructor(t,e=t){super(ht("ellipse",t),e)}size(t,e){const n=W(this,t,e);return this.rx(new ne(n.width).divide(2)).ry(new ne(n.height).divide(2))}}gt(we,t),X("Container",{ellipse:yt((function(t=0,e=t){return this.put(new we).size(t,e).move(0,0)}))}),dt(we,"Ellipse");class ve extends se{constructor(t=rt.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new se(at("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}dt(ve,"Fragment");const xe=ve;function _e(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new ne(t),fy:new ne(e)}):this.attr({x1:new ne(t),y1:new ne(e)})}function Se(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new ne(t),cy:new ne(e)}):this.attr({x2:new ne(t),y2:new ne(e)})}class Me extends ue{constructor(t,e){super(ht(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new Vt}targets(){return Gt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}gt(Me,e),X({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:yt((function(t,e){return this.put(new Me(t)).update(e)}))}}),dt(Me,"Gradient");class Oe extends ue{constructor(t,e=t){super(ht("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new Vt}targets(){return Gt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}X({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:yt((function(t,e,n){return this.put(new Oe).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),dt(Oe,"Pattern");class Ce extends le{constructor(t,e=t){super(ht("image",t),e)}load(t,e){if(!t)return this;const n=new rt.window.Image;return Qt(n,"load",(function(t){const r=this.parent(Oe);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Oe&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Qt(n,"load error",(function(){Jt(n)})),this.attr("href",n.src=t,nt)}}var Pe;Pe=function(t,e,n){return"fill"!==t&&"stroke"!==t||Nt.test(e)&&(e=n.root().defs().image(e)),e instanceof Ce&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},ie.push(Pe),X({Container:{image:yt((function(t,e){return this.put(new Ce).size(0,0).load(t,e)}))}}),dt(Ce,"Image");class Ne extends ee{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new Vt(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(At).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){It.isMatrixLike(t)||(t=new It(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Ae=Ne;function Ee(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Te(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function je(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function De(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ke extends le{constructor(t,e=t){super(ht("line",t),e)}array(){return new Ne([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Ne(t).toLine(),this.attr(t))}size(t,e){const n=W(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}gt(ke,i),X({Container:{line:yt((function(...t){return ke.prototype.plot.apply(this.put(new ke),null!=t[0]?t:[0,0,0,0])}))}}),dt(ke,"Line");class Le extends ue{constructor(t,e=t){super(ht("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Be(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}X({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:yt((function(t,e,n){return this.put(new Le).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Le?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),dt(Le,"Marker");const Ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class Fe{done(){return!1}}class Re extends Fe{constructor(t=">"){super(),this.ease=Ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class Ve extends Fe{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ze(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}gt(class extends Ve{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:Be("_duration",ze),overshoot:Be("_overshoot",ze)}),gt(class extends Ve{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:Be("_windup"),p:Be("P"),i:Be("I"),d:Be("D")});const qe={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Xe={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ye="mlhvqtcsaz".split("");for(let t=0,e=Ye.length;t<e;++t)Xe[Ye[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return Xe[t](e,n,r)}}(Ye[t].toUpperCase());function Ge(t){return t.segment.length&&t.segment.length-1===qe[t.segment[0].toUpperCase()]}function He(t,e){t.inNumber&&Ue(t,!1);const n=Et.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Ue(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,Ge(t)&&$e(t)}function $e(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return Xe[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function We(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function Qe(t){return"E"===t.lastToken.toUpperCase()}const Je=new Set([" ",",","\t","\n","\r","\f"]);class Ke extends ee{bbox(){return Ft().path.setAttribute("d",this.toString()),new Vt(Ft.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new Lt,p:new Lt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!He(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Je.has(r))i.inNumber&&Ue(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Et.test(r)){if(i.inNumber)Ue(i,!1);else{if(!Ge(i))throw new Error("parser Error");$e(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Qe(i)){Ue(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||We(i)){i.inNumber=!0,i.number=r,Ue(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Ue(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Ue(i,!1),i.inSegment&&Ge(i)&&$e(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const Ze=t=>{const e=typeof t;return"number"===e?ne:"string"===e?kt.isColor(t)?kt:At.test(t)?Et.test(t)?Ke:ee:bt.test(t)?ne:en:on.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?ee:"object"===e?sn:en};class tn{constructor(t){this._stepper=t||new Re("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ze(t));let e=new this._type(t);return this._type===kt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===sn&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class en{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class nn{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,nn.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}nn.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const rn=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class sn{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===kt&&t[n+7]!==e[n+7]){const e=t[n+7],r=new kt(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=Ze(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(rn),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const on=[en,nn,sn];class an extends le{constructor(t,e=t){super(ht("path",t),e)}array(){return this._array||(this._array=new Ke(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ke(t))}size(t,e){const n=W(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function un(){return this._array||(this._array=new Ne(this.attr("points")))}function hn(){return delete this._array,this}function ln(t,e){return this.attr("points",this.array().move(t,e))}function cn(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Ne(t))}function dn(t,e){const n=W(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}an.prototype.MorphArray=Ke,X({Container:{path:yt((function(t){return this.put(new an).plot(t||new Ke)}))}}),dt(an,"Path");class fn extends le{constructor(t,e=t){super(ht("polygon",t),e)}}X({Container:{polygon:yt((function(t){return this.put(new fn).plot(t||new Ne)}))}}),gt(fn,i),gt(fn,s),dt(fn,"Polygon");class pn extends le{constructor(t,e=t){super(ht("polyline",t),e)}}X({Container:{polyline:yt((function(t){return this.put(new pn).plot(t||new Ne)}))}}),gt(pn,i),gt(pn,s),dt(pn,"Polyline");class mn extends le{constructor(t,e=t){super(ht("rect",t),e)}}gt(mn,{rx:ce,ry:de}),X({Container:{rect:yt((function(t,e){return this.put(new mn).size(t,e)}))}}),dt(mn,"Rect");class gn{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const yn={nextDraw:null,frames:new gn,timeouts:new gn,immediates:new gn,timer:()=>rt.window.performance||rt.window.Date,transforms:[],frame(t){const e=yn.frames.push({run:t});return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),e},timeout(t,e){e=e||0;const n=yn.timer().now()+e,r=yn.timeouts.push({run:t,time:n});return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),r},immediate(t){const e=yn.immediates.push(t);return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),e},cancelFrame(t){null!=t&&yn.frames.remove(t)},clearTimeout(t){null!=t&&yn.timeouts.remove(t)},cancelImmediate(t){null!=t&&yn.immediates.remove(t)},_draw(t){let e=null;const n=yn.timeouts.last();for(;(e=yn.timeouts.shift())&&(t>=e.time?e.run():yn.timeouts.push(e),e!==n););let r=null;const i=yn.frames.last();for(;r!==i&&(r=yn.frames.shift());)r.run(t);let s=null;for(;s=yn.immediates.shift();)s();yn.nextDraw=yn.timeouts.first()||yn.frames.first()?rt.window.requestAnimationFrame(yn._draw):null}},bn=yn,wn=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},vn=function(){const t=rt.window;return(t.performance||t.Date).now()};class xn extends Kt{constructor(t=vn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(wn);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return bn.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=bn.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}X({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new xn,this._timeline):(this._timeline=t,this)}}});class _n extends Kt{constructor(t){super(),this.id=_n.id++,t="function"==typeof(t=null==t?400:t)?new Ve(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Ve,this._stepper=this._isDeclarative?t:new Re,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new It,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof Fe||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=_n.sanitise(t,e,n),i=new _n(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new It,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Re(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||Zt,runner:e||Zt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof xn||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new It,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}_n.id=0;class Sn{constructor(t=new It,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}gt([_n,Sn],{mergeWith(t){return new Sn(t.transforms.lmultiply(this.transforms),t.id)}});const Mn=(t,e)=>t.lmultiplyO(e),On=t=>t.transforms;function Cn(){const t=this._transformationRunners.runners.map(On).reduce(Mn,new It);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Pn{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Sn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}X({Element:{animate(t,e,n){const r=_n.sanitise(t,e,n),i=this.timeline();return new _n(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(On).reduce(Mn,new It)},_addRunner(t){this._transformationRunners.add(t),bn.cancelImmediate(this._frameId),this._frameId=bn.immediate(Cn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Pn).add(new Sn(new It(this))))}}}),gt(_n,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new tn(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new sn(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new sn(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new tn(this._stepper).to(new ne(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=It.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new tn(this._stepper).type(n?nn:It);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||Q(t,o),h=new It(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new Lt(s).transform(o._currentTransform(this));let f=new It({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new It(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=Q(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new ne(e),this._tryRetarget(t,e))return this;const n=new tn(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new ne(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new tn(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new ne(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new tn(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new Vt(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),gt(_n,{rx:ce,ry:de,from:_e,to:Se}),dt(_n,"Runner");class Nn extends ue{constructor(t,e=t){super(ht("svg",t),e),this.namespace()}defs(){return this.isRoot()?lt(this.node.querySelector("defs"))||this.put(new he):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof rt.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:tt,version:"1.1"}).attr("xmlns:xlink",nt,et):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,et).attr("xmlns:svgjs",null,et)}root(){return this.isRoot()?this:super.root()}}X({Container:{nested:yt((function(){return this.put(new Nn)}))}}),dt(Nn,"Svg",!0);class An extends ue{constructor(t,e=t){super(ht("symbol",t),e)}}function En(t){return!1===this._build&&this.clear(),this.node.appendChild(rt.document.createTextNode(t)),this}function Tn(){return this.node.getComputedTextLength()}function jn(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Dn(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function kn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function Ln(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Bn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function In(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function Fn(t){return this.attr("x",t)}function Rn(t){return this.attr("y",t)}function Vn(t,e){return this.ax(t).ay(e)}function zn(t){return this._build=!!t,this}X({Container:{symbol:yt((function(){return this.put(new An)}))}}),dt(An,"Symbol");class qn extends le{constructor(t,e=t){super(ht("text",t),e),this.dom.leading=this.dom.leading??new ne(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new ne(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(K(this.node))return;const i=rt.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new ne(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new ne(t.leading||1.3),this}writeDataToDom(){return Z(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||K(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===lt(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}gt(qn,o),X({Container:{text:yt((function(t=""){return this.put(new qn).text(t)})),plain:yt((function(t=""){return this.put(new qn).plain(t)}))}}),dt(qn,"Text");class Xn extends le{constructor(t,e=t){super(ht("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof qn))return this;const e=t.index(this),n=rt.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new ne(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}gt(Xn,o),X({Tspan:{tspan:yt((function(t=""){const e=new Xn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),dt(Xn,"Tspan");class Yn extends le{constructor(t,e=t){super(ht("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new ne(t).divide(2))}}gt(Yn,{x:fe,y:pe,cx:me,cy:ge,width:ye,height:be}),X({Container:{circle:yt((function(t=0){return this.put(new Yn).size(t).move(0,0)}))}}),dt(Yn,"Circle");class Gn extends ue{constructor(t,e=t){super(ht("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return Gt("svg [clip-path*="+this.id()+"]")}}X({Container:{clip:yt((function(){return this.defs().put(new Gn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Gn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),dt(Gn,"ClipPath");class Hn extends oe{constructor(t,e=t){super(ht("foreignObject",t),e)}}function Un(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof rt.window.SVGSVGElement?new Vt(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new It(n),s=i.translate(t,e).transform(i.inverse()),o=new Lt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function $n(t){return this.dmove(t,0)}function Wn(t){return this.dmove(0,t)}function Qn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function Jn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function Kn(t,e,n=this.bbox()){const r=W(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new Lt(n).transform(new It(t).inverse());t.scale(i,s,e.x,e.y)})),this}function Zn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function tr(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function er(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}X({Container:{foreignObject:yt((function(t,e){return this.put(new Hn).size(t,e)}))}}),dt(Hn,"ForeignObject");class nr extends ue{constructor(t,e=t){super(ht("g",t),e)}}gt(nr,a),X({Container:{group:yt((function(){return this.put(new nr)}))}}),dt(nr,"G");class rr extends ue{constructor(t,e=t){super(ht("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,nt)}}gt(rr,a),X({Container:{link:yt((function(t){return this.put(new rr).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new rr,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),dt(rr,"A");class ir extends ue{constructor(t,e=t){super(ht("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Gt("svg [mask*="+this.id()+"]")}}X({Container:{mask:yt((function(){return this.defs().put(new ir)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof ir?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),dt(ir,"Mask");class sr extends oe{constructor(t,e=t){super(ht("stop",t),e)}update(t){return("number"==typeof t||t instanceof ne)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new ne(t.offset)),this}}X({Gradient:{stop:function(t,e,n){return this.put(new sr).update(t,e,n)}}}),dt(sr,"Stop");class or extends oe{constructor(t,e=t){super(ht("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}X("Dom",{style(t,e){return this.put(new or).rule(t,e)},fontface(t,e,n){return this.put(new or).font(t,e,n)}}),dt(or,"Style");class ar extends qn{constructor(t,e=t){super(ht("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}X({Container:{textPath:yt((function(t,e){return t instanceof qn||(t=this.text(t)),t.path(e)}))},Text:{path:yt((function(t,e=!0){const n=new ar;let r;if(t instanceof an||(t=this.defs().path(t)),n.attr("href","#"+t,nt),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:yt((function(t){return t instanceof qn||(t=(new qn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Gt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),ar.prototype.MorphArray=Ke,dt(ar,"TextPath");class ur extends le{constructor(t,e=t){super(ht("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,nt)}}X({Container:{use:yt((function(t,e){return this.put(new ur).use(t,e)}))}}),dt(ur,"Use");const hr=ut;gt([Nn,An,Ce,Oe,Le],Y("viewbox")),gt([ke,pn,fn,an],Y("marker")),gt(qn,Y("Text")),gt(an,Y("Path")),gt(he,Y("Defs")),gt([qn,Xn],Y("Tspan")),gt([mn,we,Me,_n],Y("radius")),gt(Kt,Y("EventTarget")),gt(se,Y("Dom")),gt(oe,Y("Element")),gt(le,Y("Shape")),gt([ue,xe],Y("Container")),gt(Me,Y("Gradient")),gt(_n,Y("Runner")),Xt.extend([...new Set(q)]),function(t=[]){on.push(...[].concat(t))}([ne,kt,Vt,It,ee,Ne,Ke,Lt]),gt(on,{to(t){return(new tn).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var lr=n(501),cr={};cr.styleTagTransform=v(),cr.setAttributes=g(),cr.insert=p().bind(null,"head"),cr.domAPI=d(),cr.insertStyleElement=b(),l()(lr.Ay,cr),lr.Ay&&lr.Ay.locals&&lr.Ay.locals;const dr=["Left","Right","Top","Bottom"],fr={Left:B.MinCenterX,Right:B.MaxCenterX,Top:B.MinCenterY,Bottom:B.MaxCenterY};class pr{constructor(t,e,n){this.coordinateName=t,this.Coordinate=fr[t],this.selectedBases=e,this.options=n,this.domNode=j(),this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()}))}refresh(){let t=new(0,this.Coordinate)([...this.selectedBases]);this.domNode.value=Number.parseFloat(t.get().toFixed(2)).toString()}handleSubmit(){var t,e;let n=Number.parseFloat(this.domNode.value);if(!(0,I.isFiniteNumber)(n))return;let r=new(0,this.Coordinate)([...this.selectedBases]);(0,F.areWithin)(n,r.get(),.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set(n),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases)}}class mr{constructor(t,e,n){this.coordinateInput=new pr(t,e,n),this.domNode=L(t,this.coordinateInput.domNode)}refresh(){this.coordinateInput.refresh()}}class gr{constructor(t,e){let n=function(){let t=document.createElement("button");return u(t).addClass(lr.wx).append(function(){let t=hr();return t.addClass(lr.D),t.viewbox(0,0,6,10).attr({width:"6px",height:"10px"}),t.path().attr("d","M 1 1 L 5 5 L 1 9").attr("stroke","black").attr("stroke-width",2).attr("stroke-linecap","round").attr("stroke-linejoin","round").attr("fill","none"),t.node}(),"More Coordinates"),t}(),r=document.createElement("div");this.fields=dr.map((n=>new mr(n,t,e))),u(r).addClass(lr.Qs).append(...this.fields.map((t=>t.domNode))),this.domNode=document.createElement("div"),u(this.domNode).addClass(lr.Ik),u(n).on("click",(()=>u(this.domNode).toggleClass(lr.ho))),u(this.domNode).append(n).append(r)}refresh(){this.fields.forEach((t=>t.refresh()))}}var yr=n(213),br={};br.styleTagTransform=v(),br.setAttributes=g(),br.insert=p().bind(null,"head"),br.domAPI=d(),br.insertStyleElement=b(),l()(yr.A,br),yr.A&&yr.A.locals&&yr.A.locals;var wr=n(725);class vr{constructor(t,e){this.domNode=document.createElement("button"),u(this.domNode).addClass(yr.O).append(function(){let t=hr();return t.viewbox(-3.5,-3.5,25,25).attr({width:"25px",height:"25px"}).css({transform:"rotate(45deg)"}),t.path().attr("d","M 17 9 A 8 8 270 1 1 9 1").attr("stroke","white").attr("stroke-width",1.5).attr("fill","none"),t.path().attr("d","M 9 -3 L 13 1 L 9 5 z").attr("stroke","white").attr("stroke-width",1).attr("fill","white"),t.node}());let n=!1,r=!1,i=0;this.domNode.addEventListener("mousedown",(e=>{n=!0;let r=[...t];if(r.length>0){let t=r[0],n=r[r.length-1];i=(0,wr.direction)((0,wr.midpoint)(t.getCenterClientPoint(),n.getCenterClientPoint()),{x:e.clientX,y:e.clientY})}})),window.addEventListener("mousemove",(s=>{if(n){let n=[...t];if(n.length>0){let t=n[0],o=n[n.length-1],a=(0,wr.direction)((0,wr.midpoint)(t.getCenterClientPoint(),o.getCenterClientPoint()),{x:s.clientX,y:s.clientY});r||!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.rotate)(n,a-i),r=!0,i=a}}})),window.addEventListener("mouseup",(()=>{n&&r&&(!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()),n=!1,r=!1}))}}const xr=String.fromCharCode(176);class _r{constructor(t,e){this.selectedBases=t,this.options=e,this.domNode=j(),this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()}))}refresh(){let t=new B.Direction([...this.selectedBases]);this.domNode.value=Number.parseFloat((0,F.degrees)(t.get()).toFixed(2)).toString(),this.domNode.value+=xr}handleSubmit(){var t,e;let n=(0,F.radians)(Number.parseFloat(this.domNode.value));if(!(0,I.isFiniteNumber)(n))return;let r=new B.Direction([...this.selectedBases]);(0,F.areWithin)(n,r.get(),.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set(n),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases())}}class Sr{constructor(t,e){this.directionInput=new _r(t,e);let n=L("Rotation",this.directionInput.domNode),r=new vr(t,e);this.domNode=document.createElement("div"),u(this.domNode).append(n).append(r.domNode).css({display:"flex",flexDirection:"row",alignItems:"center"}),u(this.domNode).css({marginTop:"33px"})}refresh(){this.directionInput.refresh()}}var Mr=n(284),Or={};Or.styleTagTransform=v(),Or.setAttributes=g(),Or.insert=p().bind(null,"head"),Or.domAPI=d(),Or.insertStyleElement=b(),l()(Mr.Ay,Or),Mr.Ay&&Mr.Ay.locals&&Mr.Ay.locals;var Cr=n(645),Pr={};function Nr(){let t=document.createElement("button");return u(t).addClass(Cr.E),t}Pr.styleTagTransform=v(),Pr.setAttributes=g(),Pr.insert=p().bind(null,"head"),Pr.domAPI=d(),Pr.insertStyleElement=b(),l()(Cr.A,Pr),Cr.A&&Cr.A.locals&&Cr.A.locals;var Ar=n(95),Er={};function Tr(){let t=document.createElement("button");return u(t).addClass(Ar.k),t}function jr(){let t=j();t.value="0";let e="0";t.addEventListener("focus",(()=>e=t.value));let n=()=>{let n=Number.parseFloat(t.value);(0,I.isFiniteNumber)(n)||(t.value=e)};return t.addEventListener("blur",n),t.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&n()})),t}Er.styleTagTransform=v(),Er.setAttributes=g(),Er.insert=p().bind(null,"head"),Er.domAPI=d(),Er.insertStyleElement=b(),l()(Ar.A,Er),Ar.A&&Ar.A.locals&&Ar.A.locals;class Dr{constructor(t,e){let n=jr(),r=jr();n.value=10..toString(),r.value=20..toString();let i=L("Spacing",n),s=L("Termini Gap",r);u(i).css({margin:"14px 0px 0px 14px"}),u(s).css({margin:"10px 0px 0px 14px"});let o=Tr();u(o).text("Circularize"),u(o).on("click",(()=>{let i=Number.parseFloat(n.value),s=Number.parseFloat(r.value);i=(0,I.isFiniteNumber)(i)?i:10,s=(0,I.isFiniteNumber)(s)?s:20,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.circularize)([...t],{spacing:i,terminiGap:s}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),this.domNode=document.createElement("div"),u(this.domNode).append(o).append(i).append(s).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(this.domNode).css({marginTop:"55px"})}}var kr=n(882),Lr={};Lr.styleTagTransform=v(),Lr.setAttributes=g(),Lr.insert=p().bind(null,"head"),Lr.domAPI=d(),Lr.insertStyleElement=b(),l()(kr.A,Lr),kr.A&&kr.A.locals&&kr.A.locals;var Br=n(139);class Ir{constructor(t,e,n){this.selectedBases=e;let r=new P(e),i=new V(e,n),s=new gr(e,n),o=new Sr(e,n),a=function(t,e){let n=Nr(),r=Nr(),i=Nr(),s=Nr();u(n).text("X"),u(r).text("Y"),u(i).text("Self-X"),u(s).text("Self-Y"),u(n).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipX)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(r).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipY)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(i).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipSelfX)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(s).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipSelfY)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let o=document.createElement("p");u(o).addClass(Mr.oP).text("Flip:");let a=document.createElement("div");return u(a).addClass(Mr.ps).append(o,n,r,i,s),a}(e,n),h=function(t,e){let n=jr();n.value=10..toString();let r=L("Spacing",n);u(r).css({margin:"14px 0px 0px 14px"});let i=Tr();i.textContent="Linearize",i.addEventListener("click",(()=>{let r=Number.parseFloat(n.value);r=(0,I.isFiniteNumber)(r)?r:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.linearize)([...t],{spacing:r}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let s=document.createElement("div");return u(s).append(i).append(r).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(s).css({marginTop:"31px"}),s}(e,n),l=function(t,e){let n=Tr();return n.textContent="Straighten",u(n).css({marginTop:"35px"}),n.addEventListener("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.straighten)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),n}(e,n),c=new Dr(e,n),d=function(t,e){let n=jr();n.value=10..toString();let r=L("Spacing",n);u(r).css({margin:"14px 0px 0px 14px"});let i=Tr();u(i).text("Round"),u(i).on("click",(()=>{let r=Number.parseFloat(n.value);r=(0,I.isFiniteNumber)(r)?r:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.round)([...t],{spacing:r}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let s=document.createElement("div");return u(s).append(i).append(r).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(s).css({marginTop:"41px"}),s}(e,n),f=function(t,e){let n=jr(),r=jr();n.value=20..toString(),r.value=10..toString();let i=L("Base-Pair Length",n),s=L("Base-Pair Spacing",r);u(i).css({margin:"14px 0px 0px 14px"}),u(s).css({margin:"10px 0px 0px 14px"});let o=Tr();u(o).text("Stemmify"),u(o).on("click",(()=>{let i=Number.parseFloat(n.value),s=Number.parseFloat(r.value);i=(0,I.isFiniteNumber)(i)?i:20,s=(0,I.isFiniteNumber)(s)?s:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.stemmify)([...t],{basePairLength:i,basePairSpacing:s}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let a=document.createElement("div");return u(a).append(o).append(i).append(s).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(a).css({marginTop:"41px"}),a}(e,n),p=function(t,e,n){let r=jr(),i=jr(),s=jr();r.value=20..toString(),i.value=10..toString(),s.value=10..toString();let o=L("Base-Pair Length",r),a=L("Base-Pair Spacing",i),h=L("Hairpin Loop Spacing",s);u(o).css({margin:"14px 0px 0px 14px"}),u(a).css({margin:"10px 0px 0px 14px"}),u(h).css({margin:"10px 0px 0px 14px"});let l=Tr();u(l).text("Radialize"),u(l).on("click",(()=>{let o=Number.parseFloat(r.value),a=Number.parseFloat(i.value),u=Number.parseFloat(s.value);o=(0,I.isFiniteNumber)(o)?o:20,a=(0,I.isFiniteNumber)(a)?a:10,u=(0,I.isFiniteNumber)(u)?u:10;let h=new Set([...e]),l=[...t.secondaryBonds].filter((t=>h.has(t.base1)&&h.has(t.base2))).map((t=>[t.base1,t.base2]));!(null==n?void 0:n.beforeMovingBases)||n.beforeMovingBases(),(0,B.radialize)([...e],l,{spacing:o,basePairSpacing:a,hairpinLoopSpacing:u}),!(null==n?void 0:n.afterMovingBases)||n.afterMovingBases()}));let c=document.createElement("div");return u(c).append(l).append(o).append(a).append(h).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(c).css({marginTop:"41px"}),c}(t,e,n),m=document.createElement("div");u(m).addClass(x.nn),u(m).append(i.domNode).append(s.domNode).append(o.domNode).append(a).append(h).append(l).append(c.domNode).append(d).append(f).append(p);let g=document.createElement("div");u(g).append(r.domNode).append(m).css({margin:"24px 0px 0px 21px"}).css({pointerEvents:"none"}),this.domNode=document.createElement("div"),u(this.domNode).addClass(x.t0),u(this.domNode).append(function(){let t=document.createElement("p");return u(t).addClass(S.w).append("Bases Layout"),t}()).append(g),this.refreshableComponents=[r,i,s,o],new MutationObserver((()=>this.isOpen()?this.refresh():{})).observe(t.domNode,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.addEventListener("change",(()=>this.isOpen()?this.refresh():{}));let y=function(){let t=document.createElement("button");return u(t).addClass(kr.b).text("Close"),t}();u(y).on("click",(()=>this.close())),u(this.domNode).append(y),this.dragTranslater=new Br.DragTranslater(this.domNode)}refresh(){this.refreshableComponents.forEach((t=>t.refresh())),0==[...this.selectedBases].length?u(this.domNode).addClass(x.JI):u(this.domNode).removeClass(x.JI)}appendTo(t){this.refresh(),this.dragTranslater.untranslate(),t.appendChild(this.domNode)}remove(){this.domNode.remove()}isOpen(){return document.contains(this.domNode)}close(){this.domNode.remove()}}})(),r})(),t.exports=e()},963:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),h=n.n(u),l=n(56),c=n.n(l),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=c(),y.insert=h().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetForm)return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}function i(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}t.r(e),t.d(e,{DownloadableFile:()=>s,EventfulSet:()=>o,detectMac:()=>i,shuffled:()=>n,userIsTyping:()=>r});class s{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class o{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}return e})(),t.exports=e()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},882:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.dtn_hLksHXwRvJ0M59R_ {\n position: absolute;\n top: 13px;\n right: 17px;\n\n border: none;\n outline: none;\n\n padding: 3px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 16px;\n font-weight: 600;\n font-style: normal;\n color: #871414;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n background-color: transparent;\n}\n\n.dtn_hLksHXwRvJ0M59R_:hover {\n background-color: #cab8d99c;\n}\n\n.dtn_hLksHXwRvJ0M59R_:active {\n background-color: #aa8eba9e;\n}\n',""]);var a="dtn_hLksHXwRvJ0M59R_";const u=o},95:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,c:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.YyJ8eoEyIwbdyanehYmH {\n margin: 0px;\n\n border: none;\n\n padding: 4px 32px 4px 32px;\n border-radius: 2px;\n\n background-color: transparent;\n position: relative;\n isolation: isolate;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.YyJ8eoEyIwbdyanehYmH::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 2px;\n background-color: #0d0d82;\n box-shadow: 0 3px 3px rgba(213, 213, 255, 0.53);\n\n z-index: -1;\n}\n\n.YyJ8eoEyIwbdyanehYmH:focus {\n outline: none;\n}\n\n.YyJ8eoEyIwbdyanehYmH:hover::before {\n transform: scale(1.05);\n transition: transform 0.1s;\n}\n\n.YyJ8eoEyIwbdyanehYmH:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="YyJ8eoEyIwbdyanehYmH";const u=o},207:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,KI:()=>u,Qb:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.eqwd6LjNjVo7cbB2sslX {\n display: flex;\n flex-direction: column;\n gap: 19px;\n\n pointer-events: none;\n}\n\n.CecElEP3VTnkYzKHER5v {\n margin: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="eqwd6LjNjVo7cbB2sslX",u="CecElEP3VTnkYzKHER5v";const h=o},628:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,UJ:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".m9YNkzvR4YB3Euwu47z5 {\n position: absolute;\n left: 107px;\n top: 77px;\n\n width: 325px;\n height: 483px;\n\n background-color: #f3f3ff;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n\n border: 1px solid #2b0744;\n border-radius: 15px;\n box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.06);\n\n padding: 20px 20px 50px 32px;\n}\n\n.CvIMEhOXh2baupQ8m23e {\n margin: 24px 0px 0px 21px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n\n pointer-events: none;\n}\n",""]);var a="m9YNkzvR4YB3Euwu47z5",u="CvIMEhOXh2baupQ8m23e";const h=o},7:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,w:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.hv1igDaLbKyl3ENzZqbE {\n margin-top: 13px;\n margin-bottom: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 26px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="hv1igDaLbKyl3ENzZqbE";const u=o},61:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,P:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.PHeCZIT2KeDbY1BMQVCY {\n border: 1px solid #75758c;\n border-radius: 2px;\n\n outline: none;\n\n width: 81px;\n\n padding: 3px 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n pointer-events: auto;\n}\n\n.PHeCZIT2KeDbY1BMQVCY:hover {\n border-color: #0a0a0b;\n}\n\n.PHeCZIT2KeDbY1BMQVCY:focus {\n border-color: #0a0a0b;\n\n outline: none;\n}\n',""]);var a="PHeCZIT2KeDbY1BMQVCY";const u=o},713:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,u:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.Ue7na3s040s6OHle84cz {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n cursor: text;\n\n pointer-events: auto;\n}\n',""]);var a="Ue7na3s040s6OHle84cz";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{ExportForm:()=>z});var t=n(72),e=n.n(t),i=n(825),s=n.n(i),o=n(659),a=n.n(o),u=n(56),h=n.n(u),l=n(540),c=n.n(l),d=n(113),f=n.n(d),p=n(628),m={};m.styleTagTransform=f(),m.setAttributes=h(),m.insert=a().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=c(),e()(p.Ay,m),p.Ay&&p.Ay.locals&&p.Ay.locals;var g=n(7),y={};y.styleTagTransform=f(),y.setAttributes=h(),y.insert=a().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=c(),e()(g.A,y),g.A&&g.A.locals&&g.A.locals;var b=n(139),w=n(207),v={};function x(t){let e=document.createElement("span");return e.textContent=t,e.style.fontWeight="700",e}v.styleTagTransform=f(),v.setAttributes=h(),v.insert=a().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=c(),e()(w.Ay,v),w.Ay&&w.Ay.locals&&w.Ay.locals;var _=n(61),S={};S.styleTagTransform=f(),S.setAttributes=h(),S.insert=a().bind(null,"head"),S.domAPI=s(),S.insertStyleElement=c(),e()(_.A,S),_.A&&_.A.locals&&_.A.locals;var M=n(854),O=n(713),C={};C.styleTagTransform=f(),C.setAttributes=h(),C.insert=a().bind(null,"head"),C.domAPI=s(),C.insertStyleElement=c(),e()(O.A,C),O.A&&O.A.locals&&O.A.locals;var P=n(95),N={};N.styleTagTransform=f(),N.setAttributes=h(),N.insert=a().bind(null,"head"),N.domAPI=s(),N.insertStyleElement=c(),e()(P.A,N),P.A&&P.A.locals&&P.A.locals;var A=n(882),E={};E.styleTagTransform=f(),E.setAttributes=h(),E.insert=a().bind(null,"head"),E.domAPI=s(),E.insertStyleElement=c(),e()(A.A,E),A.A&&A.A.locals&&A.A.locals;var T,j,D,k,L,B,I=n(106),F=n(726),R=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)},V=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n};class z{constructor(t){T.add(this),this.targetApp=t,j.set(this,document.createElement("div")),D.set(this,void 0),k.set(this,1),L.set(this,void 0),R(this,j,"f").classList.add(p._),R(this,j,"f").append(function(){let t=document.createElement("p");return t.classList.add(g.w),t.textContent="Export",t}());let e=document.createElement("div");e.classList.add(p.UJ),R(this,j,"f").append(e),e.append(function(){let t=document.createElement("div");t.classList.add(w.Qb);let e=x("SVG"),n=x("Adobe Illustrator"),r=x("Inkscape"),i=document.createElement("p");i.classList.add(w.KI),i.append("Export the drawing as an ",e," image."),t.append(i);let s=document.createElement("p");return s.classList.add(w.KI),s.append("SVG images can be opened, edited further and converted to other image formats in applications such as ",n," and ",r,"."),t.append(s),t}()),V(this,D,function(){let t=function(){let t=document.createElement("input");return t.type="text",t.classList.add(_.P),t}();t.value="1";let e="1";t.addEventListener("focus",(()=>e=t.value));let n=()=>{let n=Number.parseFloat(t.value);(0,M.isPositiveFiniteNumber)(n)||(t.value=e)};return t.addEventListener("blur",n),t.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&n()})),t}(),"f"),R(this,D,"f").value=`${R(this,k,"f")}`;let n=function(t,e){let n=document.createElement("span");n.append("Scaling"),n.style.paddingLeft="8px";let r=document.createElement("label");return r.classList.add(O.u),r.append(e,n),r}(0,R(this,D,"f"));n.style.marginTop="29px",e.append(n);let r=function(){let t=function(){let t=document.createElement("button");return t.classList.add(P.c),t}();return t.textContent="Export",t.style.marginTop="36px",t}();r.addEventListener("click",(()=>R(this,T,"m",B).call(this))),e.append(r);let i=function(){let t=document.createElement("button");return t.classList.add(A._),t.textContent="Close",t}();i.addEventListener("click",(()=>this.remove())),R(this,j,"f").append(i),V(this,L,new b.DragTranslater(R(this,j,"f")),"f")}appendTo(t){R(this,L,"f").untranslate(),t.appendChild(R(this,j,"f"))}remove(){R(this,j,"f").remove()}}j=new WeakMap,D=new WeakMap,k=new WeakMap,L=new WeakMap,T=new WeakSet,B=function(){let t=this.targetApp.drawing.domNode.cloneNode(!0),e=document.createElement("div");e.style.position="fixed",e.style.height="0px",document.body.append(e),e.append(t);let n=Number.parseFloat(R(this,D,"f").value);(0,M.isPositiveFiniteNumber)(n)||(n=R(this,k,"f")),new F.Scaling(t).set(n);let r=document.title?document.title:"Drawing";new I.DownloadableFile(t.outerHTML).downloadAs(r+".svg",{type:"text/plain"}),e.remove()}})(),r})(),t.exports=e()},925:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{HorizontalScrollbar:()=>r,HorizontalScrollbarThumb:()=>n,Scrollbars:()=>o,VerticalScrollbar:()=>s,VerticalScrollbarThumb:()=>i});class n{constructor(t){this.targetElement=t}get leftX(){return this.targetElement.scrollLeft}set leftX(t){this.targetElement.scrollLeft=t}get length(){let t=this.targetElement.scrollLeft;this.targetElement.scrollLeft=this.targetElement.scrollWidth;let e=this.targetElement.scrollWidth-this.targetElement.scrollLeft;return this.targetElement.scrollLeft=t,e}get rightX(){return this.leftX+this.length}set rightX(t){this.targetElement.scrollLeft=t-this.length}get centerX(){return(this.leftX+this.rightX)/2}set centerX(t){this.targetElement.scrollLeft=t-this.length/2}}class r{constructor(t){this.targetElement=t,this.thumb=new n(t)}}class i{constructor(t){this.targetElement=t}get topY(){return this.targetElement.scrollTop}set topY(t){this.targetElement.scrollTop=t}get length(){let t=this.targetElement.scrollTop;this.targetElement.scrollTop=this.targetElement.scrollHeight;let e=this.targetElement.scrollHeight-this.targetElement.scrollTop;return this.targetElement.scrollTop=t,e}get bottomY(){return this.topY+this.length}set bottomY(t){this.targetElement.scrollTop=t-this.length}get centerY(){return this.targetElement.scrollTop+this.length/2}set centerY(t){this.targetElement.scrollTop=t-this.length/2}}class s{constructor(t){this.targetElement=t,this.thumb=new i(t)}}class o{constructor(t){this.targetElement=t}center(){this.targetElement.scrollLeft=this.targetElement.scrollWidth,this.targetElement.scrollTop=this.targetElement.scrollHeight;let t=this.targetElement.scrollWidth-this.targetElement.scrollLeft,e=this.targetElement.scrollHeight-this.targetElement.scrollTop;this.targetElement.scrollLeft=this.targetElement.scrollWidth/2-t/2,this.targetElement.scrollTop=this.targetElement.scrollHeight/2-e/2}}return e})(),t.exports=e()},31:function(t){var e;e=()=>(()=>{var t={139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),h=n.n(u),l=n(56),c=n.n(l),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=c(),y.insert=h().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetForm)return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},554:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,bW:()=>u,n8:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,".OCbZQLMBA2fPBalssDU0 {\n width: 11px;\n height: 1px;\n background-color: white;\n}\n\n.gPLxmI0OgzVC6V3VOVwt {\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n pointer-events: none;\n}\n",""]);var a="OCbZQLMBA2fPBalssDU0",u="gPLxmI0OgzVC6V3VOVwt";const h=o},719:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,KE:()=>a,Y3:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".aVj2i1vL0xgitnRSSmmQ {\n position: absolute;\n left: 60px;\n bottom: 15px;\n\n height: 45px;\n padding: 0px 17px 0px 15px;\n\n background-color: black;\n\n border-radius: 4px;\n box-shadow: 0 0 12px #1a1a1c36;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 18px;\n}\n\n.oPxkjdqN4ZRO1ANdcCzU {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n",""]);var a="aVj2i1vL0xgitnRSSmmQ",u="oPxkjdqN4ZRO1ANdcCzU";const h=o},427:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,Q:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.GDJUdJ6NzypM2K5Upnaj {\n padding: 6px 17px;\n\n background-color: black;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 500;\n font-style: normal;\n color: white;\n\n border: none;\n border-radius: 3px;\n\n outline: none;\n\n cursor: pointer;\n}\n\n.GDJUdJ6NzypM2K5Upnaj:hover {\n background-color: rgb(50, 50, 56);\n}\n\n.GDJUdJ6NzypM2K5Upnaj:active {\n background-color: rgb(66, 66, 73);\n}\n',""]);var a="GDJUdJ6NzypM2K5Upnaj";const u=o},60:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,t:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.hIJPXzmppm7QNJ_UQ9gd {\n position: absolute;\n left: 15px;\n bottom: 22.5px;\n\n border-radius: 1000px;\n\n display: flex;\n\n background-color: transparent;\n isolation: isolate;\n\n cursor: pointer;\n}\n\n.hIJPXzmppm7QNJ_UQ9gd::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 1000px;\n background-color: black;\n box-shadow: 0 0 12px #23232533;\n\n z-index: -1;\n}\n\n.hIJPXzmppm7QNJ_UQ9gd:hover::before {\n transform: scale(1.166);\n transition: transform 0.1s;\n}\n\n.hIJPXzmppm7QNJ_UQ9gd:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="hIJPXzmppm7QNJ_UQ9gd";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{Toolbar:()=>A,ToolbarRepositioner:()=>tr});var t={};n.r(t),n.d(t,{cx:()=>ie,cy:()=>se,height:()=>ae,rx:()=>te,ry:()=>ee,width:()=>oe,x:()=>ne,y:()=>re});var e={};n.r(e),n.d(e,{from:()=>ce,to:()=>de});var i={};n.r(i),n.d(i,{MorphArray:()=>be,height:()=>_e,width:()=>xe,x:()=>we,y:()=>ve});var s={};n.r(s),n.d(s,{array:()=>Qe,clear:()=>Je,move:()=>Ke,plot:()=>Ze,size:()=>tn});var o={};n.r(o),n.d(o,{amove:()=>An,ax:()=>Pn,ay:()=>Nn,build:()=>En,center:()=>Cn,cx:()=>Mn,cy:()=>On,length:()=>vn,move:()=>Sn,plain:()=>wn,x:()=>xn,y:()=>_n});var a={};n.r(a),n.d(a,{dmove:()=>Bn,dx:()=>In,dy:()=>Fn,height:()=>Rn,move:()=>Vn,size:()=>zn,width:()=>qn,x:()=>Xn,y:()=>Yn});var u=n(72),h=n.n(u),l=n(825),c=n.n(l),d=n(659),f=n.n(d),p=n(56),m=n.n(p),g=n(540),y=n.n(g),b=n(113),w=n.n(b),v=n(719),x={};x.styleTagTransform=w(),x.setAttributes=m(),x.insert=f().bind(null,"head"),x.domAPI=c(),x.insertStyleElement=y(),h()(v.Ay,x),v.Ay&&v.Ay.locals&&v.Ay.locals;var _=n(554),S={};function M(){let t=document.createElement("div");return t.classList.add(_.n8),t}S.styleTagTransform=w(),S.setAttributes=m(),S.insert=f().bind(null,"head"),S.domAPI=c(),S.insertStyleElement=y(),h()(_.Ay,S),_.Ay&&_.Ay.locals&&_.Ay.locals;var O=n(427),C={};function P(t){let e=document.createElement("button");return e.classList.add(O.Q),e.append(t),e}C.styleTagTransform=w(),C.setAttributes=m(),C.insert=f().bind(null,"head"),C.domAPI=c(),C.insertStyleElement=y(),h()(O.A,C),O.A&&O.A.locals&&O.A.locals;var N=n(139);class A{constructor(t){this.props=t,this.domNode=document.createElement("div"),this.domNode.classList.add(v.KE),this.domNode.appendChild(function(){let t=document.createElement("div");return t.classList.add(_.bW),t.append(M(),M(),M(),M(),M(),M(),M(),M()),t}());let e=document.createElement("div");e.classList.add(v.Y3),this.domNode.append(e);let n=P("Layout");n.addEventListener("click",(()=>this.props.layoutButton.onClick())),e.append(n);let r=P("Export");r.addEventListener("click",(()=>this.props.exportButton.onClick())),e.append(r),this.dragTranslater=new N.DragTranslater(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}reposition(){this.dragTranslater.untranslate()}}const E={},T=[];function j(t,e){if(Array.isArray(t))for(const n of t)j(n,e);else if("object"!=typeof t)k(Object.getOwnPropertyNames(e)),E[t]=Object.assign(E[t]||{},e);else for(const e in t)j(e,t[e])}function D(t){return E[t]||{}}function k(t){T.push(...t)}function L(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function B(t){return t%360*Math.PI/180}function I(t){return t.charAt(0).toUpperCase()+t.slice(1)}function F(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function R(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const V=new Set(["desc","metadata","title"]),z=t=>V.has(t.nodeName),q=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},X="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",G="http://www.w3.org/1999/xlink",H={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class U{}const $={},W="___SYMBOL___ROOT___";function Q(t,e=X){return H.document.createElementNS(e,t)}function J(t,e=!1){if(t instanceof U)return t;if("object"==typeof t)return tt(t);if(null==t)return new $[W];if("string"==typeof t&&"<"!==t.charAt(0))return tt(H.document.querySelector(t));const n=e?H.document.createElement("div"):Q("svg");return n.innerHTML=t,t=tt(n.firstChild),n.removeChild(n.firstChild),t}function K(t,e){return e&&(e instanceof H.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:Q(t)}function Z(t){if(!t)return null;if(t.instance instanceof U)return t.instance;if("#document-fragment"===t.nodeName)return new $.Fragment(t);let e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":$[e]||(e="Dom"),new $[e](t)}let tt=Z;function et(t,e=t.name,n=!1){return $[e]=t,n&&($[W]=t),k(Object.getOwnPropertyNames(t.prototype)),t}let nt=1e3;function rt(t){return"Svgjs"+I(t)+nt++}function it(t){for(let e=t.children.length-1;e>=0;e--)it(t.children[e]);return t.id?(t.id=rt(t.nodeName),t):t}function st(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function ot(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}j("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=J(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=J(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=J(t)).before(this),this},insertAfter:function(t){return(t=J(t)).after(this),this}});const at=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,ut=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ht=/rgb\((\d+),(\d+),(\d+)\)/,lt=/(#[a-z_][a-z0-9\-_]*)/i,ct=/\)\s*,?\s*/,dt=/\s/g,ft=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,pt=/^rgb\(/,mt=/^(\s+)?$/,gt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,yt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,bt=/[\s,]+/,wt=/[MLHVCSQTAZ]/i;function vt(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function xt(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function _t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}j("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),j("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||mt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||mt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),j("Dom",{data:function(t,e,n){if(null==t)return this.data(L(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),j("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class St{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof St||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new St(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new St(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new St(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new St(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new St(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new St(t,e,r,"lab")}if("grey"===t){const t=255*n();return new St(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(ft.test(t)||pt.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new St(0,0,0,1,"cmyk"):new St((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new St(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=xt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:xt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:xt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:xt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:xt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:xt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(pt.test(t)){const e=t.replace(dt,""),[n,r,i]=ht.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!ft.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=ut.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new St(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new St(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new St(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new St(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*_t(i,r,t+1/3),o=255*_t(i,r,t),a=255*_t(i,r,t-1/3);return new St(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new St(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(vt);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new St(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class Mt{constructor(...t){this.init(...t)}clone(){return new Mt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){Ct.isMatrixLike(t)||(t=new Ct(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function Ot(t,e,n){return Math.abs(e-t)<(n||1e-6)}class Ct{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new Mt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new Mt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new Mt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,w=new Mt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:w.x,ry:w.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new Ct(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new Ct(t);return Ot(this.a,e.a)&&Ot(this.b,e.b)&&Ot(this.c,e.c)&&Ot(this.d,e.d)&&Ot(this.e,e.e)&&Ot(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=Ct.fromArray([1,0,0,1,0,0]);return t=t instanceof Wt?t.matrixify():"string"==typeof t?Ct.fromArray(t.split(bt).map(parseFloat)):Array.isArray(t)?Ct.fromArray(t):"object"==typeof t&&Ct.isMatrixLike(t)?t:"object"==typeof t?(new Ct).transform(t):6===arguments.length?Ct.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof Ct?t:new Ct(t);return Ct.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof Ct?t:new Ct(t);return Ct.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=B(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=B(t),e=B(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(Ct.isMatrixLike(t))return new Ct(t).multiplyO(this);const e=Ct.formatTransforms(t),{x:n,y:r}=new Mt(e.ox,e.oy).transform(this),i=(new Ct).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new Mt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Pt(){if(!Pt.nodes){const t=J().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Pt.nodes={svg:t,path:e}}if(!Pt.nodes.svg.node.parentNode){const t=H.document.body||H.document.documentElement;Pt.nodes.svg.addTo(t)}return Pt.nodes}function Nt(t){return!(t.width||t.height||t.x||t.y)}et(Ct,"Matrix");class At{constructor(...t){this.init(...t)}addOffset(){return this.x+=H.window.pageXOffset,this.y+=H.window.pageYOffset,new At(this)}init(t){return t="string"==typeof t?t.split(bt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Nt(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new At(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof Ct||(t=new Ct(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new Mt(this.x,this.y),new Mt(this.x2,this.y),new Mt(this.x,this.y2),new Mt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new At(e,r,n-e,i-r)}}function Et(t,e,n){let r;try{if(r=e(t.node),Nt(r)&&(i=t.node)!==H.document&&!(H.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===H.document}).call(H.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}j({viewbox:{viewbox(t,e,n,r){return null==t?new At(this.attr("viewBox")):this.attr("viewBox",new At(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new Mt(n/2/s+i.x,r/2/o+i.y);const h=new At(i).transform(new Ct({scale:u,origin:e}));return this.viewbox(h)}}}),et(At,"Box");class Tt extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const jt=Tt;st([Tt],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const Dt=["toArray","constructor","each"];function kt(t,e){return new jt(L((e||H.document).querySelectorAll(t),(function(t){return Z(t)})))}Tt.extend=function(t){t=t.reduce(((t,e)=>(Dt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),st([Tt],t)};let Lt=0;const Bt={};function It(t){let e=t.getEventHolder();return e===H.window&&(e=Bt),e.events||(e.events={}),e.events}function Ft(t){return t.getEventTarget()}function Rt(t,e,n,r,i){const s=n.bind(r||t),o=J(t),a=It(o),u=Ft(o);e=Array.isArray(e)?e:e.split(bt),n._svgjsListenerId||(n._svgjsListenerId=++Lt),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function Vt(t,e,n,r){const i=J(t),s=It(i),o=Ft(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(bt)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])Vt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&Vt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])Vt(o,[e,u].join("."));delete s[e]}}else{for(t in s)Vt(o,t);!function(t){let e=t.getEventHolder();e===H.window&&(e=Bt),e.events&&(e.events={})}(i)}}))}class zt extends U{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=Ft(t);return e instanceof H.window.Event||(e=new H.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return Vt(this,t,e,n),this}on(t,e,n,r){return Rt(this,t,e,n,r),this}removeEventListener(){}}function qt(){}et(zt,"EventTarget");const Xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Yt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class Gt{constructor(...t){this.init(...t)}convert(t){return new Gt(this.value,t)}divide(t){return t=new Gt(t),new Gt(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(at))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof Gt&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new Gt(t),new Gt(this-t,this.unit||t.unit)}plus(t){return t=new Gt(t),new Gt(this+t,this.unit||t.unit)}times(t){return t=new Gt(t),new Gt(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Ht=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ut=[];class $t extends zt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=J(t)).removeNamespace&&this.node instanceof H.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return J(t).put(this,e)}children(){return new jt(L(this.node.children,(function(t){return Z(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=it(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new $t(Q(t),e))}first(){return Z(this.node.firstChild)}get(t){return Z(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=rt(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Z(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=Z(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=Z(e.node.parentNode));return e}put(t,e){return t=J(t),this.add(t,e),t}putIn(t,e){return J(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=J(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,X)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=Z(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=Q("wrapper",n),i=H.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}st($t,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=gt.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Xt[t]:gt.test(e)?parseFloat(e):e;"number"==typeof(e=Ut.reduce(((e,n)=>n(t,e,this)),e))?e=new Gt(e):Ht.has(t)&&St.isColor(e)?e=new St(e):e.constructor===Array&&(e=new Yt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return kt(t,this.node)},findOne:function(t){return Z(this.node.querySelector(t))}}),et($t,"Dom");class Wt extends $t{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Gt(t).plus(this.x()))}dy(t=0){return this.y(new Gt(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=J(t));const n=new jt;let r=this;for(;(r=r.parent())&&r.node!==H.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(lt);return e?J(e[1]):null}root(){const t=this.parent($[W]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=F(this,t,e);return this.width(new Gt(n.width)).height(new Gt(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return q(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}st(Wt,{bbox:function(){const t=Et(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(Pt().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new At(t)},rbox:function(t){const e=Et(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new At(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new Mt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new Ct(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Ct(e)}return new Ct(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new Ct}}}),et(Wt,"Element");const Qt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof St||St.isRgb(e)||e instanceof Wt)this.attr(t,e);else for(n=Qt[t].length-1;n>=0;n--)null!=e[Qt[t][n]]&&this.attr(Qt.prefix(t,Qt[t][n]),e[Qt[t][n]]);return this},j(["Element","Runner"],e)})),j(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new Ct(this):this.attr("transform",new Ct(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),j("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Gt(t)):this.rx(t).ry(e)}}),j("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Mt(this.node.getPointAtLength(t))}}),j(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),j("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),j("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ct.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ct)},toParent:function(t,e){if(this===t)return this;if(z(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new Ct(this).decompose();return null==t?e:e[t]}Ct.isMatrixLike(t)||(t={...t,origin:R(t,this)});const n=new Ct(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Jt extends Wt{flatten(){return this.each((function(){if(this instanceof Jt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}et(Jt,"Container");class Kt extends Jt{constructor(t,e=t){super(K("defs",t),e)}flatten(){return this}ungroup(){return this}}et(Kt,"Defs");class Zt extends Wt{}function te(t){return this.attr("rx",t)}function ee(t){return this.attr("ry",t)}function ne(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function re(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function ie(t){return this.attr("cx",t)}function se(t){return this.attr("cy",t)}function oe(t){return null==t?2*this.rx():this.rx(new Gt(t).divide(2))}function ae(t){return null==t?2*this.ry():this.ry(new Gt(t).divide(2))}et(Zt,"Shape");class ue extends Zt{constructor(t,e=t){super(K("ellipse",t),e)}size(t,e){const n=F(this,t,e);return this.rx(new Gt(n.width).divide(2)).ry(new Gt(n.height).divide(2))}}st(ue,t),j("Container",{ellipse:ot((function(t=0,e=t){return this.put(new ue).size(t,e).move(0,0)}))}),et(ue,"Ellipse");class he extends $t{constructor(t=H.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new $t(Q("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}et(he,"Fragment");const le=he;function ce(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Gt(t),fy:new Gt(e)}):this.attr({x1:new Gt(t),y1:new Gt(e)})}function de(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Gt(t),cy:new Gt(e)}):this.attr({x2:new Gt(t),y2:new Gt(e)})}class fe extends Jt{constructor(t,e){super(K(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new At}targets(){return kt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}st(fe,e),j({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:ot((function(t,e){return this.put(new fe(t)).update(e)}))}}),et(fe,"Gradient");class pe extends Jt{constructor(t,e=t){super(K("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new At}targets(){return kt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}j({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:ot((function(t,e,n){return this.put(new pe).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),et(pe,"Pattern");class me extends Zt{constructor(t,e=t){super(K("image",t),e)}load(t,e){if(!t)return this;const n=new H.window.Image;return Rt(n,"load",(function(t){const r=this.parent(pe);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof pe&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Rt(n,"load error",(function(){Vt(n)})),this.attr("href",n.src=t,G)}}var ge;ge=function(t,e,n){return"fill"!==t&&"stroke"!==t||yt.test(e)&&(e=n.root().defs().image(e)),e instanceof me&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ut.push(ge),j({Container:{image:ot((function(t,e){return this.put(new me).size(0,0).load(t,e)}))}}),et(me,"Image");class ye extends Yt{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new At(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){Ct.isMatrixLike(t)||(t=new Ct(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const be=ye;function we(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function ve(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function xe(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function _e(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class Se extends Zt{constructor(t,e=t){super(K("line",t),e)}array(){return new ye([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new ye(t).toLine(),this.attr(t))}size(t,e){const n=F(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}st(Se,i),j({Container:{line:ot((function(...t){return Se.prototype.plot.apply(this.put(new Se),null!=t[0]?t:[0,0,0,0])}))}}),et(Se,"Line");class Me extends Jt{constructor(t,e=t){super(K("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Oe(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}j({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:ot((function(t,e,n){return this.put(new Me).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Me?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),et(Me,"Marker");const Ce={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class Pe{done(){return!1}}class Ne extends Pe{constructor(t=">"){super(),this.ease=Ce[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class Ae extends Pe{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function Ee(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}st(class extends Ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:Oe("_duration",Ee),overshoot:Oe("_overshoot",Ee)}),st(class extends Ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:Oe("_windup"),p:Oe("P"),i:Oe("I"),d:Oe("D")});const Te={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},je={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},De="mlhvqtcsaz".split("");for(let t=0,e=De.length;t<e;++t)je[De[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return je[t](e,n,r)}}(De[t].toUpperCase());function ke(t){return t.segment.length&&t.segment.length-1===Te[t.segment[0].toUpperCase()]}function Le(t,e){t.inNumber&&Be(t,!1);const n=wt.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Be(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,ke(t)&&Ie(t)}function Ie(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return je[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function Fe(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function Re(t){return"E"===t.lastToken.toUpperCase()}const Ve=new Set([" ",",","\t","\n","\r","\f"]);class ze extends Yt{bbox(){return Pt().path.setAttribute("d",this.toString()),new At(Pt.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new Mt,p:new Mt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!Le(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Ve.has(r))i.inNumber&&Be(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(wt.test(r)){if(i.inNumber)Be(i,!1);else{if(!ke(i))throw new Error("parser Error");Ie(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Re(i)){Be(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Fe(i)){i.inNumber=!0,i.number=r,Be(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Be(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Be(i,!1),i.inSegment&&ke(i)&&Ie(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const qe=t=>{const e=typeof t;return"number"===e?Gt:"string"===e?St.isColor(t)?St:bt.test(t)?wt.test(t)?ze:Yt:at.test(t)?Gt:Ye:$e.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Yt:"object"===e?Ue:Ye};class Xe{constructor(t){this._stepper=t||new Ne("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(qe(t));let e=new this._type(t);return this._type===St&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Ue&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Ye{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Ge{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Ge.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Ge.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const He=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Ue{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===St&&t[n+7]!==e[n+7]){const e=t[n+7],r=new St(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=qe(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(He),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const $e=[Ye,Ge,Ue];class We extends Zt{constructor(t,e=t){super(K("path",t),e)}array(){return this._array||(this._array=new ze(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ze(t))}size(t,e){const n=F(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Qe(){return this._array||(this._array=new ye(this.attr("points")))}function Je(){return delete this._array,this}function Ke(t,e){return this.attr("points",this.array().move(t,e))}function Ze(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ye(t))}function tn(t,e){const n=F(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}We.prototype.MorphArray=ze,j({Container:{path:ot((function(t){return this.put(new We).plot(t||new ze)}))}}),et(We,"Path");class en extends Zt{constructor(t,e=t){super(K("polygon",t),e)}}j({Container:{polygon:ot((function(t){return this.put(new en).plot(t||new ye)}))}}),st(en,i),st(en,s),et(en,"Polygon");class nn extends Zt{constructor(t,e=t){super(K("polyline",t),e)}}j({Container:{polyline:ot((function(t){return this.put(new nn).plot(t||new ye)}))}}),st(nn,i),st(nn,s),et(nn,"Polyline");class rn extends Zt{constructor(t,e=t){super(K("rect",t),e)}}st(rn,{rx:te,ry:ee}),j({Container:{rect:ot((function(t,e){return this.put(new rn).size(t,e)}))}}),et(rn,"Rect");class sn{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const on={nextDraw:null,frames:new sn,timeouts:new sn,immediates:new sn,timer:()=>H.window.performance||H.window.Date,transforms:[],frame(t){const e=on.frames.push({run:t});return null===on.nextDraw&&(on.nextDraw=H.window.requestAnimationFrame(on._draw)),e},timeout(t,e){e=e||0;const n=on.timer().now()+e,r=on.timeouts.push({run:t,time:n});return null===on.nextDraw&&(on.nextDraw=H.window.requestAnimationFrame(on._draw)),r},immediate(t){const e=on.immediates.push(t);return null===on.nextDraw&&(on.nextDraw=H.window.requestAnimationFrame(on._draw)),e},cancelFrame(t){null!=t&&on.frames.remove(t)},clearTimeout(t){null!=t&&on.timeouts.remove(t)},cancelImmediate(t){null!=t&&on.immediates.remove(t)},_draw(t){let e=null;const n=on.timeouts.last();for(;(e=on.timeouts.shift())&&(t>=e.time?e.run():on.timeouts.push(e),e!==n););let r=null;const i=on.frames.last();for(;r!==i&&(r=on.frames.shift());)r.run(t);let s=null;for(;s=on.immediates.shift();)s();on.nextDraw=on.timeouts.first()||on.frames.first()?H.window.requestAnimationFrame(on._draw):null}},an=on,un=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},hn=function(){const t=H.window;return(t.performance||t.Date).now()};class ln extends zt{constructor(t=hn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(un);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return an.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=an.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}j({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ln,this._timeline):(this._timeline=t,this)}}});class cn extends zt{constructor(t){super(),this.id=cn.id++,t="function"==typeof(t=null==t?400:t)?new Ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Ae,this._stepper=this._isDeclarative?t:new Ne,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Ct,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof Pe||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=cn.sanitise(t,e,n),i=new cn(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new Ct,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Ne(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||qt,runner:e||qt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ln||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new Ct,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}cn.id=0;class dn{constructor(t=new Ct,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}st([cn,dn],{mergeWith(t){return new dn(t.transforms.lmultiply(this.transforms),t.id)}});const fn=(t,e)=>t.lmultiplyO(e),pn=t=>t.transforms;function mn(){const t=this._transformationRunners.runners.map(pn).reduce(fn,new Ct);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class gn{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new dn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}j({Element:{animate(t,e,n){const r=cn.sanitise(t,e,n),i=this.timeline();return new cn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(pn).reduce(fn,new Ct)},_addRunner(t){this._transformationRunners.add(t),an.cancelImmediate(this._frameId),this._frameId=an.immediate(mn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new gn).add(new dn(new Ct(this))))}}}),st(cn,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new Xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Ue(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Ue(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new Xe(this._stepper).to(new Gt(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=Ct.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new Xe(this._stepper).type(n?Ge:Ct);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||R(t,o),h=new Ct(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new Mt(s).transform(o._currentTransform(this));let f=new Ct({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new Ct(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=R(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Gt(e),this._tryRetarget(t,e))return this;const n=new Xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new Gt(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new Xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Gt(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new Xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new At(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),st(cn,{rx:te,ry:ee,from:ce,to:de}),et(cn,"Runner");class yn extends Jt{constructor(t,e=t){super(K("svg",t),e),this.namespace()}defs(){return this.isRoot()?Z(this.node.querySelector("defs"))||this.put(new Kt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof H.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:X,version:"1.1"}).attr("xmlns:xlink",G,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}j({Container:{nested:ot((function(){return this.put(new yn)}))}}),et(yn,"Svg",!0);class bn extends Jt{constructor(t,e=t){super(K("symbol",t),e)}}function wn(t){return!1===this._build&&this.clear(),this.node.appendChild(H.document.createTextNode(t)),this}function vn(){return this.node.getComputedTextLength()}function xn(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function _n(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Sn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function Mn(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function On(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Cn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function Pn(t){return this.attr("x",t)}function Nn(t){return this.attr("y",t)}function An(t,e){return this.ax(t).ay(e)}function En(t){return this._build=!!t,this}j({Container:{symbol:ot((function(){return this.put(new bn)}))}}),et(bn,"Symbol");class Tn extends Zt{constructor(t,e=t){super(K("text",t),e),this.dom.leading=this.dom.leading??new Gt(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Gt(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(z(this.node))return;const i=H.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new Gt(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Gt(t.leading||1.3),this}writeDataToDom(){return q(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||z(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===Z(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}st(Tn,o),j({Container:{text:ot((function(t=""){return this.put(new Tn).text(t)})),plain:ot((function(t=""){return this.put(new Tn).plain(t)}))}}),et(Tn,"Text");class jn extends Zt{constructor(t,e=t){super(K("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Tn))return this;const e=t.index(this),n=H.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new Gt(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}st(jn,o),j({Tspan:{tspan:ot((function(t=""){const e=new jn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),et(jn,"Tspan");class Dn extends Zt{constructor(t,e=t){super(K("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Gt(t).divide(2))}}st(Dn,{x:ne,y:re,cx:ie,cy:se,width:oe,height:ae}),j({Container:{circle:ot((function(t=0){return this.put(new Dn).size(t).move(0,0)}))}}),et(Dn,"Circle");class kn extends Jt{constructor(t,e=t){super(K("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return kt("svg [clip-path*="+this.id()+"]")}}j({Container:{clip:ot((function(){return this.defs().put(new kn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof kn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),et(kn,"ClipPath");class Ln extends Wt{constructor(t,e=t){super(K("foreignObject",t),e)}}function Bn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof H.window.SVGSVGElement?new At(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new Ct(n),s=i.translate(t,e).transform(i.inverse()),o=new Mt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function In(t){return this.dmove(t,0)}function Fn(t){return this.dmove(0,t)}function Rn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function Vn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function zn(t,e,n=this.bbox()){const r=F(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new Mt(n).transform(new Ct(t).inverse());t.scale(i,s,e.x,e.y)})),this}function qn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function Xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function Yn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}j({Container:{foreignObject:ot((function(t,e){return this.put(new Ln).size(t,e)}))}}),et(Ln,"ForeignObject");class Gn extends Jt{constructor(t,e=t){super(K("g",t),e)}}st(Gn,a),j({Container:{group:ot((function(){return this.put(new Gn)}))}}),et(Gn,"G");class Hn extends Jt{constructor(t,e=t){super(K("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,G)}}st(Hn,a),j({Container:{link:ot((function(t){return this.put(new Hn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Hn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),et(Hn,"A");class Un extends Jt{constructor(t,e=t){super(K("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return kt("svg [mask*="+this.id()+"]")}}j({Container:{mask:ot((function(){return this.defs().put(new Un)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Un?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),et(Un,"Mask");class $n extends Wt{constructor(t,e=t){super(K("stop",t),e)}update(t){return("number"==typeof t||t instanceof Gt)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Gt(t.offset)),this}}j({Gradient:{stop:function(t,e,n){return this.put(new $n).update(t,e,n)}}}),et($n,"Stop");class Wn extends Wt{constructor(t,e=t){super(K("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}j("Dom",{style(t,e){return this.put(new Wn).rule(t,e)},fontface(t,e,n){return this.put(new Wn).font(t,e,n)}}),et(Wn,"Style");class Qn extends Tn{constructor(t,e=t){super(K("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}j({Container:{textPath:ot((function(t,e){return t instanceof Tn||(t=this.text(t)),t.path(e)}))},Text:{path:ot((function(t,e=!0){const n=new Qn;let r;if(t instanceof We||(t=this.defs().path(t)),n.attr("href","#"+t,G),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:ot((function(t){return t instanceof Tn||(t=(new Tn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return kt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Qn.prototype.MorphArray=ze,et(Qn,"TextPath");class Jn extends Zt{constructor(t,e=t){super(K("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,G)}}j({Container:{use:ot((function(t,e){return this.put(new Jn).use(t,e)}))}}),et(Jn,"Use"),st([yn,bn,me,pe,Me],D("viewbox")),st([Se,nn,en,We],D("marker")),st(Tn,D("Text")),st(We,D("Path")),st(Kt,D("Defs")),st([Tn,jn],D("Tspan")),st([rn,ue,fe,cn],D("radius")),st(zt,D("EventTarget")),st($t,D("Dom")),st(Wt,D("Element")),st(Zt,D("Shape")),st([Jt,le],D("Container")),st(fe,D("Gradient")),st(cn,D("Runner")),jt.extend([...new Set(T)]),function(t=[]){$e.push(...[].concat(t))}([Gt,St,At,Ct,Yt,ye,ze,Mt]),st($e,{to(t){return(new Xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var Kn=n(60),Zn={};function tr(){let t=document.createElement("div");t.classList.add(Kn.t);let e=new yn;return e.attr({width:"30",height:"30"}),e.viewbox(0,0,30,30),e.circle().attr({r:"4",cx:"15",cy:"15",stroke:"white","stroke-width":"0",fill:"white"}),e.addTo(t),t}Zn.styleTagTransform=w(),Zn.setAttributes=m(),Zn.insert=f().bind(null,"head"),Zn.domAPI=c(),Zn.insertStyleElement=y(),h()(Kn.A,Zn),Kn.A&&Kn.A.locals&&Kn.A.locals})(),r})(),t.exports=e()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}function i(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}t.r(e),t.d(e,{DownloadableFile:()=>s,EventfulSet:()=>o,detectMac:()=>i,shuffled:()=>n,userIsTyping:()=>r});class s{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class o{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{RNAcanvas:()=>C});var t=n(662),e=n(298),i=n(925);class s{constructor(){this.domNode=document.createElement("div"),this.domNode.style.overflow="auto";let t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div");t.style.flexGrow="1",e.style.flexGrow="0",n.style.flexGrow="1",this.domNode.style.display="flex",this.domNode.style.flexDirection="column",this.domNode.append(t,e,n);let r=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");r.style.flexGrow="1",s.style.flexGrow="0",o.style.flexGrow="1",e.style.display="flex",e.style.flexDirection="row",e.append(r,s,o);let a=document.createElement("div");this.contentContainer=document.createElement("div");let u=document.createElement("div");a.style.flexGrow="1",this.contentContainer.style.flexGrow="0",u.style.flexGrow="1",s.style.display="flex",s.style.flexDirection="column",s.append(a,this.contentContainer,u),this.horizontalScrollbar=new i.HorizontalScrollbar(this.domNode),this.verticalScrollbar=new i.VerticalScrollbar(this.domNode),this.scrollbars=new i.Scrollbars(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}append(t){this.contentContainer.append(t)}get style(){return this.domNode.style}}class o{constructor(t,e,n){this.targetDrawing=t,this.horizontalScrollbar=e,this.verticalScrollbar=n}get centerPoint(){return{x:this.horizontalScrollbar.thumb.centerX/this.targetDrawing.horizontalScaling+this.targetDrawing.minX,y:this.verticalScrollbar.thumb.centerY/this.targetDrawing.verticalScaling+this.targetDrawing.minY}}set centerPoint(t){this.horizontalScrollbar.thumb.centerX=this.targetDrawing.horizontalScaling*(t.x-this.targetDrawing.minX),this.verticalScrollbar.thumb.centerY=this.targetDrawing.verticalScaling*(t.y-this.targetDrawing.minY)}fitToContent(){let t=this.targetDrawing.contentBBox;this.targetDrawing.setScaling(.9*Math.min(this.horizontalScrollbar.thumb.length/t.width,this.verticalScrollbar.thumb.length/t.height)),this.centerPoint={x:t.x+t.width/2,y:t.y+t.height/2}}}var a,u=n(460),h=n(106),l=n(524),c=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class d{constructor(t){this.targetApp=t,a.set(this,void 0),window.addEventListener("mousedown",(t=>function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}(this,a,t,"f"))),window.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&"A"===e.key.toUpperCase()&&c(this,a,"f")&&c(this,a,"f").target instanceof Node&&t.domNode.contains(c(this,a,"f").target)&&((0,h.userIsTyping)()||(e.preventDefault(),t.selectAll()))}),{passive:!1})}}a=new WeakMap;var f,p,m,g=n(124),y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){f.add(this),this.formsContainer=t,this.formsContainer.addEventListener("mousedown",(t=>{let e=y(this,f,"m",p).call(this,t);!e||y(this,f,"m",m).call(this,e)})),this.formsContainer.addEventListener("focusin",(t=>{let e=y(this,f,"m",p).call(this,t);!e||y(this,f,"m",m).call(this,e)}))}}f=new WeakSet,p=function(t){if(!(t.target instanceof Node))return;let e=t.target;return[...this.formsContainer.childNodes].find((t=>e===t||t.contains(e)))},m=function(t){t!==this.formsContainer.lastChild&&this.formsContainer.appendChild(t)};var w,v,x=n(628),_=n(963),S=n(31),M=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n};function O(t){return t instanceof SVGGraphicsElement}class C{constructor(){w.set(this,void 0),this.selectedSVGElements=new h.EventfulSet,v.set(this,void 0),this.toolbarContainer=document.createElement("div"),this.domNode=document.createElement("div"),this.domNode.style.background="repeating-conic-gradient(#eee 0% 25%, white 0% 50%) 50% / 20px 20px",this.boundingBox=document.createElement("div"),this.domNode.appendChild(this.boundingBox),this.boundingBox.style.width="100%",this.boundingBox.style.height="100%",this.boundingBox.style.overflow="auto",this.boundingBox.style.position="relative",this.drawingScrollContainer=new s,this.drawingScrollContainer.style.width="100%",this.drawingScrollContainer.style.height="100%",this.drawingScrollContainer.appendTo(this.boundingBox),this.stackedDrawingsContainer=document.createElement("div"),this.stackedDrawingsContainer.style.position="relative",this.drawingScrollContainer.append(this.stackedDrawingsContainer),this.drawing=new t.Drawing,this.drawing.domNode.style.backgroundColor="white",this.drawing.domNode.style.userSelect="none",this.drawing.domNode.style.webkitUserSelect="none",this.drawing.domNode.style.cursor="default",this.invertedPrimaryBondsHider=new e.InvertedStraightBondsHider({[Symbol.iterator]:()=>[...this.drawing.primaryBonds].values()},this.drawing.domNode),this.overlaidDrawing=new t.Drawing,this.overlaidDrawing.domNode.style.position="absolute",this.overlaidDrawing.domNode.style.top="0px",this.overlaidDrawing.domNode.style.left="0px",this.overlaidDrawing.domNode.style.pointerEvents="none",new MutationObserver((()=>{this.overlaidDrawing.setBoundaries(this.drawing),this.overlaidDrawing.horizontalScaling=this.drawing.horizontalScaling,this.overlaidDrawing.verticalScaling=this.drawing.verticalScaling})).observe(this.drawing.domNode,{attributes:!0}),this.stackedDrawingsContainer.append(this.drawing.domNode,this.overlaidDrawing.domNode),this.drawingView=new o(this.drawing,this.horizontalDrawingScrollbar,this.verticalDrawingScrollbar),this.pinchToScaleFeature=new u.PinchToScaleFeature(this.drawing.domNode),this.pinchToScaleFeature.horizontalScrollbar=this.horizontalDrawingScrollbar,this.pinchToScaleFeature.verticalScrollbar=this.verticalDrawingScrollbar,this.pinchToScaleFeature.interactionScope=this.domNode,this.selectedSVGElementHighlightings=new l.LiveSVGElementHighlightings(this.selectedSVGElements,this.drawing.domNode),this.selectedSVGElementHighlightings.appendTo(this.overlaidDrawing.domNode),this.clickSelectTool=new u.ClickSelectTool(this.drawing.domNode,this.selectedSVGElements),this.selectingRect=new u.SelectingRect(this.drawing.domNode,this.selectedSVGElements),this.selectingRect.appendTo(this.overlaidDrawing.domNode),this.ctrlASelector=new d({domNode:this.domNode,selectAll:()=>this.selectAll()}),this.selectedBases=new g.SelectedBases(this.drawing,this.selectedSVGElements),this.consecutiveBasesSelectingTool=new g.ConsecutiveBasesSelectingTool(this.drawing,this.selectedBases),this.draggingTool=new g.DraggingTool(this.drawing,{svgElements:this.selectedSVGElements,bases:this.selectedBases},{beforeDragging:()=>this.hideOverlaidDrawing(),afterDragging:()=>this.unhideOverlaidDrawing()}),this.formsContainer=document.createElement("div"),this.boundingBox.appendChild(this.formsContainer),M(this,v,new b(this.formsContainer),"f"),this.basesLayoutForm=new x.BasesLayoutForm(this.drawing,this.selectedBases,{beforeMovingBases:()=>this.hideOverlaidDrawing(),afterMovingBases:()=>this.unhideOverlaidDrawing()}),this.exportForm=new _.ExportForm({drawing:this.drawing}),this.dotBracketDrawer=new t.DotBracketDrawer(this.drawing),M(this,w,new t.SchemaDrawer(this.drawing),"f"),this.toolbar=new S.Toolbar({layoutButton:{onClick:()=>this.openForm(this.basesLayoutForm)},exportButton:{onClick:()=>this.openForm(this.exportForm)}}),this.toolbar.appendTo(this.toolbarContainer),this.boundingBox.append(this.toolbarContainer);let n=(0,S.ToolbarRepositioner)();n.addEventListener("click",(()=>this.toolbar.reposition())),n.title="Reposition the toolbar.";let r=document.createElement("div");r.append(n),this.boundingBox.append(r)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}get horizontalDrawingScrollbar(){return this.drawingScrollContainer.horizontalScrollbar}get verticalDrawingScrollbar(){return this.drawingScrollContainer.verticalScrollbar}get drawingScrollbars(){return this.drawingScrollContainer.scrollbars}hideOverlaidDrawing(){this.overlaidDrawing.domNode.style.visibility="hidden"}unhideOverlaidDrawing(){this.overlaidDrawing.domNode.style.visibility="visible"}drawDotBracket(t,e){this.dotBracketDrawer.draw(t,e)}drawSchema(t){(function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)})(this,w,"f").draw(t)}selectAll(){this.selectedSVGElements.addAll([...this.drawing.domNode.children].filter(O))}openForm(t){t instanceof Node?this.formsContainer.appendChild(t):t.appendTo(this.formsContainer)}get style(){return this.domNode.style}}w=new WeakMap,v=new WeakMap})(),r})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.appObject=e():t.appObject=e()}(this,(()=>(()=>{var t={298:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{InvertedStraightBondsHider:()=>nr,SavableStraightBond:()=>Fn,SavedStraightBond:()=>er,StraightBond:()=>Ln});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Te,move:()=>Ee,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function T(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function A(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=A;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=T(t)).before(this),this},insertAfter:function(t){return(t=T(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:v.x,ry:v.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=T().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return A(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=T(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=T(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}D(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=T(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return T(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=T(t),this.add(t,e),t}putIn(t,e){return T(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=T(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=T(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?T(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Tt extends Pt{flatten(){return this.each((function(){if(this instanceof Tt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(Tt,"Container");class Et extends Tt{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class At extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(At,"Shape");class Vt extends At{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends Tt{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends Tt{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends Tt{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?ve:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends At{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Te(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=ve,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new ve)}))}}),D(Pe,"Path");class De extends At{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends At{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends At{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends vt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends Tt{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends Tt{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends At{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends At{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends At{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends Tt{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends Tt{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends Tt{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends Tt{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=ve,D(Nn,"TextPath");class Tn extends At{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new Tn).use(t,e)}))}}),D(Tn,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(vt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(At,c("Shape")),I([Tt,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,ve,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),An=n(725),jn=n(854);const Dn=["basePadding1","basePadding2"],kn={basePadding1:"setBasePadding1",basePadding2:"setBasePadding2"};class Ln{static between(t,e){let n=(new ee).node,r=new Ln(n,t,e);return r.assignUUID(),r.set(Ln.defaultValues),r.reposition(),r}constructor(t,e,n){this.line=t,this.base1=e,this.base2=n,this.cachedBasePadding1=(0,An.distance)(this.point1,this.base1.centerPoint),this.cachedBasePadding2=(0,An.distance)(this.point2,this.base2.centerPoint),e.addEventListener("move",(()=>this.reposition())),n.addEventListener("move",(()=>this.reposition()))}get basePair(){return[this.base1,this.base2]}get domNode(){return this.line}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){if((0,jn.isNonNullObject)(t))try{new ee(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,En.assignUUID)(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}getTotalLength(){return this.domNode.getTotalLength()}getPointAtLength(t){return this.domNode.getPointAtLength(t)}get point1(){return{x:this.domNode.x1.baseVal.value,y:this.domNode.y1.baseVal.value}}get point2(){return{x:this.domNode.x2.baseVal.value,y:this.domNode.y2.baseVal.value}}get basePadding1(){return this.cachedBasePadding1}set basePadding1(t){this.cachedBasePadding1=t,this.reposition()}setBasePadding1(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding1=Math.max(0,t))}get basePadding2(){return this.cachedBasePadding2}set basePadding2(t){this.cachedBasePadding2=t,this.reposition()}setBasePadding2(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding2=Math.max(0,t))}isInverted(){return this.basePadding1+this.basePadding2>(0,An.distance)(this.base1.centerPoint,this.base2.centerPoint)}set(t){try{this.setAttributes(t.attributes)}catch(t){}Dn.forEach((e=>{try{this[kn[e]](t[e])}catch(t){}}))}reposition(){let t=this.base1.centerPoint,e=this.base2.centerPoint,n=(0,An.direction)(t,e);this.setAttribute("x1",`${t.x+this.basePadding1*Math.cos(n)}`),this.setAttribute("y1",`${t.y+this.basePadding1*Math.sin(n)}`),this.setAttribute("x2",""+(e.x-this.basePadding2*Math.cos(n))),this.setAttribute("y2",""+(e.y-this.basePadding2*Math.sin(n)))}}Ln.defaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6};var Bn,In=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Fn{constructor(t){Bn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Bn,t)}toJSONSerializable(){let t=In(this,Bn,"f").id,e=In(this,Bn,"f").base1.id,n=In(this,Bn,"f").base2.id;if(!t)throw new Error("Straight bond ID is falsy.");if(!e)throw new Error("Base ID 1 is falsy.");if(!n)throw new Error("Base ID 2 is falsy.");return{id:t,baseID1:e,baseID2:n,basePadding1:In(this,Bn,"f").basePadding1,basePadding2:In(this,Bn,"f").basePadding2}}}Bn=new WeakMap;var Rn,Vn,zn,qn,Xn,Yn,Gn,Hn,Un,$n,Wn,Qn,Jn,Kn,Zn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},tr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class er{constructor(t,e){Rn.add(this),Vn.set(this,void 0),zn.set(this,void 0),Zn(this,Vn,t,"f"),Zn(this,zn,e,"f")}recreate(){let t=new Ln(tr(this,Rn,"a",Yn),tr(this,Rn,"a",$n),tr(this,Rn,"a",Wn));try{t.basePadding1=tr(this,Rn,"a",Jn)}catch(t){}try{t.basePadding2=tr(this,Rn,"a",Kn)}catch(t){}return t}}Vn=new WeakMap,zn=new WeakMap,Rn=new WeakSet,qn=function(t){let e=tr(this,Vn,"f")[t];if(!e)throw new Error(`No ID with name "${t}" was saved.`);if("string"!=typeof e)throw new Error(`The ID with name "${t}" is not a string: ${e}.`);return e},Xn=function(){try{return tr(this,Rn,"m",qn).call(this,"id")}catch(t){return tr(this,Rn,"m",qn).call(this,"lineId")}},Yn=function(){let t=tr(this,Rn,"a",Xn),e=tr(this,zn,"f").domNode.querySelector(`#${t}`);if(!e)throw new Error(`No DOM node in the drawing has the ID "${t}".`);if(!(e instanceof SVGLineElement))throw new Error(`The DOM node with ID "${t}" is not an SVG line element.`);return e},Gn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID1")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId1")}},Hn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID2")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId2")}},Un=function(t){let e={1:tr(this,Rn,"a",Gn),2:tr(this,Rn,"a",Hn)}[t],n=[...tr(this,zn,"f").bases].find((t=>t.id===e));if(!n)throw new Error(`No base in the drawing has the ID "${e}".`);return n},$n=function(){return tr(this,Rn,"m",Un).call(this,1)},Wn=function(){return tr(this,Rn,"m",Un).call(this,2)},Qn=function(t){let e=tr(this,Vn,"f")[`basePadding${t}`];if("number"!=typeof e)throw new Error(`Saved base padding ${t} is not a number: ${e}.`);return e},Jn=function(){return tr(this,Rn,"m",Qn).call(this,1)},Kn=function(){return tr(this,Rn,"m",Qn).call(this,2)};class nr{constructor(t,e){this.targetStraightBonds=t,new MutationObserver((t=>{let e=new Set([...this.targetStraightBonds].map((t=>t.domNode)));!t.some((t=>e.has(t.target)))||this.updateOpacities()})).observe(e,{attributes:!0,attributeFilter:["x1","y1","x2","y2"],subtree:!0})}updateOpacities(){[...this.targetStraightBonds].forEach((t=>{let e=t.isInverted()?"0":"1";t.setAttribute("opacity",e)}))}}})(),r})(),t.exports=e()},124:function(t){var e;e=()=>(()=>{var t={661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>u,Stems:()=>a,areStacked:()=>o,deepCopy:()=>e,parseDotBracket:()=>h,sorted:()=>s});var t=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function e(e){return e.map((function(e){return t([],e,!0)}))}var i=n(986);function s(t){var n=e(t);return n.forEach(i.sortNumbers),n.sort((function(t,e){return t[0]-e[0]})),n}function o(t,e){var n=s([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}var a=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=s(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||o(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),u=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(a.bind.apply(a,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(i.min),t.map(i.max)]}));t.forEach(i.sortNumbers),t.sort((function(t,e){return(0,i.min)(t)-(0,i.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var s=[],o=(0,i.max)(n),u=(0,i.min)(r),h=o;h<=u;h++)s.push(h);e.push(s),n=r,r=t.shift()}return e},t}();function h(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return s(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a});var t=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0];return this.targetStructure[1].map((function(e){return[t.indexOf(e[0])+1,t.indexOf(e[1])+1]}))},t}(),e=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");var n=e.flat(),r=t.findIndex((function(t){return n.includes(t)}));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]},t}(),i=n(986),s=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");var n=e.flat().map((function(e){return t.indexOf(e)}));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]},t}(),o=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");var n=(new(e.bind.apply(e,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)},t}(),a=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");var e=(new(s.bind.apply(s,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)},t}(),u=n(369),h=function(){function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return e.prototype.get=function(){var e=this.targetStructure[0],n=(new(t.bind.apply(t,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get();return new u.Stems(e,n).get().map((function(t){return t.map((function(t){return[e[t[0]-1],e[t[1]-1]]}))}))},e}(),l=function(){function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return e.prototype.get=function(){var e=this.targetStructure[0],n=(new(t.bind.apply(t,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get();return new u.Linkers(e,n).get().map((function(t){return t.map((function(t){return e[t-1]}))}))},e}()})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,h=Math.PI*a/2,l=Math.abs(i-h)<.001;this.wrappedCircularSegment=u||l?new e(n):i<h?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>u,Stems:()=>a,areStacked:()=>o,deepCopy:()=>e,parseDotBracket:()=>h,sorted:()=>s});var t=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function e(e){return e.map((function(e){return t([],e,!0)}))}var i=n(986);function s(t){var n=e(t);return n.forEach(i.sortNumbers),n.sort((function(t,e){return t[0]-e[0]})),n}function o(t,e){var n=s([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}var a=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=s(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||o(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),u=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(a.bind.apply(a,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(i.min),t.map(i.max)]}));t.forEach(i.sortNumbers),t.sort((function(t,e){return(0,i.min)(t)-(0,i.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var s=[],o=(0,i.max)(n),u=(0,i.min)(r),h=o;h<=u;h++)s.push(h);e.push(s),n=r,r=t.shift()}return e},t}();function h(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return s(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>l,MinCenterX:()=>a,MinCenterY:()=>h,NucleobaseMock:()=>t,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>B,rotate:()=>d,round:()=>S,shift:()=>e,stemmify:()=>w,straighten:()=>v});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class l{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var c=n(30);function d(t,e){if(0==t.length)return;let n=new s(t).get();t.forEach((t=>{let r=t.getCenterPoint(),s=(0,i.distance)(n,r),o=(0,c.direction)((0,i.displacement)(n,r));o+=e,t.setCenterPoint({x:n.x+s*Math.cos(o),y:n.y+s*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,c.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),h={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(h)}function v(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,c.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),h=a*Math.sin(o),{x:l,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:l,y:d}),l+=u,d+=h}))}function w(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),h=t.slice(a),l=new s(t),{x:c,y:p}=l.get(),m={x:c,y:p},g=new f(t).get();b(u,{spacing:o}),b(h,{spacing:o}),new f(u).set(-Math.PI/2),new f(h).set(Math.PI/2);let y=t[0],v=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(h,(0,i.displacement)(v.getCenterPoint(),{x:r,y:0})),d(t,g),l.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,h=a,l=new f(t).get(),c=n*(t.length-1);c+=r,Math.abs(c)<1e-5&&(c=1e-5);let p=c/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/c);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/c;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,l),i.set({x:u,y:h})}var _=n(173);function S(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),h=r*(t.length-1);if(h-u<.001)return void v(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let l=new _.CircularSegment(a,{arcLength:h}),d=l.parentCircleCenterPoint,f=l.parentCircleRadius,p=(0,c.direction)((0,i.displacement)(d,s.getCenterPoint())),m=l.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var M=n(127),O=n(369);class C{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class P{static of(...t){let[e,n]=t,r=new M.PositionPairs(...t).get();r=(0,O.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class N{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=P.of(...t),this.positionPairs=new M.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class T{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class E{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],h=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>h,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=Object.assign({},a.getCenterPoint());w(h,{basePairLength:n,basePairSpacing:r}),e(h,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class A{static in(t){return{[Symbol.iterator]:()=>new M.Stems(t.sequence,t.basePairs).get().map((t=>E.composedOf(t))).values()}}}class j{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),h=C.from(a).to(u).inclusive(),l=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),c=h.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(h.map((t=>o.mountainPlotTraversal[t]))).size&&!l;return{[Symbol.iterator]:()=>t.values(),indices:h,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=Object.assign({},r.getCenterPoint());w(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>l,isInOutermostLoop:()=>c,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;S(t,{spacing:n})}})}}}}}class D{static in(t){let e=new M.Linkers(t.sequence,t.basePairs).get().map((e=>j.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class k{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=T.correspondingTo(s).in(r),u=(0,o.min)(a),h=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),l=h.map((t=>r.sequence.indexOf(t))),c=h.filter((t=>r.pairedBases.has(t))),d=l.filter((t=>r.pairedIndices.has(t))),f=[s[0],...h,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:h,enclosedIndices:l,enclosedPairedBases:c,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),h=r.sequence.filter(((t,e)=>e>=n&&e<=u&&l.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>h.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:l}=r,c=(0,o.max)([h.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=C.from(1).to(c).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=Object.assign({},s[0].getCenterPoint());x([s[0],...d,...h,...f,s[1]],{spacing:l,terminiGap:l}),e([...s,...h],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class L{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function B(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new N(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let h=Object.assign({},new s(t).get()),l=new f(t).get(),c=A.in(u),d=D.in(u);x([...L.of(u)],{spacing:i,terminiGap:2*i});let p=[...c].map((t=>k.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&S(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(l),new s(t).set(h)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ConsecutiveBasesSelectingTool:()=>t,DraggingTool:()=>s,SelectedBases:()=>e});class t{constructor(t,e){this.targetDrawing=t,this.selectedBases=e,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),window.addEventListener("mouseover",(t=>this.handleMouseOver(t)))}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseUp(t){this.mouseIsDown=!1}handleMouseOver(t){if(!this.mouseIsDown)return;let e=this.lastMouseDown;if(!e)return;if(!e.shiftKey)return;if(!(t.target instanceof Node))return;if(!this.targetDrawing.domNode.contains(t.target))return;let n=[...this.targetDrawing.bases],r=n.findIndex((e=>e.domNode===t.target));if(r<0)return;let i=n.findIndex((t=>t.domNode===e.target));if(i<0)return;try{let t=n[i];if(!this.selectedBases.include(t))return}catch(t){console.error(t)}let s=Math.min(i,r),o=Math.max(i,r);this.selectedBases.addAll(n.slice(s,o+1))}}class e{constructor(t,e){this.targetDrawing=t,this.selectedSVGElements=e}[Symbol.iterator](){return[...this.targetDrawing.bases].filter((t=>this.selectedSVGElements.include(t.domNode))).values()}include(t){return this.selectedSVGElements.include(t.domNode)}addAll(t){this.selectedSVGElements.addAll([...t].map((t=>t.domNode)))}addEventListener(t,e){this.selectedSVGElements.addEventListener(t,e)}}var i=n(661);class s{constructor(t,e,n){this.targetDrawing=t,this.selectedElements=e,this.options=n,this.mouseIsDown=!1,this.dragged=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t)))}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0,this.dragged=!1}handleMouseMove(t){var e;if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.shiftKey)return;if(!(this.lastMouseDown.target instanceof SVGGraphicsElement))return;if(!this.selectedElements.svgElements.include(this.lastMouseDown.target))return;let n=t.movementX/this.targetDrawing.horizontalClientScaling,r=t.movementY/this.targetDrawing.verticalClientScaling;this.dragged||!(null===(e=this.options)||void 0===e?void 0:e.beforeDragging)||this.options.beforeDragging(),(0,i.shift)([...this.selectedElements.bases],{x:n,y:r}),this.dragged=!0}handleMouseUp(t){var e;this.mouseIsDown=!1,!this.dragged||!(null===(e=this.options)||void 0===e?void 0:e.afterDragging)||this.options.afterDragging(),this.dragged=!1}}})(),r})(),t.exports=e()},524:function(t){var e;e=()=>(()=>{var t={645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BoxHighlighting:()=>s,LiveSVGElementHighlightings:()=>a});var t,e=n(645),i=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class s{constructor(){t.set(this,.5),this.domNode=document.createElementNS("http://www.w3.org/2000/svg","g"),this.boxTrace=document.createElementNS("http://www.w3.org/2000/svg","path"),this.topLeftCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.topRightCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.bottomRightCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.bottomLeftCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.domNode.append(this.boxTrace,...this.cornerBoxes),this.domNode.style.pointerEvents="auto",this.boxTrace.setAttribute("stroke","blue"),this.boxTrace.setAttribute("stroke-width",`${i(this,t,"f")}`),this.boxTrace.setAttribute("fill","none"),this.cornerBoxes.forEach((e=>{e.setAttribute("stroke","blue"),e.setAttribute("stroke-width",`${i(this,t,"f")}`),e.setAttribute("fill","white")}))}get cornerBoxes(){return[this.topLeftCornerBox,this.topRightCornerBox,this.bottomRightCornerBox,this.bottomLeftCornerBox]}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}cornerBoxD({centerPoint:e}){return`M ${e.x-2.5*i(this,t,"f")} ${e.y-2.5*i(this,t,"f")} h `+5*i(this,t,"f")+" v "+5*i(this,t,"f")+" h "+-5*i(this,t,"f")+" z"}highlight(t){let n=e.Box.matching(t);this.boxTrace.setAttribute("d",`M ${n.x} ${n.y} h ${n.width} v ${n.height} h ${-n.width} z`),this.topLeftCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.minX,y:n.minY}})),this.topRightCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.maxX,y:n.minY}})),this.bottomRightCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.maxX,y:n.maxY}})),this.bottomLeftCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.minX,y:n.maxY}})),this.highlightedBox=n}get lineThickness(){return i(this,t,"f")}set lineThickness(e){(function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)})(this,t,e),[this.boxTrace,...this.cornerBoxes].forEach((t=>{t.setAttribute("stroke-width",`${e}`)})),!this.highlightedBox||this.highlight(this.highlightedBox)}setOpacity(t){this.domNode.setAttribute("opacity",`${t}`)}}t=new WeakMap;var o=n(726);class a{constructor(t,e){this.targetSVGElements=t,this.domNode=document.createElementNS("http://www.w3.org/2000/svg","g"),this.boxHighlightings=[],this.parentSVGDocCoordinateSystem=new o.CoordinateSystem(e),t.addEventListener("change",(()=>this.refresh())),new MutationObserver((()=>this.refresh())).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}refresh(){let t=[...this.targetSVGElements];t.slice(this.boxHighlightings.length).forEach((()=>{let t=new s;t.appendTo(this.domNode),this.boxHighlightings.push(t)}));let e=1/this.parentSVGDocCoordinateSystem.horizontalScaling;t.forEach(((t,n)=>{try{let r=this.boxHighlightings[n];r.highlight(t.getBBox()),r.lineThickness=e,r.setOpacity(1)}catch(t){console.error(t)}})),this.boxHighlightings.slice(t.length).forEach((t=>t.setOpacity(0)))}}})(),r})(),t.exports=e()},460:function(t){var e;e=()=>(()=>{var t={645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ClickSelectTool:()=>t,PinchToScaleFeature:()=>u,SelectingRect:()=>o});class t{constructor(t,e){this.targetSVGDoc=t,this.selectedSVGElements=e,t.addEventListener("mousedown",(t=>this.handleMouseDown(t)))}handleMouseDown(t){t.target!==this.targetSVGDoc?t.target instanceof SVGGraphicsElement&&this.targetSVGDoc.contains(t.target)&&(this.selectedSVGElements.include(t.target)?!t.shiftKey||this.selectedSVGElements.removeAll([t.target]):(t.shiftKey||this.selectedSVGElements.clear(),this.selectedSVGElements.addAll([t.target]))):t.shiftKey||this.selectedSVGElements.clear()}}var e=n(726),i=n(645);function s(t){return t instanceof SVGGraphicsElement}class o{constructor(t,n){this.targetSVGDoc=t,this.selectedSVGElements=n,this.defaultLineThickness=.5,this.lastMouseDownX=0,this.lastMouseDownY=0,this.mouseIsDown=!1,this.isDrawn=!1,this.targetSVGDocCoordinateSystem=new e.CoordinateSystem(t),this.domNode=document.createElementNS("http://www.w3.org/2000/svg","path"),this.domNode.setAttribute("stroke","blue"),this.refreshLineThickness(),this.domNode.setAttribute("fill","blue"),this.domNode.setAttribute("fill-opacity","0.1"),new MutationObserver((()=>this.refreshLineThickness())).observe(t,{attributes:!0,attributeFilter:["viewBox","width","height"]}),this.domNode.style.pointerEvents="none",this.domNode.style.visibility="hidden",window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t)))}refreshLineThickness(){this.domNode.setAttribute("stroke-width",""+this.defaultLineThickness/this.targetSVGDocCoordinateSystem.horizontalScaling)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}handleMouseDown(t){this.lastMouseDown=t,this.lastMouseDownX=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),this.lastMouseDownY=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetSVGDoc)return;let e=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),n=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),r=`M ${this.lastMouseDownX} ${this.lastMouseDownY} H ${e} V ${n} H ${this.lastMouseDownX} z`;this.domNode.setAttribute("d",r),this.domNode.style.visibility="visible",this.isDrawn=!0}handleMouseUp(t){var e;this.mouseIsDown=!1,this.domNode.style.visibility="hidden";let n=this.isDrawn;if(this.isDrawn=!1,!n)return;let r=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),o=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),a=i.Box.bounding([{x:this.lastMouseDownX,y:this.lastMouseDownY,width:0,height:0},{x:r,y:o,width:0,height:0}]),u=[...this.targetSVGDoc.children].filter(s).filter((t=>i.Box.matching(t.getBBox()).isBoundedBy(a)));(null===(e=this.lastMouseDown)||void 0===e?void 0:e.shiftKey)||this.selectedSVGElements.clear(),this.selectedSVGElements.addAll(u)}}var a=n(986);class u{constructor(t){this.targetSVGDoc=t,this.targetSVGDocCoordinateSystem=new e.CoordinateSystem(t),this.interactionScope=t,window.addEventListener("wheel",(t=>this.handleWheel(t)),{passive:!1})}handleWheel(t){var e,n,r,i;if(!t.ctrlKey)return;if(!(t.target instanceof Node))return;if(!this.interactionScope.contains(t.target))return;t.preventDefault();let s=1-(0,a.clamp)(t.deltaY,-25,25)/150,o=this.targetSVGDocCoordinateSystem.horizontalScaling,u=s*o;u=Number.isFinite(u)?u:1,u=(0,a.clamp)(u,.1,500),s=u/o;let h=s*(null!==(n=null===(e=this.horizontalScrollbar)||void 0===e?void 0:e.thumb.centerX)&&void 0!==n?n:0),l=s*(null!==(i=null===(r=this.verticalScrollbar)||void 0===r?void 0:r.thumb.centerY)&&void 0!==i?i:0);this.targetSVGDocCoordinateSystem.setScaling(u),!this.horizontalScrollbar||(this.horizontalScrollbar.thumb.centerX=h),!this.verticalScrollbar||(this.verticalScrollbar.thumb.centerY=l)}}})(),r})(),t.exports=e()},662:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>c,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function c(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>c,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function c(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,h=Math.PI*a/2,l=Math.abs(i-h)<.001;this.wrappedCircularSegment=u||l?new e(n):i<h?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},456:function(t){var e;e=()=>(()=>{var t={277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}get direction(){return Math.atan2(this.y,this.x)}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Point:()=>e,RelativePoint:()=>l});var t=n(277);class e{static matching(t){return new e(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}displacementTo(e){return new t.Vector(e.x-this.x,e.y-this.y)}displacementFrom(e){return new t.Vector(this.x-e.x,this.y-e.y)}distanceTo(t){return this.displacementTo(t).magnitude}distanceFrom(t){return this.distanceTo(t)}directionTo(t){return this.displacementTo(t).direction}directionFrom(t){return this.displacementFrom(t).direction}}var i,s,o,a,u,h=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class l{constructor(e){i.add(this),s.set(this,void 0),o.set(this,new t.Vector(0,0)),a.set(this,{move:[]}),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,s,e),e.addEventListener("move",(()=>h(this,i,"m",u).call(this,"move")))}get x(){return h(this,s,"f").x+h(this,o,"f").x}set x(t){h(this,o,"f").x=t-h(this,s,"f").x,h(this,i,"m",u).call(this,"move")}get y(){return h(this,s,"f").y+h(this,o,"f").y}set y(t){h(this,o,"f").y=t-h(this,s,"f").y,h(this,i,"m",u).call(this,"move")}addEventListener(t,e){h(this,a,"f")[t].push(e)}removeEventListener(t,e){h(this,a,"f")[t]=h(this,a,"f")[t].filter((t=>t!==e))}}s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,u=function(t){h(this,a,"f")[t].forEach((t=>t()))}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>l,MinCenterX:()=>a,MinCenterY:()=>h,NucleobaseMock:()=>t,arrange:()=>C,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>F,rotate:()=>d,round:()=>S,shift:()=>e,stemmify:()=>w,straighten:()=>v});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class l{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var c=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,c.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,c.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),h={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(h)}function v(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,c.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),h=a*Math.sin(o),{x:l,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:l,y:d}),l+=u,d+=h}))}function w(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),h=t.slice(a),l=new s(t),{x:c,y:p}=l.get(),m={x:c,y:p},g=new f(t).get();b(u,{spacing:o}),b(h,{spacing:o}),new f(u).set(-Math.PI/2),new f(h).set(Math.PI/2);let y=t[0],v=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(h,(0,i.displacement)(v.getCenterPoint(),{x:r,y:0})),d(t,g),l.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,h=a,l=new f(t).get(),c=n*(t.length-1);c+=r,Math.abs(c)<1e-5&&(c=1e-5);let p=c/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/c);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/c;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,l),i.set({x:u,y:h})}var _=n(173);function S(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),h=r*(t.length-1);if(h-u<.001)return void v(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let l=new _.CircularSegment(a,{arcLength:h}),d=l.parentCircleCenterPoint,f=l.parentCircleRadius,p=(0,c.direction)((0,i.displacement)(d,s.getCenterPoint())),m=l.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var M=n(127),O=n(369);function C(t,n,r){var a,u,h;let{spacing:l}=r,c=null!==(a=r.basePairSpacing)&&void 0!==a?a:l,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:l,p=null!==(h=r.terminiGap)&&void 0!==h?h:l,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,M.knotless)(t,n);let v=new M.PositionPairs(t,n).get(),_=(0,O.mountainPlotTraversal)(t,v),C=t.filter(((t,e)=>0==_[e]));x(C,{spacing:l,terminiGap:p});let P=new M.Stems(t,n).get(),N=new Set(C),T=P.filter((t=>N.has(t[0][0]))),E=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),h={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];w(m,{basePairLength:l,basePairSpacing:c}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),h));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&_[e]==_[(0,o.min)(y)]+1)),v=new Set(b),x=P.filter((t=>v.has(t[0][0])));S([g[0],...b,g[1]],{spacing:x.length>0?l:d}),x.forEach((t=>E(t)))};T.forEach((t=>E(t))),new f(t).set(b),new s(t).set(y)}var P=n(456);class N{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class T{static of(...t){let[e,n]=t,r=new M.PositionPairs(...t).get();r=(0,O.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class E{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=T.of(...t),this.positionPairs=new M.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class A{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class j{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],h=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>h,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=P.Point.matching(a.getCenterPoint());w(h,{basePairLength:n,basePairSpacing:r}),e(h,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class D{static in(t){return{[Symbol.iterator]:()=>new M.Stems(t.sequence,t.basePairs).get().map((t=>j.composedOf(t))).values()}}}class k{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),h=N.from(a).to(u).inclusive(),l=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),c=h.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(h.map((t=>o.mountainPlotTraversal[t]))).size&&!l;return{[Symbol.iterator]:()=>t.values(),indices:h,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=P.Point.matching(r.getCenterPoint());w(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>l,isInOutermostLoop:()=>c,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;S(t,{spacing:n})}})}}}}}class L{static in(t){let e=new M.Linkers(t.sequence,t.basePairs).get().map((e=>k.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class B{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=A.correspondingTo(s).in(r),u=(0,o.min)(a),h=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),l=h.map((t=>r.sequence.indexOf(t))),c=h.filter((t=>r.pairedBases.has(t))),d=l.filter((t=>r.pairedIndices.has(t))),f=[s[0],...h,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:h,enclosedIndices:l,enclosedPairedBases:c,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),h=r.sequence.filter(((t,e)=>e>=n&&e<=u&&l.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>h.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:l}=r,c=(0,o.max)([h.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=N.from(1).to(c).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=P.Point.matching(s[0].getCenterPoint());x([s[0],...d,...h,...f,s[1]],{spacing:l,terminiGap:l}),e([...s,...h],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class I{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function F(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new E(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let h=P.Point.matching(new s(t).get()),l=new f(t).get(),c=D.in(u),d=L.in(u);x([...I.of(u)],{spacing:i,terminiGap:2*i});let p=[...c].map((t=>B.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&S(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(l),new s(t).set(h)}})(),r})(),t.exports=e()},282:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>d,InnerXML:()=>b,OuterXML:()=>x,Scaling:()=>c,VerticalClientScaling:()=>f,assignUUID:()=>h,bringToFront:()=>p,sendToBack:()=>m});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));const u=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=i[a];return e}return function(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+u()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class c{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class d{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function p(t){let e=t.parentNode;e&&e.appendChild(t)}function m(t){let e=t.parentNode;e&&e.prepend(t)}var g,y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){g.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,g,t)}toString(){return y(this,g,"f").innerHTML}set(t){y(this,g,"f").innerHTML=t}}g=new WeakMap;var v,w=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class x{constructor(t){v.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,v,t)}toString(){return w(this,v,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=w(this,v,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...w(this,v,"f").attributes].forEach((t=>w(this,v,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>w(this,v,"f").setAttribute(t.name,t.value))),w(this,v,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return v=new WeakMap,e})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&0==t.length}function d(t){return l(t)&&t.length>0}function f(t){return l(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return l(t)&&t.every(r)}function g(t){return l(t)&&t.every(i)}function y(t){return l(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>l,isEmptyArray:()=>c,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{InvertedStraightBondsHider:()=>nr,SavableStraightBond:()=>Fn,SavedStraightBond:()=>er,StraightBond:()=>Ln});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Te,move:()=>Ee,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function T(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function A(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=A;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=T(t)).before(this),this},insertAfter:function(t){return(t=T(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:v.x,ry:v.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=T().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return A(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=T(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=T(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}D(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=T(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return T(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=T(t),this.add(t,e),t}putIn(t,e){return T(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=T(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=T(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?T(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Tt extends Pt{flatten(){return this.each((function(){if(this instanceof Tt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(Tt,"Container");class Et extends Tt{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class At extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(At,"Shape");class Vt extends At{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends Tt{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends Tt{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends Tt{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?ve:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends At{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Te(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=ve,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new ve)}))}}),D(Pe,"Path");class De extends At{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends At{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends At{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends vt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends Tt{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends Tt{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends At{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends At{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends At{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends Tt{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends Tt{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends Tt{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends Tt{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=ve,D(Nn,"TextPath");class Tn extends At{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new Tn).use(t,e)}))}}),D(Tn,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(vt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(At,c("Shape")),I([Tt,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,ve,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),An=n(725),jn=n(854);const Dn=["basePadding1","basePadding2"],kn={basePadding1:"setBasePadding1",basePadding2:"setBasePadding2"};class Ln{static between(t,e){let n=(new ee).node,r=new Ln(n,t,e);return r.assignUUID(),r.set(Ln.defaultValues),r.reposition(),r}constructor(t,e,n){this.line=t,this.base1=e,this.base2=n,this.cachedBasePadding1=(0,An.distance)(this.point1,this.base1.centerPoint),this.cachedBasePadding2=(0,An.distance)(this.point2,this.base2.centerPoint),e.centerPoint.addEventListener("move",(()=>this.reposition())),n.centerPoint.addEventListener("move",(()=>this.reposition()))}get basePair(){return[this.base1,this.base2]}get domNode(){return this.line}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){if((0,jn.isNonNullObject)(t))try{new ee(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,En.assignUUID)(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}getTotalLength(){return this.domNode.getTotalLength()}getPointAtLength(t){return this.domNode.getPointAtLength(t)}get point1(){return{x:this.domNode.x1.baseVal.value,y:this.domNode.y1.baseVal.value}}get point2(){return{x:this.domNode.x2.baseVal.value,y:this.domNode.y2.baseVal.value}}get basePadding1(){return this.cachedBasePadding1}set basePadding1(t){this.cachedBasePadding1=t,this.reposition()}setBasePadding1(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding1=Math.max(0,t))}get basePadding2(){return this.cachedBasePadding2}set basePadding2(t){this.cachedBasePadding2=t,this.reposition()}setBasePadding2(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding2=Math.max(0,t))}isInverted(){return this.basePadding1+this.basePadding2>(0,An.distance)(this.base1.centerPoint,this.base2.centerPoint)}set(t){try{this.setAttributes(t.attributes)}catch(t){}Dn.forEach((e=>{try{this[kn[e]](t[e])}catch(t){}}))}reposition(){let t=this.base1.centerPoint,e=this.base2.centerPoint,n=(0,An.direction)(t,e);this.setAttribute("x1",`${t.x+this.basePadding1*Math.cos(n)}`),this.setAttribute("y1",`${t.y+this.basePadding1*Math.sin(n)}`),this.setAttribute("x2",""+(e.x-this.basePadding2*Math.cos(n))),this.setAttribute("y2",""+(e.y-this.basePadding2*Math.sin(n)))}}Ln.defaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6};var Bn,In=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Fn{constructor(t){Bn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Bn,t)}toJSONSerializable(){let t=In(this,Bn,"f").id,e=In(this,Bn,"f").base1.id,n=In(this,Bn,"f").base2.id;if(!t)throw new Error("Straight bond ID is falsy.");if(!e)throw new Error("Base ID 1 is falsy.");if(!n)throw new Error("Base ID 2 is falsy.");return{id:t,baseID1:e,baseID2:n,basePadding1:In(this,Bn,"f").basePadding1,basePadding2:In(this,Bn,"f").basePadding2}}}Bn=new WeakMap;var Rn,Vn,zn,qn,Xn,Yn,Gn,Hn,Un,$n,Wn,Qn,Jn,Kn,Zn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},tr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class er{constructor(t,e){Rn.add(this),Vn.set(this,void 0),zn.set(this,void 0),Zn(this,Vn,t,"f"),Zn(this,zn,e,"f")}recreate(){let t=new Ln(tr(this,Rn,"a",Yn),tr(this,Rn,"a",$n),tr(this,Rn,"a",Wn));try{t.basePadding1=tr(this,Rn,"a",Jn)}catch(t){}try{t.basePadding2=tr(this,Rn,"a",Kn)}catch(t){}return t}}Vn=new WeakMap,zn=new WeakMap,Rn=new WeakSet,qn=function(t){let e=tr(this,Vn,"f")[t];if(!e)throw new Error(`No ID with name "${t}" was saved.`);if("string"!=typeof e)throw new Error(`The ID with name "${t}" is not a string: ${e}.`);return e},Xn=function(){try{return tr(this,Rn,"m",qn).call(this,"id")}catch(t){return tr(this,Rn,"m",qn).call(this,"lineId")}},Yn=function(){let t=tr(this,Rn,"a",Xn),e=tr(this,zn,"f").domNode.querySelector(`#${t}`);if(!e)throw new Error(`No DOM node in the drawing has the ID "${t}".`);if(!(e instanceof SVGLineElement))throw new Error(`The DOM node with ID "${t}" is not an SVG line element.`);return e},Gn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID1")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId1")}},Hn=function(){try{return tr(this,Rn,"m",qn).call(this,"baseID2")}catch(t){return tr(this,Rn,"m",qn).call(this,"baseId2")}},Un=function(t){let e={1:tr(this,Rn,"a",Gn),2:tr(this,Rn,"a",Hn)}[t],n=[...tr(this,zn,"f").bases].find((t=>t.id===e));if(!n)throw new Error(`No base in the drawing has the ID "${e}".`);return n},$n=function(){return tr(this,Rn,"m",Un).call(this,1)},Wn=function(){return tr(this,Rn,"m",Un).call(this,2)},Qn=function(t){let e=tr(this,Vn,"f")[`basePadding${t}`];if("number"!=typeof e)throw new Error(`Saved base padding ${t} is not a number: ${e}.`);return e},Jn=function(){return tr(this,Rn,"m",Qn).call(this,1)},Kn=function(){return tr(this,Rn,"m",Qn).call(this,2)};class nr{constructor(t,e){this.targetStraightBonds=t,new MutationObserver((t=>{let e=new Set([...this.targetStraightBonds].map((t=>t.domNode)));!t.some((t=>e.has(t.target)))||this.updateOpacities()})).observe(e,{attributes:!0,attributeFilter:["x1","y1","x2","y2"],subtree:!0})}updateOpacities(){[...this.targetStraightBonds].forEach((t=>{let e=t.isInverted()?"0":"1";t.setAttribute("opacity",e)}))}}})(),r})(),t.exports=e()},775:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{BaseOutline:()=>n});class n{constructor(t,e){this.domNode=t,this.owner=e,e.centerPoint.addEventListener("move",(()=>{t.setAttribute("cx",`${e.centerPoint.x}`),t.setAttribute("cy",`${e.centerPoint.y}`)}))}}return e})(),t.exports=e()},358:function(t){var e;e=()=>(()=>{var t={731:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CenterPoint:()=>h});var n,r,i,s,o,a=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},u=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class h{constructor(t){n.add(this),r.set(this,void 0),i.set(this,{move:[]}),s.set(this,void 0),a(this,r,t,"f"),a(this,s,new MutationObserver((()=>u(this,n,"m",o).call(this,"move"))),"f"),u(this,s,"f").observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}get x(){let t=u(this,r,"f").getBBox();return t.x+t.width/2}set x(t){let e=this.x,n=[...u(this,r,"f").x.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("x",n.join(", "))}get y(){let t=u(this,r,"f").getBBox();return t.y+t.height/2}set y(t){let e=this.y,n=[...u(this,r,"f").y.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("y",n.join(", "))}addEventListener(t,e){u(this,i,"f")[t].push(e)}removeEventListener(t,e){u(this,i,"f")[t]=u(this,i,"f")[t].filter((t=>t!==e))}}return r=new WeakMap,i=new WeakMap,s=new WeakMap,n=new WeakSet,o=function(t){u(this,i,"f")[t].forEach((t=>t()))},e})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>d,InnerXML:()=>b,OuterXML:()=>x,Scaling:()=>c,VerticalClientScaling:()=>f,assignUUID:()=>h,bringToFront:()=>p,sendToBack:()=>m});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));const u=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=i[a];return e}return function(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+u()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class c{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class d{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function p(t){let e=t.parentNode;e&&e.appendChild(t)}function m(t){let e=t.parentNode;e&&e.prepend(t)}var g,y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){g.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,g,t)}toString(){return y(this,g,"f").innerHTML}set(t){y(this,g,"f").innerHTML=t}}g=new WeakMap;var v,w=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class x{constructor(t){v.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,v,t)}toString(){return w(this,v,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=w(this,v,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...w(this,v,"f").attributes].forEach((t=>w(this,v,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>w(this,v,"f").setAttribute(t.name,t.value))),w(this,v,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return v=new WeakMap,e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Nucleobase:()=>Dn,SavableNucleobase:()=>Bn,SavedNucleobase:()=>Yn});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Te,move:()=>Ee,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function T(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function A(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=A;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=T(t)).before(this),this},insertAfter:function(t){return(t=T(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:v.x,ry:v.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=T().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return A(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=T(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=T(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}D(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=T(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return T(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=T(t),this.add(t,e),t}putIn(t,e){return T(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=T(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=T(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?T(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Tt extends Pt{flatten(){return this.each((function(){if(this instanceof Tt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(Tt,"Container");class Et extends Tt{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class At extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(At,"Shape");class Vt extends At{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends Tt{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends Tt{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends Tt{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?ve:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends At{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Te(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=ve,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new ve)}))}}),D(Pe,"Path");class De extends At{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends At{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends At{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends vt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends Tt{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends Tt{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends At{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends At{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends At{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends Tt{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends Tt{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends Tt{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends Tt{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=ve,D(Nn,"TextPath");class Tn extends At{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new Tn).use(t,e)}))}}),D(Tn,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(vt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(At,c("Shape")),I([Tt,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,ve,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),An=n(731),jn=n(986);class Dn{static create(t){let e=document.createElementNS("http://www.w3.org/2000/svg","text");e.textContent=t;let n=new Dn(e);return n.assignUUID(),n.setAttributes(Dn.defaultAttributes),n}constructor(t){this.textElement=t,this.centerPoint=new An.CenterPoint(t)}get domNode(){return this.textElement}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}bringToFront(){(0,En.bringToFront)(this.domNode)}sendToBack(){(0,En.sendToBack)(this.domNode)}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){try{new hn(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,En.assignUUID)(this.domNode)}get textContent(){return this.domNode.textContent}set textContent(t){this.domNode.textContent=t}get bbox(){return this.domNode.getBBox()}getCenterPoint(){return this.centerPoint}setCenterPoint(t){this.centerPoint.x=t.x,this.centerPoint.y=t.y}maintainingCenterPoint(t){let{x:e,y:n}=this.centerPoint;t(),this.centerPoint.x=e,this.centerPoint.y=n}get boundingClientRect(){return this.domNode.getBoundingClientRect()}get centerClientPoint(){let t=this.domNode.getBoundingClientRect();return{x:(0,jn.mean)([t.left,t.right]),y:(0,jn.mean)([t.top,t.bottom])}}getCenterClientPoint(){return this.centerClientPoint}}Dn.defaultAttributes={"font-family":"Arial","font-size":"9","font-weight":"700"},Dn.defaultAttributeNames=["font-family","font-size","font-weight"];var kn,Ln=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Bn{constructor(t){kn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,kn,t)}toJSONSerializable(){if(!Ln(this,kn,"f").id)throw new Error("Nucleobase has a falsy ID.");return{id:Ln(this,kn,"f").id}}}kn=new WeakMap;var In,Fn,Rn,Vn,zn,qn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Xn=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Yn{constructor(t,e){In.add(this),Fn.set(this,void 0),Rn.set(this,void 0),qn(this,Fn,t,"f"),qn(this,Rn,e,"f")}recreate(){return new Dn(Xn(this,In,"a",zn))}}Fn=new WeakMap,Rn=new WeakMap,In=new WeakSet,Vn=function(){let t=Xn(this,Fn,"f").id;if(t=null!=t?t:Xn(this,Fn,"f").textId,!t)throw new Error("Unable to find nucleobase ID.");if("string"!=typeof t)throw new Error("Nucleobase ID is not a string.");return t},zn=function(){let t=Xn(this,In,"a",Vn),e=Xn(this,Rn,"f").domNode.querySelector(`#${t}`);if(!e)throw new Error(`No DOM node in the drawing has the nucleobase ID "${t}".`);if(!(e instanceof SVGTextElement))throw new Error(`The DOM node with ID "${t}" is not an SVG text element.`);return e}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>d,InnerXML:()=>b,OuterXML:()=>x,Scaling:()=>c,VerticalClientScaling:()=>f,assignUUID:()=>h,bringToFront:()=>p,sendToBack:()=>m});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));const u=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=i[a];return e}return function(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+u()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class c{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class d{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function p(t){let e=t.parentNode;e&&e.appendChild(t)}function m(t){let e=t.parentNode;e&&e.prepend(t)}var g,y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){g.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,g,t)}toString(){return y(this,g,"f").innerHTML}set(t){y(this,g,"f").innerHTML=t}}g=new WeakMap;var v,w=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class x{constructor(t){v.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,v,t)}toString(){return w(this,v,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=w(this,v,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...w(this,v,"f").attributes].forEach((t=>w(this,v,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>w(this,v,"f").setAttribute(t.name,t.value))),w(this,v,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return v=new WeakMap,e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BaseOutline:()=>In.BaseOutline,DotBracketDrawer:()=>Kn,Drawing:()=>$n,Nucleobase:()=>An.Nucleobase,SchemaDrawer:()=>ir,StraightBond:()=>qn.StraightBond});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>Dt,width:()=>Ft,x:()=>kt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Yt});var i={};n.r(i),n.d(i,{MorphArray:()=>Qt,height:()=>te,width:()=>Zt,x:()=>Jt,y:()=>Kt});var s={};n.r(s),n.d(s,{array:()=>Ne,clear:()=>Te,move:()=>Ee,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Je,move:()=>tn,plain:()=>Qe,x:()=>Ke,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>_n});const u={},h=[];function l(t,e){if(Array.isArray(t))for(const n of t)l(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)l(e,t[e])}function c(t){return u[t]||{}}function d(t){h.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",_="http://www.w3.org/2000/xmlns/",S="http://www.w3.org/1999/xlink",M={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class O{}const C={},P="___SYMBOL___ROOT___";function N(t,e=x){return M.document.createElementNS(e,t)}function T(t,e=!1){if(t instanceof O)return t;if("object"==typeof t)return j(t);if(null==t)return new C[P];if("string"==typeof t&&"<"!==t.charAt(0))return j(M.document.querySelector(t));const n=e?M.document.createElement("div"):N("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function E(t,e){return e&&(e instanceof M.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:N(t)}function A(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new C.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":C[e]||(e="Dom"),new C[e](t)}let j=A;function D(t,e=t.name,n=!1){return C[e]=t,n&&(C[P]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let k=1e3;function L(t){return"Svgjs"+m(t)+k++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=T(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=T(t)).before(this),this},insertAfter:function(t){return(t=T(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,z=/rgb\((\d+),(\d+),(\d+)\)/,q=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,Y=/\s/g,G=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,$=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,W=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),l("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(G.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new et(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(Y,""),[n,r,i]=z.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!G.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(K);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:v.x,ry:v.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Pt?t.matrixify():"string"==typeof t?it.fromArray(t.split(Q).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=T().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=M.document.body||M.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}D(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=M.window.pageXOffset,this.y+=M.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==M.document&&!(M.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===M.document}).call(M.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}l({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const h=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(h)}}}),D(at,"Box");class ht extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const lt=ht;I([ht],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ct=["toArray","constructor","each"];function dt(t,e){return new lt(f((e||M.document).querySelectorAll(t),(function(t){return A(t)})))}ht.extend=function(t){t=t.reduce(((t,e)=>(ct.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ht],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===M.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=T(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(Q),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=T(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Q)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])bt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===M.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends O{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof M.window.Event||(e=new M.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}D(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _t extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class St{constructor(...t){this.init(...t)}convert(t){return new St(this.value,t)}divide(t){return t=new St(t),new St(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof St&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new St(t),new St(this-t,this.unit||t.unit)}plus(t){return t=new St(t),new St(this+t,this.unit||t.unit)}times(t){return t=new St(t),new St(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ot=[];class Ct extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=T(t)).removeNamespace&&this.node instanceof M.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return T(t).put(this,e)}children(){return new lt(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Ct(N(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=T(t),this.add(t,e),t}putIn(t,e){return T(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=T(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=N("wrapper",n),i=M.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Ct,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=$.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:$.test(e)?parseFloat(e):e;"number"==typeof(e=Ot.reduce(((e,n)=>n(t,e,this)),e))?e=new St(e):Mt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new _t(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),D(Ct,"Dom");class Pt extends Ct{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new St(t).plus(this.x()))}dy(t=0){return this.y(new St(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=T(t));const n=new lt;let r=this;for(;(r=r.parent())&&r.node!==M.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(q);return e?T(e[1]):null}root(){const t=this.parent(C[P]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new St(n.width)).height(new St(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Pt,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),D(Pt,"Element");const Nt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Pt)this.attr(t,e);else for(n=Nt[t].length-1;n>=0;n--)null!=e[Nt[t][n]]&&this.attr(Nt.prefix(t,Nt[t][n]),e[Nt[t][n]]);return this},l(["Element","Runner"],e)})),l(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new St(t)):this.rx(t).ry(e)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Tt extends Pt{flatten(){return this.each((function(){if(this instanceof Tt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}D(Tt,"Container");class Et extends Tt{constructor(t,e=t){super(E("defs",t),e)}flatten(){return this}ungroup(){return this}}D(Et,"Defs");class At extends Pt{}function jt(t){return this.attr("rx",t)}function Dt(t){return this.attr("ry",t)}function kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new St(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new St(t).divide(2))}D(At,"Shape");class Vt extends At{constructor(t,e=t){super(E("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new St(n.width).divide(2)).ry(new St(n.height).divide(2))}}I(Vt,t),l("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),D(Vt,"Ellipse");class zt extends Ct{constructor(t=M.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ct(N("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}D(zt,"Fragment");const qt=zt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new St(t),fy:new St(e)}):this.attr({x1:new St(t),y1:new St(e)})}function Yt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new St(t),cy:new St(e)}):this.attr({x2:new St(t),y2:new St(e)})}class Gt extends Tt{constructor(t,e){super(E(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Gt,e),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Gt(t)).update(e)}))}}),D(Gt,"Gradient");class Ht extends Tt{constructor(t,e=t){super(E("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),D(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(E("image",t),e)}load(t,e){if(!t)return this;const n=new M.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,S)}}var $t;$t=function(t,e,n){return"fill"!==t&&"stroke"!==t||W.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ot.push($t),l({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),D(Ut,"Image");class Wt extends _t{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Qt=Wt;function Jt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Kt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(E("line",t),e)}array(){return new Wt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Wt(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),l({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),D(ee,"Line");class ne extends Tt{constructor(t,e=t){super(E("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),D(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const he={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split("");for(let t=0,e=ce.length;t<e;++t)le[ce[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return le[t](e,n,r)}}(ce[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===he[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=J.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return le[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends _t{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?St:"string"===e?et.isColor(t)?et:Q.test(t)?J.test(t)?ve:_t:R.test(t)?St:_e:Ce.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_t:"object"===e?Oe:_e};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Oe&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class _e{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Se{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Se.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Se.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Me=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Oe{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Me),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ce=[_e,Se,Oe];class Pe extends At{constructor(t,e=t){super(E("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ne(){return this._array||(this._array=new Wt(this.attr("points")))}function Te(){return delete this._array,this}function Ee(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Wt(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Pe.prototype.MorphArray=ve,l({Container:{path:F((function(t){return this.put(new Pe).plot(t||new ve)}))}}),D(Pe,"Path");class De extends At{constructor(t,e=t){super(E("polygon",t),e)}}l({Container:{polygon:F((function(t){return this.put(new De).plot(t||new Wt)}))}}),I(De,i),I(De,s),D(De,"Polygon");class ke extends At{constructor(t,e=t){super(E("polyline",t),e)}}l({Container:{polyline:F((function(t){return this.put(new ke).plot(t||new Wt)}))}}),I(ke,i),I(ke,s),D(ke,"Polyline");class Le extends At{constructor(t,e=t){super(E("rect",t),e)}}I(Le,{rx:jt,ry:Dt}),l({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),D(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>M.window.performance||M.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=M.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?M.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=M.window;return(t.performance||t.Date).now()};class ze extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ze,this._timeline):(this._timeline=t,this)}}});class qe extends vt{constructor(t){super(),this.id=qe.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=qe.sanitise(t,e,n),i=new qe(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ze||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}qe.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([qe,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ye=(t,e)=>t.lmultiplyO(e),Ge=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ge).reduce(Ye,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}l({Element:{animate(t,e,n){const r=qe.sanitise(t,e,n),i=this.timeline();return new qe(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ge).reduce(Ye,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Oe(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Oe(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new St(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?Se:it);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||y(t,o),h=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new St(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new St(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new St(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(qe,{rx:jt,ry:Dt,from:Xt,to:Yt}),D(qe,"Runner");class $e extends Tt{constructor(t,e=t){super(E("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Et):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof M.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",S,_):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,_).attr("xmlns:svgjs",null,_)}root(){return this.isRoot()?this:super.root()}}l({Container:{nested:F((function(){return this.put(new $e)}))}}),D($e,"Svg",!0);class We extends Tt{constructor(t,e=t){super(E("symbol",t),e)}}function Qe(t){return!1===this._build&&this.clear(),this.node.appendChild(M.document.createTextNode(t)),this}function Je(){return this.node.getComputedTextLength()}function Ke(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}l({Container:{symbol:F((function(){return this.put(new We)}))}}),D(We,"Symbol");class hn extends At{constructor(t,e=t){super(E("text",t),e),this.dom.leading=this.dom.leading??new St(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new St(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new St(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new St(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(hn,o),l({Container:{text:F((function(t=""){return this.put(new hn).text(t)})),plain:F((function(t=""){return this.put(new hn).plain(t)}))}}),D(hn,"Text");class ln extends At{constructor(t,e=t){super(E("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof hn))return this;const e=t.index(this),n=M.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new St(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,o),l({Tspan:{tspan:F((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),D(ln,"Tspan");class cn extends At{constructor(t,e=t){super(E("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new St(t).divide(2))}}I(cn,{x:kt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),l({Container:{circle:F((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),D(cn,"Circle");class dn extends Tt{constructor(t,e=t){super(E("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}l({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),D(dn,"ClipPath");class fn extends Pt{constructor(t,e=t){super(E("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof M.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function _n(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}l({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),D(fn,"ForeignObject");class Sn extends Tt{constructor(t,e=t){super(E("g",t),e)}}I(Sn,a),l({Container:{group:F((function(){return this.put(new Sn)}))}}),D(Sn,"G");class Mn extends Tt{constructor(t,e=t){super(E("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,S)}}I(Mn,a),l({Container:{link:F((function(t){return this.put(new Mn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Mn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),D(Mn,"A");class On extends Tt{constructor(t,e=t){super(E("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}l({Container:{mask:F((function(){return this.defs().put(new On)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof On?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),D(On,"Mask");class Cn extends Pt{constructor(t,e=t){super(E("stop",t),e)}update(t){return("number"==typeof t||t instanceof St)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new St(t.offset)),this}}l({Gradient:{stop:function(t,e,n){return this.put(new Cn).update(t,e,n)}}}),D(Cn,"Stop");class Pn extends Pt{constructor(t,e=t){super(E("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}l("Dom",{style(t,e){return this.put(new Pn).rule(t,e)},fontface(t,e,n){return this.put(new Pn).font(t,e,n)}}),D(Pn,"Style");class Nn extends hn{constructor(t,e=t){super(E("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}l({Container:{textPath:F((function(t,e){return t instanceof hn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Nn;let r;if(t instanceof Pe||(t=this.defs().path(t)),n.attr("href","#"+t,S),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof hn||(t=(new hn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Nn.prototype.MorphArray=ve,D(Nn,"TextPath");class Tn extends At{constructor(t,e=t){super(E("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,S)}}l({Container:{use:F((function(t,e){return this.put(new Tn).use(t,e)}))}}),D(Tn,"Use"),I([$e,We,Ut,Ht,ne],c("viewbox")),I([ee,ke,De,Pe],c("marker")),I(hn,c("Text")),I(Pe,c("Path")),I(Et,c("Defs")),I([hn,ln],c("Tspan")),I([Le,Vt,Gt,qe],c("radius")),I(vt,c("EventTarget")),I(Ct,c("Dom")),I(Pt,c("Element")),I(At,c("Shape")),I([Tt,qt],c("Container")),I(Gt,c("Gradient")),I(qe,c("Runner")),lt.extend([...new Set(h)]),function(t=[]){Ce.push(...[].concat(t))}([St,et,at,it,_t,Wt,ve,nt]),I(Ce,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var En=n(726),An=n(358);class jn{constructor(t,e){this.svgDoc=t,this.elements=e,new MutationObserver((t=>{t.some((t=>t.removedNodes.length>0))&&(this.elements=this.elements.filter((t=>this.svgDoc.contains(t.domNode))))})).observe(t,{childList:!0,subtree:!0})}}class Dn{constructor(t,e){this.svgDoc=t,this.elementsDrawing=new jn(t,e)}get bases(){return this.elementsDrawing.elements}append(t){t.appendTo(this.svgDoc),this.bases.push(t)}add(t){let e=An.Nucleobase.create(t);return this.append(e),e}}var kn,Ln,Bn,In=n(775),Fn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Rn=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Vn{constructor(t){this.domNode=t,kn.set(this,void 0),Ln.set(this,void 0),Fn(this,kn,new jn(t,[]),"f"),Fn(this,Ln,new MutationObserver((()=>{this.elements.forEach((t=>{this.domNode.contains(t.owner.domNode)||t.domNode.remove()}))})),"f"),Rn(this,Ln,"f").observe(t,{childList:!0,subtree:!0})}get elements(){return Rn(this,kn,"f").elements}}kn=new WeakMap,Ln=new WeakMap;class zn{constructor(t){this.domNode=t,Bn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Bn,new Vn(t))}get baseOutlines(){return function(t,e){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}(this,Bn).elements}append(t){this.domNode.append(t.domNode),this.baseOutlines.push(t)}outline(t){let e=document.createElementNS("http://www.w3.org/2000/svg","circle"),n=new In.BaseOutline(e,t);return t.domNode.insertAdjacentElement("beforebegin",n.domNode),this.baseOutlines.push(n),n}}Bn=new WeakMap;var qn=n(282);class Xn{constructor(t,e){this.svgDoc=t,this.elementsDrawing=new jn(t,e),new MutationObserver((()=>{this.bonds.forEach((t=>{this.svgDoc.contains(t.base1.domNode)&&this.svgDoc.contains(t.base2.domNode)||t.remove()}))})).observe(t,{childList:!0,subtree:!0})}get bonds(){return this.elementsDrawing.elements}set bonds(t){this.elementsDrawing.elements=t}}class Yn{constructor(t,e){this.svgDoc=t,this.primaryBondDefaultValues={attributes:{stroke:"#808080","stroke-width":"1"},basePadding1:6,basePadding2:6},this.bondsDrawing=new Xn(t,e)}get primaryBonds(){return this.bondsDrawing.bonds}set primaryBonds(t){this.bondsDrawing.bonds=t}append(t){t.appendTo(this.svgDoc),this.primaryBonds.push(t)}add(t,e){let n=qn.StraightBond.between(t,e);return n.set(this.primaryBondDefaultValues),this.append(n),n}}class Gn{constructor(t,e){this.svgDoc=t,this.secondaryBondDefaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6},this.bondsDrawing=new Xn(t,e)}get secondaryBonds(){return this.bondsDrawing.bonds}set secondaryBonds(t){this.bondsDrawing.bonds=t}append(t){t.appendTo(this.svgDoc),this.secondaryBonds.push(t)}add(t,e){let n=qn.StraightBond.between(t,e);return n.set(this.secondaryBondDefaultValues),this.append(n),n}}var Hn,Un=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class $n{constructor(){Hn.set(this,void 0),this.domNode=(new $e).node,this.domNode.setAttribute("viewBox","0 0 250 250"),this.domNode.setAttribute("width","250"),this.domNode.setAttribute("height","250"),this.basesDrawing=new Dn(this.domNode,[]),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Hn,new zn(this.domNode)),this.primaryBondsDrawing=new Yn(this.domNode,[]),this.secondaryBondsDrawing=new Gn(this.domNode,[])}get outerXML(){return this.domNode.outerHTML}get innerXML(){return this.domNode.innerHTML}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}get minX(){return this.domNode.viewBox.baseVal.x}set minX(t){let e=this.maxX-t,n=this.horizontalScaling;this.domNode.setAttribute("viewBox",`${t} ${this.minY} ${e} ${this.height}`),this.domNode.setAttribute("width",(n*e).toString())}get maxX(){return this.minX+this.width}set maxX(t){let e=t-this.minX,n=this.horizontalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${this.minY} ${e} ${this.height}`),this.domNode.setAttribute("width",(n*e).toString())}get minY(){return this.domNode.viewBox.baseVal.y}set minY(t){let e=this.maxY-t,n=this.verticalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${t} ${this.width} ${e}`),this.domNode.setAttribute("height",(n*e).toString())}get maxY(){return this.minY+this.height}set maxY(t){let e=t-this.minY,n=this.verticalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${this.minY} ${this.width} ${e}`),this.domNode.setAttribute("height",(n*e).toString())}setBoundaries({minX:t,maxX:e,minY:n,maxY:r}){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}get width(){return this.domNode.viewBox.baseVal.width}set width(t){this.maxX=this.minX+t}get height(){return this.domNode.viewBox.baseVal.height}set height(t){this.maxY=this.minY+t}get horizontalScaling(){let t=this.width;return this.domNode.width.baseVal.value/t}set horizontalScaling(t){let e=this.width;this.domNode.setAttribute("width",(t*e).toString())}get verticalScaling(){let t=this.height;return this.domNode.height.baseVal.value/t}set verticalScaling(t){let e=this.height;this.domNode.setAttribute("height",(t*e).toString())}setScaling(t){this.horizontalScaling=t,this.verticalScaling=t}get horizontalClientScaling(){return new En.HorizontalClientScaling(this.domNode).get()}get verticalClientScaling(){return new En.VerticalClientScaling(this.domNode).get()}get bases(){return this.basesDrawing.bases}appendBase(t){this.basesDrawing.append(t)}addBase(t){return this.basesDrawing.add(t)}get baseOutlines(){return Un(this,Hn,"f").baseOutlines}outlineBase(t){return Un(this,Hn,"f").outline(t)}appendBaseOutline(t){Un(this,Hn,"f").append(t)}get primaryBondDefaultValues(){return this.primaryBondsDrawing.primaryBondDefaultValues}set primaryBondDefaultValues(t){this.primaryBondsDrawing.primaryBondDefaultValues=t}get primaryBonds(){return this.primaryBondsDrawing.primaryBonds}set primaryBonds(t){this.primaryBondsDrawing.primaryBonds=[...t]}appendPrimaryBond(t){this.primaryBondsDrawing.append(t)}addPrimaryBond(t,e){return this.primaryBondsDrawing.add(t,e)}get secondaryBondDefaultValues(){return this.secondaryBondsDrawing.secondaryBondDefaultValues}set secondaryBondDefaultValues(t){this.secondaryBondsDrawing.secondaryBondDefaultValues=t}get secondaryBonds(){return this.secondaryBondsDrawing.secondaryBonds}set secondaryBonds(t){this.secondaryBondsDrawing.secondaryBonds=[...t]}appendSecondaryBond(t){this.secondaryBondsDrawing.append(t)}addSecondaryBond(t,e){return this.secondaryBondsDrawing.add(t,e)}get contentBBox(){return this.domNode.getBBox()}setPadding(t){let e=this.contentBBox;this.setBoundaries({minX:e.x-t,maxX:e.x+e.width+t,minY:e.y-t,maxY:e.y+e.height+t})}}Hn=new WeakMap;var Wn=n(127),Qn=n(661),Jn=n(986);class Kn{constructor(t){this.targetDrawing=t}draw(t,e){let n=[...t].map((t=>this.targetDrawing.addBase(t)));(0,Wn.consecutivePairs)(n).forEach((t=>this.targetDrawing.addPrimaryBond(...t)));let r=[...(0,Wn.parseDotBracket)(n,e)];r.forEach((t=>this.targetDrawing.addSecondaryBond(...t))),n.forEach((t=>t.bringToFront()));let i=1.87*(0,Jn.mean)(n.map((t=>t.bbox.height)));(0,Qn.radialize)(n,r,{spacing:i,basePairSpacing:i/2,hairpinLoopSpacing:i/2})}}var Zn,tr,er,nr,rr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class ir{constructor(t){Zn.add(this),tr.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,tr,t)}draw(t){t.rnaComplexes.forEach((e=>{e.rnaMolecules.forEach((e=>{let n=e.sequence.map((e=>rr(this,Zn,"m",er).call(this,e,t))),r=(0,Jn.mean)(n.map((t=>t.bbox.height)));rr(this,tr,"f").primaryBondDefaultValues.attributes["stroke-width"]=""+.125*r,rr(this,tr,"f").primaryBondDefaultValues.basePadding1=.6*r,rr(this,tr,"f").primaryBondDefaultValues.basePadding2=.6*r,(0,Wn.consecutivePairs)(n).forEach((t=>rr(this,tr,"f").addPrimaryBond(...t))),rr(this,tr,"f").secondaryBondDefaultValues.attributes["stroke-width"]=""+.15*r,rr(this,tr,"f").secondaryBondDefaultValues.basePadding1=.5*r,rr(this,tr,"f").secondaryBondDefaultValues.basePadding2=.5*r,new Set(e.basePairs.map((t=>JSON.stringify(t)))).forEach((e=>rr(this,Zn,"m",nr).call(this,JSON.parse(e),n,t)))}))}))}}tr=new WeakMap,Zn=new WeakSet,er=function(t,e){let n=rr(this,tr,"f").addBase(t.residueName);return t.classes.forEach((t=>{e.classes.filter((e=>e.name==t)).forEach((t=>n.setAttributes(Object.assign(Object.assign({},t),{name:void 0}))))})),n.centerPoint.x=t.x,n.centerPoint.y=t.y,n},nr=function(t,e,n){let r=e[t.residueIndex1],i=e[t.residueIndex2],s=rr(this,tr,"f").addSecondaryBond(r,i);return t.classes.forEach((t=>{n.classes.filter((e=>e.name==t)).forEach((t=>s.setAttributes(Object.assign(Object.assign({},t),{name:void 0}))))})),s}})(),r})(),t.exports=e()},628:function(t){var e;e=()=>(()=>{var t={661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>l,PositionPairs:()=>t,Stems:()=>h,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>c,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function c(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,h=Math.PI*a/2,l=Math.abs(i-h)<.001;this.wrappedCircularSegment=u||l?new e(n):i<h?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},456:function(t){var e;e=()=>(()=>{var t={277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}get direction(){return Math.atan2(this.y,this.x)}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Point:()=>e,RelativePoint:()=>l});var t=n(277);class e{static matching(t){return new e(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}displacementTo(e){return new t.Vector(e.x-this.x,e.y-this.y)}displacementFrom(e){return new t.Vector(this.x-e.x,this.y-e.y)}distanceTo(t){return this.displacementTo(t).magnitude}distanceFrom(t){return this.distanceTo(t)}directionTo(t){return this.displacementTo(t).direction}directionFrom(t){return this.displacementFrom(t).direction}}var i,s,o,a,u,h=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class l{constructor(e){i.add(this),s.set(this,void 0),o.set(this,new t.Vector(0,0)),a.set(this,{move:[]}),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,s,e),e.addEventListener("move",(()=>h(this,i,"m",u).call(this,"move")))}get x(){return h(this,s,"f").x+h(this,o,"f").x}set x(t){h(this,o,"f").x=t-h(this,s,"f").x,h(this,i,"m",u).call(this,"move")}get y(){return h(this,s,"f").y+h(this,o,"f").y}set y(t){h(this,o,"f").y=t-h(this,s,"f").y,h(this,i,"m",u).call(this,"move")}addEventListener(t,e){h(this,a,"f")[t].push(e)}removeEventListener(t,e){h(this,a,"f")[t]=h(this,a,"f")[t].filter((t=>t!==e))}}s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,u=function(t){h(this,a,"f")[t].forEach((t=>t()))}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&t.every(n)}function d(t){return l(t)&&t.every(r)}function f(t){return l(t)&&t.every(i)}function p(t){return l(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>c,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>h,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>c,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function h(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function l(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function c(t){var e=l(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!c([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){c(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=l(r);if(!c(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>l,MinCenterX:()=>a,MinCenterY:()=>h,NucleobaseMock:()=>t,arrange:()=>C,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>F,rotate:()=>d,round:()=>S,shift:()=>e,stemmify:()=>w,straighten:()=>v});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class l{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var c=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,c.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,c.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),h={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(h)}function v(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,c.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),h=a*Math.sin(o),{x:l,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:l,y:d}),l+=u,d+=h}))}function w(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),h=t.slice(a),l=new s(t),{x:c,y:p}=l.get(),m={x:c,y:p},g=new f(t).get();b(u,{spacing:o}),b(h,{spacing:o}),new f(u).set(-Math.PI/2),new f(h).set(Math.PI/2);let y=t[0],v=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(h,(0,i.displacement)(v.getCenterPoint(),{x:r,y:0})),d(t,g),l.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,h=a,l=new f(t).get(),c=n*(t.length-1);c+=r,Math.abs(c)<1e-5&&(c=1e-5);let p=c/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/c);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/c;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,l),i.set({x:u,y:h})}var _=n(173);function S(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),h=r*(t.length-1);if(h-u<.001)return void v(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let l=new _.CircularSegment(a,{arcLength:h}),d=l.parentCircleCenterPoint,f=l.parentCircleRadius,p=(0,c.direction)((0,i.displacement)(d,s.getCenterPoint())),m=l.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var M=n(127),O=n(369);function C(t,n,r){var a,u,h;let{spacing:l}=r,c=null!==(a=r.basePairSpacing)&&void 0!==a?a:l,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:l,p=null!==(h=r.terminiGap)&&void 0!==h?h:l,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,M.knotless)(t,n);let v=new M.PositionPairs(t,n).get(),_=(0,O.mountainPlotTraversal)(t,v),C=t.filter(((t,e)=>0==_[e]));x(C,{spacing:l,terminiGap:p});let P=new M.Stems(t,n).get(),N=new Set(C),T=P.filter((t=>N.has(t[0][0]))),E=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),h={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];w(m,{basePairLength:l,basePairSpacing:c}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),h));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&_[e]==_[(0,o.min)(y)]+1)),v=new Set(b),x=P.filter((t=>v.has(t[0][0])));S([g[0],...b,g[1]],{spacing:x.length>0?l:d}),x.forEach((t=>E(t)))};T.forEach((t=>E(t))),new f(t).set(b),new s(t).set(y)}var P=n(456);class N{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class T{static of(...t){let[e,n]=t,r=new M.PositionPairs(...t).get();r=(0,O.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class E{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=T.of(...t),this.positionPairs=new M.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class A{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class j{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],h=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>h,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=P.Point.matching(a.getCenterPoint());w(h,{basePairLength:n,basePairSpacing:r}),e(h,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class D{static in(t){return{[Symbol.iterator]:()=>new M.Stems(t.sequence,t.basePairs).get().map((t=>j.composedOf(t))).values()}}}class k{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),h=N.from(a).to(u).inclusive(),l=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),c=h.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(h.map((t=>o.mountainPlotTraversal[t]))).size&&!l;return{[Symbol.iterator]:()=>t.values(),indices:h,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=P.Point.matching(r.getCenterPoint());w(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>l,isInOutermostLoop:()=>c,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;S(t,{spacing:n})}})}}}}}class L{static in(t){let e=new M.Linkers(t.sequence,t.basePairs).get().map((e=>k.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class B{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=A.correspondingTo(s).in(r),u=(0,o.min)(a),h=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),l=h.map((t=>r.sequence.indexOf(t))),c=h.filter((t=>r.pairedBases.has(t))),d=l.filter((t=>r.pairedIndices.has(t))),f=[s[0],...h,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:h,enclosedIndices:l,enclosedPairedBases:c,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),h=r.sequence.filter(((t,e)=>e>=n&&e<=u&&l.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>h.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:l}=r,c=(0,o.max)([h.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=N.from(1).to(c).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=P.Point.matching(s[0].getCenterPoint());x([s[0],...d,...h,...f,s[1]],{spacing:l,terminiGap:l}),e([...s,...h],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class I{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function F(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new E(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let h=P.Point.matching(new s(t).get()),l=new f(t).get(),c=D.in(u),d=L.in(u);x([...I.of(u)],{spacing:i,terminiGap:2*i});let p=[...c].map((t=>B.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&S(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(l),new s(t).set(h)}})(),r})(),t.exports=e()},139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),h=n.n(u),l=n(56),c=n.n(l),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=c(),y.insert=h().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetForm)return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>l,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>c,isBetweenInclusive:()=>l,max:()=>h,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function h(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function l(t,e,n){return t>=e&&t<=n}function c(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>c,displaced:()=>h,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function h(t,e){return{x:t.x+e.x,y:t.y+e.y}}var l=n(30);function c(t,e){return(0,l.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}function c(t){return l(t)&&0==t.length}function d(t){return l(t)&&t.length>0}function f(t){return l(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return l(t)&&t.every(r)}function g(t){return l(t)&&t.every(i)}function y(t){return l(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>l,isEmptyArray:()=>c,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()},660:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>l,JI:()=>h,nn:()=>a,t0:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".jw6xcAPwHpTbyf4_SKFC {\n margin-top: 29px;\n\n display: block;\n}\n\n.QEOfY8APPfT4dMtiFt6o {\n position: absolute;\n\n top: 54px;\n right: 82px;\n left: 66px;\n bottom: 60px;\n\n max-width: 311px;\n max-height: 553px;\n margin-right: auto;\n\n overflow: auto;\n\n border: 1px solid #2b0744;\n border-radius: 15px;\n box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.06);\n\n padding: 20px 0px 50px 32px;\n\n background-color: #f0f0ffc2;\n\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n}\n\n.kK_MqLhOkyrKMi9h7UXg .jw6xcAPwHpTbyf4_SKFC {\n display: none;\n}\n",""]);var a="jw6xcAPwHpTbyf4_SKFC",u="QEOfY8APPfT4dMtiFt6o",h="kK_MqLhOkyrKMi9h7UXg";const l=o},667:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,ML:()=>a,W5:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.WNihwtKaVrQbyLljtVy7 {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.X9F4MxqBx1g11R__XpPF {\n margin-left: 10px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n}\n',""]);var a="WNihwtKaVrQbyLljtVy7",u="X9F4MxqBx1g11R__XpPF";const h=o},882:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,b:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.QNds0QB68pNSdkS6_VtA {\n position: absolute;\n top: 13px;\n right: 17px;\n\n border: none;\n outline: none;\n\n padding: 3px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 16px;\n font-weight: 600;\n font-style: normal;\n color: #871414;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n background-color: transparent;\n}\n\n.QNds0QB68pNSdkS6_VtA:hover {\n background-color: #cab8d99c;\n}\n\n.QNds0QB68pNSdkS6_VtA:active {\n background-color: #aa8eba9e;\n}\n',""]);var a="QNds0QB68pNSdkS6_VtA";const u=o},95:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,k:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.yjbAlhImuUj51RJfDTzk {\n margin: 0px;\n\n border: none;\n\n padding: 4px 32px 4px 32px;\n border-radius: 2px;\n\n /* use before pseudo-element for background */\n background-color: transparent;\n position: relative;\n isolation: isolate;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.yjbAlhImuUj51RJfDTzk::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 2px;\n background-color: #0d0d82;\n box-shadow: 0 3px 3px rgba(213, 213, 255, 0.53);\n\n z-index: -1;\n}\n\n.yjbAlhImuUj51RJfDTzk:focus {\n outline: none;\n}\n\n.yjbAlhImuUj51RJfDTzk:hover::before {\n transform: scale(1.05);\n transition: transform 0.1s;\n}\n\n.yjbAlhImuUj51RJfDTzk:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="yjbAlhImuUj51RJfDTzk";const u=o},284:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,oP:()=>a,ps:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.giz4k0bsvRVjGqUbFrnw {\n margin-right: 1px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n}\n\n.KCO7RYM2lfygb0mgKjM2 {\n margin-top: 22px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n',""]);var a="giz4k0bsvRVjGqUbFrnw",u="KCO7RYM2lfygb0mgKjM2";const h=o},7:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,w:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.sAvvpQVOUFp11iP_95M9 {\n margin-top: 13px;\n margin-bottom: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 26px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n /**\n * So that the form can be dragged around while clicking on top of the header.\n */\n pointer-events: none;\n}\n',""]);var a="sAvvpQVOUFp11iP_95M9";const u=o},645:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,E:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.CUlsdtuZC4HUi_TGFoTy {\n margin: 0px;\n\n border: none;\n\n padding: 4px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: #06064a;\n\n background-color: rgba(219, 219, 255, 0.9);\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.CUlsdtuZC4HUi_TGFoTy:hover {\n background-color: rgba(175, 175, 255, 0.92);\n}\n\n.CUlsdtuZC4HUi_TGFoTy:active {\n background-color: rgba(147, 147, 255, 0.92);\n}\n\n.CUlsdtuZC4HUi_TGFoTy:focus {\n outline: none;\n}\n',""]);var a="CUlsdtuZC4HUi_TGFoTy";const u=o},501:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>d,D:()=>a,Ik:()=>l,Qs:()=>h,ho:()=>c,wx:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.ygDsd40iuV10Vt4ZbW_H {}\n\n.zq0Gcw10IK1yZ0jthmnv {\n margin: 0px;\n\n border: none;\n box-shadow: none;\n outline: none;\n\n padding: 0px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n background-color: transparent;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n text-decoration: none;\n}\n\n.zq0Gcw10IK1yZ0jthmnv:hover {\n text-decoration: underline;\n}\n\n.MTO3k3FJDGjcG1x6BN2J {\n margin: 10px 0px 0px 12px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: 6px;\n\n visibility: collapse;\n max-height: 0px;\n}\n\n.KwtC5QHDvQB26eEDDLhN {\n margin-top: 30px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n}\n\n.mgMgtND1gJZ5ghlkd5La .MTO3k3FJDGjcG1x6BN2J {\n visibility: visible;\n max-height: none;\n}\n\n.mgMgtND1gJZ5ghlkd5La .ygDsd40iuV10Vt4ZbW_H {\n transform: rotate(90deg);\n}\n',""]);var a="ygDsd40iuV10Vt4ZbW_H",u="zq0Gcw10IK1yZ0jthmnv",h="MTO3k3FJDGjcG1x6BN2J",l="KwtC5QHDvQB26eEDDLhN",c="mgMgtND1gJZ5ghlkd5La";const d=o},592:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,JU:()=>u,bw:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.FTmP1CyPvejRjLRIPReA {\n font-weight: 700;\n color: black;\n}\n\n.eVQFFR1fsbH0AJeSXW8h {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: #1b1b1c;\n\n user-select: none;\n -webkit-user-select: none;\n}\n',""]);var a="FTmP1CyPvejRjLRIPReA",u="eVQFFR1fsbH0AJeSXW8h";const h=o},213:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,O:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,".XewFrRrRMBKmyTamv1OX {\n margin-left: 16px;\n\n border: none;\n border-radius: 4px;\n box-shadow: 0px 0px 10px #d4d4dd;\n\n outline: none;\n\n width: 32px;\n height: 32px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n background-color: black;\n\n cursor: grab;\n\n pointer-events: auto;\n}\n\n.XewFrRrRMBKmyTamv1OX:hover {\n background-color: #404044;\n}\n\n.XewFrRrRMBKmyTamv1OX:active {\n background-color: #77777d;\n\n cursor: grabbing;\n}\n",""]);var a="XewFrRrRMBKmyTamv1OX";const u=o},61:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.UmFu1UlOQFScjilAm6UG {\n border: 1px solid #75758c;\n border-radius: 2px;\n\n outline: none;\n\n width: 78px;\n\n padding: 3px 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n pointer-events: auto;\n}\n\n.UmFu1UlOQFScjilAm6UG:hover {\n border-color: #0a0a0b;\n}\n\n.UmFu1UlOQFScjilAm6UG:focus {\n border-color: #0a0a0b;\n\n outline: none;\n}\n',""]);var a="UmFu1UlOQFScjilAm6UG";const u=o},713:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,k:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.ijR0HJEbMuBqwwunQNI8 {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n\n cursor: text;\n\n pointer-events: auto;\n}\n',""]);var a="ijR0HJEbMuBqwwunQNI8";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},692:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var s=[],o=Object.getPrototypeOf,a=s.slice,u=s.flat?function(t){return s.flat.call(t)}:function(t){return s.concat.apply([],t)},h=s.push,l=s.indexOf,c={},d=c.toString,f=c.hasOwnProperty,p=f.toString,m=p.call(Object),g={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},v=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,s=(n=n||v).createElement("script");if(s.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&s.setAttribute(r,i);n.head.appendChild(s).parentNode.removeChild(s)}function _(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[d.call(t)]||"object":typeof t}var S="3.7.1",M=/HTML$/i,O=function(t,e){return new O.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,n=_(t);return!y(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function P(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}O.fn=O.prototype={jquery:S,constructor:O,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=O.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return O.each(this,t)},map:function(t){return this.pushStack(O.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(O.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(O.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:s.sort,splice:s.splice},O.extend=O.fn.extend=function(){var t,e,n,r,i,s,o=arguments[0]||{},a=1,u=arguments.length,h=!1;for("boolean"==typeof o&&(h=o,o=arguments[a]||{},a++),"object"==typeof o||y(o)||(o={}),a===u&&(o=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&o!==r&&(h&&r&&(O.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[e],s=i&&!Array.isArray(n)?[]:i||O.isPlainObject(n)?n:{},i=!1,o[e]=O.extend(h,s,r)):void 0!==r&&(o[e]=r));return o},O.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t)||(e=o(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(C(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=O.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(C(Object(t))?O.merge(n,"string"==typeof t?[t]:t):h.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!M.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,s=t.length,o=!n;i<s;i++)!e(t[i],i)!==o&&r.push(t[i]);return r},map:function(t,e,n){var r,i,s=0,o=[];if(C(t))for(r=t.length;s<r;s++)null!=(i=e(t[s],s,n))&&o.push(i);else for(s in t)null!=(i=e(t[s],s,n))&&o.push(i);return u(o)},guid:1,support:g}),"function"==typeof Symbol&&(O.fn[Symbol.iterator]=s[Symbol.iterator]),O.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){c["[object "+e+"]"]=e.toLowerCase()}));var N=s.pop,T=s.sort,E=s.splice,A="[\\x20\\t\\r\\n\\f]",j=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g");O.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var D=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function k(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}O.escapeSelector=function(t){return(t+"").replace(D,k)};var L=v,B=h;!function(){var t,e,n,i,o,u,h,c,d,p,m=B,y=O.expando,b=0,v=0,w=tt(),x=tt(),_=tt(),S=tt(),M=function(t,e){return t===e&&(o=!0),0},C="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",D="(?:\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",k="\\["+A+"*("+D+")(?:"+A+"*([*^$|!~]?=)"+A+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+D+"))|)"+A+"*\\]",I=":("+D+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+k+")*)|.*)\\)|)",F=new RegExp(A+"+","g"),R=new RegExp("^"+A+"*,"+A+"*"),V=new RegExp("^"+A+"*([>+~]|"+A+")"+A+"*"),z=new RegExp(A+"|>"),q=new RegExp(I),X=new RegExp("^"+D+"$"),Y={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+C+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,H=/^h\d$/i,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,W=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),Q=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ut()},K=dt((function(t){return!0===t.disabled&&P(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(s=a.call(L.childNodes),L.childNodes),s[L.childNodes.length].nodeType}catch(t){m={apply:function(t,e){B.apply(t,a.call(e))},call:function(t){B.apply(t,a.call(arguments,1))}}}function Z(t,e,n,r){var i,s,o,a,h,l,f,p=e&&e.ownerDocument,b=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return n;if(!r&&(ut(e),e=e||u,c)){if(11!==b&&(h=U.exec(t)))if(i=h[1]){if(9===b){if(!(o=e.getElementById(i)))return n;if(o.id===i)return m.call(n,o),n}else if(p&&(o=p.getElementById(i))&&Z.contains(e,o)&&o.id===i)return m.call(n,o),n}else{if(h[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=h[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(S[t+" "]||d&&d.test(t))){if(f=t,p=e,1===b&&(z.test(t)||V.test(t))){for((p=$.test(t)&&at(e.parentNode)||e)==e&&g.scope||((a=e.getAttribute("id"))?a=O.escapeSelector(a):e.setAttribute("id",a=y)),s=(l=lt(t)).length;s--;)l[s]=(a?"#"+a:":scope")+" "+ct(l[s]);f=l.join(",")}try{return m.apply(n,p.querySelectorAll(f)),n}catch(e){S(t,!0)}finally{a===y&&e.removeAttribute("id")}}}return bt(t.replace(j,"$1"),e,n,r)}function tt(){var t=[];return function n(r,i){return t.push(r+" ")>e.cacheLength&&delete n[t.shift()],n[r+" "]=i}}function et(t){return t[y]=!0,t}function nt(t){var e=u.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t){return function(e){return P(e,"input")&&e.type===t}}function it(t){return function(e){return(P(e,"input")||P(e,"button"))&&e.type===t}}function st(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&K(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ot(t){return et((function(e){return e=+e,et((function(n,r){for(var i,s=t([],n.length,e),o=s.length;o--;)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var n,r=t?t.ownerDocument||t:L;return r!=u&&9===r.nodeType&&r.documentElement?(h=(u=r).documentElement,c=!O.isXMLDoc(u),p=h.matches||h.webkitMatchesSelector||h.msMatchesSelector,h.msMatchesSelector&&L!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",J),g.getById=nt((function(t){return h.appendChild(t).id=O.expando,!u.getElementsByName||!u.getElementsByName(O.expando).length})),g.disconnectedMatch=nt((function(t){return p.call(t,"*")})),g.scope=nt((function(){return u.querySelectorAll(":scope")})),g.cssHas=nt((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),g.getById?(e.filter.ID=function(t){var e=t.replace(W,Q);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&c){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace(W,Q);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&c){var n,r,i,s=e.getElementById(t);if(s){if((n=s.getAttributeNode("id"))&&n.value===t)return[s];for(i=e.getElementsByName(t),r=0;s=i[r++];)if((n=s.getAttributeNode("id"))&&n.value===t)return[s]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&c)return e.getElementsByClassName(t)},d=[],nt((function(t){var e;h.appendChild(t).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||d.push("\\["+A+"*(?:value|"+C+")"),t.querySelectorAll("[id~="+y+"-]").length||d.push("~="),t.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),t.querySelectorAll(":checked").length||d.push(":checked"),(e=u.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(e=u.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||d.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")})),g.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),M=function(t,e){if(t===e)return o=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===u||t.ownerDocument==L&&Z.contains(L,t)?-1:e===u||e.ownerDocument==L&&Z.contains(L,e)?1:i?l.call(i,t)-l.call(i,e):0:4&n?-1:1)},u):u}for(t in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(ut(t),c&&!S[e+" "]&&(!d||!d.test(e)))try{var n=p.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){S(e,!0)}return Z(e,u,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=u&&ut(t),O.contains(t,e)},Z.attr=function(t,n){(t.ownerDocument||t)!=u&&ut(t);var r=e.attrHandle[n.toLowerCase()],i=r&&f.call(e.attrHandle,n.toLowerCase())?r(t,n,!c):void 0;return void 0!==i?i:t.getAttribute(n)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},O.uniqueSort=function(t){var e,n=[],r=0,s=0;if(o=!g.sortStable,i=!g.sortStable&&a.call(t,0),T.call(t,M),o){for(;e=t[s++];)e===t[s]&&(r=n.push(s));for(;r--;)E.call(t,n[r],1)}return i=null,t},O.fn.uniqueSort=function(){return this.pushStack(O.uniqueSort(a.apply(this)))},e=O.expr={cacheLength:50,createPseudo:et,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(W,Q),t[3]=(t[3]||t[4]||t[5]||"").replace(W,Q),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&q.test(n)&&(e=lt(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(W,Q).toLowerCase();return"*"===t?function(){return!0}:function(t){return P(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+A+")"+t+"("+A+"|$)"))&&w(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=Z.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var s="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var h,l,c,d,f,p=s!==o?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),v=!u&&!a,w=!1;if(m){if(s){for(;p;){for(c=e;c=c[p];)if(a?P(c,g):1===c.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[o?m.firstChild:m.lastChild],o&&v){for(w=(d=(h=(l=m[y]||(m[y]={}))[t]||[])[0]===b&&h[1])&&h[2],c=d&&m.childNodes[d];c=++d&&c&&c[p]||(w=d=0)||f.pop();)if(1===c.nodeType&&++w&&c===e){l[t]=[b,d,w];break}}else if(v&&(w=d=(h=(l=e[y]||(e[y]={}))[t]||[])[0]===b&&h[1]),!1===w)for(;(c=++d&&c&&c[p]||(w=d=0)||f.pop())&&(!(a?P(c,g):1===c.nodeType)||!++w||(v&&((l=c[y]||(c[y]={}))[t]=[b,w]),c!==e)););return(w-=i)===r||w%r==0&&w/r>=0}}},PSEUDO:function(t,n){var r,i=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return i[y]?i(n):i.length>1?(r=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var r,s=i(t,n),o=s.length;o--;)t[r=l.call(t,s[o])]=!(e[r]=s[o])})):function(t){return i(t,0,r)}):i}},pseudos:{not:et((function(t){var e=[],n=[],r=yt(t.replace(j,"$1"));return r[y]?et((function(t,e,n,i){for(var s,o=r(t,null,i,[]),a=t.length;a--;)(s=o[a])&&(t[a]=!(e[a]=s))})):function(t,i,s){return e[0]=t,r(e,null,s,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Z(t,e).length>0}})),contains:et((function(t){return t=t.replace(W,Q),function(e){return(e.textContent||O.text(e)).indexOf(t)>-1}})),lang:et((function(t){return X.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(W,Q).toLowerCase(),function(e){var n;do{if(n=c?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=r.location&&r.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===h},focus:function(t){return t===function(){try{return u.activeElement}catch(t){}}()&&u.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:st(!1),disabled:st(!0),checked:function(t){return P(t,"input")&&!!t.checked||P(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return H.test(t.nodeName)},input:function(t){return G.test(t.nodeName)},button:function(t){return P(t,"input")&&"button"===t.type||P(t,"button")},text:function(t){var e;return P(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ot((function(){return[0]})),last:ot((function(t,e){return[e-1]})),eq:ot((function(t,e,n){return[n<0?n+e:n]})),even:ot((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:ot((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:ot((function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:ot((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},e.pseudos.nth=e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})e.pseudos[t]=rt(t);for(t in{submit:!0,reset:!0})e.pseudos[t]=it(t);function ht(){}function lt(t,n){var r,i,s,o,a,u,h,l=x[t+" "];if(l)return n?0:l.slice(0);for(a=t,u=[],h=e.preFilter;a;){for(o in r&&!(i=R.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(s=[])),r=!1,(i=V.exec(a))&&(r=i.shift(),s.push({value:r,type:i[0].replace(j," ")}),a=a.slice(r.length)),e.filter)!(i=Y[o].exec(a))||h[o]&&!(i=h[o](i))||(r=i.shift(),s.push({value:r,type:o,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?Z.error(t):x(t,u).slice(0)}function ct(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function dt(t,e,n){var r=e.dir,i=e.next,s=i||r,o=n&&"parentNode"===s,a=v++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i);return!1}:function(e,n,u){var h,l,c=[b,a];if(u){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||o)if(l=e[y]||(e[y]={}),i&&P(e,i))e=e[r]||e;else{if((h=l[s])&&h[0]===b&&h[1]===a)return c[2]=h[2];if(l[s]=c,c[2]=t(e,n,u))return!0}return!1}}function ft(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function pt(t,e,n,r,i){for(var s,o=[],a=0,u=t.length,h=null!=e;a<u;a++)(s=t[a])&&(n&&!n(s,r,i)||(o.push(s),h&&e.push(a)));return o}function mt(t,e,n,r,i,s){return r&&!r[y]&&(r=mt(r)),i&&!i[y]&&(i=mt(i,s)),et((function(s,o,a,u){var h,c,d,f,p=[],g=[],y=o.length,b=s||function(t,e,n){for(var r=0,i=e.length;r<i;r++)Z(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!s&&e?b:pt(b,p,t,a,u);if(n?n(v,f=i||(s?t:y||r)?[]:o,a,u):f=v,r)for(h=pt(f,g),r(h,[],a,u),c=h.length;c--;)(d=h[c])&&(f[g[c]]=!(v[g[c]]=d));if(s){if(i||t){if(i){for(h=[],c=f.length;c--;)(d=f[c])&&h.push(v[c]=d);i(null,f=[],h,u)}for(c=f.length;c--;)(d=f[c])&&(h=i?l.call(s,d):p[c])>-1&&(s[h]=!(o[h]=d))}}else f=pt(f===o?f.splice(y,f.length):f),i?i(null,o,f,u):m.apply(o,f)}))}function gt(t){for(var r,i,s,o=t.length,a=e.relative[t[0].type],u=a||e.relative[" "],h=a?1:0,c=dt((function(t){return t===r}),u,!0),d=dt((function(t){return l.call(r,t)>-1}),u,!0),f=[function(t,e,i){var s=!a&&(i||e!=n)||((r=e).nodeType?c(t,e,i):d(t,e,i));return r=null,s}];h<o;h++)if(i=e.relative[t[h].type])f=[dt(ft(f),i)];else{if((i=e.filter[t[h].type].apply(null,t[h].matches))[y]){for(s=++h;s<o&&!e.relative[t[s].type];s++);return mt(h>1&&ft(f),h>1&&ct(t.slice(0,h-1).concat({value:" "===t[h-2].type?"*":""})).replace(j,"$1"),i,h<s&>(t.slice(h,s)),s<o&>(t=t.slice(s)),s<o&&ct(t))}f.push(i)}return ft(f)}function yt(t,r){var i,s=[],o=[],a=_[t+" "];if(!a){for(r||(r=lt(t)),i=r.length;i--;)(a=gt(r[i]))[y]?s.push(a):o.push(a);a=_(t,function(t,r){var i=r.length>0,s=t.length>0,o=function(o,a,h,l,d){var f,p,g,y=0,v="0",w=o&&[],x=[],_=n,S=o||s&&e.find.TAG("*",d),M=b+=null==_?1:Math.random()||.1,C=S.length;for(d&&(n=a==u||a||d);v!==C&&null!=(f=S[v]);v++){if(s&&f){for(p=0,a||f.ownerDocument==u||(ut(f),h=!c);g=t[p++];)if(g(f,a||u,h)){m.call(l,f);break}d&&(b=M)}i&&((f=!g&&f)&&y--,o&&w.push(f))}if(y+=v,i&&v!==y){for(p=0;g=r[p++];)g(w,x,a,h);if(o){if(y>0)for(;v--;)w[v]||x[v]||(x[v]=N.call(l));x=pt(x)}m.apply(l,x),d&&!o&&x.length>0&&y+r.length>1&&O.uniqueSort(l)}return d&&(b=M,n=_),w};return i?et(o):o}(o,s)),a.selector=t}return a}function bt(t,n,r,i){var s,o,a,u,h,l="function"==typeof t&&t,d=!i&<(t=l.selector||t);if(r=r||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===n.nodeType&&c&&e.relative[o[1].type]){if(!(n=(e.find.ID(a.matches[0].replace(W,Q),n)||[])[0]))return r;l&&(n=n.parentNode),t=t.slice(o.shift().value.length)}for(s=Y.needsContext.test(t)?0:o.length;s--&&(a=o[s],!e.relative[u=a.type]);)if((h=e.find[u])&&(i=h(a.matches[0].replace(W,Q),$.test(o[0].type)&&at(n.parentNode)||n))){if(o.splice(s,1),!(t=i.length&&ct(o)))return m.apply(r,i),r;break}}return(l||yt(t,d))(i,n,!c,r,!n||$.test(t)&&at(n.parentNode)||n),r}ht.prototype=e.filters=e.pseudos,e.setFilters=new ht,g.sortStable=y.split("").sort(M).join("")===y,ut(),g.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(u.createElement("fieldset"))})),O.find=Z,O.expr[":"]=O.expr.pseudos,O.unique=O.uniqueSort,Z.compile=yt,Z.select=bt,Z.setDocument=ut,Z.tokenize=lt,Z.escape=O.escapeSelector,Z.getText=O.text,Z.isXML=O.isXMLDoc,Z.selectors=O.expr,Z.support=O.support,Z.uniqueSort=O.uniqueSort}();var I=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&O(t).is(n))break;r.push(t)}return r},F=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},R=O.expr.match.needsContext,V=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(t,e,n){return y(e)?O.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?O.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?O.grep(t,(function(t){return l.call(e,t)>-1!==n})):O.filter(e,t,n)}O.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?O.find.matchesSelector(r,t)?[r]:[]:O.find.matches(t,O.grep(e,(function(t){return 1===t.nodeType})))},O.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(O(t).filter((function(){for(e=0;e<r;e++)if(O.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)O.find(t,i[e],n);return r>1?O.uniqueSort(n):n},filter:function(t){return this.pushStack(z(this,t||[],!1))},not:function(t){return this.pushStack(z(this,t||[],!0))},is:function(t){return!!z(this,"string"==typeof t&&R.test(t)?O(t):t||[],!1).length}});var q,X=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(O.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||q,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:X.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof O?e[0]:e,O.merge(this,O.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:v,!0)),V.test(r[1])&&O.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=v.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(O):O.makeArray(t,this)}).prototype=O.fn,q=O(v);var Y=/^(?:parents|prev(?:Until|All))/,G={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}O.fn.extend({has:function(t){var e=O(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(O.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,s=[],o="string"!=typeof t&&O(t);if(!R.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&O.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?O.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?l.call(O(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(O.uniqueSort(O.merge(this.get(),O(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),O.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return I(t,"parentNode")},parentsUntil:function(t,e,n){return I(t,"parentNode",n)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return I(t,"nextSibling")},prevAll:function(t){return I(t,"previousSibling")},nextUntil:function(t,e,n){return I(t,"nextSibling",n)},prevUntil:function(t,e,n){return I(t,"previousSibling",n)},siblings:function(t){return F((t.parentNode||{}).firstChild,t)},children:function(t){return F(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(P(t,"template")&&(t=t.content||t),O.merge([],t.childNodes))}},(function(t,e){O.fn[t]=function(n,r){var i=O.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=O.filter(r,i)),this.length>1&&(G[t]||O.uniqueSort(i),Y.test(t)&&i.reverse()),this.pushStack(i)}}));var U=/[^\x20\t\r\n\f]+/g;function $(t){return t}function W(t){throw t}function Q(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}O.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return O.each(t.match(U)||[],(function(t,n){e[n]=!0})),e}(t):O.extend({},t);var e,n,r,i,s=[],o=[],a=-1,u=function(){for(i=i||t.once,r=e=!0;o.length;a=-1)for(n=o.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=s.length,n=!1);t.memory||(n=!1),e=!1,i&&(s=n?[]:"")},h={add:function(){return s&&(n&&!e&&(a=s.length-1,o.push(n)),function e(n){O.each(n,(function(n,r){y(r)?t.unique&&h.has(r)||s.push(r):r&&r.length&&"string"!==_(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return O.each(arguments,(function(t,e){for(var n;(n=O.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--})),this},has:function(t){return t?O.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return i=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return i=o=[],n||e||(s=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],o.push(n),e||u()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},O.extend({Deferred:function(t){var e=[["notify","progress",O.Callbacks("memory"),O.Callbacks("memory"),2],["resolve","done",O.Callbacks("once memory"),O.Callbacks("once memory"),0,"resolved"],["reject","fail",O.Callbacks("once memory"),O.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return O.Deferred((function(n){O.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];s[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var s=0;function o(t,e,n,i){return function(){var a=this,u=arguments,h=function(){var r,h;if(!(t<s)){if((r=n.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");h=r&&("object"==typeof r||"function"==typeof r)&&r.then,y(h)?i?h.call(r,o(s,e,$,i),o(s,e,W,i)):(s++,h.call(r,o(s,e,$,i),o(s,e,W,i),o(s,e,$,e.notifyWith))):(n!==$&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},l=i?h:function(){try{h()}catch(r){O.Deferred.exceptionHook&&O.Deferred.exceptionHook(r,l.error),t+1>=s&&(n!==W&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?l():(O.Deferred.getErrorHook?l.error=O.Deferred.getErrorHook():O.Deferred.getStackHook&&(l.error=O.Deferred.getStackHook()),r.setTimeout(l))}}return O.Deferred((function(r){e[0][3].add(o(0,r,y(i)?i:$,r.notifyWith)),e[1][3].add(o(0,r,y(t)?t:$)),e[2][3].add(o(0,r,y(n)?n:W))})).promise()},promise:function(t){return null!=t?O.extend(t,i):i}},s={};return O.each(e,(function(t,r){var o=r[2],a=r[5];i[r[1]]=o.add,a&&o.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),o.add(r[3].fire),s[r[0]]=function(){return s[r[0]+"With"](this===s?void 0:this,arguments),this},s[r[0]+"With"]=o.fireWith})),i.promise(s),t&&t.call(s,s),s},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),s=O.Deferred(),o=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||s.resolveWith(r,i)}};if(e<=1&&(Q(t,s.done(o(n)).resolve,s.reject,!e),"pending"===s.state()||y(i[n]&&i[n].then)))return s.then();for(;n--;)Q(i[n],o(n),s.reject);return s.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;O.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&J.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},O.readyException=function(t){r.setTimeout((function(){throw t}))};var K=O.Deferred();function Z(){v.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),O.ready()}O.fn.ready=function(t){return K.then(t).catch((function(t){O.readyException(t)})),this},O.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--O.readyWait:O.isReady)||(O.isReady=!0,!0!==t&&--O.readyWait>0||K.resolveWith(v,[O]))}}),O.ready.then=K.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?r.setTimeout(O.ready):(v.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var tt=function(t,e,n,r,i,s,o){var a=0,u=t.length,h=null==n;if("object"===_(n))for(a in i=!0,n)tt(t,e,a,n[a],!0,s,o);else if(void 0!==r&&(i=!0,y(r)||(o=!0),h&&(o?(e.call(t,r),e=null):(h=e,e=function(t,e,n){return h.call(O(t),n)})),e))for(;a<u;a++)e(t[a],n,o?r:r.call(t[a],a,e(t[a],n)));return i?t:h?e.call(t):u?e(t[0],n):s},et=/^-ms-/,nt=/-([a-z])/g;function rt(t,e){return e.toUpperCase()}function it(t){return t.replace(et,"ms-").replace(nt,rt)}var st=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=O.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},st(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[it(e)]=n;else for(r in e)i[it(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][it(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(it):(e=it(e))in r?[e]:e.match(U)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||O.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!O.isEmptyObject(e)}};var at=new ot,ut=new ot,ht=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,lt=/[A-Z]/g;function ct(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(lt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:ht.test(t)?JSON.parse(t):t)}(n)}catch(t){}ut.set(t,e,n)}else n=void 0;return n}O.extend({hasData:function(t){return ut.hasData(t)||at.hasData(t)},data:function(t,e,n){return ut.access(t,e,n)},removeData:function(t,e){ut.remove(t,e)},_data:function(t,e,n){return at.access(t,e,n)},_removeData:function(t,e){at.remove(t,e)}}),O.fn.extend({data:function(t,e){var n,r,i,s=this[0],o=s&&s.attributes;if(void 0===t){if(this.length&&(i=ut.get(s),1===s.nodeType&&!at.get(s,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(r=o[n].name).indexOf("data-")&&(r=it(r.slice(5)),ct(s,r,i[r]));at.set(s,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){ut.set(this,t)})):tt(this,(function(e){var n;if(s&&void 0===e)return void 0!==(n=ut.get(s,t))||void 0!==(n=ct(s,t))?n:void 0;this.each((function(){ut.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){ut.remove(this,t)}))}}),O.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=at.get(t,e),n&&(!r||Array.isArray(n)?r=at.access(t,e,O.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=O.queue(t,e),r=n.length,i=n.shift(),s=O._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete s.stop,i.call(t,(function(){O.dequeue(t,e)}),s)),!r&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return at.get(t,n)||at.access(t,n,{empty:O.Callbacks("once memory").add((function(){at.remove(t,[e+"queue",n])}))})}}),O.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?O.queue(this[0],t):void 0===e?this:this.each((function(){var n=O.queue(this,t,e);O._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&O.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){O.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=O.Deferred(),s=this,o=this.length,a=function(){--r||i.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(n=at.get(s[o],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var dt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=new RegExp("^(?:([+-])=|)("+dt+")([a-z%]*)$","i"),pt=["Top","Right","Bottom","Left"],mt=v.documentElement,gt=function(t){return O.contains(t.ownerDocument,t)},yt={composed:!0};mt.getRootNode&&(gt=function(t){return O.contains(t.ownerDocument,t)||t.getRootNode(yt)===t.ownerDocument});var bt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&>(t)&&"none"===O.css(t,"display")};function vt(t,e,n,r){var i,s,o=20,a=r?function(){return r.cur()}:function(){return O.css(t,e,"")},u=a(),h=n&&n[3]||(O.cssNumber[e]?"":"px"),l=t.nodeType&&(O.cssNumber[e]||"px"!==h&&+u)&&ft.exec(O.css(t,e));if(l&&l[3]!==h){for(u/=2,h=h||l[3],l=+u||1;o--;)O.style(t,e,l+h),(1-s)*(1-(s=a()/u||.5))<=0&&(o=0),l/=s;l*=2,O.style(t,e,l+h),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=h,r.start=l,r.end=i)),i}var wt={};function xt(t){var e,n=t.ownerDocument,r=t.nodeName,i=wt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=O.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),wt[r]=i,i)}function _t(t,e){for(var n,r,i=[],s=0,o=t.length;s<o;s++)(r=t[s]).style&&(n=r.style.display,e?("none"===n&&(i[s]=at.get(r,"display")||null,i[s]||(r.style.display="")),""===r.style.display&&bt(r)&&(i[s]=xt(r))):"none"!==n&&(i[s]="none",at.set(r,"display",n)));for(s=0;s<o;s++)null!=i[s]&&(t[s].style.display=i[s]);return t}O.fn.extend({show:function(){return _t(this,!0)},hide:function(){return _t(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){bt(this)?O(this).show():O(this).hide()}))}});var St,Mt,Ot=/^(?:checkbox|radio)$/i,Ct=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Pt=/^$|^module$|\/(?:java|ecma)script/i;St=v.createDocumentFragment().appendChild(v.createElement("div")),(Mt=v.createElement("input")).setAttribute("type","radio"),Mt.setAttribute("checked","checked"),Mt.setAttribute("name","t"),St.appendChild(Mt),g.checkClone=St.cloneNode(!0).cloneNode(!0).lastChild.checked,St.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!St.cloneNode(!0).lastChild.defaultValue,St.innerHTML="<option></option>",g.option=!!St.lastChild;var Nt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Tt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&P(t,e)?O.merge([t],n):n}function Et(t,e){for(var n=0,r=t.length;n<r;n++)at.set(t[n],"globalEval",!e||at.get(e[n],"globalEval"))}Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,g.option||(Nt.optgroup=Nt.option=[1,"<select multiple='multiple'>","</select>"]);var At=/<|&#?\w+;/;function jt(t,e,n,r,i){for(var s,o,a,u,h,l,c=e.createDocumentFragment(),d=[],f=0,p=t.length;f<p;f++)if((s=t[f])||0===s)if("object"===_(s))O.merge(d,s.nodeType?[s]:s);else if(At.test(s)){for(o=o||c.appendChild(e.createElement("div")),a=(Ct.exec(s)||["",""])[1].toLowerCase(),u=Nt[a]||Nt._default,o.innerHTML=u[1]+O.htmlPrefilter(s)+u[2],l=u[0];l--;)o=o.lastChild;O.merge(d,o.childNodes),(o=c.firstChild).textContent=""}else d.push(e.createTextNode(s));for(c.textContent="",f=0;s=d[f++];)if(r&&O.inArray(s,r)>-1)i&&i.push(s);else if(h=gt(s),o=Tt(c.appendChild(s),"script"),h&&Et(o),n)for(l=0;s=o[l++];)Pt.test(s.type||"")&&n.push(s);return c}var Dt=/^([^.]*)(?:\.(.+)|)/;function kt(){return!0}function Lt(){return!1}function Bt(t,e,n,r,i,s){var o,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)Bt(t,a,n,r,e[a],s);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Lt;else if(!i)return t;return 1===s&&(o=i,i=function(t){return O().off(t),o.apply(this,arguments)},i.guid=o.guid||(o.guid=O.guid++)),t.each((function(){O.event.add(this,e,i,r,n)}))}function It(t,e,n){n?(at.set(t,e,!1),O.event.add(t,e,{namespace:!1,handler:function(t){var n,r=at.get(this,e);if(1&t.isTrigger&&this[e]){if(r)(O.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=a.call(arguments),at.set(this,e,r),this[e](),n=at.get(this,e),at.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else r&&(at.set(this,e,O.event.trigger(r[0],r.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=kt)}})):void 0===at.get(t,e)&&O.event.add(t,e,kt)}O.event={global:{},add:function(t,e,n,r,i){var s,o,a,u,h,l,c,d,f,p,m,g=at.get(t);if(st(t))for(n.handler&&(n=(s=n).handler,i=s.selector),i&&O.find.matchesSelector(mt,i),n.guid||(n.guid=O.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(e){return void 0!==O&&O.event.triggered!==e.type?O.event.dispatch.apply(t,arguments):void 0}),h=(e=(e||"").match(U)||[""]).length;h--;)f=m=(a=Dt.exec(e[h])||[])[1],p=(a[2]||"").split(".").sort(),f&&(c=O.event.special[f]||{},f=(i?c.delegateType:c.bindType)||f,c=O.event.special[f]||{},l=O.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&O.expr.match.needsContext.test(i),namespace:p.join(".")},s),(d=u[f])||((d=u[f]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(f,o)),c.add&&(c.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),O.event.global[f]=!0)},remove:function(t,e,n,r,i){var s,o,a,u,h,l,c,d,f,p,m,g=at.hasData(t)&&at.get(t);if(g&&(u=g.events)){for(h=(e=(e||"").match(U)||[""]).length;h--;)if(f=m=(a=Dt.exec(e[h])||[])[1],p=(a[2]||"").split(".").sort(),f){for(c=O.event.special[f]||{},d=u[f=(r?c.delegateType:c.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;s--;)l=d[s],!i&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(s,1),l.selector&&d.delegateCount--,c.remove&&c.remove.call(t,l));o&&!d.length&&(c.teardown&&!1!==c.teardown.call(t,p,g.handle)||O.removeEvent(t,f,g.handle),delete u[f])}else for(f in u)O.event.remove(t,f+e[h],n,r,!0);O.isEmptyObject(u)&&at.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,s,o,a=new Array(arguments.length),u=O.event.fix(t),h=(at.get(this,"events")||Object.create(null))[u.type]||[],l=O.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(o=O.event.handlers.call(this,u,h),e=0;(i=o[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(s=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==s.namespace&&!u.rnamespace.test(s.namespace)||(u.handleObj=s,u.data=s.data,void 0!==(r=((O.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,a))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,s,o,a=[],u=e.delegateCount,h=t.target;if(u&&h.nodeType&&!("click"===t.type&&t.button>=1))for(;h!==this;h=h.parentNode||this)if(1===h.nodeType&&("click"!==t.type||!0!==h.disabled)){for(s=[],o={},n=0;n<u;n++)void 0===o[i=(r=e[n]).selector+" "]&&(o[i]=r.needsContext?O(i,this).index(h)>-1:O.find(i,this,null,[h]).length),o[i]&&s.push(r);s.length&&a.push({elem:h,handlers:s})}return h=this,u<e.length&&a.push({elem:h,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(O.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[O.expando]?t:new O.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Ot.test(e.type)&&e.click&&P(e,"input")&&It(e,"click",!0),!1},trigger:function(t){var e=this||t;return Ot.test(e.type)&&e.click&&P(e,"input")&&It(e,"click"),!0},_default:function(t){var e=t.target;return Ot.test(e.type)&&e.click&&P(e,"input")&&at.get(e,"click")||P(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},O.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},O.Event=function(t,e){if(!(this instanceof O.Event))return new O.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?kt:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&O.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[O.expando]=!0},O.Event.prototype={constructor:O.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=kt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=kt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=kt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},O.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},O.event.addProp),O.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(v.documentMode){var n=at.get(this,"handle"),r=O.event.fix(t);r.type="focusin"===t.type?"focus":"blur",r.isSimulated=!0,n(t),r.target===r.currentTarget&&n(r)}else O.event.simulate(e,t.target,O.event.fix(t))}O.event.special[t]={setup:function(){var r;if(It(this,t,!0),!v.documentMode)return!1;(r=at.get(this,e))||this.addEventListener(e,n),at.set(this,e,(r||0)+1)},trigger:function(){return It(this,t),!0},teardown:function(){var t;if(!v.documentMode)return!1;(t=at.get(this,e)-1)?at.set(this,e,t):(this.removeEventListener(e,n),at.remove(this,e))},_default:function(e){return at.get(e.target,t)},delegateType:e},O.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=v.documentMode?this:r,s=at.get(i,e);s||(v.documentMode?this.addEventListener(e,n):r.addEventListener(t,n,!0)),at.set(i,e,(s||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=v.documentMode?this:r,s=at.get(i,e)-1;s?at.set(i,e,s):(v.documentMode?this.removeEventListener(e,n):r.removeEventListener(t,n,!0),at.remove(i,e))}}})),O.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){O.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||O.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),O.fn.extend({on:function(t,e,n,r){return Bt(this,t,e,n,r)},one:function(t,e,n,r){return Bt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,O(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Lt),this.each((function(){O.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,Rt=/checked\s*(?:[^=]|=\s*.checked.)/i,Vt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function zt(t,e){return P(t,"table")&&P(11!==e.nodeType?e:e.firstChild,"tr")&&O(t).children("tbody")[0]||t}function qt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Xt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Yt(t,e){var n,r,i,s,o,a;if(1===e.nodeType){if(at.hasData(t)&&(a=at.get(t).events))for(i in at.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)O.event.add(e,i,a[i][n]);ut.hasData(t)&&(s=ut.access(t),o=O.extend({},s),ut.set(e,o))}}function Gt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Ot.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Ht(t,e,n,r){e=u(e);var i,s,o,a,h,l,c=0,d=t.length,f=d-1,p=e[0],m=y(p);if(m||d>1&&"string"==typeof p&&!g.checkClone&&Rt.test(p))return t.each((function(i){var s=t.eq(i);m&&(e[0]=p.call(this,i,s.html())),Ht(s,e,n,r)}));if(d&&(s=(i=jt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=s),s||r)){for(a=(o=O.map(Tt(i,"script"),qt)).length;c<d;c++)h=i,c!==f&&(h=O.clone(h,!0,!0),a&&O.merge(o,Tt(h,"script"))),n.call(t[c],h,c);if(a)for(l=o[o.length-1].ownerDocument,O.map(o,Xt),c=0;c<a;c++)h=o[c],Pt.test(h.type||"")&&!at.access(h,"globalEval")&&O.contains(l,h)&&(h.src&&"module"!==(h.type||"").toLowerCase()?O._evalUrl&&!h.noModule&&O._evalUrl(h.src,{nonce:h.nonce||h.getAttribute("nonce")},l):x(h.textContent.replace(Vt,""),h,l))}return t}function Ut(t,e,n){for(var r,i=e?O.filter(e,t):t,s=0;null!=(r=i[s]);s++)n||1!==r.nodeType||O.cleanData(Tt(r)),r.parentNode&&(n&>(r)&&Et(Tt(r,"script")),r.parentNode.removeChild(r));return t}O.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,s,o,a=t.cloneNode(!0),u=gt(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||O.isXMLDoc(t)))for(o=Tt(a),r=0,i=(s=Tt(t)).length;r<i;r++)Gt(s[r],o[r]);if(e)if(n)for(s=s||Tt(t),o=o||Tt(a),r=0,i=s.length;r<i;r++)Yt(s[r],o[r]);else Yt(t,a);return(o=Tt(a,"script")).length>0&&Et(o,!u&&Tt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=O.event.special,s=0;void 0!==(n=t[s]);s++)if(st(n)){if(e=n[at.expando]){if(e.events)for(r in e.events)i[r]?O.event.remove(n,r):O.removeEvent(n,r,e.handle);n[at.expando]=void 0}n[ut.expando]&&(n[ut.expando]=void 0)}}}),O.fn.extend({detach:function(t){return Ut(this,t,!0)},remove:function(t){return Ut(this,t)},text:function(t){return tt(this,(function(t){return void 0===t?O.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ht(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||zt(this,t).appendChild(t)}))},prepend:function(){return Ht(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=zt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(O.cleanData(Tt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return O.clone(this,t,e)}))},html:function(t){return tt(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ft.test(t)&&!Nt[(Ct.exec(t)||["",""])[1].toLowerCase()]){t=O.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(O.cleanData(Tt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ht(this,arguments,(function(e){var n=this.parentNode;O.inArray(this,t)<0&&(O.cleanData(Tt(this)),n&&n.replaceChild(e,this))}),t)}}),O.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){O.fn[t]=function(t){for(var n,r=[],i=O(t),s=i.length-1,o=0;o<=s;o++)n=o===s?this:this.clone(!0),O(i[o])[e](n),h.apply(r,n.get());return this.pushStack(r)}}));var $t=new RegExp("^("+dt+")(?!px)[a-z%]+$","i"),Wt=/^--/,Qt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},Jt=function(t,e,n){var r,i,s={};for(i in e)s[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=s[i];return r},Kt=new RegExp(pt.join("|"),"i");function Zt(t,e,n){var r,i,s,o,a=Wt.test(e),u=t.style;return(n=n||Qt(t))&&(o=n.getPropertyValue(e)||n[e],a&&o&&(o=o.replace(j,"$1")||void 0),""!==o||gt(t)||(o=O.style(t,e)),!g.pixelBoxStyles()&&$t.test(o)&&Kt.test(e)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=o,o=n.width,u.width=r,u.minWidth=i,u.maxWidth=s)),void 0!==o?o+"":o}function te(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){h.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",mt.appendChild(h).appendChild(l);var t=r.getComputedStyle(l);n="1%"!==t.top,u=12===e(t.marginLeft),l.style.right="60%",o=36===e(t.right),i=36===e(t.width),l.style.position="absolute",s=12===e(l.offsetWidth/3),mt.removeChild(h),l=null}}function e(t){return Math.round(parseFloat(t))}var n,i,s,o,a,u,h=v.createElement("div"),l=v.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===l.style.backgroundClip,O.extend(g,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),s},reliableTrDimensions:function(){var t,e,n,i;return null==a&&(t=v.createElement("table"),e=v.createElement("tr"),n=v.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",mt.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,mt.removeChild(t)),a}}))}();var ee=["Webkit","Moz","ms"],ne=v.createElement("div").style,re={};function ie(t){return O.cssProps[t]||re[t]||(t in ne?t:re[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=ee.length;n--;)if((t=ee[n]+e)in ne)return t}(t)||t)}var se=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},ae={letterSpacing:"0",fontWeight:"400"};function ue(t,e,n){var r=ft.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function he(t,e,n,r,i,s){var o="width"===e?1:0,a=0,u=0,h=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(h+=O.css(t,n+pt[o],!0,i)),r?("content"===n&&(u-=O.css(t,"padding"+pt[o],!0,i)),"margin"!==n&&(u-=O.css(t,"border"+pt[o]+"Width",!0,i))):(u+=O.css(t,"padding"+pt[o],!0,i),"padding"!==n?u+=O.css(t,"border"+pt[o]+"Width",!0,i):a+=O.css(t,"border"+pt[o]+"Width",!0,i));return!r&&s>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-u-a-.5))||0),u+h}function le(t,e,n){var r=Qt(t),i=(!g.boxSizingReliable()||n)&&"border-box"===O.css(t,"boxSizing",!1,r),s=i,o=Zt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if($t.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&P(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===O.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===O.css(t,"boxSizing",!1,r),(s=a in t)&&(o=t[a])),(o=parseFloat(o)||0)+he(t,e,n||(i?"border":"content"),s,r,o)+"px"}function ce(t,e,n,r,i){return new ce.prototype.init(t,e,n,r,i)}O.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Zt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,s,o,a=it(e),u=Wt.test(e),h=t.style;if(u||(e=ie(a)),o=O.cssHooks[e]||O.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(t,!1,r))?i:h[e];"string"==(s=typeof n)&&(i=ft.exec(n))&&i[1]&&(n=vt(t,e,i),s="number"),null!=n&&n==n&&("number"!==s||u||(n+=i&&i[3]||(O.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(h[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,r))||(u?h.setProperty(e,n):h[e]=n))}},css:function(t,e,n,r){var i,s,o,a=it(e);return Wt.test(e)||(e=ie(a)),(o=O.cssHooks[e]||O.cssHooks[a])&&"get"in o&&(i=o.get(t,!0,n)),void 0===i&&(i=Zt(t,e,r)),"normal"===i&&e in ae&&(i=ae[e]),""===n||n?(s=parseFloat(i),!0===n||isFinite(s)?s||0:i):i}}),O.each(["height","width"],(function(t,e){O.cssHooks[e]={get:function(t,n,r){if(n)return!se.test(O.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?le(t,e,r):Jt(t,oe,(function(){return le(t,e,r)}))},set:function(t,n,r){var i,s=Qt(t),o=!g.scrollboxSize()&&"absolute"===s.position,a=(o||r)&&"border-box"===O.css(t,"boxSizing",!1,s),u=r?he(t,e,r,a,s):0;return a&&o&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-he(t,e,"border",!1,s)-.5)),u&&(i=ft.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=O.css(t,e)),ue(0,n,u)}}})),O.cssHooks.marginLeft=te(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Jt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),O.each({margin:"",padding:"",border:"Width"},(function(t,e){O.cssHooks[t+e]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+pt[r]+e]=s[r]||s[r-2]||s[0];return i}},"margin"!==t&&(O.cssHooks[t+e].set=ue)})),O.fn.extend({css:function(t,e){return tt(this,(function(t,e,n){var r,i,s={},o=0;if(Array.isArray(e)){for(r=Qt(t),i=e.length;o<i;o++)s[e[o]]=O.css(t,e[o],!1,r);return s}return void 0!==n?O.style(t,e,n):O.css(t,e)}),t,e,arguments.length>1)}}),O.Tween=ce,ce.prototype={constructor:ce,init:function(t,e,n,r,i,s){this.elem=t,this.prop=n,this.easing=i||O.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=s||(O.cssNumber[n]?"":"px")},cur:function(){var t=ce.propHooks[this.prop];return t&&t.get?t.get(this):ce.propHooks._default.get(this)},run:function(t){var e,n=ce.propHooks[this.prop];return this.options.duration?this.pos=e=O.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ce.propHooks._default.set(this),this}},ce.prototype.init.prototype=ce.prototype,ce.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=O.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){O.fx.step[t.prop]?O.fx.step[t.prop](t):1!==t.elem.nodeType||!O.cssHooks[t.prop]&&null==t.elem.style[ie(t.prop)]?t.elem[t.prop]=t.now:O.style(t.elem,t.prop,t.now+t.unit)}}},ce.propHooks.scrollTop=ce.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},O.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},O.fx=ce.prototype.init,O.fx.step={};var de,fe,pe=/^(?:toggle|show|hide)$/,me=/queueHooks$/;function ge(){fe&&(!1===v.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ge):r.setTimeout(ge,O.fx.interval),O.fx.tick())}function ye(){return r.setTimeout((function(){de=void 0})),de=Date.now()}function be(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=pt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function ve(t,e,n){for(var r,i=(we.tweeners[e]||[]).concat(we.tweeners["*"]),s=0,o=i.length;s<o;s++)if(r=i[s].call(n,e,t))return r}function we(t,e,n){var r,i,s=0,o=we.prefilters.length,a=O.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=de||ye(),n=Math.max(0,h.startTime+h.duration-e),r=1-(n/h.duration||0),s=0,o=h.tweens.length;s<o;s++)h.tweens[s].run(r);return a.notifyWith(t,[h,r,n]),r<1&&o?n:(o||a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:O.extend({},e),opts:O.extend(!0,{specialEasing:{},easing:O.easing._default},n),originalProperties:e,originalOptions:n,startTime:de||ye(),duration:n.duration,tweens:[],createTween:function(e,n){var r=O.Tween(t,h.opts,e,n,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(r),r},stop:function(e){var n=0,r=e?h.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)h.tweens[n].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),l=h.props;for(function(t,e){var n,r,i,s,o;for(n in t)if(i=e[r=it(n)],s=t[n],Array.isArray(s)&&(i=s[1],s=t[n]=s[0]),n!==r&&(t[r]=s,delete t[n]),(o=O.cssHooks[r])&&"expand"in o)for(n in s=o.expand(s),delete t[r],s)n in t||(t[n]=s[n],e[n]=i);else e[r]=i}(l,h.opts.specialEasing);s<o;s++)if(r=we.prefilters[s].call(h,t,l,h.opts))return y(r.stop)&&(O._queueHooks(h.elem,h.opts.queue).stop=r.stop.bind(r)),r;return O.map(l,ve,h),y(h.opts.start)&&h.opts.start.call(t,h),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always),O.fx.timer(O.extend(u,{elem:t,anim:h,queue:h.opts.queue})),h}O.Animation=O.extend(we,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return vt(n.elem,t,ft.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(U);for(var n,r=0,i=t.length;r<i;r++)n=t[r],we.tweeners[n]=we.tweeners[n]||[],we.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,s,o,a,u,h,l,c="width"in e||"height"in e,d=this,f={},p=t.style,m=t.nodeType&&bt(t),g=at.get(t,"fxshow");for(r in n.queue||(null==(o=O._queueHooks(t,"fx")).unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,d.always((function(){d.always((function(){o.unqueued--,O.queue(t,"fx").length||o.empty.fire()}))}))),e)if(i=e[r],pe.test(i)){if(delete e[r],s=s||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}f[r]=g&&g[r]||O.style(t,r)}if((u=!O.isEmptyObject(e))||!O.isEmptyObject(f))for(r in c&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(h=g&&g.display)&&(h=at.get(t,"display")),"none"===(l=O.css(t,"display"))&&(h?l=h:(_t([t],!0),h=t.style.display||h,l=O.css(t,"display"),_t([t]))),("inline"===l||"inline-block"===l&&null!=h)&&"none"===O.css(t,"float")&&(u||(d.done((function(){p.display=h})),null==h&&(l=p.display,h="none"===l?"":l)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(g?"hidden"in g&&(m=g.hidden):g=at.access(t,"fxshow",{display:h}),s&&(g.hidden=!m),m&&_t([t],!0),d.done((function(){for(r in m||_t([t]),at.remove(t,"fxshow"),f)O.style(t,r,f[r])}))),u=ve(m?g[r]:0,r,d),r in g||(g[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?we.prefilters.unshift(t):we.prefilters.push(t)}}),O.speed=function(t,e,n){var r=t&&"object"==typeof t?O.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return O.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in O.fx.speeds?r.duration=O.fx.speeds[r.duration]:r.duration=O.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&O.dequeue(this,r.queue)},r},O.fn.extend({fadeTo:function(t,e,n,r){return this.filter(bt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=O.isEmptyObject(t),s=O.speed(e,n,r),o=function(){var e=we(this,O.extend({},t),s);(i||at.get(this,"finish"))&&e.stop(!0)};return o.finish=o,i||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",s=O.timers,o=at.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&me.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem!==this||null!=t&&s[i].queue!==t||(s[i].anim.stop(n),e=!1,s.splice(i,1));!e&&n||O.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=at.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],s=O.timers,o=r?r.length:0;for(n.finish=!0,O.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<o;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),O.each(["toggle","show","hide"],(function(t,e){var n=O.fn[e];O.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(be(e,!0),t,r,i)}})),O.each({slideDown:be("show"),slideUp:be("hide"),slideToggle:be("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){O.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),O.timers=[],O.fx.tick=function(){var t,e=0,n=O.timers;for(de=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||O.fx.stop(),de=void 0},O.fx.timer=function(t){O.timers.push(t),O.fx.start()},O.fx.interval=13,O.fx.start=function(){fe||(fe=!0,ge())},O.fx.stop=function(){fe=null},O.fx.speeds={slow:600,fast:200,_default:400},O.fn.delay=function(t,e){return t=O.fx&&O.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=v.createElement("input"),e=v.createElement("select").appendChild(v.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=v.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var xe,_e=O.expr.attrHandle;O.fn.extend({attr:function(t,e){return tt(this,O.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){O.removeAttr(this,t)}))}}),O.extend({attr:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?O.prop(t,e,n):(1===s&&O.isXMLDoc(t)||(i=O.attrHooks[e.toLowerCase()]||(O.expr.match.bool.test(e)?xe:void 0)),void 0!==n?null===n?void O.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=O.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&P(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(U);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?O.removeAttr(t,n):t.setAttribute(n,n),n}},O.each(O.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=_e[e]||O.find.attr;_e[e]=function(t,e,r){var i,s,o=e.toLowerCase();return r||(s=_e[o],_e[o]=i,i=null!=n(t,e,r)?o:null,_e[o]=s),i}}));var Se=/^(?:input|select|textarea|button)$/i,Me=/^(?:a|area)$/i;function Oe(t){return(t.match(U)||[]).join(" ")}function Ce(t){return t.getAttribute&&t.getAttribute("class")||""}function Pe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(U)||[]}O.fn.extend({prop:function(t,e){return tt(this,O.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[O.propFix[t]||t]}))}}),O.extend({prop:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&O.isXMLDoc(t)||(e=O.propFix[e]||e,i=O.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=O.find.attr(t,"tabindex");return e?parseInt(e,10):Se.test(t.nodeName)||Me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(O.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),O.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){O.propFix[this.toLowerCase()]=this})),O.fn.extend({addClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){O(this).addClass(t.call(this,e,Ce(this)))})):(e=Pe(t)).length?this.each((function(){if(r=Ce(this),n=1===this.nodeType&&" "+Oe(r)+" "){for(s=0;s<e.length;s++)i=e[s],n.indexOf(" "+i+" ")<0&&(n+=i+" ");o=Oe(n),r!==o&&this.setAttribute("class",o)}})):this},removeClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){O(this).removeClass(t.call(this,e,Ce(this)))})):arguments.length?(e=Pe(t)).length?this.each((function(){if(r=Ce(this),n=1===this.nodeType&&" "+Oe(r)+" "){for(s=0;s<e.length;s++)for(i=e[s];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");o=Oe(n),r!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,s,o=typeof t,a="string"===o||Array.isArray(t);return y(t)?this.each((function(n){O(this).toggleClass(t.call(this,n,Ce(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Pe(t),this.each((function(){if(a)for(s=O(this),i=0;i<n.length;i++)r=n[i],s.hasClass(r)?s.removeClass(r):s.addClass(r);else void 0!==t&&"boolean"!==o||((r=Ce(this))&&at.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":at.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+Oe(Ce(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ne=/\r/g;O.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,O(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=O.map(i,(function(t){return null==t?"":t+""}))),(e=O.valHooks[this.type]||O.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=O.valHooks[i.type]||O.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ne,""):null==n?"":n:void 0}}),O.extend({valHooks:{option:{get:function(t){var e=O.find.attr(t,"value");return null!=e?e:Oe(O.text(t))}},select:{get:function(t){var e,n,r,i=t.options,s=t.selectedIndex,o="select-one"===t.type,a=o?null:[],u=o?s+1:i.length;for(r=s<0?u:o?s:0;r<u;r++)if(((n=i[r]).selected||r===s)&&!n.disabled&&(!n.parentNode.disabled||!P(n.parentNode,"optgroup"))){if(e=O(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,s=O.makeArray(e),o=i.length;o--;)((r=i[o]).selected=O.inArray(O.valHooks.option.get(r),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),O.each(["radio","checkbox"],(function(){O.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=O.inArray(O(t).val(),e)>-1}},g.checkOn||(O.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Te=r.location,Ee={guid:Date.now()},Ae=/\?/;O.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||O.error("Invalid XML: "+(n?O.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var je=/^(?:focusinfocus|focusoutblur)$/,De=function(t){t.stopPropagation()};O.extend(O.event,{trigger:function(t,e,n,i){var s,o,a,u,h,l,c,d,p=[n||v],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(o=d=a=n=n||v,3!==n.nodeType&&8!==n.nodeType&&!je.test(m+O.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),h=m.indexOf(":")<0&&"on"+m,(t=t[O.expando]?t:new O.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:O.makeArray(e,[t]),c=O.event.special[m]||{},i||!c.trigger||!1!==c.trigger.apply(n,e))){if(!i&&!c.noBubble&&!b(n)){for(u=c.delegateType||m,je.test(u+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||v)&&p.push(a.defaultView||a.parentWindow||r)}for(s=0;(o=p[s++])&&!t.isPropagationStopped();)d=o,t.type=s>1?u:c.bindType||m,(l=(at.get(o,"events")||Object.create(null))[t.type]&&at.get(o,"handle"))&&l.apply(o,e),(l=h&&o[h])&&l.apply&&st(o)&&(t.result=l.apply(o,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),e)||!st(n)||h&&y(n[m])&&!b(n)&&((a=n[h])&&(n[h]=null),O.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,De),n[m](),t.isPropagationStopped()&&d.removeEventListener(m,De),O.event.triggered=void 0,a&&(n[h]=a)),t.result}},simulate:function(t,e,n){var r=O.extend(new O.Event,n,{type:t,isSimulated:!0});O.event.trigger(r,null,e)}}),O.fn.extend({trigger:function(t,e){return this.each((function(){O.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return O.event.trigger(t,e,n,!0)}});var ke=/\[\]$/,Le=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,Ie=/^(?:input|select|textarea|keygen)/i;function Fe(t,e,n,r){var i;if(Array.isArray(e))O.each(e,(function(e,i){n||ke.test(t)?r(t,i):Fe(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==_(e))r(t,e);else for(i in e)Fe(t+"["+i+"]",e[i],n,r)}O.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!O.isPlainObject(t))O.each(t,(function(){i(this.name,this.value)}));else for(n in t)Fe(n,t[n],e,i);return r.join("&")},O.fn.extend({serialize:function(){return O.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=O.prop(this,"elements");return t?O.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!O(this).is(":disabled")&&Ie.test(this.nodeName)&&!Be.test(t)&&(this.checked||!Ot.test(t))})).map((function(t,e){var n=O(this).val();return null==n?null:Array.isArray(n)?O.map(n,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:n.replace(Le,"\r\n")}})).get()}});var Re=/%20/g,Ve=/#.*$/,ze=/([?&])_=[^&]*/,qe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Xe=/^(?:GET|HEAD)$/,Ye=/^\/\//,Ge={},He={},Ue="*/".concat("*"),$e=v.createElement("a");function We(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,s=e.toLowerCase().match(U)||[];if(y(n))for(;r=s[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Qe(t,e,n,r){var i={},s=t===He;function o(a){var u;return i[a]=!0,O.each(t[a]||[],(function(t,a){var h=a(e,n,r);return"string"!=typeof h||s||i[h]?s?!(u=h):void 0:(e.dataTypes.unshift(h),o(h),!1)})),u}return o(e.dataTypes[0])||!i["*"]&&o("*")}function Je(t,e){var n,r,i=O.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&O.extend(!0,t,r),t}$e.href=Te.href,O.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Te.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Te.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":O.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Je(Je(t,O.ajaxSettings),e):Je(O.ajaxSettings,t)},ajaxPrefilter:We(Ge),ajaxTransport:We(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,s,o,a,u,h,l,c,d,f=O.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?O(p):O.event,g=O.Deferred(),y=O.Callbacks("once memory"),b=f.statusCode||{},w={},x={},_="canceled",S={readyState:0,getResponseHeader:function(t){var e;if(h){if(!o)for(o={};e=qe.exec(s);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return h?s:null},setRequestHeader:function(t,e){return null==h&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==h&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)S.always(t[S.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||_;return n&&n.abort(e),M(0,e),this}};if(g.promise(S),f.url=((t||f.url||Te.href)+"").replace(Ye,Te.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(U)||[""],null==f.crossDomain){u=v.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=$e.protocol+"//"+$e.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=O.param(f.data,f.traditional)),Qe(Ge,f,e,S),h)return S;for(c in(l=O.event&&f.global)&&0==O.active++&&O.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Xe.test(f.type),i=f.url.replace(Ve,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Re,"+")):(d=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ae.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(ze,"$1"),d=(Ae.test(i)?"&":"?")+"_="+Ee.guid+++d),f.url=i+d),f.ifModified&&(O.lastModified[i]&&S.setRequestHeader("If-Modified-Since",O.lastModified[i]),O.etag[i]&&S.setRequestHeader("If-None-Match",O.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&S.setRequestHeader("Content-Type",f.contentType),S.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ue+"; q=0.01":""):f.accepts["*"]),f.headers)S.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(!1===f.beforeSend.call(p,S,f)||h))return S.abort();if(_="abort",y.add(f.complete),S.done(f.success),S.fail(f.error),n=Qe(He,f,e,S)){if(S.readyState=1,l&&m.trigger("ajaxSend",[S,f]),h)return S;f.async&&f.timeout>0&&(a=r.setTimeout((function(){S.abort("timeout")}),f.timeout));try{h=!1,n.send(w,M)}catch(t){if(h)throw t;M(-1,t)}}else M(-1,"No Transport");function M(t,e,o,u){var c,d,v,w,x,_=e;h||(h=!0,a&&r.clearTimeout(a),n=void 0,s=u||"",S.readyState=t>0?4:0,c=t>=200&&t<300||304===t,o&&(w=function(t,e,n){for(var r,i,s,o,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)s=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==u[0]&&u.unshift(s),n[s]}(f,S,o)),!c&&O.inArray("script",f.dataTypes)>-1&&O.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,s,o,a,u,h={},l=t.dataTypes.slice();if(l[1])for(o in t.converters)h[o.toLowerCase()]=t.converters[o];for(s=l.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=s,s=l.shift())if("*"===s)s=u;else if("*"!==u&&u!==s){if(!(o=h[u+" "+s]||h["* "+s]))for(i in h)if((a=i.split(" "))[1]===s&&(o=h[u+" "+a[0]]||h["* "+a[0]])){!0===o?o=h[i]:!0!==h[i]&&(s=a[0],l.unshift(a[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+u+" to "+s}}}return{state:"success",data:e}}(f,w,S,c),c?(f.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(O.lastModified[i]=x),(x=S.getResponseHeader("etag"))&&(O.etag[i]=x)),204===t||"HEAD"===f.type?_="nocontent":304===t?_="notmodified":(_=w.state,d=w.data,c=!(v=w.error))):(v=_,!t&&_||(_="error",t<0&&(t=0))),S.status=t,S.statusText=(e||_)+"",c?g.resolveWith(p,[d,_,S]):g.rejectWith(p,[S,_,v]),S.statusCode(b),b=void 0,l&&m.trigger(c?"ajaxSuccess":"ajaxError",[S,f,c?d:v]),y.fireWith(p,[S,_]),l&&(m.trigger("ajaxComplete",[S,f]),--O.active||O.event.trigger("ajaxStop")))}return S},getJSON:function(t,e,n){return O.get(t,e,n,"json")},getScript:function(t,e){return O.get(t,void 0,e,"script")}}),O.each(["get","post"],(function(t,e){O[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),O.ajax(O.extend({url:t,type:e,dataType:i,data:n,success:r},O.isPlainObject(t)&&t))}})),O.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),O._evalUrl=function(t,e,n){return O.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){O.globalEval(t,e,n)}})},O.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=O(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){O(this).wrapInner(t.call(this,e))})):this.each((function(){var e=O(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){O(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){O(this).replaceWith(this.childNodes)})),this}}),O.expr.pseudos.hidden=function(t){return!O.expr.pseudos.visible(t)},O.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},O.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ke={0:200,1223:204},Ze=O.ajaxSettings.xhr();g.cors=!!Ze&&"withCredentials"in Ze,g.ajax=Ze=!!Ze,O.ajaxTransport((function(t){var e,n;if(g.cors||Ze&&!t.crossDomain)return{send:function(i,s){var o,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];for(o in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Ke[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),O.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),O.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return O.globalEval(t),t}}}),O.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),O.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=O("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),v.head.appendChild(e[0])},abort:function(){n&&n()}}}));var tn,en=[],nn=/(=)\?(?=&|$)|\?\?/;O.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=en.pop()||O.expando+"_"+Ee.guid++;return this[t]=!0,t}}),O.ajaxPrefilter("json jsonp",(function(t,e,n){var i,s,o,a=!1!==t.jsonp&&(nn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(nn,"$1"+i):!1!==t.jsonp&&(t.url+=(Ae.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||O.error(i+" was not called"),o[0]},t.dataTypes[0]="json",s=r[i],r[i]=function(){o=arguments},n.always((function(){void 0===s?O(r).removeProp(i):r[i]=s,t[i]&&(t.jsonpCallback=e.jsonpCallback,en.push(i)),o&&y(s)&&s(o[0]),o=s=void 0})),"script"})),g.createHTMLDocument=((tn=v.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===tn.childNodes.length),O.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((r=(e=v.implementation.createHTMLDocument("")).createElement("base")).href=v.location.href,e.head.appendChild(r)):e=v),s=!n&&[],(i=V.exec(t))?[e.createElement(i[1])]:(i=jt([t],e,s),s&&s.length&&O(s).remove(),O.merge([],i.childNodes)));var r,i,s},O.fn.load=function(t,e,n){var r,i,s,o=this,a=t.indexOf(" ");return a>-1&&(r=Oe(t.slice(a)),t=t.slice(0,a)),y(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),o.length>0&&O.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){s=arguments,o.html(r?O("<div>").append(O.parseHTML(t)).find(r):t)})).always(n&&function(t,e){o.each((function(){n.apply(this,s||[t.responseText,e,t])}))}),this},O.expr.pseudos.animated=function(t){return O.grep(O.timers,(function(e){return t===e.elem})).length},O.offset={setOffset:function(t,e,n){var r,i,s,o,a,u,h=O.css(t,"position"),l=O(t),c={};"static"===h&&(t.style.position="relative"),a=l.offset(),s=O.css(t,"top"),u=O.css(t,"left"),("absolute"===h||"fixed"===h)&&(s+u).indexOf("auto")>-1?(o=(r=l.position()).top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,O.extend({},a))),null!=e.top&&(c.top=e.top-a.top+o),null!=e.left&&(c.left=e.left-a.left+i),"using"in e?e.using.call(t,c):l.css(c)}},O.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){O.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===O.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===O.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=O(t).offset()).top+=O.css(t,"borderTopWidth",!0),i.left+=O.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-O.css(r,"marginTop",!0),left:e.left-i.left-O.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===O.css(t,"position");)t=t.offsetParent;return t||mt}))}}),O.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;O.fn[t]=function(r){return tt(this,(function(t,r,i){var s;if(b(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===i)return s?s[e]:t[r];s?s.scrollTo(n?s.pageXOffset:i,n?i:s.pageYOffset):t[r]=i}),t,r,arguments.length)}})),O.each(["top","left"],(function(t,e){O.cssHooks[e]=te(g.pixelPosition,(function(t,n){if(n)return n=Zt(t,e),$t.test(n)?O(t).position()[e]+"px":n}))})),O.each({Height:"height",Width:"width"},(function(t,e){O.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){O.fn[r]=function(i,s){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===s?"margin":"border");return tt(this,(function(e,n,i){var s;return b(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===i?O.css(e,n,a):O.style(e,n,i,a)}),e,o?i:void 0,o)}}))})),O.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){O.fn[e]=function(t){return this.on(e,t)}})),O.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),O.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){O.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;O.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=a.call(arguments,2),i=function(){return t.apply(e||this,r.concat(a.call(arguments)))},i.guid=t.guid=t.guid||O.guid++,i},O.holdReady=function(t){t?O.readyWait++:O.ready(!0)},O.isArray=Array.isArray,O.parseJSON=JSON.parse,O.nodeName=P,O.isFunction=y,O.isWindow=b,O.camelCase=it,O.type=_,O.now=Date.now,O.isNumeric=function(t){var e=O.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},O.trim=function(t){return null==t?"":(t+"").replace(rn,"$1")},void 0===(n=function(){return O}.apply(e,[]))||(t.exports=n);var sn=r.jQuery,on=r.$;return O.noConflict=function(t){return r.$===O&&(r.$=on),t&&r.jQuery===O&&(r.jQuery=sn),O},void 0===i&&(r.jQuery=r.$=O),O}))},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{BasesLayoutForm:()=>Ir});var t={};n.r(t),n.d(t,{cx:()=>me,cy:()=>ge,height:()=>be,rx:()=>ce,ry:()=>de,width:()=>ye,x:()=>fe,y:()=>pe});var e={};n.r(e),n.d(e,{from:()=>_e,to:()=>Se});var i={};n.r(i),n.d(i,{MorphArray:()=>Te,height:()=>De,width:()=>je,x:()=>Ee,y:()=>Ae});var s={};n.r(s),n.d(s,{array:()=>un,clear:()=>hn,move:()=>ln,plot:()=>cn,size:()=>dn});var o={};n.r(o),n.d(o,{amove:()=>Vn,ax:()=>Fn,ay:()=>Rn,build:()=>zn,center:()=>In,cx:()=>Ln,cy:()=>Bn,length:()=>An,move:()=>kn,plain:()=>En,x:()=>jn,y:()=>Dn});var a={};n.r(a),n.d(a,{dmove:()=>Un,dx:()=>$n,dy:()=>Wn,height:()=>Qn,move:()=>Jn,size:()=>Kn,width:()=>Zn,x:()=>tr,y:()=>er});var u=n(692),h=n(72),l=n.n(h),c=n(825),d=n.n(c),f=n(659),p=n.n(f),m=n(56),g=n.n(m),y=n(540),b=n.n(y),v=n(113),w=n.n(v),x=n(660),_={};_.styleTagTransform=w(),_.setAttributes=g(),_.insert=p().bind(null,"head"),_.domAPI=d(),_.insertStyleElement=b(),l()(x.Ay,_),x.Ay&&x.Ay.locals&&x.Ay.locals;var S=n(7),M={};M.styleTagTransform=w(),M.setAttributes=g(),M.insert=p().bind(null,"head"),M.domAPI=d(),M.insertStyleElement=b(),l()(S.A,M),S.A&&S.A.locals&&S.A.locals;var O=n(592),C={};C.styleTagTransform=w(),C.setAttributes=g(),C.insert=p().bind(null,"head"),C.domAPI=d(),C.insertStyleElement=b(),l()(O.Ay,C),O.Ay&&O.Ay.locals&&O.Ay.locals;class P{constructor(t){this.selectedBases=t,this.numSpan=document.createElement("span"),u(this.numSpan).addClass(O.bw),this.trailingText=document.createElement("span"),this.domNode=document.createElement("p"),u(this.domNode).addClass(O.JU).append(this.numSpan,this.trailingText)}refresh(){let t=[...this.selectedBases].length;this.numSpan.textContent=t.toString(),this.trailingText.textContent=1==t?" base is selected.":" bases are selected."}}var N=n(667),T={};T.styleTagTransform=w(),T.setAttributes=g(),T.insert=p().bind(null,"head"),T.domAPI=d(),T.insertStyleElement=b(),l()(N.Ay,T),N.Ay&&N.Ay.locals&&N.Ay.locals;var E=n(61),A={};function j(){let t=document.createElement("input");return u(t).attr({type:"text"}).addClass(E._),t}A.styleTagTransform=w(),A.setAttributes=g(),A.insert=p().bind(null,"head"),A.domAPI=d(),A.insertStyleElement=b(),l()(E.A,A),E.A&&E.A.locals&&E.A.locals;var D=n(713),k={};function L(t,e){let n=document.createElement("label"),r=document.createElement("span");return u(r).append(t).css({paddingLeft:"8px"}),u(n).addClass(D.k).append(e,r),n}k.styleTagTransform=w(),k.setAttributes=g(),k.insert=p().bind(null,"head"),k.domAPI=d(),k.insertStyleElement=b(),l()(D.A,k),D.A&&D.A.locals&&D.A.locals;var B=n(661),I=n(854),F=n(986);class R{constructor(t,e,n){this.domNode=j(),this.coordinateName=t,this.selectedBases=e,this.options=n,this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()})),this.refresh()}refresh(){let t=new B.Centroid([...this.selectedBases]).get()[this.coordinateName];this.domNode.value=Number.parseFloat(t.toFixed(2)).toString()}handleSubmit(){var t,e;let n=Number.parseFloat(this.domNode.value);if(!(0,I.isFiniteNumber)(n))return;let r=new B.Centroid([...this.selectedBases]);(0,F.areWithin)(n,r.get()[this.coordinateName],.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set({x:r.get().x,y:r.get().y,[this.coordinateName]:n}),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases())}}class V{constructor(t,e){this.selectedBases=t,this.centroidXInput=new R("x",t,e),this.centroidYInput=new R("y",t,e);let n=L("X",this.centroidXInput.domNode),r=L("Y",this.centroidYInput.domNode);u(r).css({marginTop:"11px"});let i=document.createElement("div");u(i).append(n,r).css({display:"flex",flexDirection:"column"});let s=document.createElement("p");u(s).addClass(N.W5).append("Center"),this.domNode=document.createElement("div"),u(this.domNode).addClass(N.ML).append(i,s)}refresh(){this.centroidXInput.refresh(),this.centroidYInput.refresh()}}const z={},q=[];function X(t,e){if(Array.isArray(t))for(const n of t)X(n,e);else if("object"!=typeof t)G(Object.getOwnPropertyNames(e)),z[t]=Object.assign(z[t]||{},e);else for(const e in t)X(e,t[e])}function Y(t){return z[t]||{}}function G(t){q.push(...t)}function H(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function U(t){return t%360*Math.PI/180}function $(t){return t.charAt(0).toUpperCase()+t.slice(1)}function W(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function Q(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const J=new Set(["desc","metadata","title"]),K=t=>J.has(t.nodeName),Z=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},tt="http://www.w3.org/2000/svg",et="http://www.w3.org/2000/xmlns/",nt="http://www.w3.org/1999/xlink",rt={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class it{}const st={},ot="___SYMBOL___ROOT___";function at(t,e=tt){return rt.document.createElementNS(e,t)}function ut(t,e=!1){if(t instanceof it)return t;if("object"==typeof t)return ct(t);if(null==t)return new st[ot];if("string"==typeof t&&"<"!==t.charAt(0))return ct(rt.document.querySelector(t));const n=e?rt.document.createElement("div"):at("svg");return n.innerHTML=t,t=ct(n.firstChild),n.removeChild(n.firstChild),t}function ht(t,e){return e&&(e instanceof rt.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:at(t)}function lt(t){if(!t)return null;if(t.instance instanceof it)return t.instance;if("#document-fragment"===t.nodeName)return new st.Fragment(t);let e=$(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":st[e]||(e="Dom"),new st[e](t)}let ct=lt;function dt(t,e=t.name,n=!1){return st[e]=t,n&&(st[ot]=t),G(Object.getOwnPropertyNames(t.prototype)),t}let ft=1e3;function pt(t){return"Svgjs"+$(t)+ft++}function mt(t){for(let e=t.children.length-1;e>=0;e--)mt(t.children[e]);return t.id?(t.id=pt(t.nodeName),t):t}function gt(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function yt(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}X("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=ut(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=ut(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=ut(t)).before(this),this},insertAfter:function(t){return(t=ut(t)).after(this),this}});const bt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,vt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,wt=/rgb\((\d+),(\d+),(\d+)\)/,xt=/(#[a-z_][a-z0-9\-_]*)/i,_t=/\)\s*,?\s*/,St=/\s/g,Mt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Ot=/^rgb\(/,Ct=/^(\s+)?$/,Pt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Nt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Tt=/[\s,]+/,Et=/[MLHVCSQTAZ]/i;function At(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function jt(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function Dt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}X("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Tt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),X("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||Ct.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||Ct.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),X("Dom",{data:function(t,e,n){if(null==t)return this.data(H(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),X("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class kt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof kt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new kt(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new kt(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new kt(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new kt(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new kt(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new kt(t,e,r,"lab")}if("grey"===t){const t=255*n();return new kt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Mt.test(t)||Ot.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new kt(0,0,0,1,"cmyk"):new kt((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new kt(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=jt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:jt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:jt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:jt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:jt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:jt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(Ot.test(t)){const e=t.replace(St,""),[n,r,i]=wt.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Mt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=vt.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new kt(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new kt(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new kt(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new kt(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*Dt(i,r,t+1/3),o=255*Dt(i,r,t),a=255*Dt(i,r,t-1/3);return new kt(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new kt(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(At);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new kt(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class Lt{constructor(...t){this.init(...t)}clone(){return new Lt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){It.isMatrixLike(t)||(t=new It(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function Bt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class It{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new Lt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new Lt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new Lt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new Lt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:v.x,ry:v.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new It(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new It(t);return Bt(this.a,e.a)&&Bt(this.b,e.b)&&Bt(this.c,e.c)&&Bt(this.d,e.d)&&Bt(this.e,e.e)&&Bt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=It.fromArray([1,0,0,1,0,0]);return t=t instanceof oe?t.matrixify():"string"==typeof t?It.fromArray(t.split(Tt).map(parseFloat)):Array.isArray(t)?It.fromArray(t):"object"==typeof t&&It.isMatrixLike(t)?t:"object"==typeof t?(new It).transform(t):6===arguments.length?It.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof It?t:new It(t);return It.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof It?t:new It(t);return It.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=U(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=U(t),e=U(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(It.isMatrixLike(t))return new It(t).multiplyO(this);const e=It.formatTransforms(t),{x:n,y:r}=new Lt(e.ox,e.oy).transform(this),i=(new It).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new Lt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Ft(){if(!Ft.nodes){const t=ut().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){const t=rt.document.body||rt.document.documentElement;Ft.nodes.svg.addTo(t)}return Ft.nodes}function Rt(t){return!(t.width||t.height||t.x||t.y)}dt(It,"Matrix");class Vt{constructor(...t){this.init(...t)}addOffset(){return this.x+=rt.window.pageXOffset,this.y+=rt.window.pageYOffset,new Vt(this)}init(t){return t="string"==typeof t?t.split(Tt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Rt(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new Vt(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof It||(t=new It(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new Lt(this.x,this.y),new Lt(this.x2,this.y),new Lt(this.x,this.y2),new Lt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new Vt(e,r,n-e,i-r)}}function zt(t,e,n){let r;try{if(r=e(t.node),Rt(r)&&(i=t.node)!==rt.document&&!(rt.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===rt.document}).call(rt.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}X({viewbox:{viewbox(t,e,n,r){return null==t?new Vt(this.attr("viewBox")):this.attr("viewBox",new Vt(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new Lt(n/2/s+i.x,r/2/o+i.y);const h=new Vt(i).transform(new It({scale:u,origin:e}));return this.viewbox(h)}}}),dt(Vt,"Box");class qt extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const Xt=qt;gt([qt],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const Yt=["toArray","constructor","each"];function Gt(t,e){return new Xt(H((e||rt.document).querySelectorAll(t),(function(t){return lt(t)})))}qt.extend=function(t){t=t.reduce(((t,e)=>(Yt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),gt([qt],t)};let Ht=0;const Ut={};function $t(t){let e=t.getEventHolder();return e===rt.window&&(e=Ut),e.events||(e.events={}),e.events}function Wt(t){return t.getEventTarget()}function Qt(t,e,n,r,i){const s=n.bind(r||t),o=ut(t),a=$t(o),u=Wt(o);e=Array.isArray(e)?e:e.split(Tt),n._svgjsListenerId||(n._svgjsListenerId=++Ht),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function Jt(t,e,n,r){const i=ut(t),s=$t(i),o=Wt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Tt)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])Jt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&Jt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])Jt(o,[e,u].join("."));delete s[e]}}else{for(t in s)Jt(o,t);!function(t){let e=t.getEventHolder();e===rt.window&&(e=Ut),e.events&&(e.events={})}(i)}}))}class Kt extends it{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=Wt(t);return e instanceof rt.window.Event||(e=new rt.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return Jt(this,t,e,n),this}on(t,e,n,r){return Qt(this,t,e,n,r),this}removeEventListener(){}}function Zt(){}dt(Kt,"EventTarget");const te={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class ee extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Tt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class ne{constructor(...t){this.init(...t)}convert(t){return new ne(this.value,t)}divide(t){return t=new ne(t),new ne(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(bt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof ne&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new ne(t),new ne(this-t,this.unit||t.unit)}plus(t){return t=new ne(t),new ne(this+t,this.unit||t.unit)}times(t){return t=new ne(t),new ne(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const re=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),ie=[];class se extends Kt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=ut(t)).removeNamespace&&this.node instanceof rt.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return ut(t).put(this,e)}children(){return new Xt(H(this.node.children,(function(t){return lt(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=mt(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new se(at(t),e))}first(){return lt(this.node.firstChild)}get(t){return lt(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=pt(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return lt(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=lt(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=lt(e.node.parentNode));return e}put(t,e){return t=ut(t),this.add(t,e),t}putIn(t,e){return ut(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=ut(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,tt)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=lt(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=at("wrapper",n),i=rt.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}gt(se,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=Pt.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?te[t]:Pt.test(e)?parseFloat(e):e;"number"==typeof(e=ie.reduce(((e,n)=>n(t,e,this)),e))?e=new ne(e):re.has(t)&&kt.isColor(e)?e=new kt(e):e.constructor===Array&&(e=new ee(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Gt(t,this.node)},findOne:function(t){return lt(this.node.querySelector(t))}}),dt(se,"Dom");class oe extends se{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new ne(t).plus(this.x()))}dy(t=0){return this.y(new ne(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=ut(t));const n=new Xt;let r=this;for(;(r=r.parent())&&r.node!==rt.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(xt);return e?ut(e[1]):null}root(){const t=this.parent(st[ot]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=W(this,t,e);return this.width(new ne(n.width)).height(new ne(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return Z(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}gt(oe,{bbox:function(){const t=zt(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(Ft().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new Vt(t)},rbox:function(t){const e=zt(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new Vt(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new Lt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new It(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new It(e)}return new It(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new It}}}),dt(oe,"Element");const ae={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof kt||kt.isRgb(e)||e instanceof oe)this.attr(t,e);else for(n=ae[t].length-1;n>=0;n--)null!=e[ae[t][n]]&&this.attr(ae.prefix(t,ae[t][n]),e[ae[t][n]]);return this},X(["Element","Runner"],e)})),X(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new It(this):this.attr("transform",new It(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),X("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new ne(t)):this.rx(t).ry(e)}}),X("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Lt(this.node.getPointAtLength(t))}}),X(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),X("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),X("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(_t).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Tt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(It.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new It)},toParent:function(t,e){if(this===t)return this;if(K(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new It(this).decompose();return null==t?e:e[t]}It.isMatrixLike(t)||(t={...t,origin:Q(t,this)});const n=new It(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class ue extends oe{flatten(){return this.each((function(){if(this instanceof ue)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}dt(ue,"Container");class he extends ue{constructor(t,e=t){super(ht("defs",t),e)}flatten(){return this}ungroup(){return this}}dt(he,"Defs");class le extends oe{}function ce(t){return this.attr("rx",t)}function de(t){return this.attr("ry",t)}function fe(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function pe(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function me(t){return this.attr("cx",t)}function ge(t){return this.attr("cy",t)}function ye(t){return null==t?2*this.rx():this.rx(new ne(t).divide(2))}function be(t){return null==t?2*this.ry():this.ry(new ne(t).divide(2))}dt(le,"Shape");class ve extends le{constructor(t,e=t){super(ht("ellipse",t),e)}size(t,e){const n=W(this,t,e);return this.rx(new ne(n.width).divide(2)).ry(new ne(n.height).divide(2))}}gt(ve,t),X("Container",{ellipse:yt((function(t=0,e=t){return this.put(new ve).size(t,e).move(0,0)}))}),dt(ve,"Ellipse");class we extends se{constructor(t=rt.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new se(at("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}dt(we,"Fragment");const xe=we;function _e(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new ne(t),fy:new ne(e)}):this.attr({x1:new ne(t),y1:new ne(e)})}function Se(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new ne(t),cy:new ne(e)}):this.attr({x2:new ne(t),y2:new ne(e)})}class Me extends ue{constructor(t,e){super(ht(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new Vt}targets(){return Gt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}gt(Me,e),X({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:yt((function(t,e){return this.put(new Me(t)).update(e)}))}}),dt(Me,"Gradient");class Oe extends ue{constructor(t,e=t){super(ht("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new Vt}targets(){return Gt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}X({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:yt((function(t,e,n){return this.put(new Oe).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),dt(Oe,"Pattern");class Ce extends le{constructor(t,e=t){super(ht("image",t),e)}load(t,e){if(!t)return this;const n=new rt.window.Image;return Qt(n,"load",(function(t){const r=this.parent(Oe);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Oe&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Qt(n,"load error",(function(){Jt(n)})),this.attr("href",n.src=t,nt)}}var Pe;Pe=function(t,e,n){return"fill"!==t&&"stroke"!==t||Nt.test(e)&&(e=n.root().defs().image(e)),e instanceof Ce&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},ie.push(Pe),X({Container:{image:yt((function(t,e){return this.put(new Ce).size(0,0).load(t,e)}))}}),dt(Ce,"Image");class Ne extends ee{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new Vt(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Tt).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){It.isMatrixLike(t)||(t=new It(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Te=Ne;function Ee(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Ae(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function je(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function De(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ke extends le{constructor(t,e=t){super(ht("line",t),e)}array(){return new Ne([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Ne(t).toLine(),this.attr(t))}size(t,e){const n=W(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}gt(ke,i),X({Container:{line:yt((function(...t){return ke.prototype.plot.apply(this.put(new ke),null!=t[0]?t:[0,0,0,0])}))}}),dt(ke,"Line");class Le extends ue{constructor(t,e=t){super(ht("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Be(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}X({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:yt((function(t,e,n){return this.put(new Le).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Le?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),dt(Le,"Marker");const Ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class Fe{done(){return!1}}class Re extends Fe{constructor(t=">"){super(),this.ease=Ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class Ve extends Fe{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ze(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}gt(class extends Ve{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:Be("_duration",ze),overshoot:Be("_overshoot",ze)}),gt(class extends Ve{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:Be("_windup"),p:Be("P"),i:Be("I"),d:Be("D")});const qe={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Xe={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ye="mlhvqtcsaz".split("");for(let t=0,e=Ye.length;t<e;++t)Xe[Ye[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return Xe[t](e,n,r)}}(Ye[t].toUpperCase());function Ge(t){return t.segment.length&&t.segment.length-1===qe[t.segment[0].toUpperCase()]}function He(t,e){t.inNumber&&Ue(t,!1);const n=Et.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Ue(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,Ge(t)&&$e(t)}function $e(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return Xe[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function We(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function Qe(t){return"E"===t.lastToken.toUpperCase()}const Je=new Set([" ",",","\t","\n","\r","\f"]);class Ke extends ee{bbox(){return Ft().path.setAttribute("d",this.toString()),new Vt(Ft.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new Lt,p:new Lt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!He(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Je.has(r))i.inNumber&&Ue(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Et.test(r)){if(i.inNumber)Ue(i,!1);else{if(!Ge(i))throw new Error("parser Error");$e(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Qe(i)){Ue(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||We(i)){i.inNumber=!0,i.number=r,Ue(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Ue(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Ue(i,!1),i.inSegment&&Ge(i)&&$e(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const Ze=t=>{const e=typeof t;return"number"===e?ne:"string"===e?kt.isColor(t)?kt:Tt.test(t)?Et.test(t)?Ke:ee:bt.test(t)?ne:en:on.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?ee:"object"===e?sn:en};class tn{constructor(t){this._stepper=t||new Re("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ze(t));let e=new this._type(t);return this._type===kt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===sn&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class en{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class nn{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,nn.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}nn.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const rn=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class sn{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===kt&&t[n+7]!==e[n+7]){const e=t[n+7],r=new kt(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=Ze(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(rn),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const on=[en,nn,sn];class an extends le{constructor(t,e=t){super(ht("path",t),e)}array(){return this._array||(this._array=new Ke(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ke(t))}size(t,e){const n=W(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function un(){return this._array||(this._array=new Ne(this.attr("points")))}function hn(){return delete this._array,this}function ln(t,e){return this.attr("points",this.array().move(t,e))}function cn(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Ne(t))}function dn(t,e){const n=W(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}an.prototype.MorphArray=Ke,X({Container:{path:yt((function(t){return this.put(new an).plot(t||new Ke)}))}}),dt(an,"Path");class fn extends le{constructor(t,e=t){super(ht("polygon",t),e)}}X({Container:{polygon:yt((function(t){return this.put(new fn).plot(t||new Ne)}))}}),gt(fn,i),gt(fn,s),dt(fn,"Polygon");class pn extends le{constructor(t,e=t){super(ht("polyline",t),e)}}X({Container:{polyline:yt((function(t){return this.put(new pn).plot(t||new Ne)}))}}),gt(pn,i),gt(pn,s),dt(pn,"Polyline");class mn extends le{constructor(t,e=t){super(ht("rect",t),e)}}gt(mn,{rx:ce,ry:de}),X({Container:{rect:yt((function(t,e){return this.put(new mn).size(t,e)}))}}),dt(mn,"Rect");class gn{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const yn={nextDraw:null,frames:new gn,timeouts:new gn,immediates:new gn,timer:()=>rt.window.performance||rt.window.Date,transforms:[],frame(t){const e=yn.frames.push({run:t});return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),e},timeout(t,e){e=e||0;const n=yn.timer().now()+e,r=yn.timeouts.push({run:t,time:n});return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),r},immediate(t){const e=yn.immediates.push(t);return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),e},cancelFrame(t){null!=t&&yn.frames.remove(t)},clearTimeout(t){null!=t&&yn.timeouts.remove(t)},cancelImmediate(t){null!=t&&yn.immediates.remove(t)},_draw(t){let e=null;const n=yn.timeouts.last();for(;(e=yn.timeouts.shift())&&(t>=e.time?e.run():yn.timeouts.push(e),e!==n););let r=null;const i=yn.frames.last();for(;r!==i&&(r=yn.frames.shift());)r.run(t);let s=null;for(;s=yn.immediates.shift();)s();yn.nextDraw=yn.timeouts.first()||yn.frames.first()?rt.window.requestAnimationFrame(yn._draw):null}},bn=yn,vn=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},wn=function(){const t=rt.window;return(t.performance||t.Date).now()};class xn extends Kt{constructor(t=wn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(vn);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return bn.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=bn.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}X({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new xn,this._timeline):(this._timeline=t,this)}}});class _n extends Kt{constructor(t){super(),this.id=_n.id++,t="function"==typeof(t=null==t?400:t)?new Ve(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Ve,this._stepper=this._isDeclarative?t:new Re,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new It,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof Fe||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=_n.sanitise(t,e,n),i=new _n(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new It,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Re(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||Zt,runner:e||Zt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof xn||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new It,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}_n.id=0;class Sn{constructor(t=new It,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}gt([_n,Sn],{mergeWith(t){return new Sn(t.transforms.lmultiply(this.transforms),t.id)}});const Mn=(t,e)=>t.lmultiplyO(e),On=t=>t.transforms;function Cn(){const t=this._transformationRunners.runners.map(On).reduce(Mn,new It);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Pn{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Sn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}X({Element:{animate(t,e,n){const r=_n.sanitise(t,e,n),i=this.timeline();return new _n(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(On).reduce(Mn,new It)},_addRunner(t){this._transformationRunners.add(t),bn.cancelImmediate(this._frameId),this._frameId=bn.immediate(Cn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Pn).add(new Sn(new It(this))))}}}),gt(_n,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new tn(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new sn(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new sn(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new tn(this._stepper).to(new ne(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=It.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new tn(this._stepper).type(n?nn:It);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||Q(t,o),h=new It(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new Lt(s).transform(o._currentTransform(this));let f=new It({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new It(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=Q(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new ne(e),this._tryRetarget(t,e))return this;const n=new tn(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new ne(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new tn(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new ne(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new tn(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new Vt(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),gt(_n,{rx:ce,ry:de,from:_e,to:Se}),dt(_n,"Runner");class Nn extends ue{constructor(t,e=t){super(ht("svg",t),e),this.namespace()}defs(){return this.isRoot()?lt(this.node.querySelector("defs"))||this.put(new he):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof rt.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:tt,version:"1.1"}).attr("xmlns:xlink",nt,et):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,et).attr("xmlns:svgjs",null,et)}root(){return this.isRoot()?this:super.root()}}X({Container:{nested:yt((function(){return this.put(new Nn)}))}}),dt(Nn,"Svg",!0);class Tn extends ue{constructor(t,e=t){super(ht("symbol",t),e)}}function En(t){return!1===this._build&&this.clear(),this.node.appendChild(rt.document.createTextNode(t)),this}function An(){return this.node.getComputedTextLength()}function jn(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Dn(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function kn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function Ln(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Bn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function In(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function Fn(t){return this.attr("x",t)}function Rn(t){return this.attr("y",t)}function Vn(t,e){return this.ax(t).ay(e)}function zn(t){return this._build=!!t,this}X({Container:{symbol:yt((function(){return this.put(new Tn)}))}}),dt(Tn,"Symbol");class qn extends le{constructor(t,e=t){super(ht("text",t),e),this.dom.leading=this.dom.leading??new ne(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new ne(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(K(this.node))return;const i=rt.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new ne(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new ne(t.leading||1.3),this}writeDataToDom(){return Z(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||K(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===lt(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}gt(qn,o),X({Container:{text:yt((function(t=""){return this.put(new qn).text(t)})),plain:yt((function(t=""){return this.put(new qn).plain(t)}))}}),dt(qn,"Text");class Xn extends le{constructor(t,e=t){super(ht("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof qn))return this;const e=t.index(this),n=rt.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new ne(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}gt(Xn,o),X({Tspan:{tspan:yt((function(t=""){const e=new Xn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),dt(Xn,"Tspan");class Yn extends le{constructor(t,e=t){super(ht("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new ne(t).divide(2))}}gt(Yn,{x:fe,y:pe,cx:me,cy:ge,width:ye,height:be}),X({Container:{circle:yt((function(t=0){return this.put(new Yn).size(t).move(0,0)}))}}),dt(Yn,"Circle");class Gn extends ue{constructor(t,e=t){super(ht("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return Gt("svg [clip-path*="+this.id()+"]")}}X({Container:{clip:yt((function(){return this.defs().put(new Gn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Gn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),dt(Gn,"ClipPath");class Hn extends oe{constructor(t,e=t){super(ht("foreignObject",t),e)}}function Un(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof rt.window.SVGSVGElement?new Vt(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new It(n),s=i.translate(t,e).transform(i.inverse()),o=new Lt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function $n(t){return this.dmove(t,0)}function Wn(t){return this.dmove(0,t)}function Qn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function Jn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function Kn(t,e,n=this.bbox()){const r=W(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new Lt(n).transform(new It(t).inverse());t.scale(i,s,e.x,e.y)})),this}function Zn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function tr(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function er(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}X({Container:{foreignObject:yt((function(t,e){return this.put(new Hn).size(t,e)}))}}),dt(Hn,"ForeignObject");class nr extends ue{constructor(t,e=t){super(ht("g",t),e)}}gt(nr,a),X({Container:{group:yt((function(){return this.put(new nr)}))}}),dt(nr,"G");class rr extends ue{constructor(t,e=t){super(ht("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,nt)}}gt(rr,a),X({Container:{link:yt((function(t){return this.put(new rr).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new rr,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),dt(rr,"A");class ir extends ue{constructor(t,e=t){super(ht("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Gt("svg [mask*="+this.id()+"]")}}X({Container:{mask:yt((function(){return this.defs().put(new ir)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof ir?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),dt(ir,"Mask");class sr extends oe{constructor(t,e=t){super(ht("stop",t),e)}update(t){return("number"==typeof t||t instanceof ne)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new ne(t.offset)),this}}X({Gradient:{stop:function(t,e,n){return this.put(new sr).update(t,e,n)}}}),dt(sr,"Stop");class or extends oe{constructor(t,e=t){super(ht("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}X("Dom",{style(t,e){return this.put(new or).rule(t,e)},fontface(t,e,n){return this.put(new or).font(t,e,n)}}),dt(or,"Style");class ar extends qn{constructor(t,e=t){super(ht("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}X({Container:{textPath:yt((function(t,e){return t instanceof qn||(t=this.text(t)),t.path(e)}))},Text:{path:yt((function(t,e=!0){const n=new ar;let r;if(t instanceof an||(t=this.defs().path(t)),n.attr("href","#"+t,nt),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:yt((function(t){return t instanceof qn||(t=(new qn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Gt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),ar.prototype.MorphArray=Ke,dt(ar,"TextPath");class ur extends le{constructor(t,e=t){super(ht("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,nt)}}X({Container:{use:yt((function(t,e){return this.put(new ur).use(t,e)}))}}),dt(ur,"Use");const hr=ut;gt([Nn,Tn,Ce,Oe,Le],Y("viewbox")),gt([ke,pn,fn,an],Y("marker")),gt(qn,Y("Text")),gt(an,Y("Path")),gt(he,Y("Defs")),gt([qn,Xn],Y("Tspan")),gt([mn,ve,Me,_n],Y("radius")),gt(Kt,Y("EventTarget")),gt(se,Y("Dom")),gt(oe,Y("Element")),gt(le,Y("Shape")),gt([ue,xe],Y("Container")),gt(Me,Y("Gradient")),gt(_n,Y("Runner")),Xt.extend([...new Set(q)]),function(t=[]){on.push(...[].concat(t))}([ne,kt,Vt,It,ee,Ne,Ke,Lt]),gt(on,{to(t){return(new tn).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var lr=n(501),cr={};cr.styleTagTransform=w(),cr.setAttributes=g(),cr.insert=p().bind(null,"head"),cr.domAPI=d(),cr.insertStyleElement=b(),l()(lr.Ay,cr),lr.Ay&&lr.Ay.locals&&lr.Ay.locals;const dr=["Left","Right","Top","Bottom"],fr={Left:B.MinCenterX,Right:B.MaxCenterX,Top:B.MinCenterY,Bottom:B.MaxCenterY};class pr{constructor(t,e,n){this.coordinateName=t,this.Coordinate=fr[t],this.selectedBases=e,this.options=n,this.domNode=j(),this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()}))}refresh(){let t=new(0,this.Coordinate)([...this.selectedBases]);this.domNode.value=Number.parseFloat(t.get().toFixed(2)).toString()}handleSubmit(){var t,e;let n=Number.parseFloat(this.domNode.value);if(!(0,I.isFiniteNumber)(n))return;let r=new(0,this.Coordinate)([...this.selectedBases]);(0,F.areWithin)(n,r.get(),.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set(n),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases)}}class mr{constructor(t,e,n){this.coordinateInput=new pr(t,e,n),this.domNode=L(t,this.coordinateInput.domNode)}refresh(){this.coordinateInput.refresh()}}class gr{constructor(t,e){let n=function(){let t=document.createElement("button");return u(t).addClass(lr.wx).append(function(){let t=hr();return t.addClass(lr.D),t.viewbox(0,0,6,10).attr({width:"6px",height:"10px"}),t.path().attr("d","M 1 1 L 5 5 L 1 9").attr("stroke","black").attr("stroke-width",2).attr("stroke-linecap","round").attr("stroke-linejoin","round").attr("fill","none"),t.node}(),"More Coordinates"),t}(),r=document.createElement("div");this.fields=dr.map((n=>new mr(n,t,e))),u(r).addClass(lr.Qs).append(...this.fields.map((t=>t.domNode))),this.domNode=document.createElement("div"),u(this.domNode).addClass(lr.Ik),u(n).on("click",(()=>u(this.domNode).toggleClass(lr.ho))),u(this.domNode).append(n).append(r)}refresh(){this.fields.forEach((t=>t.refresh()))}}var yr=n(213),br={};br.styleTagTransform=w(),br.setAttributes=g(),br.insert=p().bind(null,"head"),br.domAPI=d(),br.insertStyleElement=b(),l()(yr.A,br),yr.A&&yr.A.locals&&yr.A.locals;var vr=n(725);class wr{constructor(t,e){this.domNode=document.createElement("button"),u(this.domNode).addClass(yr.O).append(function(){let t=hr();return t.viewbox(-3.5,-3.5,25,25).attr({width:"25px",height:"25px"}).css({transform:"rotate(45deg)"}),t.path().attr("d","M 17 9 A 8 8 270 1 1 9 1").attr("stroke","white").attr("stroke-width",1.5).attr("fill","none"),t.path().attr("d","M 9 -3 L 13 1 L 9 5 z").attr("stroke","white").attr("stroke-width",1).attr("fill","white"),t.node}());let n=!1,r=!1,i=0;this.domNode.addEventListener("mousedown",(e=>{n=!0;let r=[...t];if(r.length>0){let t=r[0],n=r[r.length-1];i=(0,vr.direction)((0,vr.midpoint)(t.getCenterClientPoint(),n.getCenterClientPoint()),{x:e.clientX,y:e.clientY})}})),window.addEventListener("mousemove",(s=>{if(n){let n=[...t];if(n.length>0){let t=n[0],o=n[n.length-1],a=(0,vr.direction)((0,vr.midpoint)(t.getCenterClientPoint(),o.getCenterClientPoint()),{x:s.clientX,y:s.clientY});r||!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.rotate)(n,a-i),r=!0,i=a}}})),window.addEventListener("mouseup",(()=>{n&&r&&(!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()),n=!1,r=!1}))}}const xr=String.fromCharCode(176);class _r{constructor(t,e){this.selectedBases=t,this.options=e,this.domNode=j(),this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()}))}refresh(){let t=new B.Direction([...this.selectedBases]);this.domNode.value=Number.parseFloat((0,F.degrees)(t.get()).toFixed(2)).toString(),this.domNode.value+=xr}handleSubmit(){var t,e;let n=(0,F.radians)(Number.parseFloat(this.domNode.value));if(!(0,I.isFiniteNumber)(n))return;let r=new B.Direction([...this.selectedBases]);(0,F.areWithin)(n,r.get(),.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set(n),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases())}}class Sr{constructor(t,e){this.directionInput=new _r(t,e);let n=L("Rotation",this.directionInput.domNode),r=new wr(t,e);this.domNode=document.createElement("div"),u(this.domNode).append(n).append(r.domNode).css({display:"flex",flexDirection:"row",alignItems:"center"}),u(this.domNode).css({marginTop:"33px"})}refresh(){this.directionInput.refresh()}}var Mr=n(284),Or={};Or.styleTagTransform=w(),Or.setAttributes=g(),Or.insert=p().bind(null,"head"),Or.domAPI=d(),Or.insertStyleElement=b(),l()(Mr.Ay,Or),Mr.Ay&&Mr.Ay.locals&&Mr.Ay.locals;var Cr=n(645),Pr={};function Nr(){let t=document.createElement("button");return u(t).addClass(Cr.E),t}Pr.styleTagTransform=w(),Pr.setAttributes=g(),Pr.insert=p().bind(null,"head"),Pr.domAPI=d(),Pr.insertStyleElement=b(),l()(Cr.A,Pr),Cr.A&&Cr.A.locals&&Cr.A.locals;var Tr=n(95),Er={};function Ar(){let t=document.createElement("button");return u(t).addClass(Tr.k),t}function jr(){let t=j();t.value="0";let e="0";t.addEventListener("focus",(()=>e=t.value));let n=()=>{let n=Number.parseFloat(t.value);(0,I.isFiniteNumber)(n)||(t.value=e)};return t.addEventListener("blur",n),t.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&n()})),t}Er.styleTagTransform=w(),Er.setAttributes=g(),Er.insert=p().bind(null,"head"),Er.domAPI=d(),Er.insertStyleElement=b(),l()(Tr.A,Er),Tr.A&&Tr.A.locals&&Tr.A.locals;class Dr{constructor(t,e){let n=jr(),r=jr();n.value=10..toString(),r.value=20..toString();let i=L("Spacing",n),s=L("Termini Gap",r);u(i).css({margin:"14px 0px 0px 14px"}),u(s).css({margin:"10px 0px 0px 14px"});let o=Ar();u(o).text("Circularize"),u(o).on("click",(()=>{let i=Number.parseFloat(n.value),s=Number.parseFloat(r.value);i=(0,I.isFiniteNumber)(i)?i:10,s=(0,I.isFiniteNumber)(s)?s:20,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.circularize)([...t],{spacing:i,terminiGap:s}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),this.domNode=document.createElement("div"),u(this.domNode).append(o).append(i).append(s).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(this.domNode).css({marginTop:"55px"})}}var kr=n(882),Lr={};Lr.styleTagTransform=w(),Lr.setAttributes=g(),Lr.insert=p().bind(null,"head"),Lr.domAPI=d(),Lr.insertStyleElement=b(),l()(kr.A,Lr),kr.A&&kr.A.locals&&kr.A.locals;var Br=n(139);class Ir{constructor(t,e,n){this.selectedBases=e;let r=new P(e),i=new V(e,n),s=new gr(e,n),o=new Sr(e,n),a=function(t,e){let n=Nr(),r=Nr(),i=Nr(),s=Nr();u(n).text("X"),u(r).text("Y"),u(i).text("Self-X"),u(s).text("Self-Y"),u(n).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipX)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(r).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipY)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(i).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipSelfX)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(s).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipSelfY)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let o=document.createElement("p");u(o).addClass(Mr.oP).text("Flip:");let a=document.createElement("div");return u(a).addClass(Mr.ps).append(o,n,r,i,s),a}(e,n),h=function(t,e){let n=jr();n.value=10..toString();let r=L("Spacing",n);u(r).css({margin:"14px 0px 0px 14px"});let i=Ar();i.textContent="Linearize",i.addEventListener("click",(()=>{let r=Number.parseFloat(n.value);r=(0,I.isFiniteNumber)(r)?r:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.linearize)([...t],{spacing:r}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let s=document.createElement("div");return u(s).append(i).append(r).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(s).css({marginTop:"31px"}),s}(e,n),l=function(t,e){let n=Ar();return n.textContent="Straighten",u(n).css({marginTop:"35px"}),n.addEventListener("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.straighten)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),n}(e,n),c=new Dr(e,n),d=function(t,e){let n=jr();n.value=10..toString();let r=L("Spacing",n);u(r).css({margin:"14px 0px 0px 14px"});let i=Ar();u(i).text("Round"),u(i).on("click",(()=>{let r=Number.parseFloat(n.value);r=(0,I.isFiniteNumber)(r)?r:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.round)([...t],{spacing:r}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let s=document.createElement("div");return u(s).append(i).append(r).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(s).css({marginTop:"41px"}),s}(e,n),f=function(t,e){let n=jr(),r=jr();n.value=20..toString(),r.value=10..toString();let i=L("Base-Pair Length",n),s=L("Base-Pair Spacing",r);u(i).css({margin:"14px 0px 0px 14px"}),u(s).css({margin:"10px 0px 0px 14px"});let o=Ar();u(o).text("Stemmify"),u(o).on("click",(()=>{let i=Number.parseFloat(n.value),s=Number.parseFloat(r.value);i=(0,I.isFiniteNumber)(i)?i:20,s=(0,I.isFiniteNumber)(s)?s:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.stemmify)([...t],{basePairLength:i,basePairSpacing:s}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let a=document.createElement("div");return u(a).append(o).append(i).append(s).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(a).css({marginTop:"41px"}),a}(e,n),p=function(t,e,n){let r=jr(),i=jr(),s=jr();r.value=20..toString(),i.value=10..toString(),s.value=10..toString();let o=L("Base-Pair Length",r),a=L("Base-Pair Spacing",i),h=L("Hairpin Loop Spacing",s);u(o).css({margin:"14px 0px 0px 14px"}),u(a).css({margin:"10px 0px 0px 14px"}),u(h).css({margin:"10px 0px 0px 14px"});let l=Ar();u(l).text("Radialize"),u(l).on("click",(()=>{let o=Number.parseFloat(r.value),a=Number.parseFloat(i.value),u=Number.parseFloat(s.value);o=(0,I.isFiniteNumber)(o)?o:20,a=(0,I.isFiniteNumber)(a)?a:10,u=(0,I.isFiniteNumber)(u)?u:10;let h=new Set([...e]),l=[...t.secondaryBonds].filter((t=>h.has(t.base1)&&h.has(t.base2))).map((t=>[t.base1,t.base2]));!(null==n?void 0:n.beforeMovingBases)||n.beforeMovingBases(),(0,B.radialize)([...e],l,{spacing:o,basePairSpacing:a,hairpinLoopSpacing:u}),!(null==n?void 0:n.afterMovingBases)||n.afterMovingBases()}));let c=document.createElement("div");return u(c).append(l).append(o).append(a).append(h).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(c).css({marginTop:"41px"}),c}(t,e,n),m=document.createElement("div");u(m).addClass(x.nn),u(m).append(i.domNode).append(s.domNode).append(o.domNode).append(a).append(h).append(l).append(c.domNode).append(d).append(f).append(p);let g=document.createElement("div");u(g).append(r.domNode).append(m).css({margin:"24px 0px 0px 21px"}).css({pointerEvents:"none"}),this.domNode=document.createElement("div"),u(this.domNode).addClass(x.t0),u(this.domNode).append(function(){let t=document.createElement("p");return u(t).addClass(S.w).append("Bases Layout"),t}()).append(g),this.refreshableComponents=[r,i,s,o],new MutationObserver((()=>this.isOpen()?this.refresh():{})).observe(t.domNode,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.addEventListener("change",(()=>this.isOpen()?this.refresh():{}));let y=function(){let t=document.createElement("button");return u(t).addClass(kr.b).text("Close"),t}();u(y).on("click",(()=>this.close())),u(this.domNode).append(y),this.dragTranslater=new Br.DragTranslater(this.domNode)}refresh(){this.refreshableComponents.forEach((t=>t.refresh())),0==[...this.selectedBases].length?u(this.domNode).addClass(x.JI):u(this.domNode).removeClass(x.JI)}appendTo(t){this.refresh(),this.dragTranslater.untranslate(),t.appendChild(this.domNode)}remove(){this.domNode.remove()}isOpen(){return document.contains(this.domNode)}close(){this.domNode.remove()}}})(),r})(),t.exports=e()},963:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>h,HorizontalClientScaling:()=>c,Scaling:()=>l,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var h=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),c=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),h=n.n(u),l=n(56),c=n.n(l),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=c(),y.insert=h().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetForm)return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}function i(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}t.r(e),t.d(e,{DownloadableFile:()=>s,EventfulSet:()=>o,detectMac:()=>i,shuffled:()=>n,userIsTyping:()=>r});class s{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class o{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}return e})(),t.exports=e()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function h(t){return"object"==typeof t&&null!==t}function l(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>l,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>h,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},882:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.dtn_hLksHXwRvJ0M59R_ {\n position: absolute;\n top: 13px;\n right: 17px;\n\n border: none;\n outline: none;\n\n padding: 3px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 16px;\n font-weight: 600;\n font-style: normal;\n color: #871414;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n background-color: transparent;\n}\n\n.dtn_hLksHXwRvJ0M59R_:hover {\n background-color: #cab8d99c;\n}\n\n.dtn_hLksHXwRvJ0M59R_:active {\n background-color: #aa8eba9e;\n}\n',""]);var a="dtn_hLksHXwRvJ0M59R_";const u=o},95:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,c:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.YyJ8eoEyIwbdyanehYmH {\n margin: 0px;\n\n border: none;\n\n padding: 4px 32px 4px 32px;\n border-radius: 2px;\n\n background-color: transparent;\n position: relative;\n isolation: isolate;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.YyJ8eoEyIwbdyanehYmH::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 2px;\n background-color: #0d0d82;\n box-shadow: 0 3px 3px rgba(213, 213, 255, 0.53);\n\n z-index: -1;\n}\n\n.YyJ8eoEyIwbdyanehYmH:focus {\n outline: none;\n}\n\n.YyJ8eoEyIwbdyanehYmH:hover::before {\n transform: scale(1.05);\n transition: transform 0.1s;\n}\n\n.YyJ8eoEyIwbdyanehYmH:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="YyJ8eoEyIwbdyanehYmH";const u=o},207:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,KI:()=>u,Qb:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.eqwd6LjNjVo7cbB2sslX {\n display: flex;\n flex-direction: column;\n gap: 19px;\n\n pointer-events: none;\n}\n\n.CecElEP3VTnkYzKHER5v {\n margin: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="eqwd6LjNjVo7cbB2sslX",u="CecElEP3VTnkYzKHER5v";const h=o},628:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,UJ:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".m9YNkzvR4YB3Euwu47z5 {\n position: absolute;\n left: 107px;\n top: 77px;\n\n width: 325px;\n height: 483px;\n\n background-color: #f3f3ff;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n\n border: 1px solid #2b0744;\n border-radius: 15px;\n box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.06);\n\n padding: 20px 20px 50px 32px;\n}\n\n.CvIMEhOXh2baupQ8m23e {\n margin: 24px 0px 0px 21px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n\n pointer-events: none;\n}\n",""]);var a="m9YNkzvR4YB3Euwu47z5",u="CvIMEhOXh2baupQ8m23e";const h=o},7:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,w:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.hv1igDaLbKyl3ENzZqbE {\n margin-top: 13px;\n margin-bottom: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 26px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="hv1igDaLbKyl3ENzZqbE";const u=o},61:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,P:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.PHeCZIT2KeDbY1BMQVCY {\n border: 1px solid #75758c;\n border-radius: 2px;\n\n outline: none;\n\n width: 81px;\n\n padding: 3px 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n pointer-events: auto;\n}\n\n.PHeCZIT2KeDbY1BMQVCY:hover {\n border-color: #0a0a0b;\n}\n\n.PHeCZIT2KeDbY1BMQVCY:focus {\n border-color: #0a0a0b;\n\n outline: none;\n}\n',""]);var a="PHeCZIT2KeDbY1BMQVCY";const u=o},713:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,u:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.Ue7na3s040s6OHle84cz {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n cursor: text;\n\n pointer-events: auto;\n}\n',""]);var a="Ue7na3s040s6OHle84cz";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{ExportForm:()=>z});var t=n(72),e=n.n(t),i=n(825),s=n.n(i),o=n(659),a=n.n(o),u=n(56),h=n.n(u),l=n(540),c=n.n(l),d=n(113),f=n.n(d),p=n(628),m={};m.styleTagTransform=f(),m.setAttributes=h(),m.insert=a().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=c(),e()(p.Ay,m),p.Ay&&p.Ay.locals&&p.Ay.locals;var g=n(7),y={};y.styleTagTransform=f(),y.setAttributes=h(),y.insert=a().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=c(),e()(g.A,y),g.A&&g.A.locals&&g.A.locals;var b=n(139),v=n(207),w={};function x(t){let e=document.createElement("span");return e.textContent=t,e.style.fontWeight="700",e}w.styleTagTransform=f(),w.setAttributes=h(),w.insert=a().bind(null,"head"),w.domAPI=s(),w.insertStyleElement=c(),e()(v.Ay,w),v.Ay&&v.Ay.locals&&v.Ay.locals;var _=n(61),S={};S.styleTagTransform=f(),S.setAttributes=h(),S.insert=a().bind(null,"head"),S.domAPI=s(),S.insertStyleElement=c(),e()(_.A,S),_.A&&_.A.locals&&_.A.locals;var M=n(854),O=n(713),C={};C.styleTagTransform=f(),C.setAttributes=h(),C.insert=a().bind(null,"head"),C.domAPI=s(),C.insertStyleElement=c(),e()(O.A,C),O.A&&O.A.locals&&O.A.locals;var P=n(95),N={};N.styleTagTransform=f(),N.setAttributes=h(),N.insert=a().bind(null,"head"),N.domAPI=s(),N.insertStyleElement=c(),e()(P.A,N),P.A&&P.A.locals&&P.A.locals;var T=n(882),E={};E.styleTagTransform=f(),E.setAttributes=h(),E.insert=a().bind(null,"head"),E.domAPI=s(),E.insertStyleElement=c(),e()(T.A,E),T.A&&T.A.locals&&T.A.locals;var A,j,D,k,L,B,I=n(106),F=n(726),R=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)},V=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n};class z{constructor(t){A.add(this),this.targetApp=t,j.set(this,document.createElement("div")),D.set(this,void 0),k.set(this,1),L.set(this,void 0),R(this,j,"f").classList.add(p._),R(this,j,"f").append(function(){let t=document.createElement("p");return t.classList.add(g.w),t.textContent="Export",t}());let e=document.createElement("div");e.classList.add(p.UJ),R(this,j,"f").append(e),e.append(function(){let t=document.createElement("div");t.classList.add(v.Qb);let e=x("SVG"),n=x("Adobe Illustrator"),r=x("Inkscape"),i=document.createElement("p");i.classList.add(v.KI),i.append("Export the drawing as an ",e," image."),t.append(i);let s=document.createElement("p");return s.classList.add(v.KI),s.append("SVG images can be opened, edited further and converted to other image formats in applications such as ",n," and ",r,"."),t.append(s),t}()),V(this,D,function(){let t=function(){let t=document.createElement("input");return t.type="text",t.classList.add(_.P),t}();t.value="1";let e="1";t.addEventListener("focus",(()=>e=t.value));let n=()=>{let n=Number.parseFloat(t.value);(0,M.isPositiveFiniteNumber)(n)||(t.value=e)};return t.addEventListener("blur",n),t.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&n()})),t}(),"f"),R(this,D,"f").value=`${R(this,k,"f")}`;let n=function(t,e){let n=document.createElement("span");n.append("Scaling"),n.style.paddingLeft="8px";let r=document.createElement("label");return r.classList.add(O.u),r.append(e,n),r}(0,R(this,D,"f"));n.style.marginTop="29px",e.append(n);let r=function(){let t=function(){let t=document.createElement("button");return t.classList.add(P.c),t}();return t.textContent="Export",t.style.marginTop="36px",t}();r.addEventListener("click",(()=>R(this,A,"m",B).call(this))),e.append(r);let i=function(){let t=document.createElement("button");return t.classList.add(T._),t.textContent="Close",t}();i.addEventListener("click",(()=>this.remove())),R(this,j,"f").append(i),V(this,L,new b.DragTranslater(R(this,j,"f")),"f")}appendTo(t){R(this,L,"f").untranslate(),t.appendChild(R(this,j,"f"))}remove(){R(this,j,"f").remove()}}j=new WeakMap,D=new WeakMap,k=new WeakMap,L=new WeakMap,A=new WeakSet,B=function(){let t=this.targetApp.drawing.domNode.cloneNode(!0),e=document.createElement("div");e.style.position="fixed",e.style.height="0px",document.body.append(e),e.append(t);let n=Number.parseFloat(R(this,D,"f").value);(0,M.isPositiveFiniteNumber)(n)||(n=R(this,k,"f")),new F.Scaling(t).set(n);let r=document.title?document.title:"Drawing";new I.DownloadableFile(t.outerHTML).downloadAs(r+".svg",{type:"text/plain"}),e.remove()}})(),r})(),t.exports=e()},925:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{HorizontalScrollbar:()=>r,HorizontalScrollbarThumb:()=>n,Scrollbars:()=>o,VerticalScrollbar:()=>s,VerticalScrollbarThumb:()=>i});class n{constructor(t){this.targetElement=t}get leftX(){return this.targetElement.scrollLeft}set leftX(t){this.targetElement.scrollLeft=t}get length(){let t=this.targetElement.scrollLeft;this.targetElement.scrollLeft=this.targetElement.scrollWidth;let e=this.targetElement.scrollWidth-this.targetElement.scrollLeft;return this.targetElement.scrollLeft=t,e}get rightX(){return this.leftX+this.length}set rightX(t){this.targetElement.scrollLeft=t-this.length}get centerX(){return(this.leftX+this.rightX)/2}set centerX(t){this.targetElement.scrollLeft=t-this.length/2}}class r{constructor(t){this.targetElement=t,this.thumb=new n(t)}}class i{constructor(t){this.targetElement=t}get topY(){return this.targetElement.scrollTop}set topY(t){this.targetElement.scrollTop=t}get length(){let t=this.targetElement.scrollTop;this.targetElement.scrollTop=this.targetElement.scrollHeight;let e=this.targetElement.scrollHeight-this.targetElement.scrollTop;return this.targetElement.scrollTop=t,e}get bottomY(){return this.topY+this.length}set bottomY(t){this.targetElement.scrollTop=t-this.length}get centerY(){return this.targetElement.scrollTop+this.length/2}set centerY(t){this.targetElement.scrollTop=t-this.length/2}}class s{constructor(t){this.targetElement=t,this.thumb=new i(t)}}class o{constructor(t){this.targetElement=t}center(){this.targetElement.scrollLeft=this.targetElement.scrollWidth,this.targetElement.scrollTop=this.targetElement.scrollHeight;let t=this.targetElement.scrollWidth-this.targetElement.scrollLeft,e=this.targetElement.scrollHeight-this.targetElement.scrollTop;this.targetElement.scrollLeft=this.targetElement.scrollWidth/2-t/2,this.targetElement.scrollTop=this.targetElement.scrollHeight/2-e/2}}return e})(),t.exports=e()},31:function(t){var e;e=()=>(()=>{var t={139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),h=n.n(u),l=n(56),c=n.n(l),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=c(),y.insert=h().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,this.interactionDepth="shallow",window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(!(this.lastMouseDown.target instanceof Node))return;if("shallow"==this.interactionDepth){if(this.lastMouseDown.target!==this.targetForm)return}else if(!this.targetForm.contains(this.lastMouseDown.target))return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},554:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,bW:()=>u,n8:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,".OCbZQLMBA2fPBalssDU0 {\n width: 11px;\n height: 1px;\n background-color: white;\n}\n\n.gPLxmI0OgzVC6V3VOVwt {\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n pointer-events: none;\n}\n",""]);var a="OCbZQLMBA2fPBalssDU0",u="gPLxmI0OgzVC6V3VOVwt";const h=o},719:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,KE:()=>a,Y3:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".aVj2i1vL0xgitnRSSmmQ {\n position: absolute;\n left: 60px;\n bottom: 15px;\n\n height: 45px;\n padding: 0px 17px 0px 15px;\n\n background-color: black;\n\n border-radius: 4px;\n box-shadow: 0 0 12px #1a1a1c36;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 18px;\n}\n\n.oPxkjdqN4ZRO1ANdcCzU {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n",""]);var a="aVj2i1vL0xgitnRSSmmQ",u="oPxkjdqN4ZRO1ANdcCzU";const h=o},427:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,Q:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.GDJUdJ6NzypM2K5Upnaj {\n padding: 6px 17px;\n\n background-color: black;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 500;\n font-style: normal;\n color: white;\n\n border: none;\n border-radius: 3px;\n\n outline: none;\n\n cursor: pointer;\n}\n\n.GDJUdJ6NzypM2K5Upnaj:hover {\n background-color: rgb(50, 50, 56);\n}\n\n.GDJUdJ6NzypM2K5Upnaj:active {\n background-color: rgb(66, 66, 73);\n}\n',""]);var a="GDJUdJ6NzypM2K5Upnaj";const u=o},60:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,t:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.hIJPXzmppm7QNJ_UQ9gd {\n position: absolute;\n left: 15px;\n bottom: 22.5px;\n\n border-radius: 1000px;\n\n display: flex;\n\n background-color: transparent;\n isolation: isolate;\n\n cursor: pointer;\n}\n\n.hIJPXzmppm7QNJ_UQ9gd::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 1000px;\n background-color: black;\n box-shadow: 0 0 12px #23232533;\n\n z-index: -1;\n}\n\n.hIJPXzmppm7QNJ_UQ9gd:hover::before {\n transform: scale(1.166);\n transition: transform 0.1s;\n}\n\n.hIJPXzmppm7QNJ_UQ9gd:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="hIJPXzmppm7QNJ_UQ9gd";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);r&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],h=r.base?u[0]+r.base:u[0],l=s[h]||0,c="".concat(h," ").concat(l);s[h]=l+1;var d=n(c),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),h=0;h<s.length;h++){var l=n(s[h]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{Toolbar:()=>T,ToolbarRepositioner:()=>tr});var t={};n.r(t),n.d(t,{cx:()=>ie,cy:()=>se,height:()=>ae,rx:()=>te,ry:()=>ee,width:()=>oe,x:()=>ne,y:()=>re});var e={};n.r(e),n.d(e,{from:()=>ce,to:()=>de});var i={};n.r(i),n.d(i,{MorphArray:()=>be,height:()=>_e,width:()=>xe,x:()=>ve,y:()=>we});var s={};n.r(s),n.d(s,{array:()=>Qe,clear:()=>Je,move:()=>Ke,plot:()=>Ze,size:()=>tn});var o={};n.r(o),n.d(o,{amove:()=>Tn,ax:()=>Pn,ay:()=>Nn,build:()=>En,center:()=>Cn,cx:()=>Mn,cy:()=>On,length:()=>wn,move:()=>Sn,plain:()=>vn,x:()=>xn,y:()=>_n});var a={};n.r(a),n.d(a,{dmove:()=>Bn,dx:()=>In,dy:()=>Fn,height:()=>Rn,move:()=>Vn,size:()=>zn,width:()=>qn,x:()=>Xn,y:()=>Yn});var u=n(72),h=n.n(u),l=n(825),c=n.n(l),d=n(659),f=n.n(d),p=n(56),m=n.n(p),g=n(540),y=n.n(g),b=n(113),v=n.n(b),w=n(719),x={};x.styleTagTransform=v(),x.setAttributes=m(),x.insert=f().bind(null,"head"),x.domAPI=c(),x.insertStyleElement=y(),h()(w.Ay,x),w.Ay&&w.Ay.locals&&w.Ay.locals;var _=n(554),S={};function M(){let t=document.createElement("div");return t.classList.add(_.n8),t}S.styleTagTransform=v(),S.setAttributes=m(),S.insert=f().bind(null,"head"),S.domAPI=c(),S.insertStyleElement=y(),h()(_.Ay,S),_.Ay&&_.Ay.locals&&_.Ay.locals;var O=n(427),C={};function P(t){let e=document.createElement("button");return e.classList.add(O.Q),e.append(t),e}C.styleTagTransform=v(),C.setAttributes=m(),C.insert=f().bind(null,"head"),C.domAPI=c(),C.insertStyleElement=y(),h()(O.A,C),O.A&&O.A.locals&&O.A.locals;var N=n(139);class T{constructor(t){this.props=t,this.domNode=document.createElement("div"),this.domNode.classList.add(w.KE),this.domNode.appendChild(function(){let t=document.createElement("div");return t.classList.add(_.bW),t.append(M(),M(),M(),M(),M(),M(),M(),M()),t}());let e=document.createElement("div");e.classList.add(w.Y3),this.domNode.append(e);let n=P("Layout");n.addEventListener("click",(()=>this.props.layoutButton.onClick())),e.append(n);let r=P("Export");r.addEventListener("click",(()=>this.props.exportButton.onClick())),e.append(r),this.dragTranslater=new N.DragTranslater(this.domNode),this.dragTranslater.interactionDepth="deep"}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}reposition(){this.dragTranslater.untranslate()}}const E={},A=[];function j(t,e){if(Array.isArray(t))for(const n of t)j(n,e);else if("object"!=typeof t)k(Object.getOwnPropertyNames(e)),E[t]=Object.assign(E[t]||{},e);else for(const e in t)j(e,t[e])}function D(t){return E[t]||{}}function k(t){A.push(...t)}function L(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function B(t){return t%360*Math.PI/180}function I(t){return t.charAt(0).toUpperCase()+t.slice(1)}function F(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function R(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const V=new Set(["desc","metadata","title"]),z=t=>V.has(t.nodeName),q=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},X="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",G="http://www.w3.org/1999/xlink",H={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class U{}const $={},W="___SYMBOL___ROOT___";function Q(t,e=X){return H.document.createElementNS(e,t)}function J(t,e=!1){if(t instanceof U)return t;if("object"==typeof t)return tt(t);if(null==t)return new $[W];if("string"==typeof t&&"<"!==t.charAt(0))return tt(H.document.querySelector(t));const n=e?H.document.createElement("div"):Q("svg");return n.innerHTML=t,t=tt(n.firstChild),n.removeChild(n.firstChild),t}function K(t,e){return e&&(e instanceof H.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:Q(t)}function Z(t){if(!t)return null;if(t.instance instanceof U)return t.instance;if("#document-fragment"===t.nodeName)return new $.Fragment(t);let e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":$[e]||(e="Dom"),new $[e](t)}let tt=Z;function et(t,e=t.name,n=!1){return $[e]=t,n&&($[W]=t),k(Object.getOwnPropertyNames(t.prototype)),t}let nt=1e3;function rt(t){return"Svgjs"+I(t)+nt++}function it(t){for(let e=t.children.length-1;e>=0;e--)it(t.children[e]);return t.id?(t.id=rt(t.nodeName),t):t}function st(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function ot(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}j("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=J(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=J(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=J(t)).before(this),this},insertAfter:function(t){return(t=J(t)).after(this),this}});const at=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,ut=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ht=/rgb\((\d+),(\d+),(\d+)\)/,lt=/(#[a-z_][a-z0-9\-_]*)/i,ct=/\)\s*,?\s*/,dt=/\s/g,ft=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,pt=/^rgb\(/,mt=/^(\s+)?$/,gt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,yt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,bt=/[\s,]+/,vt=/[MLHVCSQTAZ]/i;function wt(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function xt(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function _t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}j("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),j("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||mt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||mt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),j("Dom",{data:function(t,e,n){if(null==t)return this.data(L(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),j("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class St{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof St||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new St(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new St(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new St(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new St(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new St(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new St(t,e,r,"lab")}if("grey"===t){const t=255*n();return new St(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(ft.test(t)||pt.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new St(0,0,0,1,"cmyk"):new St((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,h=o===a,l=o-a;return new St(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:u>.5?l/(2-o-a):l/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=xt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:xt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:xt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:xt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:xt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:xt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(pt.test(t)){const e=t.replace(dt,""),[n,r,i]=ht.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!ft.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=ut.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,h="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:n}=this.xyz();return new St(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new St(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(u**3>l?u**3:(u-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,h=i>a?1.055*o(i,1/2.4)-.055:12.92*i,l=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new St(255*u,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new St(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*_t(i,r,t+1/3),o=255*_t(i,r,t),a=255*_t(i,r,t-1/3);return new St(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new St(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(wt);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*a+.1805*u)/.95047,l=(.2126*o+.7152*a+.0722*u)/1,c=(.0193*o+.1192*a+.9505*u)/1.08883,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new St(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class Mt{constructor(...t){this.init(...t)}clone(){return new Mt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){Ct.isMatrixLike(t)||(t=new Ct(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function Ot(t,e,n){return Math.abs(e-t)<(n||1e-6)}class Ct{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,h=t.rotate||t.theta||0,l=new Mt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new Mt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new Mt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new Mt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:h,rx:v.x,ry:v.y,tx:y,ty:b,ox:c,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new Ct(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,h=u>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/u,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*l+e*(m*f*l-p*g),translateY:a-e+t*p*l+e*(m*p*l+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new Ct(t);return Ot(this.a,e.a)&&Ot(this.b,e.b)&&Ot(this.c,e.c)&&Ot(this.d,e.d)&&Ot(this.e,e.e)&&Ot(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=Ct.fromArray([1,0,0,1,0,0]);return t=t instanceof Wt?t.matrixify():"string"==typeof t?Ct.fromArray(t.split(bt).map(parseFloat)):Array.isArray(t)?Ct.fromArray(t):"object"==typeof t&&Ct.isMatrixLike(t)?t:"object"==typeof t?(new Ct).transform(t):6===arguments.length?Ct.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,h=-n/o,l=t/o,c=-(a*i+h*s),d=-(u*i+l*s);return this.a=a,this.b=u,this.c=h,this.d=l,this.e=c,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof Ct?t:new Ct(t);return Ct.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof Ct?t:new Ct(t);return Ct.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=B(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=B(t),e=B(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:h,e:l,f:c}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+h*i,this.d=h+u*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(Ct.isMatrixLike(t))return new Ct(t).multiplyO(this);const e=Ct.formatTransforms(t),{x:n,y:r}=new Mt(e.ox,e.oy).transform(this),i=(new Ct).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new Mt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Pt(){if(!Pt.nodes){const t=J().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Pt.nodes={svg:t,path:e}}if(!Pt.nodes.svg.node.parentNode){const t=H.document.body||H.document.documentElement;Pt.nodes.svg.addTo(t)}return Pt.nodes}function Nt(t){return!(t.width||t.height||t.x||t.y)}et(Ct,"Matrix");class Tt{constructor(...t){this.init(...t)}addOffset(){return this.x+=H.window.pageXOffset,this.y+=H.window.pageYOffset,new Tt(this)}init(t){return t="string"==typeof t?t.split(bt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Nt(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new Tt(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof Ct||(t=new Ct(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new Mt(this.x,this.y),new Mt(this.x2,this.y),new Mt(this.x,this.y2),new Mt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new Tt(e,r,n-e,i-r)}}function Et(t,e,n){let r;try{if(r=e(t.node),Nt(r)&&(i=t.node)!==H.document&&!(H.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===H.document}).call(H.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}j({viewbox:{viewbox(t,e,n,r){return null==t?new Tt(this.attr("viewBox")):this.attr("viewBox",new Tt(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new Mt(n/2/s+i.x,r/2/o+i.y);const h=new Tt(i).transform(new Ct({scale:u,origin:e}));return this.viewbox(h)}}}),et(Tt,"Box");class At extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const jt=At;st([At],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const Dt=["toArray","constructor","each"];function kt(t,e){return new jt(L((e||H.document).querySelectorAll(t),(function(t){return Z(t)})))}At.extend=function(t){t=t.reduce(((t,e)=>(Dt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),st([At],t)};let Lt=0;const Bt={};function It(t){let e=t.getEventHolder();return e===H.window&&(e=Bt),e.events||(e.events={}),e.events}function Ft(t){return t.getEventTarget()}function Rt(t,e,n,r,i){const s=n.bind(r||t),o=J(t),a=It(o),u=Ft(o);e=Array.isArray(e)?e:e.split(bt),n._svgjsListenerId||(n._svgjsListenerId=++Lt),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function Vt(t,e,n,r){const i=J(t),s=It(i),o=Ft(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(bt)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,h;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(h in s[e][a])Vt(o,[e,a].join("."),h);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&Vt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])Vt(o,[e,u].join("."));delete s[e]}}else{for(t in s)Vt(o,t);!function(t){let e=t.getEventHolder();e===H.window&&(e=Bt),e.events&&(e.events={})}(i)}}))}class zt extends U{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=Ft(t);return e instanceof H.window.Event||(e=new H.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return Vt(this,t,e,n),this}on(t,e,n,r){return Rt(this,t,e,n,r),this}removeEventListener(){}}function qt(){}et(zt,"EventTarget");const Xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Yt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class Gt{constructor(...t){this.init(...t)}convert(t){return new Gt(this.value,t)}divide(t){return t=new Gt(t),new Gt(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(at))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof Gt&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new Gt(t),new Gt(this-t,this.unit||t.unit)}plus(t){return t=new Gt(t),new Gt(this+t,this.unit||t.unit)}times(t){return t=new Gt(t),new Gt(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Ht=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ut=[];class $t extends zt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=J(t)).removeNamespace&&this.node instanceof H.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return J(t).put(this,e)}children(){return new jt(L(this.node.children,(function(t){return Z(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=it(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new $t(Q(t),e))}first(){return Z(this.node.firstChild)}get(t){return Z(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=rt(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Z(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=Z(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=Z(e.node.parentNode));return e}put(t,e){return t=J(t),this.add(t,e),t}putIn(t,e){return J(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=J(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,X)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=Z(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=Q("wrapper",n),i=H.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}st($t,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=gt.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Xt[t]:gt.test(e)?parseFloat(e):e;"number"==typeof(e=Ut.reduce(((e,n)=>n(t,e,this)),e))?e=new Gt(e):Ht.has(t)&&St.isColor(e)?e=new St(e):e.constructor===Array&&(e=new Yt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return kt(t,this.node)},findOne:function(t){return Z(this.node.querySelector(t))}}),et($t,"Dom");class Wt extends $t{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Gt(t).plus(this.x()))}dy(t=0){return this.y(new Gt(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=J(t));const n=new jt;let r=this;for(;(r=r.parent())&&r.node!==H.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(lt);return e?J(e[1]):null}root(){const t=this.parent($[W]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=F(this,t,e);return this.width(new Gt(n.width)).height(new Gt(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return q(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}st(Wt,{bbox:function(){const t=Et(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(Pt().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new Tt(t)},rbox:function(t){const e=Et(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new Tt(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new Mt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new Ct(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Ct(e)}return new Ct(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new Ct}}}),et(Wt,"Element");const Qt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof St||St.isRgb(e)||e instanceof Wt)this.attr(t,e);else for(n=Qt[t].length-1;n>=0;n--)null!=e[Qt[t][n]]&&this.attr(Qt.prefix(t,Qt[t][n]),e[Qt[t][n]]);return this},j(["Element","Runner"],e)})),j(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new Ct(this):this.attr("transform",new Ct(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),j("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Gt(t)):this.rx(t).ry(e)}}),j("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Mt(this.node.getPointAtLength(t))}}),j(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),j("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),j("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ct.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ct)},toParent:function(t,e){if(this===t)return this;if(z(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new Ct(this).decompose();return null==t?e:e[t]}Ct.isMatrixLike(t)||(t={...t,origin:R(t,this)});const n=new Ct(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Jt extends Wt{flatten(){return this.each((function(){if(this instanceof Jt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}et(Jt,"Container");class Kt extends Jt{constructor(t,e=t){super(K("defs",t),e)}flatten(){return this}ungroup(){return this}}et(Kt,"Defs");class Zt extends Wt{}function te(t){return this.attr("rx",t)}function ee(t){return this.attr("ry",t)}function ne(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function re(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function ie(t){return this.attr("cx",t)}function se(t){return this.attr("cy",t)}function oe(t){return null==t?2*this.rx():this.rx(new Gt(t).divide(2))}function ae(t){return null==t?2*this.ry():this.ry(new Gt(t).divide(2))}et(Zt,"Shape");class ue extends Zt{constructor(t,e=t){super(K("ellipse",t),e)}size(t,e){const n=F(this,t,e);return this.rx(new Gt(n.width).divide(2)).ry(new Gt(n.height).divide(2))}}st(ue,t),j("Container",{ellipse:ot((function(t=0,e=t){return this.put(new ue).size(t,e).move(0,0)}))}),et(ue,"Ellipse");class he extends $t{constructor(t=H.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new $t(Q("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}et(he,"Fragment");const le=he;function ce(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Gt(t),fy:new Gt(e)}):this.attr({x1:new Gt(t),y1:new Gt(e)})}function de(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Gt(t),cy:new Gt(e)}):this.attr({x2:new Gt(t),y2:new Gt(e)})}class fe extends Jt{constructor(t,e){super(K(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new Tt}targets(){return kt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}st(fe,e),j({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:ot((function(t,e){return this.put(new fe(t)).update(e)}))}}),et(fe,"Gradient");class pe extends Jt{constructor(t,e=t){super(K("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new Tt}targets(){return kt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}j({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:ot((function(t,e,n){return this.put(new pe).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),et(pe,"Pattern");class me extends Zt{constructor(t,e=t){super(K("image",t),e)}load(t,e){if(!t)return this;const n=new H.window.Image;return Rt(n,"load",(function(t){const r=this.parent(pe);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof pe&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Rt(n,"load error",(function(){Vt(n)})),this.attr("href",n.src=t,G)}}var ge;ge=function(t,e,n){return"fill"!==t&&"stroke"!==t||yt.test(e)&&(e=n.root().defs().image(e)),e instanceof me&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ut.push(ge),j({Container:{image:ot((function(t,e){return this.put(new me).size(0,0).load(t,e)}))}}),et(me,"Image");class ye extends Yt{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new Tt(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){Ct.isMatrixLike(t)||(t=new Ct(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const be=ye;function ve(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function we(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function xe(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function _e(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class Se extends Zt{constructor(t,e=t){super(K("line",t),e)}array(){return new ye([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new ye(t).toLine(),this.attr(t))}size(t,e){const n=F(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}st(Se,i),j({Container:{line:ot((function(...t){return Se.prototype.plot.apply(this.put(new Se),null!=t[0]?t:[0,0,0,0])}))}}),et(Se,"Line");class Me extends Jt{constructor(t,e=t){super(K("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Oe(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}j({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:ot((function(t,e,n){return this.put(new Me).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Me?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),et(Me,"Marker");const Ce={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class Pe{done(){return!1}}class Ne extends Pe{constructor(t=">"){super(),this.ease=Ce[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class Te extends Pe{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function Ee(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}st(class extends Te{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:Oe("_duration",Ee),overshoot:Oe("_overshoot",Ee)}),st(class extends Te{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:Oe("_windup"),p:Oe("P"),i:Oe("I"),d:Oe("D")});const Ae={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},je={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},De="mlhvqtcsaz".split("");for(let t=0,e=De.length;t<e;++t)je[De[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return je[t](e,n,r)}}(De[t].toUpperCase());function ke(t){return t.segment.length&&t.segment.length-1===Ae[t.segment[0].toUpperCase()]}function Le(t,e){t.inNumber&&Be(t,!1);const n=vt.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Be(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,ke(t)&&Ie(t)}function Ie(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return je[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function Fe(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function Re(t){return"E"===t.lastToken.toUpperCase()}const Ve=new Set([" ",",","\t","\n","\r","\f"]);class ze extends Yt{bbox(){return Pt().path.setAttribute("d",this.toString()),new Tt(Pt.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new Mt,p:new Mt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!Le(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Ve.has(r))i.inNumber&&Be(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(vt.test(r)){if(i.inNumber)Be(i,!1);else{if(!ke(i))throw new Error("parser Error");Ie(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Re(i)){Be(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Fe(i)){i.inNumber=!0,i.number=r,Be(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Be(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Be(i,!1),i.inSegment&&ke(i)&&Ie(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const qe=t=>{const e=typeof t;return"number"===e?Gt:"string"===e?St.isColor(t)?St:bt.test(t)?vt.test(t)?ze:Yt:at.test(t)?Gt:Ye:$e.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Yt:"object"===e?Ue:Ye};class Xe{constructor(t){this._stepper=t||new Ne("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(qe(t));let e=new this._type(t);return this._type===St&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Ue&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Ye{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Ge{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Ge.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Ge.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const He=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Ue{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===St&&t[n+7]!==e[n+7]){const e=t[n+7],r=new St(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=qe(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(He),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const $e=[Ye,Ge,Ue];class We extends Zt{constructor(t,e=t){super(K("path",t),e)}array(){return this._array||(this._array=new ze(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ze(t))}size(t,e){const n=F(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Qe(){return this._array||(this._array=new ye(this.attr("points")))}function Je(){return delete this._array,this}function Ke(t,e){return this.attr("points",this.array().move(t,e))}function Ze(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ye(t))}function tn(t,e){const n=F(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}We.prototype.MorphArray=ze,j({Container:{path:ot((function(t){return this.put(new We).plot(t||new ze)}))}}),et(We,"Path");class en extends Zt{constructor(t,e=t){super(K("polygon",t),e)}}j({Container:{polygon:ot((function(t){return this.put(new en).plot(t||new ye)}))}}),st(en,i),st(en,s),et(en,"Polygon");class nn extends Zt{constructor(t,e=t){super(K("polyline",t),e)}}j({Container:{polyline:ot((function(t){return this.put(new nn).plot(t||new ye)}))}}),st(nn,i),st(nn,s),et(nn,"Polyline");class rn extends Zt{constructor(t,e=t){super(K("rect",t),e)}}st(rn,{rx:te,ry:ee}),j({Container:{rect:ot((function(t,e){return this.put(new rn).size(t,e)}))}}),et(rn,"Rect");class sn{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const on={nextDraw:null,frames:new sn,timeouts:new sn,immediates:new sn,timer:()=>H.window.performance||H.window.Date,transforms:[],frame(t){const e=on.frames.push({run:t});return null===on.nextDraw&&(on.nextDraw=H.window.requestAnimationFrame(on._draw)),e},timeout(t,e){e=e||0;const n=on.timer().now()+e,r=on.timeouts.push({run:t,time:n});return null===on.nextDraw&&(on.nextDraw=H.window.requestAnimationFrame(on._draw)),r},immediate(t){const e=on.immediates.push(t);return null===on.nextDraw&&(on.nextDraw=H.window.requestAnimationFrame(on._draw)),e},cancelFrame(t){null!=t&&on.frames.remove(t)},clearTimeout(t){null!=t&&on.timeouts.remove(t)},cancelImmediate(t){null!=t&&on.immediates.remove(t)},_draw(t){let e=null;const n=on.timeouts.last();for(;(e=on.timeouts.shift())&&(t>=e.time?e.run():on.timeouts.push(e),e!==n););let r=null;const i=on.frames.last();for(;r!==i&&(r=on.frames.shift());)r.run(t);let s=null;for(;s=on.immediates.shift();)s();on.nextDraw=on.timeouts.first()||on.frames.first()?H.window.requestAnimationFrame(on._draw):null}},an=on,un=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},hn=function(){const t=H.window;return(t.performance||t.Date).now()};class ln extends zt{constructor(t=hn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(un);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return an.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=an.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}j({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ln,this._timeline):(this._timeline=t,this)}}});class cn extends zt{constructor(t){super(),this.id=cn.id++,t="function"==typeof(t=null==t?400:t)?new Te(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Te,this._stepper=this._isDeclarative?t:new Ne,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Ct,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof Pe||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=cn.sanitise(t,e,n),i=new cn(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new Ct,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Ne(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),h=s&&u%2==0;return a=u+(h&&!o||o&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||qt,runner:e||qt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof ln||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new Ct,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}cn.id=0;class dn{constructor(t=new Ct,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}st([cn,dn],{mergeWith(t){return new dn(t.transforms.lmultiply(this.transforms),t.id)}});const fn=(t,e)=>t.lmultiplyO(e),pn=t=>t.transforms;function mn(){const t=this._transformationRunners.runners.map(pn).reduce(fn,new Ct);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class gn{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new dn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}j({Element:{animate(t,e,n){const r=cn.sanitise(t,e,n),i=this.timeline();return new cn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(pn).reduce(fn,new Ct)},_addRunner(t){this._transformationRunners.add(t),an.cancelImmediate(this._frameId),this._frameId=an.immediate(mn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new gn).add(new dn(new Ct(this))))}}}),st(cn,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new Xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Ue(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Ue(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new Xe(this._stepper).to(new Gt(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=Ct.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new Xe(this._stepper).type(n?Ge:Ct);let s,o,a,u,h;return this.queue((function(){o=o||this.element(),s=s||R(t,o),h=new Ct(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new Mt(s).transform(o._currentTransform(this));let f=new Ct({...t,origin:[c,d]}),p=this._isDeclarative&&a?a:h;if(n){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(l);return u=m.rotate,a=new Ct(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=R(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Gt(e),this._tryRetarget(t,e))return this;const n=new Xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new Gt(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new Xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Gt(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new Xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new Tt(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),st(cn,{rx:te,ry:ee,from:ce,to:de}),et(cn,"Runner");class yn extends Jt{constructor(t,e=t){super(K("svg",t),e),this.namespace()}defs(){return this.isRoot()?Z(this.node.querySelector("defs"))||this.put(new Kt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof H.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:X,version:"1.1"}).attr("xmlns:xlink",G,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}j({Container:{nested:ot((function(){return this.put(new yn)}))}}),et(yn,"Svg",!0);class bn extends Jt{constructor(t,e=t){super(K("symbol",t),e)}}function vn(t){return!1===this._build&&this.clear(),this.node.appendChild(H.document.createTextNode(t)),this}function wn(){return this.node.getComputedTextLength()}function xn(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function _n(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Sn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function Mn(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function On(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Cn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function Pn(t){return this.attr("x",t)}function Nn(t){return this.attr("y",t)}function Tn(t,e){return this.ax(t).ay(e)}function En(t){return this._build=!!t,this}j({Container:{symbol:ot((function(){return this.put(new bn)}))}}),et(bn,"Symbol");class An extends Zt{constructor(t,e=t){super(K("text",t),e),this.dom.leading=this.dom.leading??new Gt(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Gt(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(z(this.node))return;const i=H.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new Gt(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Gt(t.leading||1.3),this}writeDataToDom(){return q(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||z(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===Z(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}st(An,o),j({Container:{text:ot((function(t=""){return this.put(new An).text(t)})),plain:ot((function(t=""){return this.put(new An).plain(t)}))}}),et(An,"Text");class jn extends Zt{constructor(t,e=t){super(K("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof An))return this;const e=t.index(this),n=H.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new Gt(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}st(jn,o),j({Tspan:{tspan:ot((function(t=""){const e=new jn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),et(jn,"Tspan");class Dn extends Zt{constructor(t,e=t){super(K("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Gt(t).divide(2))}}st(Dn,{x:ne,y:re,cx:ie,cy:se,width:oe,height:ae}),j({Container:{circle:ot((function(t=0){return this.put(new Dn).size(t).move(0,0)}))}}),et(Dn,"Circle");class kn extends Jt{constructor(t,e=t){super(K("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return kt("svg [clip-path*="+this.id()+"]")}}j({Container:{clip:ot((function(){return this.defs().put(new kn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof kn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),et(kn,"ClipPath");class Ln extends Wt{constructor(t,e=t){super(K("foreignObject",t),e)}}function Bn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof H.window.SVGSVGElement?new Tt(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new Ct(n),s=i.translate(t,e).transform(i.inverse()),o=new Mt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function In(t){return this.dmove(t,0)}function Fn(t){return this.dmove(0,t)}function Rn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function Vn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function zn(t,e,n=this.bbox()){const r=F(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new Mt(n).transform(new Ct(t).inverse());t.scale(i,s,e.x,e.y)})),this}function qn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function Xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function Yn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}j({Container:{foreignObject:ot((function(t,e){return this.put(new Ln).size(t,e)}))}}),et(Ln,"ForeignObject");class Gn extends Jt{constructor(t,e=t){super(K("g",t),e)}}st(Gn,a),j({Container:{group:ot((function(){return this.put(new Gn)}))}}),et(Gn,"G");class Hn extends Jt{constructor(t,e=t){super(K("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,G)}}st(Hn,a),j({Container:{link:ot((function(t){return this.put(new Hn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Hn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),et(Hn,"A");class Un extends Jt{constructor(t,e=t){super(K("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return kt("svg [mask*="+this.id()+"]")}}j({Container:{mask:ot((function(){return this.defs().put(new Un)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Un?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),et(Un,"Mask");class $n extends Wt{constructor(t,e=t){super(K("stop",t),e)}update(t){return("number"==typeof t||t instanceof Gt)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Gt(t.offset)),this}}j({Gradient:{stop:function(t,e,n){return this.put(new $n).update(t,e,n)}}}),et($n,"Stop");class Wn extends Wt{constructor(t,e=t){super(K("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}j("Dom",{style(t,e){return this.put(new Wn).rule(t,e)},fontface(t,e,n){return this.put(new Wn).font(t,e,n)}}),et(Wn,"Style");class Qn extends An{constructor(t,e=t){super(K("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}j({Container:{textPath:ot((function(t,e){return t instanceof An||(t=this.text(t)),t.path(e)}))},Text:{path:ot((function(t,e=!0){const n=new Qn;let r;if(t instanceof We||(t=this.defs().path(t)),n.attr("href","#"+t,G),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:ot((function(t){return t instanceof An||(t=(new An).addTo(this.parent()).text(t)),t.path(this)})),targets(){return kt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Qn.prototype.MorphArray=ze,et(Qn,"TextPath");class Jn extends Zt{constructor(t,e=t){super(K("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,G)}}j({Container:{use:ot((function(t,e){return this.put(new Jn).use(t,e)}))}}),et(Jn,"Use"),st([yn,bn,me,pe,Me],D("viewbox")),st([Se,nn,en,We],D("marker")),st(An,D("Text")),st(We,D("Path")),st(Kt,D("Defs")),st([An,jn],D("Tspan")),st([rn,ue,fe,cn],D("radius")),st(zt,D("EventTarget")),st($t,D("Dom")),st(Wt,D("Element")),st(Zt,D("Shape")),st([Jt,le],D("Container")),st(fe,D("Gradient")),st(cn,D("Runner")),jt.extend([...new Set(A)]),function(t=[]){$e.push(...[].concat(t))}([Gt,St,Tt,Ct,Yt,ye,ze,Mt]),st($e,{to(t){return(new Xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var Kn=n(60),Zn={};function tr(){let t=document.createElement("div");t.classList.add(Kn.t);let e=new yn;return e.attr({width:"30",height:"30"}),e.viewbox(0,0,30,30),e.circle().attr({r:"4",cx:"15",cy:"15",stroke:"white","stroke-width":"0",fill:"white"}),e.addTo(t),t}Zn.styleTagTransform=v(),Zn.setAttributes=m(),Zn.insert=f().bind(null,"head"),Zn.domAPI=c(),Zn.insertStyleElement=y(),h()(Kn.A,Zn),Kn.A&&Kn.A.locals&&Kn.A.locals})(),r})(),t.exports=e()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}function i(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}t.r(e),t.d(e,{DownloadableFile:()=>s,EventfulSet:()=>o,detectMac:()=>i,shuffled:()=>n,userIsTyping:()=>r});class s{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class o{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{RNAcanvas:()=>C});var t=n(662),e=n(298),i=n(925);class s{constructor(){this.domNode=document.createElement("div"),this.domNode.style.overflow="auto";let t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div");t.style.flexGrow="1",e.style.flexGrow="0",n.style.flexGrow="1",this.domNode.style.display="flex",this.domNode.style.flexDirection="column",this.domNode.append(t,e,n);let r=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");r.style.flexGrow="1",s.style.flexGrow="0",o.style.flexGrow="1",e.style.display="flex",e.style.flexDirection="row",e.append(r,s,o);let a=document.createElement("div");this.contentContainer=document.createElement("div");let u=document.createElement("div");a.style.flexGrow="1",this.contentContainer.style.flexGrow="0",u.style.flexGrow="1",s.style.display="flex",s.style.flexDirection="column",s.append(a,this.contentContainer,u),this.horizontalScrollbar=new i.HorizontalScrollbar(this.domNode),this.verticalScrollbar=new i.VerticalScrollbar(this.domNode),this.scrollbars=new i.Scrollbars(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}append(t){this.contentContainer.append(t)}get style(){return this.domNode.style}}class o{constructor(t,e,n){this.targetDrawing=t,this.horizontalScrollbar=e,this.verticalScrollbar=n}get centerPoint(){return{x:this.horizontalScrollbar.thumb.centerX/this.targetDrawing.horizontalScaling+this.targetDrawing.minX,y:this.verticalScrollbar.thumb.centerY/this.targetDrawing.verticalScaling+this.targetDrawing.minY}}set centerPoint(t){this.horizontalScrollbar.thumb.centerX=this.targetDrawing.horizontalScaling*(t.x-this.targetDrawing.minX),this.verticalScrollbar.thumb.centerY=this.targetDrawing.verticalScaling*(t.y-this.targetDrawing.minY)}fitToContent(){let t=this.targetDrawing.contentBBox;this.targetDrawing.setScaling(.9*Math.min(this.horizontalScrollbar.thumb.length/t.width,this.verticalScrollbar.thumb.length/t.height)),this.centerPoint={x:t.x+t.width/2,y:t.y+t.height/2}}}var a,u=n(460),h=n(106),l=n(524),c=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class d{constructor(t){this.targetApp=t,a.set(this,void 0),window.addEventListener("mousedown",(t=>function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}(this,a,t,"f"))),window.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&"A"===e.key.toUpperCase()&&c(this,a,"f")&&c(this,a,"f").target instanceof Node&&t.domNode.contains(c(this,a,"f").target)&&((0,h.userIsTyping)()||(e.preventDefault(),t.selectAll()))}),{passive:!1})}}a=new WeakMap;var f,p,m,g=n(124),y=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class b{constructor(t){f.add(this),this.formsContainer=t,this.formsContainer.addEventListener("mousedown",(t=>{let e=y(this,f,"m",p).call(this,t);!e||y(this,f,"m",m).call(this,e)})),this.formsContainer.addEventListener("focusin",(t=>{let e=y(this,f,"m",p).call(this,t);!e||y(this,f,"m",m).call(this,e)}))}}f=new WeakSet,p=function(t){if(!(t.target instanceof Node))return;let e=t.target;return[...this.formsContainer.childNodes].find((t=>e===t||t.contains(e)))},m=function(t){t!==this.formsContainer.lastChild&&this.formsContainer.appendChild(t)};var v,w,x=n(628),_=n(963),S=n(31),M=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n};function O(t){return t instanceof SVGGraphicsElement}class C{constructor(){v.set(this,void 0),this.selectedSVGElements=new h.EventfulSet,w.set(this,void 0),this.toolbarContainer=document.createElement("div"),this.domNode=document.createElement("div"),this.domNode.style.background="repeating-conic-gradient(#eee 0% 25%, white 0% 50%) 50% / 20px 20px",this.boundingBox=document.createElement("div"),this.domNode.appendChild(this.boundingBox),this.boundingBox.style.width="100%",this.boundingBox.style.height="100%",this.boundingBox.style.overflow="auto",this.boundingBox.style.position="relative",this.drawingScrollContainer=new s,this.drawingScrollContainer.style.width="100%",this.drawingScrollContainer.style.height="100%",this.drawingScrollContainer.appendTo(this.boundingBox),this.stackedDrawingsContainer=document.createElement("div"),this.stackedDrawingsContainer.style.position="relative",this.drawingScrollContainer.append(this.stackedDrawingsContainer),this.drawing=new t.Drawing,this.drawing.domNode.style.backgroundColor="white",this.drawing.domNode.style.userSelect="none",this.drawing.domNode.style.webkitUserSelect="none",this.drawing.domNode.style.cursor="default",this.invertedPrimaryBondsHider=new e.InvertedStraightBondsHider({[Symbol.iterator]:()=>[...this.drawing.primaryBonds].values()},this.drawing.domNode),this.overlaidDrawing=new t.Drawing,this.overlaidDrawing.domNode.style.position="absolute",this.overlaidDrawing.domNode.style.top="0px",this.overlaidDrawing.domNode.style.left="0px",this.overlaidDrawing.domNode.style.pointerEvents="none",new MutationObserver((()=>{this.overlaidDrawing.setBoundaries(this.drawing),this.overlaidDrawing.horizontalScaling=this.drawing.horizontalScaling,this.overlaidDrawing.verticalScaling=this.drawing.verticalScaling})).observe(this.drawing.domNode,{attributes:!0}),this.stackedDrawingsContainer.append(this.drawing.domNode,this.overlaidDrawing.domNode),this.drawingView=new o(this.drawing,this.horizontalDrawingScrollbar,this.verticalDrawingScrollbar),this.pinchToScaleFeature=new u.PinchToScaleFeature(this.drawing.domNode),this.pinchToScaleFeature.horizontalScrollbar=this.horizontalDrawingScrollbar,this.pinchToScaleFeature.verticalScrollbar=this.verticalDrawingScrollbar,this.pinchToScaleFeature.interactionScope=this.domNode,this.selectedSVGElementHighlightings=new l.LiveSVGElementHighlightings(this.selectedSVGElements,this.drawing.domNode),this.selectedSVGElementHighlightings.appendTo(this.overlaidDrawing.domNode),this.clickSelectTool=new u.ClickSelectTool(this.drawing.domNode,this.selectedSVGElements),this.selectingRect=new u.SelectingRect(this.drawing.domNode,this.selectedSVGElements),this.selectingRect.appendTo(this.overlaidDrawing.domNode),this.ctrlASelector=new d({domNode:this.domNode,selectAll:()=>this.selectAll()}),this.selectedBases=new g.SelectedBases(this.drawing,this.selectedSVGElements),this.consecutiveBasesSelectingTool=new g.ConsecutiveBasesSelectingTool(this.drawing,this.selectedBases),this.draggingTool=new g.DraggingTool(this.drawing,{svgElements:this.selectedSVGElements,bases:this.selectedBases},{beforeDragging:()=>this.hideOverlaidDrawing(),afterDragging:()=>this.unhideOverlaidDrawing()}),this.formsContainer=document.createElement("div"),this.boundingBox.appendChild(this.formsContainer),M(this,w,new b(this.formsContainer),"f"),this.basesLayoutForm=new x.BasesLayoutForm(this.drawing,this.selectedBases,{beforeMovingBases:()=>this.hideOverlaidDrawing(),afterMovingBases:()=>this.unhideOverlaidDrawing()}),this.exportForm=new _.ExportForm({drawing:this.drawing}),this.dotBracketDrawer=new t.DotBracketDrawer(this.drawing),M(this,v,new t.SchemaDrawer(this.drawing),"f"),this.toolbar=new S.Toolbar({layoutButton:{onClick:()=>this.openForm(this.basesLayoutForm)},exportButton:{onClick:()=>this.openForm(this.exportForm)}}),this.toolbar.appendTo(this.toolbarContainer),this.boundingBox.append(this.toolbarContainer);let n=(0,S.ToolbarRepositioner)();n.addEventListener("click",(()=>this.toolbar.reposition())),n.title="Reposition the toolbar.";let r=document.createElement("div");r.append(n),this.boundingBox.append(r)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}get horizontalDrawingScrollbar(){return this.drawingScrollContainer.horizontalScrollbar}get verticalDrawingScrollbar(){return this.drawingScrollContainer.verticalScrollbar}get drawingScrollbars(){return this.drawingScrollContainer.scrollbars}hideOverlaidDrawing(){this.overlaidDrawing.domNode.style.visibility="hidden"}unhideOverlaidDrawing(){this.overlaidDrawing.domNode.style.visibility="visible"}drawDotBracket(t,e){this.dotBracketDrawer.draw(t,e)}drawSchema(t){(function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)})(this,v,"f").draw(t)}selectAll(){this.selectedSVGElements.addAll([...this.drawing.domNode.children].filter(O))}openForm(t){t instanceof Node?this.formsContainer.appendChild(t):t.appendTo(this.formsContainer)}get style(){return this.domNode.style}}v=new WeakMap,w=new WeakMap})(),r})()));
|