You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
1.1 MiB
138 lines
1.1 MiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[29020],{62850:function(on,Yc,Y){Y.d(Yc,{kJ:function(){return jc},RN:function(){return E6}});var Cr={};Y.r(Cr),Y.d(Cr,{circle:function(){return gA},diamond:function(){return pA},rect:function(){return yA},simple:function(){return xA},triangle:function(){return em},triangleRect:function(){return bA},vee:function(){return mA}});function lr(r){"@babel/helpers - typeof";return lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lr(r)}function Xc(r,t){if(lr(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(lr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Kc(r){var t=Xc(r,"string");return lr(t)=="symbol"?t:t+""}function ke(r,t,e){return(t=Kc(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Po(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function De(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Po(Object(e),!0).forEach(function(n){ke(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):Po(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function ae(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function No(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,Kc(n.key),n)}}function se(r,t,e){return t&&No(r.prototype,t),e&&No(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function oa(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function cs(r){if(Array.isArray(r))return oa(r)}function $c(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function ds(r,t){if(r){if(typeof r=="string")return oa(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?oa(r,t):void 0}}function qc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(r){return cs(r)||$c(r)||ds(r)||qc()}function be(r){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},be(r)}function ut(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ut=function(){return!!r})()}function rt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ur(r,t){if(t&&(lr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rt(r)}function _e(r,t,e){return t=be(t),ur(r,ut()?Reflect.construct(t,e||[],be(r).constructor):t.apply(r,e))}function Lt(r,t){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Lt(r,t)}function ye(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&Lt(r,t)}function wt(r){if(Array.isArray(r))return r}function Kr(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Si(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pe(r,t){return wt(r)||Kr(r,t)||ds(r,t)||Si()}var cr=Y(54146),R=Y(33983),ge=Y(98333),G=Y(85975),la=Y(35600),K=Y(32945),$r=Y(31437),oe=Y(25897),Or=Y(44078),ue=Y(95147),Se=Y(76714),Ne=Y(81957),Mv=Y(69877),ua=Y(71523),ca=Y(13882),Rv=Y(80450),Mo=Y(8614),Ro=Y(4848),Lo=Y(75839),Lv=Y(99872),Do=Y(92455),Dv=Y(65850),Iv=Y(28659),Bv=Y(83555),ce=Y(71154),da=Y(44978),ha=Y(90134),de=Y(45607),yt=Y(4637),Fv=Y(84329);function Px(r,t){for(;!{}.hasOwnProperty.call(r,t)&&(r=be(r))!==null;);return r}function Jc(){return Jc=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,t,e){var n=Px(r,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?r:e):i.value}},Jc.apply(null,arguments)}function zv(r,t,e,n){var i=Jc(be(1&n?r.prototype:r),t,e);return 2&n&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function Qc(r,t,e){r.prototype=t.prototype=e,e.constructor=r}function Gv(r,t){var e=Object.create(r.prototype);for(var n in t)e[n]=t[n];return e}function hs(){}var fs=.7,Io=1/fs,fa="\\s*([+-]?\\d+)\\s*",vs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nx=/^#([0-9a-f]{3,8})$/,Mx=new RegExp(`^rgb\\(${fa},${fa},${fa}\\)$`),Rx=new RegExp(`^rgb\\(${dr},${dr},${dr}\\)$`),Lx=new RegExp(`^rgba\\(${fa},${fa},${fa},${vs}\\)$`),Dx=new RegExp(`^rgba\\(${dr},${dr},${dr},${vs}\\)$`),Ix=new RegExp(`^hsl\\(${vs},${dr},${dr}\\)$`),Bx=new RegExp(`^hsla\\(${vs},${dr},${dr},${vs}\\)$`),jv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Qc(hs,Bo,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Wv,formatHex:Wv,formatHex8:Fx,formatHsl:zx,formatRgb:Zv,toString:Zv});function Wv(){return this.rgb().formatHex()}function Fx(){return this.rgb().formatHex8()}function zx(){return Xv(this).formatHsl()}function Zv(){return this.rgb().formatRgb()}function Bo(r){var t,e;return r=(r+"").trim().toLowerCase(),(t=Nx.exec(r))?(e=t[1].length,t=parseInt(t[1],16),e===6?Vv(t):e===3?new Kt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?Fo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?Fo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Mx.exec(r))?new Kt(t[1],t[2],t[3],1):(t=Rx.exec(r))?new Kt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lx.exec(r))?Fo(t[1],t[2],t[3],t[4]):(t=Dx.exec(r))?Fo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ix.exec(r))?Yv(t[1],t[2]/100,t[3]/100,1):(t=Bx.exec(r))?Yv(t[1],t[2]/100,t[3]/100,t[4]):jv.hasOwnProperty(r)?Vv(jv[r]):r==="transparent"?new Kt(NaN,NaN,NaN,0):null}function Vv(r){return new Kt(r>>16&255,r>>8&255,r&255,1)}function Fo(r,t,e,n){return n<=0&&(r=t=e=NaN),new Kt(r,t,e,n)}function Gx(r){return r instanceof hs||(r=Bo(r)),r?(r=r.rgb(),new Kt(r.r,r.g,r.b,r.opacity)):new Kt}function jx(r,t,e,n){return arguments.length===1?Gx(r):new Kt(r,t,e,n==null?1:n)}function Kt(r,t,e,n){this.r=+r,this.g=+t,this.b=+e,this.opacity=+n}Qc(Kt,jx,Gv(hs,{brighter(r){return r=r==null?Io:Math.pow(Io,r),new Kt(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?fs:Math.pow(fs,r),new Kt(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Kt(Ti(this.r),Ti(this.g),Ti(this.b),zo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Hv,formatHex:Hv,formatHex8:Wx,formatRgb:Uv,toString:Uv}));function Hv(){return`#${Ai(this.r)}${Ai(this.g)}${Ai(this.b)}`}function Wx(){return`#${Ai(this.r)}${Ai(this.g)}${Ai(this.b)}${Ai((isNaN(this.opacity)?1:this.opacity)*255)}`}function Uv(){const r=zo(this.opacity);return`${r===1?"rgb(":"rgba("}${Ti(this.r)}, ${Ti(this.g)}, ${Ti(this.b)}${r===1?")":`, ${r})`}`}function zo(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Ti(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Ai(r){return r=Ti(r),(r<16?"0":"")+r.toString(16)}function Yv(r,t,e,n){return n<=0?r=t=e=NaN:e<=0||e>=1?r=t=NaN:t<=0&&(r=NaN),new Wn(r,t,e,n)}function Xv(r){if(r instanceof Wn)return new Wn(r.h,r.s,r.l,r.opacity);if(r instanceof hs||(r=Bo(r)),!r)return new Wn;if(r instanceof Wn)return r;r=r.rgb();var t=r.r/255,e=r.g/255,n=r.b/255,i=Math.min(t,e,n),a=Math.max(t,e,n),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(e-n)/o+(e<n)*6:e===a?s=(n-t)/o+2:s=(t-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Wn(s,o,l,r.opacity)}function Zx(r,t,e,n){return arguments.length===1?Xv(r):new Wn(r,t,e,n==null?1:n)}function Wn(r,t,e,n){this.h=+r,this.s=+t,this.l=+e,this.opacity=+n}Qc(Wn,Zx,Gv(hs,{brighter(r){return r=r==null?Io:Math.pow(Io,r),new Wn(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?fs:Math.pow(fs,r),new Wn(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,t=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,n=e+(e<.5?e:1-e)*t,i=2*e-n;return new Kt(ed(r>=240?r-240:r+120,i,n),ed(r,i,n),ed(r<120?r+240:r-120,i,n),this.opacity)},clamp(){return new Wn(Kv(this.h),Go(this.s),Go(this.l),zo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=zo(this.opacity);return`${r===1?"hsl(":"hsla("}${Kv(this.h)}, ${Go(this.s)*100}%, ${Go(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Kv(r){return r=(r||0)%360,r<0?r+360:r}function Go(r){return Math.max(0,Math.min(1,r||0))}function ed(r,t,e){return(r<60?t+(e-t)*r/60:r<180?e:r<240?t+(e-t)*(240-r)/60:t)*255}var ct=Y(11702);function Ci(){"use strict";Ci=function(){return t};var r,t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(C,S,T){C[S]=T.value},a=typeof Symbol=="function"?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(C,S,T){return Object.defineProperty(C,S,{value:T,enumerable:!0,configurable:!0,writable:!0}),C[S]}try{u({},"")}catch(C){u=function(T,N,B){return T[N]=B}}function c(C,S,T,N){var B=S&&S.prototype instanceof m?S:m,I=Object.create(B.prototype),W=new z(N||[]);return i(I,"_invoke",{value:P(C,T,W)}),I}function d(C,S,T){try{return{type:"normal",arg:C.call(S,T)}}catch(N){return{type:"throw",arg:N}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",g="completed",p={};function m(){}function y(){}function b(){}var _={};u(_,s,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(F([])));x&&x!==e&&n.call(x,s)&&(_=x);var E=b.prototype=m.prototype=Object.create(_);function k(C){["next","throw","return"].forEach(function(S){u(C,S,function(T){return this._invoke(S,T)})})}function O(C,S){function T(B,I,W,X){var H=d(C[B],C,I);if(H.type!=="throw"){var $=H.arg,le=$.value;return le&&lr(le)=="object"&&n.call(le,"__await")?S.resolve(le.__await).then(function(fe){T("next",fe,W,X)},function(fe){T("throw",fe,W,X)}):S.resolve(le).then(function(fe){$.value=fe,W($)},function(fe){return T("throw",fe,W,X)})}X(H.arg)}var N;i(this,"_invoke",{value:function(I,W){function X(){return new S(function(H,$){T(I,W,H,$)})}return N=N?N.then(X,X):X()}})}function P(C,S,T){var N=h;return function(B,I){if(N===v)throw Error("Generator is already running");if(N===g){if(B==="throw")throw I;return{value:r,done:!0}}for(T.method=B,T.arg=I;;){var W=T.delegate;if(W){var X=M(W,T);if(X){if(X===p)continue;return X}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(N===h)throw N=g,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);N=v;var H=d(C,S,T);if(H.type==="normal"){if(N=T.done?g:f,H.arg===p)continue;return{value:H.arg,done:T.done}}H.type==="throw"&&(N=g,T.method="throw",T.arg=H.arg)}}}function M(C,S){var T=S.method,N=C.iterator[T];if(N===r)return S.delegate=null,T==="throw"&&C.iterator.return&&(S.method="return",S.arg=r,M(C,S),S.method==="throw")||T!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+T+"' method")),p;var B=d(N,C.iterator,S.arg);if(B.type==="throw")return S.method="throw",S.arg=B.arg,S.delegate=null,p;var I=B.arg;return I?I.done?(S[C.resultName]=I.value,S.next=C.nextLoc,S.method!=="return"&&(S.method="next",S.arg=r),S.delegate=null,p):I:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function L(C){var S={tryLoc:C[0]};1 in C&&(S.catchLoc=C[1]),2 in C&&(S.finallyLoc=C[2],S.afterLoc=C[3]),this.tryEntries.push(S)}function D(C){var S=C.completion||{};S.type="normal",delete S.arg,C.completion=S}function z(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(L,this),this.reset(!0)}function F(C){if(C||C===""){var S=C[s];if(S)return S.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var T=-1,N=function B(){for(;++T<C.length;)if(n.call(C,T))return B.value=C[T],B.done=!1,B;return B.value=r,B.done=!0,B};return N.next=N}}throw new TypeError(lr(C)+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(C){var S=typeof C=="function"&&C.constructor;return!!S&&(S===y||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,b):(C.__proto__=b,u(C,l,"GeneratorFunction")),C.prototype=Object.create(E),C},t.awrap=function(C){return{__await:C}},k(O.prototype),u(O.prototype,o,function(){return this}),t.AsyncIterator=O,t.async=function(C,S,T,N,B){B===void 0&&(B=Promise);var I=new O(c(C,S,T,N),B);return t.isGeneratorFunction(S)?I:I.next().then(function(W){return W.done?W.value:I.next()})},k(E),u(E,l,"Generator"),u(E,s,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),t.keys=function(C){var S=Object(C),T=[];for(var N in S)T.push(N);return T.reverse(),function B(){for(;T.length;){var I=T.pop();if(I in S)return B.value=I,B.done=!1,B}return B.done=!0,B}},t.values=F,z.prototype={constructor:z,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(D),!S)for(var T in this)T.charAt(0)==="t"&&n.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=r)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var T=this;function N($,le){return W.type="throw",W.arg=S,T.next=$,le&&(T.method="next",T.arg=r),!!le}for(var B=this.tryEntries.length-1;B>=0;--B){var I=this.tryEntries[B],W=I.completion;if(I.tryLoc==="root")return N("end");if(I.tryLoc<=this.prev){var X=n.call(I,"catchLoc"),H=n.call(I,"finallyLoc");if(X&&H){if(this.prev<I.catchLoc)return N(I.catchLoc,!0);if(this.prev<I.finallyLoc)return N(I.finallyLoc)}else if(X){if(this.prev<I.catchLoc)return N(I.catchLoc,!0)}else{if(!H)throw Error("try statement without catch or finally");if(this.prev<I.finallyLoc)return N(I.finallyLoc)}}}},abrupt:function(S,T){for(var N=this.tryEntries.length-1;N>=0;--N){var B=this.tryEntries[N];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var I=B;break}}I&&(S==="break"||S==="continue")&&I.tryLoc<=T&&T<=I.finallyLoc&&(I=null);var W=I?I.completion:{};return W.type=S,W.arg=T,I?(this.method="next",this.next=I.finallyLoc,p):this.complete(W)},complete:function(S,T){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&T&&(this.next=T),p},finish:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.finallyLoc===S)return this.complete(N.completion,N.afterLoc),D(N),p}},catch:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.tryLoc===S){var B=N.completion;if(B.type==="throw"){var I=B.arg;D(N)}return I}}throw Error("illegal catch attempt")},delegateYield:function(S,T,N){return this.delegate={iterator:F(S),resultName:T,nextLoc:N},this.method==="next"&&(this.arg=r),p}},t}function $v(r,t,e,n,i,a,s){try{var o=r[a](s),l=o.value}catch(u){return void e(u)}o.done?t(l):Promise.resolve(l).then(n,i)}function td(r){return function(){var t=this,e=arguments;return new Promise(function(n,i){var a=r.apply(t,e);function s(l){$v(a,n,i,s,o,"next",l)}function o(l){$v(a,n,i,s,o,"throw",l)}s(void 0)})}}function va(r,t){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=ds(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function Vx(r,t){if(r==null)return{};var e={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(t.includes(n))continue;e[n]=r[n]}return e}function Oi(r,t){if(r==null)return{};var e,n,i=Vx(r,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)e=a[n],t.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var Hx=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:typeof self!="undefined"?self:{},qv={exports:{}};(function(r,t){(function(e,n){r.exports=n()})(Hx,function(){function e(w,x,E,k,O){n(w,x,E||0,k||w.length-1,O||a)}function n(w,x,E,k,O){for(;k>E;){if(k-E>600){var P=k-E+1,M=x-E+1,L=Math.log(P),D=.5*Math.exp(2*L/3),z=.5*Math.sqrt(L*D*(P-D)/P)*(M-P/2<0?-1:1),F=Math.max(E,Math.floor(x-M*D/P+z)),C=Math.min(k,Math.floor(x+(P-M)*D/P+z));n(w,x,F,C,O)}var S=w[x],T=E,N=k;for(i(w,E,x),O(w[k],S)>0&&i(w,E,k);T<N;){for(i(w,T,N),T++,N--;O(w[T],S)<0;)T++;for(;O(w[N],S)>0;)N--}O(w[E],S)===0?i(w,E,N):(N++,i(w,N,k)),N<=x&&(E=N+1),x<=N&&(k=N-1)}}function i(w,x,E){var k=w[x];w[x]=w[E],w[E]=k}function a(w,x){return w<x?-1:w>x?1:0}var s=function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(x){var E=this.data,k=[];if(!y(x,E))return k;for(var O=this.toBBox,P=[];E;){for(var M=0;M<E.children.length;M++){var L=E.children[M],D=E.leaf?O(L):L;y(x,D)&&(E.leaf?k.push(L):m(x,D)?this._all(L,k):P.push(L))}E=P.pop()}return k},s.prototype.collides=function(x){var E=this.data;if(!y(x,E))return!1;for(var k=[];E;){for(var O=0;O<E.children.length;O++){var P=E.children[O],M=E.leaf?this.toBBox(P):P;if(y(x,M)){if(E.leaf||m(x,M))return!0;k.push(P)}}E=k.pop()}return!1},s.prototype.load=function(x){if(!(x&&x.length))return this;if(x.length<this._minEntries){for(var E=0;E<x.length;E++)this.insert(x[E]);return this}var k=this._build(x.slice(),0,x.length-1,0);if(!this.data.children.length)this.data=k;else if(this.data.height===k.height)this._splitRoot(this.data,k);else{if(this.data.height<k.height){var O=this.data;this.data=k,k=O}this._insert(k,this.data.height-k.height-1,!0)}return this},s.prototype.insert=function(x){return x&&this._insert(x,this.data.height-1),this},s.prototype.clear=function(){return this.data=b([]),this},s.prototype.remove=function(x,E){if(!x)return this;for(var k=this.data,O=this.toBBox(x),P=[],M=[],L,D,z;k||P.length;){if(k||(k=P.pop(),D=P[P.length-1],L=M.pop(),z=!0),k.leaf){var F=o(x,k.children,E);if(F!==-1)return k.children.splice(F,1),P.push(k),this._condense(P),this}!z&&!k.leaf&&m(k,O)?(P.push(k),M.push(L),L=0,D=k,k=k.children[0]):D?(L++,k=D.children[L],z=!1):k=null}return this},s.prototype.toBBox=function(x){return x},s.prototype.compareMinX=function(x,E){return x.minX-E.minX},s.prototype.compareMinY=function(x,E){return x.minY-E.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(x){return this.data=x,this},s.prototype._all=function(x,E){for(var k=[];x;)x.leaf?E.push.apply(E,x.children):k.push.apply(k,x.children),x=k.pop();return E},s.prototype._build=function(x,E,k,O){var P=k-E+1,M=this._maxEntries,L;if(P<=M)return L=b(x.slice(E,k+1)),l(L,this.toBBox),L;O||(O=Math.ceil(Math.log(P)/Math.log(M)),M=Math.ceil(P/Math.pow(M,O-1))),L=b([]),L.leaf=!1,L.height=O;var D=Math.ceil(P/M),z=D*Math.ceil(Math.sqrt(M));_(x,E,k,z,this.compareMinX);for(var F=E;F<=k;F+=z){var C=Math.min(F+z-1,k);_(x,F,C,D,this.compareMinY);for(var S=F;S<=C;S+=D){var T=Math.min(S+D-1,C);L.children.push(this._build(x,S,T,O-1))}}return l(L,this.toBBox),L},s.prototype._chooseSubtree=function(x,E,k,O){for(;O.push(E),!(E.leaf||O.length-1===k);){for(var P=1/0,M=1/0,L=void 0,D=0;D<E.children.length;D++){var z=E.children[D],F=f(z),C=g(x,z)-F;C<M?(M=C,P=F<P?F:P,L=z):C===M&&F<P&&(P=F,L=z)}E=L||E.children[0]}return E},s.prototype._insert=function(x,E,k){var O=k?x:this.toBBox(x),P=[],M=this._chooseSubtree(O,this.data,E,P);for(M.children.push(x),c(M,O);E>=0&&P[E].children.length>this._maxEntries;)this._split(P,E),E--;this._adjustParentBBoxes(O,P,E)},s.prototype._split=function(x,E){var k=x[E],O=k.children.length,P=this._minEntries;this._chooseSplitAxis(k,P,O);var M=this._chooseSplitIndex(k,P,O),L=b(k.children.splice(M,k.children.length-M));L.height=k.height,L.leaf=k.leaf,l(k,this.toBBox),l(L,this.toBBox),E?x[E-1].children.push(L):this._splitRoot(k,L)},s.prototype._splitRoot=function(x,E){this.data=b([x,E]),this.data.height=x.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(x,E,k){for(var O,P=1/0,M=1/0,L=E;L<=k-E;L++){var D=u(x,0,L,this.toBBox),z=u(x,L,k,this.toBBox),F=p(D,z),C=f(D)+f(z);F<P?(P=F,O=L,M=C<M?C:M):F===P&&C<M&&(M=C,O=L)}return O||k-E},s.prototype._chooseSplitAxis=function(x,E,k){var O=x.leaf?this.compareMinX:d,P=x.leaf?this.compareMinY:h,M=this._allDistMargin(x,E,k,O),L=this._allDistMargin(x,E,k,P);M<L&&x.children.sort(O)},s.prototype._allDistMargin=function(x,E,k,O){x.children.sort(O);for(var P=this.toBBox,M=u(x,0,E,P),L=u(x,k-E,k,P),D=v(M)+v(L),z=E;z<k-E;z++){var F=x.children[z];c(M,x.leaf?P(F):F),D+=v(M)}for(var C=k-E-1;C>=E;C--){var S=x.children[C];c(L,x.leaf?P(S):S),D+=v(L)}return D},s.prototype._adjustParentBBoxes=function(x,E,k){for(var O=k;O>=0;O--)c(E[O],x)},s.prototype._condense=function(x){for(var E=x.length-1,k=void 0;E>=0;E--)x[E].children.length===0?E>0?(k=x[E-1].children,k.splice(k.indexOf(x[E]),1)):this.clear():l(x[E],this.toBBox)};function o(w,x,E){if(!E)return x.indexOf(w);for(var k=0;k<x.length;k++)if(E(w,x[k]))return k;return-1}function l(w,x){u(w,0,w.children.length,x,w)}function u(w,x,E,k,O){O||(O=b(null)),O.minX=1/0,O.minY=1/0,O.maxX=-1/0,O.maxY=-1/0;for(var P=x;P<E;P++){var M=w.children[P];c(O,w.leaf?k(M):M)}return O}function c(w,x){return w.minX=Math.min(w.minX,x.minX),w.minY=Math.min(w.minY,x.minY),w.maxX=Math.max(w.maxX,x.maxX),w.maxY=Math.max(w.maxY,x.maxY),w}function d(w,x){return w.minX-x.minX}function h(w,x){return w.minY-x.minY}function f(w){return(w.maxX-w.minX)*(w.maxY-w.minY)}function v(w){return w.maxX-w.minX+(w.maxY-w.minY)}function g(w,x){return(Math.max(x.maxX,w.maxX)-Math.min(x.minX,w.minX))*(Math.max(x.maxY,w.maxY)-Math.min(x.minY,w.minY))}function p(w,x){var E=Math.max(w.minX,x.minX),k=Math.max(w.minY,x.minY),O=Math.min(w.maxX,x.maxX),P=Math.min(w.maxY,x.maxY);return Math.max(0,O-E)*Math.max(0,P-k)}function m(w,x){return w.minX<=x.minX&&w.minY<=x.minY&&x.maxX<=w.maxX&&x.maxY<=w.maxY}function y(w,x){return x.minX<=w.maxX&&x.minY<=w.maxY&&x.maxX>=w.minX&&x.maxY>=w.minY}function b(w){return{children:w,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(w,x,E,k,O){for(var P=[x,E];P.length;)if(E=P.pop(),x=P.pop(),!(E-x<=k)){var M=x+Math.ceil((E-x)/k/2)*k;e(w,M,x,E,O),P.push(x,M,M,E)}}return s})})(qv);var Ux=qv.exports,Z=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),jo=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),qr=function(){function r(){ae(this,r),this.plugins=[]}return se(r,[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(n){var i=e.context.renderingPlugins.indexOf(n);i>=0&&e.context.renderingPlugins.splice(i,1)})}}])}(),Yx=function(){function r(t){ae(this,r),this.clipSpaceNearZ=jo.NEGATIVE_ONE,this.plugins=[],this.config=De({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},t)}return se(r,[{key:"registerPlugin",value:function(e){var n=this.plugins.findIndex(function(i){return i===e});n===-1&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var n=this.plugins.findIndex(function(i){return i===e});n>-1&&this.plugins.splice(n,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(e){return this.plugins.find(function(n){return n.name===e})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(e){Object.assign(this.config,e)}}])}(),nd=R.IH,ga=R.JG,Xx=R.Fp,Kx=R.VV,Jv=R.bA,rd=R.lu,Ke=function(){function r(){ae(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return se(r,[{key:"update",value:function(e,n){ga(this.center,e),ga(this.halfExtents,n),rd(this.min,this.center,this.halfExtents),nd(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,n){nd(this.center,n,e),Jv(this.center,this.center,.5),rd(this.halfExtents,n,e),Jv(this.halfExtents,this.halfExtents,.5),ga(this.min,e),ga(this.max,n)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,i=n[0],a=n[1],s=n[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,p=s+c,m=e.center,y=m[0],b=m[1],_=m[2],w=e.halfExtents,x=w[0],E=w[1],k=w[2],O=y-x,P=y+x,M=b-E,L=b+E,D=_-k,z=_+k;O<d&&(d=O),P>h&&(h=P),M<f&&(f=M),L>v&&(v=L),D<g&&(g=D),z>p&&(p=z),n[0]=(d+h)*.5,n[1]=(f+v)*.5,n[2]=(g+p)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(p-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=p}}},{key:"setFromTransformedAABB",value:function(e,n){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=n[0],u=n[4],c=n[8],d=n[1],h=n[5],f=n[9],v=n[2],g=n[6],p=n[10],m=Math.abs(l),y=Math.abs(u),b=Math.abs(c),_=Math.abs(d),w=Math.abs(h),x=Math.abs(f),E=Math.abs(v),k=Math.abs(g),O=Math.abs(p);i[0]=n[12]+l*s[0]+u*s[1]+c*s[2],i[1]=n[13]+d*s[0]+h*s[1]+f*s[2],i[2]=n[14]+v*s[0]+g*s[1]+p*s[2],a[0]=m*o[0]+y*o[1]+b*o[2],a[1]=_*o[0]+w*o[1]+x*o[2],a[2]=E*o[0]+k*o[1]+O*o[2],rd(this.min,i,a),nd(this.max,i,a)}},{key:"intersects",value:function(e){var n=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&n[0]>=s[0]&&i[1]<=a[1]&&n[1]>=s[1]&&i[2]<=a[2]&&n[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var n=new r,i=Xx([0,0,0],this.getMin(),e.getMin()),a=Kx([0,0,0],this.getMax(),e.getMax());return n.setMinMax(i,a),n}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?ga([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?ga([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),$x=function(){function r(t,e){ae(this,r),this.distance=t||0,this.normal=e||R.al(0,1,0),this.updatePNVertexFlag()}return se(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return R.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/R.Zh(this.normal);R.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,n,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(n),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&R.t7(i,e,n,o),l}}])}(),pa=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),qx=function(){function r(t){if(ae(this,r),this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new $x)}return se(r,[{key:"extractFromVPMatrix",value:function(e){var n=Pe(e,16),i=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],c=n[6],d=n[7],h=n[8],f=n[9],v=n[10],g=n[11],p=n[12],m=n[13],y=n[14],b=n[15];R.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=b-p,R.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=b+p,R.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=b+m,R.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=b-m,R.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=b-y,R.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=b+y,this.planes.forEach(function(_){_.normalize(),_.updatePNVertexFlag()})}}])}(),At=function(){function r(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ae(this,r),this.x=0,this.y=0,this.x=t,this.y=e}return se(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),ma=function(){function r(t,e,n,i){ae(this,r),this.x=t,this.y=e,this.width=n,this.height=i,this.left=t,this.right=t+n,this.top=e,this.bottom=e+i}return se(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,n){var i=ge.al(e.x,e.y,0,1),a=ge.al(e.x+e.width,e.y,0,1),s=ge.al(e.x,e.y+e.height,0,1),o=ge.al(e.x+e.width,e.y+e.height,0,1),l=ge.Ue(),u=ge.Ue(),c=ge.Ue(),d=ge.Ue();ge.fF(l,i,n),ge.fF(u,a,n),ge.fF(c,s,n),ge.fF(d,o,n);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Ie="Method not implemented.",ya="Use document.documentElement instead.",Jx="Cannot append a destroyed element.";function ba(r){return r===void 0?0:r>360||r<-360?r%360:r}var id=R.Ue();function Ft(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?n?R.d9(r):R.JG(id,r):(0,oe.Z)(r)?n?R.al(r,t,e):R.t8(id,r,t,e):n?R.al(r[0],r[1]||t,r[2]||e):R.t8(id,r[0],r[1]||t,r[2]||e)}var Qx=Math.PI/180;function Be(r){return r*Qx}var eE=180/Math.PI;function $t(r){return r*eE}var tE=.9;function D6(r){return r%=400,r<0&&(r+=400),r*tE}function I6(r){return r/360}function nE(r){return 360*r}var Wo=Math.PI/2;function rE(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=e*e,o=n*n,l=i*i,u=a*a,c=s+o+l+u,d=e*a-n*i;return d>.499995*c?(r[0]=Wo,r[1]=2*Math.atan2(n,e),r[2]=0):d<-.499995*c?(r[0]=-Wo,r[1]=2*Math.atan2(n,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*n)),r[1]=Math.atan2(2*(e*a+n*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*n+i*a),1-2*(o+l))),r}function iE(r,t){var e,n,i=G.getScaling(R.Ue(),t),a=Pe(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-t[2]/s);return u<Wo?u>-Wo?(e=Math.atan2(t[6]/o,t[10]/l),n=Math.atan2(t[1]/s,t[0]/s)):(n=0,e=-Math.atan2(t[4]/o,t[5]/o)):(n=0,e=Math.atan2(t[4]/o,t[5]/o)),r[0]=e,r[1]=u,r[2]=n,r}function ad(r,t){return t.length===16?iE(r,t):rE(r,t)}function aE(r,t,e,n,i){var a=Math.cos(r),s=Math.sin(r);return la.al(n*a,i*s,0,-n*s,i*a,0,t,e,1)}function sE(r,t,e,n,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-t,c=n-i,d=l/u,h=l/c,f=(e+t)/u,v=(n+i)/c,g,p,m=s-a,y=s*a;return o?(g=-s/m,p=-y/m):(g=-(s+a)/m,p=-2*y/m),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=p,r[15]=0,r}function Qv(r){var t=r[0],e=r[1],n=r[3],i=r[4],a=Math.sqrt(t*t+e*e),s=Math.sqrt(n*n+i*i),o=t*i-e*n;if(o<0&&(t<i?a=-a:s=-s),a){var l=1/a;t*=l,e*=l}if(s){var u=1/s;n*=u,i*=u}var c=Math.atan2(e,t),d=$t(c);return[r[6],r[7],a,s,d]}var hr=G.create(),Zn=G.create(),gs=ge.Ue(),pe=[R.Ue(),R.Ue(),R.Ue()],eg=R.Ue();function oE(r,t,e,n,i,a){if(!lE(hr,r)||(G.copy(Zn,hr),Zn[3]=0,Zn[7]=0,Zn[11]=0,Zn[15]=1,Math.abs(G.determinant(Zn))<1e-8))return!1;var s=hr[3],o=hr[7],l=hr[11],u=hr[12],c=hr[13],d=hr[14],h=hr[15];if(s!==0||o!==0||l!==0){gs[0]=s,gs[1]=o,gs[2]=l,gs[3]=h;var f=G.invert(Zn,Zn);if(!f)return!1;G.transpose(Zn,Zn),ge.fF(i,gs,Zn)}else i[0]=i[1]=i[2]=0,i[3]=1;if(t[0]=u,t[1]=c,t[2]=d,uE(pe,hr),e[0]=R.kE(pe[0]),R.Fv(pe[0],pe[0]),n[0]=R.AK(pe[0],pe[1]),sd(pe[1],pe[1],pe[0],1,-n[0]),e[1]=R.kE(pe[1]),R.Fv(pe[1],pe[1]),n[0]/=e[1],n[1]=R.AK(pe[0],pe[2]),sd(pe[2],pe[2],pe[0],1,-n[1]),n[2]=R.AK(pe[1],pe[2]),sd(pe[2],pe[2],pe[1],1,-n[2]),e[2]=R.kE(pe[2]),R.Fv(pe[2],pe[2]),n[1]/=e[2],n[2]/=e[2],R.kC(eg,pe[1],pe[2]),R.AK(pe[0],eg)<0)for(var v=0;v<3;v++)e[v]*=-1,pe[v][0]*=-1,pe[v][1]*=-1,pe[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+pe[0][0]-pe[1][1]-pe[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-pe[0][0]+pe[1][1]-pe[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-pe[0][0]-pe[1][1]+pe[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+pe[0][0]+pe[1][1]+pe[2][2],0)),pe[2][1]>pe[1][2]&&(a[0]=-a[0]),pe[0][2]>pe[2][0]&&(a[1]=-a[1]),pe[1][0]>pe[0][1]&&(a[2]=-a[2]),!0}function lE(r,t){var e=t[15];if(e===0)return!1;for(var n=1/e,i=0;i<16;i++)r[i]=t[i]*n;return!0}function uE(r,t){r[0][0]=t[0],r[0][1]=t[1],r[0][2]=t[2],r[1][0]=t[4],r[1][1]=t[5],r[1][2]=t[6],r[2][0]=t[8],r[2][1]=t[9],r[2][2]=t[10]}function sd(r,t,e,n,i){r[0]=t[0]*n+e[0]*i,r[1]=t[1]*n+e[1]*i,r[2]=t[2]*n+e[2]*i}var Fe=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),od=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),Sn=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),tg={UPDATED:"updated"},ng=2e-4,rg=function(){function r(){ae(this,r),this.clipSpaceNearZ=jo.NEGATIVE_ONE,this.eventEmitter=new cr.Z,this.matrix=G.create(),this.right=R.al(1,0,0),this.up=R.al(0,1,0),this.forward=R.al(0,0,1),this.position=R.al(0,0,1),this.focalPoint=R.al(0,0,0),this.distanceVector=R.al(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=G.create(),this.projectionMatrixInverse=G.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Fe.EXPLORING,this.trackingMode=od.DEFAULT,this.projectionMode=Sn.PERSPECTIVE,this.frustum=new qx,this.orthoMatrix=G.create()}return se(r,[{key:"isOrtho",value:function(){return this.projectionMode===Sn.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,n){return this.type=e,this.type===Fe.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Fe.TRACKING&&n!==void 0&&this.setTrackingMode(n),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Fe.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return G.invert(G.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,n){var i=G.fromTranslation(G.create(),[e,n,0]);this.jitteredProjectionMatrix=G.multiply(G.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===Sn.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===Sn.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,n,i,a,s,o){return this.aspect=e/n,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===Sn.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===Sn.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===Sn.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Sn.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,n){var i=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),u=l.x,c=l.y,d=R.al(u-a,c-s,0),h=R.AK(d,this.right)/R.kE(this.right),f=R.AK(d,this.up)/R.kE(this.up),v=this.getPosition(),g=Pe(v,2),p=g[0],m=g[1],y=this.getFocalPoint(),b=Pe(y,2),_=b[0],w=b[1];return this.setPosition(p-h,m-f),this.setFocalPoint(_-h,w-f),this}},{key:"setPerspective",value:function(e,n,i,a){var s;this.projectionMode=Sn.PERSPECTIVE,this.fov=i,this.near=e,this.far=n,this.aspect=a;var o=this.near*Math.tan(Be(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return sE(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===jo.ZERO),G.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,n,i,a,s,o){var l;this.projectionMode=Sn.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,p=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var m=(this.rright-this.left)/this.view.fullWidth/this.zoom,y=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=m*this.view.offsetX,v=f+m*this.view.width,g-=y*this.view.offsetY,p=g-y*this.view.height}return this.clipSpaceNearZ===jo.NEGATIVE_ONE?G.ortho(this.projectionMatrix,f,v,g,p,s,o):G.orthoZO(this.projectionMatrix,f,v,g,p,s,o),G.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=Ft(e,n,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=R.al(0,1,0);if(this.focalPoint=Ft(e,n,i),this.trackingMode===od.CINEMATIC){var s=R.$X(R.Ue(),this.focalPoint,this.position);e=s[0],n=s[1],i=s[2];var o=R.kE(s),l=$t(Math.asin(n/o)),u=90+$t(Math.atan2(i,e)),c=G.create();G.rotateY(c,c,Be(u)),G.rotateX(c,c,Be(l)),a=R.fF(R.Ue(),[0,1,0],c)}return G.invert(this.matrix,G.lookAt(G.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<ng&&(this.distance=ng),this.dollyingStep=this.distance/100;var n=R.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return n[0]=e*i[0]+a[0],n[1]=e*i[1]+a[1],n[2]=e*i[2]+a[2],this._setPosition(n),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=ba(e),this.computeMatrix(),this._getAxes(),this.type===Fe.ORBITING||this.type===Fe.EXPLORING?this._getPosition():this.type===Fe.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=ba(e),this.computeMatrix(),this._getAxes(),this.type===Fe.ORBITING||this.type===Fe.EXPLORING?this._getPosition():this.type===Fe.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=ba(e),this.computeMatrix(),this._getAxes(),this.type===Fe.ORBITING||this.type===Fe.EXPLORING?this._getPosition():this.type===Fe.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=K.yY(K.Ue(),[0,0,1],Be(this.roll));G.identity(this.matrix);var n=K.yY(K.Ue(),[1,0,0],Be((this.rotateWorld&&this.type!==Fe.TRACKING||this.type===Fe.TRACKING?1:-1)*this.elevation)),i=K.yY(K.Ue(),[0,1,0],Be((this.rotateWorld&&this.type!==Fe.TRACKING||this.type===Fe.TRACKING?1:-1)*this.azimuth)),a=K.Jp(K.Ue(),i,n);a=K.Jp(K.Ue(),a,e);var s=G.fromQuat(G.create(),a);this.type===Fe.ORBITING||this.type===Fe.EXPLORING?(G.translate(this.matrix,this.matrix,this.focalPoint),G.multiply(this.matrix,this.matrix,s),G.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Fe.TRACKING&&(G.translate(this.matrix,this.matrix,this.position),G.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,n,i){this.position=Ft(e,n,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){R.JG(this.right,Ft(ge.fF(ge.Ue(),[1,0,0,0],this.matrix))),R.JG(this.up,Ft(ge.fF(ge.Ue(),[0,1,0,0],this.matrix))),R.JG(this.forward,Ft(ge.fF(ge.Ue(),[0,0,1,0],this.matrix))),R.Fv(this.right,this.right),R.Fv(this.up,this.up),R.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],n=this.distanceVector[1],i=this.distanceVector[2],a=R.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Fe.TRACKING?(this.elevation=$t(Math.asin(n/a)),this.azimuth=$t(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=$t(Math.asin(n/a)),this.azimuth=$t(Math.atan2(-e,-i))):(this.elevation=-$t(Math.asin(n/a)),this.azimuth=-$t(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){R.JG(this.position,Ft(ge.fF(ge.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){R.kK(this.distanceVector,[0,0,-this.distance],la.xO(la.Ue(),this.matrix)),R.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=R.$X(R.Ue(),this.focalPoint,this.position),this.distance=R.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===Sn.ORTHOGRAPHIC){var e=this.position,n=K.yY(K.Ue(),[0,0,1],-this.roll*Math.PI/180);G.fromRotationTranslationScaleOrigin(this.orthoMatrix,n,R.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),R.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),n=G.multiply(G.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(tg.UPDATED)}}},{key:"rotate",value:function(e,n,i){throw new Error(Ie)}},{key:"pan",value:function(e,n){throw new Error(Ie)}},{key:"dolly",value:function(e){throw new Error(Ie)}},{key:"createLandmark",value:function(e,n){throw new Error(Ie)}},{key:"gotoLandmark",value:function(e,n){throw new Error(Ie)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Ie)}}])}(),cE=function(r){return r[r.Standard=0]="Standard",r}({}),Zo=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),ig={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ma(0,0,0,0)},te=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function zt(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=t?t.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(zt.Cache||Map),e}zt.Cache=Map;var re=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),Vn=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),dE=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),hE=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),fE=[{name:"em",unit_type:re.kEms},{name:"px",unit_type:re.kPixels},{name:"deg",unit_type:re.kDegrees},{name:"rad",unit_type:re.kRadians},{name:"grad",unit_type:re.kGradians},{name:"ms",unit_type:re.kMilliseconds},{name:"s",unit_type:re.kSeconds},{name:"rem",unit_type:re.kRems},{name:"turn",unit_type:re.kTurns}],xa=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),vE=function(t){return fE.find(function(e){return e.name===t}).unit_type},gE=function(t){return t?t==="number"?re.kNumber:t==="percent"||t==="%"?re.kPercentage:vE(t):re.kUnknown},pE=function(t){switch(t){case re.kNumber:case re.kInteger:return Vn.kUNumber;case re.kPercentage:return Vn.kUPercent;case re.kPixels:return Vn.kULength;case re.kMilliseconds:case re.kSeconds:return Vn.kUTime;case re.kDegrees:case re.kRadians:case re.kGradians:case re.kTurns:return Vn.kUAngle;default:return Vn.kUOther}},mE=function(t){switch(t){case Vn.kUNumber:return re.kNumber;case Vn.kULength:return re.kPixels;case Vn.kUPercent:return re.kPercentage;case Vn.kUTime:return re.kSeconds;case Vn.kUAngle:return re.kDegrees;default:return re.kUnknown}},ag=function(t){var e=1;switch(t){case re.kPixels:case re.kDegrees:case re.kSeconds:break;case re.kMilliseconds:e=.001;break;case re.kRadians:e=180/Math.PI;break;case re.kGradians:e=.9;break;case re.kTurns:e=360;break}return e},ld=function(t){switch(t){case re.kNumber:case re.kInteger:return"";case re.kPercentage:return"%";case re.kEms:return"em";case re.kRems:return"rem";case re.kPixels:return"px";case re.kDegrees:return"deg";case re.kRadians:return"rad";case re.kGradians:return"grad";case re.kMilliseconds:return"ms";case re.kSeconds:return"s";case re.kTurns:return"turn"}return""},Vo=function(){function r(){ae(this,r)}return se(r,[{key:"toString",value:function(){return this.buildCSSText(dE.kNo,hE.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=xa.kUnitType&&this.getType()<=xa.kClampType}}],[{key:"isAngle",value:function(e){return e===re.kDegrees||e===re.kRadians||e===re.kGradians||e===re.kTurns}},{key:"isLength",value:function(e){return e>=re.kEms&&e<re.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===re.kPercentage||e===re.kEms||e===re.kRems}},{key:"isTime",value:function(e){return e===re.kSeconds||e===re.kMilliseconds}}])}(),yE=function(r){function t(e){var n;return ae(this,t),n=_e(this,t),n.colorSpace=e,n}return ye(t,r),se(t,[{key:"getType",value:function(){return xa.kColorType}},{key:"to",value:function(n){return this}}])}(Vo),Jr=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),Ho=function(r){function t(e,n){var i;return ae(this,t),i=_e(this,t),i.type=e,i.value=n,i}return ye(t,r),se(t,[{key:"clone",value:function(){return new t(this.type,this.value)}},{key:"buildCSSText",value:function(n,i,a){return a}},{key:"getType",value:function(){return xa.kColorType}}])}(Vo),Tn=function(r){function t(e){var n;return ae(this,t),n=_e(this,t),n.value=e,n}return ye(t,r),se(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return xa.kKeywordType}},{key:"buildCSSText",value:function(n,i,a){return a+this.value}}])}(Vo),bE=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n="";return Number.isFinite(t)?n="NaN":t>0?n="infinity":n="-infinity",n+=e},ud=function(t){return mE(pE(t))},ze=function(r){function t(e){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re.kNumber;ae(this,t),n=_e(this,t);var a;return typeof i=="string"?a=gE(i):a=i,n.unit=a,n.value=e,n}return ye(t,r),se(t,[{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"equals",value:function(n){var i=n;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return xa.kUnitType}},{key:"convertTo",value:function(n){if(this.unit===n)return new t(this.value,this.unit);var i=ud(this.unit);if(i!==ud(n)||i===re.kUnknown)return null;var a=ag(this.unit)/ag(n);return new t(this.value*a,n)}},{key:"buildCSSText",value:function(n,i,a){var s;switch(this.unit){case re.kUnknown:break;case re.kInteger:s=Number(this.value).toFixed(0);break;case re.kNumber:case re.kPercentage:case re.kEms:case re.kRems:case re.kPixels:case re.kDegrees:case re.kRadians:case re.kGradians:case re.kMilliseconds:case re.kSeconds:case re.kTurns:{var o=-999999,l=999999,u=this.value,c=ld(this.unit);if(u<o||u>l){var d=ld(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=bE(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(Vo),Hn=new ze(0,"px");new ze(1,"px");var Pi=new ze(0,"deg"),cd=function(r){function t(e,n,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return ae(this,t),a=_e(this,t,["rgb"]),a.r=e,a.g=n,a.b=i,a.alpha=s,a.isNone=o,a}return ye(t,r),se(t,[{key:"clone",value:function(){return new t(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(n,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(yE),sg=new Tn("unset"),xE=new Tn("initial"),EE=new Tn("inherit"),dd={"":sg,unset:sg,initial:xE,inherit:EE},wE=function(t){return dd[t]||(dd[t]=new Tn(t)),dd[t]},og=new cd(0,0,0,0,!0),lg=new cd(0,0,0,0),kE=zt(function(r,t,e,n){return new cd(r,t,e,n)},function(r,t,e,n){return"rgba(".concat(r,",").concat(t,",").concat(e,",").concat(n,")")}),et=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re.kNumber;return new ze(t,e)};new ze(50,"%");function _E(r){var t=r.type,e=r.value;return t==="hex"?"#".concat(e):t==="literal"?e:t==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var SE=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function e(S){throw new Error("".concat(t,": ").concat(S))}function n(){var S=i();return t.length>0&&e("Invalid input not EOF"),S}function i(){return b(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(S,T,N){return o(T,function(B){var I=N();return I&&(F(r.comma)||e("Missing comma before color stops")),{type:S,orientation:I,colorStops:b(_)}})}function o(S,T){var N=F(S);if(N){F(r.startCall)||e("Missing (");var B=T(N);return F(r.endCall)||e("Missing )"),B}}function l(){return u()||c()}function u(){return z("directional",r.sideOrCorner,1)}function c(){return z("angular",r.angleValue,1)}function d(){var S,T=h(),N;return T&&(S=[],S.push(T),N=t,F(r.comma)&&(T=h(),T?S.push(T):t=N)),S}function h(){var S=f()||v();if(S)S.at=p();else{var T=g();if(T){S=T;var N=p();N&&(S.at=N)}else{var B=m();B&&(S={type:"default-radial",at:B})}}return S}function f(){var S=z("shape",/^(circle)/i,0);return S&&(S.style=D()||g()),S}function v(){var S=z("shape",/^(ellipse)/i,0);return S&&(S.style=M()||g()),S}function g(){return z("extent-keyword",r.extentKeywords,1)}function p(){if(z("position",/^at/,0)){var S=m();return S||e("Missing positioning value"),S}}function m(){var S=y();if(S.x||S.y)return{type:"position",value:S}}function y(){return{x:M(),y:M()}}function b(S){var T=S(),N=[];if(T)for(N.push(T);F(r.comma);)T=S(),T?N.push(T):e("One extra comma");return N}function _(){var S=w();return S||e("Expected color definition"),S.length=M(),S}function w(){return E()||O()||k()||x()}function x(){return z("literal",r.literalColor,0)}function E(){return z("hex",r.hexColor,1)}function k(){return o(r.rgbColor,function(){return{type:"rgb",value:b(P)}})}function O(){return o(r.rgbaColor,function(){return{type:"rgba",value:b(P)}})}function P(){return F(r.number)[1]}function M(){return z("%",r.percentageValue,1)||L()||D()}function L(){return z("position-keyword",r.positionKeywords,1)}function D(){return z("px",r.pixelValue,1)||z("em",r.emValue,1)}function z(S,T,N){var B=F(T);if(B)return{type:S,value:B[N]}}function F(S){var T=/^[\n\r\t\s]+/.exec(t);T&&C(T[0].length);var N=S.exec(t);return N&&C(N[0].length),N}function C(S){t=t.substring(S)}return function(S){return t=S,n()}}();function TE(r,t,e,n){var i=Be(n.value),a=0,s=0,o=a+t/2,l=s+e/2,u=Math.abs(t*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function AE(r,t,e,n,i,a){var s=n.value,o=i.value;n.unit===re.kPercentage&&(s=n.value/100*t),i.unit===re.kPercentage&&(o=i.value/100*e);var l=Math.max((0,Or.y)([0,0],[s,o]),(0,Or.y)([0,e],[s,o]),(0,Or.y)([t,e],[s,o]),(0,Or.y)([t,0],[s,o]));return a&&(a instanceof ze?l=a.value:a instanceof Tn&&(a.value==="closest-side"?l=Math.min(s,t-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,t-s,o,e-o):a.value==="closest-corner"&&(l=Math.min((0,Or.y)([0,0],[s,o]),(0,Or.y)([0,e],[s,o]),(0,Or.y)([t,e],[s,o]),(0,Or.y)([t,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var CE=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,OE=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,PE=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ug=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function NE(r){var t,e=r.length;if(r[e-1].length=(t=r[e-1].length)!==null&&t!==void 0?t:{type:"%",value:"100"},e>1){var n;r[0].length=(n=r[0].length)!==null&&n!==void 0?n:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,ue.Z)(l)&&!(0,ue.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var ME={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},RE=zt(function(r){var t;return r.type==="angular"?t=Number(r.value):t=ME[r.value]||0,et(t,"deg")}),LE=zt(function(r){var t=50,e=50,n="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?t=0:s.value==="center"?t=50:s.value==="right"?t=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?t=0:o.value==="center"?e=50:o.value==="right"?t=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(n=s==null?void 0:s.type,t=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:et(t,n),cy:et(e,i)}}),DE=zt(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var t=SE(r);return t.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;NE(c);var d=c.map(function(b){return{offset:et(Number(b.length.value),"%"),color:_E(b)}});if(l==="linear-gradient")return new Ho(Jr.LinearGradient,{angle:u?RE(u):Pi,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=LE(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var p=u[0].style,m=p.type,y=p.value;m==="extent-keyword"?g=wE(y):g=et(y,m)}return new Ho(Jr.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var n=CE.exec(r);if(n){var i,a=((i=n[2].match(ug))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new Ho(Jr.LinearGradient,{angle:et(parseFloat(n[1]),"deg"),steps:a.map(function(o){var l=Pe(o,2),u=l[0],c=l[1];return{offset:et(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=IE(r);if(s)if((0,Se.Z)(s))r=s;else return[new Ho(Jr.RadialGradient,s)]}else if(e==="p")return BE(r)}});function IE(r){var t=OE.exec(r);if(t){var e,n=((e=t[4].match(ug))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:et(50,"%"),cy:et(50,"%"),steps:n.map(function(i){var a=Pe(i,2),s=a[0],o=a[1];return{offset:et(Number(s)*100,"%"),color:o}})}}return null}function BE(r){var t=PE.exec(r);if(t){var e=t[1],n=t[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:n,repetition:e}}return null}function B6(r){return!!r.type&&!!r.value}function Ni(r){return r&&!!r.image}function Uo(r){return r&&!(0,ue.Z)(r.r)&&!(0,ue.Z)(r.g)&&!(0,ue.Z)(r.b)}var ps=zt(function(r){if(Ni(r))return De({repetition:"repeat"},r);if((0,ue.Z)(r)&&(r=""),r==="transparent")return lg;if(r==="currentColor")r="black";else if(r==="none")return og;var t=DE(r);if(t)return t;var e=Bo(r),n=[0,0,0,0];return e!==null&&(n[0]=e.r||0,n[1]=e.g||0,n[2]=e.b||0,n[3]=e.opacity),kE.apply(void 0,n)});function FE(r,t){if(!(!Uo(r)||!Uo(t)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(e){var n=e.slice();if(n[3])for(var i=0;i<3;i++)n[i]=Math.round((0,Ne.Z)(n[i],0,255));return n[3]=(0,Ne.Z)(n[3],0,1),"rgba(".concat(n.join(","),")")}]}function ms(r,t){if((0,ue.Z)(t))return et(0,"px");if(t="".concat(t).trim().toLowerCase(),isFinite(Number(t))){if("px".search(r)>=0)return et(Number(t),"px");if("deg".search(r)>=0)return et(Number(t),"deg")}var e=[];t=t.replace(r,function(i){return e.push(i),"U".concat(i)});var n="U(".concat(r.source,")");return e.map(function(i){return et(Number(t.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(n,"g"),"*0")),i)})[0]}var cg=function(t){return ms(new RegExp("px","g"),t)},zE=zt(cg),GE=function(t){return ms(new RegExp("%","g"),t)};zt(GE);var dg=function(t){return(0,oe.Z)(t)||isFinite(Number(t))?et(Number(t)||0,"px"):ms(new RegExp("px|%|em|rem","g"),t)},hd=zt(dg),hg=function(t){return ms(new RegExp("deg|rad|grad|turn","g"),t)},jE=zt(hg);function WE(r,t,e,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=t.value||0,l=ud(r.unit),u=r.convertTo(l),c=t.convertTo(l);return u&&c?(s=u.value,o=c.value,a=ld(r.unit)):(ze.isLength(r.unit)||ze.isLength(t.unit))&&(s=ln(r,i,e),o=ln(t,i,e),a="px"),[s,o,function(d){return n&&(d=Math.max(d,0)),d+a}]}function qt(r){var t=0;return r.unit===re.kDegrees?t=r.value:r.unit===re.kRadians?t=$t(Number(r.value)):r.unit===re.kTurns?t=nE(Number(r.value)):r.value&&(t=r.value),t}function fg(r,t){var e;return Array.isArray(r)?e=r.map(function(n){return Number(n)}):(0,Se.Z)(r)?e=r.split(" ").map(function(n){return Number(n)}):(0,oe.Z)(r)&&(e=[r]),t===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function ln(r,t,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===re.kPixels)return Number(r.value);if(r.unit===re.kPercentage&&e){var i=e.nodeName===Z.GROUP?e.getLocalBounds():e.getGeometryBounds();return(n?i.min[t]:0)+r.value/100*i.halfExtents[t]*2}return 0}var ZE=function(t){return ms(/deg|rad|grad|turn|px|%/g,t)},VE=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function HE(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var t=/\s*([\w-]+)\(([^)]*)\)/g,e=[],n,i=0;n=t.exec(r);){if(n.index!==i)return[];if(i=n.index+n[0].length,VE.indexOf(n[1])>-1&&e.push({name:n[1],params:n[2].split(" ").map(function(a){return ZE(a)||ps(a)})}),t.lastIndex===r.length)return e}return[]}function vg(r){return r.toString()}var gg=function(t){return typeof t=="number"?et(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?et(Number(t)):et(0)},fd=zt(gg);zt(function(r){return(0,Se.Z)(r)?r.split(" ").map(fd):r.map(fd)});function vd(r,t){return[r,t,vg]}function gd(r,t){return function(e,n){return[e,n,function(i){return vg((0,Ne.Z)(i,r,t))}]}}function pg(r,t){if(r.length===t.length)return[r,t,function(e){return e}]}function pd(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Mv.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function UE(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,ct.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function YE(r){for(var t=0;t<r.length;t++){var e=r[t-1],n=r[t],i=n[0];if(i==="M"&&e){var a=e[0],s=[n[1],n[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&Yo(s,o)&&(r.splice(t,1),t--)}}}function XE(r){for(var t=!1,e=r.length,n=0;n<e;n++){var i=r[n],a=i[0];if(a==="C"||a==="A"||a==="Q"){t=!0;break}}return t}function KE(r){for(var t=[],e=[],n=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(n.length&&(e.push(n),n=[]),n.push([a[1],a[2]])):s==="Z"?n.length&&(t.push(n),n=[]):n.push([a[1],a[2]])}return n.length>0&&e.push(n),{polygons:t,polylines:e}}function Yo(r,t){return r[0]===t[0]&&r[1]===t[1]}function $E(r,t){for(var e=[],n=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,ct.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,ct.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,ct.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),n.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)),t&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(_){return!Number.isNaN(_)&&_!==1/0&&_!==-1/0}),n=n.filter(function(_){return!Number.isNaN(_)&&_!==1/0&&_!==-1/0});var h=(0,ua.Z)(e),f=(0,ua.Z)(n),v=(0,ca.Z)(e),g=(0,ca.Z)(n);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var p=0;p<i.length;p++){var m=i[p],y=m.currentPoint,b=void 0;y[0]===h?(b=Xo(m,t),h-=b.xExtra):y[0]===v&&(b=Xo(m,t),v+=b.xExtra),y[1]===f?(b=Xo(m,t),f-=b.yExtra):y[1]===g&&(b=Xo(m,t),g+=b.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function Xo(r,t){var e=r.prePoint,n=r.currentPoint,i=r.nextPoint,a=Math.pow(n[0]-e[0],2)+Math.pow(n[1]-e[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,Rv.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-n[1],i[0]-n[0])),c=Math.abs(Math.atan2(i[0]-n[0],i[1]-n[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(t/2*(1/Math.sin(l/2)))-t/2||0,yExtra:Math.cos(c-l/2)*(t/2*(1/Math.sin(l/2)))-t/2||0};return d}function mg(r,t){return[t[0]+(t[0]-r[0]),t[1]+(t[1]-r[1])]}var yg=function(t,e){var n=t.x*e.x+t.y*e.y,i=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=t.x*e.y-t.y*e.x<0?-1:1,s=a*Math.acos(n/i);return s},bg=function(t,e,n,i,a,s,o,l){e=Math.abs(e),n=Math.abs(n),i=(0,Mo.Z)(i,360);var u=Be(i);if(t.x===o.x&&t.y===o.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(e===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(t.x-o.x)/2,d=(t.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(n,2);f>1&&(e*=Math.sqrt(f),n*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(n,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(n,2)*Math.pow(h.x,2),p=v/g;p=p<0?0:p;var m=(a!==s?1:-1)*Math.sqrt(p),y={x:m*(e*h.y/n),y:m*(-(n*h.x)/e)},b={x:Math.cos(u)*y.x-Math.sin(u)*y.y+(t.x+o.x)/2,y:Math.sin(u)*y.x+Math.cos(u)*y.y+(t.y+o.y)/2},_={x:(h.x-y.x)/e,y:(h.y-y.y)/n},w=yg({x:1,y:0},_),x={x:(-h.x-y.x)/e,y:(-h.y-y.y)/n},E=yg(_,x);!s&&E>0?E-=2*Math.PI:s&&E<0&&(E+=2*Math.PI),E%=2*Math.PI;var k=w+E*l,O=e*Math.cos(k),P=n*Math.sin(k),M={x:Math.cos(u)*O-Math.sin(u)*P+b.x,y:Math.sin(u)*O+Math.cos(u)*P+b.y,ellipticalArcStartAngle:w,ellipticalArcEndAngle:w+E,ellipticalArcAngle:k,ellipticalArcCenter:b,resultantRx:e,resultantRy:n};return M};function qE(r){for(var t=[],e=null,n=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];n=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=JE(e,l);c.arcParams=d;break}if(u==="Z")e=i,n=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}n&&n[0]==="Z"&&(n=r[a],t[a]&&(t[a].prePoint=e)),c.currentPoint=e,t[a]&&Yo(e,t[a].currentPoint)&&(t[a].prePoint=c.prePoint);var f=n?[n[n.length-2],n[n.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var p=t[o-1],m=mg(p.currentPoint,v);p.command==="Q"?(c.command="Q",c.startTangent=[v[0]-m[0],v[1]-m[1]],c.endTangent=[e[0]-m[0],e[1]-m[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var y=[l[1],l[2]],b=[l[3],l[4]];c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-b[0],e[1]-b[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[y[0]-b[0],y[1]-b[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[b[0]-y[0],b[1]-y[1]])}else if(u==="S"){var _=t[o-1],w=mg(_.currentPoint,v),x=[l[1],l[2]];_.command==="C"?(c.command="C",c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-x[0],e[1]-x[1]]):(c.command="SQ",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-x[0],e[1]-x[1]])}else if(u==="A"){var E=xg(c,0),k=E.x,O=E.y,P=xg(c,1,!1),M=P.x,L=P.y;c.startTangent=[k,O],c.endTangent=[M,L]}t.push(c)}return t}function xg(r,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=r.arcParams,i=n.rx,a=i===void 0?0:i,s=n.ry,o=s===void 0?0:s,l=n.xRotation,u=n.arcFlag,c=n.sweepFlag,d=bg({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},t),h=bg({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?t+.005:t-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function Ko(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function md(r,t){return Ko(r)*Ko(t)?(r[0]*t[0]+r[1]*t[1])/(Ko(r)*Ko(t)):1}function Eg(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(md(r,t))}function JE(r,t){var e=t[1],n=t[2],i=(0,Mo.Z)(Be(t[3]),Math.PI*2),a=t[4],s=t[5],o=r[0],l=r[1],u=t[6],c=t[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(n*n);f>1&&(e*=Math.sqrt(f),n*=Math.sqrt(f));var v=e*e*(h*h)+n*n*(d*d),g=v?Math.sqrt((e*e*(n*n)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var p=n?g*e*h/n:0,m=e?g*-n*d/e:0,y=(o+u)/2+Math.cos(i)*p-Math.sin(i)*m,b=(l+c)/2+Math.sin(i)*p+Math.cos(i)*m,_=[(d-p)/e,(h-m)/n],w=[(-1*d-p)/e,(-1*h-m)/n],x=Eg([1,0],_),E=Eg(_,w);return md(_,w)<=-1&&(E=Math.PI),md(_,w)>=1&&(E=0),s===0&&E>0&&(E-=2*Math.PI),s===1&&E<0&&(E+=2*Math.PI),{cx:y,cy:b,rx:Yo(r,[u,c])?0:e,ry:Yo(r,[u,c])?0:n,startAngle:x,endAngle:x+E,xRotation:i,arcFlag:a,sweepFlag:s}}function QE(r,t,e){return r.reduce(function(n,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return n+=a},"")}function ew(r,t,e,n){return[["M",r,t],["L",e,n]]}function wg(r,t,e,n){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=t*i,o=e-r,l=e+r,u=n-t,c=n+t;return[["M",o,n],["C",o,n-s,e-a,u,e,u],["C",e+a,u,l,n-s,l,n],["C",l,n+s,e+a,c,e,c],["C",e-a,c,o,n+s,o,n],["Z"]]}function tw(r,t){var e=r.map(function(n,i){return[i===0?"M":"L",n[0],n[1]]});return t&&e.push(["Z"]),e}function nw(r,t,e,n,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=t>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,n],["L",r-c*o+e,n],o?["A",o,o,0,0,h,r+e,d*o+n]:null,["L",r+e,t-d*l+n],l?["A",l,l,0,0,h,r+e-c*l,t+n]:null,["L",e+c*u,t+n],u?["A",u,u,0,0,h,e,t+n-d*u]:null,["L",e,d*s+n],s?["A",s,s,0,0,h,c*s+e,n]:null,["Z"]].filter(function(f){return f})}return[["M",e,n],["L",e+r,n],["L",e+r,n+t],["L",e,n+t],["Z"]]}function F6(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case Z.LINE:var n=r.parsedStyle,i=n.x1,a=i===void 0?0:i,s=n.y1,o=s===void 0?0:s,l=n.x2,u=l===void 0?0:l,c=n.y2,d=c===void 0?0:c;e=ew(a,o,u,d);break;case Z.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,p=g===void 0?0:g,m=h.cy,y=m===void 0?0:m;e=wg(v,v,p,y);break}case Z.ELLIPSE:{var b=r.parsedStyle,_=b.rx,w=_===void 0?0:_,x=b.ry,E=x===void 0?0:x,k=b.cx,O=k===void 0?0:k,P=b.cy,M=P===void 0?0:P;e=wg(w,E,O,M);break}case Z.POLYLINE:case Z.POLYGON:var L=r.parsedStyle.points;e=tw(L.points,r.nodeName===Z.POLYGON);break;case Z.RECT:var D=r.parsedStyle,z=D.width,F=z===void 0?0:z,C=D.height,S=C===void 0?0:C,T=D.x,N=T===void 0?0:T,B=D.y,I=B===void 0?0:B,W=D.radius,X=W&&W.some(function($){return $!==0});e=nw(F,S,N,I,X&&W.map(function($){return clamp($,0,Math.min(Math.abs(F)/2,Math.abs(S)/2))}));break;case Z.PATH:var H=r.parsedStyle.d.absolutePath;e=_toConsumableArray(H);break}if(e.length)return QE(e,r,t)}function z6(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(t!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&n!==0&&i!==0,h=c?[t,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],p=d?[n,i]:[0,0],m=_slicedToArray(p,2),y=m[0],b=m[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+y,",").concat(s[2]+b);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+y," ").concat(s[4]+b);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+y," ").concat(s[6]+b);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+y," ").concat(s[7]+b);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var kg=function(t){if(t===""||Array.isArray(t)&&t.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,Ro.A)(t)}catch(f){e=(0,Ro.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}YE(e);var n=XE(e),i=KE(e),a=i.polygons,s=i.polylines,o=qE(e),l=$E(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:n,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},rw=zt(kg);function _g(r){return(0,Se.Z)(r)?rw(r):kg(r)}function iw(r,t,e){var n=r.curve,i=t.curve;(!n||n.length===0)&&(n=(0,Lo.Y)(r.absolutePath,!1),r.curve=n),(!i||i.length===0)&&(i=(0,Lo.Y)(t.absolutePath,!1),t.curve=i);var a=[n,i];n.length!==i.length&&(a=(0,Lv.x)(n,i));var s=(0,Do.b)(a[0])!==(0,Do.b)(a[1])?(0,Dv.G)(a[0]):(0,Iv.U)(a[0]);return[s,(0,Bv.g)(a[1],s),function(o){return o}]}function aw(r,t){var e;return(0,Se.Z)(r)?e=r.split(" ").map(function(n){var i=n.split(","),a=Pe(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function sw(r,t){return[r.points,t.points,function(e){return e}]}var st=null,Ea=/\s*(\w+)\(([^)]*)\)/g;function Jt(r){return function(t){var e=0;return r.map(function(n){return n===st?t[e++]:n})}}function Mi(r){return r}var ys={matrix:["NNNNNN",[st,st,0,0,st,st,0,0,0,0,1,0,st,st,0,1],Mi],matrix3d:["NNNNNNNNNNNNNNNN",Mi],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Jt([st,st,new ze(1)]),Mi],scaleX:["N",Jt([st,new ze(1),new ze(1)]),Jt([st,new ze(1)])],scaleY:["N",Jt([new ze(1),st,new ze(1)]),Jt([new ze(1),st])],scaleZ:["N",Jt([new ze(1),new ze(1),st])],scale3d:["NNN",Mi],skew:["Aa",null,Mi],skewX:["A",null,Jt([st,Pi])],skewY:["A",null,Jt([Pi,st])],translate:["Tt",Jt([st,st,Hn]),Mi],translateX:["T",Jt([st,Hn,Hn]),Jt([st,Hn])],translateY:["T",Jt([Hn,st,Hn]),Jt([Hn,st])],translateZ:["L",Jt([Hn,Hn,st])],translate3d:["TTL",Mi]};function Sg(r){for(var t=[],e=r.length,n=0;n<e;n++){var i=r[n],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=ys[a];if(!o)return[];var l=s.map(function(u){return et(u)});t.push({t:a,d:l})}return t}function Tg(r){if(Array.isArray(r))return Sg(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(Ea.lastIndex=0;e=Ea.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=ys[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?Pi:jE(v)},N:fd,T:hd,L:zE}[d.toUpperCase()](c):h={a:Pi,n:l[0],t:Hn}[d],h===void 0)return[];l.push(h)}if(t.push({t:i,d:l}),Ea.lastIndex===r.length)return t}return[]}function ow(r){if(Array.isArray(r))return Sg(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(Ea.lastIndex=0;e=Ea.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=ys[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?Pi:hg(v)},N:gg,T:dg,L:cg}[d.toUpperCase()](c):h={a:Pi,n:l[0],t:Hn}[d],h===void 0)return[];l.push(h)}if(t.push({t:i,d:l}),Ea.lastIndex===r.length)return t}return[]}function lw(r){var t,e,n,i;switch(r.t){case"rotateX":return i=Be(qt(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Be(qt(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Be(qt(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":t=r.d[0].value,e=r.d[1].value,n=r.d[2].value,i=Be(qt(r.d[3]));var a=t*t+e*e+n*n;if(a===0)t=1,e=0,n=0;else if(a!==1){var s=Math.sqrt(a);t/=s,e/=s,n/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+n*n)*u,2*(t*e*u+n*l),2*(t*n*u-e*l),0,2*(t*e*u-n*l),1-2*(t*t+n*n)*u,2*(e*n*u+t*l),0,2*(t*n*u+e*l),2*(e*n*u-t*l),1-2*(t*t+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=Be(qt(r.d[0])),d=Be(qt(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Be(qt(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Be(qt(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return t=ln(r.d[0],0,null)||0,e=ln(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,e,0,1];case"translateX":return t=ln(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,0,0,1];case"translateY":return e=ln(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return n=ln(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,n,1];case"translate3d":return t=ln(r.d[0],0,null)||0,e=ln(r.d[1],0,null)||0,n=ln(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1];case"perspective":var h=ln(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function uw(r,t){return[r[0]*t[0]+r[4]*t[1]+r[8]*t[2]+r[12]*t[3],r[1]*t[0]+r[5]*t[1]+r[9]*t[2]+r[13]*t[3],r[2]*t[0]+r[6]*t[1]+r[10]*t[2]+r[14]*t[3],r[3]*t[0]+r[7]*t[1]+r[11]*t[2]+r[15]*t[3],r[0]*t[4]+r[4]*t[5]+r[8]*t[6]+r[12]*t[7],r[1]*t[4]+r[5]*t[5]+r[9]*t[6]+r[13]*t[7],r[2]*t[4]+r[6]*t[5]+r[10]*t[6]+r[14]*t[7],r[3]*t[4]+r[7]*t[5]+r[11]*t[6]+r[15]*t[7],r[0]*t[8]+r[4]*t[9]+r[8]*t[10]+r[12]*t[11],r[1]*t[8]+r[5]*t[9]+r[9]*t[10]+r[13]*t[11],r[2]*t[8]+r[6]*t[9]+r[10]*t[10]+r[14]*t[11],r[3]*t[8]+r[7]*t[9]+r[11]*t[10]+r[15]*t[11],r[0]*t[12]+r[4]*t[13]+r[8]*t[14]+r[12]*t[15],r[1]*t[12]+r[5]*t[13]+r[9]*t[14]+r[13]*t[15],r[2]*t[12]+r[6]*t[13]+r[10]*t[14]+r[14]*t[15],r[3]*t[12]+r[7]*t[13]+r[11]*t[14]+r[15]*t[15]]}function cw(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(lw).reduce(uw)}function Ag(r){var t=[0,0,0],e=[1,1,1],n=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return oE(cw(r),t,e,n,i,a),[[t,e,n,a,i]]}var dw=function(){function r(n,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*n[l][o];return a}function t(n){return n[0][2]===0&&n[0][3]===0&&n[1][2]===0&&n[1][3]===0&&n[2][0]===0&&n[2][1]===0&&n[2][2]===1&&n[2][3]===0&&n[3][2]===0&&n[3][3]===1}function e(n,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=n[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(f*f+v*v),p[0][1]=2*(h*f-v*g),p[0][2]=2*(h*v+f*g),p[1][0]=2*(h*f+v*g),p[1][1]=1-2*(h*h+v*v),p[1][2]=2*(f*v-h*g),p[2][0]=2*(h*v-f*g),p[2][1]=2*(f*v+h*g),p[2][2]=1-2*(h*h+f*f),l=r(l,p);var m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(m[2][1]=a[2],l=r(l,m)),a[1]&&(m[2][1]=0,m[2][0]=a[0],l=r(l,m)),a[0]&&(m[2][0]=0,m[1][0]=a[0],l=r(l,m));for(var y=0;y<3;y++)for(var b=0;b<3;b++)l[y][b]*=i[y];return t(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function hw(r){return r.toFixed(6).replace(".000000","")}function yd(r,t){var e,n;return r.decompositionPair!==t&&(r.decompositionPair=t,e=Ag(r)),t.decompositionPair!==r&&(t.decompositionPair=r,n=Ag(t)),e[0]===null||n[0]===null?[[!1],[!0],function(i){return i?t[0].d:r[0].d}]:(e[0].push(0),n[0].push(1),[e,n,function(i){var a=vw(e[0][3],n[0][3],i[5]),s=dw(i[0],i[1],i[2],a,i[4]),o=s.map(hw).join(",");return o}])}function fw(r,t){for(var e=0,n=0;n<r.length;n++)e+=r[n]*t[n];return e}function vw(r,t,e){var n=fw(r,t);n=(0,Ne.Z)(n,-1,1);var i=[];if(n===1)i=r;else for(var a=Math.acos(n),s=Math.sin(e*a)*1/Math.sqrt(1-n*n),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-n*s)+t[o]*s);return i}function bd(r){return r.replace(/[XY]/,"")}function xd(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var gw=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function pw(r,t,e){var n=!1;if(!r.length||!t.length){r.length||(n=!0,r=t,t=[]);for(var i=function(){var M=r[a],L=M.t,D=M.d,z=L.substring(0,5)==="scale"?1:0;t.push({t:L,d:D.map(function(F){return typeof F=="number"?et(z):et(z,F.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==t.length){var u=yd(r,t);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=t[c].t,f=r[c].d,v=t[c].d,g=ys[d],p=ys[h],m=void 0;if(gw(d,h)){var y=yd([r[c]],[t[c]]);s.push(y[0]),o.push(y[1]),l.push(["matrix",[y[2]]]);continue}else if(d===h)m=d;else if(g[2]&&p[2]&&bd(d)===bd(h))m=bd(d),f=g[2](f),v=p[2](v);else if(g[1]&&p[1]&&xd(d)===xd(h))m=xd(d),f=g[1](f),v=p[1](v);else{var b=yd(r,t);s=[b[0]],o=[b[1]],l=[["matrix",[b[2]]]];break}for(var _=[],w=[],x=[],E=0;E<f.length;E++){var k=WE(f[E],v[E],e,!1,E);_[E]=k[0],w[E]=k[1],x.push(k[2])}s.push(_),o.push(w),l.push([m,x])}if(n){var O=s;s=o,o=O}return[s,o,function(P){return P.map(function(M,L){var D=M.map(function(z,F){return l[L][1][F](z)}).join(",");return l[L][0]==="matrix"&&D.split(",").length===16&&(l[L][0]="matrix3d"),l[L][0]==="matrix3d"&&D.split(",").length===6&&(l[L][0]="matrix"),"".concat(l[L][0],"(").concat(D,")")}).join(" ")}]}var mw=zt(function(r){if((0,Se.Z)(r)){if(r==="text-anchor")return[et(0,"px"),et(0,"px")];var t=r.split(" ");return t.length===1&&(t[0]==="top"||t[0]==="bottom"?(t[1]=t[0],t[0]="center"):t[1]="center"),t.length!==2?null:[hd(Cg(t[0])),hd(Cg(t[1]))]}return[et(r[0]||0,"px"),et(r[1]||0,"px")]});function Cg(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var Ed=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:te.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:te.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:te.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:te.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:te.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:te.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:te.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:te.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:te.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:te.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:te.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:te.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:te.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:te.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:te.FILTER},{n:"clipPath",syntax:te.DEFINED_PATH},{n:"textPath",syntax:te.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:te.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:te.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:te.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:te.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:te.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:te.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:te.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:te.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:te.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:te.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:te.COORDINATE},{n:"y1",int:!0,l:!0,syntax:te.COORDINATE},{n:"z1",int:!0,l:!0,syntax:te.COORDINATE},{n:"x2",int:!0,l:!0,syntax:te.COORDINATE},{n:"y2",int:!0,l:!0,syntax:te.COORDINATE},{n:"z2",int:!0,l:!0,syntax:te.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:te.PATH,p:50},{n:"points",int:!0,l:!0,syntax:te.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:te.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:te.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:te.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:te.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:te.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:te.NUMBER,d:function(t){return t===Z.PATH||t===Z.POLYGON||t===Z.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:te.MARKER},{n:"markerEnd",syntax:te.MARKER},{n:"markerMid",syntax:te.MARKER},{n:"markerStartOffset",syntax:te.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:te.LENGTH,l:!0,int:!0,d:"0"}],yw=new Set(Ed.filter(function(r){return!!r.l}).map(function(r){return r.n})),Og={},bw=function(){function r(t){var e=this;ae(this,r),this.runtime=t,Ed.forEach(function(n){e.registerMetadata(n)})}return se(r,[{key:"registerMetadata",value:function(e){[e.n].concat(Qe(e.a||[])).forEach(function(n){Og[n]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,n);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;xw(e,n);var o=!!i.forceUpdateGeometry;if(!o){for(var l in n)if(yw.has(l)){o=!0;break}}n.fill&&(e.parsedStyle.fill=ps(n.fill)),n.stroke&&(e.parsedStyle.stroke=ps(n.stroke)),n.shadowColor&&(e.parsedStyle.shadowColor=ps(n.shadowColor)),n.filter&&(e.parsedStyle.filter=HE(n.filter)),(0,ue.Z)(n.radius)||(e.parsedStyle.radius=fg(n.radius,4)),(0,ue.Z)(n.lineDash)||(e.parsedStyle.lineDash=fg(n.lineDash,2)),n.points&&(e.parsedStyle.points=aw(n.points)),n.d===""&&(e.parsedStyle.d=De({},ig)),n.d&&(e.parsedStyle.d=_g(n.d)),n.textTransform&&this.runtime.CSSPropertySyntaxFactory[te.TEXT_TRANSFORM].calculator(null,null,{value:n.textTransform},e,null),(0,ce.Z)(n.clipPath)||this.runtime.CSSPropertySyntaxFactory[te.DEFINED_PATH].calculator("clipPath",a,n.clipPath,e,this.runtime),n.offsetPath&&this.runtime.CSSPropertySyntaxFactory[te.DEFINED_PATH].calculator("offsetPath",s,n.offsetPath,e,this.runtime),n.transform&&(e.parsedStyle.transform=Tg(n.transform)),n.transformOrigin&&(e.parsedStyle.transformOrigin=mw(n.transformOrigin)),n.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[te.MARKER].calculator(null,n.markerStart,n.markerStart,null,null)),n.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[te.MARKER].calculator(null,n.markerEnd,n.markerEnd,null,null)),n.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[te.MARKER].calculator("",n.markerMid,n.markerMid,null,null)),(0,ue.Z)(n.zIndex)||this.runtime.CSSPropertySyntaxFactory[te.Z_INDEX].postProcessor(e),(0,ue.Z)(n.offsetDistance)||this.runtime.CSSPropertySyntaxFactory[te.OFFSET_DISTANCE].postProcessor(e),n.transform&&this.runtime.CSSPropertySyntaxFactory[te.TRANSFORM].postProcessor(e),n.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[te.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var n=e.nodeName,i=this.runtime.geometryUpdaterFactory[n];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new Ke),a.renderBounds||(a.renderBounds=new Ke);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,p=o.hheight,m=p===void 0?0:p,y=o.hdepth,b=y===void 0?0:y,_=[Math.abs(g),Math.abs(m),b],w=s.stroke,x=s.lineWidth,E=x===void 0?1:x,k=s.increasedLineWidthForHitTesting,O=k===void 0?0:k,P=s.shadowType,M=P===void 0?"outer":P,L=s.shadowColor,D=s.filter,z=D===void 0?[]:D,F=s.transformOrigin,C=[u,d,f];a.contentBounds.update(C,_);var S=n===Z.POLYLINE||n===Z.POLYGON||n===Z.PATH?Math.SQRT2:.5,T=w&&!w.isNone;if(T){var N=((E||0)+(O||0))*S;_[0]+=N,_[1]+=N}if(a.renderBounds.update(C,_),L&&M&&M!=="inner"){var B=a.renderBounds,I=B.min,W=B.max,X=s.shadowBlur,H=s.shadowOffsetX,$=s.shadowOffsetY,le=X||0,fe=H||0,Le=$||0,Ze=I[0]-le+fe,or=W[0]+le+fe,sa=I[1]-le+Le,_n=W[1]+le+Le;I[0]=Math.min(I[0],Ze),W[0]=Math.max(W[0],or),I[1]=Math.min(I[1],sa),W[1]=Math.max(W[1],_n),a.renderBounds.setMinMax(I,W)}z.forEach(function(_o){var So=_o.name,Yr=_o.params;if(So==="blur"){var To=Yr[0].value;a.renderBounds.update(a.renderBounds.center,R.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[To,To,0]))}else if(So==="drop-shadow"){var Ao=Yr[0].value,Co=Yr[1].value,Xr=Yr[2].value,Oo=a.renderBounds,Yt=Oo.min,Xt=Oo.max,Cv=Yt[0]-Xr+Ao,Ov=Xt[0]+Xr+Ao,Pv=Yt[1]-Xr+Co,Nv=Xt[1]+Xr+Co;Yt[0]=Math.min(Yt[0],Cv),Xt[0]=Math.max(Xt[0],Ov),Yt[1]=Math.min(Yt[1],Pv),Xt[1]=Math.max(Xt[1],Nv),a.renderBounds.setMinMax(Yt,Xt)}}),e.geometry.dirty=!1;var Ur=g<0,Av=m<0,wo=(Ur?-1:1)*(F?ln(F[0],0,e,!0):0),ko=(Av?-1:1)*(F?ln(F[1],1,e,!0):0);(wo||ko)&&e.setOrigin(wo,ko)}}},{key:"updateSizeAttenuation",value:function(e,n){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/n,e.nodeName===Z.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/n)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===Z.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function xw(r,t){if(!U.enableMassiveParsedStyleAssignOptimization){Object.assign(r.parsedStyle,t);return}var e=r.constructor.PARSED_STYLE_LIST;for(var n in t)e.has(n)&&(r.parsedStyle[n]=t[n])}var Ew=function(){function r(){ae(this,r),this.mixer=vd}return se(r,[{key:"calculator",value:function(e,n,i,a){return qt(i)}}])}(),ww=function(){function r(){ae(this,r)}return se(r,[{key:"calculator",value:function(e,n,i,a,s){return i instanceof Tn&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,n,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),kw=function(){function r(){ae(this,r),this.parser=ps,this.mixer=FE}return se(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Tn?i.value==="none"?og:lg:i}}])}(),_w=function(){function r(){ae(this,r)}return se(r,[{key:"calculator",value:function(e,n,i){return i instanceof Tn?[]:i}}])}();function Pg(r){var t=r.parsedStyle,e=t.fontSize;return(0,ue.Z)(e)?null:e}var wd=function(){function r(){ae(this,r),this.mixer=vd}return se(r,[{key:"calculator",value:function(e,n,i,a,s){if((0,oe.Z)(i))return i;if(ze.isRelativeUnit(i.unit)){if(i.unit===re.kPercentage)return 0;if(i.unit===re.kEms){if(a.parentNode){var o=Pg(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===re.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=Pg(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),Sw=function(){function r(){ae(this,r),this.mixer=pg}return se(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),Tw=function(){function r(){ae(this,r),this.mixer=pg}return se(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),Aw=function(){function r(){ae(this,r)}return se(r,[{key:"calculator",value:function(e,n,i,a){var s;i instanceof Tn&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),Cw=function(){function r(){ae(this,r),this.mixer=vd}return se(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),Ow=function(){function r(){ae(this,r),this.mixer=gd(0,1)}return se(r,[{key:"calculator",value:function(e,n,i){return i.value}},{key:"postProcessor",value:function(e){var n=e.parsedStyle,i=n.offsetPath,a=n.offsetDistance;if(i){var s=i.nodeName;if(s===Z.LINE||s===Z.PATH||s===Z.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),Pw=function(){function r(){ae(this,r),this.mixer=gd(0,1)}return se(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),Nw=function(){function r(){ae(this,r),this.parser=_g,this.mixer=iw}return se(r,[{key:"calculator",value:function(e,n,i){return i instanceof Tn&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ma(0,0,0,0)}:i}}])}(),Mw=se(function r(){ae(this,r),this.mixer=sw}),Rw=function(r){function t(){var e;ae(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=_e(this,t,[].concat(i)),e.mixer=gd(0,1/0),e}return ye(t,r),se(t)}(wd),Lw=function(){function r(){ae(this,r)}return se(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Tn?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),Dw=function(){function r(){ae(this,r)}return se(r,[{key:"calculator",value:function(e,n,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),G6=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=_slicedToArray(e,2),i=n[1];return i!==void 0}))},kd=new WeakMap;function Iw(r,t,e){if(r){var n=typeof r=="string"?document.getElementById(r):r;kd.has(n)&&kd.get(n).destroy(e),kd.set(n,t)}}var bs=typeof window!="undefined"&&typeof window.document!="undefined";function Bw(r){return!!r.getAttribute}function Fw(r,t){for(var e=0,n=r.length;e<n;){var i=e+n>>>1;Ng(r[i],t)<0?e=i+1:n=i}return e}function Ng(r,t){var e=Number(r.parsedStyle.zIndex||0),n=Number(t.parsedStyle.zIndex||0);if(e===n){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(t)}}return e-n}function Mg(r){var t=r;do{var e,n=(e=t.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(n)return t;t=t.parentElement}while(t!==null);return null}var Rg="px";function zw(r,t,e){bs&&r.style&&(r.style.width=t+Rg,r.style.height=e+Rg)}function Lg(r,t){if(bs)return document.defaultView.getComputedStyle(r,null).getPropertyValue(t)}function Gw(r){var t=Lg(r,"width");return t==="auto"?r.offsetWidth:parseFloat(t)}function jw(r){var t=Lg(r,"height");return t==="auto"?r.offsetHeight:parseFloat(t)}var Ww=1,Zw={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},_d=typeof performance=="object"&&performance.now?performance:Date;function $o(r){return r.nodeName===Z.FRAGMENT?!0:r.getRootNode().nodeName===Z.FRAGMENT}function Ri(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,n=!1,i=!1,a=!!t&&!t.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(n=a,i=s):r==="visiblefill"||r==="fill"?n=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(n=!0,i=!0),[n,i]}var Vw=1,Hw=function(){return Vw++},fr=typeof self=="object"&&self.self===self?self:typeof Y.g=="object"&&Y.g.global===Y.g?Y.g:{},Uw=Date.now(),Yw=function(){return fr.performance&&typeof fr.performance.now=="function"?fr.performance.now():Date.now()-Uw},xs={},Dg=Date.now(),Xw=function(t){if(typeof t!="function")throw new TypeError("".concat(t," is not a function"));var e=Date.now(),n=e-Dg,i=n>16?0:16-n,a=Hw();return xs[a]=t,Object.keys(xs).length>1||setTimeout(function(){Dg=e;var s=xs;xs={},Object.keys(s).forEach(function(o){return s[o](Yw())})},i),a},Kw=function(t){delete xs[t]},$w=["","webkit","moz","ms","o"],Ig=function(t){return typeof t!="string"?Xw:t===""?fr.requestAnimationFrame:fr["".concat(t,"RequestAnimationFrame")]},qw=function(t){return typeof t!="string"?Kw:t===""?fr.cancelAnimationFrame:fr["".concat(t,"CancelAnimationFrame")]||fr["".concat(t,"CancelRequestAnimationFrame")]},Jw=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n+=1}},Bg=Jw($w,function(r){return!!Ig(r)}),Sd=Ig(Bg),Fg=qw(Bg);fr.requestAnimationFrame=Sd,fr.cancelAnimationFrame=Fg;var Qw=function(){function r(){ae(this,r),this.callbacks=[]}return se(r,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(e,n){this.callbacks.push(n)}},{key:"promise",value:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Promise.all(this.callbacks.map(function(a){return a.apply(void 0,n)}))}}])}(),ek=function(){function r(){ae(this,r),this.callbacks=[]}return se(r,[{key:"tapPromise",value:function(e,n){this.callbacks.push(n)}},{key:"promise",value:function(){var t=td(Ci().mark(function n(){var i,a,s,o,l=arguments;return Ci().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!this.callbacks.length){c.next=14;break}return c.next=3,(i=this.callbacks)[0].apply(i,l);case 3:a=c.sent,s=0;case 5:if(!(s<this.callbacks.length-1)){c.next=13;break}return o=this.callbacks[s],c.next=9,o(a);case 9:a=c.sent;case 10:s++,c.next=5;break;case 13:return c.abrupt("return",a);case 14:return c.abrupt("return",null);case 15:case"end":return c.stop()}},n,this)}));function e(){return t.apply(this,arguments)}return e}()}])}(),Gt=function(){function r(){ae(this,r),this.callbacks=[]}return se(r,[{key:"tap",value:function(e,n){this.callbacks.push(n)}},{key:"call",value:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var a=arguments;this.callbacks.forEach(function(s){s.apply(void 0,a)})}}])}(),Td=function(){function r(){ae(this,r),this.callbacks=[]}return se(r,[{key:"tap",value:function(e,n){this.callbacks.push(n)}},{key:"call",value:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(this.callbacks.length){for(var a=arguments,s=this.callbacks[0].apply(void 0,a),o=0;o<this.callbacks.length-1;o++){var l=this.callbacks[o];s=l(s)}return s}return null}}])}(),tk=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],nk=/([\"\'])[^\'\"]+\1/;function rk(r){for(var t=r.fontSize,e=t===void 0?16:t,n=r.fontFamily,i=n===void 0?"sans-serif":n,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,oe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!nk.test(v)&&tk.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function Ad(r,t,e){return G.identity(r),r[4]=Math.tan(t),r[1]=Math.tan(e),r}var vt=G.create(),ik=G.create(),ak={scale:function(t){G.fromScaling(vt,[t[0].value,t[1].value,1])},scaleX:function(t){G.fromScaling(vt,[t[0].value,1,1])},scaleY:function(t){G.fromScaling(vt,[1,t[0].value,1])},scaleZ:function(t){G.fromScaling(vt,[1,1,t[0].value])},scale3d:function(t){G.fromScaling(vt,[t[0].value,t[1].value,t[2].value])},translate:function(t){G.fromTranslation(vt,[t[0].value,t[1].value,0])},translateX:function(t){G.fromTranslation(vt,[t[0].value,0,0])},translateY:function(t){G.fromTranslation(vt,[0,t[0].value,0])},translateZ:function(t){G.fromTranslation(vt,[0,0,t[0].value])},translate3d:function(t){G.fromTranslation(vt,[t[0].value,t[1].value,t[2].value])},rotate:function(t){G.fromZRotation(vt,Be(qt(t[0])))},rotateX:function(t){G.fromXRotation(vt,Be(qt(t[0])))},rotateY:function(t){G.fromYRotation(vt,Be(qt(t[0])))},rotateZ:function(t){G.fromZRotation(vt,Be(qt(t[0])))},rotate3d:function(t){G.fromRotation(vt,Be(qt(t[3])),[t[0].value,t[1].value,t[2].value])},skew:function(t){Ad(vt,Be(t[0].value),Be(t[1].value))},skewX:function(t){Ad(vt,Be(t[0].value),0)},skewY:function(t){Ad(vt,0,Be(t[0].value))},matrix:function(t){G.set(vt,t[0].value,t[1].value,0,0,t[2].value,t[3].value,0,0,0,0,1,0,t[4].value,t[5].value,0,1)},matrix3d:function(t){G.set.apply(G,[vt].concat(Qe(t.map(function(e){return e.value}))))}},sk=R.al(1,1,1),ok=R.Ue(),zg={translate:function(t,e){U.sceneGraphService.setLocalScale(t,sk,!1),U.sceneGraphService.setLocalEulerAngles(t,ok,void 0,void 0,!1),U.sceneGraphService.setLocalPosition(t,[e[0].value,e[1].value,0],!1),U.sceneGraphService.dirtifyLocal(t,t.transformable)}};function Gg(r,t){if(r.length){if(r.length===1&&zg[r[0].t]){zg[r[0].t](t,r[0].d);return}for(var e=G.identity(ik),n=0;n<r.length;n++){var i=r[n],a=i.t,s=i.d,o=ak[a];o&&(o(s),G.mul(e,e,vt))}t.setLocalTransform(e)}else t.resetLocalTransform();return t.getLocalTransform()}var lk=function(){function r(){ae(this,r),this.parser=ow,this.mixer=pw}return se(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Tn?[]:i}},{key:"postProcessor",value:function(e){Gg(e.parsedStyle.transform,e)}}])}(),uk=function(){function r(){ae(this,r)}return se(r,[{key:"postProcessor",value:function(e){var n=e.parsedStyle.transformOrigin;n[0].unit===re.kPixels&&n[1].unit===re.kPixels?e.setOrigin(n[0].value,n[1].value):e.getGeometryBounds()}}])}(),ck=function(){function r(){ae(this,r)}return se(r,[{key:"calculator",value:function(e,n,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var n=e.parentNode,i=n.renderable,a=n.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=Zo.Z_INDEX_CHANGED)}}}])}(),dk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e,n){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),hk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e,n){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),fk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e){var n=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(n,a),l=Math.max(n,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),vk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e){var n=e.d,i=n.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),gk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e){if(e.points&&(0,da.Z)(e.points.points)){var n=e.points.points,i=Math.min.apply(Math,Qe(n.map(function(h){return h[0]}))),a=Math.max.apply(Math,Qe(n.map(function(h){return h[0]}))),s=Math.min.apply(Math,Qe(n.map(function(h){return h[1]}))),o=Math.max.apply(Math,Qe(n.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),pk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Se.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),mk=function(){function r(t){ae(this,r),this.globalRuntime=t}return se(r,[{key:"isReadyToMeasure",value:function(e,n){var i=e.text;return i}},{key:"update",value:function(e,n){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,p=e.x,m=p===void 0?0:p,y=e.y,b=y===void 0?0:y;if(!this.isReadyToMeasure(e,n))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var _=(n==null||(i=n.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},w=_.offscreenCanvas,x=this.globalRuntime.textService.measureText(a,e,w);e.metrics=x;var E=x.width,k=x.height,O=E/2,P=k/2,M=m+O;o==="center"||o==="middle"?M+=u/2-O:(o==="right"||o==="end")&&(M+=u-O*2);var L=b-P;return d==="middle"?L+=P:d==="top"||d==="hanging"?L+=P*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(L+=0),f&&(M+=f),g&&(L+=g),{cx:M,cy:L,hwidth:O,hheight:P}}}])}(),yk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e,n){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),bk=function(){function r(){ae(this,r)}return se(r,[{key:"update",value:function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function j6(r){return!!r.type}var qo=function(){function r(t){ae(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new At,this.page=new At,this.canvas=new At,this.viewport=new At,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return se(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Ie)}}])}(),jg=function(r){function t(){var e;ae(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=_e(this,t,[].concat(i)),e.client=new At,e.movement=new At,e.offset=new At,e.global=new At,e.screen=new At,e}return ye(t,r),se(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(n){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(n)}},{key:"initMouseEvent",value:function(){throw new Error(Ie)}}])}(qo),Jo=function(r){function t(){var e;ae(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=_e(this,t,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return ye(t,r),se(t,[{key:"getCoalescedEvents",value:function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(jg),Cd=function(r){function t(){return ae(this,t),_e(this,t,arguments)}return ye(t,r),se(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(jg),Dt=function(r){function t(e,n){var i;return ae(this,t),i=_e(this,t,[null]),i.type=e,i.detail=n,Object.assign(i,n),i}return ye(t,r),se(t)}(qo),Wg=new WeakMap,Zg=function(){function r(){ae(this,r),this.emitter=new cr.Z}return se(r,[{key:"on",value:function(e,n,i){return this.addEventListener(e,n,i),this}},{key:"addEventListener",value:function(e,n,i){var a=!1,s=!1;if((0,ha.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),n=(0,de.Z)(n)?n:n.handleEvent;var u=(0,de.Z)(n)?void 0:n;return s?this.emitter.once(e,n,u):this.emitter.on(e,n,u),this}},{key:"off",value:function(e,n,i){return e?this.removeEventListener(e,n,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,n,i){var a;if(!this.emitter)return this;var s=(0,ha.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),n=(0,de.Z)(n)?n:(a=n)===null||a===void 0?void 0:a.handleEvent;var o=(0,de.Z)(n)?void 0:n;return this.emitter.off(e,n,o),this}},{key:"emit",value:function(e,n){this.dispatchEvent(new Dt(e,n))}},{key:"dispatchEvent",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=Wg.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&Wg.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],n||(e.target=this),e.manager.dispatchEvent(e,e.type,n)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),it=function(r){function t(){var e;ae(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=_e(this,t,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return ye(t,r),se(t,[{key:"textContent",get:function(){var n="";this.nodeName===Z.TEXT&&(n+=this.style.text);var i=va(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Z.TEXT?n+=s.nodeValue:n+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return n},set:function(n){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===Z.TEXT&&(this.style.text="".concat(n))}},{key:"getRootNode",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(n){throw new Error(Ie)}},{key:"lookupNamespaceURI",value:function(n){throw new Error(Ie)}},{key:"lookupPrefix",value:function(n){throw new Error(Ie)}},{key:"normalize",value:function(){throw new Error(Ie)}},{key:"isEqualNode",value:function(n){return this===n}},{key:"isSameNode",value:function(n){return this.isEqualNode(n)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(n){if(n===this)return 0;for(var i=n,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING:u===s?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}}return t.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(n){return this.contains(n)}},{key:"contains",value:function(n){for(var i=n;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(n){for(var i=this;n>0&&i;)i=i.parentNode,n--;return i}},{key:"forEach",value:function(n){for(var i=[this];i.length>0;){var a=i.pop(),s=n(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(n){return!!n.childNodes}}])}(Zg);it.DOCUMENT_POSITION_DISCONNECTED=1,it.DOCUMENT_POSITION_PRECEDING=2,it.DOCUMENT_POSITION_FOLLOWING=4,it.DOCUMENT_POSITION_CONTAINS=8,it.DOCUMENT_POSITION_CONTAINED_BY=16,it.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var xk=2048,Ek=function(){function r(t,e){var n=this;ae(this,r),this.emitter=new cr.Z,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=G.create(),this.tmpVec3=R.Ue(),this.onPointerDown=function(i){var a=n.createPointerEvent(i);if(n.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")n.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var s=a.button===2;n.dispatchEvent(a,s?"rightdown":"mousedown")}var o=n.trackingData(i.pointerId);o.pressTargetsByButton[i.button]=a.composedPath(),n.freeEvent(a)},this.onPointerUp=function(i){var a=_d.now(),s=n.createPointerEvent(i,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(s,"pointerup"),s.pointerType==="touch")n.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var o=s.button===2;n.dispatchEvent(s,o?"rightup":"mouseup")}var l=n.trackingData(i.pointerId),u=n.findMountedTarget(l.pressTargetsByButton[i.button]),c=u;if(u&&!s.composedPath().includes(u)){for(var d=u;d&&!s.composedPath().includes(d);){if(s.currentTarget=d,n.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")n.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var h=s.button===2;n.notifyTarget(s,h?"rightupoutside":"mouseupoutside")}it.isNode(d)&&(d=d.parentNode)}delete l.pressTargetsByButton[i.button],c=d}if(c){var f,v=n.clonePointerEvent(s,"click");v.target=c,v.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:v.target,timeStamp:a});var g=n.context.renderingContext.root.ownerDocument.defaultView,p=l.clicksByButton[i.button];p.target===v.target&&a-p.timeStamp<g.dblClickSpeed?++p.clickCount:p.clickCount=1,p.target=v.target,p.timeStamp=a,v.detail=p.clickCount,(f=s.detail)!==null&&f!==void 0&&f.preventClick||(!n.context.config.useNativeClickEvent&&(v.pointerType==="mouse"||v.pointerType==="touch")&&n.dispatchEvent(v,"click"),n.dispatchEvent(v,"pointertap")),n.freeEvent(v)}n.freeEvent(s)},this.onPointerMove=function(i){var a=n.createPointerEvent(i,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),s=a.pointerType==="mouse"||a.pointerType==="pen",o=n.trackingData(i.pointerId),l=n.findMountedTarget(o.overTargets);if(o.overTargets&&l!==a.target){var u=i.type==="mousemove"?"mouseout":"pointerout",c=n.createPointerEvent(i,u,l||void 0);if(n.dispatchEvent(c,"pointerout"),s&&n.dispatchEvent(c,"mouseout"),!a.composedPath().includes(l)){var d=n.createPointerEvent(i,"pointerleave",l||void 0);for(d.eventPhase=d.AT_TARGET;d.target&&!a.composedPath().includes(d.target);)d.currentTarget=d.target,n.notifyTarget(d),s&&n.notifyTarget(d,"mouseleave"),it.isNode(d.target)&&(d.target=d.target.parentNode);n.freeEvent(d)}n.freeEvent(c)}if(l!==a.target){var h=i.type==="mousemove"?"mouseover":"pointerover",f=n.clonePointerEvent(a,h);n.dispatchEvent(f,"pointerover"),s&&n.dispatchEvent(f,"mouseover");for(var v=l&&it.isNode(l)&&l.parentNode;v&&v!==(it.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&v!==a.target;)v=v.parentNode;var g=!v||v===(it.isNode(n.rootTarget)&&n.rootTarget.parentNode);if(g){var p=n.clonePointerEvent(a,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==l&&p.target!==(it.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),s&&n.notifyTarget(p,"mouseenter"),it.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(f)}n.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&n.dispatchEvent(a,"touchmove"),s&&(n.dispatchEvent(a,"mousemove"),n.cursor=n.getCursor(a.target)),o.overTargets=a.composedPath(),n.freeEvent(a)},this.onPointerOut=function(i){var a=n.trackingData(i.pointerId);if(a.overTargets){var s=i.pointerType==="mouse"||i.pointerType==="pen",o=n.findMountedTarget(a.overTargets),l=n.createPointerEvent(i,"pointerout",o||void 0);n.dispatchEvent(l),s&&n.dispatchEvent(l,"mouseout");var u=n.createPointerEvent(i,"pointerleave",o||void 0);for(u.eventPhase=u.AT_TARGET;u.target&&u.target!==(it.isNode(n.rootTarget)&&n.rootTarget.parentNode);)u.currentTarget=u.target,n.notifyTarget(u),s&&n.notifyTarget(u,"mouseleave"),it.isNode(u.target)&&(u.target=u.target.parentNode);a.overTargets=null,n.freeEvent(l),n.freeEvent(u)}n.cursor=null},this.onPointerOver=function(i){var a=n.trackingData(i.pointerId),s=n.createPointerEvent(i),o=s.pointerType==="mouse"||s.pointerType==="pen";n.dispatchEvent(s,"pointerover"),o&&n.dispatchEvent(s,"mouseover"),s.pointerType==="mouse"&&(n.cursor=n.getCursor(s.target));var l=n.clonePointerEvent(s,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(it.isNode(n.rootTarget)&&n.rootTarget.parentNode);)l.currentTarget=l.target,n.notifyTarget(l),o&&n.notifyTarget(l,"mouseenter"),it.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=s.composedPath(),n.freeEvent(s),n.freeEvent(l)},this.onPointerUpOutside=function(i){var a=n.trackingData(i.pointerId),s=n.findMountedTarget(a.pressTargetsByButton[i.button]),o=n.createPointerEvent(i);if(s){for(var l=s;l;)o.currentTarget=l,n.notifyTarget(o,"pointerupoutside"),o.pointerType==="touch"||(o.pointerType==="mouse"||o.pointerType==="pen")&&n.notifyTarget(o,o.button===2?"rightupoutside":"mouseupoutside"),it.isNode(l)&&(l=l.parentNode);delete a.pressTargetsByButton[i.button]}n.freeEvent(o)},this.onWheel=function(i){var a=n.createWheelEvent(i);n.dispatchEvent(a),n.freeEvent(a)},this.onClick=function(i){if(n.context.config.useNativeClickEvent){var a=n.createPointerEvent(i);n.dispatchEvent(a),n.freeEvent(a)}},this.onPointerCancel=function(i){var a=n.createPointerEvent(i,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(a),n.freeEvent(a)},this.globalRuntime=t,this.context=e}return se(r,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var e=this.context.contextService.getBoundingClientRect(),n=1,i=1,a=this.context.contextService.getDomElement();if(a&&e){var s=a.offsetWidth,o=a.offsetHeight;s&&o&&(n=e.width/s,i=e.height/o)}return{scaleX:n,scaleY:i,bbox:e}}},{key:"client2Viewport",value:function(e){var n=this.getScale(),i=n.scaleX,a=n.scaleY,s=n.bbox;return new At((e.x-((s==null?void 0:s.left)||0))/i,(e.y-((s==null?void 0:s.top)||0))/a)}},{key:"viewport2Client",value:function(e){var n=this.getScale(),i=n.scaleX,a=n.scaleY,s=n.bbox;return new At((e.x+((s==null?void 0:s.left)||0))*i,(e.y+((s==null?void 0:s.top)||0))*a)}},{key:"viewport2Canvas",value:function(e){var n=e.x,i=e.y,a=this.rootTarget.defaultView,s=a.getCamera(),o=this.context.config,l=o.width,u=o.height,c=s.getPerspectiveInverse(),d=s.getWorldTransform(),h=G.multiply(this.tmpMatrix,d,c),f=R.t8(this.tmpVec3,n/l*2-1,(1-i/u)*2-1,0);return R.fF(f,f,h),new At(f[0],f[1])}},{key:"canvas2Viewport",value:function(e){var n=this.rootTarget.defaultView,i=n.getCamera(),a=i.getPerspective(),s=i.getViewTransform(),o=G.multiply(this.tmpMatrix,a,s),l=R.t8(this.tmpVec3,e.x,e.y,0);R.fF(this.tmpVec3,this.tmpVec3,o);var u=this.context.config,c=u.width,d=u.height;return new At((l[0]+1)/2*c,(1-(l[1]+1)/2)*d)}},{key:"setPickHandler",value:function(e){this.pickHandler=e}},{key:"addEventMapping",value:function(e,n){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:n,priority:0}),this.mappingTable[e].sort(function(i,a){return i.priority-a.priority})}},{key:"mapEvent",value:function(e){if(this.rootTarget){var n=this.mappingTable[e.type];if(n)for(var i=0,a=n.length;i<a;i++)n[i].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}}},{key:"dispatchEvent",value:function(e,n,i){if(!i)e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,n);else{e.eventPhase=e.AT_TARGET;var a=this.rootTarget.defaultView||null;e.currentTarget=a,this.notifyListeners(e,n)}this.emitter.emit(n||e.type,e)}},{key:"propagate",value:function(e,n){if(e.target){var i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var a=i.length-1;a>=1;a--)if(e.currentTarget=i[a],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,n),!(e.propagationStopped||e.propagationImmediatelyStopped)){var s=i.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var o=s+1;o<i.length;o++)if(e.currentTarget=i[o],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(e){var n=[e],i=this.rootTarget.defaultView||null;if(i&&i===e)return n.unshift(i.document),n;for(var a=0;a<xk&&e!==this.rootTarget;a++)it.isNode(e)&&e.parentNode&&(n.push(e.parentNode),e=e.parentNode);return i&&n.push(i),n}},{key:"hitTest",value:function(e){var n=e.viewportX,i=e.viewportY,a=this.context.config,s=a.width,o=a.height,l=a.disableHitTesting;return n<0||i<0||n>s||i>o?null:!l&&this.pickHandler(e)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(e,n){var i,a=n==null?void 0:n.target;if((i=a)!==null&&i!==void 0&&i.shadowRoot&&(a=n.composedPath()[0]),a){if(a===e)return!0;if(e&&e.contains)return e.contains(a)}return n!=null&&n.composedPath?n.composedPath().indexOf(e)>-1:!1}},{key:"getExistedHTML",value:function(e){if(e.nativeEvent.composedPath)for(var n=0,i=e.nativeEvent.composedPath();n<i.length;n++){var a=i[n],s=this.nativeHTMLMap.get(a);if(s)return s}return null}},{key:"pickTarget",value:function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})}},{key:"createPointerEvent",value:function(e,n,i,a){var s=this.allocateEvent(Jo);this.copyPointerData(e,s),this.copyMouseData(e,s),this.copyData(e,s),s.nativeEvent=e.nativeEvent,s.originalEvent=e;var o=this.getExistedHTML(s),l=this.context.contextService.getDomElement();return s.target=i!=null?i:o||this.isNativeEventFromCanvas(l,s.nativeEvent)&&this.pickTarget(s)||a,typeof n=="string"&&(s.type=n),s}},{key:"createWheelEvent",value:function(e){var n=this.allocateEvent(Cd);this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e;var i=this.getExistedHTML(n),a=this.context.contextService.getDomElement();return n.target=i||this.isNativeEventFromCanvas(a,n.nativeEvent)&&this.pickTarget(n),n}},{key:"trackingData",value:function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}},{key:"cloneWheelEvent",value:function(e){var n=this.allocateEvent(Cd);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=e.type,n}},{key:"clonePointerEvent",value:function(e,n){var i=this.allocateEvent(Jo);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=n!=null?n:i.type,i}},{key:"copyPointerData",value:function(e,n){n.pointerId=e.pointerId,n.width=e.width,n.height=e.height,n.isPrimary=e.isPrimary,n.pointerType=e.pointerType,n.pressure=e.pressure,n.tangentialPressure=e.tangentialPressure,n.tiltX=e.tiltX,n.tiltY=e.tiltY,n.twist=e.twist}},{key:"copyMouseData",value:function(e,n){n.altKey=e.altKey,n.button=e.button,n.buttons=e.buttons,n.ctrlKey=e.ctrlKey,n.metaKey=e.metaKey,n.shiftKey=e.shiftKey,n.client.copyFrom(e.client),n.movement.copyFrom(e.movement),n.canvas.copyFrom(e.canvas),n.screen.copyFrom(e.screen),n.global.copyFrom(e.global),n.offset.copyFrom(e.offset)}},{key:"copyWheelData",value:function(e,n){n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ}},{key:"copyData",value:function(e,n){n.isTrusted=e.isTrusted,n.timeStamp=_d.now(),n.type=e.type,n.detail=e.detail,n.view=e.view,n.page.copyFrom(e.page),n.viewport.copyFrom(e.viewport)}},{key:"allocateEvent",value:function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var n=this.eventPool.get(e).pop()||new e(this);return n.eventPhase=n.NONE,n.currentTarget=null,n.path=[],n.target=null,n}},{key:"freeEvent",value:function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var n=e.constructor;this.eventPool.has(n)||this.eventPool.set(n,[]),this.eventPool.get(n).push(e)}},{key:"notifyTarget",value:function(e,n){var i;n=(i=n)!==null&&i!==void 0?i:e.type;var a=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(n,"capture"):n;this.notifyListeners(e,a),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,n)}},{key:"notifyListeners",value:function(e,n){var i=e.currentTarget.emitter,a=i._events[n];if(a)if("fn"in a)a.once&&i.removeListener(n,a.fn,void 0,!0),a.fn.call(e.currentTarget||a.context,e);else for(var s=0;s<a.length&&!e.propagationImmediatelyStopped;s++)a[s].once&&i.removeListener(n,a[s].fn,void 0,!0),a[s].fn.call(e.currentTarget||a[s].context,e)}},{key:"findMountedTarget",value:function(e){if(!e)return null;for(var n=e[e.length-1],i=e.length-2;i>=0;i--){var a=e[i];if(a===this.rootTarget||it.isNode(a)&&a.parentNode===n)n=e[i];else break}return n}},{key:"getCursor",value:function(e){for(var n=e;n;){var i=Bw(n)&&n.getAttribute("cursor");if(i)return i;n=it.isNode(n)&&n.parentNode}}}])}(),Od=function(){function r(){ae(this,r)}return se(r,[{key:"getOrCreateCanvas",value:function(e,n){if(this.canvas)return this.canvas;if(e||U.offscreenCanvas)this.canvas=e||U.offscreenCanvas,this.context=this.canvas.getContext("2d",De({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",De({willReadFrequently:!0},n)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",De({willReadFrequently:!0},n))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,n){return this.context?this.context:(this.getOrCreateCanvas(e,n),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),wa=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),wk=function(){function r(t,e){ae(this,r),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new Gt,initAsync:new Qw,dirtycheck:new Td,cull:new Td,beginFrame:new Gt,beforeRender:new Gt,render:new Gt,afterRender:new Gt,endFrame:new Gt,destroy:new Gt,pick:new ek,pickSync:new Td,pointerDown:new Gt,pointerUp:new Gt,pointerMove:new Gt,pointerOut:new Gt,pointerOver:new Gt,pointerWheel:new Gt,pointerCancel:new Gt,click:new Gt},this.globalRuntime=t,this.context=e}return se(r,[{key:"init",value:function(e){var n=this,i=De(De({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(a){a.apply(i,n.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){n.inited=!0,e()}).catch(function(a){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var e=this.context.config.renderer,n=e.getConfig(),i=n.enableDirtyRectangleRendering;return!i||this.context.renderingContext.renderReasons.has(wa.CAMERA_CHANGED)}},{key:"render",value:function(e,n,i){var a=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var s=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(s.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),s.renderReasons.size&&this.inited){s.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=s.renderReasons.size===1&&s.renderReasons.has(wa.CAMERA_CHANGED),l=!e.disableRenderHooks||!(e.disableRenderHooks&&o);l&&this.renderDisplayObject(s.root,e,s),this.hooks.beginFrame.call(n),l&&s.renderListCurrentFrame.forEach(function(u){a.hooks.beforeRender.call(u),a.hooks.render.call(u),a.hooks.afterRender.call(u)}),this.hooks.endFrame.call(n),s.renderListCurrentFrame=[],s.renderReasons.clear(),i()}}},{key:"renderDisplayObject",value:function(e,n,i){var a=this,s=n.renderer.getConfig(),o=s.enableDirtyCheck,l=s.enableCulling;function u(v){var g=v.renderable,p=v.sortable,m=o?g.dirty||i.dirtyRectangleRenderingDisabled?v:null:v;if(m){var y=l?a.hooks.cull.call(m,a.context.camera):m;y&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(y))}g.dirty=!1,p.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,p.dirty&&(a.sort(v,p),p.dirty=!1,p.dirtyChildren=[],p.dirtyReason=void 0)}for(var c=[e];c.length>0;){var d=c.pop();u(d);for(var h=d.sortable.sorted||d.childNodes,f=h.length-1;f>=0;f--)c.push(h[f])}}},{key:"sort",value:function(e,n){n.sorted&&n.dirtyReason!==Zo.Z_INDEX_CHANGED?n.dirtyChildren.forEach(function(i){var a=e.childNodes.indexOf(i);if(a===-1){var s=n.sorted.indexOf(i);s>=0&&n.sorted.splice(s,1)}else if(n.sorted.length===0)n.sorted.push(i);else{var o=Fw(n.sorted,i);n.sorted.splice(o,0,i)}}):n.sorted=e.childNodes.slice().sort(Ng)}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(wa.DISPLAY_OBJECT_CHANGED)}}])}(),kk=/\[\s*(.*)=(.*)\s*\]/,_k=function(){function r(){ae(this,r)}return se(r,[{key:"selectOne",value:function(e,n){var i=this;if(e.startsWith("."))return n.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?n.find(function(l){return n!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return n.find(function(l){return n!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,n){var i=this;if(e.startsWith("."))return n.findAll(function(l){return n!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.findAll(function(l){return n!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?n.findAll(function(l){return n!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return n.findAll(function(l){return n!==l&&l.nodeName===e})}},{key:"is",value:function(e,n){if(e.startsWith("."))return n.className===this.getIdOrClassname(e);if(e.startsWith("#"))return n.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?n.name===s:this.attributeToString(n,a)===s}return n.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var n=e.match(kk),i="",a="";return n&&n.length>2&&(i=n[1].replace(/"/g,""),a=n[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,n){if(!e.getAttribute)return"";var i=e.getAttribute(n);return(0,ue.Z)(i)?"":i.toString?i.toString():""}}])}(),Te=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),vr=function(r){function t(e,n,i,a,s,o,l,u){var c;return ae(this,t),c=_e(this,t,[null]),c.relatedNode=n,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return ye(t,r),se(t)}(qo);vr.ADDITION=2,vr.MODIFICATION=1,vr.REMOVAL=3;function Vg(r){var t=r.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var Sk=new vr(Te.REPARENT,null,"","","",0,"",""),Tk=$r.Ue(),Qo=R.Ue(),Ak=R.al(1,1,1),Ck=G.create(),Ok=$r.Ue(),Qr=R.Ue(),ka=G.create(),ei=K.Ue(),Pk=R.Ue(),Nk=K.Ue(),Mk=R.Ue(),Es=R.Ue(),Li=R.Ue(),el=G.create(),Hg=K.Ue(),Ug=K.Ue(),tl=K.Ue(),Pd={affectChildren:!0},Rk=function(){function r(t){ae(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new Dt(Te.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=t}return se(r,[{key:"matches",value:function(e,n){return this.runtime.sceneGraphSelector.is(e,n)}},{key:"querySelector",value:function(e,n){return this.runtime.sceneGraphSelector.selectOne(e,n)}},{key:"querySelectorAll",value:function(e,n){return this.runtime.sceneGraphSelector.selectAll(e,n)}},{key:"attach",value:function(e,n,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==n,this.detach(e));var o=e.nodeName===Z.FRAGMENT,l=$o(n);e.parentNode=n;var u=o?e.childNodes:[e];(0,oe.Z)(i)?u.forEach(function(f){n.childNodes.splice(i,0,f),f.parentNode=n}):u.forEach(function(f){n.childNodes.push(f),f.parentNode=n});var c=n,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=Zo.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(Sk)}}},{key:"detach",value:function(e){if(e.parentNode){var n,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(n=o.sorted)!==null&&n!==void 0&&n.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=Zo.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=[n,i,a]);var s=e.transformable;if(!(n[0]===s.origin[0]&&n[1]===s.origin[1]&&n[2]===s.origin[2])){var o=s.origin;o[0]=n[0],o[1]=n[1],o[2]=n[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,n);else{var o=ei;K.Su(o,n[0],n[1],n[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);K.JG(tl,u),K.U_(tl,tl),K.Jp(o,tl,o),K.Jp(s.localRotation,o,l),K.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;K.Su(Ug,n[0],n[1],n[2]),K.dC(s.localRotation,s.localRotation,Ug),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,n);else{K.Su(s.localRotation,n[0],n[1],n[2]);var o=this.getRotation(e.parentNode);K.JG(Hg,K.U_(ei,o)),K.dC(s.localRotation,s.localRotation,Hg),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof n=="number"&&(n=R.al(n,i,a));var o=e.transformable;K.Su(o.localRotation,n[0],n[1],n[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;R.fS(n,Qo)||(R.VC(n,n,s.localRotation),R.IH(s.localPosition,s.localPosition,n),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,n){var i,a=e.transformable;if(Li[0]=n[0],Li[1]=n[1],Li[2]=(i=n[2])!==null&&i!==void 0?i:0,!R.fS(this.getPosition(e),Li)){if(R.JG(a.position,Li),e.parentNode===null||!e.parentNode.transformable)R.JG(a.localPosition,Li);else{var s=e.parentNode.transformable;G.copy(el,s.worldTransform),G.invert(el,el),R.fF(a.localPosition,Li,el)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;Es[0]=n[0],Es[1]=n[1],Es[2]=(i=n[2])!==null&&i!==void 0?i:0,!R.fS(s.localPosition,Es)&&(R.JG(s.localPosition,Es),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,n){var i,a=e.transformable;R.Jp(a.localScale,a.localScale,R.t8(Qr,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;R.t8(Qr,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:s.localScale[2]),!R.fS(Qr,s.localScale)&&(R.JG(s.localScale,Qr),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.t8(Qr,n,i,a)),!R.fS(n,Qo)&&(R.IH(Qr,this.getPosition(e),n),this.setPosition(e,Qr))}},{key:"setRotation",value:function(e,n,i,a,s){var o=e.transformable;if(typeof n=="number"&&(n=K.al(n,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,n);else{var l=this.getRotation(e.parentNode);K.JG(ei,l),K.U_(ei,ei),K.Jp(o.localRotation,ei,n),K.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,n,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof n=="number"&&(n=K.t8(ei,n,i,a,s));var l=e.transformable;K.JG(l.localRotation,n),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof n=="number"&&(n=$r.t8(Ok,n,i));var s=e.transformable;$r.JG(s.localSkew,n),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,n){$o(e)||n.localDirtyFlag||(n.localDirtyFlag=!0,n.dirtyFlag||this.dirtifyWorld(e,n))}},{key:"dirtifyWorld",value:function(e,n){n.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,n),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var n=e.transformable;n&&(n.frozen=!1,n.dirtyFlag=!0,n.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===Z.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,n=new Set,i=function(s,o){!s.isConnected||n.has(s)||s.nodeName===Z.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),n.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==Z.FRAGMENT&&(Pd.affectChildren=a,a?s.forEach(function(o){i(o,Pd)}):i(s,Pd))}),n.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)Vg(i),i=i.parentNode;n&&e.forEach(function(a){Vg(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,n)}},{key:"updateDisplayObjectDependency",value:function(e,n,i,a){if(n&&n!==i){var s=this.displayObjectDependencyMap.get(n);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var n=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){n.dirtifyToRoot(s,!0),s.dispatchEvent(new vr(Te.ATTR_MODIFIED,s,n,n,a,vr.MODIFICATION,n,n)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,n,n)})})}},{key:"getPosition",value:function(e){var n=e.transformable;return G.getTranslation(n.position,this.getWorldTransform(e,n))}},{key:"getRotation",value:function(e){var n=e.transformable;return G.getRotation(n.rotation,this.getWorldTransform(e,n))}},{key:"getScale",value:function(e){var n=e.transformable;return G.getScaling(n.scaling,this.getWorldTransform(e,n))}},{key:"getWorldTransform",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!n.localDirtyFlag&&!n.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,n)),n.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var n=e.localSkew[0]!==0||e.localSkew[1]!==0;if(n){G.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,R.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(G.identity(ka),ka[4]=Math.tan(e.localSkew[0]),ka[1]=Math.tan(e.localSkew[1]),G.multiply(e.localTransform,e.localTransform,ka));var i=G.fromRotationTranslationScaleOrigin(ka,K.t8(ei,0,0,0,1),R.t8(Qr,1,1,1),e.localScale,e.origin);G.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?G.fromTranslation(a,s):G.identity(a):G.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var n=e.transformable;return n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.localTransform}},{key:"setLocalTransform",value:function(e,n){var i=G.getTranslation(Pk,n),a=G.getRotation(Nk,n),s=G.getScaling(Mk,n);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,Ak,!1),this.setLocalPosition(e,Qo,!1),this.setLocalEulerAngles(e,Qo,void 0,void 0,!1),this.setLocalSkew(e,Tk,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,n);if(!Ke.isEmpty(a)){var s=i||new Ke;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&U.styleValueRegistry.updateGeometry(e);var s=n?a.renderBounds:a.contentBounds||null;return s||new Ke}},{key:"getBounds",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=n.getBounds(h,i);f&&(l?l.add(f):(l=o||new Ke,l.update(f.center,f.halfExtents)))}),l||(l=new Ke),i){var c=Mg(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var n=Ck;e.parentNode.transformable&&(n=G.invert(ka,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!Ke.isEmpty(i)){var a=new Ke;return a.setFromTransformedAABB(i,n),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var n,i,a=this.getGeometryBounds(e);Ke.isEmpty(a)||(i=new Ke,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(n=e.ownerDocument)===null||n===void 0||(n=n.defaultView)===null||n===void 0?void 0:n.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Pe(o,2),u=l[0],c=l[1],d=i.getMax(),h=Pe(d,2),f=h[0],v=h[1];return new ma(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new ma((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,n){var i=this;if(!n.dirtyFlag){n.dirtyFlag=!0,n.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var n=e.transformable;if(!n.frozen){n.frozen=!0,(n.localDirtyFlag||n.dirtyFlag)&&this.sync(e,n);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,n){if(n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?G.copy(n.worldTransform,n.localTransform):G.multiply(n.worldTransform,a.worldTransform,n.localTransform),n.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var n=e.parentNode;n;){var i=n.transformable;i&&(i.frozen=!1),n=n.parentNode}}}])}(),Di={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Yg=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Lk=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,Dk=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,Ik=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,Bk=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,Fk=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,zk=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,Gk=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,jk=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,Wk=new RegExp("".concat(Lk.source,"|").concat(Ik.source,"|").concat(Fk.source,"|").concat(Gk.source)),Zk=new RegExp("".concat(Dk.source,"|").concat(Bk.source,"|").concat(zk.source,"|").concat(jk.source)),Vk=function(){function r(t){var e=this;ae(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(n,i){return e.isBreakingSpace(i)?!1:!!(n&&(Zk.exec(i)||Wk.exec(n)))},this.trimByKinsokuShorui=function(n){var i=Qe(n),a=i[i.length-2];if(!a)return n;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=t}return se(r,[{key:"measureFont",value:function(e,n){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(n),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(n,{willReadFrequently:!0});s.font=e;var o=Di.MetricsString+Di.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(Di.BaselineSymbol).width),c=Di.HeightMultiplier*u;u=u*Di.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,p=!1;for(v=0;v<u;++v){for(var m=0;m<f;m+=4)if(d[g+m]!==255){p=!0;break}if(!p)g+=f;else break}for(i.ascent=u-v,g=h-f,p=!1,v=c;v>u;--v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){p=!0;break}if(!p)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,n,i){var a=n.fontSize,s=a===void 0?16:a,o=n.wordWrap,l=o===void 0?!1:o,u=n.lineHeight,c=n.lineWidth,d=c===void 0?1:c,h=n.textBaseline,f=h===void 0?"alphabetic":h,v=n.textAlign,g=v===void 0?"start":v,p=n.letterSpacing,m=p===void 0?0:p,y=n.textPath;n.textPathSide,n.textPathStartOffset;var b=n.leading,_=b===void 0?0:b,w=rk(n),x=this.measureFont(w,i);x.fontSize===0&&(x.fontSize=s,x.ascent=s);var E=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);E.font=w,n.isOverflowing=!1;var k=l?this.wordWrap(e,n,i):e,O=k.split(/(?:\r\n|\r|\n)/),P=new Array(O.length),M=0;if(y){y.getTotalLength();for(var L=0;L<O.length;L++)E.measureText(O[L]).width+(O[L].length-1)*m}else{for(var D=0;D<O.length;D++){var z=E.measureText(O[D]).width+(O[D].length-1)*m;P[D]=z,M=Math.max(M,z)}var F=M+d,C=u||x.fontSize+d,S=Math.max(C,x.fontSize+d)+(O.length-1)*(C+_);C+=_;var T=0;return f==="middle"?T=-S/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?T=-S:(f==="top"||f==="hanging")&&(T=0),{font:w,width:F,height:S,lines:O,lineWidths:P,lineHeight:C,maxLineWidth:M,fontProperties:x,lineMetrics:P.map(function(N,B){var I=0;return g==="center"||g==="middle"?I-=N/2:(g==="right"||g==="end")&&(I-=N),new ma(I-d/2,T+B*C,N+d,C)})}}}},{key:"wordWrap",value:function(e,n,i){var a=this,s=n.wordWrapWidth,o=s===void 0?0:s,l=n.letterSpacing,u=l===void 0?0:l,c=n.maxLines,d=c===void 0?1/0:c,h=n.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);var p=[],m=0,y=0,b={},_=function(z){return a.getFromCache(z,u,b,f)},w=Array.from(g).reduce(function(D,z){return D+_(z)},0);function x(D){if(!(w<=0||w>v)){for(var z=p[D].length,F=0,C=z,S=0;S<z;S++){var T=_(p[D][S]);if(F+T+w>v){C=S;break}F+=T}p[D]=(p[D]||"").slice(0,C)+g}}for(var E=Array.from(e),k=0;k<E.length;k++){var O=E[k],P=e[k-1],M=e[k+1],L=_(O);if(this.isNewline(O)){if(m++,m>=d){n.isOverflowing=!0,k<E.length-1&&x(m-1);break}y=0,p[m]="";continue}if(y>0&&y+L>v){if(m+1>=d){n.isOverflowing=!0,x(m);break}if(m++,y=0,p[m]="",this.isBreakingSpace(O))continue;this.canBreakInLastChar(O)||(p=this.trimToBreakable(p),y=this.sumTextWidthByCache(p[m]||"",b)),this.shouldBreakByKinsokuShorui(O,M)&&(p=this.trimByKinsokuShorui(p),y+=_(P||""))}y+=L,p[m]=(p[m]||"")+O}return p.join(`
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:Di.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:Di.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var n=Qe(e),i=n[n.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return n;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return n[n.length-1]+=i.slice(l,i.length),n[n.length-2]=i.slice(0,u),n}},{key:"canBreakInLastChar",value:function(e){return!(e&&Yg.test(e))}},{key:"sumTextWidthByCache",value:function(e,n){return e.split("").reduce(function(i,a){if(!n[a])throw Error("cannot count the word without cache");return i+n[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var n=e.length-1;n>=0;n--)if(!Yg.test(e[n]))return n;return-1}},{key:"getFromCache",value:function(e,n,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*n;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),U={},Hk=function(r){var t=new pk,e=new gk;return r={},ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(r,Z.FRAGMENT,null),Z.CIRCLE,new dk),Z.ELLIPSE,new hk),Z.RECT,t),Z.IMAGE,t),Z.GROUP,new yk),Z.LINE,new fk),Z.TEXT,new mk(U)),Z.POLYLINE,e),Z.POLYGON,e),ke(ke(ke(r,Z.PATH,new vk),Z.HTML,new bk),Z.MESH,null)}(),Uk=function(r){var t=new kw,e=new wd;return r={},ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(r,te.PERCENTAGE,null),te.NUMBER,new Cw),te.ANGLE,new Ew),te.DEFINED_PATH,new ww),te.PAINT,t),te.COLOR,t),te.FILTER,new _w),te.LENGTH,e),te.LENGTH_PERCENTAGE,e),te.LENGTH_PERCENTAGE_12,new Sw),ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(r,te.LENGTH_PERCENTAGE_14,new Tw),te.COORDINATE,new wd),te.OFFSET_DISTANCE,new Ow),te.OPACITY_VALUE,new Pw),te.PATH,new Nw),te.LIST_OF_POINTS,new Mw),te.SHADOW_BLUR,new Rw),te.TEXT,new Lw),te.TEXT_TRANSFORM,new Dw),te.TRANSFORM,new lk),ke(ke(ke(r,te.TRANSFORM_ORIGIN,new uk),te.Z_INDEX,new ck),te.MARKER,new Aw)}(),Yk=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:{}};U.CameraContribution=rg,U.AnimationTimeline=null,U.EasingFunction=null,U.offscreenCanvasCreator=new Od,U.sceneGraphSelector=new _k,U.sceneGraphService=new Rk(U),U.textService=new Vk(U),U.geometryUpdaterFactory=Hk,U.CSSPropertySyntaxFactory=Uk,U.styleValueRegistry=new bw(U),U.layoutRegistry=null,U.globalThis=Yk(),U.enableStyleSyntax=!0,U.enableSizeAttenuation=!1;var Xg=0;function W6(){Xg=0}var Nd=new vr(Te.INSERTED,null,"","","",0,"",""),Md=new vr(Te.REMOVED,null,"","","",0,"",""),Kg=new Dt(Te.DESTROY),Xk=function(r){function t(){var e;ae(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=_e(this,t,[].concat(i)),e.entity=Xg++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:cE.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return ye(t,r),se(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(n){this.setAttribute("class",n)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(n){return n!==""})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n-1]||null}return null}},{key:"cloneNode",value:function(n){throw new Error(Ie)}},{key:"appendChild",value:function(n,i){var a;if(n.destroyed)throw new Error(Jx);return U.sceneGraphService.attach(n,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!$o(this)&&n.nodeName===Z.FRAGMENT?this.ownerDocument.defaultView.mountFragment(n):this.ownerDocument.defaultView.mountChildren(n)),this.isMutationObserved&&(Nd.relatedNode=this,n.dispatchEvent(Nd)),n}},{key:"insertBefore",value:function(n,i){if(!i)this.appendChild(n);else{n.parentElement&&n.parentElement.removeChild(n);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(n):this.appendChild(n,a)}return n}},{key:"replaceChild",value:function(n,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(n,a),i}},{key:"removeChild",value:function(n){var i;return Md.relatedNode=this,n.dispatchEvent(Md),(i=n.ownerDocument)!==null&&i!==void 0&&i.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),U.sceneGraphService.detach(n),n}},{key:"removeChildren",value:function(){for(var n=this.childNodes.length-1;n>=0;n--){var i=this.childNodes[n];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var n=this.childNodes.length-1;n>=0;n--){var i=this.childNodes[n];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(n){return U.sceneGraphService.matches(n,this)}},{key:"getElementById",value:function(n){return U.sceneGraphService.querySelector("#".concat(n),this)}},{key:"getElementsByName",value:function(n){return U.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)}},{key:"getElementsByClassName",value:function(n){return U.sceneGraphService.querySelectorAll(".".concat(n),this)}},{key:"getElementsByTagName",value:function(n){return U.sceneGraphService.querySelectorAll(n,this)}},{key:"querySelector",value:function(n){return U.sceneGraphService.querySelector(n,this)}},{key:"querySelectorAll",value:function(n){return U.sceneGraphService.querySelectorAll(n,this)}},{key:"closest",value:function(n){var i=this;do{if(U.sceneGraphService.matches(n,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(n){var i=this,a=null;return this.forEach(function(s){return s!==i&&n(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(n){var i=this,a=[];return this.forEach(function(s){s!==i&&n(s)&&a.push(s)}),a}},{key:"after",value:function(){var n=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=n.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var n,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(n=l).after.apply(n,Qe(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return n.appendChild(o)})}},{key:"prepend",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return n.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.destroyChildren(),this.dispatchEvent(Kg),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return U.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return U.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return U.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return U.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return U.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(n){if(typeof n!="symbol"){var i=this.attributes[n];return i}}},{key:"hasAttribute",value:function(n){return this.getAttributeNames().includes(n)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(n){this.setAttribute(n,null),delete this.attributes[n]}},{key:"setAttribute",value:function(n,i,a,s){this.attributes[n]=i}},{key:"getAttributeNS",value:function(n,i){throw new Error(Ie)}},{key:"getAttributeNode",value:function(n){throw new Error(Ie)}},{key:"getAttributeNodeNS",value:function(n,i){throw new Error(Ie)}},{key:"hasAttributeNS",value:function(n,i){throw new Error(Ie)}},{key:"removeAttributeNS",value:function(n,i){throw new Error(Ie)}},{key:"removeAttributeNode",value:function(n){throw new Error(Ie)}},{key:"setAttributeNS",value:function(n,i,a){throw new Error(Ie)}},{key:"setAttributeNode",value:function(n){throw new Error(Ie)}},{key:"setAttributeNodeNS",value:function(n){throw new Error(Ie)}},{key:"toggleAttribute",value:function(n,i){throw new Error(Ie)}}])}(it);function Me(r){return!!(r!=null&&r.nodeName)}var Kk=U.globalThis.Proxy?U.globalThis.Proxy:function(){},gr=new vr(Te.ATTR_MODIFIED,null,null,null,null,vr.MODIFICATION,null,null),ws=R.Ue(),$k=K.Ue(),at=function(r){function t(e){var n;return ae(this,t),n=_e(this,t),n.isCustomElement=!1,n.isMutationObserved=!1,n.activeAnimations=[],n.config=e,n.id=e.id||"",n.name=e.name||"",(e.className||e.class)&&(n.className=e.className||e.class),n.nodeName=e.type||Z.GROUP,e.initialParsedStyle&&Object.assign(n.parsedStyle,e.initialParsedStyle),n.initAttributes(e.style),U.enableStyleSyntax&&(n.style=new Kk({setProperty:function(a,s){n.setAttribute(a,s)},getPropertyValue:function(a){return n.getAttribute(a)},removeProperty:function(a){n.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:n.getAttribute(s)},set:function(a,s,o){return n.setAttribute(s,o),!0}})),n}return ye(t,r),se(t,[{key:"destroy",value:function(){zv(t,"destroy",this,3)([]),this.getAnimations().forEach(function(n){n.cancel()})}},{key:"cloneNode",value:function(n,i){var a=De({},this.attributes);for(var s in a){var o=a[s];Me(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(n)),i&&(a[s]=i(s,o))}var l=new this.constructor(De(De({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),n&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(n);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};U.styleValueRegistry.processProperties(this,n,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ce.Z)(i)||(a||i!==this.attributes[n])&&(this.internalSetAttribute(n,i,{memoize:s}),zv(t,"setAttribute",this,3)([n,i]))}},{key:"internalSetAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[n],l=this.parsedStyle[n];U.styleValueRegistry.processProperties(this,ke({},n,i),a),s.dirty=!0;var u=this.parsedStyle[n];if(this.isConnected&&(gr.relatedNode=this,gr.prevValue=o,gr.newValue=i,gr.attrName=n,gr.prevParsedValue=l,gr.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(gr):(gr.target=this,this.ownerDocument.defaultView.dispatchEvent(gr,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,n,o,i,l,u)}}},{key:"getBBox",value:function(){var n=this.getBounds(),i=n.getMin(),a=Pe(i,2),s=a[0],o=a[1],l=n.getMax(),u=Pe(l,2),c=u[0],d=u[1];return new ma(s,o,c-s,d-o)}},{key:"setOrigin",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return U.sceneGraphService.setOrigin(this,Ft(n,i,a,!1)),this}},{key:"getOrigin",value:function(){return U.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return U.sceneGraphService.setPosition(this,Ft(n,i,a,!1)),this}},{key:"setLocalPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return U.sceneGraphService.setLocalPosition(this,Ft(n,i,a,!1)),this}},{key:"translate",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return U.sceneGraphService.translate(this,Ft(n,i,a,!1)),this}},{key:"translateLocal",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return U.sceneGraphService.translateLocal(this,Ft(n,i,a,!1)),this}},{key:"getPosition",value:function(){return U.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return U.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(n,i,a){return this.scaleLocal(n,i,a)}},{key:"scaleLocal",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=Ft(n,i,a,!1)),U.sceneGraphService.scaleLocal(this,n),this}},{key:"setLocalScale",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=Ft(n,i,a,!1)),U.sceneGraphService.setLocalScale(this,n),this}},{key:"getLocalScale",value:function(){return U.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return U.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var n=ad(ws,U.sceneGraphService.getWorldTransform(this)),i=Pe(n,3),a=i[2];return $t(a)}},{key:"getLocalEulerAngles",value:function(){var n=ad(ws,U.sceneGraphService.getLocalRotation(this)),i=Pe(n,3),a=i[2];return $t(a)}},{key:"setEulerAngles",value:function(n){return U.sceneGraphService.setEulerAngles(this,0,0,n),this}},{key:"setLocalEulerAngles",value:function(n){return U.sceneGraphService.setLocalEulerAngles(this,0,0,n),this}},{key:"rotateLocal",value:function(n,i,a){return(0,ue.Z)(i)&&(0,ue.Z)(a)?U.sceneGraphService.rotateLocal(this,0,0,n):U.sceneGraphService.rotateLocal(this,n,i,a),this}},{key:"rotate",value:function(n,i,a){return(0,ue.Z)(i)&&(0,ue.Z)(a)?U.sceneGraphService.rotate(this,0,0,n):U.sceneGraphService.rotate(this,n,i,a),this}},{key:"setRotation",value:function(n,i,a,s){return U.sceneGraphService.setRotation(this,n,i,a,s),this}},{key:"setLocalRotation",value:function(n,i,a,s){return U.sceneGraphService.setLocalRotation(this,n,i,a,s),this}},{key:"setLocalSkew",value:function(n,i){return U.sceneGraphService.setLocalSkew(this,n,i),this}},{key:"getRotation",value:function(){return U.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return U.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return U.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return U.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return U.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(n){return U.sceneGraphService.setLocalTransform(this,n),this}},{key:"resetLocalTransform",value:function(){U.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(n,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,n,i):null}},{key:"isVisible",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(n){this.style.pointerEvents=n?"auto":"none"}},{key:"isInteractive",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,Qe(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,Qe(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,yt.Z)(o)?(Object.keys(o).forEach(function(u){n.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(n){var i=n||this.getWorldTransform(),a=G.getTranslation(ws,i),s=Pe(a,2),o=s[0],l=s[1],u=G.getScaling(ws,i),c=Pe(u,2),d=c[0],h=c[1],f=G.getRotation($k,i),v=ad(ws,f),g=Pe(v,3),p=g[0],m=g[2];return aE(p||m,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(n){var i=Qv(n),a=Pe(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(n){var i=Qv(n),a=Pe(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(n){n.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(n){n.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(n){return this.children[n]||null}},{key:"add",value:function(n,i){return this.appendChild(n,i)}},{key:"set",value:function(n,i){this.config[n]=i}},{key:"get",value:function(n){return this.config[n]}},{key:"moveTo",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"move",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"setZIndex",value:function(n){return this.style.zIndex=n,this}}])}(Xk);at.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var _a=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ae(this,t),_e(this,t,[De({type:Z.CIRCLE},e)])}return ye(t,r),se(t)}(at);_a.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var qk=["style"],Jk=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=Oi(n,qk);return ae(this,t),e=_e(this,t,[De({style:i},a)]),e.isCustomElement=!0,e}return ye(t,r),se(t)}(at),nl=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ae(this,t),_e(this,t,[De({type:Z.ELLIPSE},e)])}return ye(t,r),se(t)}(at);nl.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var Z6=null,Sa=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ae(this,t),_e(this,t,[De({type:Z.GROUP},e)])}return ye(t,r),se(t)}(at);Sa.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["width","height"]));var Qk=["style"],rl=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=Oi(n,Qk);return ae(this,t),e=_e(this,t,[De({type:Z.HTML,style:i},a)]),e.cullable.enable=!1,e}return ye(t,r),se(t,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var n=G.invert(G.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!Ke.isEmpty(i)){var a=new Ke;return a.setFromTransformedAABB(i,n),a}}return this.getBounds()}}])}(at);rl.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var il=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ae(this,t),_e(this,t,[De({type:Z.IMAGE},e)])}return ye(t,r),se(t)}(at);il.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var e_=["style"],ks=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=Oi(n,e_);ae(this,t),e=_e(this,t,[De({type:Z.LINE,style:De({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&Me(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Me(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return ye(t,r),se(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="x1"||n==="y1"||n==="x2"||n==="y2"||n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Me(s)&&(this.markerStartAngle=0,s.remove()),o&&Me(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(s&&Me(s)&&(this.markerEndAngle=0,s.remove()),o&&Me(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=n?a:s;if(!(!f||!Me(f))){var v=0,g,p,m,y,b,_;n?(m=u,y=d,g=c-u,p=h-d,b=o||0,_=this.markerStartAngle):(m=c,y=h,g=u-c,p=d-h,b=l||0,_=this.markerEndAngle),v=Math.atan2(p,g),f.setLocalEulerAngles(v*180/Math.PI+_),f.setLocalPosition(m+Math.cos(v)*b,y+Math.sin(v)*b)}}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,ct.U4)(s,o,l,u,n),d=c.x,h=c.y,f=R.fF(R.Ue(),R.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new At(f[0],f[1])}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var n=this.parsedStyle,i=n.x1,a=n.y1,s=n.x2,o=n.y2;return(0,ct.Xk)(i,a,s,o)}}])}(at);ks.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var t_=["style"],Pr=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=Oi(n,t_);ae(this,t),e=_e(this,t,[De({type:Z.PATH,style:i,initialParsedStyle:{miterLimit:4,d:De({},ig)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Me(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Me(u)&&e.placeMarkerMid(u),l&&Me(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return ye(t,r),se(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Me(s)&&(this.markerStartAngle=0,s.remove()),o&&Me(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Me(s)&&(this.markerEndAngle=0,s.remove()),o&&Me(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=n?a:s;if(!(!u||!Me(u))){var c=0,d,h,f,v,g,p;if(n){var m=this.getStartTangent(),y=Pe(m,2),b=y[0],_=y[1];f=_[0],v=_[1],d=b[0]-_[0],h=b[1]-_[1],g=o||0,p=this.markerStartAngle}else{var w=this.getEndTangent(),x=Pe(w,2),E=x[0],k=x[1];f=k[0],v=k[1],d=E[0]-k[0],h=E[1]-k[1],g=l||0,p=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+p),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),n&&Me(n))for(var a=1;a<i.length-1;a++){var s=Pe(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?n:n.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return pd(this)}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,Fv.r)(a,n),o=s.x,l=s.y,u=R.fF(R.Ue(),R.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new At(u[0],u[1])}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(n*pd(this),i)}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.d.segments,i=[];if(n.length>1){var a=n[0].currentPoint,s=n[1].currentPoint,o=n[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.d.segments,i=n.length,a=[];if(i>1){var s=n[i-2].currentPoint,o=n[i-1].currentPoint,l=n[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(at);Pr.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var n_=["style"],Ta=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=Oi(n,n_);ae(this,t),e=_e(this,t,[De({type:Z.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Me(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Me(u)&&e.placeMarkerMid(u),l&&Me(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return ye(t,r),se(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Me(s)&&(this.markerStartAngle=0,s.remove()),o&&Me(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Me(s)&&(this.markerEndAngle=0,s.remove()),o&&Me(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=n?a:s;if(!(!h||!Me(h)||!d)){var f=0,v,g,p,m,y,b;if(p=d[0][0],m=d[0][1],n)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],y=o||0,b=this.markerStartAngle;else{var _=d.length;this.parsedStyle.isClosed?(v=d[_-1][0]-d[0][0],g=d[_-1][1]-d[0][1]):(p=d[_-1][0],m=d[_-1][1],v=d[_-2][0]-d[_-1][0],g=d[_-2][1]-d[_-1][1]),y=l||0,b=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+b),h.setLocalPosition(p+Math.cos(f)*y,m+Math.sin(f)*y)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],n&&Me(n)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?n:n.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(at);Ta.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var r_=["style"],Rd=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=Oi(e,r_);return ae(this,t),_e(this,t,[De({type:Z.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return ye(t,r),se(t,[{key:"getTotalLength",value:function(){return UE(this)}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(m,y){a[y+1]&&(l=[0,0],l[0]=o/c,u=(0,ct.Xk)(m[0],m[1],a[y+1][0],a[y+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(m,y){n>=m[0]&&n<=m[1]&&(d=(n-m[0])/(m[1]-m[0]),h=y)});var f=(0,ct.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,p=R.fF(R.Ue(),R.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new At(p[0],p[1])}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.points.points,i=[];return i.push([n[1][0],n[1][1]]),i.push([n[0][0],n[0][1]]),i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.points.points,i=n.length-1,a=[];return a.push([n[i-1][0],n[i-1][1]]),a.push([n[i][0],n[i][1]]),a}}])}(Ta);Rd.PARSED_STYLE_LIST=new Set([].concat(Qe(Ta.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Un=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ae(this,t),_e(this,t,[De({type:Z.RECT},e)])}return ye(t,r),se(t)}(at);Un.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var i_=["style"],Aa=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=Oi(e,i_);return ae(this,t),_e(this,t,[De({type:Z.TEXT,style:De({fill:"black"},n)},i)])}return ye(t,r),se(t,[{key:"getComputedTextLength",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(at);Aa.PARSED_STYLE_LIST=new Set([].concat(Qe(at.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var a_=function(){function r(){ae(this,r),this.registry={},this.define(Z.CIRCLE,_a),this.define(Z.ELLIPSE,nl),this.define(Z.RECT,Un),this.define(Z.IMAGE,il),this.define(Z.LINE,ks),this.define(Z.GROUP,Sa),this.define(Z.PATH,Pr),this.define(Z.POLYGON,Ta),this.define(Z.POLYLINE,Rd),this.define(Z.TEXT,Aa),this.define(Z.HTML,rl)}return se(r,[{key:"define",value:function(e,n){this.registry[e]=n}},{key:"get",value:function(e){return this.registry[e]}}])}(),V6={number:function(t){return new ze(t)},percent:function(t){return new ze(t,"%")},px:function(t){return new ze(t,"px")},em:function(t){return new ze(t,"em")},rem:function(t){return new ze(t,"rem")},deg:function(t){return new ze(t,"deg")},grad:function(t){return new ze(t,"grad")},rad:function(t){return new ze(t,"rad")},turn:function(t){return new ze(t,"turn")},s:function(t){return new ze(t,"s")},ms:function(t){return new ze(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,i=t.interpolable,a=t.initialValue,s=t.syntax;U.styleValueRegistry.registerMetadata({n:e,inh:n,int:i,d:a,syntax:s})},registerLayout:function(t,e){U.layoutRegistry.registerLayout(t,e)}},$g=function(r){function t(){var e;ae(this,t),e=_e(this,t),e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new U.AnimationTimeline(e)}catch(i){}var n={};return Ed.forEach(function(i){var a=i.n,s=i.inh,o=i.d;s&&o&&(n[a]=(0,de.Z)(o)?o(Z.GROUP):o)}),e.documentElement=new Sa({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return ye(t,r),se(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(n,i){if(n==="svg")return this.documentElement;var a=this.defaultView.customElements.get(n);a||(console.warn("Unsupported tagName: ",n),a=n==="tspan"?Aa:Sa);var s=new a(i);return s.ownerDocument=this,s}},{key:"createElementNS",value:function(n,i,a){return this.createElement(i,a)}},{key:"cloneNode",value:function(n){throw new Error(Ie)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(n){}}},{key:"elementsFromBBox",value:function(n,i,a,s){var o=this.defaultView.context.rBushRoot,l=o.search({minX:n,minY:i,maxX:a,maxY:s}),u=[];return l.forEach(function(c){var d=c.displayObject,h=d.parsedStyle.pointerEvents,f=h===void 0?"auto":h,v=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(f);(!v||v&&d.isVisible())&&!d.isCulled()&&d.isInteractive()&&u.push(d)}),u.sort(function(c,d){return d.sortable.renderOrder-c.sortable.renderOrder}),u}},{key:"elementFromPointSync",value:function(n,i){var a=this.defaultView.canvas2Viewport({x:n,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,c=l.height;if(s<0||o<0||s>u||o>c)return null;var d=this.defaultView.viewport2Client({x:s,y:o}),h=d.x,f=d.y,v=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:n,y:i,viewportX:s,viewportY:o,clientX:h,clientY:f},picked:[]}),g=v.picked;return g&&g[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var e=td(Ci().mark(function i(a,s){var o,l,u,c,d,h,f,v,g,p,m;return Ci().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,c=this.defaultView.getConfig(),d=c.width,h=c.height,!(l<0||u<0||l>d||u>h)){b.next=4;break}return b.abrupt("return",null);case 4:return f=this.defaultView.viewport2Client({x:l,y:u}),v=f.x,g=f.y,b.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:v,clientY:g},picked:[]});case 7:return p=b.sent,m=p.picked,b.abrupt("return",m&&m[0]||this.documentElement);case 10:case"end":return b.stop()}},i,this)}));function n(i,a){return e.apply(this,arguments)}return n}()},{key:"elementsFromPointSync",value:function(n,i){var a=this.defaultView.canvas2Viewport({x:n,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,c=l.height;if(s<0||o<0||s>u||o>c)return[];var d=this.defaultView.viewport2Client({x:s,y:o}),h=d.x,f=d.y,v=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:n,y:i,viewportX:s,viewportY:o,clientX:h,clientY:f},picked:[]}),g=v.picked;return g[g.length-1]!==this.documentElement&&g.push(this.documentElement),g}},{key:"elementsFromPoint",value:function(){var e=td(Ci().mark(function i(a,s){var o,l,u,c,d,h,f,v,g,p,m;return Ci().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,c=this.defaultView.getConfig(),d=c.width,h=c.height,!(l<0||u<0||l>d||u>h)){b.next=4;break}return b.abrupt("return",[]);case 4:return f=this.defaultView.viewport2Client({x:l,y:u}),v=f.x,g=f.y,b.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:v,clientY:g},picked:[]});case 7:return p=b.sent,m=p.picked,m[m.length-1]!==this.documentElement&&m.push(this.documentElement),b.abrupt("return",m);case 11:case"end":return b.stop()}},i,this)}));function n(i,a){return e.apply(this,arguments)}return n}()},{key:"appendChild",value:function(n,i){throw new Error(ya)}},{key:"insertBefore",value:function(n,i){throw new Error(ya)}},{key:"removeChild",value:function(n,i){throw new Error(ya)}},{key:"replaceChild",value:function(n,i,a){throw new Error(ya)}},{key:"append",value:function(){throw new Error(ya)}},{key:"prepend",value:function(){throw new Error(ya)}},{key:"getElementById",value:function(n){return this.documentElement.getElementById(n)}},{key:"getElementsByName",value:function(n){return this.documentElement.getElementsByName(n)}},{key:"getElementsByTagName",value:function(n){return this.documentElement.getElementsByTagName(n)}},{key:"getElementsByClassName",value:function(n){return this.documentElement.getElementsByClassName(n)}},{key:"querySelector",value:function(n){return this.documentElement.querySelector(n)}},{key:"querySelectorAll",value:function(n){return this.documentElement.querySelectorAll(n)}},{key:"find",value:function(n){return this.documentElement.find(n)}},{key:"findAll",value:function(n){return this.documentElement.findAll(n)}}])}(it),qg=function(){function r(t){ae(this,r),this.strategies=t}return se(r,[{key:"apply",value:function(e){var n=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(n,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Dt(Te.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();qg.tag="Culling";var Jg=function(){function r(){var t=this;ae(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new Jo(null),this.rootWheelEvent=new Cd(null),this.onPointerMove=function(e){var n,i=(n=t.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=t.normalizeToPointerEvent(e,i),s=va(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=t.bootstrapEvent(t.rootPointerEvent,l,i,e);t.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,i=(n=t.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView,a=t.normalizeToPointerEvent(e,i),s=va(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=t.bootstrapEvent(t.rootPointerEvent,l,i,e);t.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}t.setCursor(t.context.eventService.cursor)}}return se(r,[{key:"apply",value:function(e){var n=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=n.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=n.normalizeWheelEvent(s);n.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.normalizeToPointerEvent(s,a);if(n.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=va(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.bootstrapEvent(n.rootPointerEvent,d,a,s);n.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.context.contextService.getDomElement(),l=n.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=n.normalizeToPointerEvent(s,a),d=va(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=n.bootstrapEvent(n.rootPointerEvent,f,a,s);v.type+=u,n.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=n.normalizeToPointerEvent(s,a),l=va(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=n.bootstrapEvent(n.rootPointerEvent,c,a,s);n.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}n.setCursor(n.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,n,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=n.pointerId,e.width=n.width,e.height=n.height,e.isPrimary=n.isPrimary,e.pointerType=n.pointerType,e.pressure=n.pressure,e.tangentialPressure=n.tangentialPressure,e.tiltX=n.tiltX,e.tiltY=n.tiltY,e.twist=n.twist,this.transferMouseData(e,n);var s=this.context.eventService.client2Viewport({x:n.clientX,y:n.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=Zw[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var n=this.rootWheelEvent;this.transferMouseData(n,e),n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;n.viewport.x=a,n.viewport.y=s;var o=this.context.eventService.viewport2Canvas(n.viewport),l=o.x,u=o.y;return n.canvas.x=l,n.canvas.y=u,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.nativeEvent=e,n.type=e.type,n}},{key:"transferMouseData",value:function(e,n){e.isTrusted=n.isTrusted,e.srcElement=n.srcElement,e.timeStamp=_d.now(),e.type=n.type,e.altKey=n.altKey,e.metaKey=n.metaKey,e.shiftKey=n.shiftKey,e.ctrlKey=n.ctrlKey,e.button=n.button,e.buttons=n.buttons,e.client.x=n.clientX,e.client.y=n.clientY,e.movement.x=n.movementX,e.movement.y=n.movementY,e.page.x=n.pageX,e.page.y=n.pageY,e.screen.x=n.screenX,e.screen.y=n.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,n){var i=[];if(n.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ce.Z)(s.button)&&(s.button=0),(0,ce.Z)(s.buttons)&&(s.buttons=1),(0,ce.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ce.Z)(s.width)&&(s.width=s.radiusX||1),(0,ce.Z)(s.height)&&(s.height=s.radiusY||1),(0,ce.Z)(s.tiltX)&&(s.tiltX=0),(0,ce.Z)(s.tiltY)&&(s.tiltY=0),(0,ce.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ce.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ce.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ce.Z)(s.twist)&&(s.twist=0),(0,ce.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(n.isMouseEvent(e)){var o=e;(0,ce.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ce.Z)(o.width)&&(o.width=1),(0,ce.Z)(o.height)&&(o.height=1),(0,ce.Z)(o.tiltX)&&(o.tiltX=0),(0,ce.Z)(o.tiltY)&&(o.tiltY=0),(0,ce.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ce.Z)(o.pointerId)&&(o.pointerId=Ww),(0,ce.Z)(o.pressure)&&(o.pressure=.5),(0,ce.Z)(o.twist)&&(o.twist=0),(0,ce.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();Jg.tag="Event";var s_=[Z.CIRCLE,Z.ELLIPSE,Z.IMAGE,Z.RECT,Z.LINE,Z.POLYLINE,Z.POLYGON,Z.TEXT,Z.PATH,Z.HTML],o_=function(){function r(){ae(this,r)}return se(r,[{key:"isVisible",value:function(e,n){var i,a=n.cullable;if(!a.enable)return!0;var s=n.getRenderBounds();if(Ke.isEmpty(s))return!1;var o=e.getFrustum(),l=(i=n.parentNode)===null||i===void 0||(i=i.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(n,s,l||pa.INDETERMINATE,o.planes),a.visible=a.visibilityPlaneMask!==pa.OUTSIDE,a.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,n,i,a){if(i===pa.OUTSIDE||i===pa.INSIDE)return i;for(var s=pa.INSIDE,o=s_.indexOf(e.nodeName)>-1,l=0,u=a.length;l<u;++l){var c=1<<l;if(i&c&&!(o&&(l===4||l===5))){var d=a[l],h=d.normal,f=d.distance;if(R.AK(h,n.getPositiveFarPoint(a[l]))+f<0)return pa.OUTSIDE;R.AK(h,n.getNegativeFarPoint(a[l]))+f<0&&(s|=c)}}return s}}])}(),Qg=function(){function r(){ae(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return se(r,[{key:"apply",value:function(e){var n=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var p=g.target;p.renderable.dirty=!0,a.dirtify()},c=function(g){n.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var p=g.target;U.enableSizeAttenuation&&U.styleValueRegistry.updateSizeAttenuation(p,l.getCamera().getZoom())},h=function(g){var p=g.target,m=p.rBushNode;m.aabb&&n.rBush.remove(m.aabb),n.syncTasks.delete(p),U.sceneGraphService.dirtifyToRoot(p),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(Te.MOUNTED,d),l.addEventListener(Te.UNMOUNTED,h),l.addEventListener(Te.ATTR_MODIFIED,u),l.addEventListener(Te.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(Te.MOUNTED,d),l.removeEventListener(Te.UNMOUNTED,h),l.removeEventListener(Te.ATTR_MODIFIED,u),l.removeEventListener(Te.BOUNDS_CHANGED,c),n.syncTasks.clear()});var f=(i=U.globalThis.requestIdleCallback)!==null&&i!==void 0?i:Sd.bind(U.globalThis);a.hooks.endFrame.tap(r.tag,function(){n.isFirstTimeRendering?(n.isFirstTimeRendering=!1,n.syncing=!0,f(function(){n.syncRTree(!0),n.isFirstTimeRenderingFinished=!0})):n.syncRTree()})}},{key:"syncNode",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;n&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Ke),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Pe(o,2),u=l[0],c=l[1],d=a.getMax(),h=Pe(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!n&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,n);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();Qg.tag="Prepare";function H6(r){return!!r.document}var un=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),ep=500,l_=.1,u_=1e3,al=new Dt(Te.MOUNTED),sl=new Dt(Te.UNMOUNTED),Ld=new Dt(un.BEFORE_RENDER),tp=new Dt(un.RERENDER),Dd=new Dt(un.AFTER_RENDER),Id=function(r){function t(e){var n;ae(this,t),n=_e(this,t),n.Element=at,n.inited=!1,n.context={},n.document=new $g,n.document.defaultView=n,n.customElements=new a_;var i=e.container,a=e.canvas,s=e.offscreenCanvas,o=e.width,l=e.height,u=e.devicePixelRatio,c=e.renderer,d=e.background,h=e.cursor,f=e.document,v=e.requestAnimationFrame,g=e.cancelAnimationFrame,p=e.createImage,m=e.enableLargeImageOptimization,y=e.supportsPointerEvents,b=e.supportsTouchEvents,_=e.supportsCSSTransform,w=e.cleanUpOnDestroy,x=w===void 0?!0:w,E=e.supportsMutipleCanvasesInOneContainer,k=e.useNativeClickEvent,O=e.alwaysTriggerPointerEventOnCanvas,P=e.isTouchEvent,M=e.isMouseEvent,L=e.dblClickSpeed;E||Iw(i,n,x);var D=o,z=l,F=u;return a&&(F=u||bs&&window.devicePixelRatio||1,F=F>=1?Math.ceil(F):1,D=o||Gw(a)||a.width/F,z=l||jw(a)||a.height/F),s&&(U.offscreenCanvas=s),n.devicePixelRatio=F,n.requestAnimationFrame=v!=null?v:Sd.bind(U.globalThis),n.cancelAnimationFrame=g!=null?g:Fg.bind(U.globalThis),n.supportsTouchEvents=b!=null?b:"ontouchstart"in U.globalThis,n.supportsPointerEvents=y!=null?y:!!U.globalThis.PointerEvent,n.isTouchEvent=P!=null?P:function(C){return n.supportsTouchEvents&&C instanceof U.globalThis.TouchEvent},n.isMouseEvent=M!=null?M:function(C){return!U.globalThis.MouseEvent||C instanceof U.globalThis.MouseEvent&&(!n.supportsPointerEvents||!(C instanceof U.globalThis.PointerEvent))},n.dblClickSpeed=L!=null?L:200,n.initRenderingContext({container:i,canvas:a,width:D,height:z,renderer:c,offscreenCanvas:s,devicePixelRatio:F,cursor:h||"default",background:d||"transparent",createImage:p,enableLargeImageOptimization:m,document:f,supportsCSSTransform:_,useNativeClickEvent:k,cleanUpOnDestroy:x,alwaysTriggerPointerEventOnCanvas:O}),n.initDefaultCamera(D,z,c.clipSpaceNearZ),n.initRenderer(c,!0),n}return ye(t,r),se(t,[{key:"initRenderingContext",value:function(n){this.context.config=n,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(n,i,a){var s=this,o=new U.CameraContribution;o.clipSpaceNearZ=a,o.setType(Fe.EXPLORING,od.DEFAULT).setPosition(n/2,i/2,ep).setFocalPoint(n/2,i/2,0).setOrthographic(n/-2,n/2,i/2,i/-2,l_,u_),o.canvas=this,o.eventEmitter.on(tg.UPDATED,function(){s.context.renderingContext.renderReasons.add(wa.CAMERA_CHANGED),U.enableSizeAttenuation&&s.getConfig().renderer.getConfig().enableSizeAttenuation&&s.updateSizeAttenuation()}),this.context.camera=o}},{key:"updateSizeAttenuation",value:function(){var n=this.getCamera().getZoom();this.document.documentElement.forEach(function(i){U.styleValueRegistry.updateSizeAttenuation(i,n)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var n=this;return this.readyPromise||(this.readyPromise=new Promise(function(i){n.resolveReadyPromise=function(){i(n)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1?arguments[1]:void 0;i===void 0&&(i=this.getConfig().fastCleanExistingCanvas),i||this.dispatchEvent(new Dt(un.BEFORE_DESTROY)),this.frameId&&this.cancelAnimationFrame(this.frameId);var a=this.getRoot();this.unmountChildren(a),n&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),n&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),i||this.dispatchEvent(new Dt(un.AFTER_DESTROY));var s=function(l){l.currentTarget=null,l.manager=null,l.target=null,l.relatedNode=null};s(al),s(sl),s(Ld),s(tp),s(Dd),s(gr),s(Nd),s(Md),s(Kg)}},{key:"changeSize",value:function(n,i){this.resize(n,i)}},{key:"resize",value:function(n,i){var a=this.context.config;a.width=n,a.height=i,this.getContextService().resize(n,i);var s=this.context.camera,o=s.getProjectionMode();s.setPosition(n/2,i/2,ep).setFocalPoint(n/2,i/2,0),o===Sn.ORTHOGRAPHIC?s.setOrthographic(n/-2,n/2,i/2,i/-2,s.getNear(),s.getFar()):s.setAspect(n/i),this.dispatchEvent(new Dt(un.RESIZE,{width:n,height:i}))}},{key:"appendChild",value:function(n,i){return this.document.documentElement.appendChild(n,i)}},{key:"insertBefore",value:function(n,i){return this.document.documentElement.insertBefore(n,i)}},{key:"removeChild",value:function(n){return this.document.documentElement.removeChild(n)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(n){var i=this;n&&(Ld.detail=n,Dd.detail=n),this.dispatchEvent(Ld);var a=this.getRenderingService();a.render(this.getConfig(),n,function(){i.dispatchEvent(tp)}),this.dispatchEvent(Dd)}},{key:"run",value:function(){var n=this,i=function(s,o){n.render(o),n.frameId=n.requestAnimationFrame(i)};i()}},{key:"initRenderer",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!n)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new Ux,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Jg,new Qg,new qg([new o_])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService(De(De({},U),this.context)),this.context.renderingService=new wk(U,this.context),this.context.eventService=new Ek(U,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(n,a,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(n,a)})}},{key:"initRenderingService",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){i.inited=!0,a?s?i.requestAnimationFrame(function(){i.dispatchEvent(new Dt(un.READY))}):i.dispatchEvent(new Dt(un.READY)):i.dispatchEvent(new Dt(un.RENDERER_CHANGED)),i.readyPromise&&i.resolveReadyPromise(),a||i.getRoot().forEach(function(o){var l=o,u=l.renderable;u&&(u.renderBoundsDirty=!0,u.boundsDirty=!0,u.dirty=!0)}),i.mountChildren(i.getRoot()),n.getConfig().enableAutoRendering&&i.run()})}},{key:"loadRendererContainerModule",value:function(n){var i=this,a=n.getPlugins();a.forEach(function(s){s.context=i.context,s.init(U)})}},{key:"setRenderer",value:function(n){var i=this.getConfig();if(i.renderer!==n){var a=i.renderer;i.renderer=n,this.destroy(!1,!0),Qe((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(s){s.destroy(U)}),this.initRenderer(n)}}},{key:"setCursor",value:function(n){var i=this.getConfig();i.cursor=n,this.getContextService().applyCursorStyle(n)}},{key:"unmountChildren",value:function(n){var i=this;n.childNodes.forEach(function(a){i.unmountChildren(a)}),this.inited&&(n.isMutationObserved?n.dispatchEvent(sl):(sl.target=n,this.dispatchEvent(sl,!0)),n!==this.document.documentElement&&(n.ownerDocument=null),n.isConnected=!1),n.isCustomElement&&n.disconnectedCallback&&n.disconnectedCallback()}},{key:"mountChildren",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$o(n);this.inited?n.isConnected||(n.ownerDocument=this.document,n.isConnected=!0,a||(n.isMutationObserved?n.dispatchEvent(al):(al.target=n,this.dispatchEvent(al,!0)))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",n.nodeName),n.childNodes.forEach(function(s){i.mountChildren(s,a)}),n.isCustomElement&&n.connectedCallback&&n.connectedCallback()}},{key:"mountFragment",value:function(n){this.mountChildren(n,!1)}},{key:"client2Viewport",value:function(n){return this.getEventService().client2Viewport(n)}},{key:"viewport2Client",value:function(n){return this.getEventService().viewport2Client(n)}},{key:"viewport2Canvas",value:function(n){return this.getEventService().viewport2Canvas(n)}},{key:"canvas2Viewport",value:function(n){return this.getEventService().canvas2Viewport(n)}},{key:"getPointByClient",value:function(n,i){return this.client2Viewport({x:n,y:i})}},{key:"getClientByPoint",value:function(n,i){return this.viewport2Client({x:n,y:i})}}])}(Zg);function q(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function ti(r){"@babel/helpers - typeof";return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(r)}function c_(r,t){if(ti(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function np(r){var t=c_(r,"string");return ti(t)=="symbol"?t:t+""}function rp(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,np(n.key),n)}}function J(r,t,e){return t&&rp(r.prototype,t),e&&rp(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ca(r){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(r)}function ip(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ip=function(){return!!r})()}function d_(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function h_(r,t){if(t&&(ti(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d_(r)}function Ce(r,t,e){return t=Ca(t),h_(r,ip()?Reflect.construct(t,e||[],Ca(r).constructor):t.apply(r,e))}function Bd(r,t){return Bd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Bd(r,t)}function Oe(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&Bd(r,t)}var f_=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.landmarks=[],e}return Oe(t,r),J(t,[{key:"rotate",value:function(n,i,a){if(this.relElevation=ba(i),this.relAzimuth=ba(n),this.relRoll=ba(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Fe.EXPLORING){var s=K.yY(K.Ue(),[1,0,0],Be((this.rotateWorld?1:-1)*this.relElevation)),o=K.yY(K.Ue(),[0,1,0],Be((this.rotateWorld?1:-1)*this.relAzimuth)),l=K.yY(K.Ue(),[0,0,1],Be(this.relRoll)),u=K.Jp(K.Ue(),o,s);u=K.Jp(K.Ue(),u,l);var c=G.fromQuat(G.create(),u);G.translate(this.matrix,this.matrix,[0,0,-this.distance]),G.multiply(this.matrix,this.matrix,c),G.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===Fe.ORBITING||this.type===Fe.EXPLORING?this._getPosition():this.type===Fe.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(n,i){var a=Ft(n,i,0),s=R.d9(this.position);return R.IH(s,s,R.bA(R.Ue(),this.right,a[0])),R.IH(s,s,R.bA(R.Ue(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(n){var i=this.forward,a=R.d9(this.position),s=n*this.dollyingStep,o=this.distance+n*this.dollyingStep;return s=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,a[0]+=s*i[0],a[1]+=s*i[1],a[2]+=s*i[2],this._setPosition(a),this.type===Fe.ORBITING||this.type===Fe.EXPLORING?this._getDistance():this.type===Fe.TRACKING&&R.IH(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(n){var i,a,s,o,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=l.position,c=u===void 0?this.position:u,d=l.focalPoint,h=d===void 0?this.focalPoint:d,f=l.roll,v=l.zoom,g=new U.CameraContribution;g.setType(this.type,void 0),g.setPosition(c[0],(i=c[1])!==null&&i!==void 0?i:this.position[1],(a=c[2])!==null&&a!==void 0?a:this.position[2]),g.setFocalPoint(h[0],(s=h[1])!==null&&s!==void 0?s:this.focalPoint[1],(o=h[2])!==null&&o!==void 0?o:this.focalPoint[2]),g.setRoll(f!=null?f:this.roll),g.setZoom(v!=null?v:this.zoom);var p={name:n,matrix:G.clone(g.getWorldTransform()),right:R.d9(g.right),up:R.d9(g.up),forward:R.d9(g.forward),position:R.d9(g.getPosition()),focalPoint:R.d9(g.getFocalPoint()),distanceVector:R.d9(g.getDistanceVector()),distance:g.getDistance(),dollyingStep:g.getDollyingStep(),azimuth:g.getAzimuth(),elevation:g.getElevation(),roll:g.getRoll(),relAzimuth:g.relAzimuth,relElevation:g.relElevation,relRoll:g.relRoll,zoom:g.getZoom()};return this.landmarks.push(p),p}},{key:"gotoLandmark",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=(0,Se.Z)(n)?this.landmarks.find(function(M){return M.name===n}):n;if(s){var o=(0,oe.Z)(a)?{duration:a}:a,l=o.easing,u=l===void 0?"linear":l,c=o.duration,d=c===void 0?100:c,h=o.easingFunction,f=h===void 0?void 0:h,v=o.onfinish,g=v===void 0?void 0:v,p=o.onframe,m=p===void 0?void 0:p,y=.01;this.cancelLandmarkAnimation();var b=s.position,_=s.focalPoint,w=s.zoom,x=s.roll,E=f||U.EasingFunction(u),k,O=function(){i.setFocalPoint(_),i.setPosition(b),i.setRoll(x),i.setZoom(w),i.computeMatrix(),i.triggerUpdate(),g==null||g()};if(d===0)return O();var P=function(L){k===void 0&&(k=L);var D=L-k;if(D>=d){O();return}var z=E(D/d),F=R.Ue(),C=R.Ue(),S=1,T=0;R.t7(F,i.focalPoint,_,z),R.t7(C,i.position,b,z),T=i.roll*(1-z)+x*z,S=i.zoom*(1-z)+w*z,i.setFocalPoint(F),i.setPosition(C),i.setRoll(T),i.setZoom(S);var N=R.TK(F,_)+R.TK(C,b);if(N<=y&&w===void 0&&x===void 0)return O();i.computeMatrix(),i.triggerUpdate(),D<d&&(m==null||m(z),i.landmarkAnimationID=i.canvas.requestAnimationFrame(P))};this.canvas.requestAnimationFrame(P)}}}])}(rg);U.CameraContribution=f_;var ap=null,U6=0,sp=new WeakMap,Y6=null,X6=null,ol,Nr;function K6(r,t){return ol=new ap(r,t)}function $6(r){return Nr||(Nr=ap.copy(ol),Nr.oldValue=r,Nr)}function q6(){ol=Nr=void 0}function v_(r){return r===Nr||r===ol}function J6(r,t){return r===t?r:Nr&&v_(r)?Nr:null}function g_(r){r.nodes.forEach(function(t){var e=sp.get(t);e&&e.forEach(function(n){n.observer===r&&n.removeTransientObservers()})})}function Q6(r,t){for(var e=r;e;e=e.parentNode){var n=sp.get(e);if(n)for(var i=0;i<n.length;i++){var a=n[i],s=a.options;if(!(e!==r&&!s.subtree)){var o=t(s);o&&a.enqueue(o)}}}}var Fd=!1,zd=null;function eF(r){zd.push(r),Fd||(Fd=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(Gd):Gd())}function Gd(){Fd=!1;var r=zd;zd=[],r.sort(function(e,n){return e.uid-n.uid});var t=!1;r.forEach(function(e){var n=e.takeRecords();g_(e),n.length&&(e.callback(n,e),t=!0)}),t&&Gd()}function jd(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function p_(r){if(Array.isArray(r))return jd(r)}function m_(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Wd(r,t){if(r){if(typeof r=="string")return jd(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?jd(r,t):void 0}}function y_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jt(r){return p_(r)||m_(r)||Wd(r)||y_()}function b_(r){if(Array.isArray(r))return r}function x_(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function E_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Re(r,t){return b_(r)||x_(r,t)||Wd(r,t)||E_()}var Zd=function(r){function t(e,n,i,a){var s;return q(this,t),s=Ce(this,t,[e]),s.currentTime=i,s.timelineTime=a,s.target=n,s.type="finish",s.bubbles=!1,s.currentTarget=n,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=i,s.timelineTime=a,s}return Oe(t,r),J(t)}(qo),w_=0,k_=function(){function r(t,e){var n;q(this,r),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(w_++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((n=this.effect)===null||n===void 0?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return J(r,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(n,i){e.resolveReadyPromise=function(){n(e)},e.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(n,i){e.resolveFinishedPromise=function(){n(e)},e.rejectFinishedPromise=function(){i(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){if(e=Number(e),!isNaN(e)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var n;this._startTime=Number((n=this.timeline)===null||n===void 0?void 0:n.currentTime)-e/this.playbackRate}this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var n=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),n!==null&&(this.currentTime=n),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var e=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==e&&(n==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):e==="pending"?this.resolveReadyPromise():n==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&n!==e&&(n==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):n==="finished"?this.resolveFinishedPromise():e==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=n,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var n=new Zd(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(n)})}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e,n=(e=this.effect)===null||e===void 0?void 0:e.target;return n.getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),n=e.indexOf(this);n!==-1&&e.splice(n,1)}},{key:"tick",value:function(e,n){!this._idle&&!this._paused&&(this._startTime===null?n&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),n&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(Ie)}},{key:"addEventListener",value:function(e,n,i){throw new Error(Ie)}},{key:"removeEventListener",value:function(e,n,i){throw new Error(Ie)}},{key:"dispatchEvent",value:function(e){throw new Error(Ie)}},{key:"commitStyles",value:function(){throw new Error(Ie)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var e;this._inEffect=!!((e=this.effect)!==null&&e!==void 0&&e.update(-1))}else{var n;this._inEffect=!!((n=this.effect)!==null&&n!==void 0&&n.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,n){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!n&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var n=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new Zd(null,this,this.currentTime,e);setTimeout(function(){n.onfinish&&n.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new Zd(null,this,this.currentTime,e);this.onframe(a)}this._finishedFlag=!1}}}])}(),__=4,S_=.001,T_=1e-7,A_=10,_s=11,ll=1/(_s-1),C_=typeof Float32Array=="function",op=function(t,e){return 1-3*e+3*t},lp=function(t,e){return 3*e-6*t},up=function(t){return 3*t},ul=function(t,e,n){return((op(e,n)*t+lp(e,n))*t+up(e))*t},cp=function(t,e,n){return 3*op(e,n)*t*t+2*lp(e,n)*t+up(e)},O_=function(t,e,n,i,a){var s,o,l=0;do o=e+(n-e)/2,s=ul(o,i,a)-t,s>0?n=o:e=o;while(Math.abs(s)>T_&&++l<A_);return o},P_=function(t,e,n,i){for(var a=0;a<__;++a){var s=cp(e,n,i);if(s===0)return e;var o=ul(e,n,i)-t;e-=o/s}return e},Vd=function(t,e,n,i){if(!(t>=0&&t<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===i)return function(l){return l};for(var a=C_?new Float32Array(_s):new Array(_s),s=0;s<_s;++s)a[s]=ul(s*ll,t,n);var o=function(u){for(var c=0,d=1,h=_s-1;d!==h&&a[d]<=u;++d)c+=ll;--d;var f=(u-a[d])/(a[d+1]-a[d]),v=c+f*ll,g=cp(v,t,n);return g>=S_?P_(u,v,t,n):g===0?v:O_(u,c,c+ll,t,n)};return function(l){return l===0||l===1?l:ul(o(l),e,i)}},N_=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},cl=function(t){return Math.pow(t,2)},dl=function(t){return Math.pow(t,3)},hl=function(t){return Math.pow(t,4)},fl=function(t){return Math.pow(t,5)},vl=function(t){return Math.pow(t,6)},gl=function(t){return 1-Math.cos(t*Math.PI/2)},pl=function(t){return 1-Math.sqrt(1-t*t)},ml=function(t){return t*t*(3*t-2)},yl=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((e*3-2)/22-t,2)},bl=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=Re(e,2),i=n[0],a=i===void 0?1:i,s=n[1],o=s===void 0?.5:s,l=(0,Ne.Z)(Number(a),1,10),u=(0,Ne.Z)(Number(o),.1,2);return t===0||t===1?t:-l*Math.pow(2,10*(t-1))*Math.sin((t-1-u/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/u)},Ss=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=Re(e,4),a=i[0],s=a===void 0?1:a,o=i[1],l=o===void 0?100:o,u=i[2],c=u===void 0?10:u,d=i[3],h=d===void 0?0:d;s=(0,Ne.Z)(s,.1,1e3),l=(0,Ne.Z)(l,.1,1e3),c=(0,Ne.Z)(c,.1,1e3),h=(0,Ne.Z)(h,.1,1e3);var f=Math.sqrt(l/s),v=c/(2*Math.sqrt(l*s)),g=v<1?f*Math.sqrt(1-v*v):0,p=1,m=v<1?(v*f+-h)/g:-h+f,y=n?n*t/1e3:t;return v<1?y=Math.exp(-y*v*f)*(p*Math.cos(g*y)+m*Math.sin(g*y)):y=(p+m*y)*Math.exp(-y*f),t===0||t===1?t:1-y},Hd=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e,i=Re(n,2),a=i[0],s=a===void 0?10:a,o=i[1],l=o==="start"?Math.ceil:Math.floor;return l((0,Ne.Z)(t,0,1)*s)/s},dp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=Re(e,4),i=n[0],a=n[1],s=n[2],o=n[3];return Vd(i,a,s,o)(t)},xl=Vd(.42,0,1,1),An=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-t(1-e,n,i)}},Cn=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?t(e*2,n,i)/2:1-t(e*-2+2,n,i)/2}},On=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?(1-t(1-e*2,n,i))/2:(t(e*2-1,n,i)+1)/2}},hp={steps:Hd,"step-start":function(t){return Hd(t,[1,"start"])},"step-end":function(t){return Hd(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":dp,ease:function(t){return dp(t,[.25,.1,.25,1])},in:xl,out:An(xl),"in-out":Cn(xl),"out-in":On(xl),"in-quad":cl,"out-quad":An(cl),"in-out-quad":Cn(cl),"out-in-quad":On(cl),"in-cubic":dl,"out-cubic":An(dl),"in-out-cubic":Cn(dl),"out-in-cubic":On(dl),"in-quart":hl,"out-quart":An(hl),"in-out-quart":Cn(hl),"out-in-quart":On(hl),"in-quint":fl,"out-quint":An(fl),"in-out-quint":Cn(fl),"out-in-quint":On(fl),"in-expo":vl,"out-expo":An(vl),"in-out-expo":Cn(vl),"out-in-expo":On(vl),"in-sine":gl,"out-sine":An(gl),"in-out-sine":Cn(gl),"out-in-sine":On(gl),"in-circ":pl,"out-circ":An(pl),"in-out-circ":Cn(pl),"out-in-circ":On(pl),"in-back":ml,"out-back":An(ml),"in-out-back":Cn(ml),"out-in-back":On(ml),"in-bounce":yl,"out-bounce":An(yl),"in-out-bounce":Cn(yl),"out-in-bounce":On(yl),"in-elastic":bl,"out-elastic":An(bl),"in-out-elastic":Cn(bl),"out-in-elastic":On(bl),spring:Ss,"spring-in":Ss,"spring-out":An(Ss),"spring-in-out":Cn(Ss),"spring-out-in":On(Ss)},M_=function(t){return N_(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},R_=function(t){return hp[M_(t)]||hp.linear},L_=function(t){return t},D_=1,I_=.5,fp=0;function vp(r,t){return function(e){if(e>=1)return 1;var n=1/r;return e+=t*n,e-e%n}}var El="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",B_=new RegExp("cubic-bezier\\(".concat(El,",").concat(El,",").concat(El,",").concat(El,"\\)")),F_=/steps\(\s*(\d+)\s*\)/,z_=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Ud(r){var t=B_.exec(r);if(t)return Vd.apply(void 0,jt(t.slice(1).map(Number)));var e=F_.exec(r);if(e)return vp(Number(e[1]),fp);var n=z_.exec(r);return n?vp(Number(n[1]),{start:D_,middle:I_,end:fp}[n[2]]):R_(r)}function G_(r){return Math.abs(j_(r)/(r.playbackRate||1))}function j_(r){var t;return r.duration===0||r.iterations===0?0:(r.duration==="auto"?0:Number(r.duration))*((t=r.iterations)!==null&&t!==void 0?t:1)}var gp=0,Yd=1,wl=2,pp=3;function W_(r,t,e){if(t===null)return gp;var n=e.endTime;return t<Math.min(e.delay,n)?Yd:t>=Math.min(e.delay+r+e.endDelay,n)?wl:pp}function Z_(r,t,e,n,i){switch(n){case Yd:return t==="backwards"||t==="both"?0:null;case pp:return e-i;case wl:return t==="forwards"||t==="both"?r:null;case gp:return null}}function V_(r,t,e,n,i){var a=i;return r===0?t!==Yd&&(a+=e):a+=n/r,a}function H_(r,t,e,n,i,a){var s=r===1/0?t%1:r%1;return s===0&&e===wl&&n!==0&&(i!==0||a===0)&&(s=1),s}function U_(r,t,e,n){return r===wl&&t===1/0?1/0:e===1?Math.floor(n)-1:Math.floor(n)}function Y_(r,t,e){var n=r;if(r!=="normal"&&r!=="reverse"){var i=t;r==="alternate-reverse"&&(i+=1),n="normal",i!==1/0&&i%2!==0&&(n="reverse")}return n==="normal"?e:1-e}function X_(r,t,e){var n=W_(r,t,e),i=Z_(r,e.fill,t,n,e.delay);if(i===null)return null;var a=e.duration==="auto"?0:e.duration,s=V_(a,n,e.iterations,i,e.iterationStart),o=H_(s,e.iterationStart,n,e.iterations,i,a),l=U_(n,e.iterations,o,s),u=Y_(e.direction,l,o);return e.currentIteration=l,e.progress=u,e.easingFunction(u)}function K_(r,t,e){var n=$_(r,t),i=q_(n,e);return function(a,s){if(s!==null)i.filter(function(l){return s>=l.applyFrom&&s<l.applyTo}).forEach(function(l){var u=s-l.startOffset,c=l.endOffset-l.startOffset,d=c===0?0:u/c;a.setAttribute(l.property,l.interpolation(d),!1,!1)});else for(var o in n)mp(o)&&a.setAttribute(o,null)}}function mp(r){return r!=="offset"&&r!=="easing"&&r!=="composite"&&r!=="computedOffset"}function $_(r,t){for(var e={},n=0;n<r.length;n++)for(var i in r[n])if(mp(i)){var a={offset:r[n].offset,computedOffset:r[n].computedOffset,easing:r[n].easing,easingFunction:Ud(r[n].easing)||t.easingFunction,value:r[n][i]};e[i]=e[i]||[],e[i].push(a)}return e}function q_(r,t){var e=[];for(var n in r)for(var i=r[n],a=0;a<i.length-1;a++){var s=a,o=a+1,l=i[s].computedOffset,u=i[o].computedOffset,c=l,d=u;a===0&&(c=-1/0,u===0&&(o=s)),a===i.length-2&&(d=1/0,l===1&&(s=o)),e.push({applyFrom:c,applyTo:d,startOffset:i[s].computedOffset,endOffset:i[o].computedOffset,easingFunction:i[s].easingFunction,property:n,interpolation:J_(n,i[s].value,i[o].value,t)})}return e.sort(function(h,f){return h.startOffset-f.startOffset}),e}var yp=function(t,e,n){return function(i){var a=bp(t,e,i);return(0,oe.Z)(a)?a:n(a)}};function J_(r,t,e,n){var i=Og[r];if(i&&i.syntax&&i.int){var a=U.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var s=a.parser,o=s?s(t,n):t,l=s?s(e,n):e,u=a.mixer(o,l,n);if(u){var c=yp.apply(void 0,jt(u));return function(d){return d===0?t:d===1?e:c(d)}}}}return yp(!1,!0,function(d){return d?e:t})}function bp(r,t,e){if(typeof r=="number"&&typeof t=="number")return r*(1-e)+t*e;if(typeof r=="boolean"&&typeof t=="boolean"||typeof r=="string"&&typeof t=="string")return e<.5?r:t;if(Array.isArray(r)&&Array.isArray(t)){for(var n=r.length,i=t.length,a=Math.max(n,i),s=[],o=0;o<a;o++)s.push(bp(r[o<n?o:n-1],t[o<i?o:i-1],e));return s}throw new Error("Mismatched interpolation arguments ".concat(r,":").concat(t))}var Q_=function(){function r(){q(this,r),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=L_,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return J(r,[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=Ud(e),this._easing=e}}])}();function eS(r){var t=[];for(var e in r)if(!(e in["easing","offset","composite"])){var n=r[e];Array.isArray(n)||(n=[n]);for(var i=n.length,a=0;a<i;a++){if(!t[a]){var s={};"offset"in r&&(s.offset=Number(r.offset)),"easing"in r&&(s.easing=r.easing),"composite"in r&&(s.composite=r.composite),t[a]=s}n[a]!==void 0&&n[a]!==null&&(t[a][e]=n[a])}}return t.sort(function(o,l){return(o.computedOffset||0)-(l.computedOffset||0)}),t}function xp(r,t){if(r===null)return[];Array.isArray(r)||(r=eS(r));for(var e=r.map(function(l){var u={};t!=null&&t.composite&&(u.composite="auto");for(var c in l){var d=l[c];if(c==="offset"){if(d!==null){if(d=Number(d),!isFinite(d))throw new Error("Keyframe offsets must be numbers.");if(d<0||d>1)throw new Error("Keyframe offsets must be between 0 and 1.");u.computedOffset=d}}else if(c==="composite"&&["replace","add","accumulate","auto"].indexOf(d)===-1)throw new Error("".concat(d," compositing is not supported"));u[c]=d}return u.offset===void 0&&(u.offset=null),u.easing===void 0&&(u.easing=(t==null?void 0:t.easing)||"linear"),u.composite===void 0&&(u.composite="auto"),u}),n=!0,i=-1/0,a=0;a<e.length;a++){var s=e[a].offset;if((0,ue.Z)(s))n=!1;else{if(s<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=s}}e=e.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function o(){var l,u=e,c=u.length;if(e[c-1].computedOffset=Number((l=e[c-1].offset)!==null&&l!==void 0?l:1),c>1){var d;e[0].computedOffset=Number((d=e[0].offset)!==null&&d!==void 0?d:0)}for(var h=0,f=Number(e[0].computedOffset),v=1;v<c;v++){var g=e[v].computedOffset;if(!(0,ue.Z)(g)&&!(0,ue.Z)(f)){for(var p=1;p<v-h;p++)e[h+p].computedOffset=f+(Number(g)-f)*p/(v-h);h=v,f=Number(g)}}}return n||o(),e}var tS="backwards|forwards|both|none".split("|"),nS="reverse|alternate|alternate-reverse".split("|");function rS(r,t){var e=new Q_;return t&&(e.fill="both",e.duration="auto"),typeof r=="number"&&!isNaN(r)?e.duration=r:r!==void 0&&Object.keys(r).forEach(function(n){if(r[n]!==void 0&&r[n]!==null&&r[n]!=="auto"){if((typeof e[n]=="number"||n==="duration")&&(typeof r[n]!="number"||isNaN(r[n]))||n==="fill"&&tS.indexOf(r[n])===-1||n==="direction"&&nS.indexOf(r[n])===-1)return;e[n]=r[n]}}),e}function iS(r,t){var e;return r=aS((e=r)!==null&&e!==void 0?e:{duration:"auto"}),rS(r,t)}function aS(r){return typeof r=="number"&&(isNaN(r)?r={duration:"auto"}:r={duration:r}),r}var sS=function(){function r(t,e,n){var i=this;q(this,r),this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=iS(n,!1),this.timing.effect=this,this.timing.activeDuration=G_(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=xp(e,this.timing),this.interpolations=K_(this.normalizedKeyframes,this.timing,this.target);var a=U.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,l){return l==="duration"?o.duration==="auto"?0:o.duration:l==="fill"?o.fill==="auto"?"none":o.fill:l==="localTime"?i.animation&&i.animation.currentTime||null:l==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:l==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[l]},set:function(){return!0}}):this.timing}return J(r,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return e===null?!1:(this.timeFraction=X_(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=xp(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var n=this;Object.keys(e||{}).forEach(function(i){n.timing[i]=e[i]})}}])}();function Ep(r,t){return Number(r.id)-Number(t.id)}var oS=function(){function r(t){var e=this;q(this,r),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(n){e.currentTime=n,e.discardAnimations(),e.animations.length===0?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(n){var i=e.rafCallbacks;e.rafCallbacks=[],n<Number(e.currentTime)&&(n=Number(e.currentTime)),e.animations.sort(Ep),e.animations=e.tick(n,!0,e.animations)[0],i.forEach(function(a){a[1](n)}),e.applyPendingEffects()},this.document=t}return J(r,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,n,i){var a=new sS(e,n,i),s=new k_(a,this);return this.animations.push(s),this.restartWebAnimationsNextTick(),s.updatePromises(),s.play(),s.updatePromises(),s}},{key:"applyDirtiedAnimation",value:function(e){var n=this;if(!this.inTick){e.markTarget();var i=e.targetAnimations();i.sort(Ep);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(s){var o=n.animations.indexOf(s);o!==-1&&n.animations.splice(o,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var n=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([n,e]),n}},{key:"requestAnimationFrame",value:function(e){var n=this;return this.rAF(function(i){n.updateAnimationsPromises(),e(i),n.updateAnimationsPromises()})}},{key:"tick",value:function(e,n,i){var a=this,s,o;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var l=[],u=[],c=[],d=[];return i.forEach(function(h){h.tick(e,n),h._inEffect?(u.push(h.effect),h.markTarget()):(l.push(h.effect),h.unmarkTarget()),h._needsTick&&(a.ticking=!0);var f=h._inEffect||h._needsTick;h._inTimeline=f,f?c.push(h):d.push(h)}),(s=this.pendingEffects).push.apply(s,l),(o=this.pendingEffects).push.apply(o,u),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[c,d]}}])}();U.EasingFunction=Ud,U.AnimationTimeline=oS;var kl=Y(83914),gt=Y(30335);const lS={duration:500},uS={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},tF={CHANGE:"change"};var tt;(function(r){r.NodeAdded="NodeAdded",r.NodeUpdated="NodeUpdated",r.NodeRemoved="NodeRemoved",r.EdgeAdded="EdgeAdded",r.EdgeUpdated="EdgeUpdated",r.EdgeRemoved="EdgeRemoved",r.ComboAdded="ComboAdded",r.ComboUpdated="ComboUpdated",r.ComboRemoved="ComboRemoved"})(tt||(tt={}));var Qt;(function(r){r.DRAW="draw",r.COLLAPSE="collapse",r.EXPAND="expand",r.TRANSFORM="transform"})(Qt||(Qt={}));var Mr;(function(r){r.CLICK="canvas:click",r.DBLCLICK="canvas:dblclick",r.POINTER_OVER="canvas:pointerover",r.POINTER_LEAVE="canvas:pointerleave",r.POINTER_ENTER="canvas:pointerenter",r.POINTER_MOVE="canvas:pointermove",r.POINTER_OUT="canvas:pointerout",r.POINTER_DOWN="canvas:pointerdown",r.POINTER_UP="canvas:pointerup",r.CONTEXT_MENU="canvas:contextmenu",r.DRAG_START="canvas:dragstart",r.DRAG="canvas:drag",r.DRAG_END="canvas:dragend",r.DRAG_ENTER="canvas:dragenter",r.DRAG_OVER="canvas:dragover",r.DRAG_LEAVE="canvas:dragleave",r.DROP="canvas:drop",r.WHEEL="canvas:wheel"})(Mr||(Mr={}));var Ii;(function(r){r.CLICK="combo:click",r.DBLCLICK="combo:dblclick",r.POINTER_OVER="combo:pointerover",r.POINTER_LEAVE="combo:pointerleave",r.POINTER_ENTER="combo:pointerenter",r.POINTER_MOVE="combo:pointermove",r.POINTER_OUT="combo:pointerout",r.POINTER_DOWN="combo:pointerdown",r.POINTER_UP="combo:pointerup",r.CONTEXT_MENU="combo:contextmenu",r.DRAG_START="combo:dragstart",r.DRAG="combo:drag",r.DRAG_END="combo:dragend",r.DRAG_ENTER="combo:dragenter",r.DRAG_OVER="combo:dragover",r.DRAG_LEAVE="combo:dragleave",r.DROP="combo:drop"})(Ii||(Ii={}));var V;(function(r){r.CLICK="click",r.DBLCLICK="dblclick",r.POINTER_OVER="pointerover",r.POINTER_LEAVE="pointerleave",r.POINTER_ENTER="pointerenter",r.POINTER_MOVE="pointermove",r.POINTER_OUT="pointerout",r.POINTER_DOWN="pointerdown",r.POINTER_UP="pointerup",r.CONTEXT_MENU="contextmenu",r.DRAG_START="dragstart",r.DRAG="drag",r.DRAG_END="dragend",r.DRAG_ENTER="dragenter",r.DRAG_OVER="dragover",r.DRAG_LEAVE="dragleave",r.DROP="drop",r.KEY_DOWN="keydown",r.KEY_UP="keyup",r.WHEEL="wheel"})(V||(V={}));var Oa;(function(r){r.KEY_DOWN="keydown",r.KEY_UP="keyup"})(Oa||(Oa={}));var _l;(function(r){r.CLICK="edge:click",r.DBLCLICK="edge:dblclick",r.POINTER_OVER="edge:pointerover",r.POINTER_LEAVE="edge:pointerleave",r.POINTER_ENTER="edge:pointerenter",r.POINTER_MOVE="edge:pointermove",r.POINTER_OUT="edge:pointerout",r.POINTER_DOWN="edge:pointerdown",r.POINTER_UP="edge:pointerup",r.CONTEXT_MENU="edge:contextmenu",r.DRAG_ENTER="edge:dragenter",r.DRAG_OVER="edge:dragover",r.DRAG_LEAVE="edge:dragleave",r.DROP="edge:drop"})(_l||(_l={}));var Q;(function(r){r.BEFORE_CANVAS_INIT="beforecanvasinit",r.AFTER_CANVAS_INIT="aftercanvasinit",r.BEFORE_SIZE_CHANGE="beforesizechange",r.AFTER_SIZE_CHANGE="aftersizechange",r.BEFORE_ELEMENT_CREATE="beforeelementcreate",r.AFTER_ELEMENT_CREATE="afterelementcreate",r.BEFORE_ELEMENT_UPDATE="beforeelementupdate",r.AFTER_ELEMENT_UPDATE="afterelementupdate",r.BEFORE_ELEMENT_DESTROY="beforeelementdestroy",r.AFTER_ELEMENT_DESTROY="afterelementdestroy",r.BEFORE_ELEMENT_TRANSLATE="beforeelementtranslate",r.AFTER_ELEMENT_TRANSLATE="afterelementtranslate",r.BEFORE_DRAW="beforedraw",r.AFTER_DRAW="afterdraw",r.BEFORE_RENDER="beforerender",r.AFTER_RENDER="afterrender",r.BEFORE_ANIMATE="beforeanimate",r.AFTER_ANIMATE="afteranimate",r.BEFORE_LAYOUT="beforelayout",r.AFTER_LAYOUT="afterlayout",r.BEFORE_STAGE_LAYOUT="beforestagelayout",r.AFTER_STAGE_LAYOUT="afterstagelayout",r.BEFORE_TRANSFORM="beforetransform",r.AFTER_TRANSFORM="aftertransform",r.BATCH_START="batchstart",r.BATCH_END="batchend",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.BEFORE_RENDERER_CHANGE="beforerendererchange",r.AFTER_RENDERER_CHANGE="afterrendererchange"})(Q||(Q={}));var ni;(function(r){r.UNDO="undo",r.REDO="redo",r.CANCEL="cancel",r.ADD="add",r.CLEAR="clear",r.CHANGE="change"})(ni||(ni={}));var Pn;(function(r){r.CLICK="node:click",r.DBLCLICK="node:dblclick",r.POINTER_OVER="node:pointerover",r.POINTER_LEAVE="node:pointerleave",r.POINTER_ENTER="node:pointerenter",r.POINTER_MOVE="node:pointermove",r.POINTER_OUT="node:pointerout",r.POINTER_DOWN="node:pointerdown",r.POINTER_UP="node:pointerup",r.CONTEXT_MENU="node:contextmenu",r.DRAG_START="node:dragstart",r.DRAG="node:drag",r.DRAG_END="node:dragend",r.DRAG_ENTER="node:dragenter",r.DRAG_OVER="node:dragover",r.DRAG_LEAVE="node:dragleave",r.DROP="node:drop"})(Pn||(Pn={}));const Ve="combo",Nn="tree";var Ts;(function(r){r.NODE="node",r.EDGE="edge",r.COMBO="combo",r.THEME="theme",r.PALETTE="palette",r.LAYOUT="layout",r.BEHAVIOR="behavior",r.PLUGIN="plugin",r.ANIMATION="animation",r.TRANSFORM="transform",r.SHAPE="shape"})(Ts||(Ts={}));const Xd={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function Rr(r,t){var e;const n=(e=Xd[r])===null||e===void 0?void 0:e[t];if(n)return n}function nF(r){return EXTENSION_REGISTRY[r]}const cS="5.0.32",dS="G6";function Lr(r){return`[${dS} v${cS}] ${r}`}const en={mute:!1,debug:r=>{!en.mute&&console.debug(Lr(r))},info:r=>{!en.mute&&console.info(Lr(r))},warn:r=>{!en.mute&&console.warn(Lr(r))},error:r=>{!en.mute&&console.error(Lr(r))}};function wp(r){const{theme:t}=r;if(!t)return{};const e=Rr(Ts.THEME,t);return e||(en.warn(`The theme of ${t} is not registered.`),{})}function Kd(r,t){if(Array.isArray(r)&&r.length===0)return null;const e=Array.isArray(r)?r[0]:r,n=Array.isArray(r)?r.slice(1):t||[];return new Proxy(e,{get(i,a){return typeof i[a]=="function"&&!["onframe","onfinish"].includes(a)?(...s)=>{i[a](...s),n.forEach(o=>{var l;return(l=o[a])===null||l===void 0?void 0:l.call(o,...s)})}:a==="finished"?Promise.all([e.finished,...n.map(s=>s.finished)]):Reflect.get(i,a)},set(i,a,s){return["onframe","onfinish"].includes(a)||n.forEach(o=>{o[a]=s}),Reflect.set(i,a,s)}})}function $d(r){const t=r.reduce((n,i)=>(Object.entries(i).forEach(([a,s])=>{n[a]===void 0?n[a]=[s]:n[a].push(s)}),n),{});Object.entries(t).forEach(([n,i])=>{(i.length!==r.length||i.some(a=>(0,ue.Z)(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(n)&&(0,gt.Z)(a,i[0])))&&delete t[n]});const e=Object.entries(t).reduce((n,[i,a])=>(a.forEach((s,o)=>{n[o]?n[o][i]=s:n[o]={[i]:s}}),n),[]);return r.length!==0&&e.length===0&&e.push({_:0},{_:0}),e}function As(r){switch(r){case"opacity":return 1;case"x":case"y":case"z":case"zIndex":return 0;case"visibility":return"visible";case"collapsed":return!1;case"states":return[];default:return}}function kp(r,t){const{animation:e}=r;if(e===!1||t===!1)return!1;const n=Object.assign({},lS);return(0,yt.Z)(e)&&Object.assign(n,e),(0,yt.Z)(t)&&Object.assign(n,t),n}function hS(r){if(typeof r=="string"){const t=Rr(Ts.ANIMATION,r);return t||(en.warn(`The animation of ${r} is not registered.`),[])}return r}function fS(r,t,e,n){var i,a;const{animation:s}=r,o=(i=r==null?void 0:r[t])===null||i===void 0?void 0:i.animation;if(o===!1)return[];const l=o==null?void 0:o[e];if(l===!1)return[];if(s===!1||n===!1)return[];const u=(a=wp(r)[t])===null||a===void 0?void 0:a.animation,c=(h=[])=>hS(h).map(f=>Object.assign(Object.assign(Object.assign(Object.assign({},uS),(0,yt.Z)(s)&&s),f),(0,yt.Z)(n)&&n));if(l)return c(l);if(!u)return[];const d=u[e];return d===!1?[]:c(d)}function _p(r,t,e,n){if(Array.isArray(n)){let a=!1;const s=[];for(let o=0;o<n.length;o++){const l=n[o];if(l[0]==="translate"){if(l[1]===r&&l[2]===t)return null;a=!0,s.push(["translate",r,t])}else if(l[0]==="translate3d"){if(l[1]===r&&l[2]===t&&l[3]===e)return null;a=!0,s.push(["translate3d",r,t,e])}else s.push(l)}return a||s.splice(0,0,e===0?["translate",r,t]:["translate3d",r,t,e]),s}const i=n?n.replace(/translate(3d)?\([^)]*\)/g,""):"";return e===0?`translate(${r}, ${t})${i}`:`translate3d(${r}, ${t}, ${e})${i}`}var vS=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const gS=(r,t,e)=>{if(!e.length)return null;const[n,i]=t,a=u=>{var c;if(u){const d=r.getShape(u);if(!d)return null;const h=`get${(0,kl.Z)(u)}Style`,f=((c=r==null?void 0:r[h])===null||c===void 0?void 0:c.bind(r))||(p=>p),v=(f==null?void 0:f(n))||{},g=(f==null?void 0:f(i))||{};return{shape:d,fromStyle:v,toStyle:g}}else return{shape:r,fromStyle:n,toStyle:i}};let s;const o=e.map(u=>{var{fields:c,shape:d,states:h}=u,f=vS(u,["fields","shape","states"]);const v=a(d);if(!v)return null;const{shape:g,fromStyle:p,toStyle:m}=v,y=[{},{}];if(c.forEach(_=>{var w,x;Object.assign(y[0],{[_]:(w=p[_])!==null&&w!==void 0?w:As(_)}),Object.assign(y[1],{[_]:(x=m[_])!==null&&x!==void 0?x:As(_)})}),y.some(_=>Object.keys(_).some(w=>["x","y","z"].includes(w)))){const{x:_=0,y:w=0,z:x=0,transform:E=""}=g.attributes||{};y.forEach(k=>{k.transform=_p(k.x||_,k.y||w,k.z||x,E)})}const b=g.animate($d(y),f);return d===void 0&&(s=b),b}).filter(Boolean),l=s||(o==null?void 0:o[0]);return l?Kd(l,o.filter(u=>u!==u)):null},pS=[{fields:["opacity"]}],mS=[{fields:["x","y"]}],Sp=[{fields:["x","y"]}],yS=Sp,Tp=[{fields:["sourceNode","targetNode"]}],bS=Tp,Ap=[{fields:["childrenNode","x","y"]}],xS=Ap,rF=[{fields:["childrenNode","x","y"]}];var Sl=Y(73584),Cp=Y(99711),Pa=Y(83207);function ES(r){return"source"in r&&"target"in r}function wS(r){return r.length===2}function iF(r){return r.length===3}function Na(r){return r instanceof Float32Array?!0:Array.isArray(r)&&(r.length===2||r.length===3)?r.every(t=>typeof t=="number"):!1}function pr(r,t,e){return r>=t&&r<=e}function mr(r=0){if(Array.isArray(r)){const[t=0,e=t,n=t,i=e]=r;return[t,e,n,i]}return[r,r,r,r]}function kS(r=0){const t=mr(r);return t[0]+t[2]}function aF(r=0){const t=mr(r);return t[1]+t[3]}function yr(r){return r.max[0]-r.min[0]}function br(r){return r.max[1]-r.min[1]}function ri(r){return[yr(r),br(r)]}function ii(r,t){const e=Na(r)?qd(r):r.getShape("key").getBounds();return t?ai(e,t):e}function qd(r){const[t,e,n=0]=r,i=new Ke;return i.setMinMax([t,e,n],[t,e,n]),i}function ai(r,t){const[e,n,i,a]=mr(t),[s,o,l]=r.min,[u,c,d]=r.max,h=new Ke;return h.setMinMax([s-a,o-e,l],[u+n,c+i,d]),h}function Cs(r){if(r.length===0)return new Ke;if(r.length===1)return r[0];const t=new Ke;t.setMinMax(r[0].min,r[0].max);for(let e=1;e<r.length;e++){const n=r[e];t.setMinMax([Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1]),Math.min(t.min[2],n.min[2])],[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1]),Math.max(t.max[2],n.max[2])])}return t}function _S(r,t){const[e,n]=r.min,[i,a]=r.max,[s,o]=t.min,[l,u]=t.max;return e>=s&&i<=l&&n>=o&&a<=u}function Yn(r,t){return pr(r[0],t.min[0],t.max[0])&&pr(r[1],t.min[1],t.max[1])}function Op(r,t,e=!1){const{min:[n,i],max:[a,s]}=t,o=(r[1]===i||r[1]===s)&&(e||pr(r[0],n,a)),l=(r[0]===n||r[0]===a)&&(e||pr(r[1],i,s));return o||l}function SS(r,t){return!Yn(r,t)}function Tl(r,t){const{center:e}=t;return r[0]===e[0]&&r[1]===e[1]}function Os(r,t){const[e,n]=r,[i,a]=t.min,[s,o]=t.max,l=e-i,u=s-e,c=n-a,d=o-n,h=Math.min(l,u,c,d);return h===l?"left":h===u?"right":h===c?"top":h===d?"bottom":"left"}function Bi(r,t){const e=(0,Pa.Z)(r);if(Yn(r,t))switch(Os(r,t)){case"left":e[0]=t.min[0];break;case"right":e[0]=t.max[0];break;case"top":e[1]=t.min[1];break;case"bottom":e[1]=t.max[1];break}else{const[n,i]=r,[a,s]=t.min,[o,l]=t.max;e[0]=pr(n,a,o)?n:n<a?a:o,e[1]=pr(i,s,l)?i:i<s?s:l}return e}function TS(r,t){const{center:e}=r,[n,i]=ri(r),a=t==="up"||t==="down"?e[0]:t==="right"?e[0]-n/6:e[0]+n/6,s=t==="left"||t==="right"?e[1]:t==="down"?e[1]-i/6:e[1]+i/6;return[a,s]}function AS(r,t){let[e,n]=ri(r);return[e,n]=t==="up"||t==="down"?[e,n]:[n,e],(Math.pow(n,2)-Math.pow(Math.sqrt(Math.pow(e/2,2)+Math.pow(n,2))-e/2,2))/(2*n)}function CS(r){const{min:[t,e],max:[n,i]}=r,a=[t,i],s=[n,i],o=[n,e],l=[t,e];return[[a,s],[s,o],[o,l],[l,a]]}var Jd=Y(73686);function j(r){if(r.id!==void 0)return r.id;if(r.source!==void 0&&r.target!==void 0)return`${r.source}-${r.target}`;throw new Error(Lr("The datum does not have available id."))}function Al(r){return r.combo}function Pp(r,t){const e={nodes:(r.nodes||[]).map(j),edges:(r.edges||[]).map(j),combos:(r.combos||[]).map(j)};return t?Object.values(e).flat():e}const Np=(r,t,e)=>{var n;switch(e.type){case"degree":{const i=new Map;return(n=r.nodes)===null||n===void 0||n.forEach(a=>{const s=t(j(a),e.direction).length;i.set(j(a),s)}),i}case"betweenness":return OS(r,e.directed,e.weightPropertyName);case"closeness":return PS(r,e.directed,e.weightPropertyName);case"eigenvector":return MS(r,e.directed);case"pagerank":return NS(r,e.epsilon,e.linkProb);default:return Mp(r)}},Mp=r=>{var t;const e=new Map;return(t=r.nodes)===null||t===void 0||t.forEach(n=>{e.set(j(n),0)}),e},OS=(r,t,e)=>{const n=Mp(r),{nodes:i=[]}=r;return i.forEach(a=>{i.forEach(s=>{if(a!==s){const{allPath:o}=(0,Jd.ni)(r,j(a),j(s),t,e),l=o.length;o.flat().forEach(u=>{u!==j(a)&&u!==j(s)&&n.set(u,n.get(u)+1/l)})}})}),n},PS=(r,t,e)=>{const n=new Map,{nodes:i=[]}=r;return i.forEach(a=>{const s=i.reduce((o,l)=>{if(a!==l){const{length:u}=(0,Jd.ni)(r,j(a),j(l),t,e);o+=u}return o},0);n.set(j(a),1/s)}),n},NS=(r,t,e)=>{var n;const i=new Map,a=(0,Jd.EF)(r,t,e);return(n=r.nodes)===null||n===void 0||n.forEach(s=>{i.set(j(s),a[j(s)])}),i},MS=(r,t)=>{const{nodes:e=[]}=r,n=RS(r,t),i=LS(n,e.length),a=new Map;return e.forEach((s,o)=>{a.set(j(s),i[o])}),a},RS=(r,t)=>{const{nodes:e=[],edges:n=[]}=r,i=Array(e.length).fill(null).map(()=>Array(e.length).fill(0));return n.forEach(({source:a,target:s})=>{const o=e.findIndex(u=>j(u)===a),l=e.findIndex(u=>j(u)===s);t?i[o][l]=1:(i[o][l]=1,i[l][o]=1)}),i},LS=(r,t,e=100,n=1e-6)=>{let i=Array(t).fill(1),a=1/0;for(let s=0;s<e&&a>n;s++){const o=Array(t).fill(0);for(let u=0;u<t;u++)for(let c=0;c<t;c++)o[u]+=r[u][c]*i[c];const l=Math.sqrt(o.reduce((u,c)=>u+c*c,0));for(let u=0;u<t;u++)o[u]/=l;a=Math.sqrt(o.reduce((u,c,d)=>u+(c-i[d])*c,0)),i=o}return i};function si(r,t,e,n=gt.Z){const i=new Map(r.map(h=>[e(h),h])),a=new Map(t.map(h=>[e(h),h])),s=new Set(i.keys()),o=new Set(a.keys()),l=[],u=[],c=[],d=[];return o.forEach(h=>{s.has(h)?n(i.get(h),a.get(h))?d.push(a.get(h)):u.push(a.get(h)):l.push(a.get(h))}),s.forEach(h=>{o.has(h)||c.push(i.get(h))}),{enter:l,exit:c,keep:d,update:u}}const Ps=new WeakMap;function Fi(r,t,e=!1,n){if(t===void 0)return;const i=(a,s=t)=>{const o=(l=s)=>a.childNodes.forEach(u=>i(u,l));if(n&&!n(a))return o();if(!e&&a===r)r.style.visibility=t,Ps.delete(r),o(t);else{Ps.has(a)||Ps.set(a,a.style.visibility);const l=s==="hidden"||DS(a)==="hidden"?"hidden":"visible";a.style.visibility=l,o(l)}};i(r)}function DS(r){return Ps.has(r)?Ps.get(r):r.style.visibility}function IS(r,t,e){const n={},i=a=>(a in n||(n[a]=0),`${t}-${a}-${n[a]++}`);return e.map(a=>typeof a=="string"?{type:a,key:i(a)}:typeof a=="function"?a.call(r):a.key?a:Object.assign(Object.assign({},a),{key:i(a.type)}))}class Qd{constructor(t){this.extensions=[],this.extensionMap={},this.context=t}setExtensions(t){const e=IS(this.context.graph,this.category,t),{enter:n,update:i,exit:a,keep:s}=si(this.extensions,e,o=>o.key);this.createExtensions(n),this.updateExtensions([...i,...s]),this.destroyExtensions(a),this.extensions=e}createExtension(t){const{category:e}=this,{key:n,type:i}=t,a=Rr(e,i);if(!a)return en.warn(`The extension ${i} of ${e} is not registered.`);const s=new a(this.context,t);this.extensionMap[n]=s}createExtensions(t){t.forEach(e=>this.createExtension(e))}updateExtension(t){const{key:e}=t,n=this.extensionMap[e];n&&n.update(t)}updateExtensions(t){t.forEach(e=>this.updateExtension(e))}destroyExtension(t){const e=this.extensionMap[t];e&&(e.destroy(),delete this.extensionMap[t])}destroyExtensions(t){t.forEach(({key:e})=>this.destroyExtension(e))}destroy(){Object.values(this.extensionMap).forEach(t=>t.destroy()),this.context={},this.extensions=[],this.extensionMap={}}}class eh{constructor(t,e){this.events=[],this.destroyed=!1,this.context=t,this.options=e}update(t){this.options=Object.assign(this.options,t)}destroy(){this.context={},this.options={},this.destroyed=!0}}class cn extends eh{}class Cl extends cn{constructor(t,e){super(t,Object.assign({},Cl.defaultOptions,e)),this.isOverlapping=(n,i)=>i.some(a=>n.intersects(a)),this.occupiedBounds=[],this.detectLabelCollision=n=>{const i=this.context.viewport,a={show:[],hide:[]};return this.occupiedBounds=[],n.forEach(s=>{const o=s.getShape("label").getRenderBounds();i.isInViewport(o,!0)&&!this.isOverlapping(o,this.occupiedBounds)?(a.show.push(s),this.occupiedBounds.push(ai(o,this.options.padding))):a.hide.push(s)}),a},this.hideLabelIfExceedViewport=(n,i)=>{const{exit:a}=si(n,i,s=>s.id);a==null||a.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(n,i)=>{const{model:a}=this.context,s=a.getData(),o=a.getRelatedEdgesData.bind(a);return n.map(u=>(this.nodeCentralities.has(u.id)||(this.nodeCentralities=Np(s,o,i)),{node:u,centrality:this.nodeCentralities.get(u.id)})).sort((u,c)=>c.centrality-u.centrality).map(u=>u.node)},this.sortLabelElementsInView=n=>{const{sort:i,sortNode:a,sortCombo:s,sortEdge:o}=this.options,{model:l}=this.context;if((0,de.Z)(i))return n.sort((g,p)=>i(l.getElementDataById(g.id),l.getElementDataById(p.id)));const{node:u=[],edge:c=[],combo:d=[]}=(0,Sl.Z)(n,g=>g.type),h=(0,de.Z)(s)?d.sort((g,p)=>s(...l.getComboData([g.id,p.id]))):d,f=(0,de.Z)(a)?u.sort((g,p)=>a(...l.getNodeData([g.id,p.id]))):this.sortNodesByCentrality(u,a),v=(0,de.Z)(o)?c.sort((g,p)=>o(...l.getEdgeData([g.id,p.id]))):c;return[...h,...f,...v]},this.labelElementsInView=[],this.isFirstRender=!0,this.onToggleVisibility=n=>{var i;if(((i=n.data)===null||i===void 0?void 0:i.stage)==="zIndex")return;if(!this.validate(n)){this.hiddenElements.size>0&&(this.hiddenElements.forEach(this.showLabel),this.hiddenElements.clear());return}const a=this.isFirstRender?this.getLabelElements():this.getLabelElementsInView();this.hideLabelIfExceedViewport(this.labelElementsInView,a),this.labelElementsInView=a;const s=this.sortLabelElementsInView(this.labelElementsInView),{show:o,hide:l}=this.detectLabelCollision(s);for(let u=o.length-1;u>=0;u--)this.showLabel(o[u]);l.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=n=>{const i=n.getShape("label");i&&Fi(i,"hidden"),this.hiddenElements.set(n.id,n)},this.showLabel=n=>{const i=n.getShape("label");i&&Fi(i,"visible"),n.toFront(),this.hiddenElements.delete(n.id)},this.onTransform=(0,Cp.Z)(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.enableToggle=!0,this.toggle=n=>{this.enableToggle&&this.onToggleVisibility(n)},this.onBeforeRender=()=>{this.enableToggle=!1},this.onAfterRender=n=>{this.onToggleVisibility(n),this.enableToggle=!0},this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents(),this.onToggleVisibility({})}getLabelElements(){const{elementMap:t}=this.context.element,e=[];for(const n in t){const i=t[n];i.isVisible()&&i.getShape("label")&&e.push(i)}return e}getLabelElementsInView(){const t=this.context.viewport;return this.getLabelElements().filter(e=>t.isInViewport(e.getShape("key").getRenderBounds()))}bindEvents(){const{graph:t}=this.context;t.on(Q.BEFORE_RENDER,this.onBeforeRender),t.on(Q.AFTER_RENDER,this.onAfterRender),t.on(Q.AFTER_DRAW,this.toggle),t.on(Q.AFTER_LAYOUT,this.toggle),t.on(Q.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Q.BEFORE_RENDER,this.onBeforeRender),t.off(Q.AFTER_RENDER,this.onAfterRender),t.off(Q.AFTER_DRAW,this.toggle),t.off(Q.AFTER_LAYOUT,this.toggle),t.off(Q.AFTER_TRANSFORM,this.onTransform)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Cl.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var dn=Y(83787);const Rp=[0,0,0];function Ee(r,t){return r.map((e,n)=>e+t[n])}function He(r,t){return r.map((e,n)=>e-t[n])}function Dr(r,t){return typeof t=="number"?r.map(e=>e*t):r.map((e,n)=>e*t[n])}function Xn(r,t){return typeof t=="number"?r.map(e=>e/t):r.map((e,n)=>e/t[n])}function BS(r,t){return r.reduce((e,n,i)=>e+n*t[i],0)}function FS(r,t){const e=Ns(r),n=Ns(t);return[e[1]*n[2]-e[2]*n[1],e[2]*n[0]-e[0]*n[2],e[0]*n[1]-e[1]*n[0]]}function oi(r,t){return r.map(e=>e*t)}function qe(r,t){return Math.sqrt(r.reduce((e,n,i)=>e+Math.pow(n-t[i]||0,2),0))}function Ol(r,t){return r.reduce((e,n,i)=>e+Math.abs(n-t[i]),0)}function Ir(r){const t=r.reduce((e,n)=>e+Math.pow(n,2),0);return r.map(e=>e/Math.sqrt(t))}function th(r,t,e=!1){const n=r[0]*t[1]-r[1]*t[0];let i=Math.acos(Dr(r,t).reduce((a,s)=>a+s,0)/(qe(r,Rp)*qe(t,Rp)));return e&&n<0&&(i=2*Math.PI-i),i}function sF(r,t){return r.every((e,n)=>e===t[n])}function Pl(r,t=!0){return t?[-r[1],r[0]]:[r[1],-r[0]]}function zS(r,t){return r.map(e=>e%t)}function zi(r){return[r[0],r[1]]}function Ns(r){return wS(r)?[r[0],r[1],0]:r}function Lp(r){const[t,e]=r;return!t&&!e?0:Math.atan2(e,t)}function Dp(r,t){const[e,n]=r,[i,a]=t,s=He(e,n),o=He(i,a);return FS(s,o).every(l=>l===0)}function nh(r,t,e=!1){if(Dp(r,t))return;const[n,i]=r,[a,s]=t,o=((n[0]-a[0])*(a[1]-s[1])-(n[1]-a[1])*(a[0]-s[0]))/((n[0]-i[0])*(a[1]-s[1])-(n[1]-i[1])*(a[0]-s[0])),l=s[0]-a[0]?(n[0]-a[0]+o*(i[0]-n[0]))/(s[0]-a[0]):(n[1]-a[1]+o*(i[1]-n[1]))/(s[1]-a[1]);if(!(!e&&(!pr(o,0,1)||!pr(l,0,1))))return[n[0]+o*(i[0]-n[0]),n[1]+o*(i[1]-n[1])]}function Ip(r){if(Array.isArray(r))return pr(r[0],0,1)&&pr(r[1],0,1)?r:[.5,.5];const t=r.split("-"),e=t.includes("left")?0:t.includes("right")?1:.5,n=t.includes("top")?0:t.includes("bottom")?1:.5;return[e,n]}function Ct(r){const{x:t=0,y:e=0,z:n=0}=r.style||{};return[+t,+e,+n]}function GS(r){const{x:t,y:e,z:n}=r.style||{};return t!==void 0||e!==void 0||n!==void 0}function Bp(r,t){const[e,n]=t,{min:i,max:a}=r;return[i[0]+e*(a[0]-i[0]),i[1]+n*(a[1]-i[1])]}function Br(r,t="center"){const e=Ip(t);return Bp(r,e)}function oF(r,t){const e=parseAnchor(t);return Bp(r,e)}const lF=r=>{const[t,e]=r;return{left:Math.min(t[0],e[0]),right:Math.max(t[0],e[0]),top:Math.min(t[1],e[1]),bottom:Math.max(t[1],e[1])}};function Ot(r){var t;return[r.x,r.y,(t=r.z)!==null&&t!==void 0?t:0]}function Kn(r){var t;return{x:r[0],y:r[1],z:(t=r[2])!==null&&t!==void 0?t:0}}function uF(r){return r.sort((t,e)=>t[0]-e[0]||t[1]-e[1])}function cF(r){const t=new Set;return r.filter(e=>{const n=e.join(",");return t.has(n)?!1:(t.add(n),!0)})}function Ms(r,t=0){return r.map(e=>parseFloat(e.toFixed(t)))}function li(r,t,e,n=!1){if((0,gt.Z)(r,t))return r;const i=n?He(r,t):He(t,r),a=Ir(i),s=[a[0]*e,a[1]*e];return Ee(zi(r),s)}function Fp(r,t){return r[1]===t[1]}function jS(r,t){return r[0]===t[0]}function WS(r,t){return Fp(r,t)||jS(r,t)}function ZS(r,t,e){return Dp([r,t],[t,e])}function zp(r,t){return[2*t[0]-r[0],2*t[1]-r[1]]}function Gp(r,t,e,n=!0,i=!1){for(let a=0;a<e.length;a++){let s=e[a],o=e[(a+1)%e.length];n&&(s=Ee(t,s),o=Ee(t,o));const l=i?zp(r,t):r,u=nh([t,l],[s,o]);if(u)return{point:u,line:[s,o]}}return{point:t,line:void 0}}function VS(r,t,e,n){const i=r[0],a=r[1];let s=!1;e===void 0&&(e=0),n===void 0&&(n=t.length);const o=n-e;for(let l=0,u=o-1;l<o;u=l++){const c=t[l+e][0],d=t[l+e][1],h=t[u+e][0],f=t[u+e][1];d>a!=f>a&&i<(h-c)*(a-d)/(f-d)+c&&(s=!s)}return s}function HS(r,t,e=!1){const n=Br(t,"center"),i=[Br(t,"left-top"),Br(t,"right-top"),Br(t,"right-bottom"),Br(t,"left-bottom")];return Gp(r,n,i,!1,e).point}function Nl(r,t,e=!1){const n=t.center,i=e?zp(r,n):r,a=He(i,t.center),s=Math.atan2(a[1],a[0]);if(isNaN(s))return n;const o=yr(t)/2,l=br(t)/2,u=n[0]+o*Math.cos(s),c=n[1]+l*Math.sin(s);return[u,c]}function US(r,t){let e=1/0,n=[r[0],t[0]];return r.forEach(i=>{t.forEach(a=>{const s=qe(i,a);s<e&&(e=s,n=[i,a])})}),n}function YS(r,t){let e=1/0,n=[[0,0],[0,0]];return t.forEach(i=>{const a=XS(r,i);a<e&&(e=a,n=i)}),n}function XS(r,t){const e=jp(r,t);return qe(r,e)}function jp(r,t){const[e,n]=t[0],[i,a]=t[1],[s,o]=r,l=i-e,u=a-n;if(l===0&&u===0)return[e,n];let c=((s-e)*l+(o-n)*u)/(l*l+u*u);c>1?c=1:c<0&&(c=0);const d=e+c*l,h=n+c*u;return[d,h]}function KS(r){const t=r.reduce((e,n)=>Ee(e,n),[0,0]);return Xn(t,r.length)}function Wp(r,t=!0){const e=KS(r);return r.sort(([n,i],[a,s])=>{const o=Math.atan2(i-e[1],n-e[0]),l=Math.atan2(s-e[1],a-e[0]);return t?l-o:o-l})}function Zp(r,t){return[r,[r[0],t[1]],t,[t[0],r[1]]]}const Vp=r=>r.map(t=>(0,Se.Z)(t)?t.toLocaleLowerCase():t);class Ma{constructor(t){this.map=new Map,this.recordKey=new Set,this.onKeyDown=e=>{e!=null&&e.key&&(this.recordKey.add(e.key),this.trigger(e))},this.onKeyUp=e=>{e!=null&&e.key&&this.recordKey.delete(e.key)},this.onWheel=e=>{this.triggerExtendKey(V.WHEEL,e)},this.onDrag=e=>{this.triggerExtendKey(V.DRAG,e)},this.onFocus=()=>{this.recordKey.clear()},this.emitter=t,this.bindEvents()}bind(t,e){t.length!==0&&this.map.set(t,e)}unbind(t,e){this.map.forEach((n,i)=>{(0,gt.Z)(i,t)&&(!e||e===n)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(t){const e=Vp(Array.from(this.recordKey)).sort(),n=Vp(t).sort();return(0,gt.Z)(e,n)}bindEvents(){var t;const{emitter:e}=this;e.on(V.KEY_DOWN,this.onKeyDown),e.on(V.KEY_UP,this.onKeyUp),e.on(V.WHEEL,this.onWheel),e.on(V.DRAG,this.onDrag),(t=globalThis.addEventListener)===null||t===void 0||t.call(globalThis,"focus",this.onFocus)}trigger(t){this.map.forEach((e,n)=>{this.match(n)&&e(t)})}triggerExtendKey(t,e){this.map.forEach((n,i)=>{i.includes(t)&&(0,gt.Z)(Array.from(this.recordKey),i.filter(a=>a!==t))&&n(e)})}destroy(){var t;this.unbindAll(),this.emitter.off(V.KEY_DOWN,this.onKeyDown),this.emitter.off(V.KEY_UP,this.onKeyUp),this.emitter.off(V.WHEEL,this.onWheel),this.emitter.off(V.DRAG,this.onDrag),(t=globalThis.removeEventListener)===null||t===void 0||t.call(globalThis,"blur",this.onFocus)}}class Rs extends cn{constructor(t,e){super(t,(0,dn.Z)({},Rs.defaultOptions,e)),this.shortcut=new Ma(t.graph),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.clearStates=this.clearStates.bind(this),this.bindEvents()}onPointerDown(t){if(!this.validate(t)||!this.isKeydown()||this.startPoint)return;const{canvas:e,graph:n}=this.context,i=Object.assign({},this.options.style);this.options.style.lineWidth&&(i.lineWidth=+this.options.style.lineWidth/n.getZoom()),this.rectShape=new Un({id:"g6-brush-select",style:i}),e.appendChild(this.rectShape),this.startPoint=[t.canvas.x,t.canvas.y]}onPointerMove(t){var e;if(!this.startPoint)return;const{immediately:n,mode:i}=this.options;this.endPoint=Ml(t),(e=this.rectShape)===null||e===void 0||e.attr({x:Math.min(this.endPoint[0],this.startPoint[0]),y:Math.min(this.endPoint[1],this.startPoint[1]),width:Math.abs(this.endPoint[0]-this.startPoint[0]),height:Math.abs(this.endPoint[1]-this.startPoint[1])}),n&&i==="default"&&this.updateElementsStates(Zp(this.startPoint,this.endPoint))}onPointerUp(t){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=Ml(t),this.updateElementsStates(Zp(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:t}=this.context,e=Object.values(t.getData()).reduce((n,i)=>Object.assign({},n,i.reduce((a,s)=>(a[j(s)]=[],a),{})),{});t.setElementState(e,this.options.animation)}updateElementsStates(t){const{graph:e}=this.context,{enableElements:n,state:i,mode:a,onSelect:s}=this.options,o=this.selector(e,t,n);let l={};switch(a){case"union":o.forEach(u=>{l[u]=[...e.getElementState(u),i]});break;case"diff":o.forEach(u=>{const c=e.getElementState(u);l[u]=c.includes(i)?c.filter(d=>d!==i):[...c,i]});break;case"intersect":o.forEach(u=>{const c=e.getElementState(u);l[u]=c.includes(i)?[i]:[]});break;case"default":default:o.forEach(u=>{l[u]=[i]});break}(0,de.Z)(s)&&(l=s(l)),e.setElementState(l,this.options.animation)}selector(t,e,n){if(!n||n.length===0)return[];const i=[],a=t.getData();if(n.forEach(s=>{a[`${s}s`].forEach(o=>{const l=j(o);t.getElementVisibility(l)!=="hidden"&&VS(t.getElementPosition(l),e)&&i.push(l)})}),n.includes("edge")){const s=a.edges;s==null||s.forEach(o=>{const{source:l,target:u}=o;i.includes(l)&&i.includes(u)&&i.push(j(o))})}return i}clearBrush(){var t;(t=this.rectShape)===null||t===void 0||t.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:t}=this.options,e=Array.isArray(t)?t:[t];return this.shortcut.match(e.filter(n=>n!=="drag"))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}bindEvents(){const{graph:t}=this.context;t.on(V.POINTER_DOWN,this.onPointerDown),t.on(V.POINTER_MOVE,this.onPointerMove),t.on(V.POINTER_UP,this.onPointerUp),t.on(Mr.CLICK,this.clearStates)}unbindEvents(){const{graph:t}=this.context;t.off(V.POINTER_DOWN,this.onPointerDown),t.off(V.POINTER_MOVE,this.onPointerMove),t.off(V.POINTER_UP,this.onPointerUp),t.off(Mr.CLICK,this.clearStates)}update(t){this.unbindEvents(),this.options=(0,dn.Z)(this.options,t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Rs.defaultOptions={animation:!1,enable:!0,enableElements:["node","combo","edge"],immediately:!1,mode:"default",state:"selected",trigger:["shift"],style:{width:0,height:0,lineWidth:1,fill:"#1677FF",stroke:"#1677FF",fillOpacity:.1,zIndex:2,pointerEvents:"none"}};const Ml=r=>[r.canvas.x,r.canvas.y],Fr=.8,Gi=["node","edge","combo"];function ji(r,t,e,n,i=0){n==="TB"&&t(r,i);const a=e(r);if(a)for(const s of a)ji(s,t,e,n,i+1);n==="BT"&&t(r,i)}function $S(r,t,e){const n=[[r,0]];for(;n.length;){const[i,a]=n.shift();t(i,a);const s=e(i);if(s)for(const o of s)n.push([o,a+1])}}function Hp(r,t,e,n,i="both"){if(t==="combo"||t==="node")return rh(r,e,n,i);const a=r.getEdgeData(e);if(!a)return[];const s=rh(r,a.source,n-1,i),o=rh(r,a.target,n-1,i);return Array.from(new Set([...s,...o,e]))}function rh(r,t,e,n="both"){const i=new Set,a=new Set,s=new Set;return $S(t,(o,l)=>{l>e||(s.add(o),r.getRelatedEdgesData(o,n).forEach(u=>{const c=j(u);!a.has(c)&&l<e&&(s.add(c),a.add(c))}))},o=>r.getRelatedEdgesData(o,n).map(l=>l.source===o?l.target:l.source).filter(l=>i.has(l)?!1:(i.add(l),!0))),Array.from(s)}function ih(r){return r.states||[]}var Rl=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class Ll extends cn{constructor(t,e){super(t,Object.assign({},Ll.defaultOptions,e)),this.onClickSelect=n=>Rl(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.updateState(n),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.onClickCanvas=n=>Rl(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.clearState(),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.shortcut=new Ma(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Gi.forEach(e=>{t.on(`${e}:${V.CLICK}`,this.onClickSelect)}),t.on(Mr.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:t,trigger:e}=this.options;return t&&this.shortcut.match(e)}getNeighborIds(t){const{target:e,targetType:n}=t,{graph:i}=this.context,{degree:a}=this.options;return Hp(i,n,e.id,typeof a=="function"?a(t):a).filter(s=>s!==e.id)}updateState(t){return Rl(this,void 0,void 0,function*(){const{state:e,unselectedState:n,neighborState:i,animation:a}=this.options;if(!e&&!i&&!n)return;const{target:s}=t,{graph:o}=this.context,l=o.getElementData(s.id),u=ih(l).includes(e)?"unselect":"select",c={},d=this.isMultipleSelect,h=[s.id],f=this.getNeighborIds(t);if(d)if(Object.assign(c,this.getDataStates()),u==="select"){const v=(g,p)=>{g.forEach(m=>{const y=new Set(o.getElementState(m));y.add(p),y.delete(n),c[m]=Array.from(y)})};v(h,e),v(f,i),n&&Object.keys(c).forEach(g=>{const p=c[g];!p.includes(e)&&!p.includes(i)&&!p.includes(n)&&c[g].push(n)})}else{const v=c[s.id];c[s.id]=v.filter(g=>g!==e&&g!==i),v.includes(n)||c[s.id].push(n),f.forEach(g=>{c[g]=c[g].filter(p=>p!==i),c[g].includes(e)||c[g].push(n)})}else if(u==="select"){Object.assign(c,this.getClearStates(!!n));const v=(g,p)=>{g.forEach(m=>{c[m]||(c[m]=o.getElementState(m)),c[m].push(p)})};v(h,e),v(f,i),n&&Object.keys(c).forEach(g=>{!h.includes(g)&&!f.includes(g)&&c[g].push(n)})}else Object.assign(c,this.getClearStates());yield o.setElementState(c,a)})}getDataStates(){const{graph:t}=this.context,{nodes:e,edges:n,combos:i}=t.getData(),a={};return[...e,...n,...i].forEach(s=>{a[j(s)]=ih(s)}),a}getClearStates(t=!1){const{graph:e}=this.context,{state:n,unselectedState:i,neighborState:a}=this.options,s=new Set([n,i,a]),{nodes:o,edges:l,combos:u}=e.getData(),c={};return[...o,...l,...u].forEach(d=>{const h=ih(d),f=h.filter(v=>!s.has(v));(t||f.length!==h.length)&&(c[j(d)]=f)}),c}clearState(){return Rl(this,void 0,void 0,function*(){const{graph:t}=this.context;yield t.setElementState(this.getClearStates(),this.options.animation)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Gi.forEach(e=>{t.off(`${e}:${V.CLICK}`,this.onClickSelect)}),t.off(Mr.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}Ll.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function hn(r){var t;return!!(!((t=r.style)===null||t===void 0)&&t.collapsed)}var Wt=Y(53032),Ls=Y(17829),qS=Y(73576);function Ds(r,t){if(!r.startsWith(t))return!1;const e=r[t.length];return e>="A"&&e<="Z"}function Up(r,t){return`${t}${(0,kl.Z)(r)}`}function Yp(r,t,e=!0){if(!t||!Ds(r,t))return r;const n=r.slice(t.length);return e?(0,qS.Z)(n):n}function bt(r,t){const e=Object.entries(r).reduce((n,[i,a])=>(i==="className"||i==="class"||Ds(i,t)&&Object.assign(n,{[Yp(i,t)]:a}),n),{});if("opacity"in r){const n=Up("opacity",t),i=r.opacity;if(n in r){const a=r[n];Object.assign(e,{opacity:i*a})}else Object.assign(e,{opacity:i})}return e}function ah(r,t){const e=t.length;return Object.keys(r).reduce((n,i)=>{if(i.startsWith(t)){const a=i.slice(e);n[a]=r[i]}return n},{})}function sh(r,t){const e=typeof t=="string"?[t]:t,n={};return Object.keys(r).forEach(i=>{e.find(a=>i.startsWith(a))||(n[i]=r[i])}),n}function dF(r,t,e){return Object.entries(r).reduce((n,[i,a])=>(Ds(i,t)?n[Up(Yp(i,t,!1),e)]=a:n[i]=a,n),{})}function Mn(r=0){if(typeof r=="number")return[r,r,r];const[t,e=t,n=t]=r;return[t,e,n]}var JS=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Xp(r,t){const{datum:e,graph:n}=t;return typeof r=="function"?r.call(n,e):Object.fromEntries(Object.entries(r).map(([i,a])=>typeof a=="function"?[i,a.call(n,e)]:[i,a]))}function kt(r,t){const e=(r==null?void 0:r.style)||{},n=(t==null?void 0:t.style)||{};return Object.assign({},r,t,{style:r!=null&&r.style?Object.assign({},e,n):n})}function QS(r){const{x:t,y:e,z:n,class:i,className:a,transform:s,transformOrigin:o,zIndex:l,visibility:u}=r;return JS(r,["x","y","z","class","className","transform","transformOrigin","zIndex","visibility"])}const oh=new WeakMap;function $n(r,t,e){oh.has(r)||oh.set(r,{});const n=oh.get(r);if(!n[t])return n[t]=e,!0;const i=n[t];return Kp(i,e)?!1:(n[t]=e,!0)}const Kp=(r,t,e=2)=>{if(typeof r!="object"||typeof t!="object")return r===t;const n=Object.keys(r),i=Object.keys(t);if(n.length!==i.length)return!1;for(const a of n){const s=r[a],o=t[a];if(e>1&&typeof s=="object"&&typeof o=="object"){if(!Kp(s,o,e-1))return!1}else if(s!==o)return!1}return!0};function eT(r,t){const e=Mn(r);let n={};return t.text&&!t.fontSize&&(n={fontSize:Math.min(...e)*.5}),t.src&&(!t.width||!t.height)&&(n={width:e[0]*.5,height:e[1]*.5}),n}function $p(r){if(r)return typeof r=="string"||typeof r=="function"||Array.isArray(r)?{type:"group",field:t=>t.id,color:r,invert:!1}:r}function tT(r,t){if(!t)return{};const{type:e,color:n,field:i,invert:a}=t,s=l=>{const u=typeof n=="string"?Rr("palette",n):n;if(typeof u=="function"){const c={};return l.forEach(([d,h])=>{c[d]=u(a?1-h:h)}),c}else if(Array.isArray(u)){const c=a?[...u].reverse():u,d={};return l.forEach(([h,f])=>{d[h]=c[f%u.length]}),d}return{}},o=(l,u)=>{var c;return typeof l=="string"?(c=u.data)===null||c===void 0?void 0:c[l]:l==null?void 0:l(u)};if(e==="group"){const l=(0,Sl.Z)(r,h=>{if(!i)return"default";const f=o(i,h);return f?String(f):"default"}),u=Object.keys(l),c=s(u.map((h,f)=>[h,f])),d={};return Object.entries(l).forEach(([h,f])=>{f.forEach(v=>{d[j(v)]=c[h]})}),d}else if(e==="value"){const[l,u]=r.reduce(([d,h],f)=>{const v=o(i,f);if(typeof v!="number")throw new Error(Lr(`Palette field ${i} is not a number`));return[Math.min(d,v),Math.max(h,v)]},[1/0,-1/0]),c=u-l;return s(r.map(d=>[d.id,(o(i,d)-l)/c]))}}function qp(r){const t=typeof r=="string"?Rr("palette",r):r;if(typeof t!="function")return t}function Jp(r,t){let e=2*r;return typeof t=="string"?e=r*Number(t.replace("%",""))/100:typeof t=="number"&&(e=t),isNaN(e)&&(e=2*r),e}function Qp(r,t,e=1,n=!1){const i=n?e:1,a=(r.max[0]-r.min[0])*i;return Jp(a,t)}function nT(r,t,e=1){const n=qe(r[0],r[1])*e;return Jp(n,t)}var xr=Y(95904);class Is extends Jk{constructor(t){super(t),this.shapeMap={},this.animateMap={},this.transformPosition(this.attributes),this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(t,e,n,i,a){var s,o,l,u,c,d,h,f;const v=this.shapeMap[t];if(n===!1){v&&((s=a==null?void 0:a.beforeDestroy)===null||s===void 0||s.call(a,v),i.removeChild(v),delete this.shapeMap[t],(o=a==null?void 0:a.afterDestroy)===null||o===void 0||o.call(a,v));return}const g=typeof e=="string"?Rr(Ts.SHAPE,e):e;if(!g)throw new Error(Lr(`Shape ${e} not found`));if(!v||v.destroyed||!(v instanceof g)){v&&((l=a==null?void 0:a.beforeDestroy)===null||l===void 0||l.call(a,v),v==null||v.destroy(),(u=a==null?void 0:a.afterDestroy)===null||u===void 0||u.call(a,v)),(c=a==null?void 0:a.beforeCreate)===null||c===void 0||c.call(a);const p=new g({className:t,style:n});return i.appendChild(p),this.shapeMap[t]=p,(d=a==null?void 0:a.afterCreate)===null||d===void 0||d.call(a,p),p}return(h=a==null?void 0:a.beforeUpdate)===null||h===void 0||h.call(a,v),Ih(v,n),(f=a==null?void 0:a.afterUpdate)===null||f===void 0||f.call(a,v),v}transformPosition(t){if("x"in t||"y"in t||"z"in t){const{x:e=0,y:n=0,z:i=0,transform:a}=t,s=_p(+e,+n,+i,a);s&&(this.style.transform=s)}}update(t={}){const e=Object.assign({},this.attributes,t);this.attr(e),this.render(e,this),this.transformPosition(e),this.setVisibility()}bindEvents(){}getGraphicStyle(t){return QS(t)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(t,e){if(t.length===0)return null;const n=[];if(t[0].x!==void 0||t[0].y!==void 0||t[0].z!==void 0){const{x:a=0,y:s=0,z:o=0}=this.attributes;t.forEach(l=>{const{x:u=a,y:c=s,z:d=o}=l;Object.assign(l,{transform:d?[["translate3d",u,c,d]]:[["translate",u,c]]})})}const i=super.animate(t,e);if(i&&(lh(this,i),n.push(i)),Array.isArray(t)&&t.length>0){const a=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(t[0]).some(s=>!a.includes(s))){Object.entries(this.shapeMap).forEach(([o,l])=>{const u=`get${(0,kl.Z)(o)}Style`,c=this[u];if((0,de.Z)(c)){const d=t.map(f=>c.call(this,Object.assign(Object.assign({},this.attributes),f))),h=l.animate($d(d),e);h&&(lh(l,h),n.push(h))}});const s=(o,l)=>{if(!(0,xr.Z)(o)){const u=`get${(0,kl.Z)(l)}Style`,c=this[u];if((0,de.Z)(c)){const d=t.map(h=>c.call(this,Object.assign(Object.assign({},this.attributes),h)));Object.entries(d[0]).map(([h])=>{const f=d.map(g=>g[h]),v=o[h];if(v){const g=v.animate($d(f),e);g&&(lh(v,g),n.push(g))}})}}};this.compositeShapes.forEach(([o,l])=>{const u=ah(this.shapeMap,l);s(u,o)})}}return Kd(n)}getShape(t){return this.shapeMap[t]}setVisibility(){const{visibility:t}=this.attributes;Fi(this,t,!0)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function lh(r,t){t==null||t.finished.then(()=>{const e=r.activeAnimations.findIndex(n=>n===t);e>-1&&r.activeAnimations.splice(e,1)})}var rT=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class ui extends Is{constructor(t){super(kt({style:ui.defaultStyleProps},t))}isTextStyle(t){return Ds(t,"label")}isBackgroundStyle(t){return Ds(t,"background")}getTextStyle(t){const e=this.getGraphicStyle(t),{padding:n}=e,i=rT(e,["padding"]);return sh(i,"background")}getBackgroundStyle(t){if(t.background===!1)return!1;const e=this.getGraphicStyle(t),{wordWrap:n,wordWrapWidth:i,padding:a}=e,s=bt(e,"background"),{min:[o,l],center:[u,c],halfExtents:[d,h]}=this.shapeMap.text.getGeometryBounds(),[f,v,g,p]=mr(a),m=d*2+p+v,{width:y,height:b}=s;y&&b?Object.assign(s,{x:u-Number(y)/2,y:c-Number(b)/2}):Object.assign(s,{x:o-p,y:l-f,width:n?Math.min(m,i+p+v):m,height:h*2+f+g});const{radius:_}=s;if(typeof _=="string"&&_.endsWith("%")){const w=Number(_.replace("%",""))/100;s.radius=Math.min(+s.width,+s.height)*w}return s}render(t=this.parsedAttributes,e=this){this.upsert("text",Aa,this.getTextStyle(t),e),this.upsert("background",Un,this.getBackgroundStyle(t),e)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}ui.defaultStyleProps={padding:0,fontSize:12,fontFamily:"system-ui, sans-serif",wordWrap:!0,maxLines:1,wordWrapWidth:128,textOverflow:"...",textBaseline:"middle",backgroundOpacity:.75,backgroundZIndex:-1,backgroundLineWidth:0};class Ra extends Is{constructor(t){super(kt({style:Ra.defaultStyleProps},t))}getBadgeStyle(t){return this.getGraphicStyle(t)}render(t=this.parsedAttributes,e=this){this.upsert("label",ui,this.getBadgeStyle(t),e)}getGeometryBounds(){const t=this.getShape("label");return(t.getShape("background")||t.getShape("text")).getGeometryBounds()}}Ra.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function iT(r,t=!0){const e=[];return r.forEach((n,i)=>{e.push([i===0?"M":"L",...n])}),t&&e.push(["Z"]),e}const e0={M:["x","y"],m:["dx","dy"],H:["x"],h:["dx"],V:["y"],v:["dy"],L:["x","y"],l:["dx","dy"],Z:[],z:[],C:["x1","y1","x2","y2","x","y"],c:["dx1","dy1","dx2","dy2","dx","dy"],S:["x2","y2","x","y"],s:["dx2","dy2","dx","dy"],Q:["x1","y1","x","y"],q:["dx1","dy1","dx","dy"],T:["x","y"],t:["dx","dy"],A:["rx","ry","rotation","large-arc","sweep","x","y"],a:["rx","ry","rotation","large-arc","sweep","dx","dy"]};function aT(r){const t=r.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),e=[];let n="",i={};for(;t.length>0;){let a=t.shift();a in e0?n=a:t.unshift(a),i={type:n},e0[n].forEach(l=>{a=t.shift(),i[l]=a}),n==="M"?n="L":n==="m"&&(n="l");const[s,...o]=Object.values(i);e.push([s,...o.map(Number)])}return e}function sT(r){const t=[];return(typeof r=="string"?aT(r):r).forEach(n=>{const i=n[0];if(i==="Z"){t.push(t[0]);return}if(i!=="A")for(let a=1;a<n.length;a=a+2)t.push([n[a],n[a+1],0]);else{const a=n.length;t.push([n[a-2],n[a-1],0])}}),t}const t0=r=>{if(r.length<2)return[["M",0,0],["L",0,0]];const t=r[0],e=r[1],n=r[r.length-1],i=r[r.length-2];r.unshift(i,n),r.push(t,e);const a=[["M",n[0],n[1]]];for(let s=1;s<r.length-2;s+=1){const[o,l]=r[s-1],[u,c]=r[s],[d,h]=r[s+1],[f,v]=s!==r.length-2?r[s+2]:[d,h],g=u+(d-o)/6,p=c+(h-l)/6,m=d-(f-u)/6,y=h-(v-c)/6;a.push(["C",g,p,m,y,d,h])}return a};function oT(r,t,e,n,i,a,s){const[o,l]=Br(r,t),u={textAlign:t==="left"?"right":t==="right"?"left":"center",textBaseline:t==="top"?"bottom":t==="bottom"?"top":"middle",transform:[["translate",o+e,l+n]]};if(t==="center"||!i)return u;const c=sT(a);if(!c||c.length<=3)return u;const d=c.map((v,g)=>{const p=v,m=c[(g+1)%c.length];return(0,gt.Z)(p,m)?null:[p,m]}).filter(Boolean),h=YS([o,l],d),f=jp([o,l],h);if(f&&h&&(u.transform=[["translate",f[0]+e,f[1]+n]],s)){const v=Math.atan((h[0][1]-h[1][1])/(h[0][0]-h[1][0]));u.transform.push(["rotate",v/Math.PI*180]),u.textAlign="center",(t==="right"||t==="left")&&(v>0?u.textBaseline=t==="right"?"bottom":"top":u.textBaseline=t==="right"?"top":"bottom")}return u}var lT=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Bs extends Is{constructor(t){super(kt({style:Bs.defaultStyleProps},t))}getLabelStyle(t){if(!t.label||!t.d||t.d.length===0)return!1;const e=bt(this.getGraphicStyle(t),"label"),{maxWidth:n,offsetX:i,offsetY:a,autoRotate:s,placement:o,closeToPath:l}=e,u=lT(e,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),c=this.shapeMap.key,d=c==null?void 0:c.getRenderBounds();return Object.assign(oT(d,o,i,a,l,t.d,s),{wordWrapWidth:Qp(d,n)},u)}getKeyStyle(t){return this.getGraphicStyle(t)}render(t,e){this.upsert("key",Pr,this.getKeyStyle(t),e),this.upsert("label",ui,this.getLabelStyle(t),e)}}Bs.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function uT(r){const t=[],e=n=>{n!=null&&n.children.length&&n.children.forEach(i=>{t.push(i),e(i)})};return e(r),t}function cT(r){const t=[];let e=r.parentNode;for(;e;)t.push(e),e=e.parentNode;return t}class uh extends il{constructor(t){super(t),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},La=this,this.isMutationObserved=!0,this.addEventListener(Te.MOUNTED,this.onMounted),this.addEventListener(Te.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:t,clipPath:e,width:n=0,height:i=0}=this.attributes;if(t&&n&&i){const[a,s]=this.getBounds().min,o={x:a,y:s,radius:t,width:n,height:i};if(e)Object.assign(this.parsedStyle.clipPath.style,o);else{const l=new Un({style:o});this.style.clipPath=l}}else e&&(this.style.clipPath=null)}}const ch=new WeakMap;let La=null;const dh=r=>{if(La&&cT(La).includes(r)){const t=ch.get(r);t?t.includes(La)||t.push(La):ch.set(r,[La])}},hh=r=>{const t=ch.get(r);t&&t.forEach(e=>e.handleRadius())};class n0 extends Is{constructor(t){super(t)}isImage(){const{src:t}=this.attributes;return!!t}getIconStyle(t=this.attributes){const{width:e=0,height:n=0}=t,i=this.getGraphicStyle(t);return this.isImage()?Object.assign({x:-e/2,y:-n/2},i):Object.assign({textBaseline:"middle",textAlign:"center"},i)}render(t=this.attributes,e=this){this.upsert("icon",this.isImage()?uh:Aa,this.getIconStyle(t),e)}}class r0 extends Is{get context(){return this.config.context}get parsedAttributes(){return this.attributes}onframe(){}animate(t,e){const n=super.animate(t,e);return n&&(n.onframe=()=>this.onframe(),n.finished.then(()=>this.onframe())),n}}var Dl=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class qn extends r0{constructor(t){super(kt({style:qn.defaultStyleProps},t)),this.type="node"}getSize(t=this.attributes){const{size:e}=t;return Mn(e)}getKeyStyle(t){const e=this.getGraphicStyle(t);return Object.assign(sh(e,["label","halo","icon","badge","port"]))}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=bt(this.getGraphicStyle(t),"label"),{placement:n,maxWidth:i,offsetX:a,offsetY:s}=e,o=Dl(e,["placement","maxWidth","offsetX","offsetY"]),l=this.getShape("key").getLocalBounds();return Object.assign(um(l,n,a,s),{wordWrapWidth:Qp(l,i)},o)}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),{fill:n}=e,i=Dl(e,["fill"]),a=bt(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign(Object.assign({},i),{stroke:n}),a)}getIconStyle(t){if(t.icon===!1||!t.iconText&&!t.iconSrc)return!1;const e=bt(this.getGraphicStyle(t),"icon");return Object.assign(eT(t.size,e),e)}getBadgesStyle(t){var e;const n=ah(this.shapeMap,"badge-"),i={};if(Object.keys(n).forEach(d=>{i[d]=!1}),t.badge===!1||!(!((e=t.badges)===null||e===void 0)&&e.length))return i;const{badges:a=[],badgePalette:s,opacity:o=1}=t,l=Dl(t,["badges","badgePalette","opacity"]),u=qp(s),c=bt(this.getGraphicStyle(l),"badge");return a.forEach((d,h)=>{i[h]=Object.assign(Object.assign({backgroundFill:u?u[h%(u==null?void 0:u.length)]:void 0,opacity:o},c),this.getBadgeStyle(d))}),i}getBadgeStyle(t){const e=this.getShape("key"),{placement:n="top",offsetX:i,offsetY:a}=t,s=Dl(t,["placement","offsetX","offsetY"]),o=um(e.getLocalBounds(),n,i,a,!0);return Object.assign(Object.assign({},o),s)}getPortsStyle(t){var e;const n=this.getPorts(),i={};if(Object.keys(n).forEach(o=>{i[o]=!1}),t.port===!1||!(!((e=t.ports)===null||e===void 0)&&e.length))return i;const a=bt(this.getGraphicStyle(t),"port"),{ports:s=[]}=t;return s.forEach((o,l)=>{const u=o.key||l,c=Object.assign(Object.assign({},a),o);if(sm(c))i[u]=!1;else{const[d,h]=this.getPortXY(t,o);i[u]=Object.assign({transform:[["translate",d,h]]},c)}}),i}getPortXY(t,e){const{placement:n="left"}=e,i=this.getShape("key");return Rh(dT(this.context,i),n)}getPorts(){return ah(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return HS(t,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t);if(!$n(this,"halo",n))return;const i=this.getShape("key");this.upsert("halo",i.constructor,n,e)}drawIconShape(t,e){const n=this.getIconStyle(t);$n(this,"icon",n)&&(this.upsert("icon",n0,n,e),dh(this))}drawBadgeShapes(t,e){const n=this.getBadgesStyle(t);Object.keys(n).forEach(i=>{const a=n[i];$n(this,`badge-${i}`,a)&&this.upsert(`badge-${i}`,Ra,a,e)})}drawPortShapes(t,e){const n=this.getPortsStyle(t);Object.keys(n).forEach(i=>{const a=n[i],s=`port-${i}`;$n(this,s,a)&&this.upsert(s,_a,a,e)})}drawLabelShape(t,e){const n=this.getLabelStyle(t);$n(this,"label",n)&&this.upsert("label",ui,n,e)}_drawKeyShape(t,e){return this.drawKeyShape(t,e)}render(t=this.parsedAttributes,e=this){this._drawKeyShape(t,e),this.getShape("key")&&(this.drawHaloShape(t,e),this.drawIconShape(t,e),this.drawBadgeShapes(t,e),this.drawLabelShape(t,e),this.drawPortShapes(t,e))}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&hh(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}qn.defaultStyleProps={x:0,y:0,size:32,droppable:!0,draggable:!0,port:!0,ports:[],portZIndex:2,portLinkToCenter:!1,badge:!0,badges:[],badgeZIndex:3,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloStrokeOpacity:.25,haloPointerEvents:"none",haloZIndex:-1,icon:!0,iconZIndex:1,label:!0,labelIsBillboard:!0,labelMaxWidth:"200%",labelPlacement:"bottom",labelWordWrap:!1,labelZIndex:0};function dT(r,t){if(!r)return t.getLocalBounds();const e=r.canvas.getLayer(),n=t.cloneNode();Fi(n,"hidden"),e.appendChild(n);const i=n.getLocalBounds();return n.destroy(),i}class Wi extends qn{constructor(t){super(kt({style:Wi.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",_a,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{r:Math.min(...this.getSize(t))/2})}getIconStyle(t){const e=super.getIconStyle(t),{r:n}=this.getShape("key").attributes,i=n*2*Fr;return e?Object.assign({width:i,height:i},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Nl(t,n,e)}}Wi.defaultStyleProps={size:32};class Il extends qn{constructor(t){super(t)}get parsedAttributes(){return this.attributes}drawKeyShape(t,e){return this.upsert("key",Ta,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{points:this.getPoints(t)})}getIntersectPoint(t,e=!1){var n,i;const{points:a}=this.getShape("key").attributes,s=[+(((n=this.attributes)===null||n===void 0?void 0:n.x)||0),+(((i=this.attributes)===null||i===void 0?void 0:i.y)||0)];return Gp(t,s,a,!0,e).point}}class hT extends Il{constructor(t){super(t)}getPoints(t){const[e,n]=this.getSize(t);return BA(e,n)}}var fT=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Bl extends Wi{constructor(t){super(kt({style:Bl.defaultStyleProps},t))}parseOuterR(){const{size:t}=this.parsedAttributes;return Math.min(...Mn(t))/2}parseInnerR(){const{innerR:t}=this.parsedAttributes;return(0,Se.Z)(t)?parseInt(t)/100*this.parseOuterR():t}drawDonutShape(t,e){const{donuts:n}=t;if(!(n!=null&&n.length))return;const i=n.map(d=>(0,oe.Z)(d)?{value:d}:d),a=bt(this.getGraphicStyle(t),"donut"),s=qp(t.donutPalette);if(!s)return;const o=i.reduce((d,h)=>{var f;return d+((f=h.value)!==null&&f!==void 0?f:0)},0),l=this.parseOuterR(),u=this.parseInnerR();let c=0;i.forEach((d,h)=>{const{value:f=0,color:v=s[h%s.length]}=d,g=fT(d,["value","color"]),p=(o===0?1/i.length:f/o)*360;this.upsert(`round${h}`,Pr,Object.assign(Object.assign(Object.assign({},a),{d:pT(l,u,c,c+p),fill:v}),g),e),c+=p})}render(t,e=this){super.render(t,e),this.drawDonutShape(t,e)}}Bl.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const Fl=(r,t,e,n)=>[r+Math.sin(n)*e,t-Math.cos(n)*e],vT=(r,t,e,n)=>n<=0||e<=n?[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"]]:[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"],["M",r+n,t],["A",n,n,0,1,0,r-n,t],["A",n,n,0,1,0,r+n,t],["Z"]],gT=(r,t,e,n,i,a)=>{const[s,o]=[i/360*2*Math.PI,a/360*2*Math.PI],l=[Fl(r,t,n,s),Fl(r,t,e,s),Fl(r,t,e,o),Fl(r,t,n,o)],u=o-s>Math.PI?1:0;return[["M",l[0][0],l[0][1]],["L",l[1][0],l[1][1]],["A",e,e,0,u,1,l[2][0],l[2][1]],["L",l[3][0],l[3][1]],["A",n,n,0,u,0,l[0][0],l[0][1]],["Z"]]},pT=(r=0,t=0,e,n)=>{const[i,a]=[0,0];return Math.abs(e-n)%360<1e-6?vT(i,a,r,t):gT(i,a,r,t,e,n)};class zl extends qn{constructor(t){super(kt({style:zl.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",nl,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getSize(t);return Object.assign(Object.assign({},e),{rx:n/2,ry:i/2})}getIconStyle(t){const e=super.getIconStyle(t),{rx:n,ry:i}=this.getShape("key").attributes,a=Math.min(+n,+i)*2*Fr;return e?Object.assign({width:a,height:a},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Nl(t,n,e)}}zl.defaultStyleProps={size:[45,35]};class mT extends Il{constructor(t){super(t)}getOuterR(t){return t.outerR||Math.min(...this.getSize(t))/2}getPoints(t){return zA(this.getOuterR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getOuterR(t)*Fr;return e?Object.assign({width:n,height:n},e):!1}}function Da(r){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(r)}function yT(r,t){if(Da(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(Da(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function i0(r){var t=yT(r,"string");return Da(t)=="symbol"?t:t+""}function fn(r,t,e){return(t=i0(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function bT(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function a0(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,i0(n.key),n)}}function xT(r,t,e){return t&&a0(r.prototype,t),e&&a0(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Gl(r){return Gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gl(r)}function s0(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s0=function(){return!!r})()}function ET(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function wT(r,t){if(t&&(Da(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ET(r)}function kT(r,t,e){return t=Gl(t),wT(r,s0()?Reflect.construct(t,e||[],Gl(r).constructor):t.apply(r,e))}function fh(r,t){return fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},fh(r,t)}function _T(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&fh(r,t)}function ST(r){if(Array.isArray(r))return r}function TT(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function o0(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function AT(r,t){if(r){if(typeof r=="string")return o0(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o0(r,t):void 0}}function CT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fs(r,t){return ST(r)||TT(r,t)||AT(r,t)||CT()}function OT(r,t){var e=t.cx,n=e===void 0?0:e,i=t.cy,a=i===void 0?0:i,s=t.r;r.arc(n,a,s,0,Math.PI*2,!1)}function PT(r,t){var e=t.cx,n=e===void 0?0:e,i=t.cy,a=i===void 0?0:i,s=t.rx,o=t.ry;if(r.ellipse)r.ellipse(n,a,s,o,0,0,Math.PI*2,!1);else{var l=s>o?s:o,u=s>o?1:s/o,c=s>o?o/s:1;r.save(),r.scale(u,c),r.arc(n,a,l,0,Math.PI*2)}}function NT(r,t){var e=t.x1,n=t.y1,i=t.x2,a=t.y2,s=t.markerStart,o=t.markerEnd,l=t.markerStartOffset,u=t.markerEndOffset,c=0,d=0,h=0,f=0,v=0,g,p;s&&Me(s)&&l&&(g=i-e,p=a-n,v=Math.atan2(p,g),c=Math.cos(v)*(l||0),d=Math.sin(v)*(l||0)),o&&Me(o)&&u&&(g=e-i,p=n-a,v=Math.atan2(p,g),h=Math.cos(v)*(u||0),f=Math.sin(v)*(u||0)),r.moveTo(e+c,n+d),r.lineTo(i+h,a+f)}function MT(r,t){var e=t.markerStart,n=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,s=t.d,o=s.absolutePath,l=s.segments,u=0,c=0,d=0,h=0,f=0,v,g;if(e&&Me(e)&&i){var p=e.parentNode.getStartTangent(),m=Fs(p,2),y=m[0],b=m[1];v=y[0]-b[0],g=y[1]-b[1],f=Math.atan2(g,v),u=Math.cos(f)*(i||0),c=Math.sin(f)*(i||0)}if(n&&Me(n)&&a){var _=n.parentNode.getEndTangent(),w=Fs(_,2),x=w[0],E=w[1];v=x[0]-E[0],g=x[1]-E[1],f=Math.atan2(g,v),d=Math.cos(f)*(a||0),h=Math.sin(f)*(a||0)}for(var k=0;k<o.length;k++){var O=o[k],P=O[0],M=o[k+1],L=k===0&&(u!==0||c!==0),D=(k===o.length-1||M&&(M[0]==="M"||M[0]==="Z"))&&d!==0&&h!==0,z=L?[u,c]:[0,0],F=Fs(z,2),C=F[0],S=F[1],T=D?[d,h]:[0,0],N=Fs(T,2),B=N[0],I=N[1];switch(P){case"M":r.moveTo(O[1]+C,O[2]+S);break;case"L":r.lineTo(O[1]+B,O[2]+I);break;case"Q":r.quadraticCurveTo(O[1],O[2],O[3]+B,O[4]+I);break;case"C":r.bezierCurveTo(O[1],O[2],O[3],O[4],O[5]+B,O[6]+I);break;case"A":{var W=l[k].arcParams,X=W.cx,H=W.cy,$=W.rx,le=W.ry,fe=W.startAngle,Le=W.endAngle,Ze=W.xRotation,or=W.sweepFlag;if(r.ellipse)r.ellipse(X,H,$,le,Ze,fe,Le,!!(1-or));else{var sa=$>le?$:le,_n=$>le?1:$/le,Ur=$>le?le/$:1;r.translate(X,H),r.rotate(Ze),r.scale(_n,Ur),r.arc(0,0,sa,fe,Le,!!(1-or)),r.scale(1/_n,1/Ur),r.rotate(-Ze),r.translate(-X,-H)}D&&r.lineTo(O[6]+d,O[7]+h);break}case"Z":r.closePath();break}}}function RT(r,t){var e=t.markerStart,n=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,s=t.points.points,o=s.length,l=s[0][0],u=s[0][1],c=s[o-1][0],d=s[o-1][1],h=0,f=0,v=0,g=0,p=0,m,y;e&&Me(e)&&i&&(m=s[1][0]-s[0][0],y=s[1][1]-s[0][1],p=Math.atan2(y,m),h=Math.cos(p)*(i||0),f=Math.sin(p)*(i||0)),n&&Me(n)&&a&&(m=s[o-1][0]-s[0][0],y=s[o-1][1]-s[0][1],p=Math.atan2(y,m),v=Math.cos(p)*(a||0),g=Math.sin(p)*(a||0)),r.moveTo(l+(h||v),u+(f||g));for(var b=1;b<o-1;b++){var _=s[b];r.lineTo(_[0],_[1])}r.lineTo(c,d)}function LT(r,t){var e=t.markerStart,n=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,s=t.points.points,o=s.length,l=s[0][0],u=s[0][1],c=s[o-1][0],d=s[o-1][1],h=0,f=0,v=0,g=0,p=0,m,y;e&&Me(e)&&i&&(m=s[1][0]-s[0][0],y=s[1][1]-s[0][1],p=Math.atan2(y,m),h=Math.cos(p)*(i||0),f=Math.sin(p)*(i||0)),n&&Me(n)&&a&&(m=s[o-2][0]-s[o-1][0],y=s[o-2][1]-s[o-1][1],p=Math.atan2(y,m),v=Math.cos(p)*(a||0),g=Math.sin(p)*(a||0)),r.moveTo(l+h,u+f);for(var b=1;b<o-1;b++){var _=s[b];r.lineTo(_[0],_[1])}r.lineTo(c+v,d+g)}function DT(r,t){var e=t.x,n=e===void 0?0:e,i=t.y,a=i===void 0?0:i,s=t.radius,o=t.width,l=t.height,u=o,c=l,d=s&&s.some(function(w){return w!==0});if(!d)r.rect(n,a,u,c);else{var h=o>0?1:-1,f=l>0?1:-1,v=h+f===0,g=s.map(function(w){return(0,Ne.Z)(w,0,Math.min(Math.abs(u)/2,Math.abs(c)/2))}),p=Fs(g,4),m=p[0],y=p[1],b=p[2],_=p[3];r.moveTo(h*m+n,a),r.lineTo(u-h*y+n,a),y!==0&&r.arc(u-h*y+n,f*y+a,y,-f*Math.PI/2,h>0?0:Math.PI,v),r.lineTo(u+n,c-f*b+a),b!==0&&r.arc(u-h*b+n,c-f*b+a,b,h>0?0:Math.PI,f>0?Math.PI/2:1.5*Math.PI,v),r.lineTo(h*_+n,c+a),_!==0&&r.arc(h*_+n,c-f*_+a,_,f>0?Math.PI/2:-Math.PI/2,h>0?Math.PI:0,v),r.lineTo(n,f*m+a),m!==0&&r.arc(h*m+n,f*m+a,m,h>0?Math.PI:0,f>0?Math.PI*1.5:Math.PI/2,v)}}var IT=function(r){function t(){var e;bT(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=kT(this,t,[].concat(i)),e.name="canvas-path-generator",e}return _T(t,r),xT(t,[{key:"init",value:function(){var n,i=(n={},fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(n,Z.CIRCLE,OT),Z.ELLIPSE,PT),Z.RECT,DT),Z.LINE,NT),Z.POLYLINE,LT),Z.POLYGON,RT),Z.PATH,MT),Z.TEXT,void 0),Z.GROUP,void 0),Z.IMAGE,void 0),fn(fn(fn(n,Z.HTML,void 0),Z.MESH,void 0),Z.FRAGMENT,void 0));this.context.pathGeneratorFactory=i}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(qr);function ci(r){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(r)}function BT(r,t){if(ci(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function l0(r){var t=BT(r,"string");return ci(t)=="symbol"?t:t+""}function vn(r,t,e){return(t=l0(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function u0(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function c0(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,l0(n.key),n)}}function d0(r,t,e){return t&&c0(r.prototype,t),e&&c0(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function jl(r){return jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jl(r)}function h0(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h0=function(){return!!r})()}function FT(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function zT(r,t){if(t&&(ci(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FT(r)}function GT(r,t,e){return t=jl(t),zT(r,h0()?Reflect.construct(t,e||[],jl(r).constructor):t.apply(r,e))}function vh(r,t){return vh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},vh(r,t)}function jT(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&vh(r,t)}function f0(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function v0(r,t){if(r){if(typeof r=="string")return f0(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?f0(r,t):void 0}}function WT(r,t){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=v0(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function gh(){"use strict";gh=function(){return t};var r,t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(C,S,T){C[S]=T.value},a=typeof Symbol=="function"?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(C,S,T){return Object.defineProperty(C,S,{value:T,enumerable:!0,configurable:!0,writable:!0}),C[S]}try{u({},"")}catch(C){u=function(T,N,B){return T[N]=B}}function c(C,S,T,N){var B=S&&S.prototype instanceof m?S:m,I=Object.create(B.prototype),W=new z(N||[]);return i(I,"_invoke",{value:P(C,T,W)}),I}function d(C,S,T){try{return{type:"normal",arg:C.call(S,T)}}catch(N){return{type:"throw",arg:N}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",g="completed",p={};function m(){}function y(){}function b(){}var _={};u(_,s,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(F([])));x&&x!==e&&n.call(x,s)&&(_=x);var E=b.prototype=m.prototype=Object.create(_);function k(C){["next","throw","return"].forEach(function(S){u(C,S,function(T){return this._invoke(S,T)})})}function O(C,S){function T(B,I,W,X){var H=d(C[B],C,I);if(H.type!=="throw"){var $=H.arg,le=$.value;return le&&ci(le)=="object"&&n.call(le,"__await")?S.resolve(le.__await).then(function(fe){T("next",fe,W,X)},function(fe){T("throw",fe,W,X)}):S.resolve(le).then(function(fe){$.value=fe,W($)},function(fe){return T("throw",fe,W,X)})}X(H.arg)}var N;i(this,"_invoke",{value:function(I,W){function X(){return new S(function(H,$){T(I,W,H,$)})}return N=N?N.then(X,X):X()}})}function P(C,S,T){var N=h;return function(B,I){if(N===v)throw Error("Generator is already running");if(N===g){if(B==="throw")throw I;return{value:r,done:!0}}for(T.method=B,T.arg=I;;){var W=T.delegate;if(W){var X=M(W,T);if(X){if(X===p)continue;return X}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(N===h)throw N=g,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);N=v;var H=d(C,S,T);if(H.type==="normal"){if(N=T.done?g:f,H.arg===p)continue;return{value:H.arg,done:T.done}}H.type==="throw"&&(N=g,T.method="throw",T.arg=H.arg)}}}function M(C,S){var T=S.method,N=C.iterator[T];if(N===r)return S.delegate=null,T==="throw"&&C.iterator.return&&(S.method="return",S.arg=r,M(C,S),S.method==="throw")||T!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+T+"' method")),p;var B=d(N,C.iterator,S.arg);if(B.type==="throw")return S.method="throw",S.arg=B.arg,S.delegate=null,p;var I=B.arg;return I?I.done?(S[C.resultName]=I.value,S.next=C.nextLoc,S.method!=="return"&&(S.method="next",S.arg=r),S.delegate=null,p):I:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function L(C){var S={tryLoc:C[0]};1 in C&&(S.catchLoc=C[1]),2 in C&&(S.finallyLoc=C[2],S.afterLoc=C[3]),this.tryEntries.push(S)}function D(C){var S=C.completion||{};S.type="normal",delete S.arg,C.completion=S}function z(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(L,this),this.reset(!0)}function F(C){if(C||C===""){var S=C[s];if(S)return S.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var T=-1,N=function B(){for(;++T<C.length;)if(n.call(C,T))return B.value=C[T],B.done=!1,B;return B.value=r,B.done=!0,B};return N.next=N}}throw new TypeError(ci(C)+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(C){var S=typeof C=="function"&&C.constructor;return!!S&&(S===y||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,b):(C.__proto__=b,u(C,l,"GeneratorFunction")),C.prototype=Object.create(E),C},t.awrap=function(C){return{__await:C}},k(O.prototype),u(O.prototype,o,function(){return this}),t.AsyncIterator=O,t.async=function(C,S,T,N,B){B===void 0&&(B=Promise);var I=new O(c(C,S,T,N),B);return t.isGeneratorFunction(S)?I:I.next().then(function(W){return W.done?W.value:I.next()})},k(E),u(E,l,"Generator"),u(E,s,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),t.keys=function(C){var S=Object(C),T=[];for(var N in S)T.push(N);return T.reverse(),function B(){for(;T.length;){var I=T.pop();if(I in S)return B.value=I,B.done=!1,B}return B.done=!0,B}},t.values=F,z.prototype={constructor:z,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(D),!S)for(var T in this)T.charAt(0)==="t"&&n.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=r)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var T=this;function N($,le){return W.type="throw",W.arg=S,T.next=$,le&&(T.method="next",T.arg=r),!!le}for(var B=this.tryEntries.length-1;B>=0;--B){var I=this.tryEntries[B],W=I.completion;if(I.tryLoc==="root")return N("end");if(I.tryLoc<=this.prev){var X=n.call(I,"catchLoc"),H=n.call(I,"finallyLoc");if(X&&H){if(this.prev<I.catchLoc)return N(I.catchLoc,!0);if(this.prev<I.finallyLoc)return N(I.finallyLoc)}else if(X){if(this.prev<I.catchLoc)return N(I.catchLoc,!0)}else{if(!H)throw Error("try statement without catch or finally");if(this.prev<I.finallyLoc)return N(I.finallyLoc)}}}},abrupt:function(S,T){for(var N=this.tryEntries.length-1;N>=0;--N){var B=this.tryEntries[N];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var I=B;break}}I&&(S==="break"||S==="continue")&&I.tryLoc<=T&&T<=I.finallyLoc&&(I=null);var W=I?I.completion:{};return W.type=S,W.arg=T,I?(this.method="next",this.next=I.finallyLoc,p):this.complete(W)},complete:function(S,T){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&T&&(this.next=T),p},finish:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.finallyLoc===S)return this.complete(N.completion,N.afterLoc),D(N),p}},catch:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.tryLoc===S){var B=N.completion;if(B.type==="throw"){var I=B.arg;D(N)}return I}}throw Error("illegal catch attempt")},delegateYield:function(S,T,N){return this.delegate={iterator:F(S),resultName:T,nextLoc:N},this.method==="next"&&(this.arg=r),p}},t}function g0(r,t,e,n,i,a,s){try{var o=r[a](s),l=o.value}catch(u){return void e(u)}o.done?t(l):Promise.resolve(l).then(n,i)}function ZT(r){return function(){var t=this,e=arguments;return new Promise(function(n,i){var a=r.apply(t,e);function s(l){g0(a,n,i,s,o,"next",l)}function o(l){g0(a,n,i,s,o,"throw",l)}s(void 0)})}}function VT(r){if(Array.isArray(r))return r}function HT(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function UT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function di(r,t){return VT(r)||HT(r,t)||v0(r,t)||UT()}var YT=Y(74873);function p0(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function m0(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?p0(Object(e),!0).forEach(function(n){vn(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):p0(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}var XT=R.Ue(),KT=R.Ue(),$T=R.Ue(),qT=G.create(),y0=function(){function r(){var t=this;u0(this,r),this.isHit=function(e,n,i,a){var s=t.context.pointInPathPickerFactory[e.nodeName];if(s){var o=G.invert(qT,i),l=R.fF(KT,R.t8($T,n[0],n[1],0),o);if(s(e,new At(l[0],l[1]),a,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(e,n){var i=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),a=t.context.pathGeneratorFactory[e.nodeName];return a&&(i.beginPath(),a(i,e.parsedStyle),i.closePath()),i.isPointInPath(n.x,n.y)}}return d0(r,[{key:"apply",value:function(e,n){var i,a=this,s=e.renderingService,o=e.renderingContext;this.context=e,this.runtime=n;var l=(i=o.root)===null||i===void 0?void 0:i.ownerDocument;s.hooks.pick.tapPromise(r.tag,function(){var u=ZT(gh().mark(function c(d){return gh().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",a.pick(l,d));case 1:case"end":return f.stop()}},c)}));return function(c){return u.apply(this,arguments)}}()),s.hooks.pickSync.tap(r.tag,function(u){return a.pick(l,u)})}},{key:"pick",value:function(e,n){var i=n.topmost,a=n.position,s=a.x,o=a.y,l=R.t8(XT,s,o,0),u=e.elementsFromBBox(l[0],l[1],l[0],l[1]),c=[],d=WT(u),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=f.getWorldTransform(),g=this.isHit(f,l,v,!1);if(g){var p=Mg(f);if(p){var m=p.parsedStyle.clipPath,y=this.isHit(m,l,m.getWorldTransform(),!0);if(y){if(i)return n.picked=[f],n;c.push(f)}}else{if(i)return n.picked=[f],n;c.push(f)}}}}catch(b){d.e(b)}finally{d.f()}return n.picked=c,n}}])}();y0.tag="CanvasPicker";function JT(r,t,e){var n=r.parsedStyle,i=n.cx,a=i===void 0?0:i,s=n.cy,o=s===void 0?0:s,l=n.r,u=n.fill,c=n.stroke,d=n.lineWidth,h=d===void 0?1:d,f=n.increasedLineWidthForHitTesting,v=f===void 0?0:f,g=n.pointerEvents,p=g===void 0?"auto":g,m=(h+v)/2,y=(0,ct.TE)(a,o,t.x,t.y),b=Ri(p,u,c),_=di(b,2),w=_[0],x=_[1];return w&&x||e?y<=l+m:w?y<=l:x?y>=l-m&&y<=l+m:!1}function Wl(r,t,e,n){return r/(e*e)+t/(n*n)}function QT(r,t,e){var n=r.parsedStyle,i=n.cx,a=i===void 0?0:i,s=n.cy,o=s===void 0?0:s,l=n.rx,u=n.ry,c=n.fill,d=n.stroke,h=n.lineWidth,f=h===void 0?1:h,v=n.increasedLineWidthForHitTesting,g=v===void 0?0:v,p=n.pointerEvents,m=p===void 0?"auto":p,y=t.x,b=t.y,_=Ri(m,c,d),w=di(_,2),x=w[0],E=w[1],k=(f+g)/2,O=(y-a)*(y-a),P=(b-o)*(b-o);return x&&E||e?Wl(O,P,l+k,u+k)<=1:x?Wl(O,P,l,u)<=1:E?Wl(O,P,l-k,u-k)>=1&&Wl(O,P,l+k,u+k)<=1:!1}function Zi(r,t,e,n,i,a){return i>=r&&i<=r+e&&a>=t&&a<=t+n}function e2(r,t,e,n,i,a,s){var o=i/2;return Zi(r-o,t-o,e,i,a,s)||Zi(r+e-o,t-o,i,n,a,s)||Zi(r+o,t+n-o,e,i,a,s)||Zi(r-o,t+o,i,n,a,s)}function Zl(r,t,e,n,i,a,s,o){var l=(Math.atan2(o-t,s-r)+Math.PI*2)%(Math.PI*2),u={x:r+e*Math.cos(l),y:t+e*Math.sin(l)};return(0,ct.TE)(u.x,u.y,s,o)<=a/2}function hi(r,t,e,n,i,a,s){var o=Math.min(r,e),l=Math.max(r,e),u=Math.min(t,n),c=Math.max(t,n),d=i/2;return a>=o-d&&a<=l+d&&s>=u-d&&s<=c+d?(0,ct._x)(r,t,e,n,a,s)<=i/2:!1}function b0(r,t,e,n,i){var a=r.length;if(a<2)return!1;for(var s=0;s<a-1;s++){var o=r[s][0],l=r[s][1],u=r[s+1][0],c=r[s+1][1];if(hi(o,l,u,c,t,e,n))return!0}if(i){var d=r[0],h=r[a-1];if(hi(d[0],d[1],h[0],h[1],t,e,n))return!0}return!1}var t2=1e-6;function ph(r){return Math.abs(r)<t2?0:r<0?-1:1}function n2(r,t,e){return(e[0]-r[0])*(t[1]-r[1])===(t[0]-r[0])*(e[1]-r[1])&&Math.min(r[0],t[0])<=e[0]&&e[0]<=Math.max(r[0],t[0])&&Math.min(r[1],t[1])<=e[1]&&e[1]<=Math.max(r[1],t[1])}function x0(r,t,e){var n=!1,i=r.length;if(i<=2)return!1;for(var a=0;a<i;a++){var s=r[a],o=r[(a+1)%i];if(n2(s,o,[t,e]))return!0;ph(s[1]-e)>0!=ph(o[1]-e)>0&&ph(t-(e-s[1])*(s[0]-o[0])/(s[1]-o[1])-s[0])<0&&(n=!n)}return n}function E0(r,t,e){for(var n=!1,i=0;i<r.length;i++){var a=r[i];if(n=x0(a,t,e),n)break}return n}function r2(r,t,e){var n=r.parsedStyle,i=n.x1,a=n.y1,s=n.x2,o=n.y2,l=n.lineWidth,u=l===void 0?1:l,c=n.increasedLineWidthForHitTesting,d=c===void 0?0:c,h=n.pointerEvents,f=h===void 0?"auto":h,v=n.fill,g=n.stroke,p=Ri(f,v,g),m=di(p,2),y=m[1];return!y&&!e||!u?!1:hi(i,a,s,o,u+d,t.x,t.y)}function i2(r,t,e,n,i){for(var a=!1,s=t/2,o=0;o<r.length;o++){var l=r[o],u=l.currentPoint,c=l.params,d=l.prePoint,h=l.box;if(!(h&&!Zi(h.x-s,h.y-s,h.width+t,h.height+t,e,n)))switch(l.command){case"L":case"Z":if(a=hi(d[0],d[1],u[0],u[1],t,e,n),a)return!0;break;case"Q":var f=(0,ct.Y1)(d[0],d[1],c[1],c[2],c[3],c[4],e,n);if(a=f<=t/2,a)return!0;break;case"C":var v=(0,ct.ph)(d[0],d[1],c[1],c[2],c[3],c[4],c[5],c[6],e,n,i);if(a=v<=t/2,a)return!0;break;case"A":l.cubicParams||(l.cubicParams=(0,YT.W)(d[0],d[1],c[1],c[2],c[3],c[4],c[5],c[6],c[7],void 0));for(var g=l.cubicParams,p=d,m=0;m<g.length;m+=6){var y=(0,ct.ph)(p[0],p[1],g[m],g[m+1],g[m+2],g[m+3],g[m+4],g[m+5],e,n,i);if(p=[g[m+4],g[m+5]],a=y<=t/2,a)return!0}break}}return a}function a2(r,t,e,n,i,a){var s=r.parsedStyle,o=s.lineWidth,l=o===void 0?1:o,u=s.increasedLineWidthForHitTesting,c=u===void 0?0:u,d=s.stroke,h=s.fill,f=s.d,v=s.pointerEvents,g=v===void 0?"auto":v,p=f.segments,m=f.hasArc,y=f.polylines,b=f.polygons,_=Ri(g,(b==null?void 0:b.length)&&h,d),w=di(_,2),x=w[0],E=w[1],k=pd(r),O=!1;return x||e?(m?O=n(r,t):O=E0(b,t.x,t.y)||E0(y,t.x,t.y),O):((E||e)&&(O=i2(p,l+c,t.x,t.y,k)),O)}function s2(r,t,e){var n=r.parsedStyle,i=n.stroke,a=n.fill,s=n.lineWidth,o=s===void 0?1:s,l=n.increasedLineWidthForHitTesting,u=l===void 0?0:l,c=n.points,d=n.pointerEvents,h=d===void 0?"auto":d,f=Ri(h,a,i),v=di(f,2),g=v[0],p=v[1],m=!1;return(p||e)&&(m=b0(c.points,o+u,t.x,t.y,!0)),!m&&(g||e)&&(m=x0(c.points,t.x,t.y)),m}function o2(r,t,e){var n=r.parsedStyle,i=n.lineWidth,a=i===void 0?1:i,s=n.increasedLineWidthForHitTesting,o=s===void 0?0:s,l=n.points,u=n.pointerEvents,c=u===void 0?"auto":u,d=n.fill,h=n.stroke,f=Ri(c,d,h),v=di(f,2),g=v[1];return!g&&!e||!a?!1:b0(l.points,a+o,t.x,t.y,!1)}function l2(r,t,e,n,i){var a=r.parsedStyle,s=a.radius,o=a.fill,l=a.stroke,u=a.lineWidth,c=u===void 0?1:u,d=a.increasedLineWidthForHitTesting,h=d===void 0?0:d,f=a.x,v=f===void 0?0:f,g=a.y,p=g===void 0?0:g,m=a.width,y=a.height,b=a.pointerEvents,_=b===void 0?"auto":b,w=Ri(_,o,l),x=di(w,2),E=x[0],k=x[1],O=s&&s.some(function(D){return D!==0}),P=c+h;if(O){var L=!1;return(k||e)&&(L=u2(v,p,m,y,s.map(function(D){return(0,Ne.Z)(D,0,Math.min(Math.abs(m)/2,Math.abs(y)/2))}),P,t.x,t.y)),!L&&(E||e)&&(L=n(r,t)),L}else{var M=P/2;if(E&&k||e)return Zi(v-M,p-M,m+M,y+M,t.x,t.y);if(E)return Zi(v,p,m,y,t.x,t.y);if(k)return e2(v,p,m,y,P,t.x,t.y)}return!1}function u2(r,t,e,n,i,a,s,o){var l=di(i,4),u=l[0],c=l[1],d=l[2],h=l[3];return hi(r+u,t,r+e-c,t,a,s,o)||hi(r+e,t+c,r+e,t+n-d,a,s,o)||hi(r+e-d,t+n,r+h,t+n,a,s,o)||hi(r,t+n-h,r,t+u,a,s,o)||Zl(r+e-c,t+c,c,1.5*Math.PI,2*Math.PI,a,s,o)||Zl(r+e-d,t+n-d,d,0,.5*Math.PI,a,s,o)||Zl(r+h,t+n-h,h,.5*Math.PI,Math.PI,a,s,o)||Zl(r+u,t+u,u,Math.PI,1.5*Math.PI,a,s,o)}function c2(r,t,e,n,i,a){var s=r.parsedStyle,o=s.pointerEvents,l=o===void 0?"auto":o,u=s.x,c=u===void 0?0:u,d=s.y,h=d===void 0?0:d,f=s.width,v=s.height;if(l==="non-transparent-pixel"){var g=i.config.offscreenCanvas,p=a.offscreenCanvasCreator.getOrCreateCanvas(g),m=a.offscreenCanvasCreator.getOrCreateContext(g,{willReadFrequently:!0});p.width=f,p.height=v,i.defaultStyleRendererFactory[Z.IMAGE].render(m,m0(m0({},r.parsedStyle),{},{x:0,y:0}),r,void 0,void 0,void 0);var y=m.getImageData(t.x-c,t.y-h,1,1).data;return y.every(function(b){return b!==0})}return!0}function d2(r,t,e,n){var i=r.getGeometryBounds();return t.x>=i.min[0]&&t.y>=i.min[1]&&t.x<=i.max[0]&&t.y<=i.max[1]}var h2=function(r){function t(){var e;u0(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=GT(this,t,[].concat(i)),e.name="canvas-picker",e}return jT(t,r),d0(t,[{key:"init",value:function(){var n,i=(n={},vn(vn(vn(vn(vn(vn(vn(vn(vn(vn(n,Z.CIRCLE,JT),Z.ELLIPSE,QT),Z.RECT,l2),Z.LINE,r2),Z.POLYLINE,o2),Z.POLYGON,s2),Z.PATH,a2),Z.TEXT,d2),Z.GROUP,null),Z.IMAGE,c2),vn(vn(n,Z.HTML,null),Z.MESH,null));this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new y0)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(qr);function Ia(r){"@babel/helpers - typeof";return Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(r)}function f2(r,t){if(Ia(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(Ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function w0(r){var t=f2(r,"string");return Ia(t)=="symbol"?t:t+""}function tn(r,t,e){return(t=w0(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function k0(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function mh(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?k0(Object(e),!0).forEach(function(n){tn(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):k0(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function Ba(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function _0(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,w0(n.key),n)}}function Fa(r,t,e){return t&&_0(r.prototype,t),e&&_0(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Vl(r){return Vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vl(r)}function S0(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(S0=function(){return!!r})()}function v2(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function g2(r,t){if(t&&(Ia(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v2(r)}function Hl(r,t,e){return t=Vl(t),g2(r,S0()?Reflect.construct(t,e||[],Vl(r).constructor):t.apply(r,e))}function yh(r,t){return yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},yh(r,t)}function Ul(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&yh(r,t)}function p2(r){if(Array.isArray(r))return r}function m2(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function bh(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function T0(r,t){if(r){if(typeof r=="string")return bh(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?bh(r,t):void 0}}function y2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yl(r,t){return p2(r)||m2(r,t)||T0(r,t)||y2()}function b2(r){if(Array.isArray(r))return bh(r)}function x2(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function E2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w2(r){return b2(r)||x2(r)||T0(r)||E2()}function Er(r,t){if(!{}.hasOwnProperty.call(r,t))throw new TypeError("attempted to use private field on non-instance");return r}var k2=0;function _2(r){return"__private_"+k2+++"_"+r}function zs(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function fi(r){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(r)}function S2(r,t){if(fi(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function A0(r){var t=S2(r,"string");return fi(t)=="symbol"?t:t+""}function C0(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,A0(n.key),n)}}function Gs(r,t,e){return t&&C0(r.prototype,t),e&&C0(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Xl(r){return Xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xl(r)}function O0(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O0=function(){return!!r})()}function T2(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function A2(r,t){if(t&&(fi(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T2(r)}function C2(r,t,e){return t=Xl(t),A2(r,O0()?Reflect.construct(t,e||[],Xl(r).constructor):t.apply(r,e))}function xh(r,t){return xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},xh(r,t)}function O2(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&xh(r,t)}function js(){"use strict";js=function(){return t};var r,t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(C,S,T){C[S]=T.value},a=typeof Symbol=="function"?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(C,S,T){return Object.defineProperty(C,S,{value:T,enumerable:!0,configurable:!0,writable:!0}),C[S]}try{u({},"")}catch(C){u=function(T,N,B){return T[N]=B}}function c(C,S,T,N){var B=S&&S.prototype instanceof m?S:m,I=Object.create(B.prototype),W=new z(N||[]);return i(I,"_invoke",{value:P(C,T,W)}),I}function d(C,S,T){try{return{type:"normal",arg:C.call(S,T)}}catch(N){return{type:"throw",arg:N}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",g="completed",p={};function m(){}function y(){}function b(){}var _={};u(_,s,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(F([])));x&&x!==e&&n.call(x,s)&&(_=x);var E=b.prototype=m.prototype=Object.create(_);function k(C){["next","throw","return"].forEach(function(S){u(C,S,function(T){return this._invoke(S,T)})})}function O(C,S){function T(B,I,W,X){var H=d(C[B],C,I);if(H.type!=="throw"){var $=H.arg,le=$.value;return le&&fi(le)=="object"&&n.call(le,"__await")?S.resolve(le.__await).then(function(fe){T("next",fe,W,X)},function(fe){T("throw",fe,W,X)}):S.resolve(le).then(function(fe){$.value=fe,W($)},function(fe){return T("throw",fe,W,X)})}X(H.arg)}var N;i(this,"_invoke",{value:function(I,W){function X(){return new S(function(H,$){T(I,W,H,$)})}return N=N?N.then(X,X):X()}})}function P(C,S,T){var N=h;return function(B,I){if(N===v)throw Error("Generator is already running");if(N===g){if(B==="throw")throw I;return{value:r,done:!0}}for(T.method=B,T.arg=I;;){var W=T.delegate;if(W){var X=M(W,T);if(X){if(X===p)continue;return X}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(N===h)throw N=g,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);N=v;var H=d(C,S,T);if(H.type==="normal"){if(N=T.done?g:f,H.arg===p)continue;return{value:H.arg,done:T.done}}H.type==="throw"&&(N=g,T.method="throw",T.arg=H.arg)}}}function M(C,S){var T=S.method,N=C.iterator[T];if(N===r)return S.delegate=null,T==="throw"&&C.iterator.return&&(S.method="return",S.arg=r,M(C,S),S.method==="throw")||T!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+T+"' method")),p;var B=d(N,C.iterator,S.arg);if(B.type==="throw")return S.method="throw",S.arg=B.arg,S.delegate=null,p;var I=B.arg;return I?I.done?(S[C.resultName]=I.value,S.next=C.nextLoc,S.method!=="return"&&(S.method="next",S.arg=r),S.delegate=null,p):I:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function L(C){var S={tryLoc:C[0]};1 in C&&(S.catchLoc=C[1]),2 in C&&(S.finallyLoc=C[2],S.afterLoc=C[3]),this.tryEntries.push(S)}function D(C){var S=C.completion||{};S.type="normal",delete S.arg,C.completion=S}function z(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(L,this),this.reset(!0)}function F(C){if(C||C===""){var S=C[s];if(S)return S.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var T=-1,N=function B(){for(;++T<C.length;)if(n.call(C,T))return B.value=C[T],B.done=!1,B;return B.value=r,B.done=!0,B};return N.next=N}}throw new TypeError(fi(C)+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(C){var S=typeof C=="function"&&C.constructor;return!!S&&(S===y||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,b):(C.__proto__=b,u(C,l,"GeneratorFunction")),C.prototype=Object.create(E),C},t.awrap=function(C){return{__await:C}},k(O.prototype),u(O.prototype,o,function(){return this}),t.AsyncIterator=O,t.async=function(C,S,T,N,B){B===void 0&&(B=Promise);var I=new O(c(C,S,T,N),B);return t.isGeneratorFunction(S)?I:I.next().then(function(W){return W.done?W.value:I.next()})},k(E),u(E,l,"Generator"),u(E,s,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),t.keys=function(C){var S=Object(C),T=[];for(var N in S)T.push(N);return T.reverse(),function B(){for(;T.length;){var I=T.pop();if(I in S)return B.value=I,B.done=!1,B}return B.done=!0,B}},t.values=F,z.prototype={constructor:z,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(D),!S)for(var T in this)T.charAt(0)==="t"&&n.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=r)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var T=this;function N($,le){return W.type="throw",W.arg=S,T.next=$,le&&(T.method="next",T.arg=r),!!le}for(var B=this.tryEntries.length-1;B>=0;--B){var I=this.tryEntries[B],W=I.completion;if(I.tryLoc==="root")return N("end");if(I.tryLoc<=this.prev){var X=n.call(I,"catchLoc"),H=n.call(I,"finallyLoc");if(X&&H){if(this.prev<I.catchLoc)return N(I.catchLoc,!0);if(this.prev<I.finallyLoc)return N(I.finallyLoc)}else if(X){if(this.prev<I.catchLoc)return N(I.catchLoc,!0)}else{if(!H)throw Error("try statement without catch or finally");if(this.prev<I.finallyLoc)return N(I.finallyLoc)}}}},abrupt:function(S,T){for(var N=this.tryEntries.length-1;N>=0;--N){var B=this.tryEntries[N];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var I=B;break}}I&&(S==="break"||S==="continue")&&I.tryLoc<=T&&T<=I.finallyLoc&&(I=null);var W=I?I.completion:{};return W.type=S,W.arg=T,I?(this.method="next",this.next=I.finallyLoc,p):this.complete(W)},complete:function(S,T){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&T&&(this.next=T),p},finish:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.finallyLoc===S)return this.complete(N.completion,N.afterLoc),D(N),p}},catch:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.tryLoc===S){var B=N.completion;if(B.type==="throw"){var I=B.arg;D(N)}return I}}throw Error("illegal catch attempt")},delegateYield:function(S,T,N){return this.delegate={iterator:F(S),resultName:T,nextLoc:N},this.method==="next"&&(this.arg=r),p}},t}function P2(r,t,e){return(t=A0(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function P0(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function vi(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?P0(Object(e),!0).forEach(function(n){P2(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):P0(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function N2(r){if(Array.isArray(r))return r}function M2(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function N0(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function R2(r,t){if(r){if(typeof r=="string")return N0(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?N0(r,t):void 0}}function L2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D2(r,t){return N2(r)||M2(r,t)||R2(r,t)||L2()}function M0(r,t,e,n,i,a,s){try{var o=r[a](s),l=o.value}catch(u){return void e(u)}o.done?t(l):Promise.resolve(l).then(n,i)}function R0(r){return function(){var t=this,e=arguments;return new Promise(function(n,i){var a=r.apply(t,e);function s(l){M0(a,n,i,s,o,"next",l)}function o(l){M0(a,n,i,s,o,"throw",l)}s(void 0)})}}var I2=function(){function r(){zs(this,r),this.cacheStore=new Map}return Gs(r,[{key:"onRefAdded",value:function(e){}},{key:"has",value:function(e){return this.cacheStore.has(e)}},{key:"put",value:function(e,n,i){return this.cacheStore.has(e)?!1:(this.cacheStore.set(e,{value:n,counter:new Set([i])}),this.onRefAdded(i),!0)}},{key:"get",value:function(e,n){var i=this.cacheStore.get(e);return i?(i.counter.has(n)||(i.counter.add(n),this.onRefAdded(n)),i.value):null}},{key:"update",value:function(e,n,i){var a=this.cacheStore.get(e);return a?(a.value=vi(vi({},a.value),n),a.counter.has(i)||(a.counter.add(i),this.onRefAdded(i)),!0):!1}},{key:"release",value:function(e,n){var i=this.cacheStore.get(e);return i?(i.counter.delete(n),i.counter.size<=0&&this.cacheStore.delete(e),!0):!1}},{key:"releaseRef",value:function(e){var n=this;Array.from(this.cacheStore.keys()).forEach(function(i){n.release(i,e)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),Eh=[],wh=[],kh=function(){function r(){zs(this,r)}return Gs(r,null,[{key:"stop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.api;r.rafId&&(e.cancelAnimationFrame(r.rafId),r.rafId=null)}},{key:"executeTask",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.api;Eh.length<=0&&wh.length<=0||(wh.forEach(function(n){return n()}),wh=Eh.splice(0,r.TASK_NUM_PER_FRAME),r.rafId=e.requestAnimationFrame(function(){r.executeTask(e)}))}},{key:"sliceImage",value:function(e,n,i,a){for(var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r.api,l=e.naturalWidth||e.width,u=e.naturalHeight||e.height,c=n-s,d=i-s,h=Math.ceil(l/c),f=Math.ceil(u/d),v={tileSize:[n,i],gridSize:[f,h],tiles:Array(f).fill(null).map(function(){return Array(h).fill(null)})},g=function(y){for(var b=function(x){Eh.push(function(){var E=x*c,k=y*d,O=[Math.min(n,l-E),Math.min(i,u-k)],P=O[0],M=O[1],L=o.createCanvas();L.width=n,L.height=i;var D=L.getContext("2d");D.drawImage(e,E,k,P,M,0,0,P,M),v.tiles[y][x]={x:E,y:k,tileX:x,tileY:y,data:L},a()})},_=0;_<h;_++)b(_)},p=0;p<f;p++)g(p);return r.stop(),r.executeTask(),v}}])}();kh.TASK_NUM_PER_FRAME=10;var gn=new I2;gn.onRefAdded=function(t){var e=this;t.addEventListener(Te.DESTROY,function(){e.releaseRef(t)},{once:!0})};var _h=function(){function r(t,e){zs(this,r),this.gradientCache={},this.patternCache={},this.context=t,this.runtime=e}return Gs(r,[{key:"getImageSync",value:function(e,n,i){var a=(0,Se.Z)(e)?e:e.src;if(gn.has(a)){var s=gn.get(a,n);if(s.img.complete)return i==null||i(s),s}return this.getOrCreateImage(e,n).then(function(o){i==null||i(o)}).catch(function(){}),null}},{key:"getOrCreateImage",value:function(e,n){var i=(0,Se.Z)(e)?e:e.src;if(!(0,Se.Z)(e)&&!gn.has(i)){var a={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:Kl(e)};gn.put(i,a,n)}if(gn.has(i)){var s=gn.get(i,n);return s.img.complete?Promise.resolve(s):new Promise(function(l,u){s.img.addEventListener("load",function(){s.size=[s.img.naturalWidth||s.img.width,s.img.naturalHeight||s.img.height],s.tileSize=Kl(s.img),l(s)}),s.img.addEventListener("error",function(c){u(c)})})}var o=this.context.config.createImage;return new Promise(function(l,u){var c;if(o?c=o(i):bs&&(c=new window.Image),c){var d={img:c,size:[0,0],tileSize:Kl(c)};gn.put(i,d,n),c.onload=function(){d.size=[c.naturalWidth||c.width,c.naturalHeight||c.height],d.tileSize=Kl(d.img),l(d)},c.onerror=function(h){u(h)},c.crossOrigin="Anonymous",c.src=i}})}},{key:"createDownSampledImage",value:function(){var t=R0(js().mark(function n(i,a){var s,o,l,u,c,d,h,f,v,g,p,m,y,b;return js().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.getOrCreateImage(i,a);case 2:if(s=w.sent,typeof s.downSamplingRate=="undefined"){w.next=5;break}return w.abrupt("return",s);case 5:if(o=this.context.config.enableLargeImageOptimization,l=typeof o=="boolean"?{}:o,u=l.maxDownSampledImageSize,c=u===void 0?2048:u,d=l.downSamplingRateThreshold,h=d===void 0?.5:d,f=this.runtime.globalThis.createImageBitmap,v=D2(s.size,2),g=v[0],p=v[1],m=s.img,y=Math.min((c+c)/(g+p),Math.max(.01,Math.min(h,.5))),b=vi(vi({},s),{},{downSamplingRate:y}),gn.update(s.img.src,b,a),!f){w.next=25;break}return w.prev=14,w.next=17,f(s.img,{resizeWidth:g*y,resizeHeight:p*y});case 17:m=w.sent,w.next=23;break;case 20:w.prev=20,w.t0=w.catch(14),y=1;case 23:w.next=26;break;case 25:y=1;case 26:return b=vi(vi({},this.getImageSync(i,a)),{},{downSampled:m,downSamplingRate:y}),gn.update(s.img.src,b,a),w.abrupt("return",b);case 29:case"end":return w.stop()}},n,this,[[14,20]])}));function e(n,i){return t.apply(this,arguments)}return e}()},{key:"createImageTiles",value:function(){var t=R0(js().mark(function n(i,a,s,o){var l,u,c,d,h;return js().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.getOrCreateImage(i,o);case 2:return l=v.sent,u=o.ownerDocument.defaultView,c=u.requestAnimationFrame,d=u.cancelAnimationFrame,kh.api={requestAnimationFrame:c,cancelAnimationFrame:d,createCanvas:function(){return Od.createCanvas()}},h=vi(vi({},l),kh.sliceImage(l.img,l.tileSize[0],l.tileSize[0],s)),gn.update(l.img.src,h,o),v.abrupt("return",h);case 8:case"end":return v.stop()}},n,this)}));function e(n,i,a,s){return t.apply(this,arguments)}return e}()},{key:"releaseImage",value:function(e,n){gn.release((0,Se.Z)(e)?e:e.src,n)}},{key:"releaseImageRef",value:function(e){gn.releaseRef(e)}},{key:"getOrCreatePatternSync",value:function(e,n,i,a,s,o,l){var u=this.generatePatternKey(n);if(u&&this.patternCache[u])return this.patternCache[u];var c=n.image,d=n.repetition,h=n.transform,f,v=!1;if((0,Se.Z)(c)){var g=this.getImageSync(c,e,l);f=g==null?void 0:g.img}else a?(f=a,v=!0):f=c;var p=f&&i.createPattern(f,d);if(p){var m;h?m=Gg(Tg(h),new at({})):m=G.identity(G.create()),v&&G.scale(m,m,[1/s,1/s,1]),p.setTransform({a:m[0],b:m[1],c:m[4],d:m[5],e:m[12]+o[0],f:m[13]+o[1]})}return u&&p&&(this.patternCache[u]=p),p}},{key:"getOrCreateGradient",value:function(e,n){var i=this.generateGradientKey(e),a=e.type,s=e.steps,o=e.min,l=e.width,u=e.height,c=e.angle,d=e.cx,h=e.cy,f=e.size;if(this.gradientCache[i])return this.gradientCache[i];var v=null;if(a===Jr.LinearGradient){var g=TE(o,l,u,c),p=g.x1,m=g.y1,y=g.x2,b=g.y2;v=n.createLinearGradient(p,m,y,b)}else if(a===Jr.RadialGradient){var _=AE(o,l,u,d,h,f),w=_.x,x=_.y,E=_.r;v=n.createRadialGradient(w,x,0,w,x,E)}return v&&(s.forEach(function(k){var O=k.offset,P=k.color;if(O.unit===re.kPercentage){var M;(M=v)===null||M===void 0||M.addColorStop(O.value/100,P.toString())}}),this.gradientCache[i]=v),this.gradientCache[i]}},{key:"generateGradientKey",value:function(e){var n=e.type,i=e.min,a=e.width,s=e.height,o=e.steps,l=e.angle,u=e.cx,c=e.cy,d=e.size;return"gradient-".concat(n,"-").concat((l==null?void 0:l.toString())||0,"-").concat((u==null?void 0:u.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat((d==null?void 0:d.toString())||0,"-").concat(i[0],"-").concat(i[1],"-").concat(a,"-").concat(s,"-").concat(o.map(function(h){var f=h.offset,v=h.color;return"".concat(f).concat(v)}).join("-"))}},{key:"generatePatternKey",value:function(e){var n=e.image,i=e.repetition;if((0,Se.Z)(n))return"pattern-".concat(n,"-").concat(i);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(i)}}])}();_h.isSupportTile=!!Od.createCanvas();function Kl(r){if(!r.complete)return[0,0];var t=r.naturalWidth||r.width,e=r.naturalHeight||r.height,n=256;return[256,512].forEach(function(i){var a=Math.ceil(e/i),s=Math.ceil(t/i);a*s<1e3&&(n=i)}),[n,n]}var L0=function(){function r(){zs(this,r)}return Gs(r,[{key:"apply",value:function(e){var n=e.renderingService,i=e.renderingContext,a=e.imagePool,s=i.root.ownerDocument.defaultView,o=function(d,h,f){var v=d.parsedStyle,g=v.width,p=v.height;g&&!p?d.setAttribute("height",f/h*g):!g&&p&&d.setAttribute("width",h/f*p)},l=function(d){var h=d.target,f=h.nodeName,v=h.attributes;if(f===Z.IMAGE){var g=v.src,p=v.keepAspectRatio;a.getImageSync(g,h,function(m){var y=m.img,b=y.width,_=y.height;p&&o(h,b,_),h.renderable.dirty=!0,n.dirtify()})}},u=function(d){var h=d.target,f=d.attrName,v=d.prevValue,g=d.newValue;h.nodeName!==Z.IMAGE||f!=="src"||(v!==g&&a.releaseImage(v,h),(0,Se.Z)(g)&&a.getOrCreateImage(g,h).then(function(p){var m=p.img,y=m.width,b=m.height;h.attributes.keepAspectRatio&&o(h,y,b),h.renderable.dirty=!0,n.dirtify()}).catch(function(){}))};n.hooks.init.tap(r.tag,function(){s.addEventListener(Te.MOUNTED,l),s.addEventListener(Te.ATTR_MODIFIED,u)}),n.hooks.destroy.tap(r.tag,function(){s.removeEventListener(Te.MOUNTED,l),s.removeEventListener(Te.ATTR_MODIFIED,u)})}}])}();L0.tag="LoadImage";var B2=function(r){function t(){var e;zs(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=C2(this,t,[].concat(i)),e.name="image-loader",e}return O2(t,r),Gs(t,[{key:"init",value:function(n){this.context.imagePool=new _h(this.context,n),this.addRenderingPlugin(new L0)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(qr);var pt=_2("renderState"),D0=function(){function r(t){Ba(this,r),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,pt,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=G.create(),this.dprMatrix=G.create(),this.tmpMat4=G.create(),this.vec3a=R.Ue(),this.vec3b=R.Ue(),this.vec3c=R.Ue(),this.vec3d=R.Ue(),this.canvasRendererPluginOptions=t}return Fa(r,[{key:"apply",value:function(e,n){var i=this;this.context=e;var a=this.context,s=a.config,o=a.camera,l=a.renderingService,u=a.renderingContext,c=a.rBushRoot,d=a.pathGeneratorFactory,h=s.renderer.getConfig().enableRenderingOptimization;s.renderer.getConfig().enableDirtyCheck=!1,s.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=c,this.pathGeneratorFactory=d;var f=e.contextService,v=u.root.ownerDocument.defaultView,g=function(b){var _=b.target,w=_.rBushNode;w.aabb&&i.removedRBushNodeAABBs.push(w.aabb)},p=function(b){var _=b.target,w=_.rBushNode;w.aabb&&i.removedRBushNodeAABBs.push(w.aabb)};l.hooks.init.tap(r.tag,function(){v.addEventListener(Te.UNMOUNTED,g),v.addEventListener(Te.CULLED,p);var y=f.getDPR(),b=s.width,_=s.height,w=f.getContext();i.clearRect(w,0,0,b*y,_*y,s.background)}),l.hooks.destroy.tap(r.tag,function(){v.removeEventListener(Te.UNMOUNTED,g),v.removeEventListener(Te.CULLED,p),i.renderQueue=[],i.removedRBushNodeAABBs=[],Er(i,pt)[pt]={restoreStack:[],prevObject:null,currentContext:null}}),l.hooks.beginFrame.tap(r.tag,function(){var y,b=f.getContext(),_=f.getDPR(),w=s.width,x=s.height,E=i.canvasRendererPluginOptions,k=E.dirtyObjectNumThreshold,O=E.dirtyObjectRatioThreshold,P=l.getStats(),M=P.total,L=P.rendered,D=L/M;i.clearFullScreen=i.clearFullScreenLastFrame||!((y=v.context.renderingPlugins[1])!==null&&y!==void 0&&y.isFirstTimeRenderingFinished)||l.disableDirtyRectangleRendering()||L>k&&D>O,b&&(typeof b.resetTransform=="function"?b.resetTransform():b.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(b,0,0,w*_,x*_,s.background))});var m=function(b,_){for(var w=[b];w.length>0;){var x=w.pop();x.isVisible()&&!x.isCulled()&&(h?i.renderDisplayObjectOptimized(x,_,i.context,Er(i,pt)[pt],n):i.renderDisplayObject(x,_,i.context,Er(i,pt)[pt],n));for(var E=x.sortable.sorted||x.childNodes,k=E.length-1;k>=0;k--)w.push(E[k])}};l.hooks.endFrame.tap(r.tag,function(){if(u.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}h=s.renderer.getConfig().enableRenderingOptimization,Er(i,pt)[pt]={restoreStack:[],prevObject:null,currentContext:Er(i,pt)[pt].currentContext},Er(i,pt)[pt].currentContext.clear(),i.clearFullScreenLastFrame=!1;var y=f.getContext(),b=f.getDPR();if(G.fromScaling(i.dprMatrix,[b,b,1]),G.multiply(i.vpMatrix,i.dprMatrix,o.getOrthoMatrix()),i.clearFullScreen)h?(y.save(),m(u.root,y),y.restore()):m(u.root,y),i.removedRBushNodeAABBs=[];else{var _=i.safeMergeAABB.apply(i,[i.mergeDirtyAABBs(i.renderQueue)].concat(w2(i.removedRBushNodeAABBs.map(function($){var le=$.minX,fe=$.minY,Le=$.maxX,Ze=$.maxY,or=new Ke;return or.setMinMax([le,fe,0],[Le,Ze,0]),or}))));if(i.removedRBushNodeAABBs=[],Ke.isEmpty(_)){i.renderQueue=[];return}var w=i.convertAABB2Rect(_),x=w.x,E=w.y,k=w.width,O=w.height,P=R.fF(i.vec3a,[x,E,0],i.vpMatrix),M=R.fF(i.vec3b,[x+k,E,0],i.vpMatrix),L=R.fF(i.vec3c,[x,E+O,0],i.vpMatrix),D=R.fF(i.vec3d,[x+k,E+O,0],i.vpMatrix),z=Math.min(P[0],M[0],D[0],L[0]),F=Math.min(P[1],M[1],D[1],L[1]),C=Math.max(P[0],M[0],D[0],L[0]),S=Math.max(P[1],M[1],D[1],L[1]),T=Math.floor(z),N=Math.floor(F),B=Math.ceil(C-z),I=Math.ceil(S-F);y.save(),i.clearRect(y,T,N,B,I,s.background),y.beginPath(),y.rect(T,N,B,I),y.clip(),y.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var W=s.renderer.getConfig(),X=W.enableDirtyRectangleRenderingDebug;X&&v.dispatchEvent(new Dt(un.DIRTY_RECTANGLE,{dirtyRect:{x:T,y:N,width:B,height:I}}));var H=i.searchDirtyObjects(_);H.sort(function($,le){return $.sortable.renderOrder-le.sortable.renderOrder}).forEach(function($){$&&$.isVisible()&&!$.isCulled()&&i.renderDisplayObject($,y,i.context,Er(i,pt)[pt],n)}),y.restore(),i.renderQueue.forEach(function($){i.saveDirtyAABB($)}),i.renderQueue=[]}Er(i,pt)[pt].restoreStack.forEach(function(){y.restore()}),Er(i,pt)[pt].restoreStack=[]}),l.hooks.render.tap(r.tag,function(y){i.clearFullScreen||i.renderQueue.push(y)})}},{key:"clearRect",value:function(e,n,i,a,s,o){e.clearRect(n,i,a,s),o&&(e.fillStyle=o,e.fillRect(n,i,a,s))}},{key:"renderDisplayObjectOptimized",value:function(e,n,i,a,s){var o=e.nodeName,l=!1,u=!1,c=this.context.styleRendererFactory[o],d=this.pathGeneratorFactory[o],h=e.parsedStyle.clipPath;if(h){l=!a.prevObject||!G.exactEquals(h.getWorldTransform(),a.prevObject.getWorldTransform()),l&&(this.applyWorldTransform(n,h),a.prevObject=null);var f=this.pathGeneratorFactory[h.nodeName];f&&(n.save(),u=!0,n.beginPath(),f(n,h.parsedStyle),n.closePath(),n.clip())}if(c){l=!a.prevObject||!G.exactEquals(e.getWorldTransform(),a.prevObject.getWorldTransform()),l&&this.applyWorldTransform(n,e);var v=!a.prevObject;if(!v){var g=a.prevObject.nodeName;o===Z.TEXT?v=g!==Z.TEXT:o===Z.IMAGE?v=g!==Z.IMAGE:v=g===Z.TEXT||g===Z.IMAGE}c.applyStyleToContext(n,e,v,a),a.prevObject=e}d&&(n.beginPath(),d(n,e.parsedStyle),o!==Z.LINE&&o!==Z.PATH&&o!==Z.POLYLINE&&n.closePath()),c&&c.drawToContext(n,e,Er(this,pt)[pt],this,s),u&&n.restore(),e.renderable.dirty=!1}},{key:"renderDisplayObject",value:function(e,n,i,a,s){var o=e.nodeName,l=a.restoreStack[a.restoreStack.length-1];l&&!(e.compareDocumentPosition(l)&it.DOCUMENT_POSITION_CONTAINS)&&(n.restore(),a.restoreStack.pop());var u=this.context.styleRendererFactory[o],c=this.pathGeneratorFactory[o],d=e.parsedStyle.clipPath;if(d){this.applyWorldTransform(n,d);var h=this.pathGeneratorFactory[d.nodeName];h&&(n.save(),a.restoreStack.push(e),n.beginPath(),h(n,d.parsedStyle),n.closePath(),n.clip())}u&&(this.applyWorldTransform(n,e),n.save(),this.applyAttributesToContext(n,e)),c&&(n.beginPath(),c(n,e.parsedStyle),o!==Z.LINE&&o!==Z.PATH&&o!==Z.POLYLINE&&n.closePath()),u&&(u.render(n,e.parsedStyle,e,i,this,s),n.restore()),e.renderable.dirty=!1}},{key:"applyAttributesToContext",value:function(e,n){var i=n.parsedStyle,a=i.stroke,s=i.fill,o=i.opacity,l=i.lineDash,u=i.lineDashOffset;l&&e.setLineDash(l),(0,ue.Z)(u)||(e.lineDashOffset=u),(0,ue.Z)(o)||(e.globalAlpha*=o),!(0,ue.Z)(a)&&!Array.isArray(a)&&!a.isNone&&(e.strokeStyle=n.attributes.stroke),!(0,ue.Z)(s)&&!Array.isArray(s)&&!s.isNone&&(e.fillStyle=n.attributes.fill)}},{key:"convertAABB2Rect",value:function(e){var n=e.getMin(),i=e.getMax(),a=Math.floor(n[0]),s=Math.floor(n[1]),o=Math.ceil(i[0]),l=Math.ceil(i[1]),u=o-a,c=l-s;return{x:a,y:s,width:u,height:c}}},{key:"mergeDirtyAABBs",value:function(e){var n=new Ke;return e.forEach(function(i){var a=i.getRenderBounds();n.add(a);var s=i.renderable.dirtyRenderBounds;s&&n.add(s)}),n}},{key:"searchDirtyObjects",value:function(e){var n=e.getMin(),i=Yl(n,2),a=i[0],s=i[1],o=e.getMax(),l=Yl(o,2),u=l[0],c=l[1],d=this.rBush.search({minX:a,minY:s,maxX:u,maxY:c});return d.map(function(h){var f=h.displayObject;return f})}},{key:"saveDirtyAABB",value:function(e){var n=e.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new Ke);var i=e.getRenderBounds();i&&n.dirtyRenderBounds.update(i.center,i.halfExtents)}},{key:"applyWorldTransform",value:function(e,n,i){i?(G.copy(this.tmpMat4,n.getLocalTransform()),G.multiply(this.tmpMat4,i,this.tmpMat4),G.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(G.copy(this.tmpMat4,n.getWorldTransform()),G.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var e=new Ke,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return i.forEach(function(s){e.add(s)}),e}}])}();D0.tag="CanvasRenderer";function $l(r,t,e,n,i,a,s){var o,l;if(r.image.nodeName==="rect"){var u=r.image.parsedStyle,c=u.width,d=u.height;l=n.contextService.getDPR();var h=n.config.offscreenCanvas;o=a.offscreenCanvasCreator.getOrCreateCanvas(h),o.width=c*l,o.height=d*l;var f=a.offscreenCanvasCreator.getOrCreateContext(h),v={restoreStack:[],prevObject:null,currentContext:new Map};r.image.forEach(function(p){i.renderDisplayObject(p,f,n,v,a)}),v.restoreStack.forEach(function(){f.restore()})}var g=s.getOrCreatePatternSync(t,r,e,o,l,t.getGeometryBounds().min,function(){t.renderable.dirty=!0,n.renderingService.dirtify()});return g}function ql(r,t,e,n){var i;if(r.type===Jr.LinearGradient||r.type===Jr.RadialGradient){var a=t.getGeometryBounds(),s=a&&a.halfExtents[0]*2||1,o=a&&a.halfExtents[1]*2||1,l=a&&a.min||[0,0];i=n.getOrCreateGradient(mh(mh({type:r.type},r.value),{},{min:l,width:s,height:o}),e)}return i}var Jl=["shadowBlur","shadowOffsetX","shadowOffsetY"],I0=["lineCap","lineJoin","miterLimit"],xt={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},B0={};function ot(r,t,e,n){var i=n.has(t)?n.get(t):xt[t];return i!==e&&(t==="lineDash"?r.setLineDash(e):r[t]=e,n.set(t,e)),i}var F2=function(){function r(t){Ba(this,r),this.imagePool=t}return Fa(r,[{key:"applyAttributesToContext",value:function(e,n){}},{key:"render",value:function(e,n,i,a,s,o){}},{key:"applyCommonStyleToContext",value:function(e,n,i,a){var s=i?B0:a.prevObject.parsedStyle,o=n.parsedStyle;(i||o.opacity!==s.opacity)&&ot(e,"globalAlpha",(0,ue.Z)(o.opacity)?xt.globalAlpha:o.opacity,a.currentContext),(i||o.blend!==s.blend)&&ot(e,"globalCompositeOperation",(0,ue.Z)(o.blend)?xt.globalCompositeOperation:o.blend,a.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(e,n,i,a){var s=i?B0:a.prevObject.parsedStyle,o=n.parsedStyle,l=o.lineWidth,u=l===void 0?xt.lineWidth:l,c=o.fill&&!o.fill.isNone,d=o.stroke&&!o.stroke.isNone&&u>0;if(d){if(i||n.attributes.stroke!==a.prevObject.attributes.stroke){var h=!(0,ue.Z)(o.stroke)&&!Array.isArray(o.stroke)&&!o.stroke.isNone?n.attributes.stroke:xt.strokeStyle;ot(e,"strokeStyle",h,a.currentContext)}(i||o.lineWidth!==s.lineWidth)&&ot(e,"lineWidth",(0,ue.Z)(o.lineWidth)?xt.lineWidth:o.lineWidth,a.currentContext),(i||o.lineDash!==s.lineDash)&&ot(e,"lineDash",o.lineDash||xt.lineDash,a.currentContext),(i||o.lineDashOffset!==s.lineDashOffset)&&ot(e,"lineDashOffset",(0,ue.Z)(o.lineDashOffset)?xt.lineDashOffset:o.lineDashOffset,a.currentContext);for(var f=0;f<I0.length;f++){var v=I0[f];(i||o[v]!==s[v])&&ot(e,v,(0,ue.Z)(o[v])?xt[v]:o[v],a.currentContext)}}if(c&&(i||n.attributes.fill!==a.prevObject.attributes.fill)){var g=!(0,ue.Z)(o.fill)&&!Array.isArray(o.fill)&&!o.fill.isNone?n.attributes.fill:xt.fillStyle;ot(e,"fillStyle",g,a.currentContext)}}},{key:"applyStyleToContext",value:function(e,n,i,a){var s=n.nodeName;this.applyCommonStyleToContext(e,n,i,a),s===Z.IMAGE||this.applyStrokeFillStyleToContext(e,n,i,a)}},{key:"applyShadowAndFilterStyleToContext",value:function(e,n,i,a){var s=n.parsedStyle;if(i){ot(e,"shadowColor",s.shadowColor.toString(),a.currentContext);for(var o=0;o<Jl.length;o++){var l=Jl[o];ot(e,l,s[l]||xt[l],a.currentContext)}}s.filter&&s.filter.length&&ot(e,"filter",n.attributes.filter,a.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(e,n,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n){ot(e,"shadowColor",xt.shadowColor,a.currentContext);for(var o=0;o<Jl.length;o++){var l=Jl[o];ot(e,l,xt[l],a.currentContext)}}if(i)if(n&&s){var u=e.filter;!(0,ue.Z)(u)&&u.indexOf("drop-shadow")>-1&&ot(e,"filter",u.replace(/drop-shadow\([^)]*\)/,"").trim()||xt.filter,a.currentContext)}else ot(e,"filter",xt.filter,a.currentContext)}},{key:"fillToContext",value:function(e,n,i,a,s){var o=this,l=n.parsedStyle,u=l.fill,c=l.fillRule,d=null;if(Array.isArray(u)&&u.length>0)u.forEach(function(f){var v,g=ot(e,"fillStyle",ql(f,n,e,o.imagePool),i.currentContext);d=(v=d)!==null&&v!==void 0?v:g,c?e.fill(c):e.fill()});else{if(Ni(u)){var h=$l(u,n,e,n.ownerDocument.defaultView.context,a,s,this.imagePool);h&&(e.fillStyle=h,d=!0)}c?e.fill(c):e.fill()}d!==null&&ot(e,"fillStyle",d,i.currentContext)}},{key:"strokeToContext",value:function(e,n,i,a,s){var o=this,l=n.parsedStyle.stroke,u=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(f){var v,g=ot(e,"strokeStyle",ql(f,n,e,o.imagePool),i.currentContext);u=(v=u)!==null&&v!==void 0?v:g,e.stroke()});else{if(Ni(l)){var c=$l(l,n,e,n.ownerDocument.defaultView.context,a,s,this.imagePool);if(c){var d,h=ot(e,"strokeStyle",c,i.currentContext);u=(d=u)!==null&&d!==void 0?d:h}}e.stroke()}u!==null&&ot(e,"strokeStyle",u,i.currentContext)}},{key:"drawToContext",value:function(e,n,i,a,s){var o,l=n.nodeName,u=n.parsedStyle,c=u.opacity,d=c===void 0?xt.globalAlpha:c,h=u.fillOpacity,f=h===void 0?xt.fillOpacity:h,v=u.strokeOpacity,g=v===void 0?xt.strokeOpacity:v,p=u.lineWidth,m=p===void 0?xt.lineWidth:p,y=u.fill&&!u.fill.isNone,b=u.stroke&&!u.stroke.isNone&&m>0;if(!(!y&&!b)){var _=!(0,ue.Z)(u.shadowColor)&&u.shadowBlur>0,w=u.shadowType==="inner",x=((o=u.fill)===null||o===void 0?void 0:o.alpha)===0,E=!!(u.filter&&u.filter.length),k=_&&b&&(l===Z.PATH||l===Z.LINE||l===Z.POLYLINE||x||w),O=null;if(y){k||this.applyShadowAndFilterStyleToContext(e,n,_,i);var P=d*f;O=ot(e,"globalAlpha",P,i.currentContext),this.fillToContext(e,n,i,a,s),k||this.clearShadowAndFilterStyleForContext(e,_,E,i)}if(b){var M=!1,L=d*g,D=ot(e,"globalAlpha",L,i.currentContext);if(O=y?O:D,k&&(this.applyShadowAndFilterStyleToContext(e,n,_,i),M=!0,w)){var z=e.globalCompositeOperation;e.globalCompositeOperation="source-atop",this.strokeToContext(e,n,i,a,s),e.globalCompositeOperation=z,this.clearShadowAndFilterStyleForContext(e,_,E,i,!0)}this.strokeToContext(e,n,i,a,s),M&&this.clearShadowAndFilterStyleForContext(e,_,E,i)}O!==null&&ot(e,"globalAlpha",O,i.currentContext)}}}])}(),Sh=function(r){function t(){return Ba(this,t),Hl(this,t,arguments)}return Ul(t,r),Fa(t,[{key:"render",value:function(n,i,a,s,o,l){var u=i.fill,c=i.fillRule,d=i.opacity,h=d===void 0?1:d,f=i.fillOpacity,v=f===void 0?1:f,g=i.stroke,p=i.strokeOpacity,m=p===void 0?1:p,y=i.lineWidth,b=y===void 0?1:y,_=i.lineCap,w=i.lineJoin,x=i.shadowType,E=i.shadowColor,k=i.shadowBlur,O=i.filter,P=i.miterLimit,M=u&&!u.isNone,L=g&&!g.isNone&&b>0,D=(u==null?void 0:u.alpha)===0,z=!!(O&&O.length),F=!(0,ue.Z)(E)&&k>0,C=a.nodeName,S=x==="inner",T=L&&F&&(C===Z.PATH||C===Z.LINE||C===Z.POLYLINE||D||S);M&&(n.globalAlpha=h*v,T||Ql(a,n,F),F0(n,a,u,c,s,o,l,this.imagePool),T||this.clearShadowAndFilter(n,z,F)),L&&(n.globalAlpha=h*m,n.lineWidth=b,(0,ue.Z)(P)||(n.miterLimit=P),(0,ue.Z)(_)||(n.lineCap=_),(0,ue.Z)(w)||(n.lineJoin=w),T&&(S&&(n.globalCompositeOperation="source-atop"),Ql(a,n,!0),S&&(Th(n,a,g,s,o,l,this.imagePool),n.globalCompositeOperation=xt.globalCompositeOperation,this.clearShadowAndFilter(n,z,!0))),Th(n,a,g,s,o,l,this.imagePool))}},{key:"clearShadowAndFilter",value:function(n,i,a){if(a&&(n.shadowColor="transparent",n.shadowBlur=0),i){var s=n.filter;!(0,ue.Z)(s)&&s.indexOf("drop-shadow")>-1&&(n.filter=s.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(F2);function Ql(r,t,e){var n=r.parsedStyle,i=n.filter,a=n.shadowColor,s=n.shadowBlur,o=n.shadowOffsetX,l=n.shadowOffsetY;i&&i.length&&(t.filter=r.style.filter),e&&(t.shadowColor=a.toString(),t.shadowBlur=s||0,t.shadowOffsetX=o||0,t.shadowOffsetY=l||0)}function F0(r,t,e,n,i,a,s,o){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(e)?e.forEach(function(u){r.fillStyle=ql(u,t,r,o),l||(n?r.fill(n):r.fill())}):(Ni(e)&&(r.fillStyle=$l(e,t,r,i,a,s,o)),l||(n?r.fill(n):r.fill()))}function Th(r,t,e,n,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(e)?e.forEach(function(l){r.strokeStyle=ql(l,t,r,s),o||r.stroke()}):(Ni(e)&&(r.strokeStyle=$l(e,t,r,n,i,a,s)),o||r.stroke())}function z2(r,t){var e=Yl(r,4),n=e[0],i=e[1],a=e[2],s=e[3],o=Yl(t,4),l=o[0],u=o[1],c=o[2],d=o[3],h=Math.max(n,l),f=Math.max(i,u),v=Math.min(n+a,l+c),g=Math.min(i+s,u+d);return v<=h||g<=f?null:[h,f,v-h,g-f]}function G2(r,t){var e=R.fF(R.Ue(),[r[0],r[1],0],t),n=R.fF(R.Ue(),[r[0]+r[2],r[1],0],t),i=R.fF(R.Ue(),[r[0],r[1]+r[3],0],t),a=R.fF(R.Ue(),[r[0]+r[2],r[1]+r[3],0],t);return[Math.min(e[0],n[0],i[0],a[0]),Math.min(e[1],n[1],i[1],a[1]),Math.max(e[0],n[0],i[0],a[0])-Math.min(e[0],n[0],i[0],a[0]),Math.max(e[1],n[1],i[1],a[1])-Math.min(e[1],n[1],i[1],a[1])]}var j2=function(r){function t(){return Ba(this,t),Hl(this,t,arguments)}return Ul(t,r),Fa(t,[{key:"renderDownSampled",value:function(n,i,a,s){var o=s.src,l=s.imageCache;if(!l.downSampled){this.imagePool.createDownSampledImage(o,a).then(function(u){a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify()}).catch(function(){});return}n.drawImage(l.downSampled,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}},{key:"renderTile",value:function(n,i,a,s){var o=s.src,l=s.imageCache,u=s.imageRect,c=s.drawRect,d=l.size,h=n.getTransform(),f=h.a,v=h.b,g=h.c,p=h.d,m=h.e,y=h.f;if(n.resetTransform(),!(l!=null&&l.gridSize)){this.imagePool.createImageTiles(o,[],function(){a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify()},a).catch(function(){});return}for(var b=[d[0]/u[2],d[1]/u[3]],_=[l.tileSize[0]/b[0],l.tileSize[1]/b[1]],w=[Math.floor((c[0]-u[0])/_[0]),Math.ceil((c[0]+c[2]-u[0])/_[0])],x=w[0],E=w[1],k=[Math.floor((c[1]-u[1])/_[1]),Math.ceil((c[1]+c[3]-u[1])/_[1])],O=k[0],P=k[1],M=O;M<=P;M++)for(var L=x;L<=E;L++){var D=l.tiles[M][L];if(D){var z=[Math.floor(u[0]+D.tileX*_[0]),Math.floor(u[1]+D.tileY*_[1]),Math.ceil(_[0]),Math.ceil(_[1])];n.drawImage(D.data,z[0],z[1],z[2],z[3])}}n.setTransform(f,v,g,p,m,y)}},{key:"render",value:function(n,i,a){var s=i.x,o=s===void 0?0:s,l=i.y,u=l===void 0?0:l,c=i.width,d=i.height,h=i.src,f=i.shadowColor,v=i.shadowBlur,g=this.imagePool.getImageSync(h,a),p=g==null?void 0:g.img,m=c,y=d;if(p){m||(m=p.width),y||(y=p.height);var b=!(0,ue.Z)(f)&&v>0;Ql(a,n,b);try{var _=a.ownerDocument.defaultView.getContextService().getDomElement(),w=_.width,x=_.height,E=n.getTransform(),k=E.a,O=E.b,P=E.c,M=E.d,L=E.e,D=E.f,z=G.fromValues(k,P,0,0,O,M,0,0,0,0,1,0,L,D,0,1),F=G2([o,u,m,y],z),C=z2([0,0,w,x],F);if(!C)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){t.renderFull(n,i,a,{image:p,drawRect:[o,u,m,y]});return}var S=F[2]/g.size[0];if(S<(g.downSamplingRate||.5)){this.renderDownSampled(n,i,a,{src:h,imageCache:g,drawRect:[o,u,m,y]});return}if(!_h.isSupportTile){t.renderFull(n,i,a,{image:p,drawRect:[o,u,m,y]});return}this.renderTile(n,i,a,{src:h,imageCache:g,imageRect:F,drawRect:C})}catch(T){}}}},{key:"drawToContext",value:function(n,i,a,s,o){this.render(n,i.parsedStyle,i)}}],[{key:"renderFull",value:function(n,i,a,s){n.drawImage(s.image,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}}])}(Sh),W2=function(r){function t(){return Ba(this,t),Hl(this,t,arguments)}return Ul(t,r),Fa(t,[{key:"render",value:function(n,i,a,s,o,l){a.getBounds();var u=i.lineWidth,c=u===void 0?1:u,d=i.textAlign,h=d===void 0?"start":d,f=i.textBaseline,v=f===void 0?"alphabetic":f,g=i.lineJoin,p=g===void 0?"miter":g,m=i.miterLimit,y=m===void 0?10:m,b=i.letterSpacing,_=b===void 0?0:b,w=i.stroke,x=i.fill,E=i.fillRule,k=i.fillOpacity,O=k===void 0?1:k,P=i.strokeOpacity,M=P===void 0?1:P,L=i.opacity,D=L===void 0?1:L,z=i.metrics,F=i.x,C=F===void 0?0:F,S=i.y,T=S===void 0?0:S,N=i.dx,B=i.dy,I=i.shadowColor,W=i.shadowBlur,X=z.font,H=z.lines,$=z.height,le=z.lineHeight,fe=z.lineMetrics;n.font=X,n.lineWidth=c,n.textAlign=h==="middle"?"center":h;var Le=v;Le==="alphabetic"&&(Le="bottom"),n.lineJoin=p,(0,ue.Z)(y)||(n.miterLimit=y);var Ze=T;v==="middle"?Ze+=-$/2-le/2:v==="bottom"||v==="alphabetic"||v==="ideographic"?Ze+=-$:(v==="top"||v==="hanging")&&(Ze+=-le);var or=C+(N||0);Ze+=B||0,H.length===1&&(Le==="bottom"?(Le="middle",Ze-=.5*$):Le==="top"&&(Le="middle",Ze+=.5*$)),n.textBaseline=Le;var sa=!(0,ue.Z)(I)&&W>0;Ql(a,n,sa);for(var _n=0;_n<H.length;_n++){var Ur=c/2+or;Ze+=le,!(0,ue.Z)(w)&&!w.isNone&&c&&this.drawLetterSpacing(n,a,H[_n],fe[_n],h,Ur,Ze,_,x,E,O,w,M,D,!0,s,o,l),(0,ue.Z)(x)||this.drawLetterSpacing(n,a,H[_n],fe[_n],h,Ur,Ze,_,x,E,O,w,M,D,!1,s,o,l)}}},{key:"drawLetterSpacing",value:function(n,i,a,s,o,l,u,c,d,h,f,v,g,p,m,y,b,_){if(c===0){m?this.strokeText(n,i,a,l,u,v,g,y,b,_):this.fillText(n,i,a,l,u,d,h,f,p,y,b,_);return}var w=n.textAlign;n.textAlign="left";var x=l;o==="center"||o==="middle"?x=l-s.width/2:(o==="right"||o==="end")&&(x=l-s.width);for(var E=Array.from(a),k=n.measureText(a).width,O=0,P=0;P<E.length;++P){var M=E[P];m?this.strokeText(n,i,M,x,u,v,g,y,b,_):this.fillText(n,i,M,x,u,d,h,f,p,y,b,_),O=n.measureText(a.substring(P+1)).width,x+=k-O+c,k=O}n.textAlign=w}},{key:"fillText",value:function(n,i,a,s,o,l,u,c,d,h,f,v){F0(n,i,l,u,h,f,v,this.imagePool,!0);var g,p=!(0,ue.Z)(c)&&c!==1;p&&(g=n.globalAlpha,n.globalAlpha=c*d),n.fillText(a,s,o),p&&(n.globalAlpha=g)}},{key:"strokeText",value:function(n,i,a,s,o,l,u,c,d,h){Th(n,i,l,c,d,h,this.imagePool,!0);var f,v=!(0,ue.Z)(u)&&u!==1;v&&(f=n.globalAlpha,n.globalAlpha=u),n.strokeText(a,s,o),v&&(n.globalAlpha=f)}},{key:"drawToContext",value:function(n,i,a,s,o){this.render(n,i.parsedStyle,i,i.ownerDocument.defaultView.context,s,o)}}])}(Sh),Z2=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Ba(this,t),e=Hl(this,t),e.name="canvas-renderer",e.options=n,e}return Ul(t,r),Fa(t,[{key:"init",value:function(){var n,i=mh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,s=new Sh(a),o=(n={},tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(n,Z.CIRCLE,s),Z.ELLIPSE,s),Z.RECT,s),Z.IMAGE,new j2(a)),Z.TEXT,new W2(a)),Z.LINE,s),Z.POLYLINE,s),Z.POLYGON,s),Z.PATH,s),Z.GROUP,void 0),tn(tn(tn(n,Z.HTML,void 0),Z.MESH,void 0),Z.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new D0(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(qr);var z0=function(){function r(){q(this,r)}return J(r,[{key:"apply",value:function(e,n){var i=this,a=e.renderingService,s=e.renderingContext,o=e.config;this.context=e;var l=s.root.ownerDocument.defaultView,u=function(k){a.hooks.pointerMove.call(k)},c=function(k){a.hooks.pointerUp.call(k)},d=function(k){a.hooks.pointerDown.call(k)},h=function(k){a.hooks.pointerOver.call(k)},f=function(k){a.hooks.pointerOut.call(k)},v=function(k){a.hooks.pointerCancel.call(k)},g=function(k){a.hooks.pointerWheel.call(k)},p=function(k){a.hooks.click.call(k)},m=function(k){n.globalThis.document.addEventListener("pointermove",u,!0),k.addEventListener("pointerdown",d,!0),k.addEventListener("pointerleave",f,!0),k.addEventListener("pointerover",h,!0),n.globalThis.addEventListener("pointerup",c,!0),n.globalThis.addEventListener("pointercancel",v,!0)},y=function(k){k.addEventListener("touchstart",d,!0),k.addEventListener("touchend",c,!0),k.addEventListener("touchmove",u,!0),k.addEventListener("touchcancel",v,!0)},b=function(k){n.globalThis.document.addEventListener("mousemove",u,!0),k.addEventListener("mousedown",d,!0),k.addEventListener("mouseout",f,!0),k.addEventListener("mouseover",h,!0),n.globalThis.addEventListener("mouseup",c,!0)},_=function(k){n.globalThis.document.removeEventListener("pointermove",u,!0),k.removeEventListener("pointerdown",d,!0),k.removeEventListener("pointerleave",f,!0),k.removeEventListener("pointerover",h,!0),n.globalThis.removeEventListener("pointerup",c,!0),n.globalThis.removeEventListener("pointercancel",v,!0)},w=function(k){k.removeEventListener("touchstart",d,!0),k.removeEventListener("touchend",c,!0),k.removeEventListener("touchmove",u,!0),k.removeEventListener("touchcancel",v,!0)},x=function(k){n.globalThis.document.removeEventListener("mousemove",u,!0),k.removeEventListener("mousedown",d,!0),k.removeEventListener("mouseout",f,!0),k.removeEventListener("mouseover",h,!0),n.globalThis.removeEventListener("mouseup",c,!0)};a.hooks.init.tap(r.tag,function(){var E=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(E.style.msContentZooming="none",E.style.msTouchAction="none"):l.supportsPointerEvents&&(E.style.touchAction="none"),l.supportsPointerEvents?m(E):b(E),l.supportsTouchEvents&&y(E),o.useNativeClickEvent&&E.addEventListener("click",p,!0),E.addEventListener("wheel",g,{passive:!0,capture:!0})}),a.hooks.destroy.tap(r.tag,function(){var E=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(E.style.msContentZooming="",E.style.msTouchAction=""):l.supportsPointerEvents&&(E.style.touchAction=""),l.supportsPointerEvents?_(E):x(E),l.supportsTouchEvents&&w(E),o.useNativeClickEvent&&E.removeEventListener("click",p,!0),E.removeEventListener("wheel",g,!0)})}}])}();z0.tag="DOMInteraction";var V2=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.name="dom-interaction",e}return Oe(t,r),J(t,[{key:"init",value:function(){this.addRenderingPlugin(new z0)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(qr);var H2="g-canvas-camera",G0=function(){function r(){q(this,r),this.displayObjectHTMLElementMap=new WeakMap}return J(r,[{key:"joinTransformMatrix",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([e[0],e[1],e[4],e[5],e[12]+n[0],e[13]+n[1]].join(","),")")}},{key:"apply",value:function(e,n){var i=this,a=e.camera,s=e.renderingContext,o=e.renderingService;this.context=e;var l=s.root.ownerDocument.defaultView,u=l.context.eventService.nativeHTMLMap,c=function(m,y){y.style.transform=i.joinTransformMatrix(m.getWorldTransform(),m.getOrigin())},d=function(m){var y=m.target;if(y.nodeName===Z.HTML){i.$camera||(i.$camera=i.createCamera(a));var b=i.getOrCreateEl(y);i.$camera.appendChild(b),Object.keys(y.attributes).forEach(function(_){i.updateAttribute(_,y)}),c(y,b),u.set(b,y)}},h=function(m){var y=m.target;if(y.nodeName===Z.HTML&&i.$camera){var b=i.getOrCreateEl(y);b&&(b.remove(),u.delete(b))}},f=function(m){var y=m.target;if(y.nodeName===Z.HTML){var b=m.attrName;i.updateAttribute(b,y)}},v=function(m){var y=m.target,b=y.nodeName===Z.FRAGMENT?y.childNodes:[y];b.forEach(function(_){if(_.nodeName===Z.HTML){var w=i.getOrCreateEl(_);c(_,w)}})},g=function(){if(i.$camera){var m=i.context.config,y=m.width,b=m.height;i.$camera.parentElement.style.width="".concat(y||0,"px"),i.$camera.parentElement.style.height="".concat(b||0,"px")}};o.hooks.init.tap(r.tag,function(){l.addEventListener(un.RESIZE,g),l.addEventListener(Te.MOUNTED,d),l.addEventListener(Te.UNMOUNTED,h),l.addEventListener(Te.ATTR_MODIFIED,f),l.addEventListener(Te.BOUNDS_CHANGED,v)}),o.hooks.endFrame.tap(r.tag,function(){i.$camera&&s.renderReasons.has(wa.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),o.hooks.destroy.tap(r.tag,function(){i.$camera&&i.$camera.remove(),l.removeEventListener(un.RESIZE,g),l.removeEventListener(Te.MOUNTED,d),l.removeEventListener(Te.UNMOUNTED,h),l.removeEventListener(Te.ATTR_MODIFIED,f),l.removeEventListener(Te.BOUNDS_CHANGED,v)})}},{key:"createCamera",value:function(e){var n=this.context.config,i=n.document,a=n.width,s=n.height,o=this.context.contextService.getDomElement(),l=o.parentNode;if(l){var u=H2,c=l.querySelector("#".concat(u));if(!c){var d=(i||document).createElement("div");d.style.overflow="hidden",d.style.pointerEvents="none",d.style.position="absolute",d.style.left="0px",d.style.top="0px",d.style.width="".concat(a||0,"px"),d.style.height="".concat(s||0,"px");var h=(i||document).createElement("div");c=h,h.id=u,h.style.position="absolute",h.style.left="".concat(o.offsetLeft||0,"px"),h.style.top="".concat(o.offsetTop||0,"px"),h.style.transformOrigin="left top",h.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),h.style.pointerEvents="none",h.style.width="100%",h.style.height="100%",d.appendChild(h),l.appendChild(d)}return c}return null}},{key:"getOrCreateEl",value:function(e){var n=this.context.config.document,i=this.displayObjectHTMLElementMap.get(e);return i||(i=(n||document).createElement("div"),e.parsedStyle.$el=i,this.displayObjectHTMLElementMap.set(e,i),e.id&&(i.id=e.id),e.name&&i.setAttribute("name",e.name),e.className&&(i.className=e.className),i.style.position="absolute",i.style["will-change"]="transform",i.style.transform=this.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())),i}},{key:"updateAttribute",value:function(e,n){var i=this.getOrCreateEl(n);switch(e){case"innerHTML":var a=n.parsedStyle.innerHTML;(0,Se.Z)(a)?i.innerHTML=a:(i.innerHTML="",i.appendChild(a));break;case"x":i.style.left="".concat(n.parsedStyle.x,"px");break;case"y":i.style.top="".concat(n.parsedStyle.y,"px");break;case"transformOrigin":var s=n.parsedStyle.transformOrigin;i.style["transform-origin"]="".concat(s[0].buildCSSText(null,null,"")," ").concat(s[1].buildCSSText(null,null,""));break;case"width":var o=n.parsedStyle.width;i.style.width=(0,oe.Z)(o)?"".concat(o,"px"):o.toString();break;case"height":var l=n.parsedStyle.height;i.style.height=(0,oe.Z)(l)?"".concat(l,"px"):l.toString();break;case"zIndex":var u=n.parsedStyle.zIndex;i.style["z-index"]="".concat(u);break;case"visibility":var c=n.parsedStyle.visibility;i.style.visibility=c;break;case"pointerEvents":var d=n.parsedStyle.pointerEvents,h=d===void 0?"auto":d;i.style.pointerEvents=h;break;case"opacity":var f=n.parsedStyle.opacity;i.style.opacity="".concat(f);break;case"fill":var v=n.parsedStyle.fill,g="";Uo(v)?v.isNone?g="transparent":g=n.getAttribute("fill"):Array.isArray(v)?g=n.getAttribute("fill"):Ni(v),i.style.background=g;break;case"stroke":var p=n.parsedStyle.stroke,m="";Uo(p)?p.isNone?m="transparent":m=n.getAttribute("stroke"):Array.isArray(p)?m=n.getAttribute("stroke"):Ni(p),i.style["border-color"]=m,i.style["border-style"]="solid";break;case"lineWidth":var y=n.parsedStyle.lineWidth;i.style["border-width"]="".concat(y||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var b=n.style.filter;i.style.filter=b;break;default:!(0,ue.Z)(n.style[e])&&n.style[e]!==""&&(i.style[e]=n.style[e])}}}])}();G0.tag="HTMLRendering";var U2=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.name="html-renderer",e}return Oe(t,r),J(t,[{key:"init",value:function(){this.addRenderingPlugin(new G0)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(qr);function Ws(){"use strict";Ws=function(){return t};var r,t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(C,S,T){C[S]=T.value},a=typeof Symbol=="function"?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(C,S,T){return Object.defineProperty(C,S,{value:T,enumerable:!0,configurable:!0,writable:!0}),C[S]}try{u({},"")}catch(C){u=function(T,N,B){return T[N]=B}}function c(C,S,T,N){var B=S&&S.prototype instanceof m?S:m,I=Object.create(B.prototype),W=new z(N||[]);return i(I,"_invoke",{value:P(C,T,W)}),I}function d(C,S,T){try{return{type:"normal",arg:C.call(S,T)}}catch(N){return{type:"throw",arg:N}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",g="completed",p={};function m(){}function y(){}function b(){}var _={};u(_,s,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(F([])));x&&x!==e&&n.call(x,s)&&(_=x);var E=b.prototype=m.prototype=Object.create(_);function k(C){["next","throw","return"].forEach(function(S){u(C,S,function(T){return this._invoke(S,T)})})}function O(C,S){function T(B,I,W,X){var H=d(C[B],C,I);if(H.type!=="throw"){var $=H.arg,le=$.value;return le&&ti(le)=="object"&&n.call(le,"__await")?S.resolve(le.__await).then(function(fe){T("next",fe,W,X)},function(fe){T("throw",fe,W,X)}):S.resolve(le).then(function(fe){$.value=fe,W($)},function(fe){return T("throw",fe,W,X)})}X(H.arg)}var N;i(this,"_invoke",{value:function(I,W){function X(){return new S(function(H,$){T(I,W,H,$)})}return N=N?N.then(X,X):X()}})}function P(C,S,T){var N=h;return function(B,I){if(N===v)throw Error("Generator is already running");if(N===g){if(B==="throw")throw I;return{value:r,done:!0}}for(T.method=B,T.arg=I;;){var W=T.delegate;if(W){var X=M(W,T);if(X){if(X===p)continue;return X}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(N===h)throw N=g,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);N=v;var H=d(C,S,T);if(H.type==="normal"){if(N=T.done?g:f,H.arg===p)continue;return{value:H.arg,done:T.done}}H.type==="throw"&&(N=g,T.method="throw",T.arg=H.arg)}}}function M(C,S){var T=S.method,N=C.iterator[T];if(N===r)return S.delegate=null,T==="throw"&&C.iterator.return&&(S.method="return",S.arg=r,M(C,S),S.method==="throw")||T!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+T+"' method")),p;var B=d(N,C.iterator,S.arg);if(B.type==="throw")return S.method="throw",S.arg=B.arg,S.delegate=null,p;var I=B.arg;return I?I.done?(S[C.resultName]=I.value,S.next=C.nextLoc,S.method!=="return"&&(S.method="next",S.arg=r),S.delegate=null,p):I:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function L(C){var S={tryLoc:C[0]};1 in C&&(S.catchLoc=C[1]),2 in C&&(S.finallyLoc=C[2],S.afterLoc=C[3]),this.tryEntries.push(S)}function D(C){var S=C.completion||{};S.type="normal",delete S.arg,C.completion=S}function z(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(L,this),this.reset(!0)}function F(C){if(C||C===""){var S=C[s];if(S)return S.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var T=-1,N=function B(){for(;++T<C.length;)if(n.call(C,T))return B.value=C[T],B.done=!1,B;return B.value=r,B.done=!0,B};return N.next=N}}throw new TypeError(ti(C)+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(C){var S=typeof C=="function"&&C.constructor;return!!S&&(S===y||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,b):(C.__proto__=b,u(C,l,"GeneratorFunction")),C.prototype=Object.create(E),C},t.awrap=function(C){return{__await:C}},k(O.prototype),u(O.prototype,o,function(){return this}),t.AsyncIterator=O,t.async=function(C,S,T,N,B){B===void 0&&(B=Promise);var I=new O(c(C,S,T,N),B);return t.isGeneratorFunction(S)?I:I.next().then(function(W){return W.done?W.value:I.next()})},k(E),u(E,l,"Generator"),u(E,s,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),t.keys=function(C){var S=Object(C),T=[];for(var N in S)T.push(N);return T.reverse(),function B(){for(;T.length;){var I=T.pop();if(I in S)return B.value=I,B.done=!1,B}return B.done=!0,B}},t.values=F,z.prototype={constructor:z,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(D),!S)for(var T in this)T.charAt(0)==="t"&&n.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=r)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var T=this;function N($,le){return W.type="throw",W.arg=S,T.next=$,le&&(T.method="next",T.arg=r),!!le}for(var B=this.tryEntries.length-1;B>=0;--B){var I=this.tryEntries[B],W=I.completion;if(I.tryLoc==="root")return N("end");if(I.tryLoc<=this.prev){var X=n.call(I,"catchLoc"),H=n.call(I,"finallyLoc");if(X&&H){if(this.prev<I.catchLoc)return N(I.catchLoc,!0);if(this.prev<I.finallyLoc)return N(I.finallyLoc)}else if(X){if(this.prev<I.catchLoc)return N(I.catchLoc,!0)}else{if(!H)throw Error("try statement without catch or finally");if(this.prev<I.finallyLoc)return N(I.finallyLoc)}}}},abrupt:function(S,T){for(var N=this.tryEntries.length-1;N>=0;--N){var B=this.tryEntries[N];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var I=B;break}}I&&(S==="break"||S==="continue")&&I.tryLoc<=T&&T<=I.finallyLoc&&(I=null);var W=I?I.completion:{};return W.type=S,W.arg=T,I?(this.method="next",this.next=I.finallyLoc,p):this.complete(W)},complete:function(S,T){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&T&&(this.next=T),p},finish:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.finallyLoc===S)return this.complete(N.completion,N.afterLoc),D(N),p}},catch:function(S){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.tryLoc===S){var B=N.completion;if(B.type==="throw"){var I=B.arg;D(N)}return I}}throw Error("illegal catch attempt")},delegateYield:function(S,T,N){return this.delegate={iterator:F(S),resultName:T,nextLoc:N},this.method==="next"&&(this.arg=r),p}},t}function j0(r,t,e,n,i,a,s){try{var o=r[a](s),l=o.value}catch(u){return void e(u)}o.done?t(l):Promise.resolve(l).then(n,i)}function W0(r){return function(){var t=this,e=arguments;return new Promise(function(n,i){var a=r.apply(t,e);function s(l){j0(a,n,i,s,o,"next",l)}function o(l){j0(a,n,i,s,o,"throw",l)}s(void 0)})}}var Y2=function(){function r(t){q(this,r),this.renderingContext=t.renderingContext,this.canvasConfig=t.config}return J(r,[{key:"init",value:function(){var e=this.canvasConfig,n=e.container,i=e.canvas;if(i)this.$canvas=i,n&&i.parentElement!==n&&n.appendChild(i),this.$container=i.parentElement,this.canvasConfig.container=this.$container;else if(n&&(this.$container=(0,Se.Z)(n)?document.getElementById(n):n,this.$container)){var a=document.createElement("canvas");this.$container.appendChild(a),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=a}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(e,n){var i=this.canvasConfig.devicePixelRatio,a=i||bs&&window.devicePixelRatio||1;a=a>=1?Math.ceil(a):1,this.dpr=a,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*n,zw(this.$canvas,e,n)),this.renderingContext.renderReasons.add(wa.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)}},{key:"toDataURL",value:function(){var t=W0(Ws().mark(function n(){var i,a,s,o=arguments;return Ws().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{},a=i.type,s=i.encoderOptions,u.abrupt("return",this.context.canvas.toDataURL(a,s));case 3:case"end":return u.stop()}},n,this)}));function e(){return t.apply(this,arguments)}return e}()}])}(),X2=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.name="canvas-context-register",e}return Oe(t,r),J(t,[{key:"init",value:function(){this.context.ContextService=Y2}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(qr),eu=function(r){function t(e){var n;return q(this,t),n=Ce(this,t,[e]),n.registerPlugin(new X2),n.registerPlugin(new B2),n.registerPlugin(new IT),n.registerPlugin(new Z2),n.registerPlugin(new V2),n.registerPlugin(new h2),n.registerPlugin(new U2),n}return Oe(t,r),J(t)}(Yx),Vi=Y(23413),K2=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class tu extends qn{constructor(t){super(Object.assign(Object.assign({},t),{style:Object.assign({},tu.defaultStyleProps,t.style)})),this.rootPointerEvent=new Jo(null),this.forwardEvents=e=>{const n=this.context.canvas,i=n.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(e,i).forEach(s=>{const o=this.bootstrapEvent(this.rootPointerEvent,s,i,e);(0,Ls.Z)(n.context.eventService,"mappingTable.pointerupoutside",[]),n.context.eventService.mapEvent(o)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[V.CLICK,V.POINTER_DOWN,V.POINTER_MOVE,V.POINTER_UP,V.POINTER_OVER,V.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}getKeyStyle(t){const e=(0,Vi.Z)(t,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:n=0,dy:i=0}=e,a=K2(e,["dx","dy"]),[s,o]=this.getSize(t);return Object.assign(Object.assign({x:n,y:i},a),{width:s,height:o})}drawKeyShape(t,e){const n=this.getKeyStyle(t),{x:i,y:a,width:s=0,height:o=0}=n,l=this.upsert("key-container",Un,{x:i,y:a,width:s,height:o,opacity:0},e);return this.upsert("key",rl,n,l)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof eu))return;const n=this.getDomElement();this.events.forEach(i=>{n.addEventListener(i,this.forwardEvents)})}attributeChangedCallback(t,e,n){t==="zIndex"&&e!==n&&(this.getDomElement().style.zIndex=n)}destroy(){const t=this.getDomElement();this.events.forEach(e=>{t.removeEventListener(e,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(t,e){const n=[];if(e.isTouchEvent(t))for(let i=0;i<t.changedTouches.length;i++){const a=t.changedTouches[i];(0,ce.Z)(a.button)&&(a.button=0),(0,ce.Z)(a.buttons)&&(a.buttons=1),(0,ce.Z)(a.isPrimary)&&(a.isPrimary=t.touches.length===1&&t.type==="touchstart"),(0,ce.Z)(a.width)&&(a.width=a.radiusX||1),(0,ce.Z)(a.height)&&(a.height=a.radiusY||1),(0,ce.Z)(a.tiltX)&&(a.tiltX=0),(0,ce.Z)(a.tiltY)&&(a.tiltY=0),(0,ce.Z)(a.pointerType)&&(a.pointerType="touch"),(0,ce.Z)(a.pointerId)&&(a.pointerId=a.identifier||0),(0,ce.Z)(a.pressure)&&(a.pressure=a.force||.5),(0,ce.Z)(a.twist)&&(a.twist=0),(0,ce.Z)(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=t.type,n.push(a)}else if(e.isMouseEvent(t)){const i=t;(0,ce.Z)(i.isPrimary)&&(i.isPrimary=!0),(0,ce.Z)(i.width)&&(i.width=1),(0,ce.Z)(i.height)&&(i.height=1),(0,ce.Z)(i.tiltX)&&(i.tiltX=0),(0,ce.Z)(i.tiltY)&&(i.tiltY=0),(0,ce.Z)(i.pointerType)&&(i.pointerType="mouse"),(0,ce.Z)(i.pointerId)&&(i.pointerId=1),(0,ce.Z)(i.pressure)&&(i.pressure=.5),(0,ce.Z)(i.twist)&&(i.twist=0),(0,ce.Z)(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,n.push(i)}else n.push(t);return n}transferMouseData(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null}bootstrapEvent(t,e,n,i){t.view=n,t.originalEvent=null,t.nativeEvent=i,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);const{x:a,y:s}=this.getViewportXY(e);t.viewport.x=a,t.viewport.y=s;const[o,l]=this.context.canvas.getCanvasByViewport([a,s]);return t.canvas.x=o,t.canvas.y=l,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=i.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t}getViewportXY(t){let e,n;const{offsetX:i,offsetY:a,clientX:s,clientY:o}=t;if(this.context.canvas.context.config.supportsCSSTransform&&!(0,ue.Z)(i)&&!(0,ue.Z)(a))e=i,n=a;else{const l=this.eventService.client2Viewport({x:s,y:o});e=l.x,n=l.y}return{x:e,y:n}}onframe(){super.onframe();const{opacity:t}=this.attributes;this.getDomElement().style.opacity=`${t}`}}tu.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var Z0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class nu extends qn{constructor(t){super(kt({style:nu.defaultStyleProps},t))}getKeyStyle(t){const[e,n]=this.getSize(t),i=super.getKeyStyle(t),{fillOpacity:a,opacity:s=a}=i,o=Z0(i,["fillOpacity","opacity"]);return Object.assign(Object.assign({opacity:s},o),{width:e,height:n,x:-e/2,y:-n/2})}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getShape("key").attributes,{fill:n,stroke:i}=e,a=Z0(e,["fill","stroke"]),s=bt(this.getGraphicStyle(t),"halo"),o=Number(s.lineWidth),[l,u]=Ee(this.getSize(t),[o,o]);return Object.assign(Object.assign({},s),{width:l,height:u,fill:"transparent",x:-l/2,y:-u/2})}getIconStyle(t){const e=super.getIconStyle(t),[n,i]=this.getSize(t);return e?Object.assign({width:n*Fr,height:i*Fr},e):!1}drawKeyShape(t,e){const n=this.upsert("key",uh,this.getKeyStyle(t),e);return dh(this),n}drawHaloShape(t,e){this.upsert("halo",Un,this.getHaloStyle(t),e)}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&hh(this)}}nu.defaultStyleProps={size:32};class $2 extends qn{constructor(t){super(t)}getKeyStyle(t){const[e,n]=this.getSize(t);return Object.assign(Object.assign({},super.getKeyStyle(t)),{width:e,height:n,x:-e/2,y:-n/2})}getIconStyle(t){const e=super.getIconStyle(t),{width:n,height:i}=this.getShape("key").attributes;return e?Object.assign({width:n*Fr,height:i*Fr},e):!1}drawKeyShape(t,e){return this.upsert("key",Un,this.getKeyStyle(t),e)}}class q2 extends Il{constructor(t){super(t)}getInnerR(t){return t.innerR||this.getOuterR(t)*3/8}getOuterR(t){return Math.min(...this.getSize(t))/2}getPoints(t){return RA(this.getOuterR(t),this.getInnerR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getInnerR(t)*2*Fr;return e?Object.assign({width:n,height:n},e):!1}getPortXY(t,e){const{placement:n="top"}=e,i=this.getShape("key").getLocalBounds(),a=LA(this.getOuterR(t),this.getInnerR(t));return Rh(i,n,a,!1)}}class ru extends Il{constructor(t){super(kt({style:ru.defaultStyleProps},t))}getPoints(t){const{direction:e}=t,[n,i]=this.getSize(t);return DA(n,i,e)}getPortXY(t,e){const{direction:n}=t,{placement:i="top"}=e,a=this.getShape("key").getLocalBounds(),[s,o]=this.getSize(t),l=IA(s,o,n);return Rh(a,i,l,!1)}getIconStyle(t){const{icon:e,iconText:n,iconSrc:i,direction:a}=t;if(e===!1||(0,xr.Z)(n||i))return!1;const s=bt(this.getGraphicStyle(t),"icon"),o=this.getShape("key").getLocalBounds(),[l,u]=TS(o,a),c=AS(o,a)*2*Fr;return Object.assign({x:l,y:u,width:c,height:c},s)}}ru.defaultStyleProps={size:40,direction:"up"};var V0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class za extends qn{constructor(t){super(kt({style:za.defaultStyleProps},t)),this.type="combo",this.updateComboPosition(this.parsedAttributes)}getKeySize(t){const{collapsed:e,childrenNode:n=[]}=t;return n.length===0?this.getEmptyKeySize(t):e?this.getCollapsedKeySize(t):this.getExpandedKeySize(t)}getEmptyKeySize(t){const{padding:e,collapsedSize:n}=t,[i,a,s,o]=mr(e);return Ee(Mn(n),[o+a,i+s,0])}getCollapsedKeySize(t){return Mn(t.collapsedSize)}getExpandedKeySize(t){const e=this.getContentBBox(t);return[yr(e),br(e),0]}getContentBBox(t){const{childrenNode:e=[],padding:n}=t,i=e.map(s=>this.context.element.getElement(s)).filter(Boolean);if(i.length===0){const s=new Ke,{x:o=0,y:l=0,size:u}=t,[c,d]=Mn(u);return s.setMinMax([o-c/2,l-d/2,0],[o+c/2,l+d/2,0]),s}const a=Cs(i.map(s=>s.getBounds()));return n?ai(a,n):a}drawCollapsedMarkerShape(t,e){const n=this.getCollapsedMarkerStyle(t);$n(this,"collapsedMarker",n)&&(this.upsert("collapsed-marker",n0,n,e),dh(this))}getCollapsedMarkerStyle(t){if(!t.collapsed||!t.collapsedMarker)return!1;const e=bt(this.getGraphicStyle(t),"collapsedMarker"),{type:n}=e,i=V0(e,["type"]),a=this.getShape("key"),[s,o]=Br(a.getLocalBounds(),"center"),l=Object.assign(Object.assign({},i),{x:s,y:o});if(n){const u=this.getCollapsedMarkerText(n,t);Object.assign(l,{text:u})}return l}getCollapsedMarkerText(t,e){const{childrenData:n=[]}=e,{model:i}=this.context;return t==="descendant-count"?i.getDescendantsData(this.id).length.toString():t==="child-count"?n.length.toString():t==="node-count"?i.getDescendantsData(this.id).filter(a=>i.getElementType(j(a))==="node").length.toString():(0,de.Z)(t)?t(n):""}getComboPosition(t){const{x:e=0,y:n=0,collapsed:i,childrenData:a=[]}=t;if(a.length===0)return[+e,+n,0];if(i){const{model:s}=this.context,o=s.getDescendantsData(this.id).filter(l=>!s.isCombo(j(l)));if(o.length>0&&o.some(GS)){const l=o.reduce((u,c)=>Ee(u,Ct(c)),[0,0,0]);return Xn(l,o.length)}return[+e,+n,0]}return this.getContentBBox(t).center}getComboStyle(t){const[e,n]=this.getComboPosition(t);return{x:e,y:n,transform:[["translate",e,n]]}}updateComboPosition(t){const e=this.getComboStyle(t);Object.assign(this.style,e);const{x:n,y:i}=e;this.context.model.syncComboDatum({id:this.id,style:{x:n,y:i}}),hh(this)}render(t,e=this){super.render(t,e),this.drawCollapsedMarkerShape(t,e)}update(t={}){super.update(t),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(this.attributes.collapsed?t:t.map(i=>{var{x:a,y:s,z:o,transform:l}=i,u=V0(i,["x","y","z","transform"]);return u}),e);return n&&new Proxy(n,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}za.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class J2 extends za{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",_a,this.getKeyStyle(t),e)}getKeyStyle(t){const{collapsed:e}=t,n=super.getKeyStyle(t),[i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},n),e&&bt(n,"collapsed")),{r:i/2})}getCollapsedKeySize(t){const[e,n]=Mn(t.collapsedSize),i=Math.max(e,n)/2;return[i*2,i*2,0]}getExpandedKeySize(t){const e=this.getContentBBox(t),[n,i]=ri(e),a=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2;return[a*2,a*2,0]}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Nl(t,n,e)}}class Q2 extends za{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",Un,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},e),t.collapsed&&bt(e,"collapsed")),{width:n,height:i,x:-n/2,y:-i/2})}}var eA=Y(50814);const tA={padding:10};function H0(r,t,e,n,i,a){const{padding:s}=Object.assign(tA,a),o=ii(e,s),l=ii(n,s),u=[r,...i,t];let c=null;const d=[];for(let h=0,f=u.length;h<f-1;h++){const v=h+1,g=u[h],p=u[v],m=WS(g,p);let y=null;if(h===0)if(v===f-1)if(o.intersects(l))y=Ch(g,p,o,l);else if(!Tl(g,o)&&!Tl(p,l)){const b=Bi(g,o),_=Bi(p,l);y=Y0(b,_,Zt(b,_)),y.points.unshift(b),y.points.push(_)}else m||(y=rA(g,p,o,l));else Yn(p,o)?y=Ch(g,p,o,ii(p,s),c):m||(y=iu(g,p,o));else v===f-1?Yn(g,l)?y=Ch(g,p,ii(g,s),l,c):m||(y=X0(g,p,l,c)):m||(y=Y0(g,p,c));y?(d.push(...y.points),c=y.direction):c=Zt(g,p),v<f-1&&d.push(p)}return d.map(zi)}const nA={N:"S",S:"N",W:"E",E:"W"},U0={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function Zt(r,t){const[e,n]=r,[i,a]=t;return e===i?n>a?"N":"S":n===a?e>i?"W":"E":null}function Ah(r,t){return t==="N"||t==="S"?br(r):yr(r)}function Y0(r,t,e){const n=[r[0],t[1]],i=[t[0],r[1]],a=Zt(r,n),s=Zt(r,i),o=e?nA[e]:null,l=a===e||a!==o&&s!==e?n:i;return{points:[l],direction:Zt(l,t)}}function iu(r,t,e){if(Tl(r,e)){const n=Zs(r,t,e);return{points:[n],direction:Zt(n,t)}}else{const n=Bi(r,e),a=["left","right"].includes(Os(r,e))?[t[0],n[1]]:[n[0],t[1]];return{points:[a],direction:Zt(a,t)}}}function X0(r,t,e,n){const i=Tl(t,e)?t:Bi(t,e),a=[[i[0],r[1]],[r[0],i[1]]],s=a.filter(l=>SS(l,e)&&!Op(l,e,!0)),o=s.filter(l=>Zt(l,r)!==n);if(o.length>0){const l=o.find(u=>Zt(r,u)===n)||o[0];return{points:[l],direction:Zt(l,t)}}else{const l=(0,eA.Z)(a,s)[0],u=li(t,l,Ah(e,n)/2);return{points:[Zs(u,r,e),u],direction:Zt(u,t)}}}function rA(r,t,e,n){let i=iu(r,t,e);const a=Ns(i.points[0]);if(Yn(a,n)){i=iu(t,r,n);const s=Ns(i.points[0]);if(Yn(s,e)){const o=li(r,a,Ah(e,Zt(r,a))/2),l=li(t,s,Ah(n,Zt(t,s))/2),u=[(o[0]+l[0])/2,(o[1]+l[1])/2],c=iu(r,u,e),d=X0(u,t,n,c.direction);i.points=[c.points[0],d.points[0]],i.direction=d.direction}}return i}function Ch(r,t,e,n,i){const s=Cs([e,n]),o=qe(t,s.center)>qe(r,s.center),[l,u]=o?[t,r]:[r,t],c=br(s)+yr(s);let d;if(i){const v=[l[0]+c*Math.cos(U0[i]),l[1]+c*Math.sin(U0[i])];d=li(Bi(v,s),v,.01)}else d=li(Bi(l,s),l,-.01);let h=Zs(d,u,s),f=[Ms(d,2),Ms(h,2)];if((0,gt.Z)(Ms(d),Ms(h))){const v=th(He(d,l),[1,0,0])+Math.PI/2;h=[u[0]+c*Math.cos(v),u[1]+c*Math.sin(v),0],h=Ms(li(Bi(h,s),u,-.01),2);const g=Zs(d,h,s);f=[d,g,h]}return{points:o?f.reverse():f,direction:Zt(o?d:h,t)}}function Zs(r,t,e){let n=[r[0],t[1]];return Yn(n,e)&&(n=[t[0],r[1]]),n}function K0(r,t,e,n,i){let l=typeof t=="number"?t:.5;t==="start"&&(l=0),t==="end"&&(l=.99);const u=Ot(r.getPoint(l)),c=Ot(r.getPoint(l+.01));let d=t==="start"?"left":t==="end"?"right":"center";if(Fp(u,c)||!e){const[m,y]=$0(r,l,n,i);return{transform:[["translate",m,y]],textAlign:d}}let h=Math.atan2(c[1]-u[1],c[0]-u[0]);c[0]<u[0]&&(d=d==="center"?d:d==="left"?"right":"left",n*=-1,h+=Math.PI);const[v,g]=$0(r,l,n,i,h),p=[["translate",v,g],["rotate",h/Math.PI*180]];return{textAlign:d,transform:p}}function iA(r,t,e,n,i){var a,s;const o=((a=r.badge)===null||a===void 0?void 0:a.getGeometryBounds().halfExtents[0])*2||0,l=((s=r.label)===null||s===void 0?void 0:s.getGeometryBounds().halfExtents[0])*2||0;return K0(r.key,e,!0,(l?(l/2+o/2)*(t==="suffix"?1:-1):0)+n,i)}function $0(r,t,e,n,i){const[a,s]=Ot(r.getPoint(t));let o=e,l=n;return i&&(o=e*Math.cos(i)-n*Math.sin(i),l=e*Math.sin(i)+n*Math.cos(i)),[a+o,s+l]}function Oh(r,t,e,n){if((0,gt.Z)(r,t))return r;const i=He(t,r),a=[r[0]+e*i[0],r[1]+e*i[1]],s=Ir(Pl(i,!1));return a[0]+=n*s[0],a[1]+=n*s[1],a}function aA(r){return(0,oe.Z)(r)?[r,-r]:r}function sA(r){return(0,oe.Z)(r)?[r,1-r]:r}function oA(r,t,e){return[["M",r[0],r[1]],["Q",e[0],e[1],t[0],t[1]]]}function q0(r,t,e){return[["M",r[0],r[1]],["C",e[0][0],e[0][1],e[1][0],e[1][1],t[0],t[1]]]}function Ph(r,t=0,e=!1){const n=r[0],i=r[r.length-1],a=r.slice(1,r.length-1),s=[["M",n[0],n[1]]];return a.forEach((o,l)=>{const u=a[l-1]||n,c=a[l+1]||i;if(!ZS(u,o,c)&&t){const[d,h]=lA(u,o,c,t);s.push(["L",d[0],d[1]],["Q",o[0],o[1],h[0],h[1]],["L",h[0],h[1]])}else s.push(["L",o[0],o[1]])}),s.push(["L",i[0],i[1]]),e&&s.push(["Z"]),s}function lA(r,t,e,n){const i=Ol(r,t),a=Ol(e,t),s=Math.min(n,Math.min(i,a)/2),o=[t[0]-s/i*(t[0]-r[0]),t[1]-s/i*(t[1]-r[1])],l=[t[0]-s/a*(t[0]-e[0]),t[1]-s/a*(t[1]-e[1])];return[o,l]}const uA=r=>{const t=Math.PI/2,e=br(r)/2,n=yr(r)/2,i=Math.atan2(e,n)/2,a=Math.atan2(n,e)/2;return{top:[-t-a,-t+a],"top-right":[-t+a,-i],"right-top":[-t+a,-i],right:[-i,i],"bottom-right":[i,t-a],"right-bottom":[i,t-a],bottom:[t-a,t+a],"bottom-left":[t+a,Math.PI-i],"left-bottom":[t+a,Math.PI-i],left:[Math.PI-i,Math.PI+i],"top-left":[Math.PI+i,-t-a],"left-top":[Math.PI+i,-t-a]}};function J0(r,t,e,n,i){const a=ii(r),s=r.getCenter();let o=n&&pi(n),l=i&&pi(i);if(!o||!l){const u=uA(a),c=u[t][0],d=u[t][1],[h,f]=ri(a),v=Math.max(h,f),g=Ee(s,[v*Math.cos(c),v*Math.sin(c),0]),p=Ee(s,[v*Math.cos(d),v*Math.sin(d),0]);o=Dh(r,g),l=Dh(r,p),e||([o,l]=[l,o])}return[o,l]}function cA(r,t,e,n,i,a){const s=r.getPorts()[i||a],o=r.getPorts()[a||i];let[l,u]=J0(r,t,e,s,o);const c=dA(r,l,u,n);return s&&(l=Hs(s,c[0])),o&&(u=Hs(o,c[c.length-1])),q0(l,u,c)}function dA(r,t,e,n){const i=r.getCenter();if((0,gt.Z)(t,e)){const a=He(t,i),s=[n*Math.sign(a[0])||n/2,n*Math.sign(a[1])||-n/2,0];return[Ee(t,s),Ee(e,Dr(s,[1,-1,1]))]}return[li(i,t,qe(i,t)+n),li(i,e,qe(i,e)+n)]}function hA(r,t,e,n,i,a,s){const o=Lh(r),l=o[a||s],u=o[s||a];let[c,d]=J0(r,e,n,l,u);const h=fA(r,c,d,i);return l&&(c=Hs(l,h[0])),u&&(d=Hs(u,h[h.length-1])),Ph([c,...h,d],t)}function fA(r,t,e,n){const i=[],a=ii(r);if((0,gt.Z)(t,e))switch(Os(t,a)){case"left":i.push([t[0]-n,t[1]]),i.push([t[0]-n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"right":i.push([t[0]+n,t[1]]),i.push([t[0]+n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"top":i.push([t[0],t[1]-n]),i.push([t[0]+n,t[1]-n]),i.push([t[0]+n,t[1]]);break;case"bottom":i.push([t[0],t[1]+n]),i.push([t[0]+n,t[1]+n]),i.push([t[0]+n,t[1]]);break}else{const s=Os(t,a),o=Os(e,a);if(s===o){const l=s;let u,c;switch(l){case"left":u=Math.min(t[0],e[0])-n,i.push([u,t[1]]),i.push([u,e[1]]);break;case"right":u=Math.max(t[0],e[0])+n,i.push([u,t[1]]),i.push([u,e[1]]);break;case"top":c=Math.min(t[1],e[1])-n,i.push([t[0],c]),i.push([e[0],c]);break;case"bottom":c=Math.max(t[1],e[1])+n,i.push([t[0],c]),i.push([e[0],c]);break}}else{const l=(h,f)=>({left:[f[0]-n,f[1]],right:[f[0]+n,f[1]],top:[f[0],f[1]-n],bottom:[f[0],f[1]+n]})[h],u=l(s,t),c=l(o,e),d=Zs(u,c,a);i.push(u,d,c)}}return i}function Nh(r,t){const e=new Set,n=new Set,i=new Set;return r.forEach(a=>{t(a).forEach(o=>{e.add(o),r.includes(o.source)&&r.includes(o.target)?n.add(o):i.add(o)})}),{edges:Array.from(e),internal:Array.from(n),external:Array.from(i)}}function Q0(r,t){const e=[];let n=r;for(;n;){e.push(n);const i=t(j(n));if(i)n=i;else break}if(e.some(i=>{var a;return(a=i.style)===null||a===void 0?void 0:a.collapsed})){const i=e.reverse().findIndex(hn);return e[i]||e.at(-1)}return r}function vA(r,t){return t||(r<4?10:r===4?12:r*2.5)}const gA=(r,t)=>{const e=Math.max(r,t)/2;return[["M",-r/2,0],["A",e,e,0,1,0,2*e-r/2,0],["A",e,e,0,1,0,-r/2,0],["Z"]]},em=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",r/2,t/2],["Z"]],pA=(r,t)=>[["M",-r/2,0],["L",0,-t/2],["L",r/2,0],["L",0,t/2],["Z"]],mA=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",4*r/5-r/2,0],["L",r/2,t/2],["Z"]],yA=(r,t)=>[["M",-r/2,-t/2],["L",r/2,-t/2],["L",r/2,t/2],["L",-r/2,t/2],["Z"]],bA=(r,t)=>{const e=r/2,n=r/7,i=r-n;return[["M",-e,0],["L",0,-t/2],["L",0,t/2],["Z"],["M",i-e,-t/2],["L",i+n-e,-t/2],["L",i+n-e,t/2],["L",i-e,t/2],["Z"]]},xA=(r,t)=>[["M",r/2,-t/2],["L",-r/2,0],["L",r/2,0],["L",-r/2,0],["L",r/2,t/2]];var au=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class gi extends r0{constructor(t){super(kt({style:gi.defaultStyleProps},t)),this.type="edge"}get sourceNode(){const{sourceNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}get targetNode(){const{targetNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}getKeyStyle(t){const e=this.getGraphicStyle(t),{loop:n}=e,i=au(e,["loop"]),{sourceNode:a,targetNode:s}=this,o=n&&OA(a,s)?this.getLoopPath(t):this.getKeyPath(t);return Object.assign({d:o},sh(i,["halo","label","startArrow","endArrow"]))}getLoopPath(t){const{sourcePort:e,targetPort:n}=t,i=this.sourceNode,a=ii(i),s=Math.max(yr(a),br(a)),{placement:o,clockwise:l,dist:u=s}=bt(this.getGraphicStyle(t),"loop");return cA(i,o,l,u,e,n)}getEndpoints(t,e=!0,n=[]){const{sourcePort:i,targetPort:a}=t,{sourceNode:s,targetNode:o}=this,[l,u]=NA(s,o,i,a);if(!e){const f=l?pi(l):s.getCenter(),v=u?pi(u):o.getCenter();return[f,v]}const c=typeof n=="function"?n():n,d=lm(l||s,c[0]||u||o),h=lm(u||o,c[c.length-1]||l||s);return[d,h]}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),n=bt(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign({},e),n)}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=bt(this.getGraphicStyle(t),"label"),{placement:n,offsetX:i,offsetY:a,autoRotate:s,maxWidth:o}=e,l=au(e,["placement","offsetX","offsetY","autoRotate","maxWidth"]),u=K0(this.shapeMap.key,n,s,i,a),c=this.shapeMap.key.getLocalBounds(),d=nT([c.min,c.max],o);return Object.assign({wordWrapWidth:d},u,l)}getBadgeStyle(t){if(t.badge===!1||!t.badgeText)return!1;const e=bt(t,"badge"),{offsetX:n,offsetY:i,placement:a}=e,s=au(e,["offsetX","offsetY","placement"]);return Object.assign(s,iA(this.shapeMap,a,t.labelPlacement,n,i))}drawArrow(t,e){var n;const i=e==="start",s=t[e==="start"?"startArrow":"endArrow"],o=this.shapeMap.key;if(s){const l=this.getArrowStyle(t,i);if(!$n(this,`arrow-${e}`,l))return;const[u,c,d]=i?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],h=o.parsedStyle[u];if(h)h.attr(l);else{const f=l.src?il:Pr,v=new f({style:l});o.style[u]=v}o.style[c]=t[d]||l.width/2+ +l.lineWidth}else{const l=i?"markerStart":"markerEnd";(n=o.style[l])===null||n===void 0||n.destroy(),o.style[l]=null}}getArrowStyle(t,e){const n=this.getShape("key").attributes,i=e?"startArrow":"endArrow",a=bt(this.getGraphicStyle(t),i),{size:s,type:o}=a,l=au(a,["size","type"]),[u,c]=Mn(vA(n.lineWidth,s)),h=((0,de.Z)(o)?o:Cr[o]||em)(u,c);return Object.assign((0,Vi.Z)(n,["stroke","strokeOpacity","fillOpacity"]),{width:u,height:c},Object.assign({},h&&{d:h,fill:o==="simple"?"":n.stroke}),l)}drawLabelShape(t,e){const n=this.getLabelStyle(t);$n(this,"label",n)&&this.upsert("label",ui,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t);$n(this,"halo",n)&&this.upsert("halo",Pr,n,e)}drawBadgeShape(t,e){const n=this.getBadgeStyle(t);$n(this,"badge",n)&&this.upsert("badge",Ra,n,e)}drawSourceArrow(t){this.drawArrow(t,"start")}drawTargetArrow(t){this.drawArrow(t,"end")}drawKeyShape(t,e){const n=this.getKeyStyle(t);if($n(this,"key",n))return this.upsert("key",Pr,n,e)}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.getShape("key")&&(this.drawSourceArrow(t),this.drawTargetArrow(t),this.drawLabelShape(t,e),this.drawHaloShape(t,e),this.drawBadgeShape(t,e))}onframe(){this.drawKeyShape(this.parsedAttributes,this),this.drawSourceArrow(this.parsedAttributes),this.drawTargetArrow(this.parsedAttributes),this.drawHaloShape(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this),this.drawBadgeShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(t,e);return n&&new Proxy(n,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}gi.defaultStyleProps={badge:!0,badgeOffsetX:0,badgeOffsetY:0,badgePlacement:"suffix",isBillboard:!0,label:!0,labelAutoRotate:!0,labelIsBillboard:!0,labelMaxWidth:"80%",labelOffsetX:4,labelOffsetY:0,labelPlacement:"center",labelTextBaseline:"middle",labelWordWrap:!1,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloPointerEvents:"none",haloStrokeOpacity:.25,haloZIndex:-1,loop:!0,startArrow:!1,startArrowLineDash:0,startArrowLineJoin:"round",startArrowLineWidth:1,startArrowTransformOrigin:"center",startArrowType:"vee",endArrow:!1,endArrowLineDash:0,endArrowLineJoin:"round",endArrowLineWidth:1,endArrowTransformOrigin:"center",endArrowType:"vee",loopPlacement:"top",loopClockwise:!0};class Hi extends gi{constructor(t){super(kt({style:Hi.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t),{controlPoints:i,curvePosition:a,curveOffset:s}=t,o=this.getControlPoints(e,n,sA(a),aA(s),i);return q0(e,n,o)}getControlPoints(t,e,n,i,a){return(a==null?void 0:a.length)===2?a:[Oh(t,e,n[0],i[0]),Oh(t,e,n[1],i[1])]}}Hi.defaultStyleProps={curvePosition:.5,curveOffset:20};class su extends Hi{constructor(t){super(kt({style:su.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[0]-t[0];return[[t[0]+a*n[0]+i[0],t[1]],[e[0]-a*n[1]+i[1],e[1]]]}}su.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class ou extends Hi{constructor(t){super(kt({style:ou.defaultStyleProps},t))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(t){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(t);const e=Ct(this.ref),n=this.sourceNode.getIntersectPoint(e,!0),i=this.targetNode.getIntersectPoint(e);return[n,i]}toRadialCoordinate(t){const e=Ct(this.ref),n=qe(t,e),i=Lp(He(t,e));return[n,i]}getControlPoints(t,e,n,i){const[a,s]=this.toRadialCoordinate(t),[o]=this.toRadialCoordinate(e),l=o-a;return[[t[0]+(l*n[0]+i[0])*Math.cos(s),t[1]+(l*n[0]+i[0])*Math.sin(s)],[e[0]-(l*n[1]-i[0])*Math.cos(s),e[1]-(l*n[1]-i[0])*Math.sin(s)]]}}ou.defaultStyleProps={curvePosition:.5,curveOffset:20};class lu extends Hi{constructor(t){super(kt({style:lu.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[1]-t[1];return[[t[0],t[1]+a*n[0]+i[0]],[e[0],e[1]-a*n[1]+i[1]]]}}lu.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class uu extends gi{constructor(t){super(kt({style:uu.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t);return[["M",e[0],e[1]],["L",n[0],n[1]]]}}uu.defaultStyleProps={};const EA={enableObstacleAvoidance:!1,offset:10,maxAllowedDirectionChange:Math.PI/2,maximumLoops:3e3,gridSize:5,startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{right:{stepX:1,stepY:0},left:{stepX:-1,stepY:0},bottom:{stepX:0,stepY:1},top:{stepX:0,stepY:-1}},penalties:{0:0,90:0},distFunc:Ol},zr=r=>`${Math.round(r[0])}|||${Math.round(r[1])}`;function Ui(r,t){const e=n=>Math.round(n/t);return(0,oe.Z)(r)?e(r):r.map(e)}function wA(r,t){const e=Math.abs(r-t);return e>Math.PI?2*Math.PI-e:e}function tm(r,t){const e=t[0]-r[0],n=t[1]-r[1];return!e&&!n?0:Math.atan2(n,e)}function nm(r,t,e,n){const i=tm(r,t),a=e[zr(r)],o=tm(a||n,r);return wA(o,i)}const kA=(r,t)=>{const{offset:e,gridSize:n}=t,i={};return r.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const s=ai(a.getRenderBounds(),e);for(let o=Ui(s.min[0],n);o<=Ui(s.max[0],n);o+=1)for(let l=Ui(s.min[1],n);l<=Ui(s.max[1],n);l+=1)i[`${o}|||${l}`]=!0}),i};function rm(r,t,e){return Math.min(...t.map(n=>e(r,n)))}function _A(r,t,e){let n=r[0],i=e(r[0],t);for(let a=0;a<r.length;a++){const s=r[a],o=e(s,t);o<i&&(n=s,i=o)}return n}const im=(r,t,e,n)=>{if(!t)return[r];const{directionMap:i,offset:a}=n,s=ai(t.getRenderBounds(),a),o=Object.keys(i).reduce((l,u)=>{if(e.includes(u)){const c=i[u],[d,h]=ri(s),f=[r[0]+c.stepX*d,r[1]+c.stepY*h],v=CS(s);for(let g=0;g<v.length;g++){const p=nh([r,f],v[g]);p&&Op(p,s)&&l.push(p)}}return l},[]);return Yn(r,s)||o.push(r),o.map(l=>Ui(l,n.gridSize))},SA=(r,t,e,n,i,a,s)=>{const o=[];let l=[a[0]===n[0]?n[0]:r[0]*s,a[1]===n[1]?n[1]:r[1]*s];o.unshift(l);let u=r,c=t[zr(u)];for(;c;){const f=c,v=u;nm(f,v,t,e)&&(l=[f[0]===v[0]?l[0]:f[0]*s,f[1]===v[1]?l[1]:f[1]*s],o.unshift(l)),c=t[zr(f)],u=f}const d=i.map(f=>[f[0]*s,f[1]*s]),h=_A(d,l,Ol);return o.unshift(h),o};function TA(r,t,e,n){const i=zi(r.getCenter()),a=zi(t.getCenter()),s=Object.assign(EA,n),{gridSize:o}=s,l=s.enableObstacleAvoidance?e:[r,t],u=kA(l,s),c=Ui(i,o),d=Ui(a,o),h=im(i,r,s.startDirections,s),f=im(a,t,s.endDirections,s);h.forEach(k=>delete u[zr(k)]),f.forEach(k=>delete u[zr(k)]);const v={},g={},p={},m={},y={},b=new AA;for(let k=0;k<h.length;k++){const O=h[k],P=zr(O);v[P]=O,m[P]=0,y[P]=rm(O,f,s.distFunc),b.add({id:P,value:y[P]})}const _=f.map(k=>zr(k));let w=s.maximumLoops,x,E=1/0;for(const[k,O]of Object.entries(v))y[k]<=E&&(E=y[k],x=O);for(;Object.keys(v).length>0&&w>0;){const k=b.minId(!1);if(k)x=v[k];else break;const O=zr(x);if(_.includes(O))return SA(x,p,c,a,h,d,o);delete v[O],b.remove(O),g[O]=!0;for(const P of Object.values(s.directionMap)){const M=Ee(x,[P.stepX,P.stepY]),L=zr(M);if(g[L])continue;const D=nm(x,M,p,c);if(D>s.maxAllowedDirectionChange||u[L])continue;v[L]||(v[L]=M);const z=s.penalties[D],F=s.distFunc(x,M)+(isNaN(z)?o:z),C=m[O]+F,S=m[L];S&&C>=S||(p[L]=x,m[L]=C,y[L]=C+rm(M,f,s.distFunc),b.add({id:L,value:y[L]}))}w-=1}return[]}class AA{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(t,e){let n=0,i=e-1;for(;i-n>1;){const a=Math.floor((n+i)/2);if(this.arr[a].value>t.value)i=a;else if(this.arr[a].value<t.value)n=a;else{this.arr.splice(a,0,t),this.map[t.id]=!0;return}}this.arr.splice(i,0,t),this.map[t.id]=!0}add(t){delete this.map[t.id];const e=this.arr.length;if(!e||this.arr[e-1].value<t.value){this.arr.push(t),this.map[t.id]=!0;return}this._innerAdd(t,e)}remove(t){this.map[t]&&delete this.map[t]}_clearAndGetMinId(){let t;for(let e=this.arr.length-1;e>=0;e--)this.map[this.arr[e].id]?t=this.arr[e].id:this.arr.splice(e,1);return t}_findFirstId(){for(;this.arr.length;){const t=this.arr.shift();if(this.map[t.id])return t.id}}minId(t){return t?this._clearAndGetMinId():this._findFirstId()}}class cu extends gi{constructor(t){super(kt({style:cu.defaultStyleProps},t))}getControlPoints(t){const{router:e}=t,{sourceNode:n,targetNode:i}=this,[a,s]=this.getEndpoints(t,!1);let o=[];if(!e)o=t.controlPoints;else if(e.type==="shortest-path"){const l=this.context.element.getNodes();o=TA(n,i,l,e),o.length||(o=H0(a,s,n,i,t.controlPoints,{padding:e.offset}))}else e.type==="orth"&&(o=H0(a,s,n,i,t.controlPoints,e));return o}getPoints(t){const e=this.getControlPoints(t),[n,i]=this.getEndpoints(t,!0,e);return[n,...e,i]}getKeyPath(t){const e=this.getPoints(t);return Ph(e,t.radius)}getLoopPath(t){const{sourcePort:e,targetPort:n,radius:i}=t,a=this.sourceNode,s=ii(a),o=Math.max(yr(s),br(s))/4,{placement:l,clockwise:u,dist:c=o}=bt(this.getGraphicStyle(t),"loop");return hA(a,i,l,u,c,e,n)}}cu.defaultStyleProps={radius:0,controlPoints:[],router:!1};class du extends gi{constructor(t){super(kt({style:du.defaultStyleProps},t))}getKeyPath(t){const{curvePosition:e,curveOffset:n}=t,[i,a]=this.getEndpoints(t),s=t.controlPoint||Oh(i,a,e,n);return oA(i,a,s)}}du.defaultStyleProps={curvePosition:.5,curveOffset:30};function Vs(r){return r instanceof qn&&r.type==="node"}function am(r){return r instanceof gi}function Mh(r){return r instanceof za}function CA(r){return Vs(r)||am(r)||Mh(r)}function OA(r,t){return!r||!t?!1:r===t}const PA={top:[.5,0],right:[1,.5],bottom:[.5,1],left:[0,.5],default:[.5,.5]};function Rh(r,t,e=PA,n=!0){const i=[.5,.5],a=(0,Se.Z)(t)?(0,Wt.Z)(e,t.toLocaleLowerCase(),i):t;if(!n&&(0,Se.Z)(t))return a;const[s,o]=a||i;return[r.min[0]+yr(r)*s,r.min[1]+br(r)*o]}function Lh(r){if(!r)return{};const t=r.getPorts();return(r.attributes.ports||[]).forEach((n,i)=>{var a;const{key:s,placement:o}=n;sm(n)&&(t[a=s||i]||(t[a]=Br(r.getShape("key").getBounds(),o)))}),t}function sm(r){const{r:t}=r;return!t||Number(t)===0}function pi(r){return Na(r)?r:r.getPosition()}function NA(r,t,e,n){const i=om(r,t,e,n),a=om(t,r,n,e);return[i,a]}function om(r,t,e,n){const i=Lh(r);if(e)return i[e];const a=Object.values(i);if(a.length===0)return;const s=a.map(u=>pi(u)),o=MA(t,n),[l]=US(s,o);return a.find(u=>pi(u)===l)}function MA(r,t){const e=Lh(r);if(t)return[pi(e[t])];const n=Object.values(e);return n.length>0?n.map(i=>pi(i)):[r.getCenter()]}function lm(r,t){return Mh(r)||Vs(r)?Dh(r,t):Hs(r,t)}function Hs(r,t){if(!r||!t)return[0,0,0];if(Na(r))return r;if(r.attributes.linkToCenter)return r.getPosition();const e=Na(t)?t:Vs(t)?t.getCenter():t.getPosition();return Nl(e,r.getBounds())}function Dh(r,t){if(!r||!t)return[0,0,0];const e=Na(t)?t:Vs(t)?t.getCenter():t.getPosition();return r.getIntersectPoint(e)||r.getCenter()}function um(r,t="bottom",e=0,n=0,i=!1){const a=t.split("-"),[s,o]=Br(r,t),l=a.includes("left")?"right":a.includes("right")?"left":"center";let u=a.includes("top")?"bottom":a.includes("bottom")?"top":"middle";return i&&(u=u==="top"?"bottom":u==="bottom"?"top":u),{transform:[["translate",s+e,o+n]],textBaseline:u,textAlign:l}}function RA(r,t){return[[0,-r],[t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)],[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[0,t],[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[-t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[-t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)]]}function LA(r,t){const e={};return e.top=[0,-r],e.left=[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e["left-bottom"]=[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.bottom=[0,t],e["right-bottom"]=[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.right=e.default=[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e}function DA(r,t,e){const n=t/2,i=r/2,a={up:[[-i,n],[i,n],[0,-n]],left:[[-i,0],[i,n],[i,-n]],right:[[-i,n],[-i,-n],[i,0]],down:[[-i,-n],[i,-n],[0,n]]};return a[e]||a.up}function IA(r,t,e){const n=t/2,i=r/2,a={};return e==="down"?(a.bottom=a.default=[0,n],a.right=[i,-n],a.left=[-i,-n]):e==="left"?(a.top=[i,-n],a.bottom=[i,n],a.left=a.default=[-i,0]):e==="right"?(a.top=[-i,-n],a.bottom=[-i,n],a.right=a.default=[i,0]):(a.left=[-i,n],a.top=a.default=[0,-n],a.right=[i,n]),a}function hF(r,t){return[[r/2,-t/2],[r/2,t/2],[-r/2,t/2],[-r/2,-t/2]]}function BA(r,t){return[[0,-t/2],[r/2,0],[0,t/2],[-r/2,0]]}function FA(r){return(0,Wt.Z)(r,["style","visibility"])!=="hidden"}function Ih(r,t){"update"in r?r.update(t):r.attr(t)}function zA(r){return[[0,r],[r*Math.sqrt(3)/2,r/2],[r*Math.sqrt(3)/2,-r/2],[0,-r],[-r*Math.sqrt(3)/2,-r/2],[-r*Math.sqrt(3)/2,r/2]]}function GA(r){(0,Ls.Z)(r,"__to_be_destroyed__",!0)}function hu(r){return(0,Wt.Z)(r,"__to_be_destroyed__",!1)}var jA=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class fu extends cn{constructor(t,e){super(t,Object.assign({},fu.defaultOptions,e)),this.onCollapseExpand=n=>jA(this,void 0,void 0,function*(){if(!this.validate(n))return;const{target:i}=n;if(!CA(i))return;const a=i.id,{model:s,graph:o}=this.context,l=s.getElementDataById(a);if(!l)return!1;const{onCollapse:u,onExpand:c,animation:d}=this.options;hn(l)?(yield o.expandElement(a,d),c==null||c(a)):(yield o.collapseElement(a,d),u==null||u(a))}),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`node:${e}`,this.onCollapseExpand),t.on(`combo:${e}`,this.onCollapseExpand)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`node:${e}`,this.onCollapseExpand),t.off(`combo:${e}`,this.onCollapseExpand)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}fu.defaultOptions={enable:!0,animation:!0,trigger:V.DBLCLICK};var WA=Y(71701),vu=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};const ZA="g6-create-edge-assist-edge-id",gu="g6-create-edge-assist-node-id";class pu extends cn{constructor(t,e){super(t,Object.assign({},pu.defaultOptions,e)),this.drop=n=>vu(this,void 0,void 0,function*(){const{targetType:i}=n;["combo","node"].includes(i)&&this.source?yield this.handleCreateEdge(n):yield this.cancelEdge()}),this.handleCreateEdge=n=>vu(this,void 0,void 0,function*(){var i,a,s;if(!this.validate(n))return;const{graph:o,canvas:l,batch:u,element:c}=this.context,{style:d}=this.options;if(this.source){this.createEdge(n),yield this.cancelEdge();return}u.startBatch(),l.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([n.target.id])[0];const h=o.getElementData(this.source);o.addNodeData([{id:gu,style:{visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(i=h.style)===null||i===void 0?void 0:i.x,y:(a=h.style)===null||a===void 0?void 0:a.y}}]),o.addEdgeData([{id:ZA,source:this.source,target:gu,style:Object.assign({pointerEvents:"none"},d)}]),yield(s=c.draw({animation:!1}))===null||s===void 0?void 0:s.finished}),this.updateAssistEdge=n=>vu(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:s}=this.context;a.translateNodeTo(gu,[n.canvas.x,n.canvas.y]),yield(i=s.draw({animation:!1,silence:!0}))===null||i===void 0?void 0:i.finished}),this.createEdge=n=>{var i,a;const{graph:s}=this.context,{style:o,onFinish:l,onCreate:u}=this.options;if(((i=n.target)===null||i===void 0?void 0:i.id)===void 0||this.source===void 0)return;const d=(a=this.getSelectedNodeIDs([n.target.id]))===null||a===void 0?void 0:a[0],h=`${this.source}-${d}-${(0,WA.Z)()}`,f=u({id:h,source:this.source,target:d,style:o});s.addEdgeData([f]),l(f)},this.cancelEdge=()=>vu(this,void 0,void 0,function*(){var n;if(!this.source)return;const{graph:i,element:a,batch:s}=this.context;i.removeNodeData([gu]),this.source=void 0,yield(n=a.draw({animation:!1}))===null||n===void 0?void 0:n.finished,s.endBatch()}),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;this.unbindEvents(),e==="click"?(t.on(Pn.CLICK,this.handleCreateEdge),t.on(Ii.CLICK,this.handleCreateEdge),t.on(Mr.CLICK,this.cancelEdge),t.on(_l.CLICK,this.cancelEdge)):(t.on(Pn.DRAG_START,this.handleCreateEdge),t.on(Ii.DRAG_START,this.handleCreateEdge),t.on(V.POINTER_UP,this.drop)),t.on(V.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;t.off(Pn.CLICK,this.handleCreateEdge),t.off(Ii.CLICK,this.handleCreateEdge),t.off(Mr.CLICK,this.cancelEdge),t.off(_l.CLICK,this.cancelEdge),t.off(Pn.DRAG_START,this.handleCreateEdge),t.off(Ii.DRAG_START,this.handleCreateEdge),t.off(V.POINTER_UP,this.drop),t.off(V.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}pu.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:r=>r,onFinish:()=>{}};var Us=Y(68040),cm=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class mu extends cn{constructor(t,e){super(t,Object.assign({},mu.defaultOptions,e)),this.isDragging=!1,this.onDragStart=n=>{this.validate(n)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=n=>{if(!this.isDragging)return;const{x:i,y:a}=n.movement;i|a&&this.translate([i,a],!1)},this.onDragEnd=()=>{var n,i;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},this.invokeOnFinish=(0,Us.Z)(()=>{var n,i;(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},300),this.shortcut=new Ma(t.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if((0,yt.Z)(t)){const{up:e=[],down:n=[],left:i=[],right:a=[]}=t;this.shortcut.bind(e,s=>this.onTranslate([0,1],s)),this.shortcut.bind(n,s=>this.onTranslate([0,-1],s)),this.shortcut.bind(i,s=>this.onTranslate([1,0],s)),this.shortcut.bind(a,s=>this.onTranslate([-1,0],s))}else{const{graph:e}=this.context;e.on(V.DRAG_START,this.onDragStart),e.on(V.DRAG,this.onDrag),e.on(V.DRAG_END,this.onDragEnd)}}onTranslate(t,e){return cm(this,void 0,void 0,function*(){if(!this.validate(e))return;const{sensitivity:n}=this.options,i=n*-1;yield this.translate(Dr(t,i),this.options.animation),this.invokeOnFinish()})}translate(t,e){return cm(this,void 0,void 0,function*(){t=this.clampByDirection(t),t=this.clampByRange(t),yield this.context.graph.translateBy(t,e)})}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,c]=mr(this.options.range),d=[s*o,a*l,s*u,a*c],h=ai(qd(n.getCanvasCenter()),d),f=He(n.getViewportCenter(),[t,e,0]);if(!Yn(f,h)){const{min:[v,g],max:[p,m]}=h;(f[0]<v&&t>0||f[0]>p&&t<0)&&(t=0),(f[1]<g&&e>0||f[1]>m&&e<0)&&(e=0)}return[t,e]}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return typeof e=="function"?e(t):!!e}unbindEvents(){this.shortcut.unbindAll();const{graph:t}=this.context;t.off(V.DRAG_START,this.onDragStart),t.off(V.DRAG,this.onDrag),t.off(V.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}mu.defaultOptions={enable:r=>"targetType"in r?r.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var dm=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class Ys extends cn{constructor(t,e){super(t,Object.assign({},Ys.defaultOptions,e)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=n=>dm(this,void 0,void 0,function*(){var i;if(this.options.dropEffect!=="link")return;const{model:a,element:s}=this.context,o=n.target.id;this.target.forEach(l=>{const u=a.getParentData(l,Ve);u&&j(u)===o&&a.refreshComboData(o),a.setParent(l,o,Ve)}),yield(i=s==null?void 0:s.draw({animation:!0}))===null||i===void 0?void 0:i.finished}),this.setCursor=n=>{if(this.isDragging)return;const{type:i}=n,{canvas:a}=this.context,{cursor:s}=this.options;i===V.POINTER_ENTER?a.setCursor((s==null?void 0:s.grab)||"grab"):a.setCursor((s==null?void 0:s.default)||"default")},this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onDrop=this.onDrop.bind(this),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.addEventListener("blur",this.onDragEnd),n.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.on(`${i}:${V.DRAG_START}`,this.onDragStart),t.on(`${i}:${V.DRAG}`,this.onDrag),t.on(`${i}:${V.DRAG_END}`,this.onDragEnd),t.on(`${i}:${V.POINTER_ENTER}`,this.setCursor),t.on(`${i}:${V.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(t.on(Ii.DROP,this.onDrop),t.on(Mr.DROP,this.onDrop))}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}getDelta(t){const e=this.context.graph.getZoom();return Xn([t.dx,t.dy],e)}onDragStart(t){var e;if(this.enable=this.validate(t),!this.enable)return;const{batch:n,canvas:i}=this.context;i.setCursor(((e=this.options.cursor)===null||e===void 0?void 0:e.grabbing)||"grabbing"),this.isDragging=!0,n.startBatch(),this.target=this.getSelectedNodeIDs([t.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target),this.options.shadow&&this.createShadow(this.target)}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.options.shadow?this.moveShadow(e):this.moveElement(this.target,e)}onDragEnd(){var t,e,n;if(this.enable=!1,this.options.shadow){if(!this.shadow)return;this.shadow.style.visibility="hidden";const{x:s=0,y:o=0}=this.shadow.attributes,[l,u]=He([+s,+o],this.shadowOrigin);this.moveElement(this.target,[l,u])}this.showEdges(),(e=(t=this.options).onFinish)===null||e===void 0||e.call(t,this.target);const{batch:i,canvas:a}=this.context;i.endBatch(),a.setCursor(((n=this.options.cursor)===null||n===void 0?void 0:n.grab)||"grab"),this.isDragging=!1,this.target=[]}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}moveElement(t,e){return dm(this,void 0,void 0,function*(){const{graph:n,model:i}=this.context,{dropEffect:a}=this.options;a==="move"&&t.forEach(s=>i.refreshComboData(s)),n.translateElementBy(Object.fromEntries(t.map(s=>[s,e])),!1)})}moveShadow(t){if(!this.shadow)return;const{x:e=0,y:n=0}=this.shadow.attributes,[i,a]=t;this.shadow.attr({x:+e+i,y:+n+a})}createShadow(t){const e=bt(this.options,"shadow"),n=Cs(t.map(u=>this.context.element.getElement(u).getBounds())),[i,a]=n.min;this.shadowOrigin=[i,a];const[s,o]=ri(n),l={width:s,height:o,x:i,y:a};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},e),l),{visibility:"visible"})):(this.shadow=new Un({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},e),l),{pointerEvents:"none"})}),this.context.canvas.appendChild(this.shadow))}showEdges(){this.options.shadow||this.hiddenEdges.length===0||(this.context.graph.showElement(this.hiddenEdges),this.hiddenEdges=[])}hideEdge(){const{hideEdge:t,shadow:e}=this.options;if(t==="none"||e)return;const{graph:n}=this.context;t==="all"?this.hiddenEdges=n.getEdgeData().map(j):this.hiddenEdges=Array.from(new Set(this.target.map(i=>n.getRelatedEdgesData(i,t).map(j)).flat())),n.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.removeEventListener("blur",this.onDragEnd),n.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.off(`${i}:${V.DRAG_START}`,this.onDragStart),t.off(`${i}:${V.DRAG}`,this.onDrag),t.off(`${i}:${V.DRAG_END}`,this.onDragEnd),t.off(`${i}:${V.POINTER_ENTER}`,this.setCursor),t.off(`${i}:${V.POINTER_LEAVE}`,this.setCursor)}),t.off(`combo:${V.DROP}`,this.onDrop),t.off(`canvas:${V.DROP}`,this.onDrop)}destroy(){var t;this.unbindEvents(),(t=this.shadow)===null||t===void 0||t.destroy(),super.destroy()}}Ys.defaultOptions={animation:!0,enable:r=>["node","combo"].includes(r.targetType),dropEffect:"move",state:"selected",hideEdge:"none",shadow:!1,shadowZIndex:100,shadowFill:"#F3F9FF",shadowFillOpacity:.5,shadowStroke:"#1890FF",shadowStrokeOpacity:.9,shadowLineDash:[5,5],cursor:{default:"default",grab:"grab",grabbing:"grabbing"}};var Et=Y(44326);class Bh{constructor(t,e){this.context=t,this.options=e||{}}}var VA=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})},HA=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function fF(r){const{type:t}=r;return!!(["comboCombined","comboForce"].includes(t)||t==="antv-dagre"&&r.sortByCombo)}function UA(r){const{type:t}=r;return["compact-box","mindmap","dendrogram","indented"].includes(t)}function vF(r){return isNumber(r.x)&&isNumber(r.y)}function yu(r){const{nodes:t,edges:e}=r,n={nodes:[],edges:[],combos:[]};return t.forEach(i=>{const a=i.data._isCombo?n.combos:n.nodes,{x:s,y:o,z:l=0}=i.data;a==null||a.push({id:i.id,style:{x:s,y:o,z:l}})}),e.forEach(i=>{const{id:a,source:s,target:o,data:{points:l=[],controlPoints:u=l.slice(1,l.length-1)}}=i;n.edges.push({id:a,source:s,target:o,style:Object.assign({},u!=null&&u.length?{controlPoints:u.map(Ot)}:{})})}),n}function YA(r,t){class e extends Bh{constructor(i,a){if(super(i,a),this.instance=new r({}),this.id=this.instance.id,"stop"in this.instance&&"tick"in this.instance){const s=this.instance;this.stop=s.stop.bind(s),this.tick=o=>{const l=s.tick(o);return yu(l)}}}execute(i,a){return VA(this,void 0,void 0,function*(){return yu(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions((0,dn.Z)({},this.options,a))))})}transformOptions(i){const{onTick:a}=i;return a&&(i.onTick=s=>a(yu(s))),i}graphData2LayoutModel(i){const{nodes:a=[],edges:s=[],combos:o=[]}=i,l=a.map(f=>{const v=j(f),{data:g,style:p,combo:m}=f,y=HA(f,["data","style","combo"]),b={id:v,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},g),{data:g}),m?{parentId:m}:{}),{style:p}),y)};return p!=null&&p.x&&Object.assign(b.data,{x:p.x}),p!=null&&p.y&&Object.assign(b.data,{y:p.y}),p!=null&&p.z&&Object.assign(b.data,{z:p.z}),b}),u=new Map(l.map(f=>[f.id,f])),c=s.filter(f=>{const{source:v,target:g}=f;return u.has(v)&&u.has(g)}).map(f=>{const{source:v,target:g,data:p,style:m}=f;return{id:j(f),source:v,target:g,data:Object.assign({},p),style:Object.assign({},m)}}),d=o.map(f=>({id:j(f),data:Object.assign({_isCombo:!0},f.data),style:Object.assign({},f.style)})),h=new Et.k({nodes:[...l,...d],edges:c});return t.model.model.hasTreeStructure(Ve)&&(h.attachTreeStructure(Ve),l.forEach(f=>{const v=t.model.model.getParent(f.id,Ve);v&&h.hasNode(v.id)&&h.setParent(f.id,v.id,Ve)})),h}}return e}function Fh(r,t,...e){if(t in r)return r[t](...e);if("instance"in r){const n=r.instance;if(t in n)return n[t](...e)}return null}function hm(r,t){if(t in r)return r[t];if("instance"in r){const e=r.instance;if(t in e)return e[t]}return null}var XA=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class KA extends Ys{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(t=>["d3-force","d3-force-3d"].includes(t==null?void 0:t.id))}validate(t){return this.context.layout?this.forceLayoutInstance?super.validate(t):(en.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(t,e){return XA(this,void 0,void 0,function*(){const n=this.forceLayoutInstance;this.context.graph.getNodeData(t).forEach((i,a)=>{const{x:s=0,y:o=0}=i.style||{};n&&Fh(n,"setFixedPosition",t[a],[...Ee([+s,+o],e)])})})}onDragStart(t){if(this.enable=this.validate(t),!this.enable)return;this.target=this.getSelectedNodeIDs([t.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const e=this.forceLayoutInstance;e&&hm(e,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(n=>{const{x:i=0,y:a=0}=n.style||{};e&&Fh(e,"setFixedPosition",j(n),[+i,+a])})}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.moveElement(this.target,e)}onDragEnd(){const t=this.forceLayoutInstance;t&&hm(t,"simulation").alphaTarget(0),this.context.graph.getNodeData(this.target).forEach(e=>{t&&Fh(t,"setFixedPosition",j(e),[null,null,null])})}}var fm=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class bu extends cn{constructor(t,e){super(t,Object.assign({},bu.defaultOptions,e)),this.isZoomEvent=n=>!!(n.data&&"scale"in n.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=n=>fm(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context,{state:a,nodeFilter:s,edgeFilter:o,comboFilter:l}=this.options,u=(a?i.getElementDataByState("node",a):i.getNodeData()).filter(s),c=(a?i.getElementDataByState("edge",a):i.getEdgeData()).filter(o),d=(a?i.getElementDataByState("combo",a):i.getComboData()).filter(l),h=this.isZoomEvent(n)?this.zoom=Math.max(.01,Math.min(n.data.scale,10)):this.zoom,f=[...u,...d];f.length>0&&f.forEach(v=>this.fixNodeLike(v,h)),this.updateRelatedEdges(),c.length>0&&c.forEach(v=>this.fixEdge(v,h))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(n,i,a)=>{var s;const o=this.cachedStyles.get(n)||[],l=((s=o.find(u=>u.shape===i))===null||s===void 0?void 0:s.style)||{};return a in l||(l[a]=i.attributes[a],this.cachedStyles.set(n,[...o.filter(u=>u.shape!==i),{shape:i,style:l}])),l[a]},this.scaleEntireElement=(n,i,a)=>{i.setLocalScale(1/a);const s=this.cachedStyles.get(n)||[];s.push({shape:i}),this.cachedStyles.set(n,s)},this.scaleSpecificShapes=(n,i,a)=>{const s=uT(n);(Array.isArray(a)?a:[a]).forEach(l=>{const{shape:u,fields:c}=l,d=typeof u=="function"?u(s):n.getShape(u);if(d){if(!c){this.scaleEntireElement(n.id,d,i);return}c.forEach(h=>{const f=this.getOriginalFieldValue(n.id,d,h);(0,oe.Z)(f)&&(d.style[h]=f/i)})}})},this.skipIfExceedViewport=n=>{const{viewport:i}=this.context;return!(i!=null&&i.isInViewport(n.getRenderBounds(),!1,30))},this.fixNodeLike=(n,i)=>{const a=j(n),{element:s,model:o}=this.context,l=s.getElement(a);if(!l||this.skipIfExceedViewport(l))return;o.getRelatedEdgesData(a).forEach(d=>this.relatedEdgeToUpdate.add(j(d)));const c=this.options[l.type];if(!c){this.scaleEntireElement(a,l,i);return}this.scaleSpecificShapes(l,i,c)},this.fixEdge=(n,i)=>{const a=j(n),s=this.context.element.getElement(a);if(!s||this.skipIfExceedViewport(s))return;const o=this.options.edge;if(!o){s.style.transformOrigin="center",this.scaleEntireElement(a,s,i);return}this.scaleSpecificShapes(s,i,o)},this.updateRelatedEdges=()=>{const{element:n}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(i=>{const a=n.getElement(i);a==null||a.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=n=>fm(this,void 0,void 0,function*(){var i;!((i=n.data)===null||i===void 0)&&i.firstRender||(this.options.reset?this.restoreCachedStyles():this.fixElementSize({data:{scale:this.zoom}}))}),this.bindEvents()}restoreCachedStyles(){if(this.cachedStyles.size>0){this.cachedStyles.forEach(i=>{i.forEach(({shape:a,style:s})=>{if((0,xr.Z)(s))a.setLocalScale(1);else{if(this.options.state)return;Object.entries(s).forEach(([o,l])=>a.style[o]=l)}})});const{graph:t,element:e}=this.context,n=Object.keys(Object.fromEntries(this.cachedStyles)).filter(i=>i&&t.getElementType(i)==="node");if(n.length>0){const i=new Set;n.forEach(a=>{t.getRelatedEdgesData(a).forEach(s=>i.add(j(s)))}),i.forEach(a=>{const s=e==null?void 0:e.getElement(a);s==null||s.update({})})}}}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_DRAW,this.resetTransform),t.on(Q.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:t}=this.context;t.off(Q.AFTER_DRAW,this.resetTransform),t.off(Q.AFTER_TRANSFORM,this.fixElementSize)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}bu.defaultOptions={enable:r=>r.data.scale<1,nodeFilter:()=>!0,edgeFilter:()=>!0,comboFilter:()=>!0,edge:[{shape:"key",fields:["lineWidth"]},{shape:"halo",fields:["lineWidth"]},{shape:"label"}],reset:!1};var $A=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class xu extends cn{constructor(t,e){super(t,Object.assign({},xu.defaultOptions,e)),this.focus=n=>$A(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context;yield i.focusElement(n.target.id,this.options.animation)}),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Gi.forEach(e=>{t.on(`${e}:${V.CLICK}`,this.focus)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Gi.forEach(e=>{t.off(`${e}:${V.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),super.destroy()}}xu.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0};class Eu extends cn{constructor(t,e){super(t,Object.assign({},Eu.defaultOptions,e)),this.isFrozen=!1,this.toggleFrozen=n=>{this.isFrozen=n.type==="dragstart"},this.hoverElement=n=>{if(!this.validate(n))return;const i=n.type===V.POINTER_ENTER;this.updateElementsState(n,i);const{onHover:a,onHoverEnd:s}=this.options;i?a==null||a(n):s==null||s(n)},this.updateElementsState=(n,i)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:a}=this.context,{state:s,animation:o,inactiveState:l}=this.options,u=this.getActiveIds(n),c={};if(s&&Object.assign(c,this.getElementsState(u,s,i)),l){const d=Pp(a.getData(),!0).filter(h=>!u.includes(h));Object.assign(c,this.getElementsState(d,l,i))}a.setElementState(c,o)},this.getElementsState=(n,i,a)=>{const{graph:s}=this.context,o={};return n.forEach(l=>{const u=s.getElementState(l);a?o[l]=u.includes(i)?u:[...u,i]:o[l]=u.filter(c=>c!==i)}),o},this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Gi.forEach(n=>{t.on(`${n}:${V.POINTER_ENTER}`,this.hoverElement),t.on(`${n}:${V.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.addEventListener(`${V.DRAG_START}`,this.toggleFrozen),e.addEventListener(`${V.DRAG_END}`,this.toggleFrozen)}getActiveIds(t){const{graph:e}=this.context,{degree:n,direction:i}=this.options,a=t.target.id;return n?Hp(e,t.targetType,a,typeof n=="function"?n(t):n,i):[a]}validate(t){if(this.destroyed||this.isFrozen||hu(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Gi.forEach(n=>{t.off(`${n}:${V.POINTER_ENTER}`,this.hoverElement),t.off(`${n}:${V.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.removeEventListener(`${V.DRAG_START}`,this.toggleFrozen),e.removeEventListener(`${V.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}Eu.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class qA extends Rs{onPointerDown(t){if(!super.validate(t)||!super.isKeydown()||this.points)return;const{canvas:e}=this.context;this.pathShape=new Pr({id:"g6-lasso-select",style:this.options.style}),e.appendChild(this.pathShape),this.points=[Ml(t)]}onPointerMove(t){var e;if(!this.points)return;const{immediately:n,mode:i}=this.options;this.points.push(Ml(t)),(e=this.pathShape)===null||e===void 0||e.setAttribute("d",iT(this.points)),n&&i==="default"&&this.points.length>2&&super.updateElementsStates(this.points)}onPointerUp(){if(this.points){if(this.points.length<2){this.clearLasso();return}super.updateElementsStates(this.points),this.clearLasso()}}clearLasso(){var t;(t=this.pathShape)===null||t===void 0||t.remove(),this.pathShape=void 0,this.points=void 0}}class wu extends cn{constructor(t,e){super(t,Object.assign({},wu.defaultOptions,e)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(n,i,a)=>{n.filter(Boolean).forEach(s=>{i==="hidden"&&!s.isVisible()?this.hiddenShapes.push(s):i==="visible"&&this.hiddenShapes.includes(s)?this.hiddenShapes.splice(this.hiddenShapes.indexOf(s),1):Fi(s,i,!1,a)})},this.filterShapes=(n,i)=>{if((0,de.Z)(i))return s=>!i(n,s);const a=i==null?void 0:i[n];return s=>s.className?!(a!=null&&a.includes(s.className)):!0},this.hideShapes=n=>{if(!this.validate(n)||!this.isVisible)return;const{element:i}=this.context,{shapes:a={}}=this.options;this.setElementsVisibility(i.getNodes(),"hidden",this.filterShapes("node",a)),this.setElementsVisibility(i.getEdges(),"hidden",this.filterShapes("edge",a)),this.setElementsVisibility(i.getCombos(),"hidden",this.filterShapes("combo",a)),this.isVisible=!1},this.showShapes=(0,Us.Z)(n=>{if(!this.validate(n)||this.isVisible)return;const{element:i}=this.context;this.setElementsVisibility(i.getNodes(),"visible"),this.setElementsVisibility(i.getEdges(),"visible"),this.setElementsVisibility(i.getCombos(),"visible"),this.isVisible=!0},this.options.debounce),this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(Q.BEFORE_TRANSFORM,this.hideShapes),t.on(Q.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:t}=this.context;t.off(Q.BEFORE_TRANSFORM,this.hideShapes),t.off(Q.AFTER_TRANSFORM,this.showShapes)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}wu.defaultOptions={enable:!0,debounce:200,shapes:r=>r==="node"};var vm=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class ku extends cn{constructor(t,e){super(t,Object.assign({},ku.defaultOptions,e)),this.onWheel=n=>vm(this,void 0,void 0,function*(){this.options.preventDefault&&n.preventDefault();const i=n.deltaX,a=n.deltaY;yield this.scroll([-i,-a],n)}),this.shortcut=new Ma(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){var t,e;const{trigger:n}=this.options;if(this.shortcut.unbindAll(),(0,yt.Z)(n)){(t=this.graphDom)===null||t===void 0||t.removeEventListener(V.WHEEL,this.onWheel);const{up:i=[],down:a=[],left:s=[],right:o=[]}=n;this.shortcut.bind(i,l=>this.scroll([0,-10],l)),this.shortcut.bind(a,l=>this.scroll([0,10],l)),this.shortcut.bind(s,l=>this.scroll([-10,0],l)),this.shortcut.bind(o,l=>this.scroll([10,0],l))}else(e=this.graphDom)===null||e===void 0||e.addEventListener(V.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(t){const{sensitivity:e}=this.options;return t=Dr(t,e),t=this.clampByDirection(t),t=this.clampByRange(t),t}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,c]=mr(this.options.range),d=[s*o,a*l,s*u,a*c],h=ai(qd(n.getCanvasCenter()),d),f=He(n.getViewportCenter(),[t,e,0]);if(!Yn(f,h)){const{min:[v,g],max:[p,m]}=h;(f[0]<v&&t>0||f[0]>p&&t<0)&&(t=0),(f[1]<g&&e>0||f[1]>m&&e<0)&&(e=0)}return[t,e]}scroll(t,e){return vm(this,void 0,void 0,function*(){if(!this.validate(e))return;const{onFinish:n}=this.options,i=this.context.graph,a=this.formatDisplacement(t);yield i.translateBy(a,!1),n==null||n()})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.graphDom)===null||t===void 0||t.removeEventListener(V.WHEEL,this.onWheel),super.destroy()}}ku.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var gm=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class _u extends cn{constructor(t,e){super(t,Object.assign({},_u.defaultOptions,e)),this.zoom=(n,i,a)=>gm(this,void 0,void 0,function*(){if(!this.validate(i))return;const{graph:s}=this.context;let o;"viewport"in i&&(o=Ot(i.viewport));const{sensitivity:l,onFinish:u}=this.options,c=1+(0,Ne.Z)(n,-50,50)*l/100,d=s.getZoom();yield s.zoomTo(d*c,a,o),u==null||u()}),this.onReset=()=>gm(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=n=>{this.options.preventDefault&&n.preventDefault()},this.shortcut=new Ma(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){var t;const{trigger:e}=this.options;if(this.shortcut.unbindAll(),Array.isArray(e)&&((t=this.context.canvas.getContainer())===null||t===void 0||t.addEventListener(V.WHEEL,this.preventDefault),this.shortcut.bind([...e,V.WHEEL],n=>{const{deltaX:i,deltaY:a}=n;this.zoom(-(a!=null?a:i),n,!1)})),typeof e=="object"){const{zoomIn:n=[],zoomOut:i=[],reset:a=[]}=e;this.shortcut.bind(n,s=>this.zoom(10,s,this.options.animation)),this.shortcut.bind(i,s=>this.zoom(-10,s,this.options.animation)),this.shortcut.bind(a,this.onReset)}}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,de.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.context.canvas.getContainer())===null||t===void 0||t.removeEventListener(V.WHEEL,this.preventDefault),super.destroy()}}_u.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};var Su=Y(81746),zh=function(r,t){return zh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},zh(r,t)};function gF(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zh(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var pm=function(){return pm=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},pm.apply(this,arguments)};function mm(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e}function pF(r,t,e,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,t,e,n);else for(var o=r.length-1;o>=0;o--)(s=r[o])&&(a=(i<3?s(a):i>3?s(t,e,a):s(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a}function mF(r,t){return function(e,n){t(e,n,r)}}function yF(r,t,e,n,i,a){function s(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var o=n.kind,l=o==="getter"?"get":o==="setter"?"set":"value",u=!t&&r?n.static?r:r.prototype:null,c=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d,h=!1,f=e.length-1;f>=0;f--){var v={};for(var g in n)v[g]=g==="access"?{}:n[g];for(var g in n.access)v.access[g]=n.access[g];v.addInitializer=function(m){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(m||null))};var p=(0,e[f])(o==="accessor"?{get:c.get,set:c.set}:c[l],v);if(o==="accessor"){if(p===void 0)continue;if(p===null||typeof p!="object")throw new TypeError("Object expected");(d=s(p.get))&&(c.get=d),(d=s(p.set))&&(c.set=d),(d=s(p.init))&&i.push(d)}else(d=s(p))&&(o==="field"?i.push(d):c[l]=d)}u&&Object.defineProperty(u,n.name,c),h=!0}function bF(r,t,e){for(var n=arguments.length>2,i=0;i<t.length;i++)e=n?t[i].call(r,e):t[i].call(r);return n?e:void 0}function xF(r){return typeof r=="symbol"?r:"".concat(r)}function EF(r,t,e){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(r,"name",{configurable:!0,value:e?"".concat(e," ",t):t})}function wF(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}function we(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})}function kF(r,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(e=0)),e;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,i=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1],a=u;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(u);break}a[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var ym=Object.create?function(r,t,e,n){n===void 0&&(n=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(r,n,i)}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]};function _F(r,t){for(var e in r)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&ym(t,r,e)}function bm(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function JA(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var n=e.call(r),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(s)throw s.error}}return a}function SF(){for(var r=[],t=0;t<arguments.length;t++)r=r.concat(JA(arguments[t]));return r}function TF(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var n=Array(r),i=0,t=0;t<e;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)n[i]=a[s];return n}function AF(r,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return r.concat(a||Array.prototype.slice.call(t))}function Tu(r){return this instanceof Tu?(this.v=r,this):new Tu(r)}function CF(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),i,a=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(h){n[h]&&(i[h]=function(f){return new Promise(function(v,g){a.push([h,f,v,g])>1||o(h,f)})})}function o(h,f){try{l(n[h](f))}catch(v){d(a[0][3],v)}}function l(h){h.value instanceof Tu?Promise.resolve(h.value.v).then(u,c):d(a[0][2],h)}function u(h){o("next",h)}function c(h){o("throw",h)}function d(h,f){h(f),a.shift(),a.length&&o(a[0][0],a[0][1])}}function OF(r){var t,e;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,a){t[i]=r[i]?function(s){return(e=!e)?{value:Tu(r[i](s)),done:!1}:a?a(s):s}:a}}function PF(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof bm=="function"?bm(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(a){e[a]=r[a]&&function(s){return new Promise(function(o,l){s=r[a](s),i(o,l,s.done,s.value)})}}function i(a,s,o,l){Promise.resolve(l).then(function(u){a({value:u,done:o})},s)}}function NF(r,t){return Object.defineProperty?Object.defineProperty(r,"raw",{value:t}):r.raw=t,r}var QA=Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t};function MF(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&ym(t,r,e);return QA(t,r),t}function RF(r){return r&&r.__esModule?r:{default:r}}function LF(r,t,e,n){if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?r!==t||!n:!t.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?n:e==="a"?n.call(r):n?n.value:t.get(r)}function DF(r,t,e,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?r!==t||!i:!t.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,e):i?i.value=e:t.set(r,e),e}function IF(r,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?t===r:r.has(t)}const eC=(r,t)=>{if(r!=="next"&&r!=="prev")return t},xm=r=>{r.prev.next=r.next,r.next.prev=r.prev,delete r.next,delete r.prev};class tC{constructor(){const t={};t.prev=t,t.next=t.prev,this.shortcut=t}dequeue(){const t=this.shortcut,e=t.prev;if(e&&e!==t)return xm(e),e}enqueue(t){const e=this.shortcut;t.prev&&t.next&&xm(t),t.next=e.next,e.next.prev=t,e.next=t,t.prev=e}toString(){const t=[],e=this.shortcut;let n=e.prev;for(;n!==e;)t.push(JSON.stringify(n,eC)),n=n==null?void 0:n.prev;return`[${t.join(", ")}]`}}class nC extends tC{}const rC=()=>1,iC=(r,t)=>{var e;if(r.getAllNodes().length<=1)return[];const n=sC(r,t||rC);return(e=aC(n.graph,n.buckets,n.zeroIdx).map(a=>r.getRelatedEdges(a.v,"out").filter(({target:s})=>s===a.w)))===null||e===void 0?void 0:e.flat()},aC=(r,t,e)=>{let n=[];const i=t[t.length-1],a=t[0];let s;for(;r.getAllNodes().length;){for(;s=a.dequeue();)Gh(r,t,e,s);for(;s=i.dequeue();)Gh(r,t,e,s);if(r.getAllNodes().length){for(let o=t.length-2;o>0;--o)if(s=t[o].dequeue(),s){n=n.concat(Gh(r,t,e,s,!0));break}}}return n},Gh=(r,t,e,n,i)=>{var a,s;const o=[];return r.hasNode(n.v)&&((a=r.getRelatedEdges(n.v,"in"))===null||a===void 0||a.forEach(l=>{const u=l.data.weight,c=r.getNode(l.source);i&&o.push({v:l.source,w:l.target,in:0,out:0}),c.data.out===void 0&&(c.data.out=0),c.data.out-=u,jh(t,e,Object.assign({v:c.id},c.data))}),(s=r.getRelatedEdges(n.v,"out"))===null||s===void 0||s.forEach(l=>{const u=l.data.weight,c=l.target,d=r.getNode(c);d.data.in===void 0&&(d.data.in=0),d.data.in-=u,jh(t,e,Object.assign({v:d.id},d.data))}),r.removeNode(n.v)),i?o:void 0},sC=(r,t)=>{const e=new Et.k;let n=0,i=0;r.getAllNodes().forEach(l=>{e.addNode({id:l.id,data:{v:l.id,in:0,out:0}})}),r.getAllEdges().forEach(l=>{const u=e.getRelatedEdges(l.source,"out").find(d=>d.target===l.target),c=(t==null?void 0:t(l))||1;u?e.updateEdgeData(u==null?void 0:u.id,Object.assign(Object.assign({},u.data),{weight:u.data.weight+c})):e.addEdge({id:l.id,source:l.source,target:l.target,data:{weight:c}}),i=Math.max(i,e.getNode(l.source).data.out+=c),n=Math.max(n,e.getNode(l.target).data.in+=c)});const a=[],s=i+n+3;for(let l=0;l<s;l++)a.push(new nC);const o=n+1;return e.getAllNodes().forEach(l=>{jh(a,o,Object.assign({v:l.id},e.getNode(l.id).data))}),{buckets:a,zeroIdx:o,graph:e}},jh=(r,t,e)=>{e.out?e.in?r[e.out-e.in+t].enqueue(e):r[r.length-1].enqueue(e):r[0].enqueue(e)},oC=(r,t)=>{const n=t==="greedy"?iC(r,(i=>a=>a.data.weight||1)(r)):lC(r);n==null||n.forEach(i=>{const a=i.data;r.removeEdge(i.id),a.forwardName=i.data.name,a.reversed=!0,r.addEdge({id:i.id,source:i.target,target:i.source,data:Object.assign({},a)})})},lC=r=>{const t=[],e={},n={},i=a=>{n[a]||(n[a]=!0,e[a]=!0,r.getRelatedEdges(a,"out").forEach(s=>{e[s.target]?t.push(s):i(s.target)}),delete e[a])};return r.getAllNodes().forEach(a=>i(a.id)),t},uC=r=>{r.getAllEdges().forEach(t=>{const e=t.data;if(e.reversed){r.removeEdge(t.id);const n=e.forwardName;delete e.reversed,delete e.forwardName,r.addEdge({id:t.id,source:t.target,target:t.source,data:Object.assign(Object.assign({},e),{forwardName:n})})}})},cC=(r,t)=>Number(r)-Number(t),Ga=(r,t,e,n)=>{let i;do i=`${n}${Math.random()}`;while(r.hasNode(i));return e.dummy=t,r.addNode({id:i,data:e}),i},dC=r=>{const t=new Et.k;return r.getAllNodes().forEach(e=>{t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{const n=t.getRelatedEdges(e.source,"out").find(i=>i.target===e.target);n?t.updateEdgeData(n==null?void 0:n.id,Object.assign(Object.assign({},n.data),{weight:n.data.weight+e.data.weight||0,minlen:Math.max(n.data.minlen,e.data.minlen||1)})):t.addEdge({id:e.id,source:e.source,target:e.target,data:{weight:e.data.weight||0,minlen:e.data.minlen||1}})}),t},Em=r=>{const t=new Et.k;return r.getAllNodes().forEach(e=>{r.getChildren(e.id).length||t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{t.addEdge(e)}),t},wm=(r,t)=>r==null?void 0:r.reduce((e,n,i)=>(e[n]=t[i],e),{}),BF=r=>{const t={};return r.getAllNodes().forEach(e=>{const n={};r.getRelatedEdges(e.id,"out").forEach(i=>{n[i.target]=(n[i.target]||0)+(i.data.weight||0)}),t[e.id]=n}),t},FF=r=>{const t=r.getAllNodes(),e=t.map(n=>{const i={};return r.getRelatedEdges(n.id,"in").forEach(a=>{i[a.source]=(i[a.source]||0)+a.data.weight}),i});return wm(t.map(n=>n.id),e)},km=(r,t)=>{const e=Number(r.x),n=Number(r.y),i=Number(t.x)-e,a=Number(t.y)-n;let s=Number(r.width)/2,o=Number(r.height)/2;if(!i&&!a)return{x:0,y:0};let l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:e+l,y:n+u}},Xs=r=>{const t=[],e=Sm(r)+1;for(let n=0;n<e;n++)t.push([]);r.getAllNodes().forEach(n=>{const i=n.data.rank;i!==void 0&&t[i]&&t[i].push(n.id)});for(let n=0;n<e;n++)t[n]=t[n].sort((i,a)=>cC(r.getNode(i).data.order,r.getNode(a).data.order));return t},hC=r=>{const t=r.getAllNodes().filter(n=>n.data.rank!==void 0).map(n=>n.data.rank),e=Math.min(...t);r.getAllNodes().forEach(n=>{n.data.hasOwnProperty("rank")&&e!==1/0&&(n.data.rank-=e)})},fC=(r,t=0)=>{const e=r.getAllNodes(),n=e.filter(o=>o.data.rank!==void 0).map(o=>o.data.rank),i=Math.min(...n),a=[];e.forEach(o=>{const l=(o.data.rank||0)-i;a[l]||(a[l]=[]),a[l].push(o.id)});let s=0;for(let o=0;o<a.length;o++){const l=a[o];l===void 0?o%t!==0&&(s-=1):s&&(l==null||l.forEach(u=>{const c=r.getNode(u);c&&(c.data.rank=c.data.rank||0,c.data.rank+=s)}))}},_m=(r,t,e,n)=>{const i={width:0,height:0};return(0,oe.Z)(e)&&(0,oe.Z)(n)&&(i.rank=e,i.order=n),Ga(r,"border",i,t)},Sm=r=>{let t;return r.getAllNodes().forEach(e=>{const n=e.data.rank;n!==void 0&&(t===void 0||n>t)&&(t=n)}),t||(t=0),t},vC=(r,t)=>{const e={lhs:[],rhs:[]};return r==null||r.forEach(n=>{t(n)?e.lhs.push(n):e.rhs.push(n)}),e},Wh=(r,t)=>r.reduce((e,n)=>{const i=t(e),a=t(n);return i>a?n:e}),Tm=(r,t,e,n,i,a)=>{n.includes(t.id)||(n.push(t.id),e||a.push(t.id),i(t.id).forEach(s=>Tm(r,s,e,n,i,a)),e&&a.push(t.id))},Am=(r,t,e,n)=>{const i=Array.isArray(t)?t:[t],a=l=>n?r.getSuccessors(l):r.getNeighbors(l),s=[],o=[];return i.forEach(l=>{if(r.hasNode(l.id))Tm(r,l,e==="post",o,a,s);else throw new Error(`Graph does not have node: ${l}`)}),s},gC=r=>{const t=e=>{const n=r.getChildren(e),i=r.getNode(e);if(n!=null&&n.length&&n.forEach(a=>t(a.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let a=i.data.minRank,s=i.data.maxRank+1;a<s;a+=1)Cm(r,"borderLeft","_bl",e,i,a),Cm(r,"borderRight","_br",e,i,a)}};r.getRoots().forEach(e=>t(e.id))},Cm=(r,t,e,n,i,a)=>{const s={rank:a,borderType:t,width:0,height:0},o=i.data[t][a-1],l=Ga(r,"border",s,e);i.data[t][a]=l,r.setParent(l,n),o&&r.addEdge({id:`e${Math.random()}`,source:o,target:l,data:{weight:1}})},pC=(r,t)=>{const e=t.toLowerCase();(e==="lr"||e==="rl")&&Om(r)},mC=(r,t)=>{const e=t.toLowerCase();(e==="bt"||e==="rl")&&yC(r),(e==="lr"||e==="rl")&&(bC(r),Om(r))},Om=r=>{r.getAllNodes().forEach(t=>{Pm(t)}),r.getAllEdges().forEach(t=>{Pm(t)})},Pm=r=>{const t=r.data.width;r.data.width=r.data.height,r.data.height=t},yC=r=>{r.getAllNodes().forEach(t=>{Zh(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Zh(n)),t.data.hasOwnProperty("y")&&Zh(t.data)})},Zh=r=>{r!=null&&r.y&&(r.y=-r.y)},bC=r=>{r.getAllNodes().forEach(t=>{Vh(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Vh(n)),t.data.hasOwnProperty("x")&&Vh(t.data)})},Vh=r=>{const t=r.x;r.x=r.y,r.y=t},xC=r=>{const t=Ga(r,"root",{},"_root"),e=EC(r);let n=Math.max(...Object.values(e));Math.abs(n)===1/0&&(n=1);const i=n-1,a=2*i+1;r.getAllEdges().forEach(o=>{o.data.minlen*=a});const s=wC(r)+1;return r.getRoots().forEach(o=>{Nm(r,t,a,s,i,e,o.id)}),{nestingRoot:t,nodeRankFactor:a}},Nm=(r,t,e,n,i,a,s)=>{const o=r.getChildren(s);if(!(o!=null&&o.length)){s!==t&&r.addEdge({id:`e${Math.random()}`,source:t,target:s,data:{weight:0,minlen:e}});return}const l=_m(r,"_bt"),u=_m(r,"_bb"),c=r.getNode(s);r.setParent(l,s),c.data.borderTop=l,r.setParent(u,s),c.data.borderBottom=u,o==null||o.forEach(d=>{Nm(r,t,e,n,i,a,d.id);const h=d.data.borderTop?d.data.borderTop:d.id,f=d.data.borderBottom?d.data.borderBottom:d.id,v=d.data.borderTop?n:2*n,g=h!==f?1:i-a[s]+1;r.addEdge({id:`e${Math.random()}`,source:l,target:h,data:{minlen:g,weight:v,nestingEdge:!0}}),r.addEdge({id:`e${Math.random()}`,source:f,target:u,data:{minlen:g,weight:v,nestingEdge:!0}})}),r.getParent(s)||r.addEdge({id:`e${Math.random()}`,source:t,target:l,data:{weight:0,minlen:i+a[s]}})},EC=r=>{const t={},e=(n,i)=>{const a=r.getChildren(n);a==null||a.forEach(s=>e(s.id,i+1)),t[n]=i};return r.getRoots().forEach(n=>e(n.id,1)),t},wC=r=>{let t=0;return r.getAllEdges().forEach(e=>{t+=e.data.weight}),t},kC=(r,t)=>{t&&r.removeNode(t),r.getAllEdges().forEach(e=>{e.data.nestingEdge&&r.removeEdge(e.id)})},_C="edge",Mm="edge-label",SC=(r,t)=>{r.getAllEdges().forEach(e=>TC(r,e,t))},TC=(r,t,e)=>{let n=t.source,i=r.getNode(n).data.rank;const a=t.target,s=r.getNode(a).data.rank,o=t.data.labelRank;if(s===i+1)return;r.removeEdge(t.id);let l,u,c;for(c=0,++i;i<s;++c,++i)t.data.points=[],u={originalEdge:t,width:0,height:0,rank:i},l=Ga(r,_C,u,"_d"),i===o&&(u.width=t.data.width,u.height=t.data.height,u.dummy=Mm,u.labelpos=t.data.labelpos),r.addEdge({id:`e${Math.random()}`,source:n,target:l,data:{weight:t.data.weight}}),c===0&&e.push(l),n=l;r.addEdge({id:`e${Math.random()}`,source:n,target:a,data:{weight:t.data.weight}})},AC=(r,t)=>{t.forEach(e=>{let n=r.getNode(e);const{data:i}=n,a=i.originalEdge;let s;a&&r.addEdge(a);let o=e;for(;n.data.dummy;)s=r.getSuccessors(o)[0],r.removeNode(o),a.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===Mm&&(a.data.x=n.data.x,a.data.y=n.data.y,a.data.width=n.data.width,a.data.height=n.data.height),o=s.id,n=r.getNode(o)})},CC=(r,t,e)=>{const n={};let i;e==null||e.forEach(a=>{let s=r.getParent(a),o,l;for(;s;){if(o=r.getParent(s.id),o?(l=n[o.id],n[o.id]=s.id):(l=i,i=s.id),l&&l!==s.id){t.hasNode(l)||t.addNode({id:l,data:{}}),t.hasNode(s.id)||t.addNode({id:s.id,data:{}}),t.hasEdge(`e${l}-${s.id}`)||t.addEdge({id:`e${l}-${s.id}`,source:l,target:s.id,data:{}});return}s=o}})},OC=(r,t,e)=>{const n=PC(r),i=new Et.k({tree:[{id:n,children:[],data:{}}]});return r.getAllNodes().forEach(a=>{const s=r.getParent(a.id);(a.data.rank===t||a.data.minRank<=t&&t<=a.data.maxRank)&&(i.hasNode(a.id)||i.addNode(Object.assign({},a)),s!=null&&s.id&&!i.hasNode(s==null?void 0:s.id)&&i.addNode(Object.assign({},s)),i.setParent(a.id,(s==null?void 0:s.id)||n),r.getRelatedEdges(a.id,e).forEach(o=>{const l=o.source===a.id?o.target:o.source;i.hasNode(l)||i.addNode(Object.assign({},r.getNode(l)));const u=i.getRelatedEdges(l,"out").find(({target:d})=>d===a.id),c=u!==void 0?u.data.weight:0;u?i.updateEdgeData(u.id,Object.assign(Object.assign({},u.data),{weight:o.data.weight+c})):i.addEdge({id:o.id,source:l,target:a.id,data:{weight:o.data.weight+c}})}),a.data.hasOwnProperty("minRank")&&i.updateNodeData(a.id,Object.assign(Object.assign({},a.data),{borderLeft:a.data.borderLeft[t],borderRight:a.data.borderRight[t]})))}),i},PC=r=>{let t;for(;r.hasNode(t=`_root${Math.random()}`););return t},NC=(r,t,e)=>{const n=wm(e,e.map((c,d)=>d)),a=t.map(c=>{const d=r.getRelatedEdges(c,"out").map(h=>({pos:n[h.target]||0,weight:h.data.weight}));return d==null?void 0:d.sort((h,f)=>h.pos-f.pos)}).flat().filter(c=>c!==void 0);let s=1;for(;s<e.length;)s<<=1;const o=2*s-1;s-=1;const l=Array(o).fill(0,0,o);let u=0;return a==null||a.forEach(c=>{if(c){let d=c.pos+s;l[d]+=c.weight;let h=0;for(;d>0;)d%2&&(h+=l[d+1]),d=d-1>>1,l[d]+=c.weight;u+=c.weight*h}}),u},Rm=(r,t)=>{let e=0;for(let n=1;n<(t==null?void 0:t.length);n+=1)e+=NC(r,t[n-1],t[n]);return e},Lm=r=>{const t={},e=r.getAllNodes(),n=e.map(u=>{var c;return(c=u.data.rank)!==null&&c!==void 0?c:-1/0}),i=Math.max(...n),a=[];for(let u=0;u<i+1;u++)a.push([]);const s=e.sort((u,c)=>r.getNode(u.id).data.rank-r.getNode(c.id).data.rank),l=s.filter(u=>r.getNode(u.id).data.fixorder!==void 0).sort((u,c)=>r.getNode(u.id).data.fixorder-r.getNode(c.id).data.fixorder);return l==null||l.forEach(u=>{isNaN(r.getNode(u.id).data.rank)||a[r.getNode(u.id).data.rank].push(u.id),t[u.id]=!0}),s==null||s.forEach(u=>r.dfsTree(u.id,c=>{if(t.hasOwnProperty(c.id))return!0;t[c.id]=!0,isNaN(c.data.rank)||a[c.data.rank].push(c.id)})),a},MC=(r,t)=>t.map(e=>{const n=r.getRelatedEdges(e,"in");if(!(n!=null&&n.length))return{v:e};const i={sum:0,weight:0};return n==null||n.forEach(a=>{const s=r.getNode(a.source);i.sum+=a.data.weight*s.data.order,i.weight+=a.data.weight}),{v:e,barycenter:i.sum/i.weight,weight:i.weight}}),RC=(r,t)=>{var e,n,i;const a={};r==null||r.forEach((o,l)=>{a[o.v]={i:l,indegree:0,in:[],out:[],vs:[o.v]};const u=a[o.v];o.barycenter!==void 0&&(u.barycenter=o.barycenter,u.weight=o.weight)}),(e=t.getAllEdges())===null||e===void 0||e.forEach(o=>{const l=a[o.source],u=a[o.target];l!==void 0&&u!==void 0&&(u.indegree++,l.out.push(a[o.target]))});const s=(i=(n=Object.values(a)).filter)===null||i===void 0?void 0:i.call(n,o=>!o.indegree);return LC(s)},LC=r=>{var t,e;const n=[],i=l=>u=>{u.merged||(u.barycenter===void 0||l.barycenter===void 0||u.barycenter>=l.barycenter)&&DC(l,u)},a=l=>u=>{u.in.push(l),--u.indegree===0&&r.push(u)};for(;r!=null&&r.length;){const l=r.pop();n.push(l),(t=l.in.reverse())===null||t===void 0||t.forEach(u=>i(l)(u)),(e=l.out)===null||e===void 0||e.forEach(u=>a(l)(u))}const s=n.filter(l=>!l.merged),o=["vs","i","barycenter","weight"];return s.map(l=>{const u={};return o==null||o.forEach(c=>{l[c]!==void 0&&(u[c]=l[c])}),u})},DC=(r,t)=>{var e;let n=0,i=0;r.weight&&(n+=r.barycenter*r.weight,i+=r.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),r.vs=(e=t.vs)===null||e===void 0?void 0:e.concat(r.vs),r.barycenter=n/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0};var IC=RC;const BC=(r,t,e,n)=>{const i=vC(r,h=>{const f=h.hasOwnProperty("fixorder")&&!isNaN(h.fixorder);return n?!f&&h.hasOwnProperty("barycenter"):f||h.hasOwnProperty("barycenter")}),a=i.lhs,s=i.rhs.sort((h,f)=>-h.i- -f.i),o=[];let l=0,u=0,c=0;a==null||a.sort(FC(!!t,!!e)),c=Dm(o,s,c),a==null||a.forEach(h=>{var f;c+=(f=h.vs)===null||f===void 0?void 0:f.length,o.push(h.vs),l+=h.barycenter*h.weight,u+=h.weight,c=Dm(o,s,c)});const d={vs:o.flat()};return u&&(d.barycenter=l/u,d.weight=u),d},Dm=(r,t,e)=>{let n=e,i;for(;t.length&&(i=t[t.length-1]).i<=n;)t.pop(),r==null||r.push(i.vs),n++;return n},FC=(r,t)=>(e,n)=>{if(e.fixorder!==void 0&&n.fixorder!==void 0)return e.fixorder-n.fixorder;if(e.barycenter<n.barycenter)return-1;if(e.barycenter>n.barycenter)return 1;if(t&&e.order!==void 0&&n.order!==void 0){if(e.order<n.order)return-1;if(e.order>n.order)return 1}return r?n.i-e.i:e.i-n.i},Im=(r,t,e,n,i,a)=>{var s,o,l,u;let c=r.getChildren(t).map(y=>y.id);const d=r.getNode(t),h=d?d.data.borderLeft:void 0,f=d?d.data.borderRight:void 0,v={};h&&(c=c==null?void 0:c.filter(y=>y!==h&&y!==f));const g=MC(r,c||[]);g==null||g.forEach(y=>{var b;if(!((b=r.getChildren(y.v))===null||b===void 0)&&b.length){const _=Im(r,y.v,e,n,a);v[y.v]=_,_.hasOwnProperty("barycenter")&&GC(y,_)}});const p=IC(g,e);zC(p,v),(s=p.filter(y=>y.vs.length>0))===null||s===void 0||s.forEach(y=>{const b=r.getNode(y.vs[0]);b&&(y.fixorder=b.data.fixorder,y.order=b.data.order)});const m=BC(p,n,i,a);if(h&&(m.vs=[h,m.vs,f].flat(),!((o=r.getPredecessors(h))===null||o===void 0)&&o.length)){const y=r.getNode(((l=r.getPredecessors(h))===null||l===void 0?void 0:l[0].id)||""),b=r.getNode(((u=r.getPredecessors(f))===null||u===void 0?void 0:u[0].id)||"");m.hasOwnProperty("barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+y.data.order+b.data.order)/(m.weight+2),m.weight+=2}return m},zC=(r,t)=>{r==null||r.forEach(e=>{var n;const i=(n=e.vs)===null||n===void 0?void 0:n.map(a=>t[a]?t[a].vs:a);e.vs=i.flat()})},GC=(r,t)=>{r.barycenter!==void 0?(r.barycenter=(r.barycenter*r.weight+t.barycenter*t.weight)/(r.weight+t.weight),r.weight+=t.weight):(r.barycenter=t.barycenter,r.weight=t.weight)},jC=(r,t)=>{const e=Sm(r),n=[],i=[];for(let c=1;c<e+1;c++)n.push(c);for(let c=e-1;c>-1;c--)i.push(c);const a=Bm(r,n,"in"),s=Bm(r,i,"out");let o=Lm(r);Hh(r,o);let l=Number.POSITIVE_INFINITY,u;for(let c=0,d=0;d<4;++c,++d){Fm(c%2?a:s,c%4>=2,!1,t),o=Xs(r);const h=Rm(r,o);h<l&&(d=0,u=(0,Pa.Z)(o),l=h)}o=Lm(r),Hh(r,o);for(let c=0,d=0;d<4;++c,++d){Fm(c%2?a:s,c%4>=2,!0,t),o=Xs(r);const h=Rm(r,o);h<l&&(d=0,u=(0,Pa.Z)(o),l=h)}Hh(r,u)},Bm=(r,t,e)=>t.map(n=>OC(r,n,e)),Fm=(r,t,e,n)=>{const i=new Et.k;r==null||r.forEach(a=>{var s;const o=a.getRoots()[0].id,l=Im(a,o,i,t,e,n);for(let u=0;u<((s=l.vs)===null||s===void 0?void 0:s.length);u++){const c=a.getNode(l.vs[u]);c&&(c.data.order=u)}CC(a,i,l.vs)})},Hh=(r,t)=>{t==null||t.forEach(e=>{e==null||e.forEach((n,i)=>{r.getNode(n).data.order=i})})},WC=(r,t)=>{const n=r.getAllNodes().filter(s=>{var o;return!(!((o=r.getChildren(s.id))===null||o===void 0)&&o.length)}).map(s=>s.data.rank),i=Math.max(...n),a=[];for(let s=0;s<i+1;s++)a[s]=[];t==null||t.forEach(s=>{const o=r.getNode(s);!o||o.data.dummy||isNaN(o.data.rank)||(o.data.fixorder=a[o.data.rank].length,a[o.data.rank].push(s))})},ZC=r=>{const t={};let e=0;const n=i=>{const a=e;r.getChildren(i).forEach(s=>n(s.id)),t[i]={low:a,lim:e++}};return r.getRoots().forEach(i=>n(i.id)),t},VC=(r,t,e,n)=>{var i,a;const s=[],o=[],l=Math.min(t[e].low,t[n].low),u=Math.max(t[e].lim,t[n].lim);let c,d;c=e;do c=(i=r.getParent(c))===null||i===void 0?void 0:i.id,s.push(c);while(c&&(t[c].low>l||u>t[c].lim));for(d=c,c=n;c&&c!==d;)o.push(c),c=(a=r.getParent(c))===null||a===void 0?void 0:a.id;return{lca:d,path:s.concat(o.reverse())}},HC=(r,t)=>{const e=ZC(r);t.forEach(n=>{var i,a;let s=n,o=r.getNode(s);const l=o.data.originalEdge;if(!l)return;const u=VC(r,e,l.source,l.target),c=u.path,d=u.lca;let h=0,f=c[h],v=!0;for(;s!==l.target;){if(o=r.getNode(s),v){for(;f!==d&&((i=r.getNode(f))===null||i===void 0?void 0:i.data.maxRank)<o.data.rank;)h++,f=c[h];f===d&&(v=!1)}if(!v){for(;h<c.length-1&&((a=r.getNode(c[h+1]))===null||a===void 0?void 0:a.data.minRank)<=o.data.rank;)h++;f=c[h]}r.hasNode(f)&&r.setParent(s,f),s=r.getSuccessors(s)[0].id}})},zm=(r,t)=>{const e={},n=(i,a)=>{let s=0,o=0;const l=i.length,u=a==null?void 0:a[(a==null?void 0:a.length)-1];return a==null||a.forEach((c,d)=>{var h;const f=UC(r,c),v=f?r.getNode(f.id).data.order:l;(f||c===u)&&((h=a.slice(o,d+1))===null||h===void 0||h.forEach(g=>{var p;(p=r.getPredecessors(g))===null||p===void 0||p.forEach(m=>{var y;const b=r.getNode(m.id),_=b.data.order;(_<s||v<_)&&!(b.data.dummy&&(!((y=r.getNode(g))===null||y===void 0)&&y.data.dummy))&&jm(e,m.id,g)})}),o=d+1,s=v)}),a};return t!=null&&t.length&&t.reduce(n),e},Gm=(r,t)=>{const e={};function n(o,l,u,c,d){var h,f;let v;for(let g=l;g<u;g++)v=o[g],!((h=r.getNode(v))===null||h===void 0)&&h.data.dummy&&((f=r.getPredecessors(v))===null||f===void 0||f.forEach(p=>{const m=r.getNode(p.id);m.data.dummy&&(m.data.order<c||m.data.order>d)&&jm(e,p.id,v)}))}function i(o){return JSON.stringify(o.slice(1))}function a(o,l){const u=i(o);l.get(u)||(n(...o),l.set(u,!0))}const s=(o,l)=>{let u=-1,c,d=0;const h=new Map;return l==null||l.forEach((f,v)=>{var g;if(((g=r.getNode(f))===null||g===void 0?void 0:g.data.dummy)==="border"){const p=r.getPredecessors(f)||[];p.length&&(c=r.getNode(p[0].id).data.order,a([l,d,v,u,c],h),d=v,u=c)}a([l,d,l.length,c,o.length],h)}),l};return t!=null&&t.length&&t.reduce(s),e},UC=(r,t)=>{var e,n;if(!((e=r.getNode(t))===null||e===void 0)&&e.data.dummy)return(n=r.getPredecessors(t))===null||n===void 0?void 0:n.find(i=>r.getNode(i.id).data.dummy)},jm=(r,t,e)=>{let n=t,i=e;if(n>i){const s=n;n=i,i=s}let a=r[n];a||(r[n]=a={}),a[i]=!0},YC=(r,t,e)=>{let n=t,i=e;if(n>i){const a=t;n=i,i=a}return!!r[n]},Wm=(r,t,e,n)=>{const i={},a={},s={};return t==null||t.forEach(o=>{o==null||o.forEach((l,u)=>{i[l]=l,a[l]=l,s[l]=u})}),t==null||t.forEach(o=>{let l=-1;o==null||o.forEach(u=>{let c=n(u).map(d=>d.id);if(c.length){c=c.sort((h,f)=>s[h]-s[f]);const d=(c.length-1)/2;for(let h=Math.floor(d),f=Math.ceil(d);h<=f;++h){const v=c[h];a[u]===u&&l<s[v]&&!YC(e,u,v)&&(a[v]=u,a[u]=i[u]=i[v],l=s[v])}}})}),{root:i,align:a}},Zm=(r,t,e,n,i,a,s)=>{var o;const l={},u=XC(r,t,e,i,a,s),c=s?"borderLeft":"borderRight",d=(v,g)=>{let p=u.getAllNodes(),m=p.pop();const y={};for(;m;)y[m.id]?v(m.id):(y[m.id]=!0,p.push(m),p=p.concat(g(m.id))),m=p.pop()},h=v=>{l[v]=(u.getRelatedEdges(v,"in")||[]).reduce((g,p)=>Math.max(g,(l[p.source]||0)+p.data.weight),0)},f=v=>{const g=(u.getRelatedEdges(v,"out")||[]).reduce((m,y)=>Math.min(m,(l[y.target]||0)-y.data.weight),Number.POSITIVE_INFINITY),p=r.getNode(v);g!==Number.POSITIVE_INFINITY&&p.data.borderType!==c&&(l[v]=Math.max(l[v],g))};return d(h,u.getPredecessors.bind(u)),d(f,u.getSuccessors.bind(u)),(o=Object.values(n))===null||o===void 0||o.forEach(v=>{l[v]=l[e[v]]}),l},XC=(r,t,e,n,i,a)=>{const s=new Et.k,o=KC(n,i,a);return t==null||t.forEach(l=>{let u;l==null||l.forEach(c=>{const d=e[c];if(s.hasNode(d)||s.addNode({id:d,data:{}}),u){const h=e[u],f=s.getRelatedEdges(h,"out").find(v=>v.target===d);f?s.updateEdgeData(f.id,Object.assign(Object.assign({},f.data),{weight:Math.max(o(r,c,u),f.data.weight||0)})):s.addEdge({id:`e${Math.random()}`,source:h,target:d,data:{weight:Math.max(o(r,c,u),0)}})}u=c})}),s},Vm=(r,t)=>Wh(Object.values(t),e=>{var n;let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return(n=Object.keys(e))===null||n===void 0||n.forEach(s=>{const o=e[s],l=$C(r,s)/2;i=Math.max(o+l,i),a=Math.min(o-l,a)}),i-a});function Hm(r,t){const e=Object.values(t),n=Math.min(...e),i=Math.max(...e);["u","d"].forEach(a=>{["l","r"].forEach(s=>{const o=a+s,l=r[o];let u;if(l===t)return;const c=Object.values(l);u=s==="l"?n-Math.min(...c):i-Math.max(...c),u&&(r[o]={},Object.keys(l).forEach(d=>{r[o][d]=l[d]+u}))})})}const Um=(r,t)=>{const e={};return Object.keys(r.ul).forEach(n=>{if(t)e[n]=r[t.toLowerCase()][n];else{const i=Object.values(r).map(a=>a[n]);e[n]=(i[0]+i[1])/2}}),e},zF=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=buildLayerMatrix(r),s=Object.assign(zm(r,a),Gm(r,a)),o={};let l;["u","d"].forEach(c=>{l=c==="u"?a:Object.values(a).reverse(),["l","r"].forEach(d=>{d==="r"&&(l=l.map(g=>Object.values(g).reverse()));const h=(c==="u"?r.getPredecessors:r.getSuccessors).bind(r),f=Wm(r,l,s,h),v=Zm(r,l,f.root,f.align,n,i,d==="r");d==="r"&&Object.keys(v).forEach(g=>{v[g]=-v[g]}),o[c+d]=v})});const u=Vm(r,o);return Hm(o,u),Um(o,e)},KC=(r,t,e)=>(n,i,a)=>{const s=n.getNode(i),o=n.getNode(a);let l=0,u=0;if(l+=s.data.width/2,s.data.hasOwnProperty("labelpos"))switch((s.data.labelpos||"").toLowerCase()){case"l":u=-s.data.width/2;break;case"r":u=s.data.width/2;break}if(u&&(l+=e?u:-u),u=0,l+=(s.data.dummy?t:r)/2,l+=(o.data.dummy?t:r)/2,l+=o.data.width/2,o.data.labelpos)switch((o.data.labelpos||"").toLowerCase()){case"l":u=o.data.width/2;break;case"r":u=-o.data.width/2;break}return u&&(l+=e?u:-u),u=0,l},$C=(r,t)=>r.getNode(t).data.width||0,qC=(r,t)=>{const{ranksep:e=0}=t||{},n=Xs(r);let i=0;n==null||n.forEach(a=>{const s=a.map(l=>r.getNode(l).data.height),o=Math.max(...s,0);a==null||a.forEach(l=>{r.getNode(l).data.y=i+o/2}),i+=o+e})},JC=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=Xs(r),s=Object.assign(zm(r,a),Gm(r,a)),o={};let l=[];["u","d"].forEach(c=>{l=c==="u"?a:Object.values(a).reverse(),["l","r"].forEach(d=>{d==="r"&&(l=l.map(g=>Object.values(g).reverse()));const h=(c==="u"?r.getPredecessors:r.getSuccessors).bind(r),f=Wm(r,l,s,h),v=Zm(r,l,f.root,f.align,n,i,d==="r");d==="r"&&Object.keys(v).forEach(g=>v[g]=-v[g]),o[c+d]=v})});const u=Vm(r,o);return u&&Hm(o,u),Um(o,e)},QC=(r,t)=>{var e;const n=Em(r);qC(n,t);const i=JC(n,t);(e=Object.keys(i))===null||e===void 0||e.forEach(a=>{n.getNode(a).data.x=i[a]})},Ym=r=>{const t={},e=n=>{var i;const a=r.getNode(n);if(!a)return 0;if(t[n])return a.data.rank;t[n]=!0;let s;return(i=r.getRelatedEdges(n,"out"))===null||i===void 0||i.forEach(o=>{const l=e(o.target),u=o.data.minlen,c=l-u;c&&(s===void 0||c<s)&&(s=c)}),s||(s=0),a.data.rank=s,s};r.getAllNodes().filter(n=>r.getRelatedEdges(n.id,"in").length===0).forEach(n=>e(n.id))},eO=r=>{const t={};let e;const n=s=>{var o;const l=r.getNode(s);if(!l)return 0;if(t[s])return l.data.rank;t[s]=!0;let u;return(o=r.getRelatedEdges(s,"out"))===null||o===void 0||o.forEach(c=>{const d=n(c.target),h=c.data.minlen,f=d-h;f&&(u===void 0||f<u)&&(u=f)}),u||(u=0),(e===void 0||u<e)&&(e=u),l.data.rank=u,u};r.getAllNodes().filter(s=>r.getRelatedEdges(s.id,"in").length===0).forEach(s=>{s&&n(s.id)}),e===void 0&&(e=0);const i={},a=(s,o)=>{var l;const u=r.getNode(s),c=isNaN(u.data.layer)?o:u.data.layer;(u.data.rank===void 0||u.data.rank<c)&&(u.data.rank=c),!i[s]&&(i[s]=!0,(l=r.getRelatedEdges(s,"out"))===null||l===void 0||l.forEach(d=>{a(d.target,c+d.data.minlen)}))};r.getAllNodes().forEach(s=>{const o=s.data;o&&(isNaN(o.layer)?o.rank-=e:a(s.id,o.layer))})},mi=(r,t)=>r.getNode(t.target).data.rank-r.getNode(t.source).data.rank-t.data.minlen,tO=r=>{const t=new Et.k({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;nO(t,r)<n;)i=Xm(t,r),a=t.hasNode(i.source)?mi(r,i):-mi(r,i),Km(t,r,a);return t},nO=(r,t)=>{const e=n=>{t.getRelatedEdges(n,"both").forEach(i=>{const a=i.source,s=n===a?i.target:a;!r.hasNode(s)&&!mi(t,i)&&(r.addNode({id:s,data:{}}),r.addEdge({id:i.id,source:n,target:s,data:{}}),e(s))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},rO=r=>{const t=new Et.k({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;iO(t,r)<n;)i=Xm(t,r),a=t.hasNode(i.source)?mi(r,i):-mi(r,i),Km(t,r,a);return t},iO=(r,t)=>{const e=n=>{var i;(i=t.getRelatedEdges(n,"both"))===null||i===void 0||i.forEach(a=>{const s=a.source,o=n===s?a.target:s;!r.hasNode(o)&&(t.getNode(o).data.layer!==void 0||!mi(t,a))&&(r.addNode({id:o,data:{}}),r.addEdge({id:a.id,source:n,target:o,data:{}}),e(o))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},Xm=(r,t)=>Wh(t.getAllEdges(),e=>r.hasNode(e.source)!==r.hasNode(e.target)?mi(t,e):1/0),Km=(r,t,e)=>{r.getAllNodes().forEach(n=>{const i=t.getNode(n.id);i.data.rank||(i.data.rank=0),i.data.rank+=e})},aO=r=>{const t=dC(r);Ym(t);const e=tO(t);qm(e),$m(e,t);let n,i;for(;n=lO(e);)i=uO(e,t,n),cO(e,t,n,i)},$m=(r,t)=>{let e=Am(r,r.getAllNodes(),"post",!1);e=e.slice(0,(e==null?void 0:e.length)-1),e.forEach(n=>{sO(r,t,n)})},sO=(r,t,e)=>{const i=r.getNode(e).data.parent,a=r.getRelatedEdges(e,"both").find(s=>s.target===i||s.source===i);a.data.cutvalue=oO(r,t,e)},oO=(r,t,e)=>{const i=r.getNode(e).data.parent;let a=!0,s=t.getRelatedEdges(e,"out").find(l=>l.target===i),o=0;return s||(a=!1,s=t.getRelatedEdges(i,"out").find(l=>l.target===e)),o=s.data.weight,t.getRelatedEdges(e,"both").forEach(l=>{const u=l.source===e,c=u?l.target:l.source;if(c!==i){const d=u===a,h=l.data.weight;if(o+=d?h:-h,hO(r,e,c)){const f=r.getRelatedEdges(e,"both").find(v=>v.source===c||v.target===c).data.cutvalue;o+=d?-f:f}}}),o},qm=(r,t=r.getAllNodes()[0].id)=>{Jm(r,{},1,t)},Jm=(r,t,e,n,i)=>{var a;const s=e;let o=e;const l=r.getNode(n);return t[n]=!0,(a=r.getNeighbors(n))===null||a===void 0||a.forEach(u=>{t[u.id]||(o=Jm(r,t,o,u.id,n))}),l.data.low=s,l.data.lim=o++,i?l.data.parent=i:delete l.data.parent,o},lO=r=>r.getAllEdges().find(t=>t.data.cutvalue<0),uO=(r,t,e)=>{let n=e.source,i=e.target;t.getRelatedEdges(n,"out").find(c=>c.target===i)||(n=e.target,i=e.source);const a=r.getNode(n),s=r.getNode(i);let o=a,l=!1;a.data.lim>s.data.lim&&(o=s,l=!0);const u=t.getAllEdges().filter(c=>l===Qm(r.getNode(c.source),o)&&l!==Qm(r.getNode(c.target),o));return Wh(u,c=>mi(t,c))},cO=(r,t,e,n)=>{const i=r.getRelatedEdges(e.source,"both").find(a=>a.source===e.target||a.target===e.target);i&&r.removeEdge(i.id),r.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),qm(r),$m(r,t),dO(r,t)},dO=(r,t)=>{const e=r.getAllNodes().find(i=>!i.data.parent);let n=Am(r,e,"pre",!1);n=n.slice(1),n.forEach(i=>{const a=r.getNode(i).data.parent;let s=t.getRelatedEdges(i,"out").find(l=>l.target===a),o=!1;!s&&t.hasNode(a)&&(s=t.getRelatedEdges(a,"out").find(l=>l.target===i),o=!0),t.getNode(i).data.rank=(t.hasNode(a)&&t.getNode(a).data.rank||0)+(o?s==null?void 0:s.data.minlen:-(s==null?void 0:s.data.minlen))})},hO=(r,t,e)=>r.getRelatedEdges(t,"both").find(n=>n.source===e||n.target===e),Qm=(r,t)=>t.data.low<=r.data.lim&&r.data.lim<=t.data.lim,fO=(r,t)=>{switch(t){case"network-simplex":gO(r);break;case"tight-tree":ey(r);break;case"longest-path":vO(r);break;default:ey(r)}},vO=Ym,ey=r=>{eO(r),rO(r)},gO=r=>{aO(r)},pO=(r,t)=>{const{edgeLabelSpace:e,keepNodeOrder:n,prevGraph:i,rankdir:a,ranksep:s}=t;!n&&i&&yO(r,i);const o=_O(r);e&&(t.ranksep=SO(o,{rankdir:a,ranksep:s}));let l;try{l=mO(o,t)}catch(u){if(u.message==="Not possible to find intersection inside of the rectangle"){console.error(`The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:
|
|
`,u);return}throw u}return bO(r,o),l},mO=(r,t)=>{const{acyclicer:e,ranker:n,rankdir:i="tb",nodeOrder:a,keepNodeOrder:s,align:o,nodesep:l=50,edgesep:u=20,ranksep:c=50}=t;LO(r),oC(r,e);const{nestingRoot:d,nodeRankFactor:h}=xC(r);fO(Em(r),n),TO(r),fC(r,h),kC(r,d),hC(r),AO(r),CO(r);const f=[];SC(r,f),HC(r,f),gC(r),s&&WC(r,a),jC(r,s),DO(r),pC(r,i),QC(r,{align:o,nodesep:l,edgesep:u,ranksep:c}),IO(r),RO(r),AC(r,f),NO(r),mC(r,i);const{width:v,height:g}=OO(r);return PO(r),MO(r),uC(r),{width:v,height:g}},yO=(r,t)=>{r.getAllNodes().forEach(e=>{const n=r.getNode(e.id);if(t.hasNode(e.id)){const i=t.getNode(e.id);n.data.fixorder=i.data._order,delete i.data._order}else delete n.data.fixorder})},bO=(r,t)=>{r.getAllNodes().forEach(e=>{var n;const i=r.getNode(e.id);if(i){const a=t.getNode(e.id);i.data.x=a.data.x,i.data.y=a.data.y,i.data._order=a.data.order,i.data._rank=a.data.rank,!((n=t.getChildren(e.id))===null||n===void 0)&&n.length&&(i.data.width=a.data.width,i.data.height=a.data.height)}}),r.getAllEdges().forEach(e=>{const n=r.getEdge(e.id),i=t.getEdge(e.id);n.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(n.data.x=i.data.x,n.data.y=i.data.y)})},xO=["width","height","layer","fixorder"],EO={width:0,height:0},wO=["minlen","weight","width","height","labeloffset"],kO={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Uh=["labelpos"],_O=r=>{const t=new Et.k({tree:[]});return r.getAllNodes().forEach(e=>{const n=ny(r.getNode(e.id).data),i=Object.assign(Object.assign({},EO),n),a=ty(i,xO);t.hasNode(e.id)||t.addNode({id:e.id,data:Object.assign({},a)});const s=r.hasTreeStructure("combo")?r.getParent(e.id,"combo"):r.getParent(e.id);(0,ue.Z)(s)||(t.hasNode(s.id)||t.addNode(Object.assign({},s)),t.setParent(e.id,s.id))}),r.getAllEdges().forEach(e=>{const n=ny(r.getEdge(e.id).data),i={};Uh==null||Uh.forEach(a=>{n[a]!==void 0&&(i[a]=n[a])}),t.addEdge({id:e.id,source:e.source,target:e.target,data:Object.assign({},kO,ty(n,wO),i)})}),t},SO=(r,t)=>{const{ranksep:e=0,rankdir:n}=t;return r.getAllNodes().forEach(i=>{isNaN(i.data.layer)||i.data.layer||(i.data.layer=0)}),r.getAllEdges().forEach(i=>{var a;i.data.minlen*=2,((a=i.data.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(n==="TB"||n==="BT"?i.data.width+=i.data.labeloffset:i.data.height+=i.data.labeloffset)}),e/2},TO=r=>{r.getAllEdges().forEach(t=>{if(t.data.width&&t.data.height){const e=r.getNode(t.source),n=r.getNode(t.target),i={e:t,rank:(n.data.rank-e.data.rank)/2+e.data.rank};Ga(r,"edge-proxy",i,"_ep")}})},AO=r=>{let t=0;return r.getAllNodes().forEach(e=>{var n,i;e.data.borderTop&&(e.data.minRank=(n=r.getNode(e.data.borderTop))===null||n===void 0?void 0:n.data.rank,e.data.maxRank=(i=r.getNode(e.data.borderBottom))===null||i===void 0?void 0:i.data.rank,t=Math.max(t,e.data.maxRank||-1/0))}),t},CO=r=>{r.getAllNodes().forEach(t=>{t.data.dummy==="edge-proxy"&&(r.getEdge(t.data.e.id).data.labelRank=t.data.rank,r.removeNode(t.id))})},OO=(r,t)=>{let e,n=0,i,a=0;const{marginx:s=0,marginy:o=0}=t||{},l=u=>{if(!u.data)return;const c=u.data.x,d=u.data.y,h=u.data.width,f=u.data.height;!isNaN(c)&&!isNaN(h)&&(e===void 0&&(e=c-h/2),e=Math.min(e,c-h/2),n=Math.max(n,c+h/2)),!isNaN(d)&&!isNaN(f)&&(i===void 0&&(i=d-f/2),i=Math.min(i,d-f/2),a=Math.max(a,d+f/2))};return r.getAllNodes().forEach(u=>{l(u)}),r.getAllEdges().forEach(u=>{u!=null&&u.data.hasOwnProperty("x")&&l(u)}),e-=s,i-=o,r.getAllNodes().forEach(u=>{u.data.x-=e,u.data.y-=i}),r.getAllEdges().forEach(u=>{var c;(c=u.data.points)===null||c===void 0||c.forEach(d=>{d.x-=e,d.y-=i}),u.data.hasOwnProperty("x")&&(u.data.x-=e),u.data.hasOwnProperty("y")&&(u.data.y-=i)}),{width:n-e+s,height:a-i+o}},PO=r=>{r.getAllEdges().forEach(t=>{const e=r.getNode(t.source),n=r.getNode(t.target);let i,a;t.data.points?(i=t.data.points[0],a=t.data.points[t.data.points.length-1]):(t.data.points=[],i={x:n.data.x,y:n.data.y},a={x:e.data.x,y:e.data.y}),t.data.points.unshift(km(e.data,i)),t.data.points.push(km(n.data,a))})},NO=r=>{r.getAllEdges().forEach(t=>{if(t.data.hasOwnProperty("x"))switch((t.data.labelpos==="l"||t.data.labelpos==="r")&&(t.data.width-=t.data.labeloffset),t.data.labelpos){case"l":t.data.x-=t.data.width/2+t.data.labeloffset;break;case"r":t.data.x+=t.data.width/2+t.data.labeloffset;break}})},MO=r=>{r.getAllEdges().forEach(t=>{var e;t.data.reversed&&((e=t.data.points)===null||e===void 0||e.reverse())})},RO=r=>{r.getAllNodes().forEach(t=>{var e,n,i;if(!((e=r.getChildren(t.id))===null||e===void 0)&&e.length){const a=r.getNode(t.id),s=r.getNode(a.data.borderTop),o=r.getNode(a.data.borderBottom),l=r.getNode(a.data.borderLeft[((n=a.data.borderLeft)===null||n===void 0?void 0:n.length)-1]),u=r.getNode(a.data.borderRight[((i=a.data.borderRight)===null||i===void 0?void 0:i.length)-1]);a.data.width=Math.abs((u==null?void 0:u.data.x)-(l==null?void 0:l.data.x))||10,a.data.height=Math.abs((o==null?void 0:o.data.y)-(s==null?void 0:s.data.y))||10,a.data.x=((l==null?void 0:l.data.x)||0)+a.data.width/2,a.data.y=((s==null?void 0:s.data.y)||0)+a.data.height/2}}),r.getAllNodes().forEach(t=>{t.data.dummy==="border"&&r.removeNode(t.id)})},LO=r=>{r.getAllEdges().forEach(t=>{if(t.source===t.target){const e=r.getNode(t.source);e.data.selfEdges||(e.data.selfEdges=[]),e.data.selfEdges.push(t),r.removeEdge(t.id)}})},DO=r=>{const t=Xs(r);t==null||t.forEach(e=>{let n=0;e==null||e.forEach((i,a)=>{var s;const o=r.getNode(i);o.data.order=a+n,(s=o.data.selfEdges)===null||s===void 0||s.forEach(l=>{Ga(r,"selfedge",{width:l.data.width,height:l.data.height,rank:o.data.rank,order:a+ ++n,e:l},"_se")}),delete o.data.selfEdges})})},IO=r=>{r.getAllNodes().forEach(t=>{const e=r.getNode(t.id);if(e.data.dummy==="selfedge"){const n=r.getNode(e.data.e.source),i=n.data.x+n.data.width/2,a=n.data.y,s=e.data.x-i,o=n.data.height/2;r.hasEdge(e.data.e.id)?r.updateEdgeData(e.data.e.id,e.data.e.data):r.addEdge({id:e.data.e.id,source:e.data.e.source,target:e.data.e.target,data:e.data.e.data}),r.removeNode(t.id),e.data.e.data.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{y:a,x:i+s},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],e.data.e.data.x=e.data.x,e.data.e.data.y=e.data.y}})},ty=(r,t)=>{const e={};return t==null||t.forEach(n=>{r[n]!==void 0&&(e[n]=+r[n])}),e},ny=(r={})=>{const t={};return Object.keys(r).forEach(e=>{t[e.toLowerCase()]=r[e]}),t};function Ks(r){if(!r)return[0,0,0];if((0,oe.Z)(r))return[r,r,r];if(r.length===0)return[0,0,0];const[t,e=t,n=t]=r;return[t,e,n]}function Yi(r,t){let e;return(0,de.Z)(t)?e=t:(0,oe.Z)(t)?e=()=>t:e=()=>r,e}function Yh(r,t,e=!0){return!t&&t!==0?n=>{const{size:i}=n.data||{};return i?Array.isArray(i)?e?Math.max(...i)||r:i:(0,yt.Z)(i)&&i.width&&i.height?e?Math.max(i.width,i.height)||r:[i.width,i.height]:i:r}:(0,de.Z)(t)?t:(0,oe.Z)(t)?()=>t:Array.isArray(t)?()=>e?Math.max(...t)||r:t:(0,yt.Z)(t)&&t.width&&t.height?()=>e?Math.max(t.width,t.height)||r:[t.width,t.height]:()=>r}const Xh=(r,t,e=10)=>{let n;const i=typeof t=="function"?t:()=>t||0;return r?Array.isArray(r)?n=s=>r:(0,de.Z)(r)?n=r:n=s=>r:n=s=>{var o,l,u;if(!((o=s.data)===null||o===void 0)&&o.bboxSize)return(l=s.data)===null||l===void 0?void 0:l.bboxSize;if(!((u=s.data)===null||u===void 0)&&u.size){const c=s.data.size;return Array.isArray(c)?c:(0,yt.Z)(c)?[c.width,c.height]:c}return e},s=>{const o=n(s),l=i(s);return Math.max(...Ks(o))+l}},Kh=r=>{if(r===null)return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof Array){const t=[];return r.forEach(e=>{t.push(e)}),t.map(e=>Kh(e))}if(typeof r=="object"){const t={};return Object.keys(r).forEach(e=>{t[e]=Kh(r[e])}),t}return r},pn=(r,t)=>{const e=Kh(r);return e.data=e.data||{},t&&((0,oe.Z)(e.data.x)||(e.data.x=Math.random()*t[0]),(0,oe.Z)(e.data.y)||(e.data.y=Math.random()*t[1])),e},BO={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class FO{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},BO),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{nodeSize:a,align:s,rankdir:o="TB",ranksep:l,nodesep:u,ranksepFunc:c,nodesepFunc:d,edgeLabelSpace:h,ranker:f,nodeOrder:v,begin:g,controlPoints:p,radial:m,sortByCombo:y,preset:b}=i,_=new Et.k({tree:[]}),w=Yi(l||50,c),x=Yi(u||50,d);let E=x,k=w;(o==="LR"||o==="RL")&&(E=w,k=x);const O=Yh(10,a,!1),P=e.getAllNodes(),M=e.getAllEdges();P.forEach(T=>{const N=Ks(O(T)),B=k(T),I=E(T),W=N[0]+2*I,X=N[1]+2*B,H=T.data.layer;(0,oe.Z)(H)?_.addNode({id:T.id,data:{width:W,height:X,layer:H}}):_.addNode({id:T.id,data:{width:W,height:X}})}),y&&(_.attachTreeStructure("combo"),P.forEach(T=>{const{parentId:N}=T.data;N!==void 0&&_.hasNode(N)&&_.setParent(T.id,N,"combo")})),M.forEach(T=>{_.addEdge({id:T.id,source:T.source,target:T.target,data:{weight:T.data.weight||1}})});let L;b!=null&&b.length&&(L=new Et.k({nodes:b})),pO(_,{prevGraph:L,edgeLabelSpace:h,keepNodeOrder:!!v,nodeOrder:v||[],acyclicer:"greedy",ranker:f,rankdir:o,nodesep:u,align:s});const D=[0,0];if(g){let T=1/0,N=1/0;_.getAllNodes().forEach(B=>{T>B.data.x&&(T=B.data.x),N>B.data.y&&(N=B.data.y)}),_.getAllEdges().forEach(B=>{var I;(I=B.data.points)===null||I===void 0||I.forEach(W=>{T>W.x&&(T=W.x),N>W.y&&(N=W.y)})}),D[0]=g[0]-T,D[1]=g[1]-N}const z=o==="LR"||o==="RL";if(!m){const T=new Set,B=o==="BT"||o==="RL"?(H,$)=>$-H:(H,$)=>H-$;_.getAllNodes().forEach(H=>{H.data.x=H.data.x+D[0],H.data.y=H.data.y+D[1],T.add(z?H.data.x:H.data.y)});const I=Array.from(T).sort(B),W=z?(H,$)=>H.x!==$.x:(H,$)=>H.y!==$.y,X=z?(H,$,le)=>{const fe=Math.max($.y,le.y),Le=Math.min($.y,le.y);return H.filter(Ze=>Ze.y<=fe&&Ze.y>=Le)}:(H,$,le)=>{const fe=Math.max($.x,le.x),Le=Math.min($.x,le.x);return H.filter(Ze=>Ze.x<=fe&&Ze.x>=Le)};_.getAllEdges().forEach((H,$)=>{var le;h&&p&&H.data.type!=="loop"&&(H.data.controlPoints=zO((le=H.data.points)===null||le===void 0?void 0:le.map(({x:fe,y:Le})=>({x:fe+D[0],y:Le+D[1]})),_.getNode(H.source),_.getNode(H.target),I,z,W,X))})}let F=[];F=_.getAllNodes().map(T=>pn(T));const C=_.getAllEdges();return t&&(F.forEach(T=>{e.mergeNodeData(T.id,{x:T.data.x,y:T.data.y})}),C.forEach(T=>{e.mergeEdgeData(T.id,{controlPoints:T.data.controlPoints})})),{nodes:F,edges:C}})}}const zO=(r,t,e,n,i,a,s)=>{let o=(r==null?void 0:r.slice(1,r.length-1))||[];if(t&&e){let{x:l,y:u}=t.data,{x:c,y:d}=e.data;if(i&&(l=t.data.y,u=t.data.x,c=e.data.y,d=e.data.x),d!==u&&l!==c){const h=n.indexOf(u),f=n[h+1];if(f){const p=o[0],m=i?{x:(u+f)/2,y:(p==null?void 0:p.y)||c}:{x:(p==null?void 0:p.x)||c,y:(u+f)/2};(!p||a(p,m))&&o.unshift(m)}const v=n.indexOf(d),g=Math.abs(v-h);if(g===1)o=s(o,t.data,e.data),o.length||o.push(i?{x:(u+d)/2,y:l}:{x:l,y:(u+d)/2});else if(g>1){const p=n[v-1];if(p){const m=o[o.length-1],y=i?{x:(d+p)/2,y:(m==null?void 0:m.y)||c}:{x:(m==null?void 0:m.x)||l,y:(d+p)/2};(!m||a(m,y))&&o.push(y)}}}}return o},Xi=(r,t,e)=>{const n=r.getAllNodes(),i=r.getAllEdges();if(!(n!=null&&n.length))return{nodes:[],edges:i};if(n.length===1)return t&&r.mergeNodeData(n[0].id,{x:e[0],y:e[1]}),{nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:e[0],y:e[1]})})],edges:i}},GO={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class jO{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},GO),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:s,center:o,divisions:l,startAngle:u=0,endAngle:c=2*Math.PI,angleRatio:d,ordering:h,clockwise:f,nodeSpacing:v,nodeSize:g}=i,p=e.getAllNodes(),m=e.getAllEdges(),[y,b,_]=ZO(a,s,o),w=p==null?void 0:p.length;if(!w||w===1)return Xi(e,t,_);const x=(c-u)/w;let{radius:E,startRadius:k,endRadius:O}=i;if(v){const z=Yi(10,v),F=Yh(10,g);let C=-1/0;p.forEach(T=>{const N=F(T);C<N&&(C=N)});let S=0;p.forEach((T,N)=>{N===0?S+=C||10:S+=(z(T)||0)+(C||10)}),E=S/(2*Math.PI)}else!E&&!k&&!O?E=Math.min(b,y)/2:!k&&O?k=O:k&&!O&&(O=k);const P=x*d;let M=[];h==="topology"?M=ry(e,p):h==="topology-directed"?M=ry(e,p,!0):h==="degree"?M=WO(e,p):M=p.map(z=>pn(z));const L=Math.ceil(w/l);for(let z=0;z<w;++z){let F=E;!F&&k!==null&&O!==null&&(F=k+z*(O-k)/(w-1)),F||(F=10+z*100/(w-1));let C=u+z%L*P+2*Math.PI/l*Math.floor(z/L);f||(C=c-z%L*P-2*Math.PI/l*Math.floor(z/L)),M[z].data.x=_[0]+Math.cos(C)*F,M[z].data.y=_[1]+Math.sin(C)*F}return t&&M.forEach(z=>{e.mergeNodeData(z.id,{x:z.data.x,y:z.data.y})}),{nodes:M,edges:m}})}}const ry=(r,t,e=!1)=>{const n=[pn(t[0])],i={},a=t.length;i[t[0].id]=!0;let s=0;return t.forEach((o,l)=>{if(l!==0)if((l===a-1||r.getDegree(o.id,"both")!==r.getDegree(t[l+1].id,"both")||r.areNeighbors(n[s].id,o.id))&&!i[o.id])n.push(pn(o)),i[o.id]=!0,s++;else{const u=e?r.getSuccessors(n[s].id):r.getNeighbors(n[s].id);let c=!1;for(let h=0;h<u.length;h++){const f=u[h];if(r.getDegree(f.id)===r.getDegree(o.id)&&!i[f.id]){n.push(pn(f)),i[f.id]=!0,c=!0;break}}let d=0;for(;!c&&(i[t[d].id]||(n.push(pn(t[d])),i[t[d].id]=!0,c=!0),d++,d!==a););}}),n};function WO(r,t){const e=[];return t.forEach((n,i)=>{e.push(pn(n))}),e.sort((n,i)=>r.getDegree(n.id,"both")-r.getDegree(i.id,"both")),e}const ZO=(r,t,e)=>{let n=r,i=t,a=e;return!n&&typeof window!="undefined"&&(n=window.innerWidth),!i&&typeof window!="undefined"&&(i=window.innerHeight),a||(a=[n/2,i/2]),[n,i,a]},Gr=Array.isArray,VO={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class $h{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},VO),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:s,height:o,sortBy:l,maxLevelDiff:u,sweep:c,clockwise:d,equidistant:h,preventOverlap:f,startAngle:v=3/2*Math.PI,nodeSize:g,nodeSpacing:p}=i,m=e.getAllNodes(),y=e.getAllEdges(),b=!s&&typeof window!="undefined"?window.innerWidth:s,_=!o&&typeof window!="undefined"?window.innerHeight:o,w=a||[b/2,_/2];if(!(m!=null&&m.length)||m.length===1)return Xi(e,t,w);const x=[];let E,k=0;Gr(g)?E=Math.max(g[0],g[1]):(0,de.Z)(g)?(E=-1/0,m.forEach(T=>{const N=Math.max(...Ks(g(T)));N>E&&(E=N)})):E=g,Gr(p)?k=Math.max(p[0],p[1]):(0,oe.Z)(p)&&(k=p),m.forEach(T=>{const N=pn(T);x.push(N);let B=E;const{data:I}=N;Gr(I.size)?B=Math.max(I.size[0],I.size[1]):(0,oe.Z)(I.size)?B=I.size:(0,yt.Z)(I.size)&&(B=Math.max(I.size.width,I.size.height)),E=Math.max(E,B),(0,de.Z)(p)&&(k=Math.max(p(T),k))});const O={};x.forEach((T,N)=>{O[T.id]=N});let P=l;(!(0,Se.Z)(P)||x[0].data[P]===void 0)&&(P="degree"),P==="degree"?x.sort((T,N)=>e.getDegree(N.id,"both")-e.getDegree(T.id,"both")):x.sort((T,N)=>N.data[P]-T.data[P]);const M=x[0],L=(u||(P==="degree"?e.getDegree(M.id,"both"):M.data[P]))/4,D=[{nodes:[]}];let z=D[0];x.forEach(T=>{if(z.nodes.length>0){const N=Math.abs(P==="degree"?e.getDegree(z.nodes[0].id,"both")-e.getDegree(T.id,"both"):z.nodes[0].data[P]-T.data[P]);L&&N>=L&&(z={nodes:[]},D.push(z))}z.nodes.push(T)});let F=E+k;if(!f){const T=D.length>0&&D[0].nodes.length>1,B=(Math.min(b,_)/2-F)/(D.length+(T?1:0));F=Math.min(F,B)}let C=0;if(D.forEach(T=>{const N=c===void 0?2*Math.PI-2*Math.PI/T.nodes.length:c;if(T.dTheta=N/Math.max(1,T.nodes.length-1),T.nodes.length>1&&f){const B=Math.cos(T.dTheta)-Math.cos(0),I=Math.sin(T.dTheta)-Math.sin(0),W=Math.sqrt(F*F/(B*B+I*I));C=Math.max(W,C)}T.r=C,C+=F}),h){let T=0,N=0;for(let B=0;B<D.length;B++){const W=(D[B].r||0)-N;T=Math.max(T,W)}N=0,D.forEach((B,I)=>{I===0&&(N=B.r||0),B.r=N,N+=T})}return D.forEach(T=>{const N=T.dTheta||0,B=T.r||0;T.nodes.forEach((I,W)=>{const X=v+(d?1:-1)*N*W;I.data.x=w[0]+B*Math.cos(X),I.data.y=w[1]+B*Math.sin(X)})}),t&&x.forEach(T=>e.mergeNodeData(T.id,{x:T.data.x,y:T.data.y})),{nodes:x,edges:y}})}}var HO=Y(46632),UO=Y(67217);const YO=.81,qh=.1;function XO(r,t,e,n,i=2){const a=t/e,s=r.getAllNodes(),o=s.map((c,d)=>{const{nodeStrength:h,x:f,y:v,z:g,size:p}=c.data;return{x:f,y:v,z:g,size:p,index:d,id:c.id,vx:0,vy:0,vz:0,weight:a*h}}),l=(i===2?(0,HO.Z)(o,c=>c.x,c=>c.y):(0,UO.Z)(o,c=>c.x,c=>c.y,c=>c.z)).visitAfter(KO),u=new Map;return o.forEach(c=>{u.set(c.id,c),qO(c,l,i)}),o.map((c,d)=>{const{id:h,data:f}=s[d],{mass:v=1}=f;n[h]={x:c.vx/v,y:c.vy/v,z:c.vz/v}}),n}function KO(r){let t=0,e=0,n=0,i=0,a=0;const s=r.length;if(s){for(let o=0;o<s;o++){const l=r[o];l&&l.weight&&(t+=l.weight,e+=l.x*l.weight,n+=l.y*l.weight,i+=l.z*l.weight,a+=l.size*l.weight)}r.x=e/t,r.y=n/t,r.z=i/t,r.size=a/t,r.weight=t}else{const o=r;r.x=o.data.x,r.y=o.data.y,r.z=o.data.z,r.size=o.data.size,r.weight=o.data.weight}}const $O=(r,t,e,n,i,a,s)=>{var o;if(((o=r.data)===null||o===void 0?void 0:o.id)===a.id)return;const l=[e,n,i][s-1],u=a.x-r.x||qh,c=a.y-r.y||qh,d=a.z-r.z||qh,h=[u,c,d],f=l-t;let v=0;for(let m=0;m<s;m++)v+=h[m]*h[m];const p=Math.sqrt(v)*v;if(f*f*YO<v){const m=r.weight/p;return a.vx+=u*m,a.vy+=c*m,a.vz+=d*m,!0}if(r.length)return!1;if(r.data!==a){const m=r.data.weight/p;a.vx+=u*m,a.vy+=c*m,a.vz+=d*m}};function qO(r,t,e){t.visit((n,i,a,s,o)=>$O(n,i,a,s,o,r,e))}const JO={dimensions:2,maxIteration:500,gravity:10,factor:1,edgeStrength:50,nodeStrength:1e3,coulombDisScale:.005,damping:.9,maxSpeed:200,minMovement:.4,interval:.02,linkDistance:200,clusterNodeStrength:20,preventOverlap:!0,distanceThresholdMode:"mean"};class iy{constructor(t={}){this.options=t,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},JO),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericForceLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;(this.judgingDistance>this.lastOptions.minMovement||n<1)&&n<t;n++)this.runOneStep(this.lastCalcGraph,this.lastGraph,n,this.lastVelMap,this.lastOptions),this.updatePosition(this.lastGraph,this.lastCalcGraph,this.lastVelMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericForceLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),a=e.getAllNodes(),s=e.getAllEdges(),o=this.formatOptions(i,e),{dimensions:l,width:u,height:c,nodeSize:d,getMass:h,nodeStrength:f,edgeStrength:v,linkDistance:g}=o,p=a.map((k,O)=>Object.assign(Object.assign({},k),{data:Object.assign(Object.assign({},k.data),{x:(0,oe.Z)(k.data.x)?k.data.x:Math.random()*u,y:(0,oe.Z)(k.data.y)?k.data.y:Math.random()*c,z:(0,oe.Z)(k.data.z)?k.data.z:Math.random()*Math.sqrt(u*c),size:d(k)||30,mass:h(k),nodeStrength:f(k)})})),m=s.map(k=>Object.assign(Object.assign({},k),{data:Object.assign(Object.assign({},k.data),{edgeStrength:v(k),linkDistance:g(k,e.getNode(k.source),e.getNode(k.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:s},{nodes:[],edges:s};const y={};a.forEach((k,O)=>{y[k.id]={x:0,y:0,z:0}});const b=new Et.k({nodes:p,edges:m});this.formatCentripetal(o,b);const{maxIteration:_,minMovement:w,onTick:x}=o;if(this.lastLayoutNodes=p,this.lastLayoutEdges=m,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=b,this.lastOptions=o,this.lastVelMap=y,typeof window=="undefined")return;let E=0;return new Promise(k=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&k({nodes:Jh(e,p),edges:s}),this.runOneStep(b,e,E,y,o),this.updatePosition(e,b,y,o),t&&p.forEach(O=>e.mergeNodeData(O.id,{x:O.data.x,y:O.data.y,z:l===3?O.data.z:void 0})),x==null||x({nodes:Jh(e,p),edges:s}),E++,(E>=_||this.judgingDistance<w)&&(window.clearInterval(this.timeInterval),k({nodes:Jh(e,p),edges:s}))},0),this.running=!0})})}formatOptions(t,e){const n=Object.assign({},t),{width:i,height:a,getMass:s}=t;n.width=!i&&typeof window!="undefined"?window.innerWidth:i,n.height=!a&&typeof window!="undefined"?window.innerHeight:a,t.center||(n.center=[n.width/2,n.height/2]),s||(n.getMass=l=>{let u=1;(0,oe.Z)(l==null?void 0:l.data.mass)&&(u=l==null?void 0:l.data.mass);const c=e.getDegree(l.id,"both");return!c||c<5?u:c*5*u}),n.nodeSize=Xh(t.nodeSize,t.nodeSpacing);const o=t.linkDistance?Yi(1,t.linkDistance):l=>1+n.nodeSize(e.getNode(l.source))+n.nodeSize(e.getNode(l.target));return n.linkDistance=o,n.nodeStrength=Yi(1,t.nodeStrength),n.edgeStrength=Yi(1,t.edgeStrength),n}formatCentripetal(t,e){const{dimensions:n,centripetalOptions:i,center:a,clusterNodeStrength:s,leafCluster:o,clustering:l,nodeClusterBy:u}=t,c=e.getAllNodes(),d=i||{leaf:2,single:2,others:1,center:m=>({x:a[0],y:a[1],z:n===3?a[2]:void 0})};typeof s!="function"&&(t.clusterNodeStrength=m=>s);let h,f;if(o&&u&&(h=ay(e,u),f=Array.from(new Set(c==null?void 0:c.map(m=>m.data[u])))||[],t.centripetalOptions=Object.assign(d,{single:100,leaf:m=>{const{siblingLeaves:y,sameTypeLeaves:b}=h[m.id]||{};return(b==null?void 0:b.length)===(y==null?void 0:y.length)||(f==null?void 0:f.length)===1?1:t.clusterNodeStrength(m)},others:1,center:m=>{const y=e.getDegree(m.id,"both");if(!y)return{x:100,y:100,z:0};let b;if(y===1){const{sameTypeLeaves:_=[]}=h[m.id]||{};_.length===1?b=void 0:_.length>1&&(b=sy(_))}else b=void 0;return{x:b==null?void 0:b.x,y:b==null?void 0:b.y,z:b==null?void 0:b.z}}})),l&&u){h||(h=ay(e,u)),f||(f=Array.from(new Set(c.map(y=>y.data[u])))),f=f.filter(y=>y!==void 0);const m={};f.forEach(y=>{const b=c.filter(_=>_.data[u]===y).map(_=>e.getNode(_.id));m[y]=sy(b)}),t.centripetalOptions=Object.assign(d,{single:y=>t.clusterNodeStrength(y),leaf:y=>t.clusterNodeStrength(y),others:y=>t.clusterNodeStrength(y),center:y=>{const b=m[y.data[u]];return{x:b==null?void 0:b.x,y:b==null?void 0:b.y,z:b==null?void 0:b.z}}})}const{leaf:v,single:g,others:p}=t.centripetalOptions||{};v&&typeof v!="function"&&(t.centripetalOptions.leaf=()=>v),g&&typeof g!="function"&&(t.centripetalOptions.single=()=>g),p&&typeof p!="function"&&(t.centripetalOptions.others=()=>p)}runOneStep(t,e,n,i,a){const s={},o=t.getAllNodes(),l=t.getAllEdges();if(!(o!=null&&o.length))return;const{monitor:u}=a;if(this.calRepulsive(t,s,a),l&&this.calAttractive(t,s,a),this.calGravity(t,e,s,a),this.updateVelocity(t,s,i,a),u){const c=this.calTotalEnergy(s,o);u({energy:c,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:n})}}calTotalEnergy(t,e){if(!(e!=null&&e.length))return 0;let n=0;return e.forEach((i,a)=>{const s=t[i.id].x,o=t[i.id].y,l=this.options.dimensions===3?t[i.id].z:0,u=s*s+o*o+l*l,{mass:c=1}=i.data;n+=c*u*.5}),n}calRepulsive(t,e,n){const{dimensions:i,factor:a,coulombDisScale:s}=n;XO(t,a,s*s,e,i)}calAttractive(t,e,n){const{dimensions:i,nodeSize:a}=n;t.getAllEdges().forEach((s,o)=>{const{source:l,target:u}=s,c=t.getNode(l),d=t.getNode(u);if(!c||!d)return;let h=d.data.x-c.data.x,f=d.data.y-c.data.y,v=i===3?d.data.z-c.data.z:0;!h&&!f&&(h=Math.random()*.01,f=Math.random()*.01,i===3&&!v&&(v=Math.random()*.01));const g=Math.sqrt(h*h+f*f+v*v);if(g<a(c)+a(d))return;const p=h/g,m=f/g,y=v/g,{linkDistance:b=200,edgeStrength:_=200}=s.data||{},x=(b-g)*_,E=c.data.mass||1,k=d.data.mass||1,O=1/E,P=1/k,M=p*x,L=m*x,D=y*x;e[l].x-=M*O,e[l].y-=L*O,e[l].z-=D*O,e[u].x+=M*P,e[u].y+=L*P,e[u].z+=D*P})}calGravity(t,e,n,i){const{getCenter:a}=i,s=t.getAllNodes(),o=e.getAllNodes(),l=e.getAllEdges(),{width:u,height:c,center:d,gravity:h,centripetalOptions:f}=i;s&&s.forEach(v=>{const{id:g,data:p}=v,{mass:m,x:y,y:b,z:_}=p,w=e.getNode(g);let x=0,E=0,k=0,O=h;const P=t.getDegree(g,"in"),M=t.getDegree(g,"out"),L=t.getDegree(g,"both"),D=a==null?void 0:a(w,L);if(D){const[z,F,C]=D;x=y-z,E=b-F,O=C}else x=y-d[0],E=b-d[1],k=_-d[2];if(O&&(n[g].x-=O*x/m,n[g].y-=O*E/m,n[g].z-=O*k/m),f){const{leaf:z,single:F,others:C,center:S}=f,{x:T,y:N,z:B,centerStrength:I}=(S==null?void 0:S(w,o,l,u,c))||{x:0,y:0,z:0,centerStrength:0};if(!(0,oe.Z)(T)||!(0,oe.Z)(N))return;const W=(y-T)/m,X=(b-N)/m,H=(_-B)/m;if(I&&(n[g].x-=I*W,n[g].y-=I*X,n[g].z-=I*H),L===0){const le=F(w);if(!le)return;n[g].x-=le*W,n[g].y-=le*X,n[g].z-=le*H;return}if(P===0||M===0){const le=z(w,o,l);if(!le)return;n[g].x-=le*W,n[g].y-=le*X,n[g].z-=le*H;return}const $=C(w);if(!$)return;n[g].x-=$*W,n[g].y-=$*X,n[g].z-=$*H}})}updateVelocity(t,e,n,i){const{damping:a,maxSpeed:s,interval:o,dimensions:l}=i,u=t.getAllNodes();u!=null&&u.length&&u.forEach(c=>{const{id:d}=c;let h=(n[d].x+e[d].x*o)*a||.01,f=(n[d].y+e[d].y*o)*a||.01,v=l===3?(n[d].z+e[d].z*o)*a||.01:0;const g=Math.sqrt(h*h+f*f+v*v);if(g>s){const p=s/g;h=p*h,f=p*f,v=p*v}n[d]={x:h,y:f,z:v}})}updatePosition(t,e,n,i){const{distanceThresholdMode:a,interval:s,dimensions:o}=i,l=e.getAllNodes();if(!(l!=null&&l.length)){this.judgingDistance=0;return}let u=0;a==="max"?this.judgingDistance=-1/0:a==="min"&&(this.judgingDistance=1/0),l.forEach(c=>{const{id:d}=c,h=t.getNode(d);if((0,oe.Z)(h.data.fx)&&(0,oe.Z)(h.data.fy)){e.mergeNodeData(d,{x:h.data.fx,y:h.data.fy,z:o===3?h.data.fz:void 0});return}const f=n[d].x*s,v=n[d].y*s,g=o===3?n[d].z*s:0;e.mergeNodeData(d,{x:c.data.x+f,y:c.data.y+v,z:c.data.z+g});const p=Math.sqrt(f*f+v*v+g*g);switch(a){case"max":this.judgingDistance<p&&(this.judgingDistance=p);break;case"min":this.judgingDistance>p&&(this.judgingDistance=p);break;default:u=u+p;break}}),(!a||a==="mean")&&(this.judgingDistance=u/l.length)}}const ay=(r,t)=>{const e=r.getAllNodes();if(!(e!=null&&e.length))return{};const n={};return e.forEach((i,a)=>{r.getDegree(i.id,"both")===1&&(n[i.id]=QO(r,"leaf",i,t))}),n},QO=(r,t,e,n)=>{const i=r.getDegree(e.id,"in"),a=r.getDegree(e.id,"out");let s=e,o=[];i===0?(s=r.getSuccessors(e.id)[0],o=r.getNeighbors(s.id)):a===0&&(s=r.getPredecessors(e.id)[0],o=r.getNeighbors(s.id)),o=o.filter(u=>r.getDegree(u.id,"in")===0||r.getDegree(u.id,"out")===0);const l=eP(r,t,n,e,o);return{coreNode:s,siblingLeaves:o,sameTypeLeaves:l}},eP=(r,t,e,n,i)=>{const a=n.data[e]||"";let s=(i==null?void 0:i.filter(o=>o.data[e]===a))||[];return t==="leaf"&&(s=s.filter(o=>r.getDegree(o.id,"in")===0||r.getDegree(o.id,"out")===0)),s},sy=r=>{const t={x:0,y:0};r.forEach(n=>{const{x:i,y:a}=n.data;t.x+=i||0,t.y+=a||0});const e=r.length||1;return{x:t.x/e,y:t.y/e}},Jh=(r,t)=>t.map(e=>{const{id:n,data:i}=e,a=r.getNode(n);return Object.assign(Object.assign({},a),{data:Object.assign(Object.assign({},a.data),{x:i.x,y:i.y,z:i.z})})});var wr=Y(92770);const oy=r=>{const t=[],e=r.length;for(let n=0;n<e;n+=1){t[n]=[];for(let i=0;i<e;i+=1)n===i?t[n][i]=0:r[n][i]===0||!r[n][i]?t[n][i]=1/0:t[n][i]=r[n][i]}for(let n=0;n<e;n+=1)for(let i=0;i<e;i+=1)for(let a=0;a<e;a+=1)t[i][a]>t[i][n]+t[n][a]&&(t[i][a]=t[i][n]+t[n][a]);return t},ly=(r,t)=>{const{nodes:e,edges:n}=r,i=[],a={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((s,o)=>{a[s.id]=o;const l=[];i.push(l)}),n==null||n.forEach(s=>{const{source:o,target:l}=s,u=a[o],c=a[l];u===void 0||c===void 0||(i[u][c]=1,t||(i[c][u]=1))}),i},tP=(r,t)=>{const e=[];return r.forEach(n=>{const i=[];n.forEach(a=>{i.push(a*t)}),e.push(i)}),e},nP=r=>{let t=1/0,e=1/0,n=-1/0,i=-1/0;return r.forEach(a=>{let s=a.data.size;Gr(s)?s.length===1&&(s=[s[0],s[0]]):(0,oe.Z)(s)?s=[s,s]:(s===void 0||isNaN(s))&&(s=[30,30]);const o=[s[0]/2,s[1]/2],l=a.data.x-o[0],u=a.data.x+o[0],c=a.data.y-o[1],d=a.data.y+o[1];t>l&&(t=l),e>c&&(e=c),n<u&&(n=u),i<d&&(i=d)}),{minX:t,minY:e,maxX:n,maxY:i}},uy=(r,t)=>Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)),Qh=(r,t,e,n="TB",i,a={})=>{if(!(t!=null&&t.length))return;const{stopBranchFn:s,stopAllFn:o}=a;for(let l=0;l<t.length;l++){const u=t[l];if(r.hasNode(u.id)&&!(s!=null&&s(u))){if(o!=null&&o(u))return;n==="TB"&&e(u),Qh(r,r.getChildren(u.id,i),e,n,i,a),n!=="TB"&&e(u)}}},rP={center:[0,0],linkDistance:50};class cy{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},rP),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a=[0,0],linkDistance:s=50}=i,o=e.getAllNodes(),l=e.getAllEdges();if(!(o!=null&&o.length)||o.length===1)return Xi(e,t,a);const u=ly({nodes:o,edges:l},!1),c=oy(u);iP(c);const d=tP(c,s),h=aP(d),f=[];return h.forEach((g,p)=>{const m=pn(o[p]);m.data.x=g[0]+a[0],m.data.y=g[1]+a[1],f.push(m)}),t&&f.forEach(g=>e.mergeNodeData(g.id,{x:g.data.x,y:g.data.y})),{nodes:f,edges:l}})}}const iP=r=>{let t=-999999;r.forEach(e=>{e.forEach(n=>{n!==1/0&&t<n&&(t=n)})}),r.forEach((e,n)=>{e.forEach((i,a)=>{i===1/0&&(r[n][a]=t)})})},aP=r=>{const e=wr.y3.mul(wr.y3.pow(r,2),-.5),n=e.mean("row"),i=e.mean("column"),a=e.mean();e.add(a).subRowVector(n).subColumnVector(i);const s=new wr.Sc(e),o=wr.y3.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(l=>wr.y3.mul([l],[o]).toJSON()[0].splice(0,2))};function ef(r){return!!r.tick&&!!r.stop}const sP={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},oP={center:[0,0],comboPadding:10,treeKey:"combo"};class lP{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},oP),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=this.initVals(Object.assign(Object.assign({},this.options),n)),{center:a,treeKey:s,outerLayout:o}=i,l=e.getAllNodes().filter(k=>!k.data._isCombo),u=e.getAllNodes().filter(k=>k.data._isCombo),c=e.getAllEdges(),d=l==null?void 0:l.length;if(!d||d===1)return Xi(e,t,a);const h=[],f=new Map;l.forEach(k=>{f.set(k.id,k)});const v=new Map;u.forEach(k=>{v.set(k.id,k)});const g=new Map,p=this.getInnerGraphs(e,s,f,v,c,i,g);yield Promise.all(p);const m=new Map,y=[],b=new Map;let _=!0;e.getRoots(s).forEach(k=>{const O=g.get(k.id),P=v.get(k.id)||f.get(k.id),M={id:k.id,data:Object.assign(Object.assign({},k.data),{x:O.data.x||P.data.x,y:O.data.y||P.data.y,fx:O.data.fx||P.data.fx,fy:O.data.fy||P.data.fy,mass:O.data.mass||P.data.mass,size:O.data.size})};y.push(M),m.set(k.id,!0),!isNaN(M.data.x)&&M.data.x!==0&&!isNaN(M.data.y)&&M.data.y!==0?_=!1:(M.data.x=Math.random()*100,M.data.y=Math.random()*100),Qh(e,[k],L=>{L.id!==k.id&&b.set(L.id,k.id)},"TB",s)});const w=[];c.forEach(k=>{const O=b.get(k.source)||k.source,P=b.get(k.target)||k.target;O!==P&&m.has(O)&&m.has(P)&&w.push({id:k.id,source:O,target:P,data:{}})});let x;if(y!=null&&y.length){if(y.length===1)y[0].data.x=a[0],y[0].data.y=a[1];else{const k=new Et.k({nodes:y,edges:w}),O=o||new iy;_&&sP[O.id]&&(yield(y.length<100?new cy:new $h).assign(k));const P=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},O.id==="force"?{gravity:1,factor:4,linkDistance:(M,L,D)=>{const z=Math.max(...L.data.size)||32,F=Math.max(...D.data.size)||32;return z/2+F/2+200}}:{});x=yield dy(O,k,P)}g.forEach(k=>{var O;const P=x.nodes.find(D=>D.id===k.id);if(P){const{x:D,y:z}=P.data;k.data.visited=!0,k.data.x=D,k.data.y=z,h.push({id:k.id,data:{x:D,y:z}})}const{x:M,y:L}=k.data;(O=k.data.nodes)===null||O===void 0||O.forEach(D=>{h.push({id:D.id,data:{x:D.data.x+M,y:D.data.y+L}})})}),g.forEach(({data:k})=>{const{x:O,y:P,visited:M,nodes:L}=k;L==null||L.forEach(D=>{if(!M){const z=h.find(F=>F.id===D.id);z.data.x+=O||0,z.data.y+=P||0}})})}return t&&h.forEach(k=>{e.mergeNodeData(k.id,{x:k.data.x,y:k.data.y})}),{nodes:h,edges:c}})}initVals(t){const e=Object.assign({},t),{nodeSize:n,spacing:i,comboPadding:a}=t;let s,o;if((0,oe.Z)(i)?o=()=>i:(0,de.Z)(i)?o=i:o=()=>0,e.spacing=o,!n)s=u=>{const c=o(u);return u.size?Gr(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+c)/2:(0,yt.Z)(u.size)?((u.size.width>u.size.height?u.size.width:u.size.height)+c)/2:(u.size+c)/2:32+c/2};else if((0,de.Z)(n))s=u=>{const c=n(u),d=o(u);return Gr(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+d)/2:((c||32)+d)/2};else if(Gr(n)){const c=(n[0]>n[1]?n[0]:n[1])/2;s=d=>c+o(d)/2}else{const u=n/2;s=c=>u+o(c)/2}e.nodeSize=s;let l;return(0,oe.Z)(a)?l=()=>a:Gr(a)?l=()=>Math.max.apply(null,a):(0,de.Z)(a)?l=a:l=()=>0,e.comboPadding=l,e}getInnerGraphs(t,e,n,i,a,s,o){const{nodeSize:l,comboPadding:u,spacing:c,innerLayout:d}=s,h=d||new $h({}),f={center:[0,0],preventOverlap:!0,nodeSpacing:c},v=[],g=p=>{let m=(u==null?void 0:u(p))||10;return Gr(m)&&(m=Math.max(...m)),{size:m?[m*2,m*2]:[30,30],padding:m}};return t.getRoots(e).forEach(p=>{o.set(p.id,{id:p.id,data:{nodes:[],size:g(p).size}});let m=Promise.resolve();Qh(t,[p],y=>{var b;if(!y.data._isCombo)return;const{size:_,padding:w}=g(y);if(!(!((b=t.getChildren(y.id,e))===null||b===void 0)&&b.length))o.set(y.id,{id:y.id,data:Object.assign(Object.assign({},y.data),{size:_})});else{const x=o.get(y.id);o.set(y.id,{id:y.id,data:Object.assign({nodes:[]},x==null?void 0:x.data)});const E=new Map,k=t.getChildren(y.id,e).map(M=>{if(M.data._isCombo)return o.has(M.id)||o.set(M.id,{id:M.id,data:Object.assign({},M.data)}),E.set(M.id,!0),o.get(M.id);const L=n.get(M.id)||i.get(M.id);return E.set(M.id,!0),{id:M.id,data:Object.assign(Object.assign({},L.data),M.data)}}),O={nodes:k,edges:a.filter(M=>E.has(M.source)&&E.has(M.target))};let P=1/0;k.forEach(M=>{var L;let{size:D}=M.data;D||(D=((L=o.get(M.id))===null||L===void 0?void 0:L.data.size)||(l==null?void 0:l(M))||[30,30]),(0,oe.Z)(D)&&(D=[D,D]);const[z,F]=D;P>z&&(P=z),P>F&&(P=F),M.data.size=D}),m=m.then(()=>we(this,void 0,void 0,function*(){const M=new Et.k(O);yield dy(h,M,f,!0);const{minX:L,minY:D,maxX:z,maxY:F}=nP(k),C={x:(z+L)/2,y:(F+D)/2};O.nodes.forEach(T=>{T.data.x-=C.x,T.data.y-=C.y});const S=[Math.max(z-L,P)+w*2,Math.max(F-D,P)+w*2];o.get(y.id).data.size=S,o.get(y.id).data.nodes=k}))}return!0},"BT",e),v.push(m)}),v}}function dy(r,t,e,n){var i;return we(this,void 0,void 0,function*(){return ef(r)?(r.execute(t,e),r.stop(),r.tick((i=e.iterations)!==null&&i!==void 0?i:300)):n?yield r.assign(t,e):yield r.execute(t,e)})}var uP=Y(56561),cP=Y(65475),dP=Y(46846),hP=Y(89281),fP=Y(61217),vP=Y(70341),gP=Y(12688),pP=Y(80616);class mP{constructor(t){this.id="d3-force",this.config={inputNodeAttrs:["x","y","vx","vy","fx","fy"],outputNodeAttrs:["x","y","vx","vy"],simulationAttrs:["alpha","alphaMin","alphaDecay","alphaTarget","velocityDecay","randomSource"]},this.forceMap={link:uP.Z,manyBody:cP.Z,center:dP.Z,collide:hP.Z,radial:fP.Z,x:vP.Z,y:gP.Z},this.options={link:{id:e=>e.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},(0,dn.Z)(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericLayout(!0,t,e)})}stop(){this.simulation.stop()}tick(t){return this.simulation.tick(t),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(t,e){const n=this.context.nodes.find(i=>i.id===t);n&&e.forEach((i,a)=>{if(typeof i=="number"||i===null){const s=["fx","fy","fz"][a];n[s]=i}})}getOptions(t){var e,n;const i=(0,dn.Z)({},this.options,t);return i.collide&&((e=i.collide)===null||e===void 0?void 0:e.radius)===void 0&&(i.collide=i.collide||{},i.collide.radius=(n=i.nodeSize)!==null&&n!==void 0?n:10),i.iterations===void 0&&(i.link&&i.link.iterations===void 0&&(i.iterations=i.link.iterations),i.collide&&i.collide.iterations===void 0&&(i.iterations=i.collide.iterations)),this.context.options=i,i}genericLayout(t,e,n){var i;return we(this,void 0,void 0,function*(){const a=this.getOptions(n),s=e.getAllNodes().map(({id:c,data:d})=>Object.assign(Object.assign({id:c},d),(0,Vi.Z)(d.data,this.config.inputNodeAttrs))),o=e.getAllEdges().map(c=>Object.assign({},c));Object.assign(this.context,{assign:t,nodes:s,edges:o,graph:e});const l=new Promise(c=>{this.resolver=c}),u=this.setSimulation(a);return u.nodes(s),(i=u.force("link"))===null||i===void 0||i.links(o),l})}getResult(){const{assign:t,nodes:e,edges:n,graph:i}=this.context,a=e.map(o=>({id:o.id,data:Object.assign(Object.assign({},o.data),(0,Vi.Z)(o,this.config.outputNodeAttrs))})),s=n.map(({id:o,source:l,target:u,data:c})=>({id:o,source:typeof l=="object"?l.id:l,target:typeof u=="object"?u.id:u,data:c}));return t&&a.forEach(o=>i.mergeNodeData(o.id,o.data)),{nodes:a,edges:s}}initSimulation(){return(0,pP.Z)()}setSimulation(t){const e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var n;return(n=t.onTick)===null||n===void 0?void 0:n.call(t,this.getResult())}).on("end",()=>{var n;return(n=this.resolver)===null||n===void 0?void 0:n.call(this,this.getResult())})),hy(e,this.config.simulationAttrs.map(n=>[n,t[n]])),Object.entries(this.forceMap).forEach(([n,i])=>{const a=n;if(t[n]){let s=e.force(a);s||(s=i(),e.force(a,s)),hy(s,Object.entries(t[a]))}else e.force(a,null)}),e}}const hy=(r,t)=>t.reduce((e,[n,i])=>!e[n]||i===void 0?e:e[n].call(r,i),r);var fy=Y(70681),yP=Y.n(fy);class Au{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,Au.defaultOptions,t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(t,e,n){return we(this,void 0,void 0,function*(){const{nodeSize:i}=n,a=new fy.graphlib.Graph;a.setGraph(n),a.setDefaultEdgeLabel(()=>({}));const s=e.getAllNodes(),o=e.getAllEdges();[...s,...o].some(({id:u})=>(0,oe.Z)(u))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(u=>{const{id:c}=u,d=Object.assign({},u.data);if(i!==void 0){const[h,f]=Ks((0,de.Z)(i)?i(u):i);Object.assign(d,{width:h,height:f})}a.setNode(c.toString(),d)}),e.getAllEdges().forEach(({id:u,source:c,target:d})=>{a.setEdge(c.toString(),d.toString(),{id:u})}),yP().layout(a);const l={nodes:[],edges:[]};return a.nodes().forEach(u=>{const c=a.node(u);l.nodes.push({id:u,data:c}),t&&e.mergeNodeData(u,c)}),a.edges().forEach(u=>{const c=a.edge(u),{id:d}=c,h=mm(c,["id"]),{v:f,w:v}=u;l.edges.push({id:d,source:f,target:v,data:h}),t&&e.mergeEdgeData(d,h)}),l})}}Au.defaultOptions={};class tf{constructor(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}distanceTo(t){const e=this.rx-t.rx,n=this.ry-t.ry;return Math.hypot(e,n)}setPos(t,e){this.rx=t,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(t){const e=t.rx-this.rx,n=t.ry-this.ry;let i=Math.hypot(e,n);i=i<1e-4?1e-4:i;const a=this.g*(this.degree+1)*(t.degree+1)/i;this.fx+=a*e/i,this.fy+=a*n/i}in(t){return t.contains(this.rx,this.ry)}add(t){const e=this.mass+t.mass,n=(this.rx*this.mass+t.rx*t.mass)/e,i=(this.ry*this.mass+t.ry*t.mass)/e,a=this.degree+t.degree,s={rx:n,ry:i,mass:e,degree:a};return new tf(s)}}class ja{constructor(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}getLength(){return this.length}contains(t,e){const n=this.length/2;return t<=this.xmid+n&&t>=this.xmid-n&&e<=this.ymid+n&&e>=this.ymid-n}NW(){const t=this.xmid-this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new ja(i)}NE(){const t=this.xmid+this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new ja(i)}SW(){const t=this.xmid-this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new ja(i)}SE(){const t=this.xmid+this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new ja(i)}}class Wa{constructor(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,t!=null&&(this.quad=t)}insert(t){if(this.body==null){this.body=t;return}this._isExternal()?(this.quad&&(this.NW=new Wa(this.quad.NW()),this.NE=new Wa(this.quad.NE()),this.SW=new Wa(this.quad.SW()),this.SE=new Wa(this.quad.SE())),this._putBody(this.body),this._putBody(t),this.body=this.body.add(t)):(this.body=this.body.add(t),this._putBody(t))}_putBody(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(t){if(!(this.body==null||t===this.body))if(this._isExternal())t.addForce(this.body);else{const e=this.quad?this.quad.getLength():0,n=this.body.distanceTo(t);e/n<this.theta?t.addForce(this.body):(this.NW&&this.NW.updateForce(t),this.NE&&this.NE.updateForce(t),this.SW&&this.SW.updateForce(t),this.SE&&this.SE.updateForce(t))}}}const bP={center:[0,0],width:300,height:300,kr:5,kg:1,mode:"normal",preventOverlap:!1,dissuadeHubs:!1,maxIteration:0,ks:.1,ksmax:10,tao:.1};class xP{constructor(t={}){this.options=t,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},bP),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,t,e)})}genericForceAtlas2Layout(t,e,n){return we(this,void 0,void 0,function*(){const i=e.getAllEdges(),a=e.getAllNodes(),s=this.formatOptions(n,a.length),{width:o,height:l,prune:u,maxIteration:c,nodeSize:d,center:h}=s;if(!(a!=null&&a.length)||a.length===1)return Xi(e,t,h);const f=a.map(m=>pn(m,[o,l])),v=i.filter(m=>{const{source:y,target:b}=m;return y!==b}),g=new Et.k({nodes:f,edges:v}),p=this.getSizes(g,d);if(this.run(g,e,c,p,t,s),u){for(let y=0;y<v.length;y+=1){const{source:b,target:_}=v[y],w=g.getDegree(b),x=g.getDegree(b);if(w<=1){const E=g.getNode(_);g.mergeNodeData(b,{x:E.data.x,y:E.data.y})}else if(x<=1){const E=g.getNode(b);g.mergeNodeData(_,{x:E.data.x,y:E.data.y})}}const m=Object.assign(Object.assign({},s),{prune:!1,barnesHut:!1});this.run(g,e,100,p,t,m)}return{nodes:f,edges:i}})}getSizes(t,e){const n=t.getAllNodes(),i={};for(let a=0;a<n.length;a+=1){const s=n[a];i[s.id]=Xh(e,void 0)(s)}return i}formatOptions(t={},e){const n=Object.assign(Object.assign({},this.options),t),{center:i,width:a,height:s,barnesHut:o,prune:l,maxIteration:u,kr:c,kg:d}=n;return n.width=!a&&typeof window!="undefined"?window.innerWidth:a,n.height=!s&&typeof window!="undefined"?window.innerHeight:s,n.center=i||[n.width/2,n.height/2],o===void 0&&e>250&&(n.barnesHut=!0),l===void 0&&e>100&&(n.prune=!0),u===0&&!l?(n.maxIteration=250,e<=200&&e>100?n.maxIteration=1e3:e>200&&(n.maxIteration=1200)):u===0&&l&&(n.maxIteration=100,e<=200&&e>100?n.maxIteration=500:e>200&&(n.maxIteration=950)),c||(n.kr=50,e>100&&e<=500?n.kr=20:e>500&&(n.kr=1)),d||(n.kg=20,e>100&&e<=500?n.kg=10:e>500&&(n.kg=1)),n}run(t,e,n,i,a,s){const{kr:o,barnesHut:l,onTick:u}=s,c=t.getAllNodes();let d=0,h=n;const f={},v={},g={};for(let p=0;p<c.length;p+=1){const{data:m,id:y}=c[p];if(f[y]=[0,0],l){const b={id:p,rx:m.x,ry:m.y,mass:1,g:o,degree:t.getDegree(y)};g[y]=new tf(b)}}for(;h>0;)d=this.oneStep(t,{iter:h,preventOverlapIters:50,krPrime:100,sg:d,forces:f,preForces:v,bodies:g,sizes:i},s),h--,u==null||u({nodes:c,edges:e.getAllEdges()});return t}oneStep(t,e,n){const{iter:i,preventOverlapIters:a,krPrime:s,sg:o,preForces:l,bodies:u,sizes:c}=e;let{forces:d}=e;const{preventOverlap:h,barnesHut:f}=n,v=t.getAllNodes();for(let g=0;g<v.length;g+=1){const{id:p}=v[g];l[p]=[...d[p]],d[p]=[0,0]}return d=this.getAttrForces(t,i,a,c,d,n),f&&(h&&i>a||!h)?d=this.getOptRepGraForces(t,d,u,n):d=this.getRepGraForces(t,i,a,d,s,c,n),this.updatePos(t,d,l,o,n)}getAttrForces(t,e,n,i,a,s){const{preventOverlap:o,dissuadeHubs:l,mode:u,prune:c}=s,d=t.getAllEdges();for(let h=0;h<d.length;h+=1){const{source:f,target:v}=d[h],g=t.getNode(f),p=t.getNode(v),m=t.getDegree(f),y=t.getDegree(v);if(c&&(m<=1||y<=1))continue;const b=[p.data.x-g.data.x,p.data.y-g.data.y];let _=Math.hypot(b[0],b[1]);_=_<1e-4?1e-4:_,b[0]=b[0]/_,b[1]=b[1]/_,o&&e<n&&(_=_-i[f]-i[v]);let w=_,x=w;u==="linlog"&&(w=Math.log(1+_),x=w),l&&(w=_/m,x=_/y),o&&e<n&&_<=0?(w=0,x=0):o&&e<n&&_>0&&(w=_,x=_),a[f][0]+=w*b[0],a[v][0]-=x*b[0],a[f][1]+=w*b[1],a[v][1]-=x*b[1]}return a}getOptRepGraForces(t,e,n,i){const{kg:a,center:s,prune:o}=i,l=t.getAllNodes(),u=l.length;let c=9e10,d=-9e10,h=9e10,f=-9e10;for(let y=0;y<u;y+=1){const{id:b,data:_}=l[y];o&&t.getDegree(b)<=1||(n[b].setPos(_.x,_.y),_.x>=d&&(d=_.x),_.x<=c&&(c=_.x),_.y>=f&&(f=_.y),_.y<=h&&(h=_.y))}const v=Math.max(d-c,f-h),g={xmid:(d+c)/2,ymid:(f+h)/2,length:v,massCenter:s,mass:u},p=new ja(g),m=new Wa(p);for(let y=0;y<u;y+=1){const{id:b}=l[y];o&&t.getDegree(b)<=1||n[b].in(p)&&m.insert(n[b])}for(let y=0;y<u;y+=1){const{id:b,data:_}=l[y],w=t.getDegree(b);if(o&&w<=1)continue;n[b].resetForce(),m.updateForce(n[b]),e[b][0]-=n[b].fx,e[b][1]-=n[b].fy;const x=[_.x-s[0],_.y-s[1]];let E=Math.hypot(x[0],x[1]);E=E<1e-4?1e-4:E,x[0]=x[0]/E,x[1]=x[1]/E;const k=a*(w+1);e[b][0]-=k*x[0],e[b][1]-=k*x[1]}return e}getRepGraForces(t,e,n,i,a,s,o){const{preventOverlap:l,kr:u,kg:c,center:d,prune:h}=o,f=t.getAllNodes(),v=f.length;for(let g=0;g<v;g+=1){const p=f[g],m=t.getDegree(p.id);for(let w=g+1;w<v;w+=1){const x=f[w],E=t.getDegree(x.id);if(h&&(m<=1||E<=1))continue;const k=[x.data.x-p.data.x,x.data.y-p.data.y];let O=Math.hypot(k[0],k[1]);O=O<1e-4?1e-4:O,k[0]=k[0]/O,k[1]=k[1]/O,l&&e<n&&(O=O-s[p.id]-s[x.id]);let P=u*(m+1)*(E+1)/O;l&&e<n&&O<0?P=a*(m+1)*(E+1):l&&e<n&&O===0?P=0:l&&e<n&&O>0&&(P=u*(m+1)*(E+1)/O),i[p.id][0]-=P*k[0],i[x.id][0]+=P*k[0],i[p.id][1]-=P*k[1],i[x.id][1]+=P*k[1]}const y=[p.data.x-d[0],p.data.y-d[1]],b=Math.hypot(y[0],y[1]);y[0]=y[0]/b,y[1]=y[1]/b;const _=c*(m+1);i[p.id][0]-=_*y[0],i[p.id][1]-=_*y[1]}return i}updatePos(t,e,n,i,a){const{ks:s,tao:o,prune:l,ksmax:u}=a,c=t.getAllNodes(),d=c.length,h=[],f=[];let v=0,g=0,p=i;for(let y=0;y<d;y+=1){const{id:b}=c[y],_=t.getDegree(b);if(l&&_<=1)continue;const w=[e[b][0]-n[b][0],e[b][1]-n[b][1]],x=Math.hypot(w[0],w[1]),E=[e[b][0]+n[b][0],e[b][1]+n[b][1]],k=Math.hypot(E[0],E[1]);h[y]=x,f[y]=k/2,v+=(_+1)*h[y],g+=(_+1)*f[y]}const m=p;p=o*g/v,m!==0&&(p=p>1.5*m?1.5*m:p);for(let y=0;y<d;y+=1){const{id:b,data:_}=c[y],w=t.getDegree(b);if(l&&w<=1||(0,oe.Z)(_.fx)&&(0,oe.Z)(_.fy))continue;let x=s*p/(1+p*Math.sqrt(h[y])),E=Math.hypot(e[b][0],e[b][1]);E=E<1e-4?1e-4:E;const k=u/E;x=x>k?k:x;const O=x*e[b][0],P=x*e[b][1];t.mergeNodeData(b,{x:_.x+O,y:_.y+P})}return p}}const EP={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},wP=800;class kP{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},EP),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;n<t;n++)this.runOneStep(this.lastGraph,this.lastClusterMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericFruchtermanLayout(t,e,n){return we(this,void 0,void 0,function*(){if(this.running)return;const i=this.formatOptions(n),{dimensions:a,width:s,height:o,center:l,clustering:u,nodeClusterBy:c,maxIteration:d,onTick:h}=i,f=e.getAllNodes(),v=e.getAllEdges();if(!(f!=null&&f.length)){const b={nodes:[],edges:v};return this.lastResult=b,b}if(f.length===1){t&&e.mergeNodeData(f[0].id,{x:l[0],y:l[1],z:a===3?l[2]:void 0});const b={nodes:[Object.assign(Object.assign({},f[0]),{data:Object.assign(Object.assign({},f[0].data),{x:l[0],y:l[1],z:a===3?l[2]:void 0})})],edges:v};return this.lastResult=b,b}const g=f.map(b=>pn(b,[s,o])),p=new Et.k({nodes:g,edges:v}),m={};if(u&&g.forEach(b=>{const _=b.data[c];m[_]||(m[_]={name:_,cx:0,cy:0,count:0})}),this.lastLayoutNodes=g,this.lastLayoutEdges=v,this.lastAssign=t,this.lastGraph=p,this.lastOptions=i,this.lastClusterMap=m,typeof window=="undefined")return;let y=0;return new Promise(b=>{this.timeInterval=window.setInterval(()=>{if(!this.running){b({nodes:g,edges:v});return}this.runOneStep(p,m,i),t&&g.forEach(({id:_,data:w})=>e.mergeNodeData(_,{x:w.x,y:w.y,z:a===3?w.z:void 0})),h==null||h({nodes:g,edges:v}),y++,y>=d&&(window.clearInterval(this.timeInterval),b({nodes:g,edges:v}))},0),this.running=!0})})}formatOptions(t={}){const e=Object.assign(Object.assign({},this.options),t),{clustering:n,nodeClusterBy:i}=e,{center:a,width:s,height:o}=e;return e.width=!s&&typeof window!="undefined"?window.innerWidth:s,e.height=!o&&typeof window!="undefined"?window.innerHeight:o,e.center=a||[e.width/2,e.height/2],e.clustering=n&&!!i,e}runOneStep(t,e,n){const{dimensions:i,height:a,width:s,gravity:o,center:l,speed:u,clustering:c,nodeClusterBy:d,clusterGravity:h}=n,f=a*s,v=Math.sqrt(f)/10,g=t.getAllNodes(),p=f/(g.length+1),m=Math.sqrt(p),y={};if(this.applyCalculate(t,y,m,p),c){for(const _ in e)e[_].cx=0,e[_].cy=0,e[_].count=0;g.forEach(_=>{const{data:w}=_,x=e[w[d]];(0,oe.Z)(w.x)&&(x.cx+=w.x),(0,oe.Z)(w.y)&&(x.cy+=w.y),x.count++});for(const _ in e)e[_].cx/=e[_].count,e[_].cy/=e[_].count;const b=h||o;g.forEach((_,w)=>{const{id:x,data:E}=_;if(!(0,oe.Z)(E.x)||!(0,oe.Z)(E.y))return;const k=e[E[d]],O=Math.sqrt((E.x-k.cx)*(E.x-k.cx)+(E.y-k.cy)*(E.y-k.cy)),P=m*b;y[x].x-=P*(E.x-k.cx)/O,y[x].y-=P*(E.y-k.cy)/O})}g.forEach((b,_)=>{const{id:w,data:x}=b;if(!(0,oe.Z)(x.x)||!(0,oe.Z)(x.y))return;const E=.01*m*o;y[w].x-=E*(x.x-l[0]),y[w].y-=E*(x.y-l[1]),i===3&&(y[w].z-=E*(x.z-l[2]))}),g.forEach((b,_)=>{const{id:w,data:x}=b;if((0,oe.Z)(x.fx)&&(0,oe.Z)(x.fy)){x.x=x.fx,x.y=x.fy,i===3&&(x.z=x.fz);return}if(!(0,oe.Z)(x.x)||!(0,oe.Z)(x.y))return;const E=Math.sqrt(y[w].x*y[w].x+y[w].y*y[w].y+(i===3?y[w].z*y[w].z:0));if(E>0){const k=Math.min(v*(u/wP),E);t.mergeNodeData(w,{x:x.x+y[w].x/E*k,y:x.y+y[w].y/E*k,z:i===3?x.z+y[w].z/E*k:void 0})}})}applyCalculate(t,e,n,i){this.calRepulsive(t,e,i),this.calAttractive(t,e,n)}calRepulsive(t,e,n){const i=t.getAllNodes();i.forEach(({data:a,id:s},o)=>{e[s]={x:0,y:0,z:0},i.forEach(({data:l,id:u},c)=>{if(o<=c||!(0,oe.Z)(a.x)||!(0,oe.Z)(l.x)||!(0,oe.Z)(a.y)||!(0,oe.Z)(l.y))return;let d=a.x-l.x,h=a.y-l.y,f=this.options.dimensions===3?a.z-l.z:0,v=d*d+h*h+f*f;v===0&&(v=1,d=.01,h=.01,f=.01);const g=n/v,p=d*g,m=h*g,y=f*g;e[s].x+=p,e[s].y+=m,e[u].x-=p,e[u].y-=m,this.options.dimensions===3&&(e[s].z+=y,e[u].z-=y)})})}calAttractive(t,e,n){t.getAllEdges().forEach(a=>{const{source:s,target:o}=a;if(!s||!o||s===o)return;const{data:l}=t.getNode(s),{data:u}=t.getNode(o);if(!(0,oe.Z)(u.x)||!(0,oe.Z)(l.x)||!(0,oe.Z)(u.y)||!(0,oe.Z)(l.y))return;const c=u.x-l.x,d=u.y-l.y,h=this.options.dimensions===3?u.z-l.z:0,f=Math.sqrt(c*c+d*d+h*h)/n,v=c*f,g=d*f,p=h*f;e[s].x+=v,e[s].y+=g,e[o].x-=v,e[o].y-=g,this.options.dimensions===3&&(e[s].z+=p,e[o].z-=p)})}}const _P={begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30,width:300,height:300};class SP{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},_P),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{begin:a=[0,0],condense:s,preventOverlapPadding:o,preventOverlap:l,rows:u,cols:c,nodeSpacing:d,nodeSize:h,width:f,height:v,position:g}=i;let{sortBy:p}=i;const m=e.getAllNodes(),y=e.getAllEdges(),b=m==null?void 0:m.length;if(!b||b===1)return Xi(e,t,a);const _=m.map(F=>pn(F));p!=="id"&&(!(0,Se.Z)(p)||_[0].data[p]===void 0)&&(p="degree"),p==="degree"?_.sort((F,C)=>e.getDegree(C.id,"both")-e.getDegree(F.id,"both")):p==="id"?_.sort((F,C)=>(0,oe.Z)(C.id)&&(0,oe.Z)(F.id)?C.id-F.id:`${F.id}`.localeCompare(`${C.id}`)):_.sort((F,C)=>C.data[p]-F.data[p]);const w=!f&&typeof window!="undefined"?window.innerWidth:f,x=!v&&typeof window!="undefined"?window.innerHeight:v,E=b,k={rows:u,cols:c};if(u!=null&&c!=null)k.rows=u,k.cols=c;else if(u!=null&&c==null)k.rows=u,k.cols=Math.ceil(E/k.rows);else if(u==null&&c!=null)k.cols=c,k.rows=Math.ceil(E/k.cols);else{const F=Math.sqrt(E*x/w);k.rows=Math.round(F),k.cols=Math.round(w/x*F)}if(k.rows=Math.max(k.rows,1),k.cols=Math.max(k.cols,1),k.cols*k.rows>E){const F=Cu(k),C=Ou(k);(F-1)*C>=E?Cu(k,F-1):(C-1)*F>=E&&Ou(k,C-1)}else for(;k.cols*k.rows<E;){const F=Cu(k),C=Ou(k);(C+1)*F>=E?Ou(k,C+1):Cu(k,F+1)}let O=s?0:w/k.cols,P=s?0:x/k.rows;if(l||d){const F=Yi(10,d),C=Yh(30,h,!1);_.forEach(S=>{(!S.data.x||!S.data.y)&&(S.data.x=0,S.data.y=0);const T=e.getNode(S.id),[N,B]=Ks(C(T)||30),I=F!==void 0?F(S):o,W=N+I,X=B+I;O=Math.max(O,W),P=Math.max(P,X)})}const M={},L={row:0,col:0},D={};for(let F=0;F<_.length;F++){const C=_[F];let S;if(g&&(S=g(e.getNode(C.id))),S&&(S.row!==void 0||S.col!==void 0)){const T={row:S.row,col:S.col};if(T.col===void 0)for(T.col=0;nf(M,T);)T.col++;else if(T.row===void 0)for(T.row=0;nf(M,T);)T.row++;D[C.id]=T,vy(M,T)}TP(C,a,O,P,D,k,L,M)}const z={nodes:_,edges:y};return t&&_.forEach(F=>{e.mergeNodeData(F.id,{x:F.data.x,y:F.data.y})}),z})}}const Cu=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.min(n,i):Math.min(n,i)===r.rows?r.rows=t:r.cols=t,e},Ou=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.max(n,i):Math.max(n,i)===r.rows?r.rows=t:r.cols=t,e},nf=(r,t)=>r[`c-${t.row}-${t.col}`]||!1,vy=(r,t)=>r[`c-${t.row}-${t.col}`]=!0,gy=(r,t)=>{const e=r.cols||5;t.col++,t.col>=e&&(t.col=0,t.row++)},TP=(r,t,e,n,i,a,s,o)=>{let l,u;const c=i[r.id];if(c)l=c.col*e+e/2+t[0],u=c.row*n+n/2+t[1];else{for(;nf(o,s);)gy(a,s);l=s.col*e+e/2+t[0],u=s.row*n+n/2+t[1],vy(o,s),gy(a,s)}r.data.x=l,r.data.y=u},AP=(r,t,e)=>{try{const n=wr.y3.mul(wr.y3.pow(t,2),-.5),i=n.mean("row"),a=n.mean("column"),s=n.mean();n.add(s).subRowVector(i).subColumnVector(a);const o=new wr.Sc(n),l=wr.y3.sqrt(o.diagonalMatrix).diagonal();return o.leftSingularVectors.toJSON().map(u=>wr.y3.mul([u],[l]).toJSON()[0].splice(0,r))}catch(n){const i=[];for(let a=0;a<t.length;a++){const s=Math.random()*e,o=Math.random()*e;i.push([s,o])}return i}},CP=800,OP={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},PP=(r,t)=>{const e=Object.assign(Object.assign({},OP),t),{positions:n,iterations:i,width:a,k:s,speed:o=100,strictRadial:l,focusIdx:u,radii:c=[],nodeSizeFunc:d}=e,h=r.getAllNodes(),f=[],v=a/10;for(let g=0;g<i;g++)n.forEach((p,m)=>{f[m]={x:0,y:0}}),NP(h,n,f,s,c,d),MP(n,f,o,l,u,v,a,c);return n},NP=(r,t,e,n,i,a)=>{t.forEach((s,o)=>{e[o]={x:0,y:0},t.forEach((l,u)=>{if(o===u||i[o]!==i[u])return;let c=s.x-l.x,d=s.y-l.y,h=Math.sqrt(c*c+d*d);if(h===0){h=1;const f=o>u?1:-1;c=.01*f,d=.01*f}if(h<a(r[o])/2+a(r[u])/2){const f=n*n/h;e[o].x+=c/h*f,e[o].y+=d/h*f}})})},MP=(r,t,e,n,i,a,s,o)=>{const l=a||s/10;return n&&t.forEach((u,c)=>{const d=r[c].x-r[i].x,h=r[c].y-r[i].y,f=Math.sqrt(d*d+h*h);let v=h/f,g=-d/f;const p=Math.sqrt(u.x*u.x+u.y*u.y);let m=Math.acos((v*u.x+g*u.y)/p);m>Math.PI/2&&(m-=Math.PI/2,v*=-1,g*=-1);const y=Math.cos(m)*p;u.x=v*y,u.y=g*y}),r.forEach((u,c)=>{if(c===i)return;const d=Math.sqrt(t[c].x*t[c].x+t[c].y*t[c].y);if(d>0&&c!==i){const h=Math.min(l*(e/CP),d);if(u.x+=t[c].x/d*h,u.y+=t[c].y/d*h,n){let f=u.x-r[i].x,v=u.y-r[i].y;const g=Math.sqrt(f*f+v*v);f=f/g*o[c],v=v/g*o[c],u.x=r[i].x+f,u.y=r[i].y+v}}}),r},RP={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class LP{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},RP),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:s,center:o,focusNode:l,unitRadius:u,nodeSize:c,nodeSpacing:d,strictRadial:h,preventOverlap:f,maxPreventOverlapIteration:v,sortBy:g,linkDistance:p=50,sortStrength:m=10,maxIteration:y=1e3}=i,b=e.getAllNodes(),_=e.getAllEdges(),w=!a&&typeof window!="undefined"?window.innerWidth:a,x=!s&&typeof window!="undefined"?window.innerHeight:s,E=o||[w/2,x/2];if(!(b!=null&&b.length)||b.length===1)return Xi(e,t,E);let k=b[0];if((0,Se.Z)(l)){for(let fe=0;fe<b.length;fe++)if(b[fe].id===l){k=b[fe];break}}else k=l||b[0];const O=BP(b,k.id),P=ly({nodes:b,edges:_},!1),M=oy(P),L=zP(M,O);FP(M,O,L+1);const D=M[O];let z=w-E[0]>E[0]?E[0]:w-E[0],F=x-E[1]>E[1]?E[1]:x-E[1];z===0&&(z=w/2),F===0&&(F=x/2);const C=Math.min(z,F),S=Math.max(...D),T=[],N=u||C/S;D.forEach((fe,Le)=>{T[Le]=fe*N});const B=DP(b,M,p,T,N,g,m),I=IP(B),W=AP(p,B,p);let X=W.map(([fe,Le])=>({x:(isNaN(fe)?Math.random()*p:fe)-W[O][0],y:(isNaN(Le)?Math.random()*p:Le)-W[O][1]}));this.run(y,X,I,B,T,O);let H;if(f){H=Xh(c,d);const fe={nodes:b,nodeSizeFunc:H,positions:X,radii:T,height:x,width:w,strictRadial:!!h,focusIdx:O,iterations:v||200,k:X.length/4.5};X=PP(e,fe)}const $=[];return X.forEach((fe,Le)=>{const Ze=pn(b[Le]);Ze.data.x=fe.x+E[0],Ze.data.y=fe.y+E[1],$.push(Ze)}),t&&$.forEach(fe=>e.mergeNodeData(fe.id,{x:fe.data.x,y:fe.data.y})),{nodes:$,edges:_}})}run(t,e,n,i,a,s){for(let o=0;o<=t;o++){const l=o/t;this.oneIteration(l,e,a,i,n,s)}}oneIteration(t,e,n,i,a,s){const o=1-t;e.forEach((l,u)=>{const c=uy(l,{x:0,y:0}),d=c===0?0:1/c;if(u===s)return;let h=0,f=0,v=0;e.forEach((p,m)=>{if(u===m)return;const y=uy(l,p),b=y===0?0:1/y,_=i[m][u];v+=a[u][m],h+=a[u][m]*(p.x+_*(l.x-p.x)*b),f+=a[u][m]*(p.y+_*(l.y-p.y)*b)});const g=n[u]===0?0:1/n[u];v*=o,v+=t*g*g,h*=o,h+=t*g*l.x*d,l.x=h/v,f*=o,f+=t*g*l.y*d,l.y=f/v})}}const DP=(r,t,e,n,i,a,s)=>{if(!r)return[];const o=[];if(t){const l={};t.forEach((u,c)=>{const d=[];u.forEach((h,f)=>{var v,g;if(c===f)d.push(0);else if(n[c]===n[f])if(a==="data")d.push(h*(Math.abs(c-f)*s)/(n[c]/i));else if(a){let p,m;if(l[r[c].id])p=l[r[c].id];else{const y=(a==="id"?r[c].id:(v=r[c].data)===null||v===void 0?void 0:v[a])||0;(0,Se.Z)(y)?p=y.charCodeAt(0):p=y,l[r[c].id]=p}if(l[r[f].id])m=l[r[f].id];else{const y=(a==="id"?r[f].id:(g=r[f].data)===null||g===void 0?void 0:g[a])||0;(0,Se.Z)(y)?m=y.charCodeAt(0):m=y,l[r[f].id]=m}d.push(h*(Math.abs(p-m)*s)/(n[c]/i))}else d.push(h*e/(n[c]/i));else{const p=(e+i)/2;d.push(h*p)}}),o.push(d)})}return o},IP=r=>{const t=r.length,e=r[0].length,n=[];for(let i=0;i<t;i++){const a=[];for(let s=0;s<e;s++)r[i][s]!==0?a.push(1/(r[i][s]*r[i][s])):a.push(0);n.push(a)}return n},BP=(r,t)=>{let e=-1;return r.forEach((n,i)=>{n.id===t&&(e=i)}),Math.max(e,0)},FP=(r,t,e)=>{const n=r.length;for(let i=0;i<n;i++)if(r[t][i]===1/0){r[t][i]=e,r[i][t]=e;for(let a=0;a<n;a++)r[i][a]!==1/0&&r[t][a]===1/0&&(r[t][a]=e+r[i][a],r[a][t]=e+r[i][a])}for(let i=0;i<n;i++)if(i!==t){for(let a=0;a<n;a++)if(r[i][a]===1/0){let s=Math.abs(r[t][i]-r[t][a]);s=s===0?1:s,r[i][a]=s}}},zP=(r,t)=>{let e=0;for(let n=0;n<r[t].length;n++)r[t][n]!==1/0&&(e=r[t][n]>e?r[t][n]:e);return e},GP={center:[0,0],width:300,height:300};class jP{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},GP),t)}execute(t,e){return we(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return we(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,n){return we(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:s,height:o}=i,l=e.getAllNodes(),u=.9,c=!s&&typeof window!="undefined"?window.innerWidth:s,d=!o&&typeof window!="undefined"?window.innerHeight:o,h=a||[c/2,d/2],f=[];return l&&l.forEach(g=>{f.push({id:g.id,data:{x:(Math.random()-.5)*u*c+h[0],y:(Math.random()-.5)*u*d+h[1]}})}),t&&f.forEach(g=>e.mergeNodeData(g.id,{x:g.data.x,y:g.data.y})),{nodes:f,edges:e.getAllEdges()}})}}var rf=Y(92426),af=Y(35278);class Pt extends eh{}function Za(r,t=!0,e){const n=document.createElement("div");return n.setAttribute("class",`g6-${r}`),Object.assign(n.style,{position:"absolute",display:"block"}),t&&Object.assign(n.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),e&&Object.assign(n.style,e),n}function sf(r,t="div",e={},n="",i=document.body){const a=document.getElementById(r);a&&a.remove();const s=document.createElement(t);return s.innerHTML=n,s.id=r,Object.assign(s.style,e),i.appendChild(s),s}var WP=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class Pu extends Pt{constructor(t,e){super(t,Object.assign({},Pu.defaultOptions,e)),this.$element=Za("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return WP(this,void 0,void 0,function*(){e.update.call(this,t),Object.assign(this.$element.style,(0,af.Z)(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}Pu.defaultOptions={transition:"background 0.5s",backgroundSize:"cover"};var Va=Y(89558),ZP=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Nu extends Pt{constructor(t,e){super(t,(0,dn.Z)({},Nu.defaultOptions,e)),this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:n,bubbleSetOptions:i}=this.parseOptions();(0,gt.Z)(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},n),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new Bs({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const i=j(n.data);[...this.options.members,...this.options.avoidMembers].includes(i)&&this.shape.update(Object.assign(Object.assign({},this.parseOptions().style),{d:this.getPath(i)}))},this.getPath=n=>{const{graph:i}=this.context,a=this.options.members,s=[...this.members.keys()],o=this.options.avoidMembers,l=[...this.avoidMembers.keys()];if(!n&&(0,gt.Z)(a,s)&&(0,gt.Z)(o,l))return this.path;const{enter:u=[],exit:c=[]}=si(s,a,p=>p),{enter:d=[],exit:h=[]}=si(l,o,p=>p);n&&(c.push(n),u.push(n));const f=(p,m,y)=>{p.forEach(b=>{const _=y?this.members:this.avoidMembers,w=y?"pushMember":"pushNonMember",x=y?"removeMember":"removeNonMember";if(m){let E;i.getElementType(b)==="edge"?([E]=HP(i,b),this.bubbleSets.pushEdge(E)):([E]=VP(i,b),this.bubbleSets[w](E)),_.set(b,E)}else{const E=_.get(b);E&&(i.getElementType(b)==="edge"?this.bubbleSets.removeEdge(E):this.bubbleSets[x](E),_.delete(b))}})};f(c,!1,!0),f(u,!0,!0),f(h,!1,!1),f(d,!0,!1);const g=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=t0(g.points.map(Ot)),this.path},this.bindEvents(),this.bubbleSets=new Va.CF(this.options)}bindEvents(){this.context.graph.on(Q.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(Q.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new Va.CF(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const t=this.options,{type:e,key:n,members:i,avoidMembers:a}=t,s=ZP(t,["type","key","members","avoidMembers"]),o=Object.keys(s).reduce((l,u)=>(u in Va.vC?l.bubbleSetOptions[u]=s[u]:l.style[u]=s[u],l),{style:{},bubbleSetOptions:{}});return Object.assign({type:e,key:n,members:i,avoidMembers:a},o)}addMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.avoidMembers.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n))),this.options.members=[...new Set([...this.options.members,...e])],this.drawBubbleSets()}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),this.drawBubbleSets()}updateMember(t){this.options.members=(0,de.Z)(t)?t(this.options.members):t,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.members.includes(n))&&(this.options.members=this.options.members.filter(n=>!e.includes(n))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...e])],this.drawBubbleSets()}removeAvoidMember(t){const e=Array.isArray(t)?t:[t];this.options.avoidMembers.some(n=>e.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n)),this.drawBubbleSets())}updateAvoidMember(t){this.options.avoidMembers=Array.isArray(t)?t:[t],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(Q.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(Q.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}Nu.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},Va.vC);const VP=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getElementRenderBounds(n);return new Va.Ae(i.min[0],i.min[1],yr(i),br(i))}),HP=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getEdgeData(n),a=r.getElementPosition(i.source),s=r.getElementPosition(i.target);return Va.x1.from({x1:a[0],y1:a[1],x2:s[0],y2:s[1]})});class GF extends null{constructor(t,e){super(t,e),this.setOptions=n=>{const i={cameraType:"setType",near:"setNear",far:"setFar",fov:"setFov",aspect:"setAspect",projectionMode:"setProjectionMode",distance:"setDistance",minDistance:"setMinDistance",maxDistance:"setMaxDistance",roll:"setRoll",elevation:"setElevation",azimuth:"setAzimuth"},a=(s,o)=>{switch(s){case"projectionMode":return o==="perspective"?1:0;case"cameraType":return{orbiting:0,exploring:1,tracking:2}[o];case"aspect":return typeof o=="number"?o:this.getCanvasAspect();default:return o}};Object.entries(i).forEach(([s,o])=>{const l=n[s];if(l!==void 0){const u=a(s,l);this.context.canvas.getCamera()[o](u)}})},this.bindEvents()}update(t){this.setOptions(t),super.update(t)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[t,e]=this.context.viewport.getCanvasSize();return t/e}}function UP(r){return`
|
|
<ul class="g6-contextmenu-ul">
|
|
${r.map(t=>`<li class="g6-contextmenu-li" value="${t.value}">${t.name}</li>`).join("")}
|
|
</ul>
|
|
`}const YP=`
|
|
.g6-contextmenu {
|
|
font-size: 12px;
|
|
background-color: rgba(255, 255, 255, 0.96);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
box-shadow: rgba(0, 0, 0, 0.12) 0px 6px 12px 0px;
|
|
transition: visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s;
|
|
}
|
|
|
|
.g6-contextmenu-ul {
|
|
max-width: 256px;
|
|
min-width: 96px;
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.g6-contextmenu-li {
|
|
padding: 8px 12px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.g6-contextmenu-li:hover {
|
|
background-color: #f5f5f5;
|
|
cursor: pointer;
|
|
}
|
|
`;var py=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class Mu extends Pt{constructor(t,e){super(t,Object.assign({},Mu.defaultOptions,e)),this.targetElement=null,this.onTriggerEvent=n=>{var i;(i=n.preventDefault)===null||i===void 0||i.call(n),this.show(n)},this.onMenuItemClick=n=>{const{onClick:i,trigger:a}=this.options;if(n.target instanceof HTMLElement&&n.target.className.includes("g6-contextmenu-li")){const s=n.target.getAttribute("value");i==null||i(s,n.target,this.targetElement),this.hide()}a!=="click"&&this.hide()},this.initElement(),this.update(e)}initElement(){this.$element=Za("contextmenu",!1,{zIndex:"99"});const{className:t}=this.options;t&&this.$element.classList.add(t),this.context.canvas.getContainer().appendChild(this.$element),sf("g6-contextmenu-css","style",{},YP,document.head)}show(t){return py(this,void 0,void 0,function*(){const{enable:e,offset:n}=this.options;if(typeof e=="function"&&!e(t)||!e){this.hide();return}const i=yield this.getDOMContent(t);i instanceof HTMLElement?(this.$element.innerHTML="",this.$element.appendChild(i)):this.$element.innerHTML=i;const a=this.context.graph.getCanvas().getContainer().getBoundingClientRect();this.$element.style.left=`${t.client.x-a.left+n[0]}px`,this.$element.style.top=`${t.client.y-a.top+n[1]}px`,this.$element.style.display="block",this.targetElement=t.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(t){return py(this,void 0,void 0,function*(){const{getContent:e,getItems:n}=this.options;return n?UP(yield n(t)):yield e(t)})}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`canvas:${e}`,this.onTriggerEvent),t.on(`node:${e}`,this.onTriggerEvent),t.on(`edge:${e}`,this.onTriggerEvent),t.on(`combo:${e}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`canvas:${e}`,this.onTriggerEvent),t.off(`node:${e}`,this.onTriggerEvent),t.off(`edge:${e}`,this.onTriggerEvent),t.off(`combo:${e}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}Mu.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class Ru extends Pt{constructor(t,e){super(t,Object.assign({},Ru.defaultOptions,e)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:n,element:i}=this.context,a=n.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:s,iterRate:o,divRate:l}=this.options;let{lambda:u,divisions:c,iterations:d}=this.options;for(let h=0;h<s;h++){for(let f=0;f<d;f++){const v={};a.forEach(g=>{var p;if(g.source===g.target)return;const m=j(g);v[m]=this.getEdgeForces(g,c,u);for(let y=0;y<c+1;y++)(p=this.edgePoints)[m]||(p[m]=[]),this.edgePoints[m][y]=Ee(this.edgePoints[m][y],v[m][y])})}u/=2,c*=l,d*=o,this.divideEdges(c)}a.forEach(h=>{const f=j(h),v=i.getElement(f);v==null||v.update({d:Ph(this.edgePoints[f])})})},this.bindEvents()}get nodeMap(){const t=this.context.model.getNodeData();return Object.fromEntries(t.map(e=>[j(e),zi(Ct(e))]))}divideEdges(t){this.context.model.getEdgeData().forEach(n=>{var i;const a=j(n);(i=this.edgePoints)[a]||(i[a]=[]);const s=this.nodeMap[n.source],o=this.nodeMap[n.target];if(t===1)this.edgePoints[a].push(s),this.edgePoints[a].push(Xn(Ee(s,o),2)),this.edgePoints[a].push(o);else{const u=(this.edgePoints[a].length===0?qe(s,o):JP(this.edgePoints[a]))/(t+1);let c=u;const d=[s];for(let h=1;h<this.edgePoints[a].length;h++){const f=this.edgePoints[a][h-1],v=this.edgePoints[a][h];let g=qe(v,f);for(;g>c;){const p=c/g,m=Ee(f,Dr(He(v,f),p));d.push(m),g-=c,c=u}c-=g}d.push(o),this.edgePoints[a]=d}})}getVectorPosition(t){const e=this.nodeMap[t.source],n=this.nodeMap[t.target],[i,a]=He(n,e),s=qe(e,n);return{source:e,target:n,vx:i,vy:a,length:s}}measureEdgeCompatibility(t,e){const n=this.getVectorPosition(t),i=this.getVectorPosition(e),a=XP(n,i),s=KP(n,i),o=$P(n,i),l=qP(n,i);return a*s*o*l}getEdgeBundles(){const t={},e=this.options.bundleThreshold,n=this.context.model.getEdgeData();return n.forEach((i,a)=>{n.forEach((s,o)=>{var l,u;if(o<=a)return;this.measureEdgeCompatibility(i,s)>=e&&(t[l=j(i)]||(t[l]=[]),t[j(i)].push(s),t[u=j(s)]||(t[u]=[]),t[j(s)].push(i))})}),t}getSpringForce(t,e){const{pre:n,cur:i,next:a}=t;return Dr(He(Ee(n,a),Dr(i,2)),e)}getElectrostaticForce(t,e){(0,xr.Z)(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const n=this.edgeBundles[j(e)];let i=[0,0];return n==null||n.forEach(a=>{const s=this.edgePoints[j(a)][t],o=this.edgePoints[j(e)][t],l=He(s,o),u=qe(s,o);i=Ee(i,Dr(l,1/u))}),i}getEdgeForces(t,e,n){const i=this.nodeMap[t.source],a=this.nodeMap[t.target],s=this.options.K/(qe(i,a)*(e+1)),o=[[0,0]],l=j(t);for(let u=1;u<e;u++){const c=this.getSpringForce({pre:this.edgePoints[l][u-1],cur:this.edgePoints[l][u],next:this.edgePoints[l][u+1]||[0,0]},s),d=this.getElectrostaticForce(u,t);o.push(Dr(Ee(c,d),n))}return o.push([0,0]),o}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_RENDER,this.onBundle)}unbindEvents(){const{graph:t}=this.context;t.off(Q.AFTER_RENDER,this.onBundle)}destroy(){this.unbindEvents(),super.destroy()}}Ru.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const XP=(r,t)=>Math.abs(BS([r.vx,r.vy],[t.vx,t.vy])/(r.length*t.length)),KP=(r,t)=>{const e=(r.length+t.length)/2;return 2/(e/Math.min(r.length,t.length)+Math.max(r.length,t.length)/e)},$P=(r,t)=>{const e=(r.length+t.length)/2,n=Xn(Ee(r.source,r.target),2),i=Xn(Ee(t.source,t.target),2);return e/(e+qe(n,i))},my=(r,t)=>{if(t.source[0]===t.target[0])return[t.source[0],r[1]];if(t.source[1]===t.target[1])return[r[0],t.source[1]];const e=(t.source[1]-t.target[1])/(t.source[0]-t.target[0]),n=(e*e*t.source[0]+e*(r[1]-t.source[1])+r[0])/(e*e+1),i=e*(n-t.source[0])+t.source[1];return[n,i]},yy=(r,t)=>{const e=my(t.source,r),n=my(t.target,r),i=Xn(Ee(e,n),2),a=Xn(Ee(r.source,r.target),2);return qe(e,n)===0?0:Math.max(0,1-2*qe(a,i)/qe(e,n))},qP=(r,t)=>Math.min(yy(r,t),yy(t,r)),JP=r=>{let t=0;for(let e=1;e<r.length;e++)t+=qe(r[e],r[e-1]);return t},QP={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8,zIndex:-1/0},by=.05;class Lu extends Pt{constructor(t,e){super(t,Object.assign({},Lu.defaultOptions,e)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Ot(n.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=n=>{const i=Object.assign({},QP,this.options.style);this.isLensOn||(this.lens=new Wi({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Kn(n),{size:this.r*2}),this.lens.update(i)},this.getFilterData=()=>{const{filter:n}=this.options,{model:i}=this.context,a=i.getData();if(!n)return a;const{nodes:s,edges:o,combos:l}=a;return{nodes:s.filter(u=>n(j(u),"node")),edges:o.filter(u=>n(j(u),"edge")),combos:l.filter(u=>n(j(u),"combo"))}},this.getFocusElements=n=>{const{nodes:i,edges:a}=this.getFilterData(),s=i.filter(u=>qe(Ct(u),n)<this.r),o=s.map(u=>j(u)),l=a.filter(u=>{const{source:c,target:d}=u,h=o.includes(c),f=o.includes(d);switch(this.options.nodeType){case"both":return h&&f;case"either":return h!==f;case"source":return h&&!f;case"target":return!h&&f;default:return!1}});return{nodes:s,edges:l}},this.renderFocusElements=()=>{const{element:n,graph:i}=this.context;if(!this.isLensOn)return;const a=this.lens.getCenter(),{nodes:s,edges:o}=this.getFocusElements(a),l=new Set,u=c=>{const d=j(c);l.add(d);const h=n.getElement(d);if(!h)return;const f=this.shapes.get(d)||h.cloneNode();f.setPosition(h.getPosition()),f.id=h.id,this.shapes.has(d)?Object.entries(h.attributes).forEach(([p,m])=>{f.style[p]!==m&&(f.style[p]=m)}):(this.canvas.appendChild(f),this.shapes.set(d,f));const v=i.getElementType(d),g=this.getElementStyle(v,c);f.update(g)};s.forEach(u),o.forEach(u),this.shapes.forEach((c,d)=>{l.has(d)||(c.destroy(),this.shapes.delete(d))})},this.scaleRByWheel=n=>{var i;this.options.preventDefault&&n.preventDefault();const{clientX:a,clientY:s,deltaX:o,deltaY:l}=n,{graph:u,canvas:c}=this.context,d=u.getCanvasByClient([a,s]),h=(i=this.lens)===null||i===void 0?void 0:i.getCenter();if(!this.isLensOn||qe(d,h)>this.r)return;const{maxR:f,minR:v}=this.options,g=o+l>0?1/(1-by):1-by,p=Math.min(...c.getSize())/2;this.r=Math.max(v||0,Math.min(f||p,this.r*g)),this.renderLens(h),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=n=>{var i;const a=Ot(n.canvas),s=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||qe(a,s)>this.r||(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Ot(n.canvas);this.renderLens(i),this.renderFocusElements()},this.onDragEnd=()=>{this.isLensDragging=!1},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}getElementStyle(t,e){const n=t==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof n=="function"?n(e):n}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.addEventListener(V.CLICK,this.onEdgeFilter),n==="pointermove"?a.addEventListener(V.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.addEventListener(V.DRAG_START,this.onDragStart),a.addEventListener(V.DRAG,this.onDrag),a.addEventListener(V.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.addEventListener(V.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.removeEventListener(V.CLICK,this.onEdgeFilter),n==="pointermove"?a.removeEventListener(V.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.removeEventListener(V.DRAG_START,this.onDragStart),a.removeEventListener(V.DRAG,this.onDrag),a.removeEventListener(V.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.removeEventListener(V.WHEEL,this.scaleRByWheel))}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((t,e)=>{t.destroy(),this.shapes.delete(e)}),super.destroy()}}Lu.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const eN={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},xy=.05,Ey=.1;class Du extends Pt{constructor(t,e){super(t,Object.assign({},Du.defaultOptions,e)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Ot(n.canvas);this.onMagnify(i)},this.onMagnify=n=>{n.some(isNaN)||(this.renderLens(n),this.renderFocusElements())},this.renderLens=n=>{const i=Object.assign({},eN,this.options.style);this.isLensOn||(this.lens=new Wi({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Kn(n),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(i)},this.getDPercent=()=>{const{minD:n,maxD:i}=this.options;return`${Math.round((this.d-n)/(i-n)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:n}=this.context,i=this.lens.getCenter(),a=(this.d+1)*this.r,s=new Map,o=new Map;n.getNodeData().forEach(u=>{const c=Ct(u),d=qe(c,i);if(d>this.r)return;const h=a*d/(this.d*d+this.r),[f,v]=c,[g,p]=i,m=(f-g)/d,y=(v-p)/d,b=[g+h*m,p+h*y],_=j(u),w=this.getNodeStyle(u),x=(0,Vi.Z)(n.getElementRenderStyle(_),Object.keys(w));s.set(_,Object.assign(Object.assign({},Kn(b)),w)),o.set(_,Object.assign(Object.assign({},Kn(c)),x))}),this.updateStyle(s,o)},this.getNodeStyle=n=>{const{nodeStyle:i}=this.options;return typeof i=="function"?i(n):i},this.updateStyle=(n,i)=>{const{graph:a,element:s}=this.context,{enter:o,exit:l,keep:u}=si(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(n.keys()),h=>h),c=new Set,d=(h,f)=>{const v=s.getElement(h);v==null||v.update(f),a.getRelatedEdgesData(h).forEach(g=>{c.add(j(g))})};[...o,...u].forEach(h=>{d(h,n.get(h))}),l.forEach(h=>{d(h,this.prevOriginStyleMap.get(h)),this.prevOriginStyleMap.delete(h)}),c.forEach(h=>{const f=s.getElement(h);f==null||f.update({})}),this.prevMagnifiedStyleMap=n,i.forEach((h,f)=>{this.prevOriginStyleMap.has(f)||this.prevOriginStyleMap.set(f,h)})},this.isWheelValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const{clientX:i,clientY:a}=n,s=this.context.graph.getCanvasByClient([i,a]),o=this.lens.getCenter();return!(qe(s,o)>this.r)},this.scaleR=n=>{const{maxR:i,minR:a}=this.options,s=n?1/(1-xy):1-xy,o=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(a||0,Math.min(i||o,this.r*s))},this.scaleD=n=>{const{maxD:i,minD:a}=this.options,s=n?this.d+Ey:this.d-Ey;this.d=Math.max(a,Math.min(i,s))},this.scaleRByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleR(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleD(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.isDragValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const i=Ot(n.canvas),a=this.lens.getCenter();return!(qe(i,a)>this.r)},this.isLensDragging=!1,this.onDragStart=n=>{this.isDragValid(n)&&(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Ot(n.canvas);this.onMagnify(i)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleR(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleD(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,s=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&s.addEventListener(V.CLICK,this.onCreateFisheye),n==="pointermove"&&s.addEventListener(V.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){s.addEventListener(V.DRAG_START,this.onDragStart),s.addEventListener(V.DRAG_END,this.onDragEnd);const o=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.addEventListener(V.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.addEventListener(V.WHEEL,o,{passive:!1})}}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,s=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&s.removeEventListener(V.CLICK,this.onCreateFisheye),n==="pointermove"&&s.removeEventListener(V.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){s.removeEventListener(V.DRAG_START,this.onDragStart),s.removeEventListener(V.DRAG_END,this.onDragEnd);const o=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.removeEventListener(V.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.removeEventListener(V.WHEEL,o)}}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){var t;this.unbindEvents(),this.isLensOn&&((t=this.lens)===null||t===void 0||t.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}Du.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class Iu extends Pt{constructor(t,e){super(t,Object.assign({},Iu.defaultOptions,e)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var n,i,a,s;const o=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(o),o?(i=(n=this.options).onEnter)===null||i===void 0||i.call(n):(s=(a=this.options).onExit)===null||s===void 0||s.call(a)},this.shortcut=new Ma(t.graph),this.bindEvents(),this.style=document.createElement("style"),document.head.appendChild(this.style),this.style.innerHTML=`
|
|
:not(:root):fullscreen::backdrop {
|
|
background: transparent;
|
|
}
|
|
`}bindEvents(){this.unbindEvents(),this.shortcut.unbindAll();const{request:t=[],exit:e=[]}=this.options.trigger;this.shortcut.bind(t,this.request),this.shortcut.bind(e,this.exit),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(i=>{document.addEventListener(i,this.onFullscreenChange,!1)})}unbindEvents(){this.shortcut.unbindAll(),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(e=>{document.removeEventListener(e,this.onFullscreenChange,!1)})}setGraphSize(t=!0){var e,n;let i,a;t?(i=((e=globalThis.screen)===null||e===void 0?void 0:e.width)||0,a=((n=globalThis.screen)===null||n===void 0?void 0:n.height)||0,this.graphSize=this.context.graph.getSize()):[i,a]=this.graphSize,this.context.graph.setSize(i,a),this.context.graph.render()}request(){document.fullscreenElement||!tN()||this.$el.requestFullscreen().catch(t=>{en.warn(`Error attempting to enable full-screen: ${t.message} (${t.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}Iu.defaultOptions={trigger:{},autoFit:!0};function tN(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}class Bu extends Pt{constructor(t,e){super(t,Object.assign({},Bu.defaultOptions,e)),this.$element=Za("grid-line",!0),this.offset=[0,0],this.onTransform=i=>{if(!this.options.follow)return;const{data:{translate:a}}=i;a&&this.updateOffset(a)},this.context.canvas.getContainer().prepend(this.$element),this.updateStyle(),this.bindEvents()}update(t){super.update(t),this.updateStyle()}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{size:t,stroke:e,lineWidth:n,border:i,borderLineWidth:a,borderStroke:s,borderStyle:o}=this.options;Object.assign(this.$element.style,{border:i?`${a}px ${o} ${s}`:"none",backgroundImage:`linear-gradient(${e} ${n}px, transparent ${n}px), linear-gradient(90deg, ${e} ${n}px, transparent ${n}px)`,backgroundSize:`${t}px ${t}px`})}updateOffset(t){this.offset=zS(Ee(this.offset,t),this.options.size),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}destroy(){this.context.graph.off(Q.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}Bu.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};var of=Y(90494);function lf(r){const t={Added:new Map,Updated:new Map,Removed:new Map};return r.forEach(e=>{const{type:n,value:i}=e,a=j(i);if(n==="NodeAdded"||n==="EdgeAdded"||n==="ComboAdded")t.Added.set(a,e);else if(n==="NodeUpdated"||n==="EdgeUpdated"||n==="ComboUpdated")if(t.Added.has(a))t.Added.set(a,{type:n.replace("Updated","Added"),value:i});else if(t.Updated.has(a)){const{original:s}=t.Updated.get(a);t.Updated.set(a,{type:n,value:i,original:s})}else t.Removed.has(a)||t.Updated.set(a,e);else(n==="NodeRemoved"||n==="EdgeRemoved"||n==="ComboRemoved")&&(t.Added.has(a)?t.Added.delete(a):(t.Updated.has(a)&&t.Updated.delete(a),t.Removed.set(a,e)))}),[...Array.from(t.Added.values()),...Array.from(t.Updated.values()),...Array.from(t.Removed.values())]}function wy(r){const{NodeAdded:t=[],NodeUpdated:e=[],NodeRemoved:n=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:s=[],ComboAdded:o=[],ComboUpdated:l=[],ComboRemoved:u=[]}=(0,Sl.Z)(r,c=>c.type);return{add:{nodes:t,edges:i,combos:o},update:{nodes:e,edges:a,combos:l},remove:{nodes:n,edges:s,combos:u}}}function ky(r,t){for(const e in r)(0,yt.Z)(r[e])&&!Array.isArray(r[e])&&r[e]!==null?(t[e]||(t[e]={}),ky(r[e],t[e])):t[e]===void 0&&(t[e]=As(e))}function nN(r,t=!1,e){const n={animation:t,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:s}=wy(lf(r));return["nodes","edges","combos"].forEach(o=>{a[o]&&a[o].forEach(l=>{var u,c;const d=Object.assign({},l.value);let h=Object.assign({},l.original);if(e){const f=e.graph.getElementType(j(l.original)),v=f==="edge"?"stroke":"fill",g=e.element.getElementComputedStyle(f,l.original);h=Object.assign(Object.assign({},l.original),{style:Object.assign({[v]:g[v]},l.original.style)})}ky(d,h),(u=n.current.update)[o]||(u[o]=[]),n.current.update[o].push(d),(c=n.original.update)[o]||(c[o]=[]),n.original.update[o].push(h)}),i[o]&&i[o].forEach(l=>{var u,c;const d=Object.assign({},l.value);(u=n.current.add)[o]||(u[o]=[]),n.current.add[o].push(d),(c=n.original.remove)[o]||(c[o]=[]),n.original.remove[o].push(d)}),s[o]&&s[o].forEach(l=>{var u,c;const d=Object.assign({},l.value);(u=n.current.remove)[o]||(u[o]=[]),n.current.remove[o].push(d),(c=n.original.add)[o]||(c[o]=[]),n.original.add[o].push(d)})}),n}class Fu extends Pt{constructor(t,e){super(t,Object.assign({},Fu.defaultOptions,e)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(i,a=!0)=>{var s,o,l;this.freezed=!0,(o=(s=this.options).executeCommand)===null||o===void 0||o.call(s,i);const u=a?i.original:i.current;this.context.graph.addData(u.add),this.context.graph.updateData(u.update),this.context.graph.removeData(Pp(u.remove,!1)),(l=this.context.element)===null||l===void 0||l.draw({silence:!0,animation:i.animation}),this.freezed=!1},this.addCommand=i=>{var a;if(!this.freezed){if(i.type===Q.AFTER_DRAW){const{dataChanges:s=[],animation:o=!0}=i.data;if(!((a=this.context.batch)===null||a===void 0)&&a.isBatching){if(!this.batchChanges)return;this.batchChanges.push(s),this.batchAnimation&&(this.batchAnimation=o);return}this.batchChanges=[s],this.batchAnimation=o}this.undoStackPush(nN(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(ni.ADD,this.undoStack[this.undoStack.length-1])}},this.initBatchCommand=i=>{const{initiate:a}=i.data;this.batchAnimation=!1,a?this.batchChanges=[]:this.undoStack.pop()||(this.batchChanges=null)},this.emitter=new of.Z;const{graph:n}=this.context;n.on(Q.AFTER_DRAW,this.addCommand),n.on(Q.BATCH_START,this.initBatchCommand),n.on(Q.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var t,e,n,i;const a=this.undoStack.pop();if(a){if(this.executeCommand(a),((e=(t=this.options).beforeAddCommand)===null||e===void 0?void 0:e.call(t,a,!1))===!1)return;this.redoStack.push(a),(i=(n=this.options).afterAddCommand)===null||i===void 0||i.call(n,a,!1),this.notify(ni.UNDO,a)}return this}redo(){const t=this.redoStack.pop();return t&&(this.executeCommand(t,!1),this.undoStackPush(t),this.notify(ni.REDO,t)),this}undoAndCancel(){const t=this.undoStack.pop();return t&&(this.executeCommand(t,!1),this.redoStack=[],this.notify(ni.CANCEL,t)),this}undoStackPush(t){var e,n,i,a;const{stackSize:s}=this.options;s!==0&&this.undoStack.length>=s&&this.undoStack.shift(),((n=(e=this.options).beforeAddCommand)===null||n===void 0?void 0:n.call(e,t,!0))!==!1&&(this.undoStack.push(t),(a=(i=this.options).afterAddCommand)===null||a===void 0||a.call(i,t,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(ni.CLEAR,null)}notify(t,e){this.emitter.emit(t,{cmd:e}),this.emitter.emit(ni.CHANGE,{cmd:e})}on(t,e){this.emitter.on(t,e)}destroy(){const{graph:t}=this.context;t.off(Q.AFTER_DRAW,this.addCommand),t.off(Q.BATCH_START,this.initBatchCommand),t.off(Q.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}Fu.defaultOptions={stackSize:0};var rN=Y(1344),iN=Y.n(rN);function aN(r,t,e){if(r.length===1)return sN(r[0],t,e);if(r.length===2)return oN(r,t,e);switch(e){case"smooth":return uN(r,t);case"sharp":return cN(r,t);case"rounded":default:return lN(r,t)}}const sN=(r,t,e)=>{if(e==="sharp")return[["M",r[0]-t,r[1]-t],["L",r[0]+t,r[1]-t],["L",r[0]+t,r[1]+t],["L",r[0]-t,r[1]+t],["Z"]];const n=[t,t,0,0,0];return[["M",r[0],r[1]-t],["A",...n,r[0],r[1]+t],["A",...n,r[0],r[1]-t]]},oN=(r,t,e)=>{const n=[t,t,0,0,0],i=e==="sharp"?Ee(r[0],oi(Ir(He(r[0],r[1])),t)):r[0],a=e==="sharp"?Ee(r[1],oi(Ir(He(r[1],r[0])),t)):r[1],s=oi(Ir(Pl(He(i,a),!1)),t),o=oi(s,-1),l=Ee(i,s),u=Ee(a,s),c=Ee(a,o),d=Ee(i,o);return e==="sharp"?[["M",l[0],l[1]],["L",u[0],u[1]],["L",c[0],c[1]],["L",d[0],d[1]],["Z"]]:[["M",l[0],l[1]],["L",u[0],u[1]],["A",...n,c[0],c[1]],["L",d[0],d[1]],["A",...n,l[0],l[1]]]},lN=(r,t)=>{const e=Wp(r).map((o,l)=>{const u=(l-2+r.length)%r.length,c=(l-1+r.length)%r.length,d=(l+1)%r.length,h=r[u],f=r[c],v=r[d],g=He(h,f),p=He(f,o),m=He(o,v),y=(E,k)=>th(E,k,!0)<Math.PI,b=y(g,p),_=y(p,m),w=E=>oi(Ir(Pl(E,!1)),t),x=w(p);return[{p:zi(b?Ee(f,w(g)):Ee(f,x)),concave:b&&f},{p:zi(_?Ee(o,w(m)):Ee(o,x)),concave:_&&o}]}),n=[t,t,0,0,0],i=e.findIndex((o,l)=>!e[(l-1+e.length)%e.length][0].concave&&!e[(l-1+e.length)%e.length][1].concave&&!o[0].concave&&!o[0].concave&&!o[1].concave),a=e.slice(i).concat(e.slice(0,i));let s=[];return a.flatMap((o,l)=>{const u=[],c=a[e.length-1];return l===0&&u.push(["M",...c[1].p]),o[0].concave?s.push(o[0].p,o[1].p):u.push(["A",...n,...o[0].p]),o[1].concave?s.unshift(o[1].p):u.push(["L",...o[1].p]),s.length===3&&(u.pop(),u.push(["C",...s.flat()]),s=[]),u})},uN=(r,t)=>{const e=Wp(r).map((n,i)=>{const a=r[(i+1)%r.length];return{p:n,v:Ir(He(a,n))}});return e.forEach((n,i)=>{const a=i>0?i-1:r.length-1,s=e[a].v,o=Ir(Ee(s,oi(n.v,th(s,n.v,!0)<Math.PI?1:-1)));n.p=Ee(n.p,oi(o,t))}),t0(e.map(n=>n.p))},cN=(r,t)=>{const n=r.map((a,s)=>{const o=r[s===0?r.length-1:s-1],l=Ns(oi(Ir(Pl(He(o,a),!1)),t));return[Ee(o,l),Ee(a,l)]}).flat();return n.map((a,s)=>{if(s%2===0)return null;const o=[n[(s-1)%n.length],n[s%n.length]],l=[n[(s+1)%n.length],n[(s+2)%n.length]];return nh(o,l,!0)}).filter(Boolean).map((a,s)=>[s===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var dN=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class zu extends Pt{constructor(t,e){super(t,Object.assign({},zu.defaultOptions,e)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new Bs({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const n=!(0,gt.Z)(this.optionsCache,this.options);this.shape.update(this.getHullStyle(n))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=n=>{this.shape&&this.options.members.includes(j(n.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(n=!1)=>{const{graph:i}=this.context,a=this.getMember();if(a.length===0)return"";const s=a.map(u=>i.getNodeData(u)),o=iN()(s.map(Ct),this.options.concavity).slice(1).reverse(),l=o.flatMap(u=>s.filter(c=>(0,gt.Z)(Ct(c),u)).map(j));return(0,gt.Z)(l,this.hullMemberIds)&&!n?this.path:(this.hullMemberIds=l,this.path=aN(o,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(Q.AFTER_RENDER,this.drawHull),this.context.graph.on(Q.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(t){const e=this.options,{members:n,padding:i,corner:a}=e,s=dN(e,["members","padding","corner"]);return Object.assign(Object.assign({},s),{d:this.getHullPath(t)})}getPadding(){const{graph:t}=this.context;return this.hullMemberIds.reduce((n,i)=>{const{halfExtents:a}=t.getElementRenderBounds(i),s=Math.max(a[0],a[1]);return Math.max(n,s)},0)+this.options.padding}addMember(t){const e=Array.isArray(t)?t:[t];this.options.members=[...new Set([...this.options.members,...e])],this.shape.update({d:this.getHullPath()})}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),e.some(n=>this.hullMemberIds.includes(n))&&this.shape.update({d:this.getHullPath()})}updateMember(t){this.options.members=(0,de.Z)(t)?t(this.options.members):t,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.context.graph.off(Q.AFTER_DRAW,this.drawHull),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}zu.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};var A=Y(97582);function Ae(r,t,e){return(t=np(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function _y(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function dt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(e),!0).forEach(function(n){Ae(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):_y(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function hN(r,t){for(;!{}.hasOwnProperty.call(r,t)&&(r=Ca(r))!==null;);return r}function uf(){return uf=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,t,e){var n=hN(r,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?r:e):i.value}},uf.apply(null,arguments)}function Sy(r,t,e,n){var i=uf(Ca(1&n?r.prototype:r),t,e);return 2&n&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function cf(r,t,e){r.prototype=t.prototype=e,e.constructor=r}function Ty(r,t){var e=Object.create(r.prototype);for(var n in t)e[n]=t[n];return e}function $s(){}var qs=.7,Gu=1/qs,Ha="\\s*([+-]?\\d+)\\s*",Js="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fN=/^#([0-9a-f]{3,8})$/,vN=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),gN=new RegExp(`^rgb\\(${kr},${kr},${kr}\\)$`),pN=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${Js}\\)$`),mN=new RegExp(`^rgba\\(${kr},${kr},${kr},${Js}\\)$`),yN=new RegExp(`^hsl\\(${Js},${kr},${kr}\\)$`),bN=new RegExp(`^hsla\\(${Js},${kr},${kr},${Js}\\)$`),Ay={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};cf($s,ju,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Cy,formatHex:Cy,formatHex8:xN,formatHsl:EN,formatRgb:Oy,toString:Oy});function Cy(){return this.rgb().formatHex()}function xN(){return this.rgb().formatHex8()}function EN(){return Ly(this).formatHsl()}function Oy(){return this.rgb().formatRgb()}function ju(r){var t,e;return r=(r+"").trim().toLowerCase(),(t=fN.exec(r))?(e=t[1].length,t=parseInt(t[1],16),e===6?Py(t):e===3?new nn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?Wu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?Wu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=vN.exec(r))?new nn(t[1],t[2],t[3],1):(t=gN.exec(r))?new nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pN.exec(r))?Wu(t[1],t[2],t[3],t[4]):(t=mN.exec(r))?Wu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yN.exec(r))?Ry(t[1],t[2]/100,t[3]/100,1):(t=bN.exec(r))?Ry(t[1],t[2]/100,t[3]/100,t[4]):Ay.hasOwnProperty(r)?Py(Ay[r]):r==="transparent"?new nn(NaN,NaN,NaN,0):null}function Py(r){return new nn(r>>16&255,r>>8&255,r&255,1)}function Wu(r,t,e,n){return n<=0&&(r=t=e=NaN),new nn(r,t,e,n)}function wN(r){return r instanceof $s||(r=ju(r)),r?(r=r.rgb(),new nn(r.r,r.g,r.b,r.opacity)):new nn}function kN(r,t,e,n){return arguments.length===1?wN(r):new nn(r,t,e,n==null?1:n)}function nn(r,t,e,n){this.r=+r,this.g=+t,this.b=+e,this.opacity=+n}cf(nn,kN,Ty($s,{brighter(r){return r=r==null?Gu:Math.pow(Gu,r),new nn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?qs:Math.pow(qs,r),new nn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new nn(Ki(this.r),Ki(this.g),Ki(this.b),Zu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ny,formatHex:Ny,formatHex8:_N,formatRgb:My,toString:My}));function Ny(){return`#${$i(this.r)}${$i(this.g)}${$i(this.b)}`}function _N(){return`#${$i(this.r)}${$i(this.g)}${$i(this.b)}${$i((isNaN(this.opacity)?1:this.opacity)*255)}`}function My(){const r=Zu(this.opacity);return`${r===1?"rgb(":"rgba("}${Ki(this.r)}, ${Ki(this.g)}, ${Ki(this.b)}${r===1?")":`, ${r})`}`}function Zu(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Ki(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function $i(r){return r=Ki(r),(r<16?"0":"")+r.toString(16)}function Ry(r,t,e,n){return n<=0?r=t=e=NaN:e<=0||e>=1?r=t=NaN:t<=0&&(r=NaN),new Jn(r,t,e,n)}function Ly(r){if(r instanceof Jn)return new Jn(r.h,r.s,r.l,r.opacity);if(r instanceof $s||(r=ju(r)),!r)return new Jn;if(r instanceof Jn)return r;r=r.rgb();var t=r.r/255,e=r.g/255,n=r.b/255,i=Math.min(t,e,n),a=Math.max(t,e,n),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(e-n)/o+(e<n)*6:e===a?s=(n-t)/o+2:s=(t-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Jn(s,o,l,r.opacity)}function SN(r,t,e,n){return arguments.length===1?Ly(r):new Jn(r,t,e,n==null?1:n)}function Jn(r,t,e,n){this.h=+r,this.s=+t,this.l=+e,this.opacity=+n}cf(Jn,SN,Ty($s,{brighter(r){return r=r==null?Gu:Math.pow(Gu,r),new Jn(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?qs:Math.pow(qs,r),new Jn(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,t=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,n=e+(e<.5?e:1-e)*t,i=2*e-n;return new nn(df(r>=240?r-240:r+120,i,n),df(r,i,n),df(r<120?r+240:r-120,i,n),this.opacity)},clamp(){return new Jn(Dy(this.h),Vu(this.s),Vu(this.l),Zu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=Zu(this.opacity);return`${r===1?"hsl(":"hsla("}${Dy(this.h)}, ${Vu(this.s)*100}%, ${Vu(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Dy(r){return r=(r||0)%360,r<0?r+360:r}function Vu(r){return Math.max(0,Math.min(1,r||0))}function df(r,t,e){return(r<60?t+(e-t)*r/60:r<180?e:r<240?t+(e-t)*(240-r)/60:t)*255}function Ua(r,t){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=Wd(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function TN(r,t){if(r==null)return{};var e={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(t.includes(n))continue;e[n]=r[n]}return e}function qi(r,t){if(r==null)return{};var e,n,i=TN(r,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)e=a[n],t.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var AN=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:typeof self!="undefined"?self:{},Iy={exports:{}};(function(r,t){(function(e,n){r.exports=n()})(AN,function(){function e(w,x,E,k,O){n(w,x,E||0,k||w.length-1,O||a)}function n(w,x,E,k,O){for(;k>E;){if(k-E>600){var P=k-E+1,M=x-E+1,L=Math.log(P),D=.5*Math.exp(2*L/3),z=.5*Math.sqrt(L*D*(P-D)/P)*(M-P/2<0?-1:1),F=Math.max(E,Math.floor(x-M*D/P+z)),C=Math.min(k,Math.floor(x+(P-M)*D/P+z));n(w,x,F,C,O)}var S=w[x],T=E,N=k;for(i(w,E,x),O(w[k],S)>0&&i(w,E,k);T<N;){for(i(w,T,N),T++,N--;O(w[T],S)<0;)T++;for(;O(w[N],S)>0;)N--}O(w[E],S)===0?i(w,E,N):(N++,i(w,N,k)),N<=x&&(E=N+1),x<=N&&(k=N-1)}}function i(w,x,E){var k=w[x];w[x]=w[E],w[E]=k}function a(w,x){return w<x?-1:w>x?1:0}var s=function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(x){var E=this.data,k=[];if(!y(x,E))return k;for(var O=this.toBBox,P=[];E;){for(var M=0;M<E.children.length;M++){var L=E.children[M],D=E.leaf?O(L):L;y(x,D)&&(E.leaf?k.push(L):m(x,D)?this._all(L,k):P.push(L))}E=P.pop()}return k},s.prototype.collides=function(x){var E=this.data;if(!y(x,E))return!1;for(var k=[];E;){for(var O=0;O<E.children.length;O++){var P=E.children[O],M=E.leaf?this.toBBox(P):P;if(y(x,M)){if(E.leaf||m(x,M))return!0;k.push(P)}}E=k.pop()}return!1},s.prototype.load=function(x){if(!(x&&x.length))return this;if(x.length<this._minEntries){for(var E=0;E<x.length;E++)this.insert(x[E]);return this}var k=this._build(x.slice(),0,x.length-1,0);if(!this.data.children.length)this.data=k;else if(this.data.height===k.height)this._splitRoot(this.data,k);else{if(this.data.height<k.height){var O=this.data;this.data=k,k=O}this._insert(k,this.data.height-k.height-1,!0)}return this},s.prototype.insert=function(x){return x&&this._insert(x,this.data.height-1),this},s.prototype.clear=function(){return this.data=b([]),this},s.prototype.remove=function(x,E){if(!x)return this;for(var k=this.data,O=this.toBBox(x),P=[],M=[],L,D,z;k||P.length;){if(k||(k=P.pop(),D=P[P.length-1],L=M.pop(),z=!0),k.leaf){var F=o(x,k.children,E);if(F!==-1)return k.children.splice(F,1),P.push(k),this._condense(P),this}!z&&!k.leaf&&m(k,O)?(P.push(k),M.push(L),L=0,D=k,k=k.children[0]):D?(L++,k=D.children[L],z=!1):k=null}return this},s.prototype.toBBox=function(x){return x},s.prototype.compareMinX=function(x,E){return x.minX-E.minX},s.prototype.compareMinY=function(x,E){return x.minY-E.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(x){return this.data=x,this},s.prototype._all=function(x,E){for(var k=[];x;)x.leaf?E.push.apply(E,x.children):k.push.apply(k,x.children),x=k.pop();return E},s.prototype._build=function(x,E,k,O){var P=k-E+1,M=this._maxEntries,L;if(P<=M)return L=b(x.slice(E,k+1)),l(L,this.toBBox),L;O||(O=Math.ceil(Math.log(P)/Math.log(M)),M=Math.ceil(P/Math.pow(M,O-1))),L=b([]),L.leaf=!1,L.height=O;var D=Math.ceil(P/M),z=D*Math.ceil(Math.sqrt(M));_(x,E,k,z,this.compareMinX);for(var F=E;F<=k;F+=z){var C=Math.min(F+z-1,k);_(x,F,C,D,this.compareMinY);for(var S=F;S<=C;S+=D){var T=Math.min(S+D-1,C);L.children.push(this._build(x,S,T,O-1))}}return l(L,this.toBBox),L},s.prototype._chooseSubtree=function(x,E,k,O){for(;O.push(E),!(E.leaf||O.length-1===k);){for(var P=1/0,M=1/0,L=void 0,D=0;D<E.children.length;D++){var z=E.children[D],F=f(z),C=g(x,z)-F;C<M?(M=C,P=F<P?F:P,L=z):C===M&&F<P&&(P=F,L=z)}E=L||E.children[0]}return E},s.prototype._insert=function(x,E,k){var O=k?x:this.toBBox(x),P=[],M=this._chooseSubtree(O,this.data,E,P);for(M.children.push(x),c(M,O);E>=0&&P[E].children.length>this._maxEntries;)this._split(P,E),E--;this._adjustParentBBoxes(O,P,E)},s.prototype._split=function(x,E){var k=x[E],O=k.children.length,P=this._minEntries;this._chooseSplitAxis(k,P,O);var M=this._chooseSplitIndex(k,P,O),L=b(k.children.splice(M,k.children.length-M));L.height=k.height,L.leaf=k.leaf,l(k,this.toBBox),l(L,this.toBBox),E?x[E-1].children.push(L):this._splitRoot(k,L)},s.prototype._splitRoot=function(x,E){this.data=b([x,E]),this.data.height=x.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(x,E,k){for(var O,P=1/0,M=1/0,L=E;L<=k-E;L++){var D=u(x,0,L,this.toBBox),z=u(x,L,k,this.toBBox),F=p(D,z),C=f(D)+f(z);F<P?(P=F,O=L,M=C<M?C:M):F===P&&C<M&&(M=C,O=L)}return O||k-E},s.prototype._chooseSplitAxis=function(x,E,k){var O=x.leaf?this.compareMinX:d,P=x.leaf?this.compareMinY:h,M=this._allDistMargin(x,E,k,O),L=this._allDistMargin(x,E,k,P);M<L&&x.children.sort(O)},s.prototype._allDistMargin=function(x,E,k,O){x.children.sort(O);for(var P=this.toBBox,M=u(x,0,E,P),L=u(x,k-E,k,P),D=v(M)+v(L),z=E;z<k-E;z++){var F=x.children[z];c(M,x.leaf?P(F):F),D+=v(M)}for(var C=k-E-1;C>=E;C--){var S=x.children[C];c(L,x.leaf?P(S):S),D+=v(L)}return D},s.prototype._adjustParentBBoxes=function(x,E,k){for(var O=k;O>=0;O--)c(E[O],x)},s.prototype._condense=function(x){for(var E=x.length-1,k=void 0;E>=0;E--)x[E].children.length===0?E>0?(k=x[E-1].children,k.splice(k.indexOf(x[E]),1)):this.clear():l(x[E],this.toBBox)};function o(w,x,E){if(!E)return x.indexOf(w);for(var k=0;k<x.length;k++)if(E(w,x[k]))return k;return-1}function l(w,x){u(w,0,w.children.length,x,w)}function u(w,x,E,k,O){O||(O=b(null)),O.minX=1/0,O.minY=1/0,O.maxX=-1/0,O.maxY=-1/0;for(var P=x;P<E;P++){var M=w.children[P];c(O,w.leaf?k(M):M)}return O}function c(w,x){return w.minX=Math.min(w.minX,x.minX),w.minY=Math.min(w.minY,x.minY),w.maxX=Math.max(w.maxX,x.maxX),w.maxY=Math.max(w.maxY,x.maxY),w}function d(w,x){return w.minX-x.minX}function h(w,x){return w.minY-x.minY}function f(w){return(w.maxX-w.minX)*(w.maxY-w.minY)}function v(w){return w.maxX-w.minX+(w.maxY-w.minY)}function g(w,x){return(Math.max(x.maxX,w.maxX)-Math.min(x.minX,w.minX))*(Math.max(x.maxY,w.maxY)-Math.min(x.minY,w.minY))}function p(w,x){var E=Math.max(w.minX,x.minX),k=Math.max(w.minY,x.minY),O=Math.min(w.maxX,x.maxX),P=Math.min(w.maxY,x.maxY);return Math.max(0,O-E)*Math.max(0,P-k)}function m(w,x){return w.minX<=x.minX&&w.minY<=x.minY&&x.maxX<=w.maxX&&x.maxY<=w.maxY}function y(w,x){return x.minX<=w.maxX&&x.minY<=w.maxY&&x.maxX>=w.minX&&x.maxY>=w.minY}function b(w){return{children:w,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(w,x,E,k,O){for(var P=[x,E];P.length;)if(E=P.pop(),x=P.pop(),!(E-x<=k)){var M=x+Math.ceil((E-x)/k/2)*k;e(w,M,x,E,O),P.push(x,M,M,E)}}return s})})(Iy);var jF=Iy.exports,ve=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),hf=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),WF=null,ZF=null,ff=R.IH,Ya=R.JG,CN=R.Fp,ON=R.VV,By=R.bA,vf=R.lu,rn=function(){function r(){q(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return J(r,[{key:"update",value:function(e,n){Ya(this.center,e),Ya(this.halfExtents,n),vf(this.min,this.center,this.halfExtents),ff(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,n){ff(this.center,n,e),By(this.center,this.center,.5),vf(this.halfExtents,n,e),By(this.halfExtents,this.halfExtents,.5),Ya(this.min,e),Ya(this.max,n)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,i=n[0],a=n[1],s=n[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,p=s+c,m=e.center,y=m[0],b=m[1],_=m[2],w=e.halfExtents,x=w[0],E=w[1],k=w[2],O=y-x,P=y+x,M=b-E,L=b+E,D=_-k,z=_+k;O<d&&(d=O),P>h&&(h=P),M<f&&(f=M),L>v&&(v=L),D<g&&(g=D),z>p&&(p=z),n[0]=(d+h)*.5,n[1]=(f+v)*.5,n[2]=(g+p)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(p-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=p}}},{key:"setFromTransformedAABB",value:function(e,n){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=n[0],u=n[4],c=n[8],d=n[1],h=n[5],f=n[9],v=n[2],g=n[6],p=n[10],m=Math.abs(l),y=Math.abs(u),b=Math.abs(c),_=Math.abs(d),w=Math.abs(h),x=Math.abs(f),E=Math.abs(v),k=Math.abs(g),O=Math.abs(p);i[0]=n[12]+l*s[0]+u*s[1]+c*s[2],i[1]=n[13]+d*s[0]+h*s[1]+f*s[2],i[2]=n[14]+v*s[0]+g*s[1]+p*s[2],a[0]=m*o[0]+y*o[1]+b*o[2],a[1]=_*o[0]+w*o[1]+x*o[2],a[2]=E*o[0]+k*o[1]+O*o[2],vf(this.min,i,a),ff(this.max,i,a)}},{key:"intersects",value:function(e){var n=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&n[0]>=s[0]&&i[1]<=a[1]&&n[1]>=s[1]&&i[2]<=a[2]&&n[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var n=new r,i=CN([0,0,0],this.getMin(),e.getMin()),a=ON([0,0,0],this.getMax(),e.getMax());return n.setMinMax(i,a),n}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?Ya([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?Ya([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),PN=function(){function r(t,e){q(this,r),this.distance=t||0,this.normal=e||R.al(0,1,0),this.updatePNVertexFlag()}return J(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return R.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/R.Zh(this.normal);R.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,n,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(n),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&R.t7(i,e,n,o),l}}])}(),VF=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),NN=function(){function r(t){if(q(this,r),this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new PN)}return J(r,[{key:"extractFromVPMatrix",value:function(e){var n=Re(e,16),i=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],c=n[6],d=n[7],h=n[8],f=n[9],v=n[10],g=n[11],p=n[12],m=n[13],y=n[14],b=n[15];R.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=b-p,R.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=b+p,R.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=b+m,R.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=b-m,R.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=b-y,R.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=b+y,this.planes.forEach(function(_){_.normalize(),_.updatePNVertexFlag()})}}])}(),Rn=function(){function r(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;q(this,r),this.x=0,this.y=0,this.x=t,this.y=e}return J(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),Xa=function(){function r(t,e,n,i){q(this,r),this.x=t,this.y=e,this.width=n,this.height=i,this.left=t,this.right=t+n,this.top=e,this.bottom=e+i}return J(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,n){var i=ge.al(e.x,e.y,0,1),a=ge.al(e.x+e.width,e.y,0,1),s=ge.al(e.x,e.y+e.height,0,1),o=ge.al(e.x+e.width,e.y+e.height,0,1),l=ge.Ue(),u=ge.Ue(),c=ge.Ue(),d=ge.Ue();ge.fF(l,i,n),ge.fF(u,a,n),ge.fF(c,s,n),ge.fF(d,o,n);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Ue="Method not implemented.",HF="Use document.documentElement instead.",MN="Cannot append a destroyed element.";function Ka(r){return r===void 0?0:r>360||r<-360?r%360:r}var gf=R.Ue();function Vt(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?n?R.d9(r):R.JG(gf,r):(0,oe.Z)(r)?n?R.al(r,t,e):R.t8(gf,r,t,e):n?R.al(r[0],r[1]||t,r[2]||e):R.t8(gf,r[0],r[1]||t,r[2]||e)}var RN=Math.PI/180;function Ge(r){return r*RN}var LN=180/Math.PI;function Ln(r){return r*LN}var DN=.9;function UF(r){return r%=400,r<0&&(r+=400),r*DN}function YF(r){return r/360}function IN(r){return 360*r}var Hu=Math.PI/2;function BN(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=e*e,o=n*n,l=i*i,u=a*a,c=s+o+l+u,d=e*a-n*i;return d>.499995*c?(r[0]=Hu,r[1]=2*Math.atan2(n,e),r[2]=0):d<-.499995*c?(r[0]=-Hu,r[1]=2*Math.atan2(n,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*n)),r[1]=Math.atan2(2*(e*a+n*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*n+i*a),1-2*(o+l))),r}function FN(r,t){var e,n,i=G.getScaling(R.Ue(),t),a=Re(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-t[2]/s);return u<Hu?u>-Hu?(e=Math.atan2(t[6]/o,t[10]/l),n=Math.atan2(t[1]/s,t[0]/s)):(n=0,e=-Math.atan2(t[4]/o,t[5]/o)):(n=0,e=Math.atan2(t[4]/o,t[5]/o)),r[0]=e,r[1]=u,r[2]=n,r}function pf(r,t){return t.length===16?FN(r,t):BN(r,t)}function zN(r,t,e,n,i){var a=Math.cos(r),s=Math.sin(r);return la.al(n*a,i*s,0,-n*s,i*a,0,t,e,1)}function GN(r,t,e,n,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-t,c=n-i,d=l/u,h=l/c,f=(e+t)/u,v=(n+i)/c,g,p,m=s-a,y=s*a;return o?(g=-s/m,p=-y/m):(g=-(s+a)/m,p=-2*y/m),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=p,r[15]=0,r}function Fy(r){var t=r[0],e=r[1],n=r[3],i=r[4],a=Math.sqrt(t*t+e*e),s=Math.sqrt(n*n+i*i),o=t*i-e*n;if(o<0&&(t<i?a=-a:s=-s),a){var l=1/a;t*=l,e*=l}if(s){var u=1/s;n*=u,i*=u}var c=Math.atan2(e,t),d=Ln(c);return[r[6],r[7],a,s,d]}var _r=G.create(),Qn=G.create(),Qs=ge.Ue(),me=[R.Ue(),R.Ue(),R.Ue()],zy=R.Ue();function jN(r,t,e,n,i,a){if(!WN(_r,r)||(G.copy(Qn,_r),Qn[3]=0,Qn[7]=0,Qn[11]=0,Qn[15]=1,Math.abs(G.determinant(Qn))<1e-8))return!1;var s=_r[3],o=_r[7],l=_r[11],u=_r[12],c=_r[13],d=_r[14],h=_r[15];if(s!==0||o!==0||l!==0){Qs[0]=s,Qs[1]=o,Qs[2]=l,Qs[3]=h;var f=G.invert(Qn,Qn);if(!f)return!1;G.transpose(Qn,Qn),ge.fF(i,Qs,Qn)}else i[0]=i[1]=i[2]=0,i[3]=1;if(t[0]=u,t[1]=c,t[2]=d,ZN(me,_r),e[0]=R.kE(me[0]),R.Fv(me[0],me[0]),n[0]=R.AK(me[0],me[1]),mf(me[1],me[1],me[0],1,-n[0]),e[1]=R.kE(me[1]),R.Fv(me[1],me[1]),n[0]/=e[1],n[1]=R.AK(me[0],me[2]),mf(me[2],me[2],me[0],1,-n[1]),n[2]=R.AK(me[1],me[2]),mf(me[2],me[2],me[1],1,-n[2]),e[2]=R.kE(me[2]),R.Fv(me[2],me[2]),n[1]/=e[2],n[2]/=e[2],R.kC(zy,me[1],me[2]),R.AK(me[0],zy)<0)for(var v=0;v<3;v++)e[v]*=-1,me[v][0]*=-1,me[v][1]*=-1,me[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+me[0][0]-me[1][1]-me[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-me[0][0]+me[1][1]-me[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-me[0][0]-me[1][1]+me[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+me[0][0]+me[1][1]+me[2][2],0)),me[2][1]>me[1][2]&&(a[0]=-a[0]),me[0][2]>me[2][0]&&(a[1]=-a[1]),me[1][0]>me[0][1]&&(a[2]=-a[2]),!0}function WN(r,t){var e=t[15];if(e===0)return!1;for(var n=1/e,i=0;i<16;i++)r[i]=t[i]*n;return!0}function ZN(r,t){r[0][0]=t[0],r[0][1]=t[1],r[0][2]=t[2],r[1][0]=t[4],r[1][1]=t[5],r[1][2]=t[6],r[2][0]=t[8],r[2][1]=t[9],r[2][2]=t[10]}function mf(r,t,e,n,i){r[0]=t[0]*n+e[0]*i,r[1]=t[1]*n+e[1]*i,r[2]=t[2]*n+e[2]*i}var Ye=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),Gy=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),er=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),VN={UPDATED:"updated"},jy=2e-4,Wy=function(){function r(){q(this,r),this.clipSpaceNearZ=hf.NEGATIVE_ONE,this.eventEmitter=new cr.Z,this.matrix=G.create(),this.right=R.al(1,0,0),this.up=R.al(0,1,0),this.forward=R.al(0,0,1),this.position=R.al(0,0,1),this.focalPoint=R.al(0,0,0),this.distanceVector=R.al(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=G.create(),this.projectionMatrixInverse=G.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Ye.EXPLORING,this.trackingMode=Gy.DEFAULT,this.projectionMode=er.PERSPECTIVE,this.frustum=new NN,this.orthoMatrix=G.create()}return J(r,[{key:"isOrtho",value:function(){return this.projectionMode===er.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,n){return this.type=e,this.type===Ye.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Ye.TRACKING&&n!==void 0&&this.setTrackingMode(n),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Ye.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return G.invert(G.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,n){var i=G.fromTranslation(G.create(),[e,n,0]);this.jitteredProjectionMatrix=G.multiply(G.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===er.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===er.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,n,i,a,s,o){return this.aspect=e/n,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===er.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===er.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===er.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===er.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,n){var i=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),u=l.x,c=l.y,d=R.al(u-a,c-s,0),h=R.AK(d,this.right)/R.kE(this.right),f=R.AK(d,this.up)/R.kE(this.up),v=this.getPosition(),g=Re(v,2),p=g[0],m=g[1],y=this.getFocalPoint(),b=Re(y,2),_=b[0],w=b[1];return this.setPosition(p-h,m-f),this.setFocalPoint(_-h,w-f),this}},{key:"setPerspective",value:function(e,n,i,a){var s;this.projectionMode=er.PERSPECTIVE,this.fov=i,this.near=e,this.far=n,this.aspect=a;var o=this.near*Math.tan(Ge(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return GN(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===hf.ZERO),G.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,n,i,a,s,o){var l;this.projectionMode=er.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,p=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var m=(this.rright-this.left)/this.view.fullWidth/this.zoom,y=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=m*this.view.offsetX,v=f+m*this.view.width,g-=y*this.view.offsetY,p=g-y*this.view.height}return this.clipSpaceNearZ===hf.NEGATIVE_ONE?G.ortho(this.projectionMatrix,f,v,g,p,s,o):G.orthoZO(this.projectionMatrix,f,v,g,p,s,o),G.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=Vt(e,n,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=R.al(0,1,0);if(this.focalPoint=Vt(e,n,i),this.trackingMode===Gy.CINEMATIC){var s=R.$X(R.Ue(),this.focalPoint,this.position);e=s[0],n=s[1],i=s[2];var o=R.kE(s),l=Ln(Math.asin(n/o)),u=90+Ln(Math.atan2(i,e)),c=G.create();G.rotateY(c,c,Ge(u)),G.rotateX(c,c,Ge(l)),a=R.fF(R.Ue(),[0,1,0],c)}return G.invert(this.matrix,G.lookAt(G.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<jy&&(this.distance=jy),this.dollyingStep=this.distance/100;var n=R.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return n[0]=e*i[0]+a[0],n[1]=e*i[1]+a[1],n[2]=e*i[2]+a[2],this._setPosition(n),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=Ka(e),this.computeMatrix(),this._getAxes(),this.type===Ye.ORBITING||this.type===Ye.EXPLORING?this._getPosition():this.type===Ye.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=Ka(e),this.computeMatrix(),this._getAxes(),this.type===Ye.ORBITING||this.type===Ye.EXPLORING?this._getPosition():this.type===Ye.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=Ka(e),this.computeMatrix(),this._getAxes(),this.type===Ye.ORBITING||this.type===Ye.EXPLORING?this._getPosition():this.type===Ye.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=K.yY(K.Ue(),[0,0,1],Ge(this.roll));G.identity(this.matrix);var n=K.yY(K.Ue(),[1,0,0],Ge((this.rotateWorld&&this.type!==Ye.TRACKING||this.type===Ye.TRACKING?1:-1)*this.elevation)),i=K.yY(K.Ue(),[0,1,0],Ge((this.rotateWorld&&this.type!==Ye.TRACKING||this.type===Ye.TRACKING?1:-1)*this.azimuth)),a=K.Jp(K.Ue(),i,n);a=K.Jp(K.Ue(),a,e);var s=G.fromQuat(G.create(),a);this.type===Ye.ORBITING||this.type===Ye.EXPLORING?(G.translate(this.matrix,this.matrix,this.focalPoint),G.multiply(this.matrix,this.matrix,s),G.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Ye.TRACKING&&(G.translate(this.matrix,this.matrix,this.position),G.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,n,i){this.position=Vt(e,n,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){R.JG(this.right,Vt(ge.fF(ge.Ue(),[1,0,0,0],this.matrix))),R.JG(this.up,Vt(ge.fF(ge.Ue(),[0,1,0,0],this.matrix))),R.JG(this.forward,Vt(ge.fF(ge.Ue(),[0,0,1,0],this.matrix))),R.Fv(this.right,this.right),R.Fv(this.up,this.up),R.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],n=this.distanceVector[1],i=this.distanceVector[2],a=R.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Ye.TRACKING?(this.elevation=Ln(Math.asin(n/a)),this.azimuth=Ln(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=Ln(Math.asin(n/a)),this.azimuth=Ln(Math.atan2(-e,-i))):(this.elevation=-Ln(Math.asin(n/a)),this.azimuth=-Ln(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){R.JG(this.position,Vt(ge.fF(ge.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){R.kK(this.distanceVector,[0,0,-this.distance],la.xO(la.Ue(),this.matrix)),R.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=R.$X(R.Ue(),this.focalPoint,this.position),this.distance=R.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===er.ORTHOGRAPHIC){var e=this.position,n=K.yY(K.Ue(),[0,0,1],-this.roll*Math.PI/180);G.fromRotationTranslationScaleOrigin(this.orthoMatrix,n,R.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),R.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),n=G.multiply(G.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(VN.UPDATED)}}},{key:"rotate",value:function(e,n,i){throw new Error(Ue)}},{key:"pan",value:function(e,n){throw new Error(Ue)}},{key:"dolly",value:function(e){throw new Error(Ue)}},{key:"createLandmark",value:function(e,n){throw new Error(Ue)}},{key:"gotoLandmark",value:function(e,n){throw new Error(Ue)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Ue)}}])}(),HN=function(r){return r[r.Standard=0]="Standard",r}({}),yf=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),Zy={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Xa(0,0,0,0)},ne=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function Ht(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=t?t.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(Ht.Cache||Map),e}Ht.Cache=Map;var ie=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),tr=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),UN=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),YN=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),XN=[{name:"em",unit_type:ie.kEms},{name:"px",unit_type:ie.kPixels},{name:"deg",unit_type:ie.kDegrees},{name:"rad",unit_type:ie.kRadians},{name:"grad",unit_type:ie.kGradians},{name:"ms",unit_type:ie.kMilliseconds},{name:"s",unit_type:ie.kSeconds},{name:"rem",unit_type:ie.kRems},{name:"turn",unit_type:ie.kTurns}],$a=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),KN=function(t){return XN.find(function(e){return e.name===t}).unit_type},$N=function(t){return t?t==="number"?ie.kNumber:t==="percent"||t==="%"?ie.kPercentage:KN(t):ie.kUnknown},qN=function(t){switch(t){case ie.kNumber:case ie.kInteger:return tr.kUNumber;case ie.kPercentage:return tr.kUPercent;case ie.kPixels:return tr.kULength;case ie.kMilliseconds:case ie.kSeconds:return tr.kUTime;case ie.kDegrees:case ie.kRadians:case ie.kGradians:case ie.kTurns:return tr.kUAngle;default:return tr.kUOther}},JN=function(t){switch(t){case tr.kUNumber:return ie.kNumber;case tr.kULength:return ie.kPixels;case tr.kUPercent:return ie.kPercentage;case tr.kUTime:return ie.kSeconds;case tr.kUAngle:return ie.kDegrees;default:return ie.kUnknown}},Vy=function(t){var e=1;switch(t){case ie.kPixels:case ie.kDegrees:case ie.kSeconds:break;case ie.kMilliseconds:e=.001;break;case ie.kRadians:e=180/Math.PI;break;case ie.kGradians:e=.9;break;case ie.kTurns:e=360;break}return e},bf=function(t){switch(t){case ie.kNumber:case ie.kInteger:return"";case ie.kPercentage:return"%";case ie.kEms:return"em";case ie.kRems:return"rem";case ie.kPixels:return"px";case ie.kDegrees:return"deg";case ie.kRadians:return"rad";case ie.kGradians:return"grad";case ie.kMilliseconds:return"ms";case ie.kSeconds:return"s";case ie.kTurns:return"turn"}return""},Uu=function(){function r(){q(this,r)}return J(r,[{key:"toString",value:function(){return this.buildCSSText(UN.kNo,YN.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=$a.kUnitType&&this.getType()<=$a.kClampType}}],[{key:"isAngle",value:function(e){return e===ie.kDegrees||e===ie.kRadians||e===ie.kGradians||e===ie.kTurns}},{key:"isLength",value:function(e){return e>=ie.kEms&&e<ie.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===ie.kPercentage||e===ie.kEms||e===ie.kRems}},{key:"isTime",value:function(e){return e===ie.kSeconds||e===ie.kMilliseconds}}])}(),QN=function(r){function t(e){var n;return q(this,t),n=Ce(this,t),n.colorSpace=e,n}return Oe(t,r),J(t,[{key:"getType",value:function(){return $a.kColorType}},{key:"to",value:function(n){return this}}])}(Uu),Yu=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),Xu=function(r){function t(e,n){var i;return q(this,t),i=Ce(this,t),i.type=e,i.value=n,i}return Oe(t,r),J(t,[{key:"clone",value:function(){return new t(this.type,this.value)}},{key:"buildCSSText",value:function(n,i,a){return a}},{key:"getType",value:function(){return $a.kColorType}}])}(Uu),Dn=function(r){function t(e){var n;return q(this,t),n=Ce(this,t),n.value=e,n}return Oe(t,r),J(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return $a.kKeywordType}},{key:"buildCSSText",value:function(n,i,a){return a+this.value}}])}(Uu),eM=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n="";return Number.isFinite(t)?n="NaN":t>0?n="infinity":n="-infinity",n+=e},xf=function(t){return JN(qN(t))},je=function(r){function t(e){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ie.kNumber;q(this,t),n=Ce(this,t);var a;return typeof i=="string"?a=$N(i):a=i,n.unit=a,n.value=e,n}return Oe(t,r),J(t,[{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"equals",value:function(n){var i=n;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return $a.kUnitType}},{key:"convertTo",value:function(n){if(this.unit===n)return new t(this.value,this.unit);var i=xf(this.unit);if(i!==xf(n)||i===ie.kUnknown)return null;var a=Vy(this.unit)/Vy(n);return new t(this.value*a,n)}},{key:"buildCSSText",value:function(n,i,a){var s;switch(this.unit){case ie.kUnknown:break;case ie.kInteger:s=Number(this.value).toFixed(0);break;case ie.kNumber:case ie.kPercentage:case ie.kEms:case ie.kRems:case ie.kPixels:case ie.kDegrees:case ie.kRadians:case ie.kGradians:case ie.kMilliseconds:case ie.kSeconds:case ie.kTurns:{var o=-999999,l=999999,u=this.value,c=bf(this.unit);if(u<o||u>l){var d=bf(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=eM(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(Uu),nr=new je(0,"px");new je(1,"px");var Ji=new je(0,"deg"),Ef=function(r){function t(e,n,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return q(this,t),a=Ce(this,t,["rgb"]),a.r=e,a.g=n,a.b=i,a.alpha=s,a.isNone=o,a}return Oe(t,r),J(t,[{key:"clone",value:function(){return new t(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(n,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(QN),Hy=new Dn("unset"),tM=new Dn("initial"),nM=new Dn("inherit"),wf={"":Hy,unset:Hy,initial:tM,inherit:nM},rM=function(t){return wf[t]||(wf[t]=new Dn(t)),wf[t]},Uy=new Ef(0,0,0,0,!0),Yy=new Ef(0,0,0,0),iM=Ht(function(r,t,e,n){return new Ef(r,t,e,n)},function(r,t,e,n){return"rgba(".concat(r,",").concat(t,",").concat(e,",").concat(n,")")}),nt=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ie.kNumber;return new je(t,e)};new je(50,"%");function aM(r){var t=r.type,e=r.value;return t==="hex"?"#".concat(e):t==="literal"?e:t==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var sM=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function e(S){throw new Error("".concat(t,": ").concat(S))}function n(){var S=i();return t.length>0&&e("Invalid input not EOF"),S}function i(){return b(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(S,T,N){return o(T,function(B){var I=N();return I&&(F(r.comma)||e("Missing comma before color stops")),{type:S,orientation:I,colorStops:b(_)}})}function o(S,T){var N=F(S);if(N){F(r.startCall)||e("Missing (");var B=T(N);return F(r.endCall)||e("Missing )"),B}}function l(){return u()||c()}function u(){return z("directional",r.sideOrCorner,1)}function c(){return z("angular",r.angleValue,1)}function d(){var S,T=h(),N;return T&&(S=[],S.push(T),N=t,F(r.comma)&&(T=h(),T?S.push(T):t=N)),S}function h(){var S=f()||v();if(S)S.at=p();else{var T=g();if(T){S=T;var N=p();N&&(S.at=N)}else{var B=m();B&&(S={type:"default-radial",at:B})}}return S}function f(){var S=z("shape",/^(circle)/i,0);return S&&(S.style=D()||g()),S}function v(){var S=z("shape",/^(ellipse)/i,0);return S&&(S.style=M()||g()),S}function g(){return z("extent-keyword",r.extentKeywords,1)}function p(){if(z("position",/^at/,0)){var S=m();return S||e("Missing positioning value"),S}}function m(){var S=y();if(S.x||S.y)return{type:"position",value:S}}function y(){return{x:M(),y:M()}}function b(S){var T=S(),N=[];if(T)for(N.push(T);F(r.comma);)T=S(),T?N.push(T):e("One extra comma");return N}function _(){var S=w();return S||e("Expected color definition"),S.length=M(),S}function w(){return E()||O()||k()||x()}function x(){return z("literal",r.literalColor,0)}function E(){return z("hex",r.hexColor,1)}function k(){return o(r.rgbColor,function(){return{type:"rgb",value:b(P)}})}function O(){return o(r.rgbaColor,function(){return{type:"rgba",value:b(P)}})}function P(){return F(r.number)[1]}function M(){return z("%",r.percentageValue,1)||L()||D()}function L(){return z("position-keyword",r.positionKeywords,1)}function D(){return z("px",r.pixelValue,1)||z("em",r.emValue,1)}function z(S,T,N){var B=F(T);if(B)return{type:S,value:B[N]}}function F(S){var T=/^[\n\r\t\s]+/.exec(t);T&&C(T[0].length);var N=S.exec(t);return N&&C(N[0].length),N}function C(S){t=t.substring(S)}return function(S){return t=S,n()}}();function XF(r,t,e,n){var i=Ge(n.value),a=0,s=0,o=a+t/2,l=s+e/2,u=Math.abs(t*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function KF(r,t,e,n,i,a){var s=n.value,o=i.value;n.unit===ie.kPercentage&&(s=n.value/100*t),i.unit===ie.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([t,e],[s,o]),distanceSquareRoot([t,0],[s,o]));return a&&(a instanceof je?l=a.value:a instanceof Dn&&(a.value==="closest-side"?l=Math.min(s,t-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,t-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([t,e],[s,o]),distanceSquareRoot([t,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var oM=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,lM=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,uM=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Xy=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function cM(r){var t,e=r.length;if(r[e-1].length=(t=r[e-1].length)!==null&&t!==void 0?t:{type:"%",value:"100"},e>1){var n;r[0].length=(n=r[0].length)!==null&&n!==void 0?n:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,ue.Z)(l)&&!(0,ue.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var dM={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},hM=Ht(function(r){var t;return r.type==="angular"?t=Number(r.value):t=dM[r.value]||0,nt(t,"deg")}),fM=Ht(function(r){var t=50,e=50,n="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?t=0:s.value==="center"?t=50:s.value==="right"?t=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?t=0:o.value==="center"?e=50:o.value==="right"?t=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(n=s==null?void 0:s.type,t=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:nt(t,n),cy:nt(e,i)}}),vM=Ht(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var t=sM(r);return t.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;cM(c);var d=c.map(function(b){return{offset:nt(Number(b.length.value),"%"),color:aM(b)}});if(l==="linear-gradient")return new Xu(Yu.LinearGradient,{angle:u?hM(u):Ji,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=fM(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var p=u[0].style,m=p.type,y=p.value;m==="extent-keyword"?g=rM(y):g=nt(y,m)}return new Xu(Yu.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var n=oM.exec(r);if(n){var i,a=((i=n[2].match(Xy))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new Xu(Yu.LinearGradient,{angle:nt(parseFloat(n[1]),"deg"),steps:a.map(function(o){var l=Re(o,2),u=l[0],c=l[1];return{offset:nt(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=gM(r);if(s)if((0,Se.Z)(s))r=s;else return[new Xu(Yu.RadialGradient,s)]}else if(e==="p")return pM(r)}});function gM(r){var t=lM.exec(r);if(t){var e,n=((e=t[4].match(Xy))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:nt(50,"%"),cy:nt(50,"%"),steps:n.map(function(i){var a=Re(i,2),s=a[0],o=a[1];return{offset:nt(Number(s)*100,"%"),color:o}})}}return null}function pM(r){var t=uM.exec(r);if(t){var e=t[1],n=t[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:n,repetition:e}}return null}function $F(r){return!!r.type&&!!r.value}function mM(r){return r&&!!r.image}function Ky(r){return r&&!(0,ue.Z)(r.r)&&!(0,ue.Z)(r.g)&&!(0,ue.Z)(r.b)}var eo=Ht(function(r){if(mM(r))return dt({repetition:"repeat"},r);if((0,ue.Z)(r)&&(r=""),r==="transparent")return Yy;if(r==="currentColor")r="black";else if(r==="none")return Uy;var t=vM(r);if(t)return t;var e=ju(r),n=[0,0,0,0];return e!==null&&(n[0]=e.r||0,n[1]=e.g||0,n[2]=e.b||0,n[3]=e.opacity),iM.apply(void 0,n)});function yM(r,t){if(!(!Ky(r)||!Ky(t)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(e){var n=e.slice();if(n[3])for(var i=0;i<3;i++)n[i]=Math.round((0,Ne.Z)(n[i],0,255));return n[3]=(0,Ne.Z)(n[3],0,1),"rgba(".concat(n.join(","),")")}]}function to(r,t){if((0,ue.Z)(t))return nt(0,"px");if(t="".concat(t).trim().toLowerCase(),isFinite(Number(t))){if("px".search(r)>=0)return nt(Number(t),"px");if("deg".search(r)>=0)return nt(Number(t),"deg")}var e=[];t=t.replace(r,function(i){return e.push(i),"U".concat(i)});var n="U(".concat(r.source,")");return e.map(function(i){return nt(Number(t.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(n,"g"),"*0")),i)})[0]}var $y=function(t){return to(new RegExp("px","g"),t)},bM=Ht($y),xM=function(t){return to(new RegExp("%","g"),t)};Ht(xM);var qy=function(t){return(0,oe.Z)(t)||isFinite(Number(t))?nt(Number(t)||0,"px"):to(new RegExp("px|%|em|rem","g"),t)},kf=Ht(qy),Jy=function(t){return to(new RegExp("deg|rad|grad|turn","g"),t)},EM=Ht(Jy);function wM(r,t,e,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=t.value||0,l=xf(r.unit),u=r.convertTo(l),c=t.convertTo(l);return u&&c?(s=u.value,o=c.value,a=bf(r.unit)):(je.isLength(r.unit)||je.isLength(t.unit))&&(s=mn(r,i,e),o=mn(t,i,e),a="px"),[s,o,function(d){return n&&(d=Math.max(d,0)),d+a}]}function an(r){var t=0;return r.unit===ie.kDegrees?t=r.value:r.unit===ie.kRadians?t=Ln(Number(r.value)):r.unit===ie.kTurns?t=IN(Number(r.value)):r.value&&(t=r.value),t}function Qy(r,t){var e;return Array.isArray(r)?e=r.map(function(n){return Number(n)}):(0,Se.Z)(r)?e=r.split(" ").map(function(n){return Number(n)}):(0,oe.Z)(r)&&(e=[r]),t===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function mn(r,t,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===ie.kPixels)return Number(r.value);if(r.unit===ie.kPercentage&&e){var i=e.nodeName===ve.GROUP?e.getLocalBounds():e.getGeometryBounds();return(n?i.min[t]:0)+r.value/100*i.halfExtents[t]*2}return 0}var kM=function(t){return to(/deg|rad|grad|turn|px|%/g,t)},_M=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function SM(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var t=/\s*([\w-]+)\(([^)]*)\)/g,e=[],n,i=0;n=t.exec(r);){if(n.index!==i)return[];if(i=n.index+n[0].length,_M.indexOf(n[1])>-1&&e.push({name:n[1],params:n[2].split(" ").map(function(a){return kM(a)||eo(a)})}),t.lastIndex===r.length)return e}return[]}function eb(r){return r.toString()}var tb=function(t){return typeof t=="number"?nt(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?nt(Number(t)):nt(0)},_f=Ht(tb);Ht(function(r){return(0,Se.Z)(r)?r.split(" ").map(_f):r.map(_f)});function Sf(r,t){return[r,t,eb]}function Tf(r,t){return function(e,n){return[e,n,function(i){return eb((0,Ne.Z)(i,r,t))}]}}function nb(r,t){if(r.length===t.length)return[r,t,function(e){return e}]}function rb(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Mv.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function TM(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,ct.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function AM(r){for(var t=0;t<r.length;t++){var e=r[t-1],n=r[t],i=n[0];if(i==="M"&&e){var a=e[0],s=[n[1],n[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&Ku(s,o)&&(r.splice(t,1),t--)}}}function CM(r){for(var t=!1,e=r.length,n=0;n<e;n++){var i=r[n],a=i[0];if(a==="C"||a==="A"||a==="Q"){t=!0;break}}return t}function OM(r){for(var t=[],e=[],n=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(n.length&&(e.push(n),n=[]),n.push([a[1],a[2]])):s==="Z"?n.length&&(t.push(n),n=[]):n.push([a[1],a[2]])}return n.length>0&&e.push(n),{polygons:t,polylines:e}}function Ku(r,t){return r[0]===t[0]&&r[1]===t[1]}function PM(r,t){for(var e=[],n=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,ct.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,ct.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,ct.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),n.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)),t&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(_){return!Number.isNaN(_)&&_!==1/0&&_!==-1/0}),n=n.filter(function(_){return!Number.isNaN(_)&&_!==1/0&&_!==-1/0});var h=(0,ua.Z)(e),f=(0,ua.Z)(n),v=(0,ca.Z)(e),g=(0,ca.Z)(n);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var p=0;p<i.length;p++){var m=i[p],y=m.currentPoint,b=void 0;y[0]===h?(b=$u(m,t),h-=b.xExtra):y[0]===v&&(b=$u(m,t),v+=b.xExtra),y[1]===f?(b=$u(m,t),f-=b.yExtra):y[1]===g&&(b=$u(m,t),g+=b.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function $u(r,t){var e=r.prePoint,n=r.currentPoint,i=r.nextPoint,a=Math.pow(n[0]-e[0],2)+Math.pow(n[1]-e[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,Rv.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-n[1],i[0]-n[0])),c=Math.abs(Math.atan2(i[0]-n[0],i[1]-n[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(t/2*(1/Math.sin(l/2)))-t/2||0,yExtra:Math.cos(c-l/2)*(t/2*(1/Math.sin(l/2)))-t/2||0};return d}function ib(r,t){return[t[0]+(t[0]-r[0]),t[1]+(t[1]-r[1])]}var ab=function(t,e){var n=t.x*e.x+t.y*e.y,i=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=t.x*e.y-t.y*e.x<0?-1:1,s=a*Math.acos(n/i);return s},sb=function(t,e,n,i,a,s,o,l){e=Math.abs(e),n=Math.abs(n),i=(0,Mo.Z)(i,360);var u=Ge(i);if(t.x===o.x&&t.y===o.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(e===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(t.x-o.x)/2,d=(t.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(n,2);f>1&&(e*=Math.sqrt(f),n*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(n,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(n,2)*Math.pow(h.x,2),p=v/g;p=p<0?0:p;var m=(a!==s?1:-1)*Math.sqrt(p),y={x:m*(e*h.y/n),y:m*(-(n*h.x)/e)},b={x:Math.cos(u)*y.x-Math.sin(u)*y.y+(t.x+o.x)/2,y:Math.sin(u)*y.x+Math.cos(u)*y.y+(t.y+o.y)/2},_={x:(h.x-y.x)/e,y:(h.y-y.y)/n},w=ab({x:1,y:0},_),x={x:(-h.x-y.x)/e,y:(-h.y-y.y)/n},E=ab(_,x);!s&&E>0?E-=2*Math.PI:s&&E<0&&(E+=2*Math.PI),E%=2*Math.PI;var k=w+E*l,O=e*Math.cos(k),P=n*Math.sin(k),M={x:Math.cos(u)*O-Math.sin(u)*P+b.x,y:Math.sin(u)*O+Math.cos(u)*P+b.y,ellipticalArcStartAngle:w,ellipticalArcEndAngle:w+E,ellipticalArcAngle:k,ellipticalArcCenter:b,resultantRx:e,resultantRy:n};return M};function NM(r){for(var t=[],e=null,n=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];n=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=MM(e,l);c.arcParams=d;break}if(u==="Z")e=i,n=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}n&&n[0]==="Z"&&(n=r[a],t[a]&&(t[a].prePoint=e)),c.currentPoint=e,t[a]&&Ku(e,t[a].currentPoint)&&(t[a].prePoint=c.prePoint);var f=n?[n[n.length-2],n[n.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var p=t[o-1],m=ib(p.currentPoint,v);p.command==="Q"?(c.command="Q",c.startTangent=[v[0]-m[0],v[1]-m[1]],c.endTangent=[e[0]-m[0],e[1]-m[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var y=[l[1],l[2]],b=[l[3],l[4]];c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-b[0],e[1]-b[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[y[0]-b[0],y[1]-b[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[b[0]-y[0],b[1]-y[1]])}else if(u==="S"){var _=t[o-1],w=ib(_.currentPoint,v),x=[l[1],l[2]];_.command==="C"?(c.command="C",c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-x[0],e[1]-x[1]]):(c.command="SQ",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-x[0],e[1]-x[1]])}else if(u==="A"){var E=ob(c,0),k=E.x,O=E.y,P=ob(c,1,!1),M=P.x,L=P.y;c.startTangent=[k,O],c.endTangent=[M,L]}t.push(c)}return t}function ob(r,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=r.arcParams,i=n.rx,a=i===void 0?0:i,s=n.ry,o=s===void 0?0:s,l=n.xRotation,u=n.arcFlag,c=n.sweepFlag,d=sb({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},t),h=sb({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?t+.005:t-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function qu(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Af(r,t){return qu(r)*qu(t)?(r[0]*t[0]+r[1]*t[1])/(qu(r)*qu(t)):1}function lb(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(Af(r,t))}function MM(r,t){var e=t[1],n=t[2],i=(0,Mo.Z)(Ge(t[3]),Math.PI*2),a=t[4],s=t[5],o=r[0],l=r[1],u=t[6],c=t[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(n*n);f>1&&(e*=Math.sqrt(f),n*=Math.sqrt(f));var v=e*e*(h*h)+n*n*(d*d),g=v?Math.sqrt((e*e*(n*n)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var p=n?g*e*h/n:0,m=e?g*-n*d/e:0,y=(o+u)/2+Math.cos(i)*p-Math.sin(i)*m,b=(l+c)/2+Math.sin(i)*p+Math.cos(i)*m,_=[(d-p)/e,(h-m)/n],w=[(-1*d-p)/e,(-1*h-m)/n],x=lb([1,0],_),E=lb(_,w);return Af(_,w)<=-1&&(E=Math.PI),Af(_,w)>=1&&(E=0),s===0&&E>0&&(E-=2*Math.PI),s===1&&E<0&&(E+=2*Math.PI),{cx:y,cy:b,rx:Ku(r,[u,c])?0:e,ry:Ku(r,[u,c])?0:n,startAngle:x,endAngle:x+E,xRotation:i,arcFlag:a,sweepFlag:s}}function RM(r,t,e){return r.reduce(function(n,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return n+=a},"")}function LM(r,t,e,n){return[["M",r,t],["L",e,n]]}function ub(r,t,e,n){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=t*i,o=e-r,l=e+r,u=n-t,c=n+t;return[["M",o,n],["C",o,n-s,e-a,u,e,u],["C",e+a,u,l,n-s,l,n],["C",l,n+s,e+a,c,e,c],["C",e-a,c,o,n+s,o,n],["Z"]]}function DM(r,t){var e=r.map(function(n,i){return[i===0?"M":"L",n[0],n[1]]});return t&&e.push(["Z"]),e}function IM(r,t,e,n,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=t>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,n],["L",r-c*o+e,n],o?["A",o,o,0,0,h,r+e,d*o+n]:null,["L",r+e,t-d*l+n],l?["A",l,l,0,0,h,r+e-c*l,t+n]:null,["L",e+c*u,t+n],u?["A",u,u,0,0,h,e,t+n-d*u]:null,["L",e,d*s+n],s?["A",s,s,0,0,h,c*s+e,n]:null,["Z"]].filter(function(f){return f})}return[["M",e,n],["L",e+r,n],["L",e+r,n+t],["L",e,n+t],["Z"]]}function qF(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case ve.LINE:var n=r.parsedStyle,i=n.x1,a=i===void 0?0:i,s=n.y1,o=s===void 0?0:s,l=n.x2,u=l===void 0?0:l,c=n.y2,d=c===void 0?0:c;e=LM(a,o,u,d);break;case ve.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,p=g===void 0?0:g,m=h.cy,y=m===void 0?0:m;e=ub(v,v,p,y);break}case ve.ELLIPSE:{var b=r.parsedStyle,_=b.rx,w=_===void 0?0:_,x=b.ry,E=x===void 0?0:x,k=b.cx,O=k===void 0?0:k,P=b.cy,M=P===void 0?0:P;e=ub(w,E,O,M);break}case ve.POLYLINE:case ve.POLYGON:var L=r.parsedStyle.points;e=DM(L.points,r.nodeName===ve.POLYGON);break;case ve.RECT:var D=r.parsedStyle,z=D.width,F=z===void 0?0:z,C=D.height,S=C===void 0?0:C,T=D.x,N=T===void 0?0:T,B=D.y,I=B===void 0?0:B,W=D.radius,X=W&&W.some(function($){return $!==0});e=IM(F,S,N,I,X&&W.map(function($){return clamp($,0,Math.min(Math.abs(F)/2,Math.abs(S)/2))}));break;case ve.PATH:var H=r.parsedStyle.d.absolutePath;e=_toConsumableArray(H);break}if(e.length)return RM(e,r,t)}function JF(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(t!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&n!==0&&i!==0,h=c?[t,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],p=d?[n,i]:[0,0],m=_slicedToArray(p,2),y=m[0],b=m[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+y,",").concat(s[2]+b);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+y," ").concat(s[4]+b);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+y," ").concat(s[6]+b);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+y," ").concat(s[7]+b);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var cb=function(t){if(t===""||Array.isArray(t)&&t.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,Ro.A)(t)}catch(f){e=(0,Ro.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}AM(e);var n=CM(e),i=OM(e),a=i.polygons,s=i.polylines,o=NM(e),l=PM(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:n,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},BM=Ht(cb);function db(r){return(0,Se.Z)(r)?BM(r):cb(r)}function FM(r,t,e){var n=r.curve,i=t.curve;(!n||n.length===0)&&(n=(0,Lo.Y)(r.absolutePath,!1),r.curve=n),(!i||i.length===0)&&(i=(0,Lo.Y)(t.absolutePath,!1),t.curve=i);var a=[n,i];n.length!==i.length&&(a=(0,Lv.x)(n,i));var s=(0,Do.b)(a[0])!==(0,Do.b)(a[1])?(0,Dv.G)(a[0]):(0,Iv.U)(a[0]);return[s,(0,Bv.g)(a[1],s),function(o){return o}]}function zM(r,t){var e;return(0,Se.Z)(r)?e=r.split(" ").map(function(n){var i=n.split(","),a=Re(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function GM(r,t){return[r.points,t.points,function(e){return e}]}var lt=null,qa=/\s*(\w+)\(([^)]*)\)/g;function sn(r){return function(t){var e=0;return r.map(function(n){return n===lt?t[e++]:n})}}function Qi(r){return r}var no={matrix:["NNNNNN",[lt,lt,0,0,lt,lt,0,0,0,0,1,0,lt,lt,0,1],Qi],matrix3d:["NNNNNNNNNNNNNNNN",Qi],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",sn([lt,lt,new je(1)]),Qi],scaleX:["N",sn([lt,new je(1),new je(1)]),sn([lt,new je(1)])],scaleY:["N",sn([new je(1),lt,new je(1)]),sn([new je(1),lt])],scaleZ:["N",sn([new je(1),new je(1),lt])],scale3d:["NNN",Qi],skew:["Aa",null,Qi],skewX:["A",null,sn([lt,Ji])],skewY:["A",null,sn([Ji,lt])],translate:["Tt",sn([lt,lt,nr]),Qi],translateX:["T",sn([lt,nr,nr]),sn([lt,nr])],translateY:["T",sn([nr,lt,nr]),sn([nr,lt])],translateZ:["L",sn([nr,nr,lt])],translate3d:["TTL",Qi]};function hb(r){for(var t=[],e=r.length,n=0;n<e;n++){var i=r[n],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=no[a];if(!o)return[];var l=s.map(function(u){return nt(u)});t.push({t:a,d:l})}return t}function jM(r){if(Array.isArray(r))return hb(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(qa.lastIndex=0;e=qa.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=no[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?Ji:EM(v)},N:_f,T:kf,L:bM}[d.toUpperCase()](c):h={a:Ji,n:l[0],t:nr}[d],h===void 0)return[];l.push(h)}if(t.push({t:i,d:l}),qa.lastIndex===r.length)return t}return[]}function WM(r){if(Array.isArray(r))return hb(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(qa.lastIndex=0;e=qa.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=no[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?Ji:Jy(v)},N:tb,T:qy,L:$y}[d.toUpperCase()](c):h={a:Ji,n:l[0],t:nr}[d],h===void 0)return[];l.push(h)}if(t.push({t:i,d:l}),qa.lastIndex===r.length)return t}return[]}function ZM(r){var t,e,n,i;switch(r.t){case"rotateX":return i=Ge(an(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Ge(an(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Ge(an(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":t=r.d[0].value,e=r.d[1].value,n=r.d[2].value,i=Ge(an(r.d[3]));var a=t*t+e*e+n*n;if(a===0)t=1,e=0,n=0;else if(a!==1){var s=Math.sqrt(a);t/=s,e/=s,n/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+n*n)*u,2*(t*e*u+n*l),2*(t*n*u-e*l),0,2*(t*e*u-n*l),1-2*(t*t+n*n)*u,2*(e*n*u+t*l),0,2*(t*n*u+e*l),2*(e*n*u-t*l),1-2*(t*t+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=Ge(an(r.d[0])),d=Ge(an(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Ge(an(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Ge(an(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return t=mn(r.d[0],0,null)||0,e=mn(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,e,0,1];case"translateX":return t=mn(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,0,0,1];case"translateY":return e=mn(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return n=mn(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,n,1];case"translate3d":return t=mn(r.d[0],0,null)||0,e=mn(r.d[1],0,null)||0,n=mn(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1];case"perspective":var h=mn(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function VM(r,t){return[r[0]*t[0]+r[4]*t[1]+r[8]*t[2]+r[12]*t[3],r[1]*t[0]+r[5]*t[1]+r[9]*t[2]+r[13]*t[3],r[2]*t[0]+r[6]*t[1]+r[10]*t[2]+r[14]*t[3],r[3]*t[0]+r[7]*t[1]+r[11]*t[2]+r[15]*t[3],r[0]*t[4]+r[4]*t[5]+r[8]*t[6]+r[12]*t[7],r[1]*t[4]+r[5]*t[5]+r[9]*t[6]+r[13]*t[7],r[2]*t[4]+r[6]*t[5]+r[10]*t[6]+r[14]*t[7],r[3]*t[4]+r[7]*t[5]+r[11]*t[6]+r[15]*t[7],r[0]*t[8]+r[4]*t[9]+r[8]*t[10]+r[12]*t[11],r[1]*t[8]+r[5]*t[9]+r[9]*t[10]+r[13]*t[11],r[2]*t[8]+r[6]*t[9]+r[10]*t[10]+r[14]*t[11],r[3]*t[8]+r[7]*t[9]+r[11]*t[10]+r[15]*t[11],r[0]*t[12]+r[4]*t[13]+r[8]*t[14]+r[12]*t[15],r[1]*t[12]+r[5]*t[13]+r[9]*t[14]+r[13]*t[15],r[2]*t[12]+r[6]*t[13]+r[10]*t[14]+r[14]*t[15],r[3]*t[12]+r[7]*t[13]+r[11]*t[14]+r[15]*t[15]]}function HM(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(ZM).reduce(VM)}function fb(r){var t=[0,0,0],e=[1,1,1],n=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return jN(HM(r),t,e,n,i,a),[[t,e,n,a,i]]}var UM=function(){function r(n,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*n[l][o];return a}function t(n){return n[0][2]===0&&n[0][3]===0&&n[1][2]===0&&n[1][3]===0&&n[2][0]===0&&n[2][1]===0&&n[2][2]===1&&n[2][3]===0&&n[3][2]===0&&n[3][3]===1}function e(n,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=n[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(f*f+v*v),p[0][1]=2*(h*f-v*g),p[0][2]=2*(h*v+f*g),p[1][0]=2*(h*f+v*g),p[1][1]=1-2*(h*h+v*v),p[1][2]=2*(f*v-h*g),p[2][0]=2*(h*v-f*g),p[2][1]=2*(f*v+h*g),p[2][2]=1-2*(h*h+f*f),l=r(l,p);var m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(m[2][1]=a[2],l=r(l,m)),a[1]&&(m[2][1]=0,m[2][0]=a[0],l=r(l,m)),a[0]&&(m[2][0]=0,m[1][0]=a[0],l=r(l,m));for(var y=0;y<3;y++)for(var b=0;b<3;b++)l[y][b]*=i[y];return t(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function YM(r){return r.toFixed(6).replace(".000000","")}function Cf(r,t){var e,n;return r.decompositionPair!==t&&(r.decompositionPair=t,e=fb(r)),t.decompositionPair!==r&&(t.decompositionPair=r,n=fb(t)),e[0]===null||n[0]===null?[[!1],[!0],function(i){return i?t[0].d:r[0].d}]:(e[0].push(0),n[0].push(1),[e,n,function(i){var a=KM(e[0][3],n[0][3],i[5]),s=UM(i[0],i[1],i[2],a,i[4]),o=s.map(YM).join(",");return o}])}function XM(r,t){for(var e=0,n=0;n<r.length;n++)e+=r[n]*t[n];return e}function KM(r,t,e){var n=XM(r,t);n=(0,Ne.Z)(n,-1,1);var i=[];if(n===1)i=r;else for(var a=Math.acos(n),s=Math.sin(e*a)*1/Math.sqrt(1-n*n),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-n*s)+t[o]*s);return i}function Of(r){return r.replace(/[XY]/,"")}function Pf(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var $M=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function qM(r,t,e){var n=!1;if(!r.length||!t.length){r.length||(n=!0,r=t,t=[]);for(var i=function(){var M=r[a],L=M.t,D=M.d,z=L.substring(0,5)==="scale"?1:0;t.push({t:L,d:D.map(function(F){return typeof F=="number"?nt(z):nt(z,F.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==t.length){var u=Cf(r,t);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=t[c].t,f=r[c].d,v=t[c].d,g=no[d],p=no[h],m=void 0;if($M(d,h)){var y=Cf([r[c]],[t[c]]);s.push(y[0]),o.push(y[1]),l.push(["matrix",[y[2]]]);continue}else if(d===h)m=d;else if(g[2]&&p[2]&&Of(d)===Of(h))m=Of(d),f=g[2](f),v=p[2](v);else if(g[1]&&p[1]&&Pf(d)===Pf(h))m=Pf(d),f=g[1](f),v=p[1](v);else{var b=Cf(r,t);s=[b[0]],o=[b[1]],l=[["matrix",[b[2]]]];break}for(var _=[],w=[],x=[],E=0;E<f.length;E++){var k=wM(f[E],v[E],e,!1,E);_[E]=k[0],w[E]=k[1],x.push(k[2])}s.push(_),o.push(w),l.push([m,x])}if(n){var O=s;s=o,o=O}return[s,o,function(P){return P.map(function(M,L){var D=M.map(function(z,F){return l[L][1][F](z)}).join(",");return l[L][0]==="matrix"&&D.split(",").length===16&&(l[L][0]="matrix3d"),l[L][0]==="matrix3d"&&D.split(",").length===6&&(l[L][0]="matrix"),"".concat(l[L][0],"(").concat(D,")")}).join(" ")}]}var JM=Ht(function(r){if((0,Se.Z)(r)){if(r==="text-anchor")return[nt(0,"px"),nt(0,"px")];var t=r.split(" ");return t.length===1&&(t[0]==="top"||t[0]==="bottom"?(t[1]=t[0],t[0]="center"):t[1]="center"),t.length!==2?null:[kf(vb(t[0])),kf(vb(t[1]))]}return[nt(r[0]||0,"px"),nt(r[1]||0,"px")]});function vb(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var gb=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:ne.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:ne.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:ne.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:ne.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:ne.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:ne.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:ne.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:ne.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:ne.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:ne.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:ne.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:ne.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:ne.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:ne.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:ne.FILTER},{n:"clipPath",syntax:ne.DEFINED_PATH},{n:"textPath",syntax:ne.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:ne.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:ne.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:ne.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:ne.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:ne.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:ne.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:ne.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:ne.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:ne.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:ne.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:ne.COORDINATE},{n:"y1",int:!0,l:!0,syntax:ne.COORDINATE},{n:"z1",int:!0,l:!0,syntax:ne.COORDINATE},{n:"x2",int:!0,l:!0,syntax:ne.COORDINATE},{n:"y2",int:!0,l:!0,syntax:ne.COORDINATE},{n:"z2",int:!0,l:!0,syntax:ne.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:ne.PATH,p:50},{n:"points",int:!0,l:!0,syntax:ne.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:ne.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:ne.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:ne.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:ne.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:ne.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:ne.NUMBER,d:function(t){return t===ve.PATH||t===ve.POLYGON||t===ve.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:ne.MARKER},{n:"markerEnd",syntax:ne.MARKER},{n:"markerMid",syntax:ne.MARKER},{n:"markerStartOffset",syntax:ne.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:ne.LENGTH,l:!0,int:!0,d:"0"}],QM=new Set(gb.filter(function(r){return!!r.l}).map(function(r){return r.n})),pb={},eR=function(){function r(t){var e=this;q(this,r),this.runtime=t,gb.forEach(function(n){e.registerMetadata(n)})}return J(r,[{key:"registerMetadata",value:function(e){[e.n].concat(jt(e.a||[])).forEach(function(n){pb[n]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,n);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;Object.assign(e.parsedStyle,n);var o=!!i.forceUpdateGeometry;if(!o){for(var l in n)if(QM.has(l)){o=!0;break}}n.fill&&(e.parsedStyle.fill=eo(n.fill)),n.stroke&&(e.parsedStyle.stroke=eo(n.stroke)),n.shadowColor&&(e.parsedStyle.shadowColor=eo(n.shadowColor)),n.filter&&(e.parsedStyle.filter=SM(n.filter)),(0,ue.Z)(n.radius)||(e.parsedStyle.radius=Qy(n.radius,4)),(0,ue.Z)(n.lineDash)||(e.parsedStyle.lineDash=Qy(n.lineDash,2)),n.points&&(e.parsedStyle.points=zM(n.points)),n.d===""&&(e.parsedStyle.d=dt({},Zy)),n.d&&(e.parsedStyle.d=db(n.d)),n.textTransform&&this.runtime.CSSPropertySyntaxFactory[ne.TEXT_TRANSFORM].calculator(null,null,{value:n.textTransform},e,null),(0,ce.Z)(n.clipPath)||this.runtime.CSSPropertySyntaxFactory[ne.DEFINED_PATH].calculator("clipPath",a,n.clipPath,e,this.runtime),n.offsetPath&&this.runtime.CSSPropertySyntaxFactory[ne.DEFINED_PATH].calculator("offsetPath",s,n.offsetPath,e,this.runtime),n.transform&&(e.parsedStyle.transform=jM(n.transform)),n.transformOrigin&&(e.parsedStyle.transformOrigin=JM(n.transformOrigin)),n.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[ne.MARKER].calculator(null,n.markerStart,n.markerStart,null,null)),n.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[ne.MARKER].calculator(null,n.markerEnd,n.markerEnd,null,null)),n.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[ne.MARKER].calculator("",n.markerMid,n.markerMid,null,null)),(0,ue.Z)(n.zIndex)||this.runtime.CSSPropertySyntaxFactory[ne.Z_INDEX].postProcessor(e),(0,ue.Z)(n.offsetDistance)||this.runtime.CSSPropertySyntaxFactory[ne.OFFSET_DISTANCE].postProcessor(e),n.transform&&this.runtime.CSSPropertySyntaxFactory[ne.TRANSFORM].postProcessor(e),n.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[ne.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var n=e.nodeName,i=this.runtime.geometryUpdaterFactory[n];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new rn),a.renderBounds||(a.renderBounds=new rn);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,p=o.hheight,m=p===void 0?0:p,y=o.hdepth,b=y===void 0?0:y,_=[Math.abs(g),Math.abs(m),b],w=s.stroke,x=s.lineWidth,E=x===void 0?1:x,k=s.increasedLineWidthForHitTesting,O=k===void 0?0:k,P=s.shadowType,M=P===void 0?"outer":P,L=s.shadowColor,D=s.filter,z=D===void 0?[]:D,F=s.transformOrigin,C=[u,d,f];a.contentBounds.update(C,_);var S=n===ve.POLYLINE||n===ve.POLYGON||n===ve.PATH?Math.SQRT2:.5,T=w&&!w.isNone;if(T){var N=((E||0)+(O||0))*S;_[0]+=N,_[1]+=N}if(a.renderBounds.update(C,_),L&&M&&M!=="inner"){var B=a.renderBounds,I=B.min,W=B.max,X=s.shadowBlur,H=s.shadowOffsetX,$=s.shadowOffsetY,le=X||0,fe=H||0,Le=$||0,Ze=I[0]-le+fe,or=W[0]+le+fe,sa=I[1]-le+Le,_n=W[1]+le+Le;I[0]=Math.min(I[0],Ze),W[0]=Math.max(W[0],or),I[1]=Math.min(I[1],sa),W[1]=Math.max(W[1],_n),a.renderBounds.setMinMax(I,W)}z.forEach(function(_o){var So=_o.name,Yr=_o.params;if(So==="blur"){var To=Yr[0].value;a.renderBounds.update(a.renderBounds.center,R.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[To,To,0]))}else if(So==="drop-shadow"){var Ao=Yr[0].value,Co=Yr[1].value,Xr=Yr[2].value,Oo=a.renderBounds,Yt=Oo.min,Xt=Oo.max,Cv=Yt[0]-Xr+Ao,Ov=Xt[0]+Xr+Ao,Pv=Yt[1]-Xr+Co,Nv=Xt[1]+Xr+Co;Yt[0]=Math.min(Yt[0],Cv),Xt[0]=Math.max(Xt[0],Ov),Yt[1]=Math.min(Yt[1],Pv),Xt[1]=Math.max(Xt[1],Nv),a.renderBounds.setMinMax(Yt,Xt)}}),e.geometry.dirty=!1;var Ur=g<0,Av=m<0,wo=(Ur?-1:1)*(F?mn(F[0],0,e,!0):0),ko=(Av?-1:1)*(F?mn(F[1],1,e,!0):0);(wo||ko)&&e.setOrigin(wo,ko)}}},{key:"updateSizeAttenuation",value:function(e,n){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/n,e.nodeName===ve.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/n)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===ve.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}(),tR=function(){function r(){q(this,r),this.mixer=Sf}return J(r,[{key:"calculator",value:function(e,n,i,a){return an(i)}}])}(),nR=function(){function r(){q(this,r)}return J(r,[{key:"calculator",value:function(e,n,i,a,s){return i instanceof Dn&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,n,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),rR=function(){function r(){q(this,r),this.parser=eo,this.mixer=yM}return J(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Dn?i.value==="none"?Uy:Yy:i}}])}(),iR=function(){function r(){q(this,r)}return J(r,[{key:"calculator",value:function(e,n,i){return i instanceof Dn?[]:i}}])}();function mb(r){var t=r.parsedStyle,e=t.fontSize;return(0,ue.Z)(e)?null:e}var Nf=function(){function r(){q(this,r),this.mixer=Sf}return J(r,[{key:"calculator",value:function(e,n,i,a,s){if((0,oe.Z)(i))return i;if(je.isRelativeUnit(i.unit)){if(i.unit===ie.kPercentage)return 0;if(i.unit===ie.kEms){if(a.parentNode){var o=mb(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===ie.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=mb(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),aR=function(){function r(){q(this,r),this.mixer=nb}return J(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),sR=function(){function r(){q(this,r),this.mixer=nb}return J(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),oR=function(){function r(){q(this,r)}return J(r,[{key:"calculator",value:function(e,n,i,a){var s;i instanceof Dn&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),lR=function(){function r(){q(this,r),this.mixer=Sf}return J(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),uR=function(){function r(){q(this,r),this.mixer=Tf(0,1)}return J(r,[{key:"calculator",value:function(e,n,i){return i.value}},{key:"postProcessor",value:function(e){var n=e.parsedStyle,i=n.offsetPath,a=n.offsetDistance;if(i){var s=i.nodeName;if(s===ve.LINE||s===ve.PATH||s===ve.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),cR=function(){function r(){q(this,r),this.mixer=Tf(0,1)}return J(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),dR=function(){function r(){q(this,r),this.parser=db,this.mixer=FM}return J(r,[{key:"calculator",value:function(e,n,i){return i instanceof Dn&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Xa(0,0,0,0)}:i}}])}(),hR=J(function r(){q(this,r),this.mixer=GM}),fR=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.mixer=Tf(0,1/0),e}return Oe(t,r),J(t)}(Nf),vR=function(){function r(){q(this,r)}return J(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Dn?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),gR=function(){function r(){q(this,r)}return J(r,[{key:"calculator",value:function(e,n,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),QF=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=_slicedToArray(e,2),i=n[1];return i!==void 0}))},Mf=new WeakMap;function e4(r,t,e){if(r){var n=typeof r=="string"?document.getElementById(r):r;Mf.has(n)&&Mf.get(n).destroy(e),Mf.set(n,t)}}var yb=typeof window!="undefined"&&typeof window.document!="undefined";function t4(r){return!!r.getAttribute}function n4(r,t){for(var e=0,n=r.length;e<n;){var i=e+n>>>1;pR(r[i],t)<0?e=i+1:n=i}return e}function pR(r,t){var e=Number(r.parsedStyle.zIndex||0),n=Number(t.parsedStyle.zIndex||0);if(e===n){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(t)}}return e-n}function mR(r){var t=r;do{var e,n=(e=t.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(n)return t;t=t.parentElement}while(t!==null);return null}var bb="px";function r4(r,t,e){yb&&r.style&&(r.style.width=t+bb,r.style.height=e+bb)}function xb(r,t){if(yb)return document.defaultView.getComputedStyle(r,null).getPropertyValue(t)}function i4(r){var t=xb(r,"width");return t==="auto"?r.offsetWidth:parseFloat(t)}function a4(r){var t=xb(r,"height");return t==="auto"?r.offsetHeight:parseFloat(t)}var yR=1,bR={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},xR=typeof performance=="object"&&performance.now?performance:Date;function Rf(r){return r.nodeName===ve.FRAGMENT?!0:r.getRootNode().nodeName===ve.FRAGMENT}function s4(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,n=!1,i=!1,a=!!t&&!t.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(n=a,i=s):r==="visiblefill"||r==="fill"?n=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(n=!0,i=!0),[n,i]}var ER=1,wR=function(){return ER++},Sr=typeof self=="object"&&self.self===self?self:typeof Y.g=="object"&&Y.g.global===Y.g?Y.g:{},kR=Date.now(),_R=function(){return Sr.performance&&typeof Sr.performance.now=="function"?Sr.performance.now():Date.now()-kR},ro={},Eb=Date.now(),SR=function(t){if(typeof t!="function")throw new TypeError("".concat(t," is not a function"));var e=Date.now(),n=e-Eb,i=n>16?0:16-n,a=wR();return ro[a]=t,Object.keys(ro).length>1||setTimeout(function(){Eb=e;var s=ro;ro={},Object.keys(s).forEach(function(o){return s[o](_R())})},i),a},TR=function(t){delete ro[t]},AR=["","webkit","moz","ms","o"],wb=function(t){return typeof t!="string"?SR:t===""?Sr.requestAnimationFrame:Sr["".concat(t,"RequestAnimationFrame")]},CR=function(t){return typeof t!="string"?TR:t===""?Sr.cancelAnimationFrame:Sr["".concat(t,"CancelAnimationFrame")]||Sr["".concat(t,"CancelRequestAnimationFrame")]},OR=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n+=1}},kb=OR(AR,function(r){return!!wb(r)}),_b=wb(kb),PR=CR(kb);Sr.requestAnimationFrame=_b,Sr.cancelAnimationFrame=PR;var o4=null,l4=null,u4=null,c4=null,NR=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],MR=/([\"\'])[^\'\"]+\1/;function RR(r){for(var t=r.fontSize,e=t===void 0?16:t,n=r.fontFamily,i=n===void 0?"sans-serif":n,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,oe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!MR.test(v)&&NR.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function Lf(r,t,e){return G.identity(r),r[4]=Math.tan(t),r[1]=Math.tan(e),r}var mt=G.create(),LR=G.create(),DR={scale:function(t){G.fromScaling(mt,[t[0].value,t[1].value,1])},scaleX:function(t){G.fromScaling(mt,[t[0].value,1,1])},scaleY:function(t){G.fromScaling(mt,[1,t[0].value,1])},scaleZ:function(t){G.fromScaling(mt,[1,1,t[0].value])},scale3d:function(t){G.fromScaling(mt,[t[0].value,t[1].value,t[2].value])},translate:function(t){G.fromTranslation(mt,[t[0].value,t[1].value,0])},translateX:function(t){G.fromTranslation(mt,[t[0].value,0,0])},translateY:function(t){G.fromTranslation(mt,[0,t[0].value,0])},translateZ:function(t){G.fromTranslation(mt,[0,0,t[0].value])},translate3d:function(t){G.fromTranslation(mt,[t[0].value,t[1].value,t[2].value])},rotate:function(t){G.fromZRotation(mt,Ge(an(t[0])))},rotateX:function(t){G.fromXRotation(mt,Ge(an(t[0])))},rotateY:function(t){G.fromYRotation(mt,Ge(an(t[0])))},rotateZ:function(t){G.fromZRotation(mt,Ge(an(t[0])))},rotate3d:function(t){G.fromRotation(mt,Ge(an(t[3])),[t[0].value,t[1].value,t[2].value])},skew:function(t){Lf(mt,Ge(t[0].value),Ge(t[1].value))},skewX:function(t){Lf(mt,Ge(t[0].value),0)},skewY:function(t){Lf(mt,0,Ge(t[0].value))},matrix:function(t){G.set(mt,t[0].value,t[1].value,0,0,t[2].value,t[3].value,0,0,0,0,1,0,t[4].value,t[5].value,0,1)},matrix3d:function(t){G.set.apply(G,[mt].concat(jt(t.map(function(e){return e.value}))))}},IR=R.al(1,1,1),BR=R.Ue(),Sb={translate:function(t,e){ee.sceneGraphService.setLocalScale(t,IR,!1),ee.sceneGraphService.setLocalEulerAngles(t,BR,void 0,void 0,!1),ee.sceneGraphService.setLocalPosition(t,[e[0].value,e[1].value,0],!1),ee.sceneGraphService.dirtifyLocal(t,t.transformable)}};function FR(r,t){if(r.length){if(r.length===1&&Sb[r[0].t]){Sb[r[0].t](t,r[0].d);return}for(var e=G.identity(LR),n=0;n<r.length;n++){var i=r[n],a=i.t,s=i.d,o=DR[a];o&&(o(s),G.mul(e,e,mt))}t.setLocalTransform(e)}else t.resetLocalTransform();return t.getLocalTransform()}var zR=function(){function r(){q(this,r),this.parser=WM,this.mixer=qM}return J(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Dn?[]:i}},{key:"postProcessor",value:function(e){FR(e.parsedStyle.transform,e)}}])}(),GR=function(){function r(){q(this,r)}return J(r,[{key:"postProcessor",value:function(e){var n=e.parsedStyle.transformOrigin;n[0].unit===ie.kPixels&&n[1].unit===ie.kPixels?e.setOrigin(n[0].value,n[1].value):e.getGeometryBounds()}}])}(),jR=function(){function r(){q(this,r)}return J(r,[{key:"calculator",value:function(e,n,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var n=e.parentNode,i=n.renderable,a=n.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=yf.Z_INDEX_CHANGED)}}}])}(),WR=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e,n){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),ZR=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e,n){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),VR=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e){var n=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(n,a),l=Math.max(n,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),HR=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e){var n=e.d,i=n.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),UR=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e){if(e.points&&(0,da.Z)(e.points.points)){var n=e.points.points,i=Math.min.apply(Math,jt(n.map(function(h){return h[0]}))),a=Math.max.apply(Math,jt(n.map(function(h){return h[0]}))),s=Math.min.apply(Math,jt(n.map(function(h){return h[1]}))),o=Math.max.apply(Math,jt(n.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),YR=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Se.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),XR=function(){function r(t){q(this,r),this.globalRuntime=t}return J(r,[{key:"isReadyToMeasure",value:function(e,n){var i=e.text;return i}},{key:"update",value:function(e,n){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,p=e.x,m=p===void 0?0:p,y=e.y,b=y===void 0?0:y;if(!this.isReadyToMeasure(e,n))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var _=(n==null||(i=n.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},w=_.offscreenCanvas,x=this.globalRuntime.textService.measureText(a,e,w);e.metrics=x;var E=x.width,k=x.height,O=E/2,P=k/2,M=m+O;o==="center"||o==="middle"?M+=u/2-O:(o==="right"||o==="end")&&(M+=u-O*2);var L=b-P;return d==="middle"?L+=P:d==="top"||d==="hanging"?L+=P*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(L+=0),f&&(M+=f),g&&(L+=g),{cx:M,cy:L,hwidth:O,hheight:P}}}])}(),KR=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e,n){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),$R=function(){function r(){q(this,r)}return J(r,[{key:"update",value:function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function d4(r){return!!r.type}var Ju=function(){function r(t){q(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Rn,this.page=new Rn,this.canvas=new Rn,this.viewport=new Rn,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return J(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Ue)}}])}(),Tb=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.client=new Rn,e.movement=new Rn,e.offset=new Rn,e.global=new Rn,e.screen=new Rn,e}return Oe(t,r),J(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(n){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(n)}},{key:"initMouseEvent",value:function(){throw new Error(Ue)}}])}(Ju),qR=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return Oe(t,r),J(t,[{key:"getCoalescedEvents",value:function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(Tb),JR=function(r){function t(){return q(this,t),Ce(this,t,arguments)}return Oe(t,r),J(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(Tb),yn=function(r){function t(e,n){var i;return q(this,t),i=Ce(this,t,[null]),i.type=e,i.detail=n,Object.assign(i,n),i}return Oe(t,r),J(t)}(Ju),Ab=new WeakMap,QR=function(){function r(){q(this,r),this.emitter=new cr.Z}return J(r,[{key:"on",value:function(e,n,i){return this.addEventListener(e,n,i),this}},{key:"addEventListener",value:function(e,n,i){var a=!1,s=!1;if((0,ha.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),n=(0,de.Z)(n)?n:n.handleEvent;var u=(0,de.Z)(n)?void 0:n;return s?this.emitter.once(e,n,u):this.emitter.on(e,n,u),this}},{key:"off",value:function(e,n,i){return e?this.removeEventListener(e,n,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,n,i){var a;if(!this.emitter)return this;var s=(0,ha.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),n=(0,de.Z)(n)?n:(a=n)===null||a===void 0?void 0:a.handleEvent;var o=(0,de.Z)(n)?void 0:n;return this.emitter.off(e,n,o),this}},{key:"emit",value:function(e,n){this.dispatchEvent(new yn(e,n))}},{key:"dispatchEvent",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=Ab.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&Ab.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],n||(e.target=this),e.manager.dispatchEvent(e,e.type,n)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),ea=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return Oe(t,r),J(t,[{key:"textContent",get:function(){var n="";this.nodeName===ve.TEXT&&(n+=this.style.text);var i=Ua(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===ve.TEXT?n+=s.nodeValue:n+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return n},set:function(n){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===ve.TEXT&&(this.style.text="".concat(n))}},{key:"getRootNode",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(n){throw new Error(Ue)}},{key:"lookupNamespaceURI",value:function(n){throw new Error(Ue)}},{key:"lookupPrefix",value:function(n){throw new Error(Ue)}},{key:"normalize",value:function(){throw new Error(Ue)}},{key:"isEqualNode",value:function(n){return this===n}},{key:"isSameNode",value:function(n){return this.isEqualNode(n)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(n){if(n===this)return 0;for(var i=n,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING:u===s?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}}return t.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(n){return this.contains(n)}},{key:"contains",value:function(n){for(var i=n;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(n){for(var i=this;n>0&&i;)i=i.parentNode,n--;return i}},{key:"forEach",value:function(n){for(var i=[this];i.length>0;){var a=i.pop(),s=n(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(n){return!!n.childNodes}}])}(QR);ea.DOCUMENT_POSITION_DISCONNECTED=1,ea.DOCUMENT_POSITION_PRECEDING=2,ea.DOCUMENT_POSITION_FOLLOWING=4,ea.DOCUMENT_POSITION_CONTAINS=8,ea.DOCUMENT_POSITION_CONTAINED_BY=16,ea.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var h4=2048,f4=null,eL=function(){function r(){q(this,r)}return J(r,[{key:"getOrCreateCanvas",value:function(e,n){if(this.canvas)return this.canvas;if(e||ee.offscreenCanvas)this.canvas=e||ee.offscreenCanvas,this.context=this.canvas.getContext("2d",dt({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",dt({willReadFrequently:!0},n)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",dt({willReadFrequently:!0},n))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,n){return this.context?this.context:(this.getOrCreateCanvas(e,n),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),v4=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),g4=null,tL=/\[\s*(.*)=(.*)\s*\]/,nL=function(){function r(){q(this,r)}return J(r,[{key:"selectOne",value:function(e,n){var i=this;if(e.startsWith("."))return n.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?n.find(function(l){return n!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return n.find(function(l){return n!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,n){var i=this;if(e.startsWith("."))return n.findAll(function(l){return n!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.findAll(function(l){return n!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?n.findAll(function(l){return n!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return n.findAll(function(l){return n!==l&&l.nodeName===e})}},{key:"is",value:function(e,n){if(e.startsWith("."))return n.className===this.getIdOrClassname(e);if(e.startsWith("#"))return n.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?n.name===s:this.attributeToString(n,a)===s}return n.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var n=e.match(tL),i="",a="";return n&&n.length>2&&(i=n[1].replace(/"/g,""),a=n[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,n){if(!e.getAttribute)return"";var i=e.getAttribute(n);return(0,ue.Z)(i)?"":i.toString?i.toString():""}}])}(),ht=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),Tr=function(r){function t(e,n,i,a,s,o,l,u){var c;return q(this,t),c=Ce(this,t,[null]),c.relatedNode=n,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return Oe(t,r),J(t)}(Ju);Tr.ADDITION=2,Tr.MODIFICATION=1,Tr.REMOVAL=3;function Cb(r){var t=r.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var rL=new Tr(ht.REPARENT,null,"","","",0,"",""),iL=$r.Ue(),Qu=R.Ue(),aL=R.al(1,1,1),sL=G.create(),oL=$r.Ue(),yi=R.Ue(),Ja=G.create(),bi=K.Ue(),lL=R.Ue(),uL=K.Ue(),cL=R.Ue(),io=R.Ue(),ta=R.Ue(),ec=G.create(),Ob=K.Ue(),Pb=K.Ue(),tc=K.Ue(),Df={affectChildren:!0},dL=function(){function r(t){q(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new yn(ht.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=t}return J(r,[{key:"matches",value:function(e,n){return this.runtime.sceneGraphSelector.is(e,n)}},{key:"querySelector",value:function(e,n){return this.runtime.sceneGraphSelector.selectOne(e,n)}},{key:"querySelectorAll",value:function(e,n){return this.runtime.sceneGraphSelector.selectAll(e,n)}},{key:"attach",value:function(e,n,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==n,this.detach(e));var o=e.nodeName===ve.FRAGMENT,l=Rf(n);e.parentNode=n;var u=o?e.childNodes:[e];(0,oe.Z)(i)?u.forEach(function(f){n.childNodes.splice(i,0,f),f.parentNode=n}):u.forEach(function(f){n.childNodes.push(f),f.parentNode=n});var c=n,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=yf.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(rL)}}},{key:"detach",value:function(e){if(e.parentNode){var n,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(n=o.sorted)!==null&&n!==void 0&&n.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=yf.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=[n,i,a]);var s=e.transformable;if(!(n[0]===s.origin[0]&&n[1]===s.origin[1]&&n[2]===s.origin[2])){var o=s.origin;o[0]=n[0],o[1]=n[1],o[2]=n[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,n);else{var o=bi;K.Su(o,n[0],n[1],n[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);K.JG(tc,u),K.U_(tc,tc),K.Jp(o,tc,o),K.Jp(s.localRotation,o,l),K.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;K.Su(Pb,n[0],n[1],n[2]),K.dC(s.localRotation,s.localRotation,Pb),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,n);else{K.Su(s.localRotation,n[0],n[1],n[2]);var o=this.getRotation(e.parentNode);K.JG(Ob,K.U_(bi,o)),K.dC(s.localRotation,s.localRotation,Ob),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof n=="number"&&(n=R.al(n,i,a));var o=e.transformable;K.Su(o.localRotation,n[0],n[1],n[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.al(n,i,a));var s=e.transformable;R.fS(n,Qu)||(R.VC(n,n,s.localRotation),R.IH(s.localPosition,s.localPosition,n),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,n){var i,a=e.transformable;if(ta[0]=n[0],ta[1]=n[1],ta[2]=(i=n[2])!==null&&i!==void 0?i:0,!R.fS(this.getPosition(e),ta)){if(R.JG(a.position,ta),e.parentNode===null||!e.parentNode.transformable)R.JG(a.localPosition,ta);else{var s=e.parentNode.transformable;G.copy(ec,s.worldTransform),G.invert(ec,ec),R.fF(a.localPosition,ta,ec)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;io[0]=n[0],io[1]=n[1],io[2]=(i=n[2])!==null&&i!==void 0?i:0,!R.fS(s.localPosition,io)&&(R.JG(s.localPosition,io),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,n){var i,a=e.transformable;R.Jp(a.localScale,a.localScale,R.t8(yi,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;R.t8(yi,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:s.localScale[2]),!R.fS(yi,s.localScale)&&(R.JG(s.localScale,yi),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R.t8(yi,n,i,a)),!R.fS(n,Qu)&&(R.IH(yi,this.getPosition(e),n),this.setPosition(e,yi))}},{key:"setRotation",value:function(e,n,i,a,s){var o=e.transformable;if(typeof n=="number"&&(n=K.al(n,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,n);else{var l=this.getRotation(e.parentNode);K.JG(bi,l),K.U_(bi,bi),K.Jp(o.localRotation,bi,n),K.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,n,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof n=="number"&&(n=K.t8(bi,n,i,a,s));var l=e.transformable;K.JG(l.localRotation,n),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof n=="number"&&(n=$r.t8(oL,n,i));var s=e.transformable;$r.JG(s.localSkew,n),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,n){Rf(e)||n.localDirtyFlag||(n.localDirtyFlag=!0,n.dirtyFlag||this.dirtifyWorld(e,n))}},{key:"dirtifyWorld",value:function(e,n){n.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,n),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var n=e.transformable;n&&(n.frozen=!1,n.dirtyFlag=!0,n.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===ve.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,n=new Set,i=function(s,o){!s.isConnected||n.has(s)||s.nodeName===ve.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),n.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==ve.FRAGMENT&&(Df.affectChildren=a,a?s.forEach(function(o){i(o,Df)}):i(s,Df))}),n.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)Cb(i),i=i.parentNode;n&&e.forEach(function(a){Cb(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,n)}},{key:"updateDisplayObjectDependency",value:function(e,n,i,a){if(n&&n!==i){var s=this.displayObjectDependencyMap.get(n);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var n=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){n.dirtifyToRoot(s,!0),s.dispatchEvent(new Tr(ht.ATTR_MODIFIED,s,n,n,a,Tr.MODIFICATION,n,n)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,n,n)})})}},{key:"getPosition",value:function(e){var n=e.transformable;return G.getTranslation(n.position,this.getWorldTransform(e,n))}},{key:"getRotation",value:function(e){var n=e.transformable;return G.getRotation(n.rotation,this.getWorldTransform(e,n))}},{key:"getScale",value:function(e){var n=e.transformable;return G.getScaling(n.scaling,this.getWorldTransform(e,n))}},{key:"getWorldTransform",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!n.localDirtyFlag&&!n.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,n)),n.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var n=e.localSkew[0]!==0||e.localSkew[1]!==0;if(n){G.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,R.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(G.identity(Ja),Ja[4]=Math.tan(e.localSkew[0]),Ja[1]=Math.tan(e.localSkew[1]),G.multiply(e.localTransform,e.localTransform,Ja));var i=G.fromRotationTranslationScaleOrigin(Ja,K.t8(bi,0,0,0,1),R.t8(yi,1,1,1),e.localScale,e.origin);G.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?G.fromTranslation(a,s):G.identity(a):G.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var n=e.transformable;return n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.localTransform}},{key:"setLocalTransform",value:function(e,n){var i=G.getTranslation(lL,n),a=G.getRotation(uL,n),s=G.getScaling(cL,n);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,aL,!1),this.setLocalPosition(e,Qu,!1),this.setLocalEulerAngles(e,Qu,void 0,void 0,!1),this.setLocalSkew(e,iL,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,n);if(!rn.isEmpty(a)){var s=i||new rn;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&ee.styleValueRegistry.updateGeometry(e);var s=n?a.renderBounds:a.contentBounds||null;return s||new rn}},{key:"getBounds",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=n.getBounds(h,i);f&&(l?l.add(f):(l=o||new rn,l.update(f.center,f.halfExtents)))}),l||(l=new rn),i){var c=mR(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var n=sL;e.parentNode.transformable&&(n=G.invert(Ja,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!rn.isEmpty(i)){var a=new rn;return a.setFromTransformedAABB(i,n),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var n,i,a=this.getGeometryBounds(e);rn.isEmpty(a)||(i=new rn,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(n=e.ownerDocument)===null||n===void 0||(n=n.defaultView)===null||n===void 0?void 0:n.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Re(o,2),u=l[0],c=l[1],d=i.getMax(),h=Re(d,2),f=h[0],v=h[1];return new Xa(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new Xa((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,n){var i=this;if(!n.dirtyFlag){n.dirtyFlag=!0,n.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var n=e.transformable;if(!n.frozen){n.frozen=!0,(n.localDirtyFlag||n.dirtyFlag)&&this.sync(e,n);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,n){if(n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?G.copy(n.worldTransform,n.localTransform):G.multiply(n.worldTransform,a.worldTransform,n.localTransform),n.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var n=e.parentNode;n;){var i=n.transformable;i&&(i.frozen=!1),n=n.parentNode}}}])}(),na={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Nb=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,hL=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,fL=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,vL=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,gL=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,pL=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,mL=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,yL=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,bL=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,xL=new RegExp("".concat(hL.source,"|").concat(vL.source,"|").concat(pL.source,"|").concat(yL.source)),EL=new RegExp("".concat(fL.source,"|").concat(gL.source,"|").concat(mL.source,"|").concat(bL.source)),wL=function(){function r(t){var e=this;q(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(n,i){return e.isBreakingSpace(i)?!1:!!(n&&(EL.exec(i)||xL.exec(n)))},this.trimByKinsokuShorui=function(n){var i=jt(n),a=i[i.length-2];if(!a)return n;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=t}return J(r,[{key:"measureFont",value:function(e,n){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(n),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(n,{willReadFrequently:!0});s.font=e;var o=na.MetricsString+na.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(na.BaselineSymbol).width),c=na.HeightMultiplier*u;u=u*na.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,p=!1;for(v=0;v<u;++v){for(var m=0;m<f;m+=4)if(d[g+m]!==255){p=!0;break}if(!p)g+=f;else break}for(i.ascent=u-v,g=h-f,p=!1,v=c;v>u;--v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){p=!0;break}if(!p)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,n,i){var a=n.fontSize,s=a===void 0?16:a,o=n.wordWrap,l=o===void 0?!1:o,u=n.lineHeight,c=n.lineWidth,d=c===void 0?1:c,h=n.textBaseline,f=h===void 0?"alphabetic":h,v=n.textAlign,g=v===void 0?"start":v,p=n.letterSpacing,m=p===void 0?0:p,y=n.textPath;n.textPathSide,n.textPathStartOffset;var b=n.leading,_=b===void 0?0:b,w=RR(n),x=this.measureFont(w,i);x.fontSize===0&&(x.fontSize=s,x.ascent=s);var E=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);E.font=w,n.isOverflowing=!1;var k=l?this.wordWrap(e,n,i):e,O=k.split(/(?:\r\n|\r|\n)/),P=new Array(O.length),M=0;if(y){y.getTotalLength();for(var L=0;L<O.length;L++)E.measureText(O[L]).width+(O[L].length-1)*m}else{for(var D=0;D<O.length;D++){var z=E.measureText(O[D]).width+(O[D].length-1)*m;P[D]=z,M=Math.max(M,z)}var F=M+d,C=u||x.fontSize+d,S=Math.max(C,x.fontSize+d)+(O.length-1)*(C+_);C+=_;var T=0;return f==="middle"?T=-S/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?T=-S:(f==="top"||f==="hanging")&&(T=0),{font:w,width:F,height:S,lines:O,lineWidths:P,lineHeight:C,maxLineWidth:M,fontProperties:x,lineMetrics:P.map(function(N,B){var I=0;return g==="center"||g==="middle"?I-=N/2:(g==="right"||g==="end")&&(I-=N),new Xa(I-d/2,T+B*C,N+d,C)})}}}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(e,n,i){var a=this,s=n.wordWrapWidth,o=s===void 0?0:s,l=n.letterSpacing,u=l===void 0?0:l,c=n.maxLines,d=c===void 0?1/0:c,h=n.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);for(var p=[],m=0,y=0,b={},_=function(T){return a.getFromCache(T,u,b,f)},w=Array.from(g).reduce(function(S,T){return S+_(T)},0),x=Array.from(e),E=0;E<x.length;E++){var k=x[E],O=e[E-1],P=e[E+1],M=_(k);if(this.isNewline(k)){if(m++,m>=d){n.isOverflowing=!0;break}y=0,p[m]="";continue}if(y>0&&y+M>v){if(m+1>=d){if(n.isOverflowing=!0,w>0&&w<=v){for(var L=p[m].length,D=0,z=L,F=0;F<L;F++){var C=_(p[m][F]);if(D+C+w>v){z=F;break}D+=C}p[m]=(p[m]||"").slice(0,z)+g}break}if(m++,y=0,p[m]="",this.isBreakingSpace(k))continue;this.canBreakInLastChar(k)||(p=this.trimToBreakable(p),y=this.sumTextWidthByCache(p[m]||"",b)),this.shouldBreakByKinsokuShorui(k,P)&&(p=this.trimByKinsokuShorui(p),y+=_(O||""))}y+=M,p[m]=(p[m]||"")+k}return p.join(`
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:na.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:na.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var n=jt(e),i=n[n.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return n;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return n[n.length-1]+=i.slice(l,i.length),n[n.length-2]=i.slice(0,u),n}},{key:"canBreakInLastChar",value:function(e){return!(e&&Nb.test(e))}},{key:"sumTextWidthByCache",value:function(e,n){return e.split("").reduce(function(i,a){if(!n[a])throw Error("cannot count the word without cache");return i+n[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var n=e.length-1;n>=0;n--)if(!Nb.test(e[n]))return n;return-1}},{key:"getFromCache",value:function(e,n,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*n;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),ee={},kL=function(r){var t=new YR,e=new UR;return r={},Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(r,ve.CIRCLE,new WR),ve.ELLIPSE,new ZR),ve.RECT,t),ve.IMAGE,t),ve.GROUP,new KR),ve.LINE,new VR),ve.TEXT,new XR(ee)),ve.POLYLINE,e),ve.POLYGON,e),ve.PATH,new HR),Ae(Ae(r,ve.HTML,new $R),ve.MESH,null)}(),_L=function(r){var t=new rR,e=new Nf;return r={},Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(r,ne.PERCENTAGE,null),ne.NUMBER,new lR),ne.ANGLE,new tR),ne.DEFINED_PATH,new nR),ne.PAINT,t),ne.COLOR,t),ne.FILTER,new iR),ne.LENGTH,e),ne.LENGTH_PERCENTAGE,e),ne.LENGTH_PERCENTAGE_12,new aR),Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(Ae(r,ne.LENGTH_PERCENTAGE_14,new sR),ne.COORDINATE,new Nf),ne.OFFSET_DISTANCE,new uR),ne.OPACITY_VALUE,new cR),ne.PATH,new dR),ne.LIST_OF_POINTS,new hR),ne.SHADOW_BLUR,new fR),ne.TEXT,new vR),ne.TEXT_TRANSFORM,new gR),ne.TRANSFORM,new zR),Ae(Ae(Ae(r,ne.TRANSFORM_ORIGIN,new GR),ne.Z_INDEX,new jR),ne.MARKER,new oR)}(),SL=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:{}};ee.CameraContribution=Wy,ee.AnimationTimeline=null,ee.EasingFunction=null,ee.offscreenCanvasCreator=new eL,ee.sceneGraphSelector=new nL,ee.sceneGraphService=new dL(ee),ee.textService=new wL(ee),ee.geometryUpdaterFactory=kL,ee.CSSPropertySyntaxFactory=_L,ee.styleValueRegistry=new eR(ee),ee.layoutRegistry=null,ee.globalThis=SL(),ee.enableStyleSyntax=!0,ee.enableSizeAttenuation=!1;var Mb=0;function p4(){Mb=0}var Rb=new Tr(ht.INSERTED,null,"","","",0,"",""),Lb=new Tr(ht.REMOVED,null,"","","",0,"",""),TL=new yn(ht.DESTROY),AL=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.entity=Mb++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:HN.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return Oe(t,r),J(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(n){this.setAttribute("class",n)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(n){return n!==""})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n-1]||null}return null}},{key:"cloneNode",value:function(n){throw new Error(Ue)}},{key:"appendChild",value:function(n,i){var a;if(n.destroyed)throw new Error(MN);return ee.sceneGraphService.attach(n,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!Rf(this)&&n.nodeName===ve.FRAGMENT?this.ownerDocument.defaultView.mountFragment(n):this.ownerDocument.defaultView.mountChildren(n)),this.isMutationObserved&&(Rb.relatedNode=this,n.dispatchEvent(Rb)),n}},{key:"insertBefore",value:function(n,i){if(!i)this.appendChild(n);else{n.parentElement&&n.parentElement.removeChild(n);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(n):this.appendChild(n,a)}return n}},{key:"replaceChild",value:function(n,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(n,a),i}},{key:"removeChild",value:function(n){var i;return Lb.relatedNode=this,n.dispatchEvent(Lb),(i=n.ownerDocument)!==null&&i!==void 0&&i.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),ee.sceneGraphService.detach(n),n}},{key:"removeChildren",value:function(){for(var n=this.childNodes.length-1;n>=0;n--){var i=this.childNodes[n];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var n=this.childNodes.length-1;n>=0;n--){var i=this.childNodes[n];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(n){return ee.sceneGraphService.matches(n,this)}},{key:"getElementById",value:function(n){return ee.sceneGraphService.querySelector("#".concat(n),this)}},{key:"getElementsByName",value:function(n){return ee.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)}},{key:"getElementsByClassName",value:function(n){return ee.sceneGraphService.querySelectorAll(".".concat(n),this)}},{key:"getElementsByTagName",value:function(n){return ee.sceneGraphService.querySelectorAll(n,this)}},{key:"querySelector",value:function(n){return ee.sceneGraphService.querySelector(n,this)}},{key:"querySelectorAll",value:function(n){return ee.sceneGraphService.querySelectorAll(n,this)}},{key:"closest",value:function(n){var i=this;do{if(ee.sceneGraphService.matches(n,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(n){var i=this,a=null;return this.forEach(function(s){return s!==i&&n(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(n){var i=this,a=[];return this.forEach(function(s){s!==i&&n(s)&&a.push(s)}),a}},{key:"after",value:function(){var n=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=n.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var n,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(n=l).after.apply(n,jt(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return n.appendChild(o)})}},{key:"prepend",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return n.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.dispatchEvent(TL),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return ee.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return ee.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return ee.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return ee.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return ee.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(n){if(typeof n!="symbol"){var i=this.attributes[n];return i}}},{key:"hasAttribute",value:function(n){return this.getAttributeNames().includes(n)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(n){this.setAttribute(n,null),delete this.attributes[n]}},{key:"setAttribute",value:function(n,i,a,s){this.attributes[n]=i}},{key:"getAttributeNS",value:function(n,i){throw new Error(Ue)}},{key:"getAttributeNode",value:function(n){throw new Error(Ue)}},{key:"getAttributeNodeNS",value:function(n,i){throw new Error(Ue)}},{key:"hasAttributeNS",value:function(n,i){throw new Error(Ue)}},{key:"removeAttributeNS",value:function(n,i){throw new Error(Ue)}},{key:"removeAttributeNode",value:function(n){throw new Error(Ue)}},{key:"setAttributeNS",value:function(n,i,a){throw new Error(Ue)}},{key:"setAttributeNode",value:function(n){throw new Error(Ue)}},{key:"setAttributeNodeNS",value:function(n){throw new Error(Ue)}},{key:"toggleAttribute",value:function(n,i){throw new Error(Ue)}}])}(ea);function Je(r){return!!(r!=null&&r.nodeName)}var CL=ee.globalThis.Proxy?ee.globalThis.Proxy:function(){},jr=new Tr(ht.ATTR_MODIFIED,null,null,null,null,Tr.MODIFICATION,null,null),ao=R.Ue(),OL=K.Ue(),bn=function(r){function t(e){var n;return q(this,t),n=Ce(this,t),n.isCustomElement=!1,n.isMutationObserved=!1,n.activeAnimations=[],n.config=e,n.id=e.id||"",n.name=e.name||"",(e.className||e.class)&&(n.className=e.className||e.class),n.nodeName=e.type||ve.GROUP,e.initialParsedStyle&&Object.assign(n.parsedStyle,e.initialParsedStyle),n.initAttributes(e.style),ee.enableStyleSyntax&&(n.style=new CL({setProperty:function(a,s){n.setAttribute(a,s)},getPropertyValue:function(a){return n.getAttribute(a)},removeProperty:function(a){n.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:n.getAttribute(s)},set:function(a,s,o){return n.setAttribute(s,o),!0}})),n}return Oe(t,r),J(t,[{key:"destroy",value:function(){Sy(t,"destroy",this,3)([]),this.getAnimations().forEach(function(n){n.cancel()})}},{key:"cloneNode",value:function(n,i){var a=dt({},this.attributes);for(var s in a){var o=a[s];Je(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(n)),i&&(a[s]=i(s,o))}var l=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:a});return l.setLocalTransform(this.getLocalTransform()),n&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(n);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};ee.styleValueRegistry.processProperties(this,n,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ce.Z)(i)||(a||i!==this.attributes[n])&&(this.internalSetAttribute(n,i,{memoize:s}),Sy(t,"setAttribute",this,3)([n,i]))}},{key:"internalSetAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[n],l=this.parsedStyle[n];ee.styleValueRegistry.processProperties(this,Ae({},n,i),a),s.dirty=!0;var u=this.parsedStyle[n];if(this.isConnected&&(jr.relatedNode=this,jr.prevValue=o,jr.newValue=i,jr.attrName=n,jr.prevParsedValue=l,jr.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(jr):(jr.target=this,this.ownerDocument.defaultView.dispatchEvent(jr,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,n,o,i,l,u)}}},{key:"getBBox",value:function(){var n=this.getBounds(),i=n.getMin(),a=Re(i,2),s=a[0],o=a[1],l=n.getMax(),u=Re(l,2),c=u[0],d=u[1];return new Xa(s,o,c-s,d-o)}},{key:"setOrigin",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ee.sceneGraphService.setOrigin(this,Vt(n,i,a,!1)),this}},{key:"getOrigin",value:function(){return ee.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ee.sceneGraphService.setPosition(this,Vt(n,i,a,!1)),this}},{key:"setLocalPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ee.sceneGraphService.setLocalPosition(this,Vt(n,i,a,!1)),this}},{key:"translate",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ee.sceneGraphService.translate(this,Vt(n,i,a,!1)),this}},{key:"translateLocal",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ee.sceneGraphService.translateLocal(this,Vt(n,i,a,!1)),this}},{key:"getPosition",value:function(){return ee.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return ee.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(n,i,a){return this.scaleLocal(n,i,a)}},{key:"scaleLocal",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=Vt(n,i,a,!1)),ee.sceneGraphService.scaleLocal(this,n),this}},{key:"setLocalScale",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=Vt(n,i,a,!1)),ee.sceneGraphService.setLocalScale(this,n),this}},{key:"getLocalScale",value:function(){return ee.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return ee.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var n=pf(ao,ee.sceneGraphService.getWorldTransform(this)),i=Re(n,3),a=i[2];return Ln(a)}},{key:"getLocalEulerAngles",value:function(){var n=pf(ao,ee.sceneGraphService.getLocalRotation(this)),i=Re(n,3),a=i[2];return Ln(a)}},{key:"setEulerAngles",value:function(n){return ee.sceneGraphService.setEulerAngles(this,0,0,n),this}},{key:"setLocalEulerAngles",value:function(n){return ee.sceneGraphService.setLocalEulerAngles(this,0,0,n),this}},{key:"rotateLocal",value:function(n,i,a){return(0,ue.Z)(i)&&(0,ue.Z)(a)?ee.sceneGraphService.rotateLocal(this,0,0,n):ee.sceneGraphService.rotateLocal(this,n,i,a),this}},{key:"rotate",value:function(n,i,a){return(0,ue.Z)(i)&&(0,ue.Z)(a)?ee.sceneGraphService.rotate(this,0,0,n):ee.sceneGraphService.rotate(this,n,i,a),this}},{key:"setRotation",value:function(n,i,a,s){return ee.sceneGraphService.setRotation(this,n,i,a,s),this}},{key:"setLocalRotation",value:function(n,i,a,s){return ee.sceneGraphService.setLocalRotation(this,n,i,a,s),this}},{key:"setLocalSkew",value:function(n,i){return ee.sceneGraphService.setLocalSkew(this,n,i),this}},{key:"getRotation",value:function(){return ee.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return ee.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return ee.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return ee.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return ee.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(n){return ee.sceneGraphService.setLocalTransform(this,n),this}},{key:"resetLocalTransform",value:function(){ee.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(n,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,n,i):null}},{key:"isVisible",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(n){this.style.pointerEvents=n?"auto":"none"}},{key:"isInteractive",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,jt(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,jt(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,yt.Z)(o)?(Object.keys(o).forEach(function(u){n.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(n){var i=n||this.getWorldTransform(),a=G.getTranslation(ao,i),s=Re(a,2),o=s[0],l=s[1],u=G.getScaling(ao,i),c=Re(u,2),d=c[0],h=c[1],f=G.getRotation(OL,i),v=pf(ao,f),g=Re(v,3),p=g[0],m=g[2];return zN(p||m,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(n){var i=Fy(n),a=Re(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(n){var i=Fy(n),a=Re(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(n){n.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(n){n.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(n){return this.children[n]||null}},{key:"add",value:function(n,i){return this.appendChild(n,i)}},{key:"set",value:function(n,i){this.config[n]=i}},{key:"get",value:function(n){return this.config[n]}},{key:"moveTo",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"move",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"setZIndex",value:function(n){return this.style.zIndex=n,this}}])}(AL),If=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return q(this,t),Ce(this,t,[dt({type:ve.CIRCLE},e)])}return Oe(t,r),J(t)}(bn),PL=["style"],NL=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=qi(n,PL);return q(this,t),e=Ce(this,t,[dt({style:i},a)]),e.isCustomElement=!0,e}return Oe(t,r),J(t)}(bn),ML=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return q(this,t),Ce(this,t,[dt({type:ve.ELLIPSE},e)])}return Oe(t,r),J(t)}(bn),m4=null,xn=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return q(this,t),Ce(this,t,[dt({type:ve.GROUP},e)])}return Oe(t,r),J(t)}(bn),RL=["style"],LL=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=qi(n,RL);return q(this,t),e=Ce(this,t,[dt({type:ve.HTML,style:i},a)]),e.cullable.enable=!1,e}return Oe(t,r),J(t,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var n=G.invert(G.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!rn.isEmpty(i)){var a=new rn;return a.setFromTransformedAABB(i,n),a}}return this.getBounds()}}])}(bn),DL=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return q(this,t),Ce(this,t,[dt({type:ve.IMAGE},e)])}return Oe(t,r),J(t)}(bn),IL=["style"],Db=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=qi(n,IL);q(this,t),e=Ce(this,t,[dt({type:ve.LINE,style:dt({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&Je(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Je(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Oe(t,r),J(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="x1"||n==="y1"||n==="x2"||n==="y2"||n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Je(s)&&(this.markerStartAngle=0,s.remove()),o&&Je(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(s&&Je(s)&&(this.markerEndAngle=0,s.remove()),o&&Je(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=n?a:s;if(!(!f||!Je(f))){var v=0,g,p,m,y,b,_;n?(m=u,y=d,g=c-u,p=h-d,b=o||0,_=this.markerStartAngle):(m=c,y=h,g=u-c,p=d-h,b=l||0,_=this.markerEndAngle),v=Math.atan2(p,g),f.setLocalEulerAngles(v*180/Math.PI+_),f.setLocalPosition(m+Math.cos(v)*b,y+Math.sin(v)*b)}}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,ct.U4)(s,o,l,u,n),d=c.x,h=c.y,f=R.fF(R.Ue(),R.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new Rn(f[0],f[1])}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var n=this.parsedStyle,i=n.x1,a=n.y1,s=n.x2,o=n.y2;return(0,ct.Xk)(i,a,s,o)}}])}(bn),BL=["style"],Bf=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=qi(n,BL);q(this,t),e=Ce(this,t,[dt({type:ve.PATH,style:i,initialParsedStyle:{miterLimit:4,d:dt({},Zy)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Je(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Je(u)&&e.placeMarkerMid(u),l&&Je(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Oe(t,r),J(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Je(s)&&(this.markerStartAngle=0,s.remove()),o&&Je(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Je(s)&&(this.markerEndAngle=0,s.remove()),o&&Je(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=n?a:s;if(!(!u||!Je(u))){var c=0,d,h,f,v,g,p;if(n){var m=this.getStartTangent(),y=Re(m,2),b=y[0],_=y[1];f=_[0],v=_[1],d=b[0]-_[0],h=b[1]-_[1],g=o||0,p=this.markerStartAngle}else{var w=this.getEndTangent(),x=Re(w,2),E=x[0],k=x[1];f=k[0],v=k[1],d=E[0]-k[0],h=E[1]-k[1],g=l||0,p=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+p),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),n&&Je(n))for(var a=1;a<i.length-1;a++){var s=Re(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?n:n.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return rb(this)}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,Fv.r)(a,n),o=s.x,l=s.y,u=R.fF(R.Ue(),R.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new Rn(u[0],u[1])}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(n*rb(this),i)}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.d.segments,i=[];if(n.length>1){var a=n[0].currentPoint,s=n[1].currentPoint,o=n[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.d.segments,i=n.length,a=[];if(i>1){var s=n[i-2].currentPoint,o=n[i-1].currentPoint,l=n[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(bn),FL=["style"],Ib=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=qi(n,FL);q(this,t),e=Ce(this,t,[dt({type:ve.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Je(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Je(u)&&e.placeMarkerMid(u),l&&Je(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Oe(t,r),J(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Je(s)&&(this.markerStartAngle=0,s.remove()),o&&Je(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Je(s)&&(this.markerEndAngle=0,s.remove()),o&&Je(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=n?a:s;if(!(!h||!Je(h)||!d)){var f=0,v,g,p,m,y,b;if(p=d[0][0],m=d[0][1],n)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],y=o||0,b=this.markerStartAngle;else{var _=d.length;this.parsedStyle.isClosed?(v=d[_-1][0]-d[0][0],g=d[_-1][1]-d[0][1]):(p=d[_-1][0],m=d[_-1][1],v=d[_-2][0]-d[_-1][0],g=d[_-2][1]-d[_-1][1]),y=l||0,b=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+b),h.setLocalPosition(p+Math.cos(f)*y,m+Math.sin(f)*y)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],n&&Je(n)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?n:n.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(bn),zL=["style"],GL=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=qi(e,zL);return q(this,t),Ce(this,t,[dt({type:ve.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return Oe(t,r),J(t,[{key:"getTotalLength",value:function(){return TM(this)}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(m,y){a[y+1]&&(l=[0,0],l[0]=o/c,u=(0,ct.Xk)(m[0],m[1],a[y+1][0],a[y+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(m,y){n>=m[0]&&n<=m[1]&&(d=(n-m[0])/(m[1]-m[0]),h=y)});var f=(0,ct.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,p=R.fF(R.Ue(),R.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new Rn(p[0],p[1])}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.points.points,i=[];return i.push([n[1][0],n[1][1]]),i.push([n[0][0],n[0][1]]),i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.points.points,i=n.length-1,a=[];return a.push([n[i-1][0],n[i-1][1]]),a.push([n[i][0],n[i][1]]),a}}])}(Ib),Qa=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return q(this,t),Ce(this,t,[dt({type:ve.RECT},e)])}return Oe(t,r),J(t)}(bn),jL=["style"],WL=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=qi(e,jL);return q(this,t),Ce(this,t,[dt({type:ve.TEXT,style:dt({fill:"black"},n)},i)])}return Oe(t,r),J(t,[{key:"getComputedTextLength",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(bn),y4=null,b4={number:function(t){return new je(t)},percent:function(t){return new je(t,"%")},px:function(t){return new je(t,"px")},em:function(t){return new je(t,"em")},rem:function(t){return new je(t,"rem")},deg:function(t){return new je(t,"deg")},grad:function(t){return new je(t,"grad")},rad:function(t){return new je(t,"rad")},turn:function(t){return new je(t,"turn")},s:function(t){return new je(t,"s")},ms:function(t){return new je(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,i=t.interpolable,a=t.initialValue,s=t.syntax;ee.styleValueRegistry.registerMetadata({n:e,inh:n,int:i,d:a,syntax:s})},registerLayout:function(t,e){ee.layoutRegistry.registerLayout(t,e)}},x4=null,ZL=function(){function r(t){q(this,r),this.strategies=t}return J(r,[{key:"apply",value:function(e){var n=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(n,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new yn(ht.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();ZL.tag="Culling";var VL=function(){function r(){var t=this;q(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new qR(null),this.rootWheelEvent=new JR(null),this.onPointerMove=function(e){var n,i=(n=t.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=t.normalizeToPointerEvent(e,i),s=Ua(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=t.bootstrapEvent(t.rootPointerEvent,l,i,e);t.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,i=(n=t.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView,a=t.normalizeToPointerEvent(e,i),s=Ua(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=t.bootstrapEvent(t.rootPointerEvent,l,i,e);t.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}t.setCursor(t.context.eventService.cursor)}}return J(r,[{key:"apply",value:function(e){var n=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=n.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=n.normalizeWheelEvent(s);n.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.normalizeToPointerEvent(s,a);if(n.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=Ua(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.bootstrapEvent(n.rootPointerEvent,d,a,s);n.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.context.contextService.getDomElement(),l=n.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=n.normalizeToPointerEvent(s,a),d=Ua(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=n.bootstrapEvent(n.rootPointerEvent,f,a,s);v.type+=u,n.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=n.normalizeToPointerEvent(s,a),l=Ua(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=n.bootstrapEvent(n.rootPointerEvent,c,a,s);n.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}n.setCursor(n.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,n,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=n.pointerId,e.width=n.width,e.height=n.height,e.isPrimary=n.isPrimary,e.pointerType=n.pointerType,e.pressure=n.pressure,e.tangentialPressure=n.tangentialPressure,e.tiltX=n.tiltX,e.tiltY=n.tiltY,e.twist=n.twist,this.transferMouseData(e,n);var s=this.context.eventService.client2Viewport({x:n.clientX,y:n.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=bR[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var n=this.rootWheelEvent;this.transferMouseData(n,e),n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;n.viewport.x=a,n.viewport.y=s;var o=this.context.eventService.viewport2Canvas(n.viewport),l=o.x,u=o.y;return n.canvas.x=l,n.canvas.y=u,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.nativeEvent=e,n.type=e.type,n}},{key:"transferMouseData",value:function(e,n){e.isTrusted=n.isTrusted,e.srcElement=n.srcElement,e.timeStamp=xR.now(),e.type=n.type,e.altKey=n.altKey,e.metaKey=n.metaKey,e.shiftKey=n.shiftKey,e.ctrlKey=n.ctrlKey,e.button=n.button,e.buttons=n.buttons,e.client.x=n.clientX,e.client.y=n.clientY,e.movement.x=n.movementX,e.movement.y=n.movementY,e.page.x=n.pageX,e.page.y=n.pageY,e.screen.x=n.screenX,e.screen.y=n.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,n){var i=[];if(n.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ce.Z)(s.button)&&(s.button=0),(0,ce.Z)(s.buttons)&&(s.buttons=1),(0,ce.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ce.Z)(s.width)&&(s.width=s.radiusX||1),(0,ce.Z)(s.height)&&(s.height=s.radiusY||1),(0,ce.Z)(s.tiltX)&&(s.tiltX=0),(0,ce.Z)(s.tiltY)&&(s.tiltY=0),(0,ce.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ce.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ce.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ce.Z)(s.twist)&&(s.twist=0),(0,ce.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(n.isMouseEvent(e)){var o=e;(0,ce.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ce.Z)(o.width)&&(o.width=1),(0,ce.Z)(o.height)&&(o.height=1),(0,ce.Z)(o.tiltX)&&(o.tiltX=0),(0,ce.Z)(o.tiltY)&&(o.tiltY=0),(0,ce.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ce.Z)(o.pointerId)&&(o.pointerId=yR),(0,ce.Z)(o.pressure)&&(o.pressure=.5),(0,ce.Z)(o.twist)&&(o.twist=0),(0,ce.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();VL.tag="Event";var E4=[ve.CIRCLE,ve.ELLIPSE,ve.IMAGE,ve.RECT,ve.LINE,ve.POLYLINE,ve.POLYGON,ve.TEXT,ve.PATH,ve.HTML],w4=null,HL=function(){function r(){q(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return J(r,[{key:"apply",value:function(e){var n=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var p=g.target;p.renderable.dirty=!0,a.dirtify()},c=function(g){n.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var p=g.target;ee.enableSizeAttenuation&&ee.styleValueRegistry.updateSizeAttenuation(p,l.getCamera().getZoom())},h=function(g){var p=g.target,m=p.rBushNode;m.aabb&&n.rBush.remove(m.aabb),n.syncTasks.delete(p),ee.sceneGraphService.dirtifyToRoot(p),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(ht.MOUNTED,d),l.addEventListener(ht.UNMOUNTED,h),l.addEventListener(ht.ATTR_MODIFIED,u),l.addEventListener(ht.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(ht.MOUNTED,d),l.removeEventListener(ht.UNMOUNTED,h),l.removeEventListener(ht.ATTR_MODIFIED,u),l.removeEventListener(ht.BOUNDS_CHANGED,c),n.syncTasks.clear()});var f=(i=ee.globalThis.requestIdleCallback)!==null&&i!==void 0?i:_b.bind(ee.globalThis);a.hooks.endFrame.tap(r.tag,function(){n.isFirstTimeRendering?(n.isFirstTimeRendering=!1,n.syncing=!0,f(function(){n.syncRTree(!0),n.isFirstTimeRenderingFinished=!0})):n.syncRTree()})}},{key:"syncNode",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;n&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new rn),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Re(o,2),u=l[0],c=l[1],d=a.getMax(),h=Re(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!n&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,n);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();HL.tag="Prepare";function k4(r){return!!r.document}var Ff=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),_4=500,S4=.1,T4=1e3,A4=new yn(ht.MOUNTED),C4=new yn(ht.UNMOUNTED),O4=new yn(Ff.BEFORE_RENDER),P4=new yn(Ff.RERENDER),N4=new yn(Ff.AFTER_RENDER),M4=null;var UL=function(r){function t(){var e;q(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=Ce(this,t,[].concat(i)),e.landmarks=[],e}return Oe(t,r),J(t,[{key:"rotate",value:function(n,i,a){if(this.relElevation=Ka(i),this.relAzimuth=Ka(n),this.relRoll=Ka(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Ye.EXPLORING){var s=K.yY(K.Ue(),[1,0,0],Ge((this.rotateWorld?1:-1)*this.relElevation)),o=K.yY(K.Ue(),[0,1,0],Ge((this.rotateWorld?1:-1)*this.relAzimuth)),l=K.yY(K.Ue(),[0,0,1],Ge(this.relRoll)),u=K.Jp(K.Ue(),o,s);u=K.Jp(K.Ue(),u,l);var c=G.fromQuat(G.create(),u);G.translate(this.matrix,this.matrix,[0,0,-this.distance]),G.multiply(this.matrix,this.matrix,c),G.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===Ye.ORBITING||this.type===Ye.EXPLORING?this._getPosition():this.type===Ye.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(n,i){var a=Vt(n,i,0),s=R.d9(this.position);return R.IH(s,s,R.bA(R.Ue(),this.right,a[0])),R.IH(s,s,R.bA(R.Ue(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(n){var i=this.forward,a=R.d9(this.position),s=n*this.dollyingStep,o=this.distance+n*this.dollyingStep;return s=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,a[0]+=s*i[0],a[1]+=s*i[1],a[2]+=s*i[2],this._setPosition(a),this.type===Ye.ORBITING||this.type===Ye.EXPLORING?this._getDistance():this.type===Ye.TRACKING&&R.IH(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(n){var i,a,s,o,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=l.position,c=u===void 0?this.position:u,d=l.focalPoint,h=d===void 0?this.focalPoint:d,f=l.roll,v=l.zoom,g=new ee.CameraContribution;g.setType(this.type,void 0),g.setPosition(c[0],(i=c[1])!==null&&i!==void 0?i:this.position[1],(a=c[2])!==null&&a!==void 0?a:this.position[2]),g.setFocalPoint(h[0],(s=h[1])!==null&&s!==void 0?s:this.focalPoint[1],(o=h[2])!==null&&o!==void 0?o:this.focalPoint[2]),g.setRoll(f!=null?f:this.roll),g.setZoom(v!=null?v:this.zoom);var p={name:n,matrix:G.clone(g.getWorldTransform()),right:R.d9(g.right),up:R.d9(g.up),forward:R.d9(g.forward),position:R.d9(g.getPosition()),focalPoint:R.d9(g.getFocalPoint()),distanceVector:R.d9(g.getDistanceVector()),distance:g.getDistance(),dollyingStep:g.getDollyingStep(),azimuth:g.getAzimuth(),elevation:g.getElevation(),roll:g.getRoll(),relAzimuth:g.relAzimuth,relElevation:g.relElevation,relRoll:g.relRoll,zoom:g.getZoom()};return this.landmarks.push(p),p}},{key:"gotoLandmark",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=(0,Se.Z)(n)?this.landmarks.find(function(M){return M.name===n}):n;if(s){var o=(0,oe.Z)(a)?{duration:a}:a,l=o.easing,u=l===void 0?"linear":l,c=o.duration,d=c===void 0?100:c,h=o.easingFunction,f=h===void 0?void 0:h,v=o.onfinish,g=v===void 0?void 0:v,p=o.onframe,m=p===void 0?void 0:p,y=.01;this.cancelLandmarkAnimation();var b=s.position,_=s.focalPoint,w=s.zoom,x=s.roll,E=f||ee.EasingFunction(u),k,O=function(){i.setFocalPoint(_),i.setPosition(b),i.setRoll(x),i.setZoom(w),i.computeMatrix(),i.triggerUpdate(),g==null||g()};if(d===0)return O();var P=function(L){k===void 0&&(k=L);var D=L-k;if(D>=d){O();return}var z=E(D/d),F=R.Ue(),C=R.Ue(),S=1,T=0;R.t7(F,i.focalPoint,_,z),R.t7(C,i.position,b,z),T=i.roll*(1-z)+x*z,S=i.zoom*(1-z)+w*z,i.setFocalPoint(F),i.setPosition(C),i.setRoll(T),i.setZoom(S);var N=R.TK(F,_)+R.TK(C,b);if(N<=y&&w===void 0&&x===void 0)return O();i.computeMatrix(),i.triggerUpdate(),D<d&&(m==null||m(z),i.landmarkAnimationID=i.canvas.requestAnimationFrame(P))};this.canvas.requestAnimationFrame(P)}}}])}(Wy);ee.CameraContribution=UL;var Bb=null,R4=0,Fb=new WeakMap,L4=null,D4=null,nc,Wr;function I4(r,t){return nc=new Bb(r,t)}function B4(r){return Wr||(Wr=Bb.copy(nc),Wr.oldValue=r,Wr)}function F4(){nc=Wr=void 0}function YL(r){return r===Wr||r===nc}function z4(r,t){return r===t?r:Wr&&YL(r)?Wr:null}function XL(r){r.nodes.forEach(function(t){var e=Fb.get(t);e&&e.forEach(function(n){n.observer===r&&n.removeTransientObservers()})})}function G4(r,t){for(var e=r;e;e=e.parentNode){var n=Fb.get(e);if(n)for(var i=0;i<n.length;i++){var a=n[i],s=a.options;if(!(e!==r&&!s.subtree)){var o=t(s);o&&a.enqueue(o)}}}}var zf=!1,Gf=null;function j4(r){Gf.push(r),zf||(zf=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(jf):jf())}function jf(){zf=!1;var r=Gf;Gf=[],r.sort(function(e,n){return e.uid-n.uid});var t=!1;r.forEach(function(e){var n=e.takeRecords();XL(e),n.length&&(e.callback(n,e),t=!0)}),t&&jf()}var Wf=function(r){function t(e,n,i,a){var s;return q(this,t),s=Ce(this,t,[e]),s.currentTime=i,s.timelineTime=a,s.target=n,s.type="finish",s.bubbles=!1,s.currentTarget=n,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=i,s.timelineTime=a,s}return Oe(t,r),J(t)}(Ju),KL=0,$L=function(){function r(t,e){var n;q(this,r),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(KL++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((n=this.effect)===null||n===void 0?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return J(r,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(n,i){e.resolveReadyPromise=function(){n(e)},e.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(n,i){e.resolveFinishedPromise=function(){n(e)},e.rejectFinishedPromise=function(){i(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){if(e=Number(e),!isNaN(e)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var n;this._startTime=Number((n=this.timeline)===null||n===void 0?void 0:n.currentTime)-e/this.playbackRate}this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var n=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),n!==null&&(this.currentTime=n),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var e=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==e&&(n==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):e==="pending"?this.resolveReadyPromise():n==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&n!==e&&(n==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):n==="finished"?this.resolveFinishedPromise():e==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=n,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var n=new Wf(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(n)})}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e,n=(e=this.effect)===null||e===void 0?void 0:e.target;return n.getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),n=e.indexOf(this);n!==-1&&e.splice(n,1)}},{key:"tick",value:function(e,n){!this._idle&&!this._paused&&(this._startTime===null?n&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),n&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(Ue)}},{key:"addEventListener",value:function(e,n,i){throw new Error(Ue)}},{key:"removeEventListener",value:function(e,n,i){throw new Error(Ue)}},{key:"dispatchEvent",value:function(e){throw new Error(Ue)}},{key:"commitStyles",value:function(){throw new Error(Ue)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var e;this._inEffect=!!((e=this.effect)!==null&&e!==void 0&&e.update(-1))}else{var n;this._inEffect=!!((n=this.effect)!==null&&n!==void 0&&n.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,n){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!n&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var n=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new Wf(null,this,this.currentTime,e);setTimeout(function(){n.onfinish&&n.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new Wf(null,this,this.currentTime,e);this.onframe(a)}this._finishedFlag=!1}}}])}(),qL=4,JL=.001,QL=1e-7,eD=10,so=11,rc=1/(so-1),tD=typeof Float32Array=="function",zb=function(t,e){return 1-3*e+3*t},Gb=function(t,e){return 3*e-6*t},jb=function(t){return 3*t},ic=function(t,e,n){return((zb(e,n)*t+Gb(e,n))*t+jb(e))*t},Wb=function(t,e,n){return 3*zb(e,n)*t*t+2*Gb(e,n)*t+jb(e)},nD=function(t,e,n,i,a){var s,o,l=0;do o=e+(n-e)/2,s=ic(o,i,a)-t,s>0?n=o:e=o;while(Math.abs(s)>QL&&++l<eD);return o},rD=function(t,e,n,i){for(var a=0;a<qL;++a){var s=Wb(e,n,i);if(s===0)return e;var o=ic(e,n,i)-t;e-=o/s}return e},Zf=function(t,e,n,i){if(!(t>=0&&t<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===i)return function(l){return l};for(var a=tD?new Float32Array(so):new Array(so),s=0;s<so;++s)a[s]=ic(s*rc,t,n);var o=function(u){for(var c=0,d=1,h=so-1;d!==h&&a[d]<=u;++d)c+=rc;--d;var f=(u-a[d])/(a[d+1]-a[d]),v=c+f*rc,g=Wb(v,t,n);return g>=JL?rD(u,v,t,n):g===0?v:nD(u,c,c+rc,t,n)};return function(l){return l===0||l===1?l:ic(o(l),e,i)}},iD=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},ac=function(t){return Math.pow(t,2)},sc=function(t){return Math.pow(t,3)},oc=function(t){return Math.pow(t,4)},lc=function(t){return Math.pow(t,5)},uc=function(t){return Math.pow(t,6)},cc=function(t){return 1-Math.cos(t*Math.PI/2)},dc=function(t){return 1-Math.sqrt(1-t*t)},hc=function(t){return t*t*(3*t-2)},fc=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((e*3-2)/22-t,2)},vc=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=Re(e,2),i=n[0],a=i===void 0?1:i,s=n[1],o=s===void 0?.5:s,l=(0,Ne.Z)(Number(a),1,10),u=(0,Ne.Z)(Number(o),.1,2);return t===0||t===1?t:-l*Math.pow(2,10*(t-1))*Math.sin((t-1-u/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/u)},oo=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=Re(e,4),a=i[0],s=a===void 0?1:a,o=i[1],l=o===void 0?100:o,u=i[2],c=u===void 0?10:u,d=i[3],h=d===void 0?0:d;s=(0,Ne.Z)(s,.1,1e3),l=(0,Ne.Z)(l,.1,1e3),c=(0,Ne.Z)(c,.1,1e3),h=(0,Ne.Z)(h,.1,1e3);var f=Math.sqrt(l/s),v=c/(2*Math.sqrt(l*s)),g=v<1?f*Math.sqrt(1-v*v):0,p=1,m=v<1?(v*f+-h)/g:-h+f,y=n?n*t/1e3:t;return v<1?y=Math.exp(-y*v*f)*(p*Math.cos(g*y)+m*Math.sin(g*y)):y=(p+m*y)*Math.exp(-y*f),t===0||t===1?t:1-y},Vf=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e,i=Re(n,2),a=i[0],s=a===void 0?10:a,o=i[1],l=o==="start"?Math.ceil:Math.floor;return l((0,Ne.Z)(t,0,1)*s)/s},Zb=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=Re(e,4),i=n[0],a=n[1],s=n[2],o=n[3];return Zf(i,a,s,o)(t)},gc=Zf(.42,0,1,1),In=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-t(1-e,n,i)}},Bn=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?t(e*2,n,i)/2:1-t(e*-2+2,n,i)/2}},Fn=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?(1-t(1-e*2,n,i))/2:(t(e*2-1,n,i)+1)/2}},Vb={steps:Vf,"step-start":function(t){return Vf(t,[1,"start"])},"step-end":function(t){return Vf(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Zb,ease:function(t){return Zb(t,[.25,.1,.25,1])},in:gc,out:In(gc),"in-out":Bn(gc),"out-in":Fn(gc),"in-quad":ac,"out-quad":In(ac),"in-out-quad":Bn(ac),"out-in-quad":Fn(ac),"in-cubic":sc,"out-cubic":In(sc),"in-out-cubic":Bn(sc),"out-in-cubic":Fn(sc),"in-quart":oc,"out-quart":In(oc),"in-out-quart":Bn(oc),"out-in-quart":Fn(oc),"in-quint":lc,"out-quint":In(lc),"in-out-quint":Bn(lc),"out-in-quint":Fn(lc),"in-expo":uc,"out-expo":In(uc),"in-out-expo":Bn(uc),"out-in-expo":Fn(uc),"in-sine":cc,"out-sine":In(cc),"in-out-sine":Bn(cc),"out-in-sine":Fn(cc),"in-circ":dc,"out-circ":In(dc),"in-out-circ":Bn(dc),"out-in-circ":Fn(dc),"in-back":hc,"out-back":In(hc),"in-out-back":Bn(hc),"out-in-back":Fn(hc),"in-bounce":fc,"out-bounce":In(fc),"in-out-bounce":Bn(fc),"out-in-bounce":Fn(fc),"in-elastic":vc,"out-elastic":In(vc),"in-out-elastic":Bn(vc),"out-in-elastic":Fn(vc),spring:oo,"spring-in":oo,"spring-out":In(oo),"spring-in-out":Bn(oo),"spring-out-in":Fn(oo)},aD=function(t){return iD(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},sD=function(t){return Vb[aD(t)]||Vb.linear},oD=function(t){return t},lD=1,uD=.5,Hb=0;function Ub(r,t){return function(e){if(e>=1)return 1;var n=1/r;return e+=t*n,e-e%n}}var pc="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",cD=new RegExp("cubic-bezier\\(".concat(pc,",").concat(pc,",").concat(pc,",").concat(pc,"\\)")),dD=/steps\(\s*(\d+)\s*\)/,hD=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Hf(r){var t=cD.exec(r);if(t)return Zf.apply(void 0,jt(t.slice(1).map(Number)));var e=dD.exec(r);if(e)return Ub(Number(e[1]),Hb);var n=hD.exec(r);return n?Ub(Number(n[1]),{start:lD,middle:uD,end:Hb}[n[2]]):sD(r)}function fD(r){return Math.abs(vD(r)/(r.playbackRate||1))}function vD(r){var t;return r.duration===0||r.iterations===0?0:(r.duration==="auto"?0:Number(r.duration))*((t=r.iterations)!==null&&t!==void 0?t:1)}var Yb=0,Uf=1,mc=2,Xb=3;function gD(r,t,e){if(t===null)return Yb;var n=e.endTime;return t<Math.min(e.delay,n)?Uf:t>=Math.min(e.delay+r+e.endDelay,n)?mc:Xb}function pD(r,t,e,n,i){switch(n){case Uf:return t==="backwards"||t==="both"?0:null;case Xb:return e-i;case mc:return t==="forwards"||t==="both"?r:null;case Yb:return null}}function mD(r,t,e,n,i){var a=i;return r===0?t!==Uf&&(a+=e):a+=n/r,a}function yD(r,t,e,n,i,a){var s=r===1/0?t%1:r%1;return s===0&&e===mc&&n!==0&&(i!==0||a===0)&&(s=1),s}function bD(r,t,e,n){return r===mc&&t===1/0?1/0:e===1?Math.floor(n)-1:Math.floor(n)}function xD(r,t,e){var n=r;if(r!=="normal"&&r!=="reverse"){var i=t;r==="alternate-reverse"&&(i+=1),n="normal",i!==1/0&&i%2!==0&&(n="reverse")}return n==="normal"?e:1-e}function ED(r,t,e){var n=gD(r,t,e),i=pD(r,e.fill,t,n,e.delay);if(i===null)return null;var a=e.duration==="auto"?0:e.duration,s=mD(a,n,e.iterations,i,e.iterationStart),o=yD(s,e.iterationStart,n,e.iterations,i,a),l=bD(n,e.iterations,o,s),u=xD(e.direction,l,o);return e.currentIteration=l,e.progress=u,e.easingFunction(u)}function wD(r,t,e){var n=kD(r,t),i=_D(n,e);return function(a,s){if(s!==null)i.filter(function(l){return s>=l.applyFrom&&s<l.applyTo}).forEach(function(l){var u=s-l.startOffset,c=l.endOffset-l.startOffset,d=c===0?0:u/c;a.setAttribute(l.property,l.interpolation(d),!1,!1)});else for(var o in n)Kb(o)&&a.setAttribute(o,null)}}function Kb(r){return r!=="offset"&&r!=="easing"&&r!=="composite"&&r!=="computedOffset"}function kD(r,t){for(var e={},n=0;n<r.length;n++)for(var i in r[n])if(Kb(i)){var a={offset:r[n].offset,computedOffset:r[n].computedOffset,easing:r[n].easing,easingFunction:Hf(r[n].easing)||t.easingFunction,value:r[n][i]};e[i]=e[i]||[],e[i].push(a)}return e}function _D(r,t){var e=[];for(var n in r)for(var i=r[n],a=0;a<i.length-1;a++){var s=a,o=a+1,l=i[s].computedOffset,u=i[o].computedOffset,c=l,d=u;a===0&&(c=-1/0,u===0&&(o=s)),a===i.length-2&&(d=1/0,l===1&&(s=o)),e.push({applyFrom:c,applyTo:d,startOffset:i[s].computedOffset,endOffset:i[o].computedOffset,easingFunction:i[s].easingFunction,property:n,interpolation:SD(n,i[s].value,i[o].value,t)})}return e.sort(function(h,f){return h.startOffset-f.startOffset}),e}var $b=function(t,e,n){return function(i){var a=qb(t,e,i);return(0,oe.Z)(a)?a:n(a)}};function SD(r,t,e,n){var i=pb[r];if(i&&i.syntax&&i.int){var a=ee.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var s=a.parser,o=s?s(t,n):t,l=s?s(e,n):e,u=a.mixer(o,l,n);if(u){var c=$b.apply(void 0,jt(u));return function(d){return d===0?t:d===1?e:c(d)}}}}return $b(!1,!0,function(d){return d?e:t})}function qb(r,t,e){if(typeof r=="number"&&typeof t=="number")return r*(1-e)+t*e;if(typeof r=="boolean"&&typeof t=="boolean"||typeof r=="string"&&typeof t=="string")return e<.5?r:t;if(Array.isArray(r)&&Array.isArray(t)){for(var n=r.length,i=t.length,a=Math.max(n,i),s=[],o=0;o<a;o++)s.push(qb(r[o<n?o:n-1],t[o<i?o:i-1],e));return s}throw new Error("Mismatched interpolation arguments ".concat(r,":").concat(t))}var TD=function(){function r(){q(this,r),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=oD,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return J(r,[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=Hf(e),this._easing=e}}])}();function AD(r){var t=[];for(var e in r)if(!(e in["easing","offset","composite"])){var n=r[e];Array.isArray(n)||(n=[n]);for(var i=n.length,a=0;a<i;a++){if(!t[a]){var s={};"offset"in r&&(s.offset=Number(r.offset)),"easing"in r&&(s.easing=r.easing),"composite"in r&&(s.composite=r.composite),t[a]=s}n[a]!==void 0&&n[a]!==null&&(t[a][e]=n[a])}}return t.sort(function(o,l){return(o.computedOffset||0)-(l.computedOffset||0)}),t}function Jb(r,t){if(r===null)return[];Array.isArray(r)||(r=AD(r));for(var e=r.map(function(l){var u={};t!=null&&t.composite&&(u.composite="auto");for(var c in l){var d=l[c];if(c==="offset"){if(d!==null){if(d=Number(d),!isFinite(d))throw new Error("Keyframe offsets must be numbers.");if(d<0||d>1)throw new Error("Keyframe offsets must be between 0 and 1.");u.computedOffset=d}}else if(c==="composite"&&["replace","add","accumulate","auto"].indexOf(d)===-1)throw new Error("".concat(d," compositing is not supported"));u[c]=d}return u.offset===void 0&&(u.offset=null),u.easing===void 0&&(u.easing=(t==null?void 0:t.easing)||"linear"),u.composite===void 0&&(u.composite="auto"),u}),n=!0,i=-1/0,a=0;a<e.length;a++){var s=e[a].offset;if((0,ue.Z)(s))n=!1;else{if(s<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=s}}e=e.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function o(){var l,u=e,c=u.length;if(e[c-1].computedOffset=Number((l=e[c-1].offset)!==null&&l!==void 0?l:1),c>1){var d;e[0].computedOffset=Number((d=e[0].offset)!==null&&d!==void 0?d:0)}for(var h=0,f=Number(e[0].computedOffset),v=1;v<c;v++){var g=e[v].computedOffset;if(!(0,ue.Z)(g)&&!(0,ue.Z)(f)){for(var p=1;p<v-h;p++)e[h+p].computedOffset=f+(Number(g)-f)*p/(v-h);h=v,f=Number(g)}}}return n||o(),e}var CD="backwards|forwards|both|none".split("|"),OD="reverse|alternate|alternate-reverse".split("|");function PD(r,t){var e=new TD;return t&&(e.fill="both",e.duration="auto"),typeof r=="number"&&!isNaN(r)?e.duration=r:r!==void 0&&Object.keys(r).forEach(function(n){if(r[n]!==void 0&&r[n]!==null&&r[n]!=="auto"){if((typeof e[n]=="number"||n==="duration")&&(typeof r[n]!="number"||isNaN(r[n]))||n==="fill"&&CD.indexOf(r[n])===-1||n==="direction"&&OD.indexOf(r[n])===-1)return;e[n]=r[n]}}),e}function ND(r,t){var e;return r=MD((e=r)!==null&&e!==void 0?e:{duration:"auto"}),PD(r,t)}function MD(r){return typeof r=="number"&&(isNaN(r)?r={duration:"auto"}:r={duration:r}),r}var RD=function(){function r(t,e,n){var i=this;q(this,r),this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=ND(n,!1),this.timing.effect=this,this.timing.activeDuration=fD(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Jb(e,this.timing),this.interpolations=wD(this.normalizedKeyframes,this.timing,this.target);var a=ee.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,l){return l==="duration"?o.duration==="auto"?0:o.duration:l==="fill"?o.fill==="auto"?"none":o.fill:l==="localTime"?i.animation&&i.animation.currentTime||null:l==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:l==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[l]},set:function(){return!0}}):this.timing}return J(r,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return e===null?!1:(this.timeFraction=ED(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=Jb(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var n=this;Object.keys(e||{}).forEach(function(i){n.timing[i]=e[i]})}}])}();function Qb(r,t){return Number(r.id)-Number(t.id)}var LD=function(){function r(t){var e=this;q(this,r),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(n){e.currentTime=n,e.discardAnimations(),e.animations.length===0?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(n){var i=e.rafCallbacks;e.rafCallbacks=[],n<Number(e.currentTime)&&(n=Number(e.currentTime)),e.animations.sort(Qb),e.animations=e.tick(n,!0,e.animations)[0],i.forEach(function(a){a[1](n)}),e.applyPendingEffects()},this.document=t}return J(r,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,n,i){var a=new RD(e,n,i),s=new $L(a,this);return this.animations.push(s),this.restartWebAnimationsNextTick(),s.updatePromises(),s.play(),s.updatePromises(),s}},{key:"applyDirtiedAnimation",value:function(e){var n=this;if(!this.inTick){e.markTarget();var i=e.targetAnimations();i.sort(Qb);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(s){var o=n.animations.indexOf(s);o!==-1&&n.animations.splice(o,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var n=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([n,e]),n}},{key:"requestAnimationFrame",value:function(e){var n=this;return this.rAF(function(i){n.updateAnimationsPromises(),e(i),n.updateAnimationsPromises()})}},{key:"tick",value:function(e,n,i){var a=this,s,o;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var l=[],u=[],c=[],d=[];return i.forEach(function(h){h.tick(e,n),h._inEffect?(u.push(h.effect),h.markTarget()):(l.push(h.effect),h.unmarkTarget()),h._needsTick&&(a.ticking=!0);var f=h._inEffect||h._needsTick;h._inTimeline=f,f?c.push(h):d.push(h)}),(s=this.pendingEffects).push.apply(s,l),(o=this.pendingEffects).push.apply(o,u),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[c,d]}}])}();ee.EasingFunction=Hf,ee.AnimationTimeline=LD;function e1(r,t){t(r),r.children&&r.children.forEach(function(e){e&&e1(e,t)})}function lo(r){yc(r,!0)}function rr(r){yc(r,!1)}function yc(r,t){var e=t?"visible":"hidden";e1(r,function(n){n.attr("visibility",e)})}var t1=Y(83845),DD=5,n1=function(r,t,e,n){e===void 0&&(e=0),n===void 0&&(n=DD),Object.entries(t).forEach(function(i){var a=(0,A.CR)(i,2),s=a[0],o=a[1],l=r;Object.prototype.hasOwnProperty.call(t,s)&&(o?(0,t1.Z)(o)?((0,t1.Z)(r[s])||(l[s]={}),e<n?n1(r[s],o,e+1,n):l[s]=t[s]):(0,da.Z)(o)?(l[s]=[],l[s]=l[s].concat(o)):l[s]=o:l[s]=o)})},_t=function(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];for(var n=0;n<t.length;n+=1)n1(r,t[n]);return r},ID=function(r){(0,A.ZT)(t,r);function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=r.apply(this,(0,A.ev)([],(0,A.CR)(e),!1))||this;return i.isMutationObserved=!0,i.addEventListener(ht.INSERTED,function(){rr(i)}),i}return t}(xn);function r1(r){var t=r.appendChild(new ID({class:"offscreen"}));return rr(t),t}function BD(r){for(var t=r;t;){if(t.className==="offscreen")return!0;t=t.parent}return!1}function FD(){yc(this,this.attributes.visibility!=="hidden")}var ft=function(r){(0,A.ZT)(t,r);function t(e,n){n===void 0&&(n={});var i=r.call(this,_t({},{style:n},e))||this;return i.initialized=!1,i._defaultOptions=n,i}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=r1(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),t.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},t.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},t.prototype.attributeChangedCallback=function(e){e==="visibility"&&FD.call(this)},t.prototype.update=function(e,n){var i;return this.attr(_t({},this.attributes,e||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,n)},t.prototype.clear=function(){this.removeChildren()},t.prototype.bindEvents=function(e,n){},t.prototype.getSubShapeStyle=function(e){var n=e.x,i=e.y,a=e.transform,s=e.transformOrigin,o=e.class,l=e.className,u=e.zIndex,c=(0,A._T)(e,["x","y","transform","transformOrigin","class","className","zIndex"]);return c},t}(NL);function Yf(r){return r.toString().charAt(0).toUpperCase()+r.toString().slice(1)}function zD(r){return r.toString().charAt(0).toLowerCase()+r.toString().slice(1)}function GD(r,t){return"".concat(t).concat(Yf(r))}function i1(r,t,e){var n;e===void 0&&(e=!0);var i=t||((n=r.match(/^([a-z][a-z0-9]+)/))===null||n===void 0?void 0:n[0])||"",a=r.replace(new RegExp("^(".concat(i,")")),"");return e?zD(a):a}function jD(r,t){Object.entries(t).forEach(function(e){var n=(0,A.CR)(e,2),i=n[0],a=n[1];(0,A.ev)([r],(0,A.CR)(r.querySelectorAll(i)),!1).filter(function(s){return s.matches(i)}).forEach(function(s){if(s){var o=s;o.style.cssText+=Object.entries(a).reduce(function(l,u){return"".concat(l).concat(u.join(":"),";")},"")}})})}var bc=function(r,t){if(!(r!=null&&r.startsWith(t)))return!1;var e=r[t.length];return e>="A"&&e<="Z"};function xe(r,t,e){e===void 0&&(e=!1);var n={};return Object.entries(r).forEach(function(i){var a=(0,A.CR)(i,2),s=a[0],o=a[1];if(!(s==="className"||s==="class")){if(bc(s,"show")&&bc(i1(s,"show"),t)!==e)s===GD(t,"show")?n[s]=o:n[s.replace(new RegExp(Yf(t)),"")]=o;else if(!bc(s,"show")&&bc(s,t)!==e){var l=i1(s,t);l==="filter"&&typeof o=="function"||(n[l]=o)}}}),n}function es(r,t){return Object.entries(r).reduce(function(e,n){var i=(0,A.CR)(n,2),a=i[0],s=i[1];return a.startsWith("show")?e["show".concat(t).concat(a.slice(4))]=s:e["".concat(t).concat(Yf(a))]=s,e},{})}function Zr(r,t){t===void 0&&(t=["x","y","class","className"]);var e=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],n={},i={};return Object.entries(r).forEach(function(a){var s=(0,A.CR)(a,2),o=s[0],l=s[1];t.includes(o)||(e.indexOf(o)!==-1?i[o]=l:n[o]=l)}),[n,i]}var Xf=function(r){(0,A.ZT)(t,r);function t(e){e===void 0&&(e={});var n=e.style,i=(0,A._T)(e,["style"]);return r.call(this,(0,A.pi)({style:(0,A.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},i))||this}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=r1(this)),this._offscreen},enumerable:!1,configurable:!0}),t.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},t}(WL);function WD(r,t){var e=new Map;return r.forEach(function(n){var i=t(n);e.has(i)||e.set(i,[]),e.get(i).push(n)}),e}function ZD(r){throw new Error(r)}var VD=function(){function r(i,a,s,o,l,u,c){i===void 0&&(i=null),a===void 0&&(a=null),s===void 0&&(s=null),o===void 0&&(o=null),l===void 0&&(l=[null,null,null,null,null]),u===void 0&&(u=[]),c===void 0&&(c=[]),t.add(this),this._elements=Array.from(i),this._data=a,this._parent=s,this._document=o,this._enter=l[0],this._update=l[1],this._exit=l[2],this._merge=l[3],this._split=l[4],this._transitions=u,this._facetElements=c}r.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(a,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(this._elements,null,this._parent,this._document,void 0,void 0,a)},r.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new e([a],null,a,this._document)},r.prototype.append=function(i){var a=this,s=typeof i=="function"?i:function(){return a.createElement(i)},o=[];if(this._data!==null){for(var l=0;l<this._data.length;l++){var u=this._data[l],c=(0,A.CR)(Array.isArray(u)?u:[u,null],2),d=c[0],h=c[1],f=s(d,l);f.__data__=d,h!==null&&(f.__fromElements__=h),this._parent.appendChild(f),o.push(f)}return new e(o,null,this._parent,this._document)}for(var l=0;l<this._elements.length;l++){var v=this._elements[l],d=v.__data__,f=s(d,l);v.appendChild(f),o.push(f)}return new e(o,null,o[0],this._document)},r.prototype.maybeAppend=function(i,a){var s=(0,A.Q_)(this,t,"m",n).call(this,i[0]==="#"?i:"#".concat(i),a);return s.attr("id",i),s},r.prototype.maybeAppendByClassName=function(i,a){var s=i.toString(),o=(0,A.Q_)(this,t,"m",n).call(this,s[0]==="."?s:".".concat(s),a);return o.attr("className",s),o},r.prototype.maybeAppendByName=function(i,a){var s=(0,A.Q_)(this,t,"m",n).call(this,'[name="'.concat(i,'"]'),a);return s.attr("name",i),s},r.prototype.data=function(i,a,s){var o,l;a===void 0&&(a=function(P){return P}),s===void 0&&(s=function(){return null});for(var u=[],c=[],d=new Set(this._elements),h=[],f=new Set,v=new Map(this._elements.map(function(P,M){return[a(P.__data__,M),P]})),g=new Map(this._facetElements.map(function(P,M){return[a(P.__data__,M),P]})),p=WD(this._elements,function(P){return s(P.__data__)}),m=0;m<i.length;m++){var y=i[m],b=a(y,m),_=s(y,m);if(v.has(b)){var w=v.get(b);w.__data__=y,w.__facet__=!1,c.push(w),d.delete(w),v.delete(b)}else if(g.has(b)){var w=g.get(b);w.__data__=y,w.__facet__=!0,c.push(w),g.delete(b)}else if(p.has(b)){var x=p.get(b);h.push([y,x]);try{for(var E=(o=void 0,(0,A.XA)(x)),k=E.next();!k.done;k=E.next()){var w=k.value;d.delete(w)}}catch(P){o={error:P}}finally{try{k&&!k.done&&(l=E.return)&&l.call(E)}finally{if(o)throw o.error}}p.delete(b)}else if(v.has(_)){var w=v.get(_);w.__toData__?w.__toData__.push(y):w.__toData__=[y],f.add(w),d.delete(w)}else u.push(y)}var O=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(d,null,this._parent,this._document),new e([],h,this._parent,this._document),new e(f,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,O)},r.prototype.merge=function(i){var a=(0,A.ev)((0,A.ev)([],(0,A.CR)(this._elements),!1),(0,A.CR)(i._elements),!1),s=(0,A.ev)((0,A.ev)([],(0,A.CR)(this._transitions),!1),(0,A.CR)(i._transitions),!1);return new e(a,null,this._parent,this._document,void 0,s)},r.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=e.registry[i];return a?new a:ZD("Unknown node type: ".concat(i))},r.prototype.join=function(i,a,s,o,l){i===void 0&&(i=function(v){return v}),a===void 0&&(a=function(v){return v}),s===void 0&&(s=function(v){return v.remove()}),o===void 0&&(o=function(v){return v}),l===void 0&&(l=function(v){return v.remove()});var u=i(this._enter),c=a(this._update),d=s(this._exit),h=o(this._merge),f=l(this._split);return c.merge(u).merge(d).merge(h).merge(f)},r.prototype.remove=function(){for(var i=function(o){var l=a._elements[o],u=a._transitions[o];u?u.then(function(){return l.remove()}):l.remove()},a=this,s=0;s<this._elements.length;s++)i(s);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var s=this._elements[a],o=s.__data__;i.call(s,o,a)}return this},r.prototype.attr=function(i,a){var s=typeof a!="function"?function(){return a}:a;return this.each(function(o,l){a!==void 0&&(this[i]=s.call(this,o,l))})},r.prototype.style=function(i,a,s){s===void 0&&(s=!0);var o=typeof a!="function"||!s?function(){return a}:a;return this.each(function(l,u){a!==void 0&&(this.style[i]=o.call(this,l,u))})},r.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(s,o){var l=this;Object.entries(i).forEach(function(u){var c=(0,A.CR)(u,2),d=c[0],h=c[1],f=typeof h!="function"||!a?function(){return h}:h;h!==void 0&&l.attr(d,f.call(l,s,o))})})},r.prototype.update=function(i,a){a===void 0&&(a=!0);var s=typeof i!="function"||!a?function(){return i}:i;return this.each(function(o,l){i&&this.update&&this.update(s.call(this,o,l))})},r.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var s=typeof i!="function"||!a?function(){return i}:i;return this.each(function(o,l){i&&this.update&&this.update(s.call(this,o,l))})},r.prototype.transition=function(i){var a=this._transitions;return this.each(function(s,o){a[o]=i.call(this,s,o)})},r.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},r.prototype.call=function(i){for(var a=[],s=1;s<arguments.length;s++)a[s-1]=arguments[s];return i.call.apply(i,(0,A.ev)([this._parent,this],(0,A.CR)(a),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},r.prototype.parent=function(){return this._parent};var t,e,n;return e=r,t=new WeakSet,n=function(a,s){var o=this._elements[0],l=o.querySelector(a);if(l)return new e([l],null,this._parent,this._document);var u=typeof s=="string"?this.createElement(s):s();return o.appendChild(u),new e([u],null,this._parent,this._document)},r.registry={g:xn,rect:Qa,circle:If,path:Bf,text:Xf,ellipse:ML,image:DL,line:Db,polygon:Ib,polyline:GL,html:LL},r}();function he(r){return new VD([r],null,r,r.ownerDocument)}function HD(r,t,e){return r.querySelector(t)?he(r).select(t):he(r).append(e)}var It=function(){function r(t,e,n,i){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=i}return Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),r.fromRect=function(t){return new r(t.x,t.y,t.width,t.height)},r.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},r.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},r}();function W4(r){var t=r.getRenderBounds(),e=__read(t.min,2),n=e[0],i=e[1],a=__read(t.max,2),s=a[0],o=a[1],l=s-n,u=o-i;return new It(n,i,l,u)}var ir=function(r,t){var e=function(i){return"".concat(t,"-").concat(i)},n=Object.fromEntries(Object.entries(r).map(function(i){var a=(0,A.CR)(i,2),s=a[0],o=a[1],l=e(o);return[s,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(n,{prefix:e}),n};function Nt(r){if((0,oe.Z)(r))return[r,r,r,r];if((0,da.Z)(r)){var t=r.length;if(t===1)return[r[0],r[0],r[0],r[0]];if(t===2)return[r[0],r[1],r[0],r[1]];if(t===3)return[r[0],r[1],r[2],r[1]];if(t===4)return r}return[0,0,0,0]}function En(r,t,e,n,i){return n===void 0&&(n=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),r?e(t):(n&&i(t),null)}var a1=ir({text:"text"},"title");function xc(r){return/\S+-\S+/g.test(r)?r.split("-").map(function(t){return t[0]}):r.length>2?[r[0]]:r.split("")}function UD(r,t){var e=r.attributes,n=e.position,i=e.spacing,a=e.inset,s=e.text,o=r.getBBox(),l=t.getBBox(),u=xc(n),c=(0,A.CR)(Nt(s?i:0),4),d=c[0],h=c[1],f=c[2],v=c[3],g=(0,A.CR)(Nt(a),4),p=g[0],m=g[1],y=g[2],b=g[3],_=(0,A.CR)([v+h,d+f],2),w=_[0],x=_[1],E=(0,A.CR)([b+m,p+y],2),k=E[0],O=E[1];if(u[0]==="l")return new It(o.x,o.y,l.width+o.width+w+k,Math.max(l.height+O,o.height));if(u[0]==="t")return new It(o.x,o.y,Math.max(l.width+k,o.width),l.height+o.height+x+O);var P=(0,A.CR)([t.attributes.width||l.width,t.attributes.height||l.height],2),M=P[0],L=P[1];return new It(l.x,l.y,M+o.width+w+k,L+o.height+x+O)}function YD(r,t){var e=Object.entries(t).reduce(function(n,i){var a=(0,A.CR)(i,2),s=a[0],o=a[1],l=r.node().attr(s);return l||(n[s]=o),n},{});r.styles(e)}function XD(r){var t,e,n,i,a=r,s=a.width,o=a.height,l=a.position,u=(0,A.CR)([+s/2,+o/2],2),c=u[0],d=u[1],h=(0,A.CR)([+c,+d,"center","middle"],4),f=h[0],v=h[1],g=h[2],p=h[3],m=xc(l);return m.includes("l")&&(t=(0,A.CR)([0,"start"],2),f=t[0],g=t[1]),m.includes("r")&&(e=(0,A.CR)([+s,"end"],2),f=e[0],g=e[1]),m.includes("t")&&(n=(0,A.CR)([0,"top"],2),v=n[0],p=n[1]),m.includes("b")&&(i=(0,A.CR)([+o,"bottom"],2),v=i[0],p=i[1]),{x:f,y:v,textAlign:g,textBaseline:p}}var KD=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return t.prototype.getAvailableSpace=function(){var e=this,n=this.attributes,i=n.width,a=n.height,s=n.position,o=n.spacing,l=n.inset,u=e.querySelector(a1.text.class);if(!u)return new It(0,0,+i,+a);var c=u.getBBox(),d=c.width,h=c.height,f=(0,A.CR)(Nt(o),4),v=f[0],g=f[1],p=f[2],m=f[3],y=(0,A.CR)([0,0,+i,+a],4),b=y[0],_=y[1],w=y[2],x=y[3],E=xc(s);if(E.includes("i"))return new It(b,_,w,x);E.forEach(function(C,S){var T,N,B,I;C==="t"&&(T=(0,A.CR)(S===0?[h+p,+a-h-p]:[0,+a],2),_=T[0],x=T[1]),C==="r"&&(N=(0,A.CR)([+i-d-m],1),w=N[0]),C==="b"&&(B=(0,A.CR)([+a-h-v],1),x=B[0]),C==="l"&&(I=(0,A.CR)(S===0?[d+g,+i-d-g]:[0,+i],2),b=I[0],w=I[1])});var k=(0,A.CR)(Nt(l),4),O=k[0],P=k[1],M=k[2],L=k[3],D=(0,A.CR)([L+P,O+M],2),z=D[0],F=D[1];return new It(b+L,_+O,w-z,x-F)},t.prototype.getBBox=function(){return this.title?this.title.getBBox():new It(0,0,0,0)},t.prototype.render=function(e,n){var i=this,a=e.width,s=e.height,o=e.position,l=e.spacing,u=(0,A._T)(e,["width","height","position","spacing"]),c=(0,A.CR)(Zr(u),1),d=c[0],h=XD(e),f=h.x,v=h.y,g=h.textAlign,p=h.textBaseline;En(!!u.text,he(n),function(m){i.title=m.maybeAppendByClassName(a1.text,"text").styles(d).call(YD,{x:f,y:v,textAlign:g,textBaseline:p}).node()})},t}(ft),Kf=Y(13279);function zn(r,t){return(0,de.Z)(r)?r.apply(void 0,(0,A.ev)([],(0,A.CR)(t),!1)):r}function $D(r,t){return r.reduce(function(e,n){return(e[n[t]]=e[n[t]]||[]).push(n),e},{})}function qD(r){return typeof r=="boolean"?!1:"enter"in r&&"update"in r&&"exit"in r}function s1(r){if(!r)return{enter:!1,update:!1,exit:!1};var t=["enter","update","exit"],e=Object.fromEntries(Object.entries(r).filter(function(n){var i=(0,A.CR)(n,1),a=i[0];return!t.includes(a)}));return Object.fromEntries(t.map(function(n){return qD(r)?r[n]===!1?[n,!1]:[n,(0,A.pi)((0,A.pi)({},r[n]),e)]:[n,e]}))}function ts(r,t){r?r.finished.then(t):t()}function JD(r,t){r.length===0?t():Promise.all(r.map(function(e){return e==null?void 0:e.finished})).then(t)}function o1(r,t){"update"in r?r.update(t):r.attr(t)}function l1(r,t,e){if(t.length===0)return null;if(!e){var n=t.slice(-1)[0];return o1(r,{style:n}),null}return r.animate(t,e)}function QD(r,t){return!(r.nodeName!=="text"||t.nodeName!=="text"||r.attributes.text!==t.attributes.text)}function e3(r,t,e,n){if(n===void 0&&(n="destroy"),QD(r,t))return r.remove(),[null];var i=function(){n==="destroy"?r.destroy():n==="hide"&&rr(r),t.isVisible()&&lo(t)};if(!e)return i(),[null];var a=e.duration,s=a===void 0?0:a,o=e.delay,l=o===void 0?0:o,u=Math.ceil(+s/2),c=+s/4,d=(0,A.CR)(r.getGeometryBounds().center,2),h=d[0],f=d[1],v=(0,A.CR)(t.getGeometryBounds().center,2),g=v[0],p=v[1],m=(0,A.CR)([(h+g)/2-h,(f+p)/2-f],2),y=m[0],b=m[1],_=r.style.opacity,w=_===void 0?1:_,x=t.style.opacity,E=x===void 0?1:x,k=r.style.transform||"",O=t.style.transform||"",P=r.animate([{opacity:w,transform:"translate(0, 0) ".concat(k)},{opacity:0,transform:"translate(".concat(y,", ").concat(b,") ").concat(k)}],(0,A.pi)((0,A.pi)({fill:"both"},e),{duration:l+u+c})),M=t.animate([{opacity:0,transform:"translate(".concat(-y,", ").concat(-b,") ").concat(O),offset:.01},{opacity:E,transform:"translate(0, 0) ".concat(O)}],(0,A.pi)((0,A.pi)({fill:"both"},e),{duration:u+c,delay:l+u-c}));return ts(M,i),[P,M]}function ar(r,t,e){var n={},i={};return Object.entries(t).forEach(function(a){var s=(0,A.CR)(a,2),o=s[0],l=s[1];if(!(0,ue.Z)(l)){var u=r.style[o]||r.parsedStyle[o]||0;u!==l&&(n[o]=u,i[o]=l)}}),e?l1(r,[n,i],(0,A.pi)({fill:"both"},e)):(o1(r,i),null)}function t3(r){var t;return((t=r[0])===null||t===void 0?void 0:t.map(function(e,n){return r.map(function(i){return i[n]})}))||[]}function $f(r,t,e){e===void 0&&(e=!1);var n=r.getBBox(),i=n.width,a=n.height,s=t/Math.max(i,a);return e&&(r.style.transform="scale(".concat(s,")")),s}var u1=function(r,t,e){return[["M",r-e,t],["A",e,e,0,1,0,r+e,t],["A",e,e,0,1,0,r-e,t],["Z"]]},n3=u1,r3=function(r,t,e){return[["M",r-e,t-e],["L",r+e,t-e],["L",r+e,t+e],["L",r-e,t+e],["Z"]]},i3=function(r,t,e){return[["M",r-e,t],["L",r,t-e],["L",r+e,t],["L",r,t+e],["Z"]]},a3=function(r,t,e){var n=e*Math.sin(.3333333333333333*Math.PI);return[["M",r-e,t+n],["L",r,t-n],["L",r+e,t+n],["Z"]]},s3=function(r,t,e){var n=e*Math.sin(.3333333333333333*Math.PI);return[["M",r-e,t-n],["L",r+e,t-n],["L",r,t+n],["Z"]]},o3=function(r,t,e){var n=e/2*Math.sqrt(3);return[["M",r,t-e],["L",r+n,t-e/2],["L",r+n,t+e/2],["L",r,t+e],["L",r-n,t+e/2],["L",r-n,t-e/2],["Z"]]},l3=function(r,t,e){var n=e-1.5;return[["M",r-e,t-n],["L",r+e,t+n],["L",r+e,t-n],["L",r-e,t+n],["Z"]]},c1=function(r,t,e){return[["M",r,t+e],["L",r,t-e]]},u3=function(r,t,e){return[["M",r-e,t-e],["L",r+e,t+e],["M",r+e,t-e],["L",r-e,t+e]]},c3=function(r,t,e){return[["M",r-e/2,t-e],["L",r+e/2,t-e],["M",r,t-e],["L",r,t+e],["M",r-e/2,t+e],["L",r+e/2,t+e]]},d3=function(r,t,e){return[["M",r-e,t],["L",r+e,t],["M",r,t-e],["L",r,t+e]]},h3=function(r,t,e){return[["M",r-e,t],["L",r+e,t]]},d1=function(r,t,e){return[["M",r-e,t],["L",r+e,t]]},f3=d1,v3=function(r,t,e){return[["M",r-e,t],["A",e/2,e/2,0,1,1,r,t],["A",e/2,e/2,0,1,0,r+e,t]]},g3=function(r,t,e){return[["M",r-e-1,t-2.5],["L",r,t-2.5],["L",r,t+2.5],["L",r+e+1,t+2.5]]},p3=function(r,t,e){return[["M",r-e-1,t+2.5],["L",r,t+2.5],["L",r,t-2.5],["L",r+e+1,t-2.5]]},m3=function(r,t,e){return[["M",r-(e+1),t+2.5],["L",r-e/2,t+2.5],["L",r-e/2,t-2.5],["L",r+e/2,t-2.5],["L",r+e/2,t+2.5],["L",r+e+1,t+2.5]]};function y3(r,t){return[["M",r-5,t+2.5],["L",r-5,t],["L",r,t],["L",r,t-3],["L",r,t+3],["L",r+6.5,t+3]]}var b3=function(r,t,e){return[["M",r-e,t-e],["L",r+e,t],["L",r-e,t+e],["Z"]]},Gn=ir({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),x3=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:b3(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new xn({class:Gn.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new xn({class:Gn.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return Object.defineProperty(t.prototype,"defaultPage",{get:function(){var e=this.attributes.defaultPage;return(0,Ne.Z)(e,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageShape",{get:function(){var e=this.pageViews,n=(0,A.CR)(t3(e.map(function(d){var h=d.getBBox(),f=h.width,v=h.height;return[f,v]})).map(function(d){return Math.max.apply(Math,(0,A.ev)([],(0,A.CR)(d),!1))}),2),i=n[0],a=n[1],s=this.attributes,o=s.pageWidth,l=o===void 0?i:o,u=s.pageHeight,c=u===void 0?a:u;return{pageWidth:l,pageHeight:c}},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(t.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var e=r.prototype.getBBox.call(this),n=e.x,i=e.y,a=this.controllerShape,s=this.pageShape,o=s.pageWidth,l=s.pageHeight;return new It(n,i,o+a.width,l)},t.prototype.goTo=function(e){var n=this,i=this.attributes.animate,a=this,s=a.currPage,o=a.playState,l=a.playWindow,u=a.pageViews;if(o!=="idle"||e<0||u.length<=0||e>=u.length)return null;u[s].setLocalPosition(0,0),this.prepareFollowingPage(e);var c=(0,A.CR)(this.getFollowingPageDiff(e),2),d=c[0],h=c[1];this.playState="running";var f=l1(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-d,", ").concat(-h,")")}],i);return ts(f,function(){n.innerCurrPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo()}),f},t.prototype.prev=function(){var e=this.attributes.loop,n=this.pageViews.length,i=this.currPage;if(!e&&i<=0)return null;var a=e?(i-1+n)%n:(0,Ne.Z)(i-1,0,n);return this.goTo(a)},t.prototype.next=function(){var e=this.attributes.loop,n=this.pageViews.length,i=this.currPage;if(!e&&i>=n-1)return null;var a=e?(i+1)%n:(0,Ne.Z)(i+1,0,n);return this.goTo(a)},t.prototype.renderClipPath=function(e){var n=this.pageShape,i=n.pageWidth,a=n.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=e.maybeAppendByClassName(Gn.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},t.prototype.setVisiblePages=function(e){this.playWindow.children.forEach(function(n,i){e.includes(i)?lo(n):rr(n)})},t.prototype.adjustControllerLayout=function(){var e=this,n=e.prevBtnGroup,i=e.nextBtnGroup,a=e.pageInfoGroup,s=this.attributes,o=s.orientation,l=s.controllerPadding,u=a.getBBox(),c=u.width,d=u.height,h=(0,A.CR)(o==="horizontal"?[-180,0]:[-90,90],2),f=h[0],v=h[1];n.setLocalEulerAngles(f),i.setLocalEulerAngles(v);var g=n.getBBox(),p=g.width,m=g.height,y=i.getBBox(),b=y.width,_=y.height,w=Math.max(p,c,b),x=o==="horizontal"?{offset:[[0,0],[p/2+l,0],[p+c+l*2,0]],textAlign:"start"}:{offset:[[w/2,-m-l],[w/2,0],[w/2,_+l]],textAlign:"center"},E=(0,A.CR)(x.offset,3),k=(0,A.CR)(E[0],2),O=k[0],P=k[1],M=(0,A.CR)(E[1],2),L=M[0],D=M[1],z=(0,A.CR)(E[2],2),F=z[0],C=z[1],S=x.textAlign,T=a.querySelector("text");T&&(T.style.textAlign=S),n.setLocalPosition(O,P),a.setLocalPosition(L,D),i.setLocalPosition(F,C)},t.prototype.updatePageInfo=function(){var e,n=this,i=n.currPage,a=n.pageViews,s=n.attributes.formatter;a.length<2||((e=this.pageInfoGroup.querySelector(Gn.pageInfo.class))===null||e===void 0||e.attr("text",s(i+1,a.length)),this.adjustControllerLayout())},t.prototype.getFollowingPageDiff=function(e){var n=this.currPage;if(n===e)return[0,0];var i=this.attributes.orientation,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,l=e<n?-1:1;return i==="horizontal"?[l*s,0]:[0,l*o]},t.prototype.prepareFollowingPage=function(e){var n=this,i=n.currPage,a=n.pageViews;if(this.setVisiblePages([e,i]),e!==i){var s=(0,A.CR)(this.getFollowingPageDiff(e),2),o=s[0],l=s[1];a[e].setLocalPosition(o,l)}},t.prototype.renderController=function(e){var n=this,i=this.attributes.controllerSpacing,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,l=this.pageViews.length>=2,u=e.maybeAppendByClassName(Gn.controller,"g");if(yc(u.node(),l),!!l){var c=xe(this.attributes,"button"),d=xe(this.attributes,"pageNum"),h=(0,A.CR)(Zr(c),2),f=h[0],v=h[1],g=f.size,p=(0,A._T)(f,["size"]),m=!u.select(Gn.prevBtnGroup.class).node(),y=u.maybeAppendByClassName(Gn.prevBtnGroup,"g").styles(v);this.prevBtnGroup=y.node();var b=y.maybeAppendByClassName(Gn.prevBtn,"path"),_=u.maybeAppendByClassName(Gn.nextBtnGroup,"g").styles(v);this.nextBtnGroup=_.node();var w=_.maybeAppendByClassName(Gn.nextBtn,"path");[b,w].forEach(function(E){E.styles((0,A.pi)((0,A.pi)({},p),{transformOrigin:"center"})),$f(E.node(),g,!0)});var x=u.maybeAppendByClassName(Gn.pageInfoGroup,"g");this.pageInfoGroup=x.node(),x.maybeAppendByClassName(Gn.pageInfo,"text").styles(d),this.updatePageInfo(),u.node().setLocalPosition(s+i,o/2),m&&(this.prevBtnGroup.addEventListener("click",function(){n.prev()}),this.nextBtnGroup.addEventListener("click",function(){n.next()}))}},t.prototype.render=function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s;this.attr("transform","translate(".concat(a,", ").concat(o,")"));var l=he(n);this.renderClipPath(l),this.renderController(l),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},t.prototype.bindEvents=function(){var e=this,n=(0,Us.Z)(function(){return e.render(e.attributes,e)},50);this.playWindow.addEventListener(ht.INSERTED,n),this.playWindow.addEventListener(ht.REMOVED,n)},t}(ft);function E3(r){var t="default";if((0,yt.Z)(r)&&r instanceof Image)t="image";else if((0,de.Z)(r))t="symbol";else if((0,Se.Z)(r)){var e=new RegExp("data:(image|text)");r.match(e)?t="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(r)?t="url":t="symbol"}return t}function w3(r){var t=E3(r);return["base64","url","image"].includes(t)?"image":r&&t==="symbol"?"path":null}var Xe=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=this.getSubShapeStyle(e),u=l.symbol,c=l.size,d=c===void 0?16:c,h=(0,A._T)(l,["symbol","size"]),f=w3(u);En(!!f,he(n),function(v){v.maybeAppendByClassName("marker",f).attr("className","marker ".concat(f,"-marker")).call(function(g){if(f==="image"){var p=d*2;g.styles({img:u,width:p,height:p,x:a-d,y:o-d})}else{var p=d/2,m=(0,de.Z)(u)?u:t.getSymbol(u);g.styles((0,A.pi)({d:m==null?void 0:m(a,o,p)},h))}})})},t.MARKER_SYMBOL_MAP=new Map,t.registerSymbol=function(e,n){t.MARKER_SYMBOL_MAP.set(e,n)},t.getSymbol=function(e){return t.MARKER_SYMBOL_MAP.get(e)},t.getSymbols=function(){return Array.from(t.MARKER_SYMBOL_MAP.keys())},t}(ft);Xe.registerSymbol("cross",u3),Xe.registerSymbol("hyphen",h3),Xe.registerSymbol("line",c1),Xe.registerSymbol("plus",d3),Xe.registerSymbol("tick",c3),Xe.registerSymbol("circle",u1),Xe.registerSymbol("point",n3),Xe.registerSymbol("bowtie",l3),Xe.registerSymbol("hexagon",o3),Xe.registerSymbol("square",r3),Xe.registerSymbol("diamond",i3),Xe.registerSymbol("triangle",a3),Xe.registerSymbol("triangle-down",s3),Xe.registerSymbol("line",c1),Xe.registerSymbol("dot",d1),Xe.registerSymbol("dash",f3),Xe.registerSymbol("smooth",v3),Xe.registerSymbol("hv",g3),Xe.registerSymbol("vh",p3),Xe.registerSymbol("hvh",m3),Xe.registerSymbol("vhv",y3);function Z4(r,t,e){var n=Math.round((r-e)/t);return e+n*t}function k3(r,t,e){var n=1.4,i=n*e;return[["M",r-e,t-i],["L",r+e,t-i],["L",r+e,t+i],["L",r-e,t+i],["Z"]]}var h1=1.4,f1=.4;function _3(r,t,e){var n=e,i=n*h1,a=n/2,s=n/6,o=r+i*f1;return[["M",r,t],["L",o,t+a],["L",r+i,t+a],["L",r+i,t-a],["L",o,t-a],["Z"],["M",o,t+s],["L",r+i-2,t+s],["M",o,t-s],["L",r+i-2,t-s]]}function S3(r,t,e){var n=e,i=n*h1,a=n/2,s=n/6,o=t+i*f1;return[["M",r,t],["L",r-a,o],["L",r-a,t+i],["L",r+a,t+i],["L",r+a,o],["Z"],["M",r-s,o],["L",r-s,t+i-2],["M",r+s,o],["L",r+s,t+i-2]]}Xe.registerSymbol("hiddenHandle",k3),Xe.registerSymbol("verticalHandle",_3),Xe.registerSymbol("horizontalHandle",S3);var V4=function(r,t,e){return r===void 0&&(r="horizontal"),r==="horizontal"?t:e};function H4(r,t,e,n){var i;n===void 0&&(n=4);var a=__read(r,2),s=a[0],o=a[1],l=__read(t,2),u=l[0],c=l[1],d=__read(e,2),h=d[0],f=d[1],v=__read([u,c],2),g=v[0],p=v[1],m=p-g;return g>p&&(i=__read([p,g],2),g=i[0],p=i[1]),m>o-s?[s,o]:g<s?h===s&&f===p?[s,p]:[s,m+s]:p>o?f===o&&h===g?[g,o]:[o-m,o]:[g,p]}function qf(r,t,e){return r===void 0&&(r="horizontal"),r==="horizontal"?t:e}function U4(r){var t=r&&r.getRenderBounds();if(!t)return{width:0,height:0};var e=t.getMax(),n=t.getMin();return{width:e[0]-n[0],height:e[1]-n[1]}}function v1(r){var t=r.getLocalBounds(),e=t.min,n=t.max,i=(0,A.CR)([e,n],2),a=(0,A.CR)(i[0],2),s=a[0],o=a[1],l=(0,A.CR)(i[1],2),u=l[0],c=l[1];return{x:s,y:o,width:u-s,height:c-o,left:s,bottom:c,top:o,right:u}}function Y4(r,t){var e=select(r).append("text").node();return e.attr(__assign(__assign({},t),{visibility:"hidden"})),e}function T3(r,t){var e=(0,A.CR)(r,2),n=e[0],i=e[1],a=(0,A.CR)(t,2),s=a[0],o=a[1];return n!==s&&i===o}function X4(r,t){var e=__read(r,2),n=e[0],i=e[1],a=__read(t,2),s=a[0],o=a[1];return n===s&&i!==o}function A3(r,t){var e,n,i=t.attributes;try{for(var a=(0,A.XA)(Object.entries(i)),s=a.next();!s.done;s=a.next()){var o=(0,A.CR)(s.value,2),l=o[0],u=o[1];l!=="id"&&l!=="className"&&r.attr(l,u)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}function Vr(r){return typeof r=="function"?r():(0,Se.Z)(r)||(0,oe.Z)(r)?new Xf({style:{text:String(r)}}):r}var Ec,Jf;function K4(r){Jf=r}var C3=(0,rf.Z)(function(r,t){var e=t.fontSize,n=t.fontFamily,i=t.fontWeight,a=t.fontStyle,s=t.fontVariant;return Jf?Jf(r,e):(Ec||(Ec=ee.offscreenCanvasCreator.getOrCreateContext(void 0)),Ec.font=[a,s,i,"".concat(e,"px"),n].join(" "),Ec.measureText(r).width)},function(r,t){return[r,Object.values(t||g1(r)).join()].join("")},4096),g1=function(r){var t=r.style.fontFamily||"sans-serif",e=r.style.fontWeight||"normal",n=r.style.fontStyle||"normal",i=r.style.fontVariant,a=r.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:t,fontWeight:e,fontStyle:n,fontVariant:i}};function p1(r){return r.nodeName==="text"?r:r.nodeName==="g"&&r.children.length===1&&r.children[0].nodeName==="text"?r.children[0]:null}function m1(r,t){var e=p1(r);e&&e.attr(t)}function Qf(r,t,e){e===void 0&&(e="..."),m1(r,{wordWrap:!0,wordWrapWidth:t,maxLines:1,textOverflow:e})}var wn=ir({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function O3(r){var t=r.querySelector(wn.marker.class);return t?t.style:{}}var P3=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,e,{span:[1,1],marker:function(){return new If({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(t.prototype,"showValue",{get:function(){var e=this.attributes.valueText;return e?typeof e=="string"||typeof e=="number"?e!=="":typeof e=="function"?!0:e.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actualSpace",{get:function(){var e=this.labelGroup,n=this.valueGroup,i=this.attributes.markerSize,a=e.node().getBBox(),s=a.width,o=a.height,l=n.node().getBBox(),u=l.width,c=l.height;return{markerWidth:i,labelWidth:s,valueWidth:u,height:Math.max(i,o,c)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"span",{get:function(){var e=this.attributes.span;if(!e)return[1,1];var n=(0,A.CR)(Nt(e),2),i=n[0],a=n[1],s=this.showValue?a:0,o=i+s;return[i/o,s/o]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shape",{get:function(){var e,n=this.attributes,i=n.markerSize,a=n.width,s=this.actualSpace,o=s.markerWidth,l=s.height,u=this.actualSpace,c=u.labelWidth,d=u.valueWidth,h=(0,A.CR)(this.spacing,2),f=h[0],v=h[1];if(a){var g=a-i-f-v,p=(0,A.CR)(this.span,2),m=p[0],y=p[1];e=(0,A.CR)([m*g,y*g],2),c=e[0],d=e[1]}var b=o+c+d+f+v;return{width:b,height:l,markerWidth:o,labelWidth:c,valueWidth:d}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){var e=this.attributes.spacing;if(!e)return[0,0];var n=(0,A.CR)(Nt(e),2),i=n[0],a=n[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){var e=this.shape,n=e.markerWidth,i=e.labelWidth,a=e.valueWidth,s=e.width,o=e.height,l=(0,A.CR)(this.spacing,2),u=l[0],c=l[1];return{height:o,width:s,markerWidth:n,labelWidth:i,valueWidth:a,position:[n/2,n+u,n+i+u+c]}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleSize",{get:function(){var e=O3(this.markerGroup.node()),n=this.attributes,i=n.markerSize,a=n.markerStrokeWidth,s=a===void 0?e.strokeWidth:a,o=n.markerLineWidth,l=o===void 0?e.lineWidth:o,u=n.markerStroke,c=u===void 0?e.stroke:u,d=+(s||l||(c?1:0))*Math.sqrt(2),h=this.markerGroup.node().getBBox(),f=h.width,v=h.height;return(1-d/Math.max(f,v))*i},enumerable:!1,configurable:!0}),t.prototype.renderMarker=function(e){var n=this,i=this.attributes.marker,a=xe(this.attributes,"marker");this.markerGroup=e.maybeAppendByClassName(wn.markerGroup,"g").style("zIndex",0),En(!!i,this.markerGroup,function(){var s,o=n.markerGroup.node(),l=(s=o.childNodes)===null||s===void 0?void 0:s[0],u=typeof i=="string"?new Xe({style:{symbol:i},className:wn.marker.name}):i();l?u.nodeName===l.nodeName?l instanceof Xe?l.update((0,A.pi)((0,A.pi)({},a),{symbol:i})):(A3(l,u),he(l).styles(a)):(l.remove(),he(u).attr("className",wn.marker.name).styles(a),o.appendChild(u)):(u instanceof Xe||he(u).attr("className",wn.marker.name).styles(a),o.appendChild(u)),n.markerGroup.node().scale(1/n.markerGroup.node().getScale()[0]);var c=$f(n.markerGroup.node(),n.scaleSize,!0);n.markerGroup.node().style._transform="scale(".concat(c,")")})},t.prototype.renderLabel=function(e){var n=xe(this.attributes,"label"),i=n.text,a=(0,A._T)(n,["text"]);this.labelGroup=e.maybeAppendByClassName(wn.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(wn.label,function(){return Vr(i)}).styles(a)},t.prototype.renderValue=function(e){var n=this,i=xe(this.attributes,"value"),a=i.text,s=(0,A._T)(i,["text"]);this.valueGroup=e.maybeAppendByClassName(wn.valueGroup,"g").style("zIndex",0),En(this.showValue,this.valueGroup,function(){n.valueGroup.maybeAppendByClassName(wn.value,function(){return Vr(a)}).styles(s)})},t.prototype.renderBackground=function(e){var n=this.shape,i=n.width,a=n.height,s=xe(this.attributes,"background");this.background=e.maybeAppendByClassName(wn.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(wn.background,"rect").styles((0,A.pi)({width:i,height:a},s))},t.prototype.adjustLayout=function(){var e=this.layout,n=e.labelWidth,i=e.valueWidth,a=e.height,s=(0,A.CR)(e.position,3),o=s[0],l=s[1],u=s[2],c=a/2;this.markerGroup.styles({transform:"translate(".concat(o,", ").concat(c,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(l,", ").concat(c,")")}),Qf(this.labelGroup.select(wn.label.class).node(),Math.ceil(n)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(u,", ").concat(c,")")}),Qf(this.valueGroup.select(wn.value.class).node(),Math.ceil(i)))},t.prototype.render=function(e,n){var i=he(n),a=e.x,s=a===void 0?0:a,o=e.y,l=o===void 0?0:o;i.styles({transform:"translate(".concat(s,", ").concat(l,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},t}(ft),ra=ir({page:"item-page",navigator:"navigator",item:"item"},"items"),y1=function(r,t,e){return e===void 0&&(e=!0),r?t(r):e},N3=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:Kf.Z,mouseenter:Kf.Z,mouseleave:Kf.Z})||this;return n.navigatorShape=[0,0],n}return Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grid",{get:function(){var e=this.attributes,n=e.gridRow,i=e.gridCol,a=e.data;if(!n&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return n&&i?[n,i]:n?[n,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderData",{get:function(){var e=this.attributes,n=e.data,i=e.layout,a=xe(this.attributes,"item"),s=n.map(function(o,l){var u=o.id,c=u===void 0?l:u,d=o.label,h=o.value;return{id:"".concat(c),index:l,style:(0,A.pi)({layout:i,labelText:d,valueText:h},Object.fromEntries(Object.entries(a).map(function(f){var v=(0,A.CR)(f,2),g=v[0],p=v[1];return[g,zn(p,[o,l,n])]})))}});return s},enumerable:!1,configurable:!0}),t.prototype.getGridLayout=function(){var e=this,n=this.attributes,i=n.orientation,a=n.width,s=n.rowPadding,o=n.colPadding,l=(0,A.CR)(this.navigatorShape,1),u=l[0],c=(0,A.CR)(this.grid,2),d=c[0],h=c[1],f=h*d,v=0;return this.pageViews.children.map(function(g,p){var m,y,b=Math.floor(p/f),_=p%f,w=e.ifHorizontal(h,d),x=[Math.floor(_/w),_%w];i==="vertical"&&x.reverse();var E=(0,A.CR)(x,2),k=E[0],O=E[1],P=(a-u-(h-1)*o)/h,M=g.getBBox().height,L=(0,A.CR)([0,0],2),D=L[0],z=L[1];return i==="horizontal"?(m=(0,A.CR)([v,k*(M+s)],2),D=m[0],z=m[1],v=O===h-1?0:v+P+o):(y=(0,A.CR)([O*(P+o),v],2),D=y[0],z=y[1],v=k===d-1?0:v+M+s),{page:b,index:p,row:k,col:O,pageIndex:_,width:P,height:M,x:D,y:z}})},t.prototype.getFlexLayout=function(){var e=this.attributes,n=e.width,i=e.height,a=e.rowPadding,s=e.colPadding,o=(0,A.CR)(this.navigatorShape,1),l=o[0],u=(0,A.CR)(this.grid,2),c=u[0],d=u[1],h=(0,A.CR)([n-l,i],2),f=h[0],v=h[1],g=(0,A.CR)([0,0,0,0,0,0,0,0],8),p=g[0],m=g[1],y=g[2],b=g[3],_=g[4],w=g[5],x=g[6],E=g[7];return this.pageViews.children.map(function(k,O){var P,M,L,D,z=k.getBBox(),F=z.width,C=z.height,S=x===0?0:s,T=x+S+F;if(T<=f&&y1(_,function(B){return B<d}))return P=(0,A.CR)([x+S,E,T],3),p=P[0],m=P[1],x=P[2],{width:F,height:C,x:p,y:m,page:y,index:O,pageIndex:b++,row:w,col:_++};M=(0,A.CR)([w+1,0,0,E+C+a],4),w=M[0],_=M[1],x=M[2],E=M[3];var N=E+C;return N<=v&&y1(w,function(B){return B<c})?(L=(0,A.CR)([x,E,F],3),p=L[0],m=L[1],x=L[2],{width:F,height:C,x:p,y:m,page:y,index:O,pageIndex:b++,row:w,col:_++}):(D=(0,A.CR)([0,0,F,0,y+1,0,0,0],8),p=D[0],m=D[1],x=D[2],E=D[3],y=D[4],b=D[5],w=D[6],_=D[7],{width:F,height:C,x:p,y:m,page:y,index:O,pageIndex:b++,row:w,col:_++})})},Object.defineProperty(t.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var e=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,n=e.call(this);return n.slice(-1)[0].page>0?(this.navigatorShape=[55,0],e.call(this)):n},enumerable:!1,configurable:!0}),t.prototype.ifHorizontal=function(e,n){var i=this.attributes.orientation;return qf(i,e,n)},t.prototype.flattenPage=function(e){e.querySelectorAll(ra.item.class).forEach(function(n){e.appendChild(n)}),e.querySelectorAll(ra.page.class).forEach(function(n){var i=e.removeChild(n);i.destroy()})},t.prototype.renderItems=function(e){var n=this.attributes,i=n.click,a=n.mouseenter,s=n.mouseleave;this.flattenPage(e);var o=this.dispatchCustomEvent.bind(this);he(e).selectAll(ra.item.class).data(this.renderData,function(l){return l.id}).join(function(l){return l.append(function(u){var c=u.style;return new P3({style:c})}).attr("className",ra.item.name).on("click",function(){i==null||i(this),o("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){s==null||s(this),o("itemMouseleave",{item:this})})},function(l){return l.each(function(u){var c=u.style;this.update(c)})},function(l){return l.remove()})},t.prototype.relayoutNavigator=function(){var e,n=this.attributes,i=n.layout,a=n.width,s=((e=this.pageViews.children[0])===null||e===void 0?void 0:e.getBBox().height)||0,o=(0,A.CR)(this.navigatorShape,2),l=o[0],u=o[1];this.navigator.update(i==="grid"?{pageWidth:a-l,pageHeight:s-u}:{})},t.prototype.adjustLayout=function(){var e=this,n=Object.entries($D(this.itemsLayout,"page")).map(function(a){var s=(0,A.CR)(a,2),o=s[0],l=s[1];return{page:o,layouts:l}}),i=(0,A.ev)([],(0,A.CR)(this.navigator.getContainer().children),!1);n.forEach(function(a){var s=a.layouts,o=e.pageViews.appendChild(new xn({className:ra.page.name}));s.forEach(function(l){var u=l.x,c=l.y,d=l.index,h=l.width,f=l.height,v=i[d];o.appendChild(v),(0,Ls.Z)(v,"__layout__",l),v.update({x:u,y:c,width:h,height:f})})}),this.relayoutNavigator()},t.prototype.renderNavigator=function(e){var n=this.attributes.orientation,i=xe(this.attributes,"nav"),a=_t({orientation:n},i),s=this;return e.selectAll(ra.navigator.class).data(["nav"]).join(function(o){return o.append(function(){return new x3({style:a})}).attr("className",ra.navigator.name).each(function(){s.navigator=this})},function(o){return o.each(function(){this.update(a)})},function(o){return o.remove()}),this.navigator},t.prototype.getBBox=function(){return this.navigator.getBBox()},t.prototype.render=function(e,n){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(he(n));this.renderItems(a.getContainer()),this.adjustLayout()}},t.prototype.dispatchCustomEvent=function(e,n){var i=new yn(e,{detail:n});this.dispatchEvent(i)},t}(ft),uo=ir({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),b1={showLabel:!0,formatter:function(r){return r.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},$4=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,e,b1)||this}return t.prototype.render=function(e,n){var i=he(n).maybeAppendByClassName(uo.markerGroup,"g");this.renderMarker(i);var a=he(n).maybeAppendByClassName(uo.labelGroup,"g");this.renderLabel(a)},t.prototype.renderMarker=function(e){var n=this,i=this.attributes,a=i.orientation,s=i.markerSymbol,o=s===void 0?qf(a,"horizontalHandle","verticalHandle"):s;En(!!o,e,function(l){var u=xe(n.attributes,"marker"),c=(0,A.pi)({symbol:o},u);n.marker=l.maybeAppendByClassName(uo.marker,function(){return new Xe({style:c})}).update(c)})},t.prototype.renderLabel=function(e){var n=this,i=this.attributes,a=i.showLabel,s=i.orientation,o=i.spacing,l=o===void 0?0:o,u=i.formatter;En(a,e,function(c){var d,h=xe(n.attributes,"label"),f=h.text,v=(0,A._T)(h,["text"]),g=((d=c.select(uo.marker.class))===null||d===void 0?void 0:d.node().getBBox())||{},p=g.width,m=p===void 0?0:p,y=g.height,b=y===void 0?0:y,_=(0,A.CR)(qf(s,[0,b+l,"center","top"],[m+l,0,"start","middle"]),4),w=_[0],x=_[1],E=_[2],k=_[3];c.maybeAppendByClassName(uo.label,"text").styles((0,A.pi)((0,A.pi)({},v),{x:w,y:x,text:u(f).toString(),textAlign:E,textBaseline:k}))})},t}(ft),x1={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},M3=_t({},x1,{}),q4=_t({},x1,es(b1,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),J4=.01,Q4=.5,co=ir({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),R3=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,e,M3)||this}return t.prototype.renderTitle=function(e,n,i){var a=this.attributes,s=a.showTitle,o=a.titleText,l=xe(this.attributes,"title"),u=(0,A.CR)(Zr(l),2),c=u[0],d=u[1];this.titleGroup=e.maybeAppendByClassName(co.titleGroup,"g").styles(d);var h=(0,A.pi)((0,A.pi)({width:n,height:i},c),{text:s?o:""});this.title=this.titleGroup.maybeAppendByClassName(co.title,function(){return new KD({style:h})}).update(h)},t.prototype.renderItems=function(e,n){var i=n.x,a=n.y,s=n.width,o=n.height,l=xe(this.attributes,"title",!0),u=(0,A.CR)(Zr(l),2),c=u[0],d=u[1],h=(0,A.pi)((0,A.pi)({},c),{width:s,height:o,x:0,y:0});this.itemsGroup=e.maybeAppendByClassName(co.itemsGroup,"g").styles((0,A.pi)((0,A.pi)({},d),{transform:"translate(".concat(i,", ").concat(a,")")}));var f=this;this.itemsGroup.selectAll(co.items.class).data(["items"]).join(function(v){return v.append(function(){return new N3({style:h})}).attr("className",co.items.name).each(function(){f.items=he(this)})},function(v){return v.update(h)},function(v){return v.remove()})},t.prototype.adjustLayout=function(){var e=this.attributes.showTitle;if(e){var n=this.title.node().getAvailableSpace(),i=n.x,a=n.y;this.itemsGroup.node().style.transform="translate(".concat(i,", ").concat(a,")")}},Object.defineProperty(t.prototype,"availableSpace",{get:function(){var e=this.attributes,n=e.showTitle,i=e.width,a=e.height;return n?this.title.node().getAvailableSpace():new It(0,0,i,a)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var e,n,i=(e=this.title)===null||e===void 0?void 0:e.node(),a=(n=this.items)===null||n===void 0?void 0:n.node();return!i||!a?r.prototype.getBBox.call(this):UD(i,a)},t.prototype.render=function(e,n){var i=this.attributes,a=i.width,s=i.height,o=i.x,l=o===void 0?0:o,u=i.y,c=u===void 0?0:u,d=he(n);n.style.transform="translate(".concat(l,", ").concat(c,")"),this.renderTitle(d,a,s),this.renderItems(d,this.availableSpace),this.adjustLayout()},t}(ft);function ev(r){const{width:t,height:e,renderer:n,containerStyle:i}=r,a=L3(r),[s,o]=D3(r);Object.assign(a.style,Object.assign({position:"absolute",left:s+"px",top:o+"px",width:t+"px",height:e+"px"},i));const l=new Id({width:t,height:e,container:a,renderer:n||new eu});return[a,l]}function L3(r){var t;const{container:e,className:n,graphCanvas:i}=r;if(e)return typeof e=="string"?document.getElementById(e):e;const a=Za(n,!1);return(t=i.getContainer())===null||t===void 0||t.appendChild(a),a}function D3(r){const{width:t,height:e,placement:n,graphCanvas:i}=r,[a,s]=i.getSize(),[o,l]=Ip(n);return[o*(a-t),l*(s-e)]}var I3=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class wc extends Pt{constructor(t,e){super(t,Object.assign({},wc.defaultOptions,e)),this.typePrefix="__data__",this.draw=!1,this.fieldMap={node:new Map,edge:new Map,combo:new Map},this.selectedItems=[],this.bindEvents=()=>{const{graph:n}=this.context;n.on(Q.AFTER_DRAW,this.createElement)},this.changeState=(n,i)=>{const{graph:a}=this.context,{typePrefix:s}=this,o=(0,Wt.Z)(n,[s,"id"]),l=(0,Wt.Z)(n,[s,"style","labelText"]),[u]=o.split("__"),c=this.fieldMap[u].get(l)||[];a.setElementState(Object.fromEntries(c==null?void 0:c.map(d=>[d,i])))},this.click=n=>{if(this.options.trigger==="hover")return;const i=(0,Wt.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?(this.selectedItems=this.selectedItems.filter(a=>a!==i),this.changeState(n,[])):(this.selectedItems.push(i),this.changeState(n,"selected"))},this.mouseleave=n=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(n,[]))},this.mouseenter=n=>{if(this.options.trigger==="click")return;const i=(0,Wt.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?this.selectedItems=this.selectedItems.filter(a=>a!==i):(this.selectedItems.push(i),this.changeState(n,"active"))},this.setFieldMap=(n,i,a)=>{if(!n)return;const s=this.fieldMap[a];if(s)if(!s.has(n))s.set(n,[i]);else{const o=s.get(n);o&&(o.push(i),s.set(n,o))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(n,i)=>{if(!n)return[];const{model:a,element:s}=this.context,{nodes:o,edges:l,combos:u}=a.getData(),c={},d=p=>(0,de.Z)(n)?n(p):n,h={node:"circle",edge:"line",combo:"rect"},f={circle:"circle",ellipse:"circle",image:"bowtie",rect:"square",star:"cross",triangle:"triangle",diamond:"diamond",cubic:"dot",line:"hyphen",polyline:"hyphen",quadratic:"hv","cubic-horizontal":"hyphen","cubic-vertical":"line"},v=(p,m)=>s==null?void 0:s.getElementComputedStyle(p,m),g=(p,m)=>{p.forEach(y=>{const{id:b}=y,_=(0,Wt.Z)(y,["data",d(y)]),w=(s==null?void 0:s.getElementType(m,y))||"circle",x=v(m,y),E=(m==="edge"?x==null?void 0:x.stroke:x==null?void 0:x.fill)||"#1783ff";b&&_&&_.replace(/\s+/g,"")&&(this.setFieldMap(_,b,m),c[_]||(c[_]={id:`${m}__${b}`,label:_,marker:f[w]||h[m],elementType:m,lineWidth:1,stroke:E,fill:E}))})};switch(i){case"node":g(o,"node");break;case"edge":g(l,"edge");break;case"combo":g(u,"combo");break;default:return[]}return Object.values(c)},this.createElement=()=>{if(this.draw){this.updateElement();return}const n=this.options,{width:i,height:a,nodeField:s,edgeField:o,comboField:l,trigger:u,position:c,container:d,containerStyle:h,className:f}=n,v=I3(n,["width","height","nodeField","edgeField","comboField","trigger","position","container","containerStyle","className"]),g=this.getMarkerData(s,"node"),p=this.getMarkerData(o,"edge"),m=this.getMarkerData(l,"combo"),y=[...g,...m,...p],b=Object.assign({width:i,height:a,data:y,itemMarkerLineWidth:({lineWidth:x})=>x,itemMarker:({marker:x})=>x,itemMarkerStroke:({stroke:x})=>x,itemMarkerFill:({fill:x})=>x,gridCol:g.length},v,this.getEvents()),_=new R3({className:"legend",style:b});this.category=_,this.upsertCanvas().appendChild(_),this.draw=!0},this.bindEvents()}update(t){super.update(t),this.clear(),this.createElement()}clear(){var t,e;(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.container)===null||e===void 0||e.remove(),this.canvas=void 0,this.container=void 0,this.draw=!1}updateElement(){this.category&&this.category.update({itemMarkerOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5,itemLabelOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5})}upsertCanvas(){if(this.canvas)return this.canvas;const t=this.context.canvas,[e,n]=t.getSize(),{width:i=e,height:a=n,position:s,container:o,containerStyle:l,className:u}=this.options,[c,d]=ev({width:i,height:a,graphCanvas:t,container:o,containerStyle:l,placement:s,className:"legend"});return this.container=c,u&&c.classList.add(u),this.canvas=d,this.canvas}destroy(){this.clear(),this.context.graph.off(Q.AFTER_DRAW,this.createElement),super.destroy()}}wc.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16,width:240,height:160};class kc extends Pt{constructor(t,e){super(t,Object.assign({},kc.defaultOptions,e)),this.onDraw=n=>{var i;!((i=n==null?void 0:n.data)===null||i===void 0)&&i.render||this.onRender()},this.shapes=new Map,this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=n=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(n.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=n=>{if(!this.mask||!this.isMaskDragging)return;const{size:[i,a]}=this.options,{movementX:s,movementY:o}=n,{left:l,top:u,width:c,height:d}=this.mask.style,[,,h,f]=this.maskBBox;let v=parseInt(l)+s,g=parseInt(u)+o,p=parseInt(c),m=parseInt(d);v<0&&(v=0),g<0&&(g=0),v+p>i&&(v=Ei(i-p,0)),g+m>a&&(g=Ei(a-m,0)),p<h&&(s>0?(v=Ei(v-s,0),p=xi(p+s,i)):s<0&&(p=xi(p-s,i))),m<f&&(o>0?(g=Ei(g-o,0),m=xi(m+o,a)):o<0&&(m=xi(m-o,a))),Object.assign(this.mask.style,{left:v+"px",top:g+"px",width:p+"px",height:m+"px"});const y=parseInt(l)-v,b=parseInt(u)-g;if(y===0&&b===0)return;const _=this.context.canvas.getCamera().getZoom(),w=this.canvas.getCamera().getZoom(),x=_/w;this.context.graph.translateBy([y*x,b*x],!1)},this.onMaskDragEnd=n=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(n.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=(0,Cp.Z)(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),"delay"in t&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=(0,Us.Z)(()=>{this.renderMinimap(),this.renderMask()},this.options.delay,!0)}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_DRAW,this.onDraw),t.on(Q.AFTER_RENDER,this.onRender),t.on(Q.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Q.AFTER_DRAW,this.onDraw),t.off(Q.AFTER_RENDER,this.onRender),t.off(Q.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const t=this.getElements(),e=this.initCanvas();this.setShapes(e,t)}getElements(){const{filter:t}=this.options,{model:e}=this.context,n=e.getData();if(!t)return n;const{nodes:i,edges:a,combos:s}=n;return{nodes:i.filter(o=>t(j(o),"node")),edges:a.filter(o=>t(j(o),"edge")),combos:s.filter(o=>t(j(o),"combo"))}}setShapes(t,e){const{nodes:n,edges:i,combos:a}=e,{shape:s}=this.options,{element:o}=this.context;if(s==="key"){const u=new Set,c=d=>{const h=j(d);u.add(h);const f=o.getElement(h);if(!f)return;const v=f.getShape("key"),g=this.shapes.get(h)||v.cloneNode();g.setPosition(v.getPosition()),f.style.zIndex&&(g.style.zIndex=f.style.zIndex),g.id=f.id,this.shapes.has(h)?Object.entries(v.attributes).forEach(([p,m])=>{g.style[p]!==m&&(g.style[p]=m)}):(t.appendChild(g),this.shapes.set(h,g))};i.forEach(c),a.forEach(c),n.forEach(c),this.shapes.forEach((d,h)=>{u.has(h)||(t.removeChild(d),this.shapes.delete(h))});return}const l=(u,c)=>{const h=o.getElement(u).getPosition();return c.setPosition(h),c};t.removeChildren(),i.forEach(u=>t.appendChild(s(j(u),"edge"))),a.forEach(u=>{t.appendChild(l(j(u),s(j(u),"combo")))}),n.forEach(u=>{t.appendChild(l(j(u),s(j(u),"node")))})}initCanvas(){const{renderer:t,size:[e,n]}=this.options;if(this.canvas){const{width:i,height:a}=this.canvas.getConfig();(e!==i||n!==a)&&this.canvas.resize(e,n),t&&this.canvas.setRenderer(t)}else{const{className:i,position:a,container:s,containerStyle:o}=this.options,[l,u]=ev({renderer:t,width:e,height:n,placement:a,className:"minimap",container:s,containerStyle:o,graphCanvas:this.context.canvas});i&&l.classList.add(i),this.container=l,this.canvas=u}return this.setCamera(),this.canvas}createLandmark(t,e,n){const i=`${t.join(",")}-${e.join(",")}-${n}`;if(this.landmarkMap.has(i))return this.landmarkMap.get(i);const s=this.canvas.getCamera().createLandmark(i,{position:t,focalPoint:e,zoom:n});return this.landmarkMap.set(i,s),s}setCamera(){var t;const{canvas:e}=this.context,n=(t=this.canvas)===null||t===void 0?void 0:t.getCamera();if(!n)return;const{size:[i,a],padding:s}=this.options,[o,l,u,c]=mr(s),{min:d,max:h,center:f}=e.getBounds("elements"),v=h[0]-d[0],g=h[1]-d[1],p=i-c-l,m=a-o-u,y=p/v,b=m/g,_=Math.min(y,b),w=this.createLandmark(f,f,_);n.gotoLandmark(w,0)}get maskBBox(){const{canvas:t}=this.context,e=t.getSize(),n=t.getCanvasByViewport([0,0]),i=t.getCanvasByViewport(e),a=this.canvas.canvas2Viewport(Kn(n)),s=this.canvas.canvas2Viewport(Kn(i)),o=s.x-a.x,l=s.y-a.y;return[a.x,a.y,o,l]}calculateMaskBBox(){const{size:[t,e]}=this.options;let[n,i,a,s]=this.maskBBox;return n<0&&(a=xi(a+n,t),n=0),i<0&&(s=xi(s+i,e),i=0),n+a>t&&(a=Ei(t-n,0)),i+s>e&&(s=Ei(e-i,0)),[xi(n,t),xi(i,e),Ei(a,0),Ei(s,0)]}renderMask(){const{maskStyle:t}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart)),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},t),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[t,e,n,i]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:e+"px",left:t+"px",width:n+"px",height:i+"px"})}destroy(){var t;this.unbindEvents(),this.canvas.destroy(),(t=this.mask)===null||t===void 0||t.remove(),super.destroy()}}kc.defaultOptions={size:[240,160],shape:"key",padding:10,position:"right-bottom",maskStyle:{border:"1px solid #ddd",background:"rgba(0, 0, 0, 0.1)"},containerStyle:{border:"1px solid #ddd",background:"#fff"},delay:128};const xi=(r,t)=>Math.min(r,t),Ei=(r,t)=>Math.max(r,t);var tv=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};const nv={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class _c extends Pt{constructor(t,e){super(t,Object.assign({},_c.defaultOptions,e)),this.initSnapline=()=>{const n=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=n.appendChild(new ks({style:Object.assign(Object.assign({},nv),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=n.appendChild(new ks({style:Object.assign(Object.assign({},nv),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(n,i,a)=>tv(this,void 0,void 0,function*(){const{verticalX:s,horizontalY:o}=a,{tolerance:l}=this.options,{min:[u,c],max:[d,h],center:[f,v]}=i;let g=0,p=0;s!==null&&(Bt(d,s)<l&&(g=s-d),Bt(u,s)<l&&(g=s-u),Bt(f,s)<l&&(g=s-f),g!==0&&(this.isVerticalSticking=!0)),o!==null&&(Bt(h,o)<l&&(p=o-h),Bt(c,o)<l&&(p=o-c),Bt(v,o)<l&&(p=o-v),p!==0&&(this.isHorizontalSticking=!0)),(g!==0||p!==0)&&(yield this.context.graph.translateElementBy({[n]:[g,p]},!1))}),this.enableSnap=n=>{const{target:i}=n,a=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[s,o]=this.getDelta(n);if(this.isHorizontalSticking&&this.isVerticalSticking&&Math.abs(s)<=a&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,-o]},!1),!1;if(this.isHorizontalSticking&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[0,-o]},!1),!1;if(this.isVerticalSticking&&Math.abs(s)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,0]},!1),!1;this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!1,setTimeout(()=>{this.enableStick=!0},200)}return this.enableStick},this.calcSnaplineMetadata=(n,i)=>{const{tolerance:a,shape:s}=this.options,{min:[o,l],max:[u,c],center:[d,h]}=i;let f=null,v=null,g=null,p=null,m=null,y=null;return this.getNodes().some(b=>{if((0,gt.Z)(n.id,b.id))return!1;const _=E1(b,s).getRenderBounds(),{min:[w,x],max:[E,k],center:[O,P]}=_;return f===null&&(Bt(O,d)<a?f=O:Bt(w,o)<a||Bt(w,u)<a?f=w:(Bt(E,u)<a||Bt(E,o)<a)&&(f=E),f!==null&&(v=Math.min(x,l),g=Math.max(k,c))),p===null&&(Bt(P,h)<a?p=P:Bt(x,l)<a||Bt(x,c)<a?p=x:(Bt(k,c)<a||Bt(k,l)<a)&&(p=k),p!==null&&(m=Math.min(w,o),y=Math.max(E,u))),f!==null&&p!==null}),{verticalX:f,verticalMinY:v,verticalMaxY:g,horizontalY:p,horizontalMinX:m,horizontalMaxX:y}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=n=>tv(this,void 0,void 0,function*(){const{target:i}=n;if(this.options.autoSnap&&!this.enableSnap(n))return;const a=E1(i,this.options.shape).getRenderBounds(),s=this.calcSnaplineMetadata(i,a);this.hideSnapline(),(s.verticalX!==null||s.horizontalY!==null)&&this.updateSnapline(s),this.options.autoSnap&&(yield this.autoSnapToLine(i.id,a,s))}),this.onDragEnd=()=>{this.hideSnapline()},this.bindEvents()}getNodes(){var t;const{filter:e}=this.options,i=(((t=this.context.element)===null||t===void 0?void 0:t.getNodes())||[]).filter(a=>{var s;return FA(a)&&((s=this.context.viewport)===null||s===void 0?void 0:s.isInViewport(a.getRenderBounds()))});return e?i.filter(a=>e(a)):i}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(t){const{lineWidth:e}=this.options[`${t}LineStyle`];return+(e||nv.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(t){const{verticalX:e,verticalMinY:n,verticalMaxY:i,horizontalY:a,horizontalMinX:s,horizontalMaxX:o}=t,[l,u]=this.context.canvas.getSize(),{offset:c}=this.options;a!==null?Object.assign(this.horizontalLine.style,{x1:c===1/0?0:s-c,y1:a,x2:c===1/0?l:o+c,y2:a,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",e!==null?Object.assign(this.verticalLine.style,{x1:e,y1:c===1/0?0:n-c,x2:e,y2:c===1/0?u:i+c,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(t){const e=this.context.graph.getZoom();return Xn([t.dx,t.dy],e)}bindEvents(){return tv(this,void 0,void 0,function*(){const{graph:t}=this.context;t.on(Pn.DRAG_START,this.onDragStart),t.on(Pn.DRAG,this.onDrag),t.on(Pn.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:t}=this.context;t.off(Pn.DRAG_START,this.onDragStart),t.off(Pn.DRAG,this.onDrag),t.off(Pn.DRAG_END,this.onDragEnd)}destroyElements(){var t,e;(t=this.horizontalLine)===null||t===void 0||t.destroy(),(e=this.verticalLine)===null||e===void 0||e.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}_c.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const Bt=(r,t)=>Math.abs(r-t),E1=(r,t)=>typeof t=="function"?t(r):r.getShape(t);var w1=null,B3=null;function Sc(r){return r instanceof Date?r:new Date(r)}function F3(r){for(var t=__read(r,2),e=t[0],n=t[1],i=w1.indexOf(e),a=w1.indexOf(n),s="",o=i;o<=a;o+=1)if(s+=B3[o],o<a){var l="-";o===2?l=" ":o>2&&(l=":"),s+=l}return s}function Ut(r,t){var e={YYYY:r.getFullYear(),MM:r.getMonth()+1,DD:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds()},n=t;return Object.keys(e).forEach(function(i){var a=e[i];n=n.replace(i,i==="YYYY"?"".concat(a):"".concat(a).padStart(2,"0"))}),n}function e5(r,t){return Sc(r).getTime()-Sc(t).getTime()}function t5(r,t){var e=__read([Sc(r),Sc(t)],2),n=e[0],i=e[1];return n.getFullYear()!==i.getFullYear()?"year":n.getMonth()!==i.getMonth()?"month":n.getDay()!==i.getDay()?"day":n.getHours()!==i.getHours()?"hour":n.getMinutes()!==i.getMinutes()?"minute":"second"}function n5(r,t){var e=new Date(r),n={year:function(i){i.setMonth(0),i.setHours(0,0,0,0)},month:function(i){i.setDate(1),i.setHours(0,0,0,0)},day:function(i){return i.setHours(0,0,0,0)},hour:function(i){return i.setMinutes(0,0,0)},minute:function(i){return i.setSeconds(0,0)},second:function(i){return i.setMilliseconds(0)}};return n[t](e),Ut(e,F3(["year",t]))}function z3(r,t){if(r.length<=t)return r;for(var e=Math.floor(r.length/t),n=[],i=0;i<r.length;i+=e)n.push(r[i]);return n}var rv={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new Bf({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},r5=(0,dn.Z)({},rv,{style:{type:"arc"}}),i5=(0,dn.Z)({},rv,{style:{}}),We=ir({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis");function Hr(r,t){return[r[0]*t,r[1]*t]}function ho(r,t){return[r[0]+t[0],r[1]+t[1]]}function iv(r,t){return[r[0]-t[0],r[1]-t[1]]}function ia(r,t){return[Math.min(r[0],t[0]),Math.min(r[1],t[1])]}function aa(r,t){return[Math.max(r[0],t[0]),Math.max(r[1],t[1])]}function fo(r,t){return Math.sqrt(Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2))}function k1(r){if(r[0]===0&&r[1]===0)return[0,0];var t=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2));return[r[0]/t,r[1]/t]}function a5(r,t,e){var n=__read(r,2),i=n[0],a=n[1],s=__read(t,2),o=s[0],l=s[1],u=i-o,c=a-l,d=Math.sin(e),h=Math.cos(e);return[u*h-c*d+o,u*d+c*h+l]}function G3(r,t){return t?[r[1],-r[0]]:[-r[1],r[0]]}function ns(r){return r*Math.PI/180}function _1(r){return Number((r*180/Math.PI).toPrecision(5))}function Tc(r,t){return r.style.opacity||(r.style.opacity=1),ar(r,{opacity:0},t)}var j3=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function W3(r){return j3.includes(r)}function S1(r){var t={};for(var e in r)W3(e)&&(t[e]=r[e]);return t}var rs=ir({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function T1(r){return r.reduce(function(t,e,n){return t.push((0,A.ev)([n===0?"M":"L"],(0,A.CR)(e),!1)),t},[])}function Z3(r,t,e){var n=t.connect,i=n===void 0?"line":n,a=t.center;if(i==="line")return T1(r);if(!a)return[];var s=fo(r[0],a),o=e?0:1;return r.reduce(function(l,u,c){return c===0?l.push((0,A.ev)(["M"],(0,A.CR)(u),!1)):l.push((0,A.ev)(["A",s,s,0,0,o],(0,A.CR)(u),!1)),l},[])}function av(r,t,e){return t.type==="surround"?Z3(r,t,e):T1(r)}function V3(r,t,e){var n=e.type,i=e.connect,a=e.center,s=e.closed,o=s?[["Z"]]:[],l=(0,A.CR)([av(r,e),av(t.slice().reverse(),e,!0)],2),u=l[0],c=l[1],d=(0,A.CR)([r[0],t.slice(-1)[0]],2),h=d[0],f=d[1],v=function(y,b){return[u,y,c,b,o].flat()};if(i==="line"||n==="surround")return v([(0,A.ev)(["L"],(0,A.CR)(f),!1)],[(0,A.ev)(["L"],(0,A.CR)(h),!1)]);if(!a)throw new Error("Arc grid need to specified center");var g=(0,A.CR)([fo(f,a),fo(h,a)],2),p=g[0],m=g[1];return v([(0,A.ev)(["A",p,p,0,0,1],(0,A.CR)(f),!1),(0,A.ev)(["L"],(0,A.CR)(f),!1)],[(0,A.ev)(["A",m,m,0,0,0],(0,A.CR)(h),!1),(0,A.ev)(["L"],(0,A.CR)(h),!1)])}function H3(r,t,e,n){var i=e.animate,a=e.isBillboard,s=t.map(function(o,l){return{id:o.id||"grid-line-".concat(l),d:av(o.points,e)}});return r.selectAll(rs.line.class).data(s,function(o){return o.id}).join(function(o){return o.append("path").each(function(l,u){var c=zn(S1((0,A.pi)({d:l.d},n)),[l,u,s]);this.attr((0,A.pi)({class:rs.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},c))})},function(o){return o.transition(function(l,u){var c=zn(S1((0,A.pi)({d:l.d},n)),[l,u,s]);return ar(this,c,i.update)})},function(o){return o.transition(function(){var l=this,u=Tc(this,i.exit);return ts(u,function(){return l.remove()}),u})}).transitions()}function U3(r,t,e){var n=e.animate,i=e.connect,a=e.areaFill;if(t.length<2||!a||!i)return[];for(var s=Array.isArray(a)?a:[a,"transparent"],o=function(v){return s[v%s.length]},l=[],u=0;u<t.length-1;u++){var c=(0,A.CR)([t[u].points,t[u+1].points],2),d=c[0],h=c[1],f=V3(d,h,e);l.push({d:f,fill:o(u)})}return r.selectAll(rs.region.class).data(l,function(v,g){return g}).join(function(v){return v.append("path").each(function(g,p){var m=zn(g,[g,p,l]);this.attr(m)}).attr("className",rs.region.name)},function(v){return v.transition(function(g,p){var m=zn(g,[g,p,l]);return ar(this,m,n.update)})},function(v){return v.transition(function(){var g=this,p=Tc(this,n.exit);return ts(p,function(){return g.remove()}),p})}).transitions()}function Y3(r){var t=r.data,e=t===void 0?[]:t,n=r.closed;return n?e.map(function(i){var a=i.points,s=(0,A.CR)(a,1),o=s[0];return(0,A.pi)((0,A.pi)({},i),{points:(0,A.ev)((0,A.ev)([],(0,A.CR)(a),!1),[o],!1)})}):e}var X3=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n){var i=e.type,a=e.center,s=e.areaFill,o=e.closed,l=(0,A._T)(e,["type","center","areaFill","closed"]),u=Y3(e),c=he(n).maybeAppendByClassName(rs.lineGroup,"g"),d=he(n).maybeAppendByClassName(rs.regionGroup,"g"),h=H3(c,u,e,l),f=U3(d,u,e);return(0,A.ev)((0,A.ev)([],(0,A.CR)(h),!1),(0,A.CR)(f),!1)},t}(ft),K3=function(r,t){return function(e){return r*(1-e)+t*e}};function $3(r,t){var e=t?t.length:0,n=r?Math.min(e,r.length):0;return function(i){var a=new Array(n),s=new Array(e),o=0;for(o=0;o<n;++o)a[o]=sv(r[o],t[o]);for(;o<e;++o)s[o]=t[o];for(o=0;o<n;++o)s[o]=a[o](i);return s}}function q3(r,t){r===void 0&&(r={}),t===void 0&&(t={});var e={},n={};return Object.entries(t).forEach(function(i){var a=(0,A.CR)(i,2),s=a[0],o=a[1];s in r?e[s]=sv(r[s],o):n[s]=o}),function(i){return Object.entries(e).forEach(function(a){var s=(0,A.CR)(a,2),o=s[0],l=s[1];return n[o]=l(i)}),n}}function sv(r,t){return typeof r=="number"&&typeof t=="number"?K3(r,t):Array.isArray(r)&&Array.isArray(t)?$3(r,t):typeof r=="object"&&typeof t=="object"?q3(r,t):function(e){return r}}function J3(r,t,e,n){if(!n)return r.attr("__keyframe_data__",e),null;var i=n.duration,a=i===void 0?0:i,s=sv(t,e),o=Math.ceil(+a/16),l=new Array(o).fill(0).map(function(u,c,d){return{__keyframe_data__:s(c/(d.length-1))}});return r.animate(l,(0,A.pi)({fill:"both"},n))}function A1(r,t){var e={},n=Array.isArray(t)?t:[t];for(var i in r)n.includes(i)||(e[i]=r[i]);return e}function C1(r,t){return Object.fromEntries(Object.entries(r).map(function(e){var n=(0,A.CR)(e,2),i=n[0],a=n[1];return[i,zn(a,t)]}))}function s5(r){if(r.type==="linear"){var t=r.startPos,e=r.endPos;return __spreadArray(__spreadArray([],__read(t),!1),__read(e),!1)}var n=r.startAngle,i=r.endAngle,a=r.center,s=r.radius;return __spreadArray(__spreadArray([n,i],__read(a),!1),[s],!1)}function ov(r,t){return t&&(0,de.Z)(t)?r.filter(t):r}function O1(r,t){var e=t.startAngle,n=t.endAngle;return(n-e)*r+e}function Ac(r,t){if(t.type==="linear"){var e=(0,A.CR)(t.startPos,2),n=e[0],i=e[1],a=(0,A.CR)(t.endPos,2),s=a[0],o=a[1],l=(0,A.CR)([s-n,o-i],2),u=l[0],c=l[1];return k1([u,c])}var d=ns(O1(r,t));return[-Math.sin(d),Math.cos(d)]}function lv(r,t,e){var n=Ac(r,e);return G3(n,t!=="positive")}function vo(r,t){return lv(r,t.labelDirection,t)}function Q3(r,t){var e=(0,A.CR)(t.startPos,2),n=e[0],i=e[1],a=(0,A.CR)(t.endPos,2),s=a[0],o=a[1],l=(0,A.CR)([s-n,o-i],2),u=l[0],c=l[1];return[n+u*r,i+c*r]}function eI(r,t){var e=t.radius,n=(0,A.CR)(t.center,2),i=n[0],a=n[1],s=ns(O1(r,t));return[i+e*Math.cos(s),a+e*Math.sin(s)]}function Cc(r,t){return t.type==="linear"?Q3(r,t):eI(r,t)}function P1(r){return Ac(0,r)[1]===0}function N1(r){return Ac(0,r)[0]===0}function M1(r,t){return t-r===360}function R1(r,t,e,n,i){var a=t-r,s=(0,A.CR)([i,i],2),o=s[0],l=s[1],u=(0,A.CR)([ns(r),ns(t)],2),c=u[0],d=u[1],h=function(P){return[e+i*Math.cos(P),n+i*Math.sin(P)]},f=(0,A.CR)(h(c),2),v=f[0],g=f[1],p=(0,A.CR)(h(d),2),m=p[0],y=p[1];if(M1(r,t)){var b=(d+c)/2,_=(0,A.CR)(h(b),2),w=_[0],x=_[1];return[["M",v,g],["A",o,l,0,1,0,w,x],["A",o,l,0,1,0,m,y]]}var E=a>180?1:0,k=r>t?0:1,O=!1;return O?"M".concat(e,",").concat(n,",L").concat(v,",").concat(g,",A").concat(o,",").concat(l,",0,").concat(E,",").concat(k,",").concat(m,",").concat(y,",L").concat(e,",").concat(n):"M".concat(v,",").concat(g,",A").concat(o,",").concat(l,",0,").concat(E,",").concat(k,",").concat(m,",").concat(y)}function tI(r){var t=r.attributes,e=t.startAngle,n=t.endAngle,i=t.center,a=t.radius;return(0,A.ev)((0,A.ev)([e,n],(0,A.CR)(i),!1),[a],!1)}function nI(r,t,e,n){var i=t.startAngle,a=t.endAngle,s=t.center,o=t.radius;return r.selectAll(We.line.class).data([{d:R1.apply(void 0,(0,A.ev)((0,A.ev)([i,a],(0,A.CR)(s),!1),[o],!1))}],function(l,u){return u}).join(function(l){return l.append("path").attr("className",We.line.name).styles(t).styles({d:function(u){return u.d}})},function(l){return l.transition(function(){var u=this,c=J3(this,tI(this),(0,A.ev)((0,A.ev)([i,a],(0,A.CR)(s),!1),[o],!1),n.update);if(c){var d=function(){var h=(0,Wt.Z)(u.attributes,"__keyframe_data__");u.style.d=R1.apply(void 0,(0,A.ev)([],(0,A.CR)(h),!1))};c.onframe=d,c.onfinish=d}return c}).styles(t)},function(l){return l.remove()}).styles(e).transitions()}function rI(r,t){var e=t.truncRange,n=t.truncShape,i=t.lineExtension}function iI(r,t,e){e===void 0&&(e=[0,0]);var n=(0,A.CR)([r,t,e],3),i=(0,A.CR)(n[0],2),a=i[0],s=i[1],o=(0,A.CR)(n[1],2),l=o[0],u=o[1],c=(0,A.CR)(n[2],2),d=c[0],h=c[1],f=(0,A.CR)([l-a,u-s],2),v=f[0],g=f[1],p=Math.sqrt(Math.pow(v,2)+Math.pow(g,2)),m=(0,A.CR)([-d/p,h/p],2),y=m[0],b=m[1];return[y*v,y*g,b*v,b*g]}function L1(r){var t=(0,A.CR)(r,2),e=(0,A.CR)(t[0],2),n=e[0],i=e[1],a=(0,A.CR)(t[1],2),s=a[0],o=a[1];return{x1:n,y1:i,x2:s,y2:o}}function aI(r,t,e,n){var i=t.showTrunc,a=t.startPos,s=t.endPos,o=t.truncRange,l=t.lineExtension,u=(0,A.CR)([a,s],2),c=(0,A.CR)(u[0],2),d=c[0],h=c[1],f=(0,A.CR)(u[1],2),v=f[0],g=f[1],p=(0,A.CR)(l?iI(a,s,l):new Array(4).fill(0),4),m=p[0],y=p[1],b=p[2],_=p[3],w=function(T){return r.selectAll(We.line.class).data(T,function(N,B){return B}).join(function(N){return N.append("line").attr("className",function(B){return"".concat(We.line.name," ").concat(B.className)}).styles(e).transition(function(B){return ar(this,L1(B.line),!1)})},function(N){return N.styles(e).transition(function(B){var I=B.line;return ar(this,L1(I),n.update)})},function(N){return N.remove()}).transitions()};if(!i||!o)return w([{line:[[d+m,h+y],[v+b,g+_]],className:We.line.name}]);var x=(0,A.CR)(o,2),E=x[0],k=x[1],O=v-d,P=g-h,M=(0,A.CR)([d+O*E,h+P*E],2),L=M[0],D=M[1],z=(0,A.CR)([d+O*k,h+P*k],2),F=z[0],C=z[1],S=w([{line:[[d+m,h+y],[L,D]],className:We.lineFirst.name},{line:[[F,C],[v+b,g+_]],className:We.lineSecond.name}]);return rI(r,t),S}function sI(r,t,e,n){var i=e.showArrow,a=e.showTrunc,s=e.lineArrow,o=e.lineArrowOffset,l=e.lineArrowSize,u;if(t==="arc"?u=r.select(We.line.class):a?u=r.select(We.lineSecond.class):u=r.select(We.line.class),!i||!s||e.type==="arc"&&M1(e.startAngle,e.endAngle)){var c=u.node();c&&(c.style.markerEnd=void 0);return}var d=Vr(s);d.attr(n),$f(d,l,!0),u.style("markerEnd",d).style("markerEndOffset",-o)}function oI(r,t,e){var n=t.type,i,a=xe(t,"line");return n==="linear"?i=aI(r,t,A1(a,"arrow"),e):i=nI(r,t,A1(a,"arrow"),e),sI(r,n,t,a),i}function lI(r,t){return lv(r,t.gridDirection,t)}function D1(r){var t=r.type,e=r.gridCenter;return t==="linear"?e:e||r.center}function uI(r,t){var e=t.gridLength;return r.map(function(n,i){var a=n.value,s=(0,A.CR)(Cc(a,t),2),o=s[0],l=s[1],u=(0,A.CR)(Hr(lI(a,t),e),2),c=u[0],d=u[1];return{id:i,points:[[o,l],[o+c,l+d]]}})}function cI(r,t){var e=t.gridControlAngles,n=D1(t);if(!n)throw new Error("grid center is not provide");if(r.length<2)throw new Error("Invalid grid data");if(!e||e.length===0)throw new Error("Invalid gridControlAngles");var i=(0,A.CR)(n,2),a=i[0],s=i[1];return r.map(function(o,l){var u=o.value,c=(0,A.CR)(Cc(u,t),2),d=c[0],h=c[1],f=(0,A.CR)([d-a,h-s],2),v=f[0],g=f[1],p=[];return e.forEach(function(m){var y=ns(m),b=(0,A.CR)([Math.cos(y),Math.sin(y)],2),_=b[0],w=b[1],x=v*_-g*w+a,E=v*w+g*_+s;p.push([x,E])}),{points:p,id:l}})}function dI(r,t,e,n){var i=xe(e,"grid"),a=i.type,s=i.areaFill,o=D1(e),l=ov(t,e.gridFilter),u=a==="segment"?uI(l,e):cI(l,e),c=(0,A.pi)((0,A.pi)({},i),{center:o,areaFill:(0,de.Z)(s)?l.map(function(d,h){return zn(s,[d,h,l])}):s,animate:n,data:u});return r.selectAll(We.grid.class).data([1]).join(function(d){return d.append(function(){return new X3({style:c})}).attr("className",We.grid.name)},function(d){return d.transition(function(){return this.update(c)})},function(d){return d.remove()}).transitions()}function Mt(r,t,e,n,i){return n===void 0&&(n=!0),i===void 0&&(i=!1),n&&r===t||i&&r===e?!0:r>t&&r<e}function hI(r,t,e,n){e===void 0&&(e=2),n===void 0&&(n="top"),m1(r,{wordWrap:!0,wordWrapWidth:t,maxLines:e,textBaseline:n})}function fI(r,t,e){var n=r.getBBox(),i=n.width,a=n.height,s=(0,A.CR)([t,e].map(function(u,c){var d;return u.includes("%")?parseFloat(((d=u.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||d===void 0?void 0:d[0])||"0")/100*(c===0?i:a):u}),2),o=s[0],l=s[1];return[o,l]}function I1(r,t){if(t)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,n=t.replace(e,function(i,a,s){return"translate(".concat(fI(r,a,s),")")});r.attr("transform",n)}catch(i){}}var B1=function(r){return r!==void 0&&r!=null&&!Number.isNaN(r)},uv=function(){function r(t,e,n,i){this.set(t,e,n,i)}return Object.defineProperty(r.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),r.prototype.rotatedPoints=function(t,e,n){var i=this,a=i.x1,s=i.y1,o=i.x2,l=i.y2,u=Math.cos(t),c=Math.sin(t),d=e-e*u+n*c,h=n-e*c-n*u,f=[[u*a-c*l+d,c*a+u*l+h],[u*o-c*l+d,c*o+u*l+h],[u*a-c*s+d,c*a+u*s+h],[u*o-c*s+d,c*o+u*s+h]];return f},r.prototype.set=function(t,e,n,i){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),i<e?(this.y2=e,this.y1=i):(this.y1=e,this.y2=i),this},r.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},r}();function Oc(r,t){var e=r.getEulerAngles()||0;r.setEulerAngles(0);var n=r.getBounds(),i=(0,A.CR)(n.min,2),a=i[0],s=i[1],o=(0,A.CR)(n.max,2),l=o[0],u=o[1],c=r.getBBox(),d=c.width,h=c.height,f=h,v=0,g=0,p=a,m=s,y=p1(r);if(y){f-=1.5;var b=y.style.textAlign,_=y.style.textBaseline;b==="center"?p=(a+l)/2:(b==="right"||b==="end")&&(p=l),_==="middle"?m=(s+u)/2:_==="bottom"&&(m=u)}var w=(0,A.CR)(Nt(t),4),x=w[0],E=x===void 0?0:x,k=w[1],O=k===void 0?0:k,P=w[2],M=P===void 0?E:P,L=w[3],D=L===void 0?O:L,z=new uv((v+=a)-D,(g+=s)-E,v+d+O,g+f+M);return r.setEulerAngles(e),z.rotatedPoints(ns(e),p,m)}function go(r,t){return t[0]<=Math.max(r[0][0],r[1][0])&&t[0]<=Math.min(r[0][0],r[1][0])&&t[1]<=Math.max(r[0][1],r[1][1])&&t[1]<=Math.min(r[0][1],r[1][1])}function po(r,t,e){var n=(t[1]-r[1])*(e[0]-t[0])-(t[0]-r[0])*(e[1]-t[1]);return n===0?0:n<0?2:1}function vI(r,t){var e=po(r[0],r[1],t[0]),n=po(r[0],r[1],t[1]),i=po(t[0],t[1],r[0]),a=po(t[0],t[1],r[1]);return!!(e!==n&&i!==a||e===0&&go(r,t[0])||n===0&&go(r,t[1])||i===0&&go(t,r[0])||a===0&&go(t,r[1]))}function gI(r,t){var e=r.length;if(e<3)return!1;var n=[t,[9999,t[1]]],i=0,a=0;do{var s=[r[a],r[(a+1)%e]];if(vI(s,n)){if(po(s[0],t,s[1])===0)return go(s,t);i++}a=(a+1)%e}while(a!==0);return!!(i&1)}function pI(r,t){return t.every(function(e){return gI(r,e)})}function mI(r,t,e){var n=r.x1,i=r.x2,a=r.y1,s=r.y2,o=[[n,a],[i,a],[i,s],[n,s]],l=Oc(t,e);return pI(o,l)}function F1(r,t){var e=(0,A.CR)(r,4),n=e[0],i=e[1],a=e[2],s=e[3],o=(0,A.CR)(t,4),l=o[0],u=o[1],c=o[2],d=o[3],h=a-n,f=s-i,v=c-l,g=d-u,p=h*g-v*f;if(p===0)return!1;var m=p>0,y=n-l,b=i-u,_=h*b-f*y;if(_<0===m)return!1;var w=v*b-g*y;return!(w<0===m||_>p===m||w>p===m)}function z1(r,t){var e=[[r[0],r[1],r[2],r[3]],[r[2],r[3],r[4],r[5]],[r[4],r[5],r[6],r[7]],[r[6],r[7],r[0],r[1]]];return e.some(function(n){return F1(t,n)})}var o5={lineToLine:F1,intersectBoxLine:z1,getBounds:Oc};function yI(r,t,e){var n,i,a=Oc(r,e).flat(1),s=Oc(t,e).flat(1),o=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var l=(0,A.XA)(o),u=l.next();!u.done;u=l.next()){var c=u.value;if(z1(s,c))return!0}}catch(d){n={error:d}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return!1}function bI(r,t){var e=r.type,n=r.labelDirection,i=r.crossSize;if(!i)return!1;if(e==="arc"){var a=r.center,s=r.radius,o=(0,A.CR)(a,2),l=o[0],u=o[1],c=n==="negative"?0:i,d=-s-c,h=s+c,f=(0,A.CR)(Nt(t),4),v=f[0],g=f[1],p=f[2],m=f[3];return new uv(l+d-m,u+d-v,l+h+g,u+h+p)}var y=(0,A.CR)(r.startPos,2),b=y[0],_=y[1],w=(0,A.CR)(r.endPos,2),x=w[0],E=w[1],k=(0,A.CR)(N1(r)?[-t,0,t,0]:[0,t,0,-t],4),O=k[0],P=k[1],M=k[2],L=k[3],D=vo(0,r),z=Hr(D,i),F=new uv(b,_,x,E);return F.x1+=L,F.y1+=O,F.x2+=P+z[0],F.y2+=M+z[1],F}function Pc(r,t,e){var n,i,a=t.crossPadding,s=new Set,o=null,l=bI(t,a),u=function(v){return l?mI(l,v):!0},c=function(v,g){return!v||!v.firstChild?!0:!yI(v.firstChild,g.firstChild,Nt(e))};try{for(var d=(0,A.XA)(r),h=d.next();!h.done;h=d.next()){var f=h.value;u(f)?!o||c(o,f)?o=f:(s.add(o),s.add(f)):s.add(f)}}catch(v){n={error:v}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return Array.from(s)}function cv(r,t){return t===void 0&&(t={}),(0,ue.Z)(r)?0:typeof r=="number"?r:Math.floor(C3(r,t))}function xI(r,t,e,n){if(!(r.length<=1)){var i=t.suffix,a=i===void 0?"...":i,s=t.minLength,o=t.maxLength,l=o===void 0?1/0:o,u=t.step,c=u===void 0?" ":u,d=t.margin,h=d===void 0?[0,0,0,0]:d,f=g1(n.getTextShape(r[0])),v=cv(c,f),g=s?cv(s,f):v,p=cv(l,f);((0,ue.Z)(p)||p===1/0)&&(p=Math.max.apply(null,r.map(function(z){return z.getBBox().width})));for(var m=r.slice(),y=(0,A.CR)(h,4),b=y[0],_=b===void 0?0:b,w=y[1],x=w===void 0?0:w,E=y[2],k=E===void 0?_:E,O=y[3],P=O===void 0?x:O,M=function(z){if(m.forEach(function(F){n.ellipsis(n.getTextShape(F),z,a)}),m=Pc(r,e,h),m.length<1)return{value:void 0}},L=p;L>g+v;L-=v){var D=M(L);if(typeof D=="object")return D.value}}}var EI={parity:function(r,t){var e=t.seq,n=e===void 0?2:e;return r.filter(function(i,a){return a%n?(rr(i),!1):!0})}},wI=function(r){return r.filter(B1)};function kI(r,t,e,n){var i=r.length,a=t.keepHeader,s=t.keepTail;if(!(i<=1||i===2&&a&&s)){var o=EI.parity,l=function(b){return b.forEach(n.show),b},u=2,c=r.slice(),d=r.slice(),h=Math.min.apply(Math,(0,A.ev)([1],(0,A.CR)(r.map(function(b){return b.getBBox().width})),!1));if(e.type==="linear"&&(P1(e)||N1(e))){var f=v1(r[0]).left,v=v1(r[i-1]).right,g=Math.abs(v-f)||1;u=Math.max(Math.floor(i*h/g),u)}var p,m;for(a&&(p=c.splice(0,1)[0]),s&&(m=c.splice(-1,1)[0],c.reverse()),l(c);u<r.length&&Pc(wI(m?(0,A.ev)((0,A.ev)([m],(0,A.CR)(d),!1),[p],!1):(0,A.ev)([p],(0,A.CR)(d),!1)),e,t==null?void 0:t.margin).length;){if(m&&!p&&u%2===0){var y=c.splice(0,1);y.forEach(n.hide)}else if(m&&p){var y=c.splice(0,1);y.forEach(n.hide)}d=o(l(c),{seq:u}),u++}}}function _I(r,t,e,n){var i,a,s=t.optionalAngles,o=s===void 0?[0,45,90]:s,l=t.margin,u=t.recoverWhenFailed,c=u===void 0?!0:u,d=r.map(function(m){return m.getLocalEulerAngles()}),h=function(){return Pc(r,e,l).length<1},f=function(m){return r.forEach(function(y,b){var _=Array.isArray(m)?m[b]:m;n.rotate(y,+_)})};try{for(var v=(0,A.XA)(o),g=v.next();!g.done;g=v.next()){var p=g.value;if(f(p),h())return}}catch(m){i={error:m}}finally{try{g&&!g.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}c&&f(d)}function SI(r){var t=r.type,e=r.labelDirection;return t==="linear"&&P1(r)?e==="negative"?"bottom":"top":"middle"}function TI(r,t,e,n){var i=t.wordWrapWidth,a=i===void 0?50:i,s=t.maxLines,o=s===void 0?3:s,l=t.recoverWhenFailed,u=l===void 0?!0:l,c=t.margin,d=c===void 0?[0,0,0,0]:c,h=r.map(function(y){return y.attr("maxLines")||1}),f=Math.min.apply(Math,(0,A.ev)([],(0,A.CR)(h),!1)),v=function(){return Pc(r,e,d).length<1},g=SI(e),p=function(y){return r.forEach(function(b,_){var w=Array.isArray(y)?y[_]:y;n.wrap(b,a,w,g)})};if(!(f>o)){for(var m=f;m<=o;m++)if(p(m),v())return;u&&p(h)}}var AI=new Map([["hide",kI],["rotate",_I],["ellipsis",xI],["wrap",TI]]);function CI(r,t,e){return t.labelOverlap.length<1?!1:e==="hide"?!BD(r[0]):e==="rotate"?!r.some(function(n){var i;return!!(!((i=n.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):e==="ellipsis"||e==="wrap"?r.filter(function(n){return n.querySelector("text")}).length>1:!0}function OI(r,t,e){var n=t.labelOverlap,i=n===void 0?[]:n;i.length&&i.forEach(function(a){var s=a.type,o=AI.get(s);CI(r,t,s)&&(o==null||o(r,a,t,e))})}function PI(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var e=function(n){return n==="positive"?-1:1};return r.reduce(function(n,i){return n*e(i)},1)}function G1(r){for(var t=r;t<0;)t+=360;return Math.round(t%360)}function dv(r,t){var e=(0,A.CR)(r,2),n=e[0],i=e[1],a=(0,A.CR)(t,2),s=a[0],o=a[1],l=(0,A.CR)([n*s+i*o,n*o-i*s],2),u=l[0],c=l[1];return Math.atan2(c,u)}function NI(r){var t=(r+360)%180;return Mt(t,-90,90)||(t+=180),t}function MI(r,t,e){var n,i=e.labelAlign,a=(n=t.style.transform)===null||n===void 0?void 0:n.includes("rotate");if(a)return t.getLocalEulerAngles();var s=0,o=vo(r.value,e),l=Ac(r.value,e);return i==="horizontal"?0:(i==="perpendicular"?s=dv([1,0],o):s=dv([l[0]<0?-1:1,0],l),NI(_1(s)))}function j1(r,t,e){var n=e.type,i=e.labelAlign,a=vo(r,e),s=G1(t),o=G1(_1(dv([1,0],a))),l="center",u="middle";return n==="linear"?[90,270].includes(o)&&s===0?(l="center",u=a[1]===1?"top":"bottom"):!(o%180)&&[90,270].includes(s)?l="center":o===0?(Mt(s,0,90,!1,!0)||Mt(s,0,90)||Mt(s,270,360))&&(l="start"):o===90?Mt(s,0,90,!1,!0)?l="start":(Mt(s,90,180)||Mt(s,270,360))&&(l="end"):o===270?Mt(s,0,90,!1,!0)?l="end":(Mt(s,90,180)||Mt(s,270,360))&&(l="start"):o===180&&(s===90?l="start":(Mt(s,0,90)||Mt(s,270,360))&&(l="end")):i==="parallel"?Mt(o,0,180,!0)?u="top":u="bottom":i==="horizontal"?Mt(o,90,270,!1)?l="end":(Mt(o,270,360,!1)||Mt(o,0,90))&&(l="start"):i==="perpendicular"&&(Mt(o,90,270)?l="end":l="start"),{textAlign:l,textBaseline:u}}function RI(r,t,e){t.setLocalEulerAngles(r);var n=t.__data__.value,i=j1(n,r,e),a=t.querySelector(We.labelItem.class);a&&Z1(a,i)}function W1(r,t,e){var n=e.showTick,i=e.tickLength,a=e.tickDirection,s=e.labelDirection,o=e.labelSpacing,l=t.indexOf(r),u=zn(o,[r,l,t]),c=(0,A.CR)([vo(r.value,e),PI(s,a)],2),d=c[0],h=c[1],f=h===1?zn(n?i:0,[r,l,t]):0,v=(0,A.CR)(ho(Hr(d,u+f),Cc(r.value,e)),2),g=v[0],p=v[1];return{x:g,y:p}}function LI(r,t,e,n){var i=n.labelFormatter,a=(0,de.Z)(i)?function(){return Vr(zn(i,[r,t,e,vo(r.value,n)]))}:function(){return Vr(r.label||"")};return a}function Z1(r,t){r.nodeName==="text"&&r.attr(t)}function V1(r){OI(this.node().childNodes,r,{hide:rr,show:lo,rotate:function(t,e){RI(+e,t,r)},ellipsis:function(t,e,n){t&&Qf(t,e||1/0,n)},wrap:function(t,e,n){t&&hI(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function H1(r,t,e,n,i){var a=e.indexOf(t),s=he(r).append(LI(t,a,e,i)).attr("className",We.labelItem.name).node(),o=(0,A.CR)(Zr(C1(n,[t,a,e])),2),l=o[0],u=o[1],c=u.transform,d=(0,A._T)(u,["transform"]);I1(s,c);var h=MI(t,s,i);return s.getLocalEulerAngles()||s.setLocalEulerAngles(h),Z1(s,(0,A.pi)((0,A.pi)({},j1(t.value,h,i)),l)),r.attr(d),s}function DI(r,t,e,n){var i=ov(t,e.labelFilter),a=xe(e,"label");return r.selectAll(We.label.class).data(i,function(s,o){return o}).join(function(s){return s.append("g").attr("className",We.label.name).transition(function(o){H1(this,o,t,a,e);var l=W1(o,t,e),u=l.x,c=l.y;return this.style.transform="translate(".concat(u,", ").concat(c,")"),null}).call(function(){V1.call(r,e)})},function(s){return s.transition(function(o){var l=this.querySelector(We.labelItem.class),u=H1(this,o,t,a,e),c=e3(l,u,n.update),d=W1(o,t,e),h=d.x,f=d.y,v=ar(this,{transform:"translate(".concat(h,", ").concat(f,")")},n.update);return(0,A.ev)((0,A.ev)([],(0,A.CR)(c),!1),[v],!1)}).call(function(o){var l=(0,Wt.Z)(o,"_transitions").flat().filter(B1);JD(l,function(){V1.call(r,e)})})},function(s){return s.transition(function(){var o=this,l=Tc(this.childNodes[0],n.exit);return ts(l,function(){return he(o).remove()}),l})}).transitions()}function U1(r,t){return lv(r,t.tickDirection,t)}function II(r,t){var e=(0,A.CR)(r,2),n=e[0],i=e[1];return[[0,0],[n*t,i*t]]}function BI(r,t,e,n,i){var a=i.tickLength,s=(0,A.CR)(II(n,zn(a,[r,t,e])),2),o=(0,A.CR)(s[0],2),l=o[0],u=o[1],c=(0,A.CR)(s[1],2),d=c[0],h=c[1];return{x1:l,x2:d,y1:u,y2:h}}function FI(r,t,e,n,i){var a=i.tickFormatter,s=U1(t.value,i),o="line";return(0,de.Z)(a)&&(o=function(){return zn(a,[t,e,n,s])}),r.append(o).attr("className",We.tickItem.name)}function zI(r,t,e,n,i,a,s){var o=U1(r.value,a),l=BI(r,t,e,o,a),u=l.x1,c=l.x2,d=l.y1,h=l.y2,f=(0,A.CR)(Zr(C1(s,[r,t,e,o])),2),v=f[0],g=f[1];n.node().nodeName==="line"&&n.styles((0,A.pi)({x1:u,x2:c,y1:d,y2:h},v)),i.attr(g),n.styles(v)}function Y1(r,t,e,n,i,a){var s=FI(he(this),r,t,e,n);zI(r,t,e,s,this,n,i);var o=(0,A.CR)(Cc(r.value,n),2),l=o[0],u=o[1];return ar(this,{transform:"translate(".concat(l,", ").concat(u,")")},a)}function GI(r,t,e,n){var i=ov(t,e.tickFilter),a=xe(e,"tick");return r.selectAll(We.tick.class).data(i,function(s){return s.id||s.label}).join(function(s){return s.append("g").attr("className",We.tick.name).transition(function(o,l){return Y1.call(this,o,l,i,e,a,!1)})},function(s){return s.transition(function(o,l){return this.removeChildren(),Y1.call(this,o,l,i,e,a,n.update)})},function(s){return s.transition(function(){var o=this,l=Tc(this.childNodes[0],n.exit);return ts(l,function(){return o.remove()}),l})}).transitions()}function jI(r,t,e){var n=e.titlePosition,i=n===void 0?"lb":n,a=e.titleSpacing,s=xc(i),o=r.node().getLocalBounds(),l=(0,A.CR)(o.min,2),u=l[0],c=l[1],d=(0,A.CR)(o.halfExtents,2),h=d[0],f=d[1],v=(0,A.CR)(t.node().getLocalBounds().halfExtents,2),g=v[0],p=v[1],m=(0,A.CR)([u+h,c+f],2),y=m[0],b=m[1],_=(0,A.CR)(Nt(a),4),w=_[0],x=_[1],E=_[2],k=_[3];if(["start","end"].includes(i)&&e.type==="linear"){var O=e.startPos,P=e.endPos,M=(0,A.CR)(i==="start"?[O,P]:[P,O],2),L=M[0],D=M[1],z=k1([-D[0]+L[0],-D[1]+L[1]]),F=(0,A.CR)(Hr(z,w),2),C=F[0],S=F[1];return{x:L[0]+C,y:L[1]+S}}return s.includes("t")&&(b-=f+p+w),s.includes("r")&&(y+=h+g+x),s.includes("l")&&(y-=h+g+k),s.includes("b")&&(b+=f+p+E),{x:y,y:b}}function WI(r,t,e){var n=r.getGeometryBounds().halfExtents,i=n[1]*2;if(t==="vertical"){if(e==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(e==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function X1(r,t,e,n,i){var a=xe(n,"title"),s=(0,A.CR)(Zr(a),2),o=s[0],l=s[1],u=l.transform,c=l.transformOrigin,d=(0,A._T)(l,["transform","transformOrigin"]);t.styles(d);var h=u||WI(r.node(),o.direction,o.position);r.styles((0,A.pi)((0,A.pi)({},o),{transformOrigin:c})),I1(r.node(),h);var f=jI(he(e._offscreen||e.querySelector(We.mainGroup.class)),t,n),v=f.x,g=f.y,p=ar(t.node(),{transform:"translate(".concat(v,", ").concat(g,")")},i);return p}function ZI(r,t,e,n){var i=e.titleText;return r.selectAll(We.title.class).data([{title:i}].filter(function(a){return!!a.title}),function(a,s){return a.title}).join(function(a){return a.append(function(){return Vr(i)}).attr("className",We.title.name).transition(function(){return X1(he(this),r,t,e,n.enter)})},function(a){return a.transition(function(){return X1(he(this),r,t,e,n.update)})},function(a){return a.remove()}).transitions()}function K1(r,t,e,n){var i=r.showLine,a=r.showTick,s=r.showLabel,o=t.maybeAppendByClassName(We.lineGroup,"g"),l=En(i,o,function(f){return oI(f,r,n)})||[],u=t.maybeAppendByClassName(We.tickGroup,"g"),c=En(a,u,function(f){return GI(f,e,r,n)})||[],d=t.maybeAppendByClassName(We.labelGroup,"g"),h=En(s,d,function(f){return DI(f,e,r,n)})||[];return(0,A.ev)((0,A.ev)((0,A.ev)([],(0,A.CR)(l),!1),(0,A.CR)(c),!1),(0,A.CR)(h),!1).filter(function(f){return!!f})}var VI=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,e,rv)||this}return t.prototype.render=function(e,n,i){var a=this,s=e.titleText,o=e.data,l=e.animate,u=e.showTitle,c=e.showGrid,d=e.dataThreshold,h=e.truncRange,f=z3(o,d).filter(function(w){var x=w.value;return!(h&&x>h[0]&&x<h[1])}),v=s1(i===void 0?l:i),g=he(n).maybeAppendByClassName(We.gridGroup,"g"),p=En(c,g,function(w){return dI(w,f,e,v)})||[],m=he(n).maybeAppendByClassName(We.mainGroup,"g");s&&(!this.initialized&&v.enter||this.initialized&&v.update)&&K1(e,he(this.offscreenGroup),f,s1(!1));var y=K1(e,he(m.node()),f,v),b=he(n).maybeAppendByClassName(We.titleGroup,"g"),_=En(u,b,function(w){return ZI(w,a,e,v)})||[];return(0,A.ev)((0,A.ev)((0,A.ev)([],(0,A.CR)(p),!1),(0,A.CR)(y),!1),(0,A.CR)(_),!1).flat().filter(function(w){return!!w})},t}(ft);function $1(r){var t=r.canvas,e=r.touches,n=r.offsetX,i=r.offsetY;if(t){var a=t.x,s=t.y;return[a,s]}if(e){var o=e[0],l=o.clientX,u=o.clientY;return[l,u]}return n&&i?[n,i]:[0,0]}function hv(r,t){return+r.toPrecision(t)}function l5(r){return r.toLocaleString()}function u5(r){return r.toExponential()}function c5(r,t){return t===void 0&&(t=0),Math.abs(r)<1e3?String(r):"".concat(hv(r/1e3,t).toLocaleString(),"K")}var d5=function(r,t,e){return r<0&&Number.isFinite(r)?t:e},h5=function(r,t,e){return r>0&&Number.isFinite(r)?t:e},f5=function(r,t){return r*t},v5=function(r,t){return r/2+(t||0)/2},fv=Y(53715),HI=Y(15278),UI=function(r){(0,A.ZT)(t,r);function t(e){var n=this,i=e.style,a=(0,A._T)(e,["style"]);return n=r.call(this,(0,dn.Z)({},{type:"column"},(0,A.pi)({style:i},a)))||this,n.columnsGroup=new xn({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return t.prototype.render=function(){var e=this.attributes,n=e.columns,i=e.x,a=e.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),he(this.columnsGroup).selectAll(".column").data(n.flat()).join(function(s){return s.append("rect").attr("className","column").each(function(o){this.attr(o)})},function(s){return s.each(function(o){this.attr(o)})},function(s){return s.remove()})},t.prototype.update=function(e){this.attr(_t({},this.attributes,e)),this.render()},t.prototype.clear=function(){this.removeChildren()},t}(bn),YI=function(r){(0,A.ZT)(t,r);function t(e){var n=this,i=e.style,a=(0,A._T)(e,["style"]);return n=r.call(this,(0,dn.Z)({},{type:"lines"},(0,A.pi)({style:i},a)))||this,n.linesGroup=n.appendChild(new xn),n.areasGroup=n.appendChild(new xn),n.render(),n}return t.prototype.render=function(){var e=this.attributes,n=e.lines,i=e.areas,a=e.x,s=e.y;this.style.transform="translate(".concat(a,", ").concat(s,")"),n&&this.renderLines(n),i&&this.renderAreas(i)},t.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},t.prototype.update=function(e){this.attr(_t({},this.attributes,e)),this.render()},t.prototype.renderLines=function(e){he(this.linesGroup).selectAll(".line").data(e).join(function(n){return n.append("path").attr("className","line").each(function(i){this.attr(i)})},function(n){return n.each(function(i){this.attr(i)})},function(n){return n.remove()})},t.prototype.renderAreas=function(e){he(this.linesGroup).selectAll(".area").data(e).join(function(n){return n.append("path").attr("className","area").each(function(i){this.attr(i)})},function(n){return n.each(function(i){this.style(i)})},function(n){return n.remove()})},t}(bn);function XI(r,t,e,n){var i,a=[],s=!!n,o,l,u=[1/0,1/0],c=[-1/0,-1/0],d,h,f;if(s){i=(0,A.CR)(n,2),u=i[0],c=i[1];for(var v=0,g=r.length;v<g;v+=1){var p=r[v];u=ia(u,p),c=aa(c,p)}}for(var v=0,m=r.length;v<m;v+=1){var p=r[v];if(v===0&&!e)f=p;else if(v===m-1&&!e)h=p,a.push(f),a.push(h);else{var y=[v?v-1:m-1,v-1][e?0:1];o=r[y],l=r[e?(v+1)%m:v+1];var b=[0,0];b=iv(l,o),b=Hr(b,t);var _=fo(p,o),w=fo(p,l),x=_+w;x!==0&&(_/=x,w/=x);var E=Hr(b,-_),k=Hr(b,w);h=ho(p,E),d=ho(p,k),d=ia(d,aa(l,p)),d=aa(d,ia(l,p)),E=iv(d,p),E=Hr(E,-_/w),h=ho(p,E),h=ia(h,aa(o,p)),h=aa(h,ia(o,p)),k=iv(p,h),k=Hr(k,w/_),d=ho(p,k),s&&(h=aa(h,u),h=ia(h,c),d=aa(d,u),d=ia(d,c)),a.push(f),a.push(h),f=d}}return e&&a.push(a.shift()),a}function KI(r,t,e){var n;t===void 0&&(t=!1),e===void 0&&(e=[[0,0],[1,1]]);for(var i=!!t,a=[],s=0,o=r.length;s<o;s+=2)a.push([r[s],r[s+1]]);for(var l=XI(a,.4,i,e),u=a.length,c=[],d,h,f,s=0;s<u-1;s+=1)d=l[s*2],h=l[s*2+1],f=a[s+1],c.push(["C",d[0],d[1],h[0],h[1],f[0],f[1]]);return i&&(d=l[u],h=l[u+1],n=(0,A.CR)(a,1),f=n[0],c.push(["C",d[0],d[1],h[0],h[1],f[0],f[1]])),c}function $I(r,t){var e,n=t.x,i=t.y,a=(0,A.CR)(i.getOptions().range||[0,0],2),s=a[0],o=a[1];return o>s&&(e=(0,A.CR)([s,o],2),o=e[0],s=e[1]),r.map(function(l){var u=l.map(function(c,d){return[n.map(d),(0,Ne.Z)(i.map(c),o,s)]});return u})}function mo(r,t){t===void 0&&(t=!1);var e=t?r.length-1:0,n=r.map(function(i,a){return(0,A.ev)([a===e?"M":"L"],(0,A.CR)(i),!1)});return t?n.reverse():n}function Nc(r,t){if(t===void 0&&(t=!1),r.length<=2)return mo(r);for(var e=[],n=r.length,i=0;i<n;i+=1){var a=t?r[n-i-1]:r[i];(0,gt.Z)(a,e.slice(-2))||e.push.apply(e,(0,A.ev)([],(0,A.CR)(a),!1))}var s=KI(e,!1);return t?s.unshift((0,A.ev)(["M"],(0,A.CR)(r[n-1]),!1)):s.unshift((0,A.ev)(["M"],(0,A.CR)(r[0]),!1)),s}function vv(r,t,e){var n=(0,Pa.Z)(r);return n.push(["L",t,e],["L",0,e],["Z"]),n}function qI(r,t,e,n){return r.map(function(i){return vv(t?Nc(i):mo(i),e,n)})}function JI(r,t,e){for(var n=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=mo(a),o=void 0;if(i===0)o=vv(s,t,e);else{var l=r[i-1],u=mo(l,!0);u[0][0]="L",o=(0,A.ev)((0,A.ev)((0,A.ev)([],(0,A.CR)(s),!1),(0,A.CR)(u),!1),[["Z"]],!1)}n.push(o)}return n}function QI(r,t,e){for(var n=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=Nc(a),o=void 0;if(i===0)o=vv(s,t,e);else{var l=r[i-1],u=Nc(l,!0),c=a[0];u[0][0]="L",o=(0,A.ev)((0,A.ev)((0,A.ev)([],(0,A.CR)(s),!1),(0,A.CR)(u),!1),[(0,A.ev)(["M"],(0,A.CR)(c),!1),["Z"]],!1)}n.push(o)}return n}var eB=Y(89372),tB=Y(93442);function q1(r){return r.length===0?[0,0]:[(0,ua.Z)((0,eB.Z)(r,function(t){return(0,ua.Z)(t)||0})),(0,ca.Z)((0,tB.Z)(r,function(t){return(0,ca.Z)(t)||0}))]}function J1(r){for(var t=(0,Pa.Z)(r),e=t[0].length,n=(0,A.CR)([Array(e).fill(0),Array(e).fill(0)],2),i=n[0],a=n[1],s=0;s<t.length;s+=1)for(var o=t[s],l=0;l<e;l+=1)o[l]>=0?(o[l]+=i[l],i[l]=o[l]):(o[l]+=a[l],a[l]=o[l]);return t}var nB=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,e,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(t.prototype,"rawData",{get:function(){var e=this.attributes.data;if(!e||(e==null?void 0:e.length)===0)return[[]];var n=(0,Pa.Z)(e);return(0,oe.Z)(n[0])?[n]:n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.attributes.isStack?J1(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseline",{get:function(){var e=this.scales.y,n=(0,A.CR)(e.getOptions().domain||[0,0],2),i=n[0],a=n[1];return a<0?e.map(a):e.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerShape",{get:function(){var e=this.attributes,n=e.width,i=e.height;return{width:n,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linesStyle",{get:function(){var e=this,n=this.attributes,i=n.type,a=n.isStack,s=n.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var o=xe(this.attributes,"area"),l=xe(this.attributes,"line"),u=this.containerShape.width,c=this.data;if(c[0].length===0)return{lines:[],areas:[]};var d=this.scales,h=d.x,f=d.y,v=$I(c,{type:"line",x:h,y:f}),g=[];if(o){var p=this.baseline;a?g=s?QI(v,u,p):JI(v,u,p):g=qI(v,s,u,p)}return{lines:v.map(function(m,y){return(0,A.pi)({stroke:e.getColor(y),d:s?Nc(m):mo(m)},l)}),areas:g.map(function(m,y){return(0,A.pi)({d:m,fill:e.getColor(y)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnsStyle",{get:function(){var e=this,n=xe(this.attributes,"column"),i=this.attributes,a=i.isStack,s=i.type,o=i.scale;if(s!=="column")throw new Error("columnsStyle can only be used in column type");var l=this.containerShape.height,u=this.rawData;if(!u)return{columns:[]};a&&(u=J1(u));var c=this.createScales(u),d=c.x,h=c.y,f=(0,A.CR)(q1(u),2),v=f[0],g=f[1],p=new fv.b({domain:[0,g-(v>0?0:v)],range:[0,l*o]}),m=d.getBandWidth(),y=this.rawData;return{columns:u.map(function(b,_){return b.map(function(w,x){var E=m/u.length,k=function(){return{x:d.map(x)+E*_,y:w>=0?h.map(w):h.map(0),width:E,height:p.map(Math.abs(w))}},O=function(){return{x:d.map(x),y:h.map(w),width:m,height:p.map(y[_][x])}};return(0,A.pi)((0,A.pi)({fill:e.getColor(_)},n),a?O():k())})})}},enumerable:!1,configurable:!0}),t.prototype.render=function(e,n){HD(n,".container","rect").attr("className","container").node();var i=e.type,a=e.x,s=e.y,o="spark".concat(i),l=(0,A.pi)({x:a,y:s},i==="line"?this.linesStyle:this.columnsStyle);he(n).selectAll(".spark").data([i]).join(function(u){return u.append(function(c){return c==="line"?new YI({className:o,style:l}):new UI({className:o,style:l})}).attr("className","spark ".concat(o))},function(u){return u.update(l)},function(u){return u.remove()})},t.prototype.getColor=function(e){var n=this.attributes.color;return(0,da.Z)(n)?n[e%n.length]:(0,de.Z)(n)?n.call(null,e):n},t.prototype.createScales=function(e){var n,i,a=this.attributes,s=a.type,o=a.scale,l=a.range,u=l===void 0?[]:l,c=a.spacing,d=this.containerShape,h=d.width,f=d.height,v=(0,A.CR)(q1(e),2),g=v[0],p=v[1],m=new fv.b({domain:[(n=u[0])!==null&&n!==void 0?n:g,(i=u[1])!==null&&i!==void 0?i:p],range:[f,f*(1-o)]});return s==="line"?{type:s,x:new fv.b({domain:[0,e[0].length-1],range:[0,h]}),y:m}:{type:s,x:new HI.t({domain:e[0].map(function(y,b){return b}),range:[0,h],paddingInner:c,paddingOuter:c/2,align:.5}),y:m}},t.tag="sparkline",t}(ft),Q1={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},ex={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},tx={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},Ar=ir({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),wi=ir({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),rB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n){var i=e.x,a=e.y,s=e.size,o=s===void 0?10:s,l=e.radius,u=l===void 0?o/4:l,c=e.orientation,d=(0,A._T)(e,["x","y","size","radius","orientation"]),h=o,f=h*2.4,v=he(n).maybeAppendByClassName(wi.iconRect,"rect").styles((0,A.pi)((0,A.pi)({},d),{width:h,height:f,radius:u,x:i-h/2,y:a-f/2,transformOrigin:"center"})),g=i+1/3*h-h/2,p=i+2/3*h-h/2,m=a+1/4*f-f/2,y=a+3/4*f-f/2;v.maybeAppendByClassName("".concat(wi.iconLine,"-1"),"line").styles((0,A.pi)({x1:g,x2:g,y1:m,y2:y},d)),v.maybeAppendByClassName("".concat(wi.iconLine,"-2"),"line").styles((0,A.pi)({x1:p,x2:p,y1:m,y2:y},d)),c==="vertical"&&(v.node().style.transform="rotate(90)")},t}(ft),iB=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,e,tx)||this}return t.prototype.renderLabel=function(e){var n=this,i=this.attributes,a=i.x,s=i.y,o=i.showLabel,l=xe(this.attributes,"label"),u=l.x,c=u===void 0?0:u,d=l.y,h=d===void 0?0:d,f=l.transform,v=l.transformOrigin,g=(0,A._T)(l,["x","y","transform","transformOrigin"]),p=(0,A.CR)(Zr(g,[]),2),m=p[0],y=p[1],b=he(e).maybeAppendByClassName(wi.labelGroup,"g").styles(y),_=(0,A.pi)((0,A.pi)({},ex),m),w=_.text,x=(0,A._T)(_,["text"]);En(!!o,b,function(E){n.label=E.maybeAppendByClassName(wi.label,"text").styles((0,A.pi)((0,A.pi)({},x),{x:a+c,y:s+h,transform:f,transformOrigin:v,text:"".concat(w)})),n.label.on("mousedown",function(k){k.stopPropagation()}),n.label.on("touchstart",function(k){k.stopPropagation()})})},t.prototype.renderIcon=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.orientation,o=n.type,l=(0,A.pi)((0,A.pi)({x:i,y:a,orientation:s},Q1),xe(this.attributes,"icon")),u=this.attributes.iconShape,c=u===void 0?function(){return new rB({style:l})}:u,d=he(e).maybeAppendByClassName(wi.iconGroup,"g");d.selectAll(wi.icon.class).data([c]).join(function(h){return h.append(typeof c=="string"?c:function(){return c(o)}).attr("className",wi.icon.name)},function(h){return h.update(l)},function(h){return h.remove()})},t.prototype.render=function(e,n){this.renderIcon(n),this.renderLabel(n)},t}(ft),aB=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,e,(0,A.pi)((0,A.pi)((0,A.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},es(tx,"handle")),es(Q1,"handleIcon")),es(ex,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(i){return function(a){a.stopPropagation(),n.target=i,n.prevPos=n.getOrientVal($1(a));var s=n.availableSpace,o=s.x,l=s.y,u=n.getBBox(),c=u.x,d=u.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([o,l])-n.getOrientVal([+c,+d])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(i){var a=n.attributes,s=a.slidable,o=a.brushable,l=a.type;i.stopPropagation();var u=n.getOrientVal($1(i)),c=u-n.prevPos;if(c){var d=n.getRatio(c);switch(n.target){case"start":s&&n.setValuesOffset(d);break;case"end":s&&n.setValuesOffset(0,d);break;case"selection":s&&n.setValuesOffset(d,d);break;case"track":if(!o)return;n.selectionWidth+=d,l==="range"?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0);break;default:break}n.prevPos=u}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(i){var a=n.attributes,s=a.onChange,o=a.type,l=o==="range"?i:i[1],u=o==="range"?n.getValues():n.getValues()[1],c=new yn("valuechange",{detail:{oldValue:l,value:u}});n.dispatchEvent(c),s==null||s(u)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return Object.defineProperty(t.prototype,"values",{get:function(){return this.attributes.values},set:function(e){this.attributes.values=this.clampValues(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sparklineStyle",{get:function(){var e=this.attributes.orientation;if(e!=="horizontal")return null;var n=xe(this.attributes,"sparkline");return(0,A.pi)((0,A.pi)({zIndex:0},this.availableSpace),n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shape",{get:function(){var e=this.attributes,n=e.trackLength,i=e.trackSize,a=(0,A.CR)(this.getOrientVal([[n,i],[i,n]]),2),s=a[0],o=a[1];return{width:s,height:o}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableSpace",{get:function(){var e=this.attributes,n=e.x,i=e.y,a=e.padding,s=(0,A.CR)(Nt(a),4),o=s[0],l=s[1],u=s[2],c=s[3],d=this.shape,h=d.width,f=d.height;return{x:c,y:o,width:h-(c+l),height:f-(o+u)}},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.values},t.prototype.setValues=function(e,n){e===void 0&&(e=[0,0]),n===void 0&&(n=!1),this.attributes.values=e;var i=n===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},t.prototype.updateSelectionArea=function(e){var n=this.calcSelectionArea();this.foregroundGroup.selectAll(Ar.selection.class).each(function(i,a){ar(this,n[a],e)})},t.prototype.updateHandlesPosition=function(e){this.attributes.showHandle&&(this.startHandle&&ar(this.startHandle,this.getHandleStyle("start"),e),this.endHandle&&ar(this.endHandle,this.getHandleStyle("end"),e))},t.prototype.innerSetValues=function(e,n){e===void 0&&(e=[0,0]),n===void 0&&(n=!1);var i=this.values,a=this.clampValues(e);this.attributes.values=a,this.setValues(a),n&&this.onValueChange(i)},t.prototype.renderTrack=function(e){var n=this.attributes,i=n.x,a=n.y,s=xe(this.attributes,"track");this.trackShape=he(e).maybeAppendByClassName(Ar.track,"rect").styles((0,A.pi)((0,A.pi)({x:i,y:a},this.shape),s))},t.prototype.renderBrushArea=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.brushable;this.brushArea=he(e).maybeAppendByClassName(Ar.brushArea,"rect").styles((0,A.pi)({x:i,y:a,fill:"transparent",cursor:s?"crosshair":"default"},this.shape))},t.prototype.renderSparkline=function(e){var n=this,i=this.attributes,a=i.x,s=i.y,o=i.orientation,l=he(e).maybeAppendByClassName(Ar.sparklineGroup,"g");En(o==="horizontal",l,function(u){var c=(0,A.pi)((0,A.pi)({},n.sparklineStyle),{x:a,y:s});u.maybeAppendByClassName(Ar.sparkline,function(){return new nB({style:c})}).update(c)})},t.prototype.renderHandles=function(){var e=this,n,i=this.attributes,a=i.showHandle,s=i.type,o=s==="range"?["start","end"]:["end"],l=a?o:[],u=this;(n=this.foregroundGroup)===null||n===void 0||n.selectAll(Ar.handle.class).data(l.map(function(c){return{type:c}}),function(c){return c.type}).join(function(c){return c.append(function(d){var h=d.type;return new iB({style:e.getHandleStyle(h)})}).each(function(d){var h=d.type;this.attr("class","".concat(Ar.handle.name," ").concat(h,"-handle"));var f="".concat(h,"Handle");u[f]=this,this.addEventListener("pointerdown",u.onDragStart(h))})},function(c){return c.each(function(d){var h=d.type;this.update(u.getHandleStyle(h))})},function(c){return c.each(function(d){var h=d.type,f="".concat(h,"Handle");u[f]=void 0}).remove()})},t.prototype.renderSelection=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.type,o=n.selectionType;this.foregroundGroup=he(e).maybeAppendByClassName(Ar.foreground,"g");var l=xe(this.attributes,"selection"),u=function(d){return d.style("visibility",function(h){return h.show?"visible":"hidden"}).style("cursor",function(h){return o==="select"?"grab":o==="invert"?"crosshair":"default"}).styles((0,A.pi)((0,A.pi)({},l),{transform:"translate(".concat(i,", ").concat(a,")")}))},c=this;this.foregroundGroup.selectAll(Ar.selection.class).data(s==="value"?[]:this.calcSelectionArea().map(function(d,h){return{style:(0,A.pi)({},d),index:h,show:o==="select"?h===1:h!==1}}),function(d){return d.index}).join(function(d){return d.append("rect").attr("className",Ar.selection.name).call(u).each(function(h,f){var v=this;f===1?(c.selectionShape=he(this),this.on("pointerdown",function(g){v.attr("cursor","grabbing"),c.onDragStart("selection")(g)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){v.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){v.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){v.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(d){return d.call(u)},function(d){return d.remove()}),this.updateSelectionArea(!1),this.renderHandles()},t.prototype.render=function(e,n){this.renderTrack(n),this.renderSparkline(n),this.renderBrushArea(n),this.renderSelection(n)},t.prototype.clampValues=function(e,n){var i;n===void 0&&(n=4);var a=(0,A.CR)(this.range,2),s=a[0],o=a[1],l=(0,A.CR)(this.getValues().map(function(p){return hv(p,n)}),2),u=l[0],c=l[1],d=Array.isArray(e)?e:[u,e!=null?e:c],h=(0,A.CR)((d||[u,c]).map(function(p){return hv(p,n)}),2),f=h[0],v=h[1];if(this.attributes.type==="value")return[0,(0,Ne.Z)(v,s,o)];f>v&&(i=(0,A.CR)([v,f],2),f=i[0],v=i[1]);var g=v-f;return g>o-s?[s,o]:f<s?u===s&&c===v?[s,v]:[s,g+s]:v>o?c===o&&u===f?[f,o]:[o-g,o]:[f,v]},t.prototype.calcSelectionArea=function(e){var n=(0,A.CR)(this.clampValues(e),2),i=n[0],a=n[1],s=this.availableSpace,o=s.x,l=s.y,u=s.width,c=s.height;return this.getOrientVal([[{y:l,height:c,x:o,width:i*u},{y:l,height:c,x:i*u+o,width:(a-i)*u},{y:l,height:c,x:a*u,width:(1-a)*u}],[{x:o,width:u,y:l,height:i*c},{x:o,width:u,y:i*c+l,height:(a-i)*c},{x:o,width:u,y:a*c,height:(1-a)*c}]])},t.prototype.calcHandlePosition=function(e){var n=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,s=i.y,o=i.width,l=i.height,u=(0,A.CR)(this.clampValues(),2),c=u[0],d=u[1],h=e==="start"?-n:n,f=(e==="start"?c:d)*this.getOrientVal([o,l])+h;return{x:a+this.getOrientVal([f,o/2]),y:s+this.getOrientVal([l/2,f])}},t.prototype.inferTextStyle=function(e){var n=this.attributes.orientation;return n==="horizontal"?{}:e==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:e==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},t.prototype.calcHandleText=function(e){var n,i=this.attributes,a=i.type,s=i.orientation,o=i.formatter,l=i.autoFitLabel,u=xe(this.attributes,"handle"),c=xe(u,"label"),d=u.spacing,h=this.getHandleSize(),f=this.clampValues(),v=e==="start"?f[0]:f[1],g=o(v),p=new Xf({style:(0,A.pi)((0,A.pi)((0,A.pi)({},c),this.inferTextStyle(e)),{text:g})}),m=p.getBBox(),y=m.width,b=m.height;if(p.destroy(),!l){if(a==="value")return{text:g,x:0,y:-b-d};var _=d+h+(s==="horizontal"?y/2:0);return n={text:g},n[s==="horizontal"?"x":"y"]=e==="start"?-_:_,n}var w=0,x=0,E=this.availableSpace,k=E.width,O=E.height,P=this.calcSelectionArea()[1],M=P.x,L=P.y,D=P.width,z=P.height,F=d+h;if(s==="horizontal"){var C=F+y/2;if(e==="start"){var S=M-F-y;w=S>0?-C:C}else{var T=k-M-D-F>y;w=T?C:-C}}else{var N=F,B=b+F;e==="start"?x=L-h>b?-B:N:x=O-(L+z)-h>b?B:-N}return{x:w,y:x,text:g}},t.prototype.getHandleLabelStyle=function(e){var n=xe(this.attributes,"handleLabel");return(0,A.pi)((0,A.pi)((0,A.pi)({},n),this.calcHandleText(e)),this.inferTextStyle(e))},t.prototype.getHandleIconStyle=function(){var e=this.attributes.handleIconShape,n=xe(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,A.pi)({cursor:i,shape:e,size:a},n)},t.prototype.getHandleStyle=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.showLabel,o=n.showLabelOnInteraction,l=n.orientation,u=this.calcHandlePosition(e),c=u.x,d=u.y,h=this.calcHandleText(e),f=s;return!s&&o&&(this.target?f=!0:f=!1),(0,A.pi)((0,A.pi)((0,A.pi)({},es(this.getHandleIconStyle(),"icon")),es((0,A.pi)((0,A.pi)({},this.getHandleLabelStyle(e)),h),"label")),{transform:"translate(".concat(c+i,", ").concat(d+a,")"),orientation:l,showLabel:f,type:e,zIndex:3})},t.prototype.getHandleSize=function(){var e=this.attributes,n=e.handleIconSize,i=e.width,a=e.height;return n||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},t.prototype.getOrientVal=function(e){var n=(0,A.CR)(e,2),i=n[0],a=n[1],s=this.attributes.orientation;return s==="horizontal"?i:a},t.prototype.setValuesOffset=function(e,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var a=this.attributes.type,s=(0,A.CR)(this.getValues(),2),o=s[0],l=s[1],u=a==="range"?e:0,c=[o+u,l+n].sort();i?this.setValues(c):this.innerSetValues(c,!0)},t.prototype.getRatio=function(e){var n=this.availableSpace,i=n.width,a=n.height;return e/this.getOrientVal([i,a])},t.prototype.dispatchCustomEvent=function(e,n,i){var a=this;e.on(n,function(s){s.stopPropagation(),a.dispatchEvent(new yn(i,{detail:s}))})},t.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var e=this.brushArea;this.dispatchCustomEvent(e,"click","trackClick"),this.dispatchCustomEvent(e,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(e,"pointerleave","trackMouseleave"),e.on("pointerdown",this.onDragStart("track"))},t.prototype.onScroll=function(e){var n=this.attributes.scrollable;if(n){var i=e.deltaX,a=e.deltaY,s=a||i,o=this.getRatio(s);this.setValuesOffset(o,o,!0)}},t.tag="slider",t}(ft),sB={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(r){return r.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},gv=ir({background:"background",labelGroup:"label-group",label:"label"},"indicator"),oB=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,e,sB)||this;return n.point=[0,0],n.group=n.appendChild(new xn({})),n.isMutationObserved=!0,n}return t.prototype.renderBackground=function(){if(this.label){var e=this.attributes,n=e.position,i=e.padding,a=(0,A.CR)(Nt(i),4),s=a[0],o=a[1],l=a[2],u=a[3],c=this.label.node().getLocalBounds(),d=c.min,h=c.max,f=new It(d[0]-u,d[1]-s,h[0]+o-d[0]+u,h[1]+l-d[1]+s),v=this.getPath(n,f),g=xe(this.attributes,"background");this.background=he(this.group).maybeAppendByClassName(gv.background,"path").styles((0,A.pi)((0,A.pi)({},g),{d:v})),this.group.appendChild(this.label.node())}},t.prototype.renderLabel=function(){var e=this.attributes,n=e.formatter,i=e.labelText,a=xe(this.attributes,"label"),s=(0,A.CR)(Zr(a),2),o=s[0],l=s[1],u=o.text,c=(0,A._T)(o,["text"]);if(this.label=he(this.group).maybeAppendByClassName(gv.labelGroup,"g").styles(l),!!i){var d=this.label.maybeAppendByClassName(gv.label,function(){return Vr(n(i))}).style("text",n(i).toString());d.selectAll("text").styles(c)}},t.prototype.adjustLayout=function(){var e=(0,A.CR)(this.point,2),n=e[0],i=e[1],a=this.attributes,s=a.x,o=a.y;this.group.attr("transform","translate(".concat(s-n,", ").concat(o-i,")"))},t.prototype.getPath=function(e,n){var i=this.attributes.radius,a=n.x,s=n.y,o=n.width,l=n.height,u=[["M",a+i,s],["L",a+o-i,s],["A",i,i,0,0,1,a+o,s+i],["L",a+o,s+l-i],["A",i,i,0,0,1,a+o-i,s+l],["L",a+i,s+l],["A",i,i,0,0,1,a,s+l-i],["L",a,s+i],["A",i,i,0,0,1,a+i,s],["Z"]],c={top:4,right:6,bottom:0,left:2},d=c[e],h=this.createCorner([u[d].slice(-2),u[d+1].slice(-2)]);return u.splice.apply(u,(0,A.ev)([d+1,1],(0,A.CR)(h),!1)),u[0][0]="M",u},t.prototype.createCorner=function(e,n){n===void 0&&(n=10);var i=.8,a=T3.apply(void 0,(0,A.ev)([],(0,A.CR)(e),!1)),s=(0,A.CR)(e,2),o=(0,A.CR)(s[0],2),l=o[0],u=o[1],c=(0,A.CR)(s[1],2),d=c[0],h=c[1],f=(0,A.CR)(a?[d-l,[l,d]]:[h-u,[u,h]],2),v=f[0],g=(0,A.CR)(f[1],2),p=g[0],m=g[1],y=v/2,b=v/Math.abs(v),_=n*b,w=_/2,x=_*Math.sqrt(3)/2*i,E=(0,A.CR)([p,p+y-w,p+y,p+y+w,m],5),k=E[0],O=E[1],P=E[2],M=E[3],L=E[4];return a?(this.point=[P,u-x],[["L",k,u],["L",O,u],["L",P,u-x],["L",M,u],["L",L,u]]):(this.point=[l+x,P],[["L",l,k],["L",l,O],["L",l+x,P],["L",l,M],["L",l,L]])},t.prototype.applyVisibility=function(){var e=this.attributes.visibility;e==="hidden"?rr(this):lo(this)},t.prototype.bindEvents=function(){this.label.on(ht.BOUNDS_CHANGED,this.renderBackground)},t.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},t}(ft),lB=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},t.defaultOptions,e))||this;return n.hoverColor="#f5f5f5",n.selectedColor="#e6f7ff",n.background=n.appendChild(new Qa({})),n.label=n.background.appendChild(new xn({})),n}return Object.defineProperty(t.prototype,"padding",{get:function(){return Nt(this.style.padding)},enumerable:!1,configurable:!0}),t.prototype.renderLabel=function(){var e=this.style,n=e.label,i=e.value,a=xe(this.attributes,"label");he(this.label).maybeAppend(".label",function(){return Vr(n)}).attr("className","label").styles(a),this.label.attr("__data__",i)},t.prototype.renderBackground=function(){var e=this.label.getBBox(),n=(0,A.CR)(this.padding,4),i=n[0],a=n[1],s=n[2],o=n[3],l=e.width,u=e.height,c=l+o+a,d=u+i+s,h=xe(this.attributes,"background"),f=this.style,v=f.width,g=v===void 0?0:v,p=f.height,m=p===void 0?0:p,y=f.selected;this.background.attr((0,A.pi)((0,A.pi)({},h),{width:Math.max(c,g),height:Math.max(d,m),fill:y?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(o,", ").concat((d-u)/2,")")})},t.prototype.render=function(){this.renderLabel(),this.renderBackground()},t.prototype.bindEvents=function(){var e=this;this.addEventListener("pointerenter",function(){e.style.selected||e.background.attr("fill",e.hoverColor)}),this.addEventListener("pointerleave",function(){e.style.selected||e.background.attr("fill",e.style.backgroundFill)});var n=this;this.addEventListener("click",function(){var i=e.style,a=i.label,s=i.value,o=i.onClick;o==null||o(s,{label:a,value:s},n)})},t.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},t}(ft),uB=function(r){(0,A.ZT)(t,r);function t(e){var n,i,a=r.call(this,_t({},t.defaultOptions,e))||this;a.currentValue=(n=t.defaultOptions.style)===null||n===void 0?void 0:n.defaultValue,a.isPointerInSelect=!1,a.select=a.appendChild(new Qa({className:"select",style:{cursor:"pointer",width:0,height:0}})),a.dropdown=a.appendChild(new Qa({className:"dropdown"}));var s=a.style.defaultValue;return s&&(!((i=a.style.options)===null||i===void 0)&&i.some(function(o){return o.value===s}))&&(a.currentValue=s),a}return t.prototype.setValue=function(e){this.currentValue=e,this.render()},t.prototype.getValue=function(){return this.currentValue},Object.defineProperty(t.prototype,"dropdownPadding",{get:function(){return Nt(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),t.prototype.renderSelect=function(){var e=this,n,i=this.style,a=i.x,s=i.y,o=i.width,l=i.height,u=i.bordered,c=i.showDropdownIcon,d=xe(this.attributes,"select"),h=xe(this.attributes,"placeholder");this.select.attr((0,A.pi)((0,A.pi)({x:a,y:s,width:o,height:l},d),{fill:"#fff",strokeWidth:u?1:0}));var f=this.dropdownPadding,v=10;c&&he(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(a+o-v-f[1]-f[3],", ").concat(s+l/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var g=(n=this.style.options)===null||n===void 0?void 0:n.find(function(b){return b.value===e.currentValue}),p=(0,A.pi)({x:a+f[3]},h);he(this.select).selectAll(".placeholder").data(g?[]:[1]).join(function(b){return b.append("text").attr("className","placeholder").styles(p).style("y",function(){var _=this.getBBox();return s+(l-_.height)/2})},function(b){return b.styles(p)},function(b){return b.remove()});var m=xe(this.attributes,"optionLabel"),y=(0,A.pi)({x:a+f[3]},m);he(this.select).selectAll(".value").data(g?[g]:[]).join(function(b){return b.append(function(_){return Vr(_.label)}).attr("className","value").styles(y).style("y",function(){var _=this.getBBox();return s+(l-_.height)/2})},function(b){return b.styles(y)},function(b){return b.remove()})},t.prototype.renderDropdown=function(){var e=this,n,i,a=this.style,s=a.x,o=a.y,l=a.width,u=a.height,c=a.options,d=a.onSelect,h=a.open,f=xe(this.attributes,"dropdown"),v=xe(this.attributes,"option"),g=this.dropdownPadding;he(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(c,function(y){return y.value}).join(function(y){return y.append(function(b){return new lB({className:"dropdown-item",style:(0,A.pi)((0,A.pi)((0,A.pi)({},b),v),{width:l-g[1]-g[3],selected:b.value===e.currentValue,onClick:function(_,w,x){e.setValue(_),d==null||d(_,w,x),e.dispatchEvent(new yn("change",{detail:{value:_,option:w,item:x}})),rr(e.dropdown)}})})}).each(function(b,_){var w,x=(w=this.parentNode)===null||w===void 0?void 0:w.children,E=x.reduce(function(k,O,P){return P<_&&(k+=O.getBBox().height),k},0);this.attr("transform","translate(".concat(g[3],", ").concat(g[0]+E,")"))})},function(y){return y.update(function(b){return{selected:b.value===e.currentValue}})},function(y){return y.remove()});var p=(i=(n=this.dropdown.getElementsByClassName("dropdown-container"))===null||n===void 0?void 0:n[0])===null||i===void 0?void 0:i.getBBox(),m=f.spacing;this.dropdown.attr((0,A.pi)({transform:"translate(".concat(s,", ").concat(o+u+m,")"),width:p.width+g[1]+g[3],height:p.height+g[0]+g[2]},f)),!h&&rr(this.dropdown)},t.prototype.render=function(){this.renderSelect(),this.renderDropdown()},t.prototype.bindEvents=function(){var e=this;this.addEventListener("click",function(n){n.stopPropagation()}),this.select.addEventListener("click",function(){e.dropdown.style.visibility==="visible"?rr(e.dropdown):lo(e.dropdown)}),this.addEventListener("pointerenter",function(){e.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){e.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){e.isPointerInSelect||rr(e.dropdown)})},t.defaultOptions={style:{x:0,y:0,width:140,height:32,options:[],bordered:!0,defaultValue:"",selectRadius:8,selectStroke:"#d9d9d9",showDropdownIcon:!0,placeholderText:"\u8BF7\u9009\u62E9",placeholderFontSize:12,placeholderTextBaseline:"top",placeholderFill:"#c2c2c2",dropdownFill:"#fff",dropdownStroke:"#d9d9d9",dropdownRadius:8,dropdownShadowBlur:4,dropdownShadowColor:"rgba(0, 0, 0, 0.08)",dropdownPadding:8,dropdownSpacing:10,optionPadding:[8,12],optionFontSize:12,optionTextBaseline:"top",optionBackgroundFill:"#fff",optionBackgroundRadius:4,optionLabelFontSize:12,optionLabelTextBaseline:"top"}},t}(ft),sr=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},{style:{backgroundOpacity:t.backgroundOpacities.default}},t.defaultOptions,e))||this;return n.showBackground=!0,n.background=n.appendChild(new Qa({})),n.icon=n.appendChild(new xn({})),n}return Object.defineProperty(t.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return Nt(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconSize",{get:function(){var e=this.attributes.size,n=(0,A.CR)(this.padding,4),i=n[0],a=n[1],s=n[2],o=n[3];return Math.max(e-Math.max(o+a,i+s),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),t.prototype.renderBackground=function(){var e=this.attributes,n=e.x,i=e.y,a=e.size,s=a/2,o=xe(this.attributes,"background");this.background.attr((0,A.pi)({x:n-s,y:i-s,width:a,height:a},o))},t.prototype.showIndicator=function(){if(this.label){var e=this.attributes.size,n=this.background.getBBox(),i=n.x,a=n.y;this.indicator.update({x:i+e/2,y:a-5,labelText:this.label,visibility:"visible"})}},t.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},t.prototype.connectedCallback=function(){var e;r.prototype.connectedCallback.call(this);var n=this.attributes.size,i=this.background.getBBox(),a=i.x,s=i.y,o=(e=this.ownerDocument)===null||e===void 0?void 0:e.defaultView;o&&(this.indicator=o.appendChild(new oB({style:{x:a+n/2,y:s-n/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},t.prototype.disconnectedCallback=function(){this.indicator.destroy()},t.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},t.prototype.bindEvents=function(){var e=this,n=this.attributes.onClick;if(this.addEventListener("click",function(){n==null||n(e)}),this.showBackground){var i=function(){return e.background.attr({opacity:t.backgroundOpacities.default})},a=function(){return e.background.attr({opacity:t.backgroundOpacities.hover})},s=function(){return e.background.attr({opacity:t.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){a(),e.showIndicator()}),this.addEventListener("pointerleave",function(){i(),e.hideIndicator()}),this.addEventListener("pointerdown",function(){s()}),this.addEventListener("pointerup",function(){i()})}},t.tag="IconBase",t.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},t.backgroundOpacities={default:0,hover:.8,active:1},t}(ft),yo=function(r,t){return t===void 0&&(t="#565758"),new Bf({style:{fill:t,d:"M ".concat(r,",").concat(r," L -").concat(r,",0 L ").concat(r,",-").concat(r," Z"),transformOrigin:"center"}})},cB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.arcPath=function(e,n,i){var a=(0,A.CR)([i,i],2),s=a[0],o=a[1],l=function(g){return[e+i*Math.cos(g),n+i*Math.sin(g)]},u=(0,A.CR)(l(-5/4*Math.PI),2),c=u[0],d=u[1],h=(0,A.CR)(l(1/4*Math.PI),2),f=h[0],v=h[1];return"M".concat(c,",").concat(d,",A").concat(s,",").concat(o,",0,1,1,").concat(f,",").concat(v)},Object.defineProperty(t.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=this.lineWidth,l=o+.5;he(this.icon).maybeAppend(".reset","path").styles({stroke:a,lineWidth:o,d:this.arcPath(n,i,s/2-o),markerStart:yo(l,a)})},t}(sr),dB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/2,l=s/2/Math.pow(3,.5),u=[[n,i],[n,i-l],[n-o,i],[n,i+l],[n,i],[n+o,i-l],[n+o,i+l],[n,i]];he(this.icon).maybeAppend(".backward","polygon").styles({points:u,fill:a})},t}(sr),hB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/2,l=s/2/Math.pow(3,.5),u=[[n,i],[n,i-l],[n+o,i],[n,i+l],[n,i],[n-o,i-l],[n-o,i+l],[n,i]];he(this.icon).maybeAppend(".forward","polygon").styles({points:u,fill:a})},t}(sr),fB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/3*Math.pow(3,.5)*.8,l=[[n+o,i],[n-o/2,i-s/2*.8],[n-o/2,i+s/2*.8],[n+o,i]];he(this.icon).maybeAppend(".play","polygon").styles({points:l,fill:a})},t}(sr),vB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/3,l=[[n-o,i-s/2],[n-o,i+s/2],[n-o/2,i+s/2],[n-o/2,i-s/2],[n-o,i-s/2],[n+o/2,i-s/2],[n+o/2,i+s/2],[n+o,i+s/2],[n+o,i-s/2]];he(this.icon).maybeAppend(".pause","polygon").styles({points:l,fill:a})},t}(sr),gB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth,u=l;he(this.icon).maybeAppend(".left-line","line").styles({x1:n-o/2,y1:i-o/2,x2:n-o/2,y2:i+o/2,stroke:a,lineWidth:l}),he(this.icon).maybeAppend(".right-line","line").styles({x1:n+o/2,y1:i-o/2,x2:n+o/2,y2:i+o/2,stroke:a,lineWidth:l}),he(this.icon).maybeAppend(".left-arrow","line").styles({x1:n,y1:i,x2:n-o/2+u*2,y2:i,stroke:a,lineWidth:l,markerEnd:yo(l*2,a)}),he(this.icon).maybeAppend(".right-arrow","line").styles({x1:n,y1:i,x2:n+o/2-u*2,y2:i,stroke:a,lineWidth:l,markerEnd:yo(l*2,a)})},t}(sr),pB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth;he(this.icon).maybeAppend(".line","line").styles({x1:n,y1:i-o/2,x2:n,y2:i+o/2,stroke:a,lineWidth:l});var u=l;he(this.icon).maybeAppend(".left-arrow","line").styles({x1:n-o/2-u*2,y1:i,x2:n-u*2,y2:i,stroke:a,lineWidth:l,markerEnd:yo(l*2,a)}),he(this.icon).maybeAppend(".right-arrow","line").styles({x1:n+o/2+u*2,y1:i,x2:n+u*2,y2:i,stroke:a,lineWidth:l,markerEnd:yo(l*2,a)})},t}(sr),nx=function(r){return[[-r/2,-r/2],[-r/2,r/2],[r/2,r/2]]},mB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth,u=l,c=(o-u*2-l)/4,d=(o-u*2-l)/2,h=(0,A.CR)([n-o/2+u,i+o/2-u*2],2),f=h[0],v=h[1];he(this.icon).maybeAppend(".coordinate","polyline").styles({points:nx(o).map(function(g){var p=(0,A.CR)(g,2),m=p[0],y=p[1];return[m+n,y+i]}),stroke:a,lineWidth:l}),he(this.icon).maybeAppend(".line","polyline").styles({points:[[f,v],[f+c,v-d],[f+c*2,v],[f+c*4,v-d*2]],stroke:a,lineWidth:l})},t}(sr),yB=function(r){(0,A.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.data,n=this.attributes,i=n.x,a=n.y,s=n.color,o=this,l=o.iconSize,u=o.lineWidth,c=u,d=(l-c)/e.length,h=(l-c*2)/4,f=(0,A.CR)([i-l/2+c*2,a+l/2-c],2),v=f[0],g=f[1];he(this.icon).maybeAppend(".coordinate","polyline").styles({points:nx(l).map(function(p){var m=(0,A.CR)(p,2),y=m[0],b=m[1];return[y+i,b+a]}),stroke:s,lineWidth:u}),he(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(p,m){return{value:p,index:m}})).join(function(p){return p.append("line").attr("className","column").style("x1",function(m){var y=m.index;return v+d*y}).style("y1",g).style("x2",function(m){var y=m.index;return v+d*y}).style("y2",function(m){var y=m.value;return g-h*y}).styles({y1:g,stroke:s,lineWidth:u})})},t}(sr),bB=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},{style:{color:"#d8d9d9"}},e))||this;return n.showBackground=!1,n}return t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth;he(this.icon).maybeAppend(".split","line").styles({x1:n,y1:i-o/2,x2:n,y2:i+o/2,stroke:a,lineWidth:l})},t}(sr),pv=function(r){(0,A.ZT)(t,r);function t(){var e=r.apply(this,(0,A.ev)([],(0,A.CR)(arguments),!1))||this;return e.showBackground=!1,e}return Object.defineProperty(t.prototype,"padding",{get:function(){return Nt(0)},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.iconSize,n=this.attributes,i=n.x,a=n.y,s=n.speed,o=s===void 0?1:s,l=(0,af.Z)(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),u=(0,Ne.Z)(e,20,1/0),c=20,d=(0,A.pi)((0,A.pi)({},l),{x:i-u/2,y:a-c/2,width:u,height:c,defaultValue:o,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:e/5,placeholderFontSize:e/2,optionPadding:0,optionLabelFontSize:e/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});he(this.icon).maybeAppend(".speed",function(){return new uB({style:d})}).attr("className","speed").each(function(){this.update(d)})},t.tag="SpeedSelect",t}(sr),mv=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,e)||this;return n.icon=n.appendChild(new xn({})),n.currentType=n.attributes.type,n}return t.prototype.getType=function(){return this.currentType},t.prototype.render=function(){var e=this,n=this.attributes,i=n.onChange,a=(0,A._T)(n,["onChange"]);he(this.icon).selectAll(".icon").data([this.currentType]).join(function(s){return s.append(function(o){var l,u=(l=e.toggles.find(function(c){var d=(0,A.CR)(c,1),h=d[0];return h===o}))===null||l===void 0?void 0:l[1];if(!u)throw new Error("Invalid type: ".concat(o));return new u({})}).attr("className","icon").styles(a,!1).update({})},function(s){return s.styles({restStyles:a}).update({})},function(s){return s.remove()})},t.prototype.bindEvents=function(){var e=this,n=this.attributes.onChange;this.addEventListener("click",function(i){i.preventDefault(),i.stopPropagation();var a=(e.toggles.findIndex(function(o){var l=(0,A.CR)(o,1),u=l[0];return u===e.currentType})+1)%e.toggles.length,s=e.toggles[a][0];n==null||n(e.currentType),e.currentType=s,e.render()})},t.tag="ToggleIcon",t}(ft),yv=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},{style:{type:"play"}},e))||this;return n.toggles=[["play",fB],["pause",vB]],n}return t}(mv),bv=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},{style:{type:"range"}},e))||this;return n.toggles=[["range",gB],["value",pB]],n}return t}(mv),xv=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},{style:{type:"column"}},e))||this;return n.toggles=[["line",mB],["column",yB]],n}return t}(mv),xB={reset:cB,speed:pv,backward:dB,playPause:yv,forward:hB,selectionType:bv,chartType:xv,split:bB},EB=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},t.defaultOptions,e))||this;return n.background=n.appendChild(new Qa({})),n.functions=n.appendChild(new xn({})),n}return Object.defineProperty(t.prototype,"padding",{get:function(){return Nt(this.attributes.padding)},enumerable:!1,configurable:!0}),t.prototype.renderBackground=function(){var e=this.style,n=e.x,i=e.y,a=e.width,s=e.height,o=xe(this.attributes,"background");this.background.attr((0,A.pi)({x:n,y:i,width:a,height:s},o))},t.prototype.renderFunctions=function(){var e=this,n,i=this.attributes,a=i.functions,s=i.iconSize,o=i.iconSpacing,l=i.x,u=i.y,c=i.width,d=i.height,h=i.align,f=(0,A.CR)(this.padding,4),v=f[1],g=f[3],p=a.reduce(function(b,_){return b.length&&_.length?b.concat.apply(b,(0,A.ev)(["split"],(0,A.CR)(_),!1)):b.concat.apply(b,(0,A.ev)([],(0,A.CR)(_),!1))},[]),m=p.length*(s+o)-o,y={left:g+s/2,center:(c-m)/2+s/2,right:c-m-g-v+s/2}[h]||0;(n=this.speedSelect)===null||n===void 0||n.destroy(),this.functions.removeChildren(),p.forEach(function(b,_){var w,x=xB[b],E={x:l+_*(s+o)+y,y:u+d/2,size:s};if(x===pv?(E.speed=e.attributes.speed,E.onSelect=function(O){return e.handleFunctionChange(b,{value:O})}):[yv,bv,xv].includes(x)?(E.onChange=function(O){return e.handleFunctionChange(b,{value:O})},x===yv&&(E.type=e.attributes.state==="play"?"pause":"play"),x===bv&&(E.type=e.attributes.selectionType==="range"?"value":"range"),x===xv&&(E.type=e.attributes.chartType==="line"?"column":"line")):E.onClick=function(){return e.handleFunctionChange(b,{value:b})},x===pv){var k=(w=e.ownerDocument)===null||w===void 0?void 0:w.defaultView;k&&(e.speedSelect=new x({style:(0,A.pi)((0,A.pi)({},E),{zIndex:100})}),k.appendChild(e.speedSelect))}else e.functions.appendChild(new x({style:E}))})},t.prototype.disconnectedCallback=function(){var e;r.prototype.disconnectedCallback.call(this),(e=this.speedSelect)===null||e===void 0||e.destroy()},t.prototype.render=function(){this.renderBackground(),this.renderFunctions()},t.prototype.handleFunctionChange=function(e,n){var i=this.attributes.onChange;i==null||i(e,n)},t.defaultOptions={style:{x:0,y:0,width:300,height:40,padding:0,align:"center",iconSize:25,iconSpacing:0,speed:1,state:"pause",chartType:"line",selectionType:"range",backgroundFill:"#fbfdff",backgroundStroke:"#ebedf0",functions:[["reset","speed"],["backward","playPause","forward"],["selectionType","chartType"]]}},t}(ft),wB=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},t.defaultOptions,e))||this;return n.bindEvents(),n}return t.prototype.bindEvents=function(){var e=this;this.addEventListener("mouseenter",function(){e.attr("lineWidth",Math.ceil(+(e.style.r||0)/2))}),this.addEventListener("mouseleave",function(){e.attr("lineWidth",0)})},t.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},t}(If),kB=function(r){(0,A.ZT)(t,r);function t(e){return r.call(this,_t({},t.defaultOptions,e))||this}return t.prototype.renderBackground=function(){var e=this.attributes,n=e.x,i=e.y,a=e.width,s=e.height,o=xe(this.attributes,"background");he(this).maybeAppend("background","rect").attr("className","background").styles((0,A.pi)({x:n-a/2,y:i-s/2,width:a,height:s},o))},t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.iconSize,s=xe(this.attributes,"icon"),o=1,l=a/2;he(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,A.pi)({x1:n-o,y1:i-l,x2:n-o,y2:i+l},s)),he(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,A.pi)({x1:n+o,y1:i-l,x2:n+o,y2:i+l},s))},t.prototype.renderBorder=function(){var e=this.attributes,n=e.x,i=e.y,a=e.width,s=e.height,o=e.type,l=xe(this.attributes,"border"),u=o==="start"?+a/2:-a/2;he(this).maybeAppend("border","line").attr("className","border").styles((0,A.pi)({x1:u+n,y1:i-s/2,x2:u+n,y2:i+s/2},l))},t.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},t.defaultOptions={style:{x:0,y:0,width:10,height:50,iconSize:10,type:"start",backgroundFill:"#fff",backgroundFillOpacity:.5,iconStroke:"#9a9a9a",iconLineWidth:1,borderStroke:"#e8e8e8",borderLineWidth:1}},t}(ft);function _B(r,t){return typeof r=="number"?rx(r):SB(r,t)}function SB(r,t){var e=new Date(r);switch(t){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(e.getHours())&&e.getMinutes()===0?Ut(e,`HH:mm
|
|
YYYY-MM-DD`):Ut(e,"HH:mm");case"half-day":return e.getHours()<12?`AM
|
|
`.concat(Ut(e,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(e.getDate())?Ut(e,`DD
|
|
YYYY-MM`):Ut(e,"DD");case"week":return e.getDate()<=7?Ut(e,`DD
|
|
YYYY-MM`):Ut(e,"DD");case"month":return[0,6].includes(e.getMonth())?Ut(e,`MM\u6708
|
|
YYYY`):Ut(e,"MM\u6708");case"season":return[0].includes(e.getMonth())?Ut(e,`MM\u6708
|
|
YYYY`):Ut(e,"MM\u6708");case"year":return Ut(e,"YYYY");default:return Ut(e,"YYYY-MM-DD HH:mm")}}function rx(r){var t=String(Math.floor(r/3600)).padStart(2,"0"),e=String(Math.floor(r%3600/60)).padStart(2,"0"),n=String(Math.floor(r%60)).padStart(2,"0");return r<3600?"".concat(e,":").concat(n):"".concat(t,":").concat(e,":").concat(n)}var TB=function(r){(0,A.ZT)(t,r);function t(e){var n=r.call(this,_t({},t.defaultOptions,e))||this;n.axis=n.appendChild(new VI({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),n.timeline=n.appendChild(new aB({style:{onChange:function(d){n.handleSliderChange(d)}}})),n.controller=n.appendChild(new EB({})),n.states={},n.handleSliderChange=function(d){var h=function(){var f=n.states.values;return Array.isArray(f)?(0,A.ev)([],(0,A.CR)(f),!1):f}();n.setBySliderValues(d),n.dispatchOnChange(h)};var i=n.attributes,a=i.selectionType,s=i.chartType,o=i.speed,l=i.state,u=i.playMode,c=i.values;return n.states={chartType:s,playMode:u,selectionType:a,speed:o,state:l},n.setByTimebarValues(c),n}return Object.defineProperty(t.prototype,"data",{get:function(){var e=this.attributes.data,n=function(i,a){return i.time<a.time?-1:i.time>a.time?1:0};return e.sort(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"space",{get:function(){var e=this.attributes,n=e.x,i=e.y,a=e.width,s=e.height,o=e.type,l=e.controllerHeight,u=(0,Ne.Z)(+s-l,0,+s),c=new It(n,i+ +s-l,+a,l),d,h=0;o==="chart"?(h=35,d=new It(n,i+u-h,+a,h)):d=new It;var f=o==="time"?10:u,v=new It(n,i+(o==="time"?u:u-f),+a,f-h);return{axisBBox:d,controllerBBox:c,timelineBBox:v}},enumerable:!1,configurable:!0}),t.prototype.setBySliderValues=function(e){var n,i,a=this.data,s=(0,A.CR)(Array.isArray(e)?e:[0,e],2),o=s[0],l=s[1],u=a.length,c=a[Math.floor(o*u)],d=a[Math.ceil(l*u)-(Array.isArray(e)?0:1)];this.states.values=[(n=c==null?void 0:c.time)!==null&&n!==void 0?n:a[0].time,(i=d==null?void 0:d.time)!==null&&i!==void 0?i:1/0]},t.prototype.setByTimebarValues=function(e){var n,i,a,s=this.data,o=(0,A.CR)(Array.isArray(e)?e:[void 0,e],2),l=o[0],u=o[1],c=s.find(function(h){var f=h.time;return f===l}),d=s.find(function(h){var f=h.time;return f===u});this.states.values=[(n=c==null?void 0:c.time)!==null&&n!==void 0?n:(i=s[0])===null||i===void 0?void 0:i.time,(a=d==null?void 0:d.time)!==null&&a!==void 0?a:1/0]},t.prototype.setByIndex=function(e){var n,i,a,s,o=this.data,l=(0,A.CR)(e,2),u=l[0],c=l[1];this.states.values=[(i=(n=o[u])===null||n===void 0?void 0:n.time)!==null&&i!==void 0?i:o[0].time,(s=(a=this.data[c])===null||a===void 0?void 0:a.time)!==null&&s!==void 0?s:1/0]},Object.defineProperty(t.prototype,"sliderValues",{get:function(){var e=this.states,n=e.values,i=e.selectionType,a=(0,A.CR)(Array.isArray(n)?n:[void 0,n],2),s=a[0],o=a[1],l=this.data,u=l.length,c=i==="value",d=function(){var f=l.findIndex(function(v){var g=v.time;return g===s});return c?0:f>-1?f/u:0},h=function(){if(o===1/0)return 1;var f=l.findIndex(function(v){var g=v.time;return g===o});return f>-1?f/u:c?.5:1};return[d(),h()]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){var e=this.states,n=e.values,i=e.selectionType,a=(0,A.CR)(Array.isArray(n)?n:[this.data[0].time,n],2),s=a[0],o=a[1];return i==="value"?o:[s,o]},enumerable:!1,configurable:!0}),t.prototype.getDatumByRatio=function(e){var n=this.data,i=n.length,a=Math.floor(e*(i-1));return n[a]},Object.defineProperty(t.prototype,"chartHandleIconShape",{get:function(){var e=this.states.selectionType,n=this.space.timelineBBox.height;return e==="range"?function(i){return new kB({style:{type:i,height:n,iconSize:n/6}})}:function(){return new Db({style:{x1:0,y1:-n/2,x2:0,y2:n/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),t.prototype.getChartStyle=function(e){var n=this,i=e.x,a=e.y,s=e.width,o=e.height,l=this.states,u=l.selectionType,c=l.chartType,d=this.data,h=this.attributes,f=h.type,v=h.labelFormatter,g=xe(this.attributes,"chart"),p=g.type,m=(0,A._T)(g,["type"]),y=u==="range";if(f==="time")return(0,A.pi)({handleIconShape:function(){return new wB({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:y?-15:0,autoFitLabel:y,handleSpacing:y?-15:0,trackFill:"#edeeef",trackLength:s,trackOpacity:.5,trackRadius:o/2,trackSize:o/2,type:u,values:this.sliderValues,formatter:function(w){if(v)return v(w);var x=n.getDatumByRatio(w).time;return typeof x=="number"?rx(x):Ut(x,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},m);var b=u==="range"?5:0,_=d.map(function(w){var x=w.value;return x});return(0,A.pi)({handleIconOffset:b,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:_,sparklineType:c,sparklineScale:.8,trackLength:s,trackSize:o,type:u,values:this.sliderValues,transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},m)},t.prototype.renderChart=function(e){e===void 0&&(e=this.space.timelineBBox),this.timeline.update(this.getChartStyle(e))},t.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},t.prototype.getAxisStyle=function(e){var n=this.data,i=this.attributes,a=i.interval,s=i.labelFormatter,o=xe(this.attributes,"axis"),l=e.x,u=e.y,c=e.width,d=(0,A.ev)((0,A.ev)([],(0,A.CR)(n),!1),[{time:0}],!1).map(function(f,v,g){var p=f.time;return{label:"".concat(p),value:v/(g.length-1),time:p}}),h=(0,A.pi)({startPos:[l,u],endPos:[l+c,u],data:d,labelFilter:function(f,v){return v<d.length-1},labelFormatter:function(f){var v=f.time;return s?s(v):_B(v,a)}},o);return h},t.prototype.renderAxis=function(e){e===void 0&&(e=this.space.axisBBox);var n=this.attributes.type;n==="chart"&&this.axis.update(this.getAxisStyle(e))},t.prototype.renderController=function(e){e===void 0&&(e=this.space.controllerBBox);var n=this.attributes.type,i=this.states,a=i.state,s=i.speed,o=i.selectionType,l=i.chartType,u=xe(this.attributes,"controller"),c=this,d=(0,A.pi)((0,A.pi)((0,A.pi)({},e),{iconSize:20,speed:s,state:a,selectionType:o,chartType:l,onChange:function(h,f){var v=f.value;switch(h){case"reset":c.internalReset();break;case"speed":c.handleSpeedChange(v);break;case"backward":c.internalBackward();break;case"playPause":v==="play"?c.internalPlay():c.internalPause();break;case"forward":c.internalForward();break;case"selectionType":c.handleSelectionTypeChange(v);break;case"chartType":c.handleChartTypeChange(v);break;default:break}}}),u);n==="time"&&(d.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(d)},t.prototype.dispatchOnChange=function(e){var n=this.data,i=this.attributes.onChange,a=this.states,s=a.values,o=a.selectionType,l=(0,A.CR)(s,2),u=l[0],c=l[1],d=c===1/0?n.at(-1).time:c,h=o==="range"?[u,d]:d,f=function(v,g){return Array.isArray(v)?Array.isArray(g)?v[0]===g[0]&&(v[1]===g[1]||v[1]===1/0||g[1]===1/0):!1:Array.isArray(g)?!1:v===g};(!e||!f(e,h))&&(i==null||i(o==="range"?[u,d]:d))},t.prototype.internalReset=function(e){var n,i,a=this.states.selectionType;this.internalPause(),this.setBySliderValues(a==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),e||((i=(n=this.attributes)===null||n===void 0?void 0:n.onReset)===null||i===void 0||i.call(n),this.dispatchOnChange())},t.prototype.reset=function(){this.internalReset()},t.prototype.moveSelection=function(e,n){var i=this.data,a=i.length,s=this.states,o=s.values,l=s.selectionType,u=s.playMode,c=(0,A.CR)(o,2),d=c[0],h=c[1],f=i.findIndex(function(b){var _=b.time;return _===d}),v=i.findIndex(function(b){var _=b.time;return _===h});v===-1&&(v=a);var g=e==="backward"?-1:1,p;l==="range"?u==="acc"?(p=[f,v+g],g===-1&&f===v&&(p=[f,a])):p=[f+g,v+g]:p=[f,v+g];var m=function(b){var _=(0,A.CR)(b.sort(function(k,O){return k-O}),2),w=_[0],x=_[1],E=function(k){return(0,Ne.Z)(k,0,a)};return x>a?l==="value"?[0,0]:u==="acc"?[E(w),E(w)]:[0,E(x-w)]:w<0?u==="acc"?[0,E(x)]:[E(w+a-x),a]:[E(w),E(x)]},y=m(p);return this.setByIndex(y),this.updateSelection(),y},t.prototype.internalBackward=function(e){var n,i,a=this.moveSelection("backward",e);return e||((i=(n=this.attributes)===null||n===void 0?void 0:n.onBackward)===null||i===void 0||i.call(n),this.dispatchOnChange()),a},t.prototype.backward=function(){this.internalBackward()},t.prototype.internalPlay=function(e){var n=this,i,a,s=this.data,o=this.attributes.loop,l=this.states.speed,u=l===void 0?1:l;this.playInterval=window.setInterval(function(){var c=n.internalForward();c[1]===s.length&&!o&&(n.internalPause(),n.renderController())},1e3/u),this.states.state="play",!e&&((a=(i=this.attributes)===null||i===void 0?void 0:i.onPlay)===null||a===void 0||a.call(i))},t.prototype.play=function(){this.internalPlay()},t.prototype.internalPause=function(e){var n,i;clearInterval(this.playInterval),this.states.state="pause",!e&&((i=(n=this.attributes)===null||n===void 0?void 0:n.onPause)===null||i===void 0||i.call(n))},t.prototype.pause=function(){this.internalPause()},t.prototype.internalForward=function(e){var n,i,a=this.moveSelection("forward",e);return e||((i=(n=this.attributes)===null||n===void 0?void 0:n.onForward)===null||i===void 0||i.call(n),this.dispatchOnChange()),a},t.prototype.forward=function(){this.internalForward()},t.prototype.handleSpeedChange=function(e){var n,i;this.states.speed=e;var a=this.states.state;a==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(i=(n=this.attributes)===null||n===void 0?void 0:n.onSpeedChange)===null||i===void 0||i.call(n,e)},t.prototype.handleSelectionTypeChange=function(e){var n,i;this.states.selectionType=e,this.renderChart(),(i=(n=this.attributes)===null||n===void 0?void 0:n.onSelectionTypeChange)===null||i===void 0||i.call(n,e)},t.prototype.handleChartTypeChange=function(e){var n,i;this.states.chartType=e,this.renderChart(),(i=(n=this.attributes)===null||n===void 0?void 0:n.onChartTypeChange)===null||i===void 0||i.call(n,e)},t.prototype.render=function(){var e=this.space,n=e.axisBBox,i=e.controllerBBox,a=e.timelineBBox;this.renderController(i),this.renderAxis(n),this.renderChart(a),this.states.state==="play"&&this.internalPlay()},t.prototype.destroy=function(){r.prototype.destroy.call(this),this.internalPause(!0)},t.defaultOptions={style:{x:0,y:0,axisLabelFill:"#6e6e6e",axisLabelTextAlign:"left",axisLabelTextBaseline:"top",axisLabelTransform:"translate(5, -12)",axisLineLineWidth:1,axisLineStroke:"#cacdd1",axisTickLength:15,axisTickLineWidth:1,axisTickStroke:"#cacdd1",chartShowLabel:!1,chartType:"line",controllerAlign:"center",controllerHeight:40,data:[],interval:"day",loop:!1,playMode:"acc",selectionType:"range",type:"time"}},t}(ft),AB=Y(69246),CB=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})},OB=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const PB=["timestamp","time","date","datetime"];class Mc extends Pt{get padding(){return mr(this.options.padding)}constructor(t,e){super(t,Object.assign({},Mc.defaultOptions,e)),this.backup(),this.upsertTimebar()}play(){var t;(t=this.timebar)===null||t===void 0||t.play()}pause(){var t;(t=this.timebar)===null||t===void 0||t.pause()}forward(){var t;(t=this.timebar)===null||t===void 0||t.forward()}backward(){var t;(t=this.timebar)===null||t===void 0||t.backward()}reset(){var t;(t=this.timebar)===null||t===void 0||t.reset()}update(t){super.update(t),this.backup(),this.upsertTimebar()}backup(){this.originalData=ix(this.context.graph.getData())}upsertTimebar(){const{canvas:t}=this.context,e=this.options,{onChange:n,timebarType:i,data:a,x:s,y:o,width:l,height:u,mode:c}=e,d=OB(e,["onChange","timebarType","data","x","y","width","height","mode"]),h=t.getSize(),[f]=this.padding;this.upsertCanvas().ready.then(()=>{var v;const g=Object.assign(Object.assign({x:h[0]/2-l/2,y:f,onChange:p=>{const m=((0,da.Z)(p)?p:[p,p]).map(y=>(0,AB.Z)(y)?y.getTime():y);this.options.mode==="modify"?this.filterElements(m):this.hiddenElements(m),n==null||n(m)}},d),{data:a.map(p=>(0,oe.Z)(p)?{time:p,value:0}:p),width:l,height:u,type:i});this.timebar?this.timebar.update(g):(this.timebar=new TB({style:g}),(v=this.canvas)===null||v===void 0||v.appendChild(this.timebar))})}upsertCanvas(){if(this.canvas)return this.canvas;const{className:t,height:e,position:n}=this.options,i=this.context.canvas,[a]=i.getSize(),[s,,o]=this.padding,[l,u]=ev({width:a,height:e+s+o,graphCanvas:i,className:"timebar",placement:n});return this.container=l,t&&l.classList.add(t),this.canvas=u,this.canvas}filterElements(t){return CB(this,void 0,void 0,function*(){var e;if(!this.originalData)return;const{elementTypes:n,getTime:i}=this.options,{graph:a,element:s}=this.context,o=ix(this.originalData);n.forEach(u=>{const c=`${u}s`;o[c]=(this.originalData[c]||[]).filter(d=>{const h=i(d);return!!ax(h,t)})});const l=[...o.nodes,...o.combos].map(u=>j(u));o.edges=o.edges.filter(u=>{const c=u.source,d=u.target;return l.includes(c)&&l.includes(d)}),a.setData(o),yield(e=s.draw({animation:!1,silence:!0}))===null||e===void 0?void 0:e.finished})}hiddenElements(t){const{graph:e}=this.context,{elementTypes:n,getTime:i}=this.options,a=[],s=[];n.forEach(o=>{var l;const u=`${o}s`;(((l=this.originalData)===null||l===void 0?void 0:l[u])||[]).forEach(d=>{const h=j(d),f=i(d);ax(f,t)?s.push(h):a.push(h)})}),e.hideElement(a,!1),e.showElement(s,!1)}destroy(){var t,e,n;const{graph:i}=this.context;this.originalData&&i.setData(Object.assign({},this.originalData)),(t=this.timebar)===null||t===void 0||t.destroy(),(e=this.canvas)===null||e===void 0||e.destroy(),(n=this.container)===null||n===void 0||n.remove(),this.originalData=void 0,this.container=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}Mc.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:r=>NB(r,PB,void 0),loop:!1};const ix=r=>{const{nodes:t=[],edges:e=[],combos:n=[]}=r;return{nodes:[...t],edges:[...e],combos:[...n]}},ax=(r,t)=>{if((0,oe.Z)(t))return r===t;const[e,n]=t;return r>=e&&r<=n},NB=(r,t,e)=>{var n;for(let i=0;i<t.length;i++){const a=t[i],s=(n=r.data)===null||n===void 0?void 0:n[a];if(s)return s}return e};function MB(r){const t={top:"unset",right:"unset",bottom:"unset",left:"unset"};return r.split("-").forEach(n=>{t[n]="8px"}),t.flexDirection=r.startsWith("top")||r.startsWith("bottom")?"row":"column",t}const RB=`
|
|
.g6-toolbar {
|
|
position: absolute;
|
|
z-index: 100;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 4px;
|
|
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
|
|
opacity: 0.65;
|
|
}
|
|
.g6-toolbar .g6-toolbar-item {
|
|
display: inline-block;
|
|
width: 16px;
|
|
height: 16px;
|
|
padding: 4px;
|
|
cursor: pointer;
|
|
box-sizing: content-box;
|
|
}
|
|
|
|
.g6-toolbar .g6-toolbar-item:hover {
|
|
background-color: #f0f0f0;
|
|
}
|
|
|
|
.g6-toolbar .g6-toolbar-item svg {
|
|
display: inline-block;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
}
|
|
`,LB=`
|
|
<svg>
|
|
<symbol id="zoom-in" viewBox="64 64 896 896">
|
|
<path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
|
|
</symbol>
|
|
<symbol id="zoom-out" viewBox="64 64 896 896">
|
|
<path d="M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
|
|
</symbol>
|
|
<symbol id="edit" viewBox="64 64 896 896">
|
|
<path d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"></path>
|
|
</symbol>
|
|
<symbol id="delete" viewBox="64 64 896 896">
|
|
<path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path>
|
|
</symbol>
|
|
<symbol id="redo" viewBox="64 64 896 896">
|
|
<path d="M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"></path>
|
|
</symbol>
|
|
<symbol id="undo" viewBox="64 64 896 896">
|
|
<path d="M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z"></path>
|
|
</symbol>
|
|
<symbol id="export" viewBox="64 64 896 896">
|
|
<path d="M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"></path>
|
|
</symbol>
|
|
<symbol id="auto-fit" viewBox="64 64 896 896">
|
|
<path d="M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"></path>
|
|
<path d="M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"></path>
|
|
</symbol>
|
|
<symbol id="reset" viewBox="64 64 896 896">
|
|
<path d="M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"></path>
|
|
</symbol>
|
|
<symbol id="exit-fullscreen" viewBox="0 0 1024 1024">
|
|
<path d="M418.13333333 361.43786666c0 0.2048-0.13653333 0.4096-0.13653334 0.68266667C417.99679999 362.32533333 418.13333333 362.53013333 418.13333333 362.73493333 418.13333333 371.54133333 414.44693333 379.392 408.78079999 385.39946666 408.43946666 385.7408 408.30293333 386.21866666 408.02986666 386.49173333c-1.09226667 1.09226667-2.59413333 1.77493333-3.82293333 2.73066667C398.40426666 393.65973333 391.64586666 396.8 383.93173333 396.8 383.72693333 396.8 383.59039999 396.73173333 383.38559999 396.73173333S382.97599999 396.8 382.77119999 396.8L112.29866666 396.8C92.50133333 396.8 76.79999999 381.50826666 76.79999999 362.66666666 76.66346666 343.89333333 92.63786666 328.53333333 112.16213333 328.53333333l189.44 0L87.44959999 114.51733333C73.59146666 100.59093333 73.25013333 78.5408 86.63039999 65.29706666c13.17546667-13.44853333 35.36213333-12.97066667 49.152 0.88746667l214.08426667 214.08426667L349.86666666 90.89706666C349.79839999 71.23626666 365.22666666 55.46666666 383.99999999 55.46666666 402.77333333 55.33013333 418.13333333 71.30453333 418.13333333 90.8288L418.13333333 361.43786666zM928.90453333 328.53333333l-189.44 0 214.15253333-214.08426667c13.85813333-13.9264 14.19946667-35.90826667 0.88746667-49.22026666-13.17546667-13.44853333-35.36213333-12.97066667-49.152 0.88746666l-214.08426667 214.08426667L691.26826666 90.89706666C691.26826666 71.23626666 675.83999999 55.46666666 657.06666666 55.46666666 638.29333333 55.33013333 622.93333333 71.30453333 622.93333333 90.8288l0 270.60906666c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 362.32533333 622.93333333 362.53013333 622.93333333 362.73493333 622.93333333 371.54133333 626.61973333 379.392 632.28586666 385.39946666c0.34133333 0.34133333 0.47786667 0.8192 0.8192 1.09226667 1.09226667 1.09226667 2.59413333 1.77493333 3.8912 2.73066667C642.66239999 393.65973333 649.42079999 396.8 657.13493333 396.8c0.2048 0 0.34133333-0.06826667 0.54613333-0.06826667S658.09066666 396.8 658.29546666 396.8l270.5408 0C948.56533333 396.8 964.26666666 381.50826666 964.26666666 362.66666666 964.40319999 343.89333333 948.42879999 328.53333333 928.90453333 328.53333333zM418.13333333 635.73333333c0-8.8064-3.6864-16.5888-9.35253334-22.66453333C408.43946666 612.72746666 408.30293333 612.2496 408.02986666 611.90826666 406.86933333 610.88426666 405.43573333 610.2016 404.20693333 609.24586666 398.47253333 604.80853333 391.64586666 601.6 383.93173333 601.6 383.72693333 601.6 383.59039999 601.73653333 383.38559999 601.73653333S382.97599999 601.6 382.77119999 601.6L112.29866666 601.6C92.50133333 601.6 76.79999999 616.96 76.79999999 635.73333333 76.66346666 654.50666666 92.63786666 669.86666666 112.16213333 669.86666666l189.44 0-214.15253334 214.15253334c-13.85813333 13.85813333-14.19946667 35.84-0.88746666 49.22026666 13.17546667 13.44853333 35.36213333 12.9024 49.152-0.95573333l214.08426666-214.08426667 0 189.37173334c0 19.59253333 15.42826667 35.49866667 34.2016 35.36213333C402.77333333 943.2064 418.13333333 927.232 418.13333333 907.5712L418.13333333 637.09866666c0-0.27306667-0.13653333-0.47786667-0.13653334-0.68266666C417.99679999 636.14293333 418.13333333 635.93813333 418.13333333 635.73333333zM739.46453333 669.86666666l189.44 0c19.456 0 35.49866667-15.36 35.36213333-34.13333333C964.26666666 616.96 948.56533333 601.6 928.76799999 601.6L658.29546666 601.6C658.09066666 601.6 657.88586666 601.73653333 657.68106666 601.73653333S657.33973333 601.6 657.13493333 601.6C649.42079999 601.6 642.59413333 604.80853333 636.85973333 609.24586666 635.63093333 610.2016 634.19733333 610.88426666 633.03679999 611.90826666 632.76373333 612.2496 632.62719999 612.72746666 632.28586666 613.0688 626.61973333 619.14453333 622.93333333 626.92693333 622.93333333 635.73333333c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 636.6208 622.93333333 636.8256 622.93333333 637.09866666l0 270.5408C622.93333333 927.232 638.29333333 943.2064 657.06666666 942.93333333c18.77333333 0.13653333 34.2016-15.70133333 34.2016-35.36213333l0-189.37173334 214.08426667 214.08426667c13.78986667 13.85813333 35.90826667 14.40426667 49.152 0.95573333 13.312-13.312 12.97066667-35.36213333-0.88746667-49.22026666L739.46453333 669.86666666z" ></path></symbol>
|
|
<symbol id="request-fullscreen" viewBox="0 0 1024 1024">
|
|
<path d="M69.818182 87.598545v273.128728a34.909091 34.909091 0 0 0 69.818182 0V163.653818l221.928727 222.021818a33.512727 33.512727 0 0 0 47.383273-47.383272L186.926545 116.363636h197.073455a34.909091 34.909091 0 0 0 0-69.818181H110.871273C85.364364 46.545455 69.818182 59.671273 69.818182 87.598545zM938.542545 46.545455H665.413818a34.909091 34.909091 0 0 0 0 69.818181h197.073455L640.465455 338.292364a33.512727 33.512727 0 0 0 47.383272 47.383272l221.928728-222.021818v197.073455a34.909091 34.909091 0 0 0 69.818181 0V87.598545c0-27.927273-15.453091-41.053091-40.96-41.05309z m-827.671272 907.636363h273.128727a34.909091 34.909091 0 0 0 0-69.818182H186.926545l222.021819-221.928727a33.512727 33.512727 0 0 0-47.383273-47.383273L139.636364 837.073455V640a34.909091 34.909091 0 0 0-69.818182 0v273.128727c0 27.927273 15.546182 41.053091 41.053091 41.053091z m868.724363-41.053091V640a34.909091 34.909091 0 0 0-69.818181 0v197.073455L687.941818 615.051636a33.512727 33.512727 0 0 0-47.383273 47.383273L862.487273 884.363636H665.413818a34.909091 34.909091 0 0 0 0 69.818182h273.128727c25.6 0 41.053091-13.125818 41.053091-41.053091z" ></path></symbol>
|
|
</svg>
|
|
`;var sx=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class Rc extends Pt{constructor(t,e){super(t,Object.assign({},Rc.defaultOptions,e)),this.$element=Za("toolbar",!1),this.onToolbarItemClick=i=>{const{onClick:a}=this.options;if(i.target instanceof Element&&i.target.className.includes("g6-toolbar-item")){const s=i.target.getAttribute("value");a==null||a(s,i.target)}};const n=this.context.canvas.getContainer();this.$element.style.display="flex",n.appendChild(this.$element),sf("g6-toolbar-css","style",{},RB,document.head),sf("g6-toolbar-svgicon","div",{display:"none"},LB),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return sx(this,void 0,void 0,function*(){e.update.call(this,t);const{className:n,position:i,style:a}=this.options;this.$element.className=`g6-toolbar ${n||""}`,Object.assign(this.$element.style,a,MB(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return sx(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(e=>`
|
|
<div class="g6-toolbar-item" value="${e.value}">
|
|
<svg aria-hidden="true" focusable="false">
|
|
<use xlink:href="#${e.id}"></use>
|
|
</svg>
|
|
</div>`).join("")})}}Rc.defaultOptions={position:"top-left"};var Ev=Y(88204),DB=Y(68856),ox=function(r,t){if(t==null){r.innerHTML="";return}r.replaceChildren?Array.isArray(t)?r.replaceChildren.apply(r,(0,A.ev)([],(0,A.CR)(t),!1)):r.replaceChildren(t):(r.innerHTML="",Array.isArray(t)?t.forEach(function(e){return r.appendChild(e)}):r.appendChild(t))};function wv(r){return r===void 0&&(r=""),{CONTAINER:"".concat(r,"tooltip"),TITLE:"".concat(r,"tooltip-title"),LIST:"".concat(r,"tooltip-list"),LIST_ITEM:"".concat(r,"tooltip-list-item"),NAME:"".concat(r,"tooltip-list-item-name"),MARKER:"".concat(r,"tooltip-list-item-marker"),NAME_LABEL:"".concat(r,"tooltip-list-item-name-label"),VALUE:"".concat(r,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(r,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(r,"tooltip-crosshair-y")}}var lx={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function IB(r){var t;r===void 0&&(r="");var e=wv(r);return t={},t[".".concat(e.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},t[".".concat(e.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},t[".".concat(e.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},t[".".concat(e.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},t[".".concat(e.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},t[".".concat(e.NAME)]={display:"flex","align-items":"center","max-width":"216px"},t[".".concat(e.NAME_LABEL)]=(0,A.pi)({flex:1},lx),t[".".concat(e.VALUE)]=(0,A.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},lx),t[".".concat(e.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t[".".concat(e.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t}var BB=function(r){(0,A.ZT)(t,r);function t(e){var n=this,i,a,s=(a=(i=e.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,o=wv(s);return n=r.call(this,e,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(o.CONTAINER,'"></div>'),title:'<div class="'.concat(o.TITLE,'"></div>'),item:'<li class="'.concat(o.LIST_ITEM,`" data-index={index}>
|
|
<span class="`).concat(o.NAME,`">
|
|
<span class="`).concat(o.MARKER,`" style="background:{color}"></span>
|
|
<span class="`).concat(o.NAME_LABEL,`" title="{name}">{name}</span>
|
|
</span>
|
|
<span class="`).concat(o.VALUE,`" title="{value}">{value}</span>
|
|
</li>`)},style:IB(s)})||this,n.timestamp=-1,n.prevCustomContentKey=n.attributes.contentKey,n.initShape(),n.render(n.attributes,n),n}return Object.defineProperty(t.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.element},Object.defineProperty(t.prototype,"elementSize",{get:function(){var e=this.element.offsetWidth,n=this.element.offsetHeight;return{width:e,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes,n=e.data,i=e.template;return n.map(function(a,s){var o=a.name,l=o===void 0?"":o,u=a.color,c=u===void 0?"black":u,d=a.index,h=(0,A._T)(a,["name","color","index"]),f=(0,A.pi)({name:l,color:c,index:d!=null?d:s},h);return(0,Ev.L)((0,DB.Z)(i.item,f))})},enumerable:!1,configurable:!0}),t.prototype.render=function(e,n){this.renderHTMLTooltipElement(),this.updatePosition()},t.prototype.destroy=function(){var e;(e=this.element)===null||e===void 0||e.remove(),r.prototype.destroy.call(this)},t.prototype.show=function(e,n){var i=this;if(e!==void 0&&n!==void 0){var a=this.element.style.visibility==="hidden",s=function(){i.attributes.x=e!=null?e:i.attributes.x,i.attributes.y=n!=null?n:i.attributes.y,i.updatePosition()};a?this.closeTransition(s):s()}this.element.style.visibility="visible"},t.prototype.hide=function(e,n){e===void 0&&(e=0),n===void 0&&(n=0);var i=this.attributes.enterable;i&&this.isCursorEntered(e,n)||(this.element.style.visibility="hidden")},t.prototype.initShape=function(){var e=this.attributes.template;this.element=(0,Ev.L)(e.container),this.id&&this.element.setAttribute("id",this.id)},t.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var e=this.attributes.content;e&&(typeof e=="string"?this.element.innerHTML=e:ox(this.element,e))}},t.prototype.renderHTMLTooltipElement=function(){var e,n,i=this.attributes,a=i.template,s=i.title,o=i.enterable,l=i.style,u=i.content,c=wv(a.prefixCls),d=this.element;if(this.element.style.pointerEvents=o?"auto":"none",u)this.renderCustomContent();else{s?(d.innerHTML=a.title,d.getElementsByClassName(c.TITLE)[0].innerHTML=s):(n=(e=d.getElementsByClassName(c.TITLE))===null||e===void 0?void 0:e[0])===null||n===void 0||n.remove();var h=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=c.LIST,ox(f,h);var v=this.element.querySelector(".".concat(c.LIST));v?v.replaceWith(f):d.appendChild(f)}jD(d,l)},t.prototype.getRelativeOffsetFromCursor=function(e){var n=this.attributes,i=n.position,a=n.offset,s=e||i,o=s.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},u=this.elementSize,c=u.width,d=u.height,h=[-c/2,-d/2];return o.forEach(function(f){var v=(0,A.CR)(h,2),g=v[0],p=v[1],m=(0,A.CR)(l[f],2),y=m[0],b=m[1];h=[g+(c/2+a[0])*y,p+(d/2+a[1])*b]}),h},t.prototype.setOffsetPosition=function(e){var n=(0,A.CR)(e,2),i=n[0],a=n[1],s=this.attributes,o=s.x,l=o===void 0?0:o,u=s.y,c=u===void 0?0:u,d=s.container,h=d.x,f=d.y;this.element.style.left="".concat(+l+h+i,"px"),this.element.style.top="".concat(+c+f+a,"px")},t.prototype.updatePosition=function(){var e=this.attributes.showDelay,n=e===void 0?60:e,i=Date.now();this.timestamp>0&&i-this.timestamp<n||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},t.prototype.autoPosition=function(e){var n=(0,A.CR)(e,2),i=n[0],a=n[1],s=this.attributes,o=s.x,l=s.y,u=s.bounding,c=s.position;if(!u)return[i,a];var d=this.element,h=d.offsetWidth,f=d.offsetHeight,v=(0,A.CR)([+o+i,+l+a],2),g=v[0],p=v[1],m={left:"right",right:"left",top:"bottom",bottom:"top"},y=u.x,b=u.y,_=u.width,w=u.height,x={left:g<y,right:g+h>y+_,top:p<b,bottom:p+f>b+w},E=[];c.split("-").forEach(function(O){x[O]?E.push(m[O]):E.push(O)});var k=E.join("-");return this.getRelativeOffsetFromCursor(k)},t.prototype.isCursorEntered=function(e,n){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,s=i.y,o=i.width,l=i.height;return new It(a,s,o,l).isPointIn(e,n)}return!1},t.prototype.closeTransition=function(e){var n=this,i=this.element.style.transition;this.element.style.transition="none",e(),setTimeout(function(){n.element.style.transition=i},10)},t.tag="tooltip",t}(ft);class Lc extends Pt{constructor(t,e){super(t,Object.assign({},Lc.defaultOptions,e)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=n=>{const{enable:i}=this.options;return typeof i=="function"?i(n):i},this.onClick=n=>{const{target:{id:i}}=n;this.currentTarget===i?(this.hide(n),this.currentTarget=null):(this.currentTarget=i,this.show(n))},this.onPointerMove=n=>{const{target:i}=n;!this.currentTarget||i.id===this.currentTarget||this.show(n)},this.onPointerLeave=n=>{this.hide(n),this.currentTarget=null},this.onCanvasMove=n=>{this.hide(n),this.currentTarget=null},this.onPointerEnter=n=>{this.show(n)},this.showById=n=>{const i={target:{id:n}};this.show(i)},this.getElementData=(n,i)=>{const{model:a}=this.context;switch(i){case"node":return a.getNodeData([n]);case"edge":return a.getEdgeData([n]);case"combo":return a.getComboData([n]);default:return[]}},this.show=n=>{const{client:i,target:{id:a}}=n;if(hu(n.target)||!this.tooltipElement||!this.isEnable(n))return;const s=this.context.graph.getElementType(a),{getContent:o,title:l}=this.options;this.currentTarget=a;const u=this.getElementData(a,s);let c,d;if(i)c=i.x,d=i.y;else{const f=(0,Wt.Z)(u,"0.style",{x:0,y:0});c=f.x,d=f.y}let h={};if(o)h.content=o(n,u);else{const f=this.context.graph.getElementRenderStyle(a),v=s==="node"?f.fill:f.stroke;h={title:l||s,data:u.map(g=>({name:"ID",value:g.id||`${g.source} -> ${g.target}`,color:v}))}}this.tooltipElement.update(Object.assign(Object.assign(Object.assign({},this.tooltipStyleProps),{x:c,y:d,style:{".tooltip":{visibility:"visible"}}}),h))},this.hide=n=>{var i;if(!n){(i=this.tooltipElement)===null||i===void 0||i.hide();return}if(!this.tooltipElement||!this.currentTarget)return;const{client:{x:a,y:s}}=n;this.tooltipElement.hide(a,s)},this.initTooltip=()=>{var n;const i=new BB({className:"tooltip",style:this.tooltipStyleProps});return(n=this.container)===null||n===void 0||n.appendChild(i.HTMLTooltipElement),i},this.render(),this.bindEvents()}getEvents(){return this.options.trigger==="click"?{"node:click":this.onClick,"edge:click":this.onClick,"combo:click":this.onClick,"canvas:click":this.onPointerLeave,contextmenu:this.onPointerLeave,drag:this.onPointerLeave}:{"node:pointerenter":this.onPointerEnter,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerenter":this.onPointerEnter,"edge:pointermove":this.onPointerMove,"combo:pointerenter":this.onPointerEnter,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(t){var e;this.unbindEvents(),super.update(t),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:t}=this.context,e=t.getContainer();e&&(this.container=e,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.off(n,e[n])})}bindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.on(n,e[n])})}get tooltipStyleProps(){const{canvas:t}=this.context,{center:e}=t.getBounds(),n=t.getContainer(),{top:i,left:a}=n.getBoundingClientRect(),{style:s,position:o,enterable:l,container:u={x:-a,y:-i},title:c,offset:d}=this.options,[h,f]=e,[v,g]=t.getSize();return{x:h,y:f,container:u,title:c,bounding:{x:0,y:0,width:v,height:g},position:o,enterable:l,offset:d,style:s}}destroy(){var t;this.unbindEvents(),this.tooltipElement&&((t=this.container)===null||t===void 0||t.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}Lc.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var ux=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};let is;function cx(r,t){return is||(is=document.createElement("canvas")),is.width=r,is.height=t,is.getContext("2d").clearRect(0,0,r,t),is}function FB(r,t,e,n){return ux(this,void 0,void 0,function*(){const i=cx(r,t),a=i.getContext("2d"),{rotate:s,opacity:o,textFill:l,textFontSize:u,textFontFamily:c,textFontVariant:d,textFontWeight:h,textAlign:f,textBaseline:v}=n;return a.textAlign=f,a.textBaseline=v,a.translate(r/2,t/2),a.font=`${u}px ${c} ${d} ${h}`,s&&a.rotate(s),o&&(a.globalAlpha=o),l&&(a.fillStyle=l,a.fillText(`${e}`,0,0)),i.toDataURL()})}function zB(r,t,e,n){return ux(this,void 0,void 0,function*(){const i=cx(r,t),a=i.getContext("2d"),{rotate:s,opacity:o}=n;s&&a.rotate(s),o&&(a.globalAlpha=o);const l=new Image;return l.crossOrigin="anonymous",l.src=e,new Promise(u=>{l.onload=function(){const c=r>l.width?(r-l.width)/2:0,d=t>l.height?(t-l.height)/2:0;a.drawImage(l,0,0,l.width,l.height,c,d,r-c*2,t-d*2),u(i.toDataURL())}})})}var GB=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})},jB=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Dc extends Pt{constructor(t,e){super(t,Object.assign({},Dc.defaultOptions,e)),this.$element=Za("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return GB(this,void 0,void 0,function*(){e.update.call(this,t);const n=this.options,{width:i,height:a,text:s,imageURL:o}=n,l=jB(n,["width","height","text","imageURL"]);Object.keys(l).forEach(c=>{c.startsWith("background")&&(this.$element.style[c]=t[c])});const u=o?yield zB(i,a,o,l):yield FB(i,a,s,l);this.$element.style.backgroundImage=`url(${u})`})}destroy(){super.destroy(),this.$element.remove()}}Dc.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};function WB(r,t,e,n=!1){const i=Xd[r][t];!n&&i?i!==e&&en.warn(`The extension ${t} of ${r} has been registered before.`):Object.assign(Xd[r],{[t]:e})}var dx=function(){function r(t){q(this,r),this.dragndropPluginOptions=t}return J(r,[{key:"apply",value:function(e){var n=this,i=e.renderingService,a=e.renderingContext,s=a.root.ownerDocument,o=s.defaultView,l=function(c){var d=c.target,h=d===s,f=h&&n.dragndropPluginOptions.isDocumentDraggable?s:d.closest&&d.closest("[draggable=true]");if(f){var v=!1,g=c.timeStamp,p=[c.clientX,c.clientY],m=null,y=[c.clientX,c.clientY],b=function(){var w=W0(Ws().mark(function x(E){var k,O,P,M,L,D;return Ws().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(v){F.next=8;break}if(k=E.timeStamp-g,O=(0,Or.y)([E.clientX,E.clientY],p),!(k<=n.dragndropPluginOptions.dragstartTimeThreshold||O<=n.dragndropPluginOptions.dragstartDistanceThreshold)){F.next=5;break}return F.abrupt("return");case 5:E.type="dragstart",f.dispatchEvent(E),v=!0;case 8:if(E.type="drag",E.dx=E.clientX-y[0],E.dy=E.clientY-y[1],f.dispatchEvent(E),y=[E.clientX,E.clientY],h){F.next=21;break}return P=n.dragndropPluginOptions.overlap==="pointer"?[E.canvasX,E.canvasY]:d.getBounds().center,F.next=17,s.elementsFromPoint(P[0],P[1]);case 17:M=F.sent,L=M[M.indexOf(d)+1],D=(L==null?void 0:L.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?s:null),m!==D&&(m&&(E.type="dragleave",E.target=m,m.dispatchEvent(E)),D&&(E.type="dragenter",E.target=D,D.dispatchEvent(E)),m=D,m&&(E.type="dragover",E.target=m,m.dispatchEvent(E)));case 21:case"end":return F.stop()}},x)}));return function(E){return w.apply(this,arguments)}}();o.addEventListener("pointermove",b);var _=function(x){if(v){x.detail={preventClick:!0};var E=x.clone();m&&(E.type="drop",E.target=m,m.dispatchEvent(E)),E.type="dragend",f.dispatchEvent(E),v=!1}o.removeEventListener("pointermove",b)};d.addEventListener("pointerup",_,{once:!0}),d.addEventListener("pointerupoutside",_,{once:!0})}};i.hooks.init.tap(r.tag,function(){o.addEventListener("pointerdown",l)}),i.hooks.destroy.tap(r.tag,function(){o.removeEventListener("pointerdown",l)})}}])}();dx.tag="Dragndrop";var ZB=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return q(this,t),e=Ce(this,t),e.name="dragndrop",e.options=n,e}return Oe(t,r),J(t,[{key:"init",value:function(){this.addRenderingPlugin(new dx(dt({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(n){Object.assign(this.plugins[0].dragndropPluginOptions,n)}}])}(qr),hx=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})},fx=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const vx=["main"],gx=["background","main","label","transient"];function VB(r){return r.main}class px{getConfig(){return this.config}getLayer(t="main"){return this.extends.layers[t]||VB(this.getLayers())}getLayers(){return this.extends.layers}getRenderer(t){return this.extends.renderers[t]}getCamera(t="main"){return this.getLayer(t).getCamera()}getRoot(t="main"){return this.getLayer(t).getRoot()}getContextService(t="main"){return this.getLayer(t).getContextService()}setCursor(t){this.config.cursor=t,this.getLayer().setCursor(t)}get document(){return this.getLayer().document}get context(){return this.getLayer().context}constructor(t){this.config={enableMultiLayer:!0},Object.assign(this.config,t);const e=this.config,{renderer:n,background:i,cursor:a,enableMultiLayer:s}=e,o=fx(e,["renderer","background","cursor","enableMultiLayer"]),l=s?gx:vx,u=mx(n,l),c=Object.fromEntries(l.map(d=>{const h=new Id(Object.assign(Object.assign({},o),{supportsMutipleCanvasesInOneContainer:s,renderer:u[d],background:s?d==="background"?i:void 0:i}));return[d,h]}));yx(c),this.extends={config:this.config,renderer:n,renderers:u,layers:c}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,t])=>t.ready))}resize(t,e){Object.assign(this.extends.config,{width:t,height:e}),Object.values(this.getLayers()).forEach(n=>{const i=n.getCamera(),a=i.getPosition(),s=i.getFocalPoint();n.resize(t,e),i.setPosition(a),i.setFocalPoint(s)})}getBounds(t){return Cs(Object.values(this.getLayers()).map(e=>t?e.getRoot().childNodes.find(i=>i.classList.includes(t)):e.getRoot()).filter(e=>(e==null?void 0:e.childNodes.length)>0).map(e=>e.getBounds()))}getContainer(){const t=this.extends.config.container;return typeof t=="string"?document.getElementById(t):t}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(t,e){var n;const i=((n=t.style)===null||n===void 0?void 0:n.$layer)||"main";return this.getLayer(i).appendChild(t,e)}setRenderer(t){if(t===this.extends.renderer)return;const e=mx(t,this.config.enableMultiLayer?gx:vx);this.extends.renderers=e,Object.entries(e).forEach(([n,i])=>this.getLayer(n).setRenderer(i)),yx(this.getLayers())}getCanvasByViewport(t){return Ot(this.getLayer().viewport2Canvas(Kn(t)))}getViewportByCanvas(t){return Ot(this.getLayer().canvas2Viewport(Kn(t)))}getViewportByClient(t){return Ot(this.getLayer().client2Viewport(Kn(t)))}getClientByViewport(t){return Ot(this.getLayer().viewport2Client(Kn(t)))}getClientByCanvas(t){return this.getClientByViewport(this.getViewportByCanvas(t))}getCanvasByClient(t){const e=this.getLayer(),n=e.client2Viewport(Kn(t));return Ot(e.viewport2Canvas(n))}toDataURL(){return hx(this,arguments,void 0,function*(t={}){const e=globalThis.devicePixelRatio||1,{mode:n="viewport"}=t,i=fx(t,["mode"]);let[a,s,o,l]=[0,0,0,0];if(n==="viewport")[o,l]=this.getSize();else if(n==="overall"){const m=this.getBounds(),y=ri(m);[a,s]=m.min,[o,l]=y}const u=(0,Ev.L)('<div id="virtual-image"></div>'),c=new Id({width:o,height:l,renderer:new eu,devicePixelRatio:e,container:u,background:this.extends.config.background});yield c.ready,c.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),c.appendChild(this.getRoot().cloneNode(!0));const d=this.getLayer("label").getRoot().cloneNode(!0),h=c.viewport2Canvas({x:0,y:0}),f=this.getCanvasByViewport([0,0]);d.translate([f[0]-h.x,f[1]-h.y]),d.scale(1/this.getCamera().getZoom()),c.appendChild(d),c.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const v=this.getCamera(),g=c.getCamera();if(n==="viewport")g.setZoom(v.getZoom()),g.setPosition(v.getPosition()),g.setFocalPoint(v.getFocalPoint());else if(n==="overall"){const[m,y,b]=g.getPosition(),[_,w,x]=g.getFocalPoint();g.setPosition([m+a,y+s,b]),g.setFocalPoint([_+a,w+s,x])}const p=c.getContextService();return new Promise(m=>{c.addEventListener(un.RERENDER,()=>hx(this,void 0,void 0,function*(){yield new Promise(b=>setTimeout(b,300));const y=yield p.toDataURL(i);m(y)}))})})}destroy(){Object.values(this.getLayers()).forEach(t=>{t.getCamera().cancelLandmarkAnimation(),t.destroy()})}}function mx(r,t){return Object.fromEntries(t.map(e=>{const n=(r==null?void 0:r(e))||new eu;return e==="main"?n.registerPlugin(new ZB({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):n.unregisterPlugin(n.getPlugin("dom-interaction")),[e,n]}))}function yx(r){Object.entries(r).forEach(([t,e])=>{const n=e.getContextService().getDomElement();n!=null&&n.style&&(n.style.gridArea="1 / 1 / 2 / 2",n.style.outline="none",n.tabIndex=1,t!=="main"&&(n.style.pointerEvents="none")),n!=null&&n.parentElement&&(n.parentElement.style.display="grid")})}const as=r=>r?parseInt(r):0;function HB(r){const t=getComputedStyle(r),e=r.clientWidth||as(t.width),n=r.clientHeight||as(t.height),i=as(t.paddingLeft)+as(t.paddingRight),a=as(t.paddingTop)+as(t.paddingBottom);return[e-i,n-a]}function bx(r){if(!r)return[0,0];let t=640,e=480;const[n,i]=HB(r);t=n||t,e=i||e;const a=1,s=1;return[Math.max((0,oe.Z)(t)?t:a,a),Math.max((0,oe.Z)(e)?e:s,s)]}class Ic{constructor(t){this.type=t}}class St extends Ic{constructor(t,e){super(t),this.data=e}}class jn extends Ic{constructor(t,e,n,i){super(t),this.animationType=e,this.animation=n,this.data=i}}class ss extends Ic{constructor(t,e,n){super(t),this.elementType=e,this.data=n}}class Bc extends Ic{constructor(t,e){super(t),this.data=e}}function Rt(r,t){r.emit(t.type,t)}function UB(r){if(!r)return null;if(r instanceof $g)return{type:"canvas",element:r};let t=r;for(;t;){if(Vs(t))return{type:"node",element:t};if(am(t))return{type:"edge",element:t};if(Mh(t))return{type:"combo",element:t};t=t.parentElement}return null}function xx(r){var t;return((t=r==null?void 0:r.style)===null||t===void 0?void 0:t.zIndex)||0}const os="cachedStyle",Fc=r=>`__${r}__`;function YB(r,t){const e=Array.isArray(t)?t:[t];(0,Wt.Z)(r,os)||(0,Ls.Z)(r,os,{}),e.forEach(n=>{(0,Ls.Z)((0,Wt.Z)(r,os),Fc(n),r.attributes[n])})}function Ex(r,t){return(0,Wt.Z)(r,[os,Fc(t)])}function XB(r,t){return Fc(t)in((0,Wt.Z)(r,os)||{})}function g5(r,t,e){set(r,[os,Fc(t)],e)}class KB{constructor(t){this.tasks=[],this.animations=new Set,this.context=t}getTasks(){const t=[...this.tasks];return this.tasks=[],t}add(t,e){this.tasks.push([t,e])}animate(t,e,n){var i,a,s;(i=e==null?void 0:e.before)===null||i===void 0||i.call(e);const o=this.getTasks().map(([u,c])=>{var d,h,f;const{element:v,elementType:g,stage:p}=u,m=fS(this.context.options,g,p,t);(d=c==null?void 0:c.before)===null||d===void 0||d.call(c);const y=m.length?gS(v,this.inferStyle(u,n),m):null;return y?((h=c==null?void 0:c.beforeAnimate)===null||h===void 0||h.call(c,y),y.finished.then(()=>{var b,_;(b=c==null?void 0:c.afterAnimate)===null||b===void 0||b.call(c,y),(_=c==null?void 0:c.after)===null||_===void 0||_.call(c),this.animations.delete(y)})):(f=c==null?void 0:c.after)===null||f===void 0||f.call(c),y}).filter(Boolean);o.forEach(u=>this.animations.add(u));const l=Kd(o);return l?((a=e==null?void 0:e.beforeAnimate)===null||a===void 0||a.call(e,l),l.finished.then(()=>{var u,c;(u=e==null?void 0:e.afterAnimate)===null||u===void 0||u.call(e,l),(c=e==null?void 0:e.after)===null||c===void 0||c.call(e),this.release()})):(s=e==null?void 0:e.after)===null||s===void 0||s.call(e),l}inferStyle(t,e){var n,i;const{element:a,elementType:s,stage:o,originalStyle:l,updatedStyle:u={}}=t;t.modifiedStyle||(t.modifiedStyle=Object.assign(Object.assign({},l),u));const{modifiedStyle:c}=t,d={},h={};if(o==="enter")Object.assign(d,{opacity:0});else if(o==="exit")Object.assign(h,{opacity:0});else if(o==="show")Object.assign(d,{opacity:0}),Object.assign(h,{opacity:(n=Ex(a,"opacity"))!==null&&n!==void 0?n:As("opacity")});else if(o==="hide")Object.assign(d,{opacity:(i=Ex(a,"opacity"))!==null&&i!==void 0?i:As("opacity")}),Object.assign(h,{opacity:0});else if(o==="collapse"){const{collapse:f}=e||{},{target:v,descendants:g,position:p}=f;if(s==="node"){if(g.includes(a.id)){const[m,y,b]=p;Object.assign(h,{x:m,y,z:b})}}else if(s==="combo"){if(a.id===v||g.includes(a.id)){const[m,y]=p;Object.assign(h,{x:m,y,childrenNode:l.childrenNode})}}else s==="edge"&&Object.assign(h,{sourceNode:c.sourceNode,targetNode:c.targetNode})}else if(o==="expand"){const{expand:f}=e||{},{target:v,descendants:g,position:p}=f;if(s==="node"){if(a.id===v||g.includes(a.id)){const[m,y,b]=p;Object.assign(d,{x:m,y,z:b})}}else if(s==="combo"){if(a.id===v||g.includes(a.id)){const[m,y,b]=p;Object.assign(d,{x:m,y,z:b,childrenNode:c.childrenNode})}}else s==="edge"&&Object.assign(d,{sourceNode:c.sourceNode,targetNode:c.targetNode})}return[Object.keys(d).length>0?Object.assign({},l,d):l,Object.keys(h).length>0?Object.assign({},c,h):c]}stop(){this.animations.forEach(t=>t.cancel())}clear(){this.tasks=[]}release(){var t,e;const{canvas:n}=this.context,i=(e=(t=n.document)===null||t===void 0?void 0:t.timeline)===null||e===void 0?void 0:e.animationsWithPromises;i&&(n.document.timeline.animationsWithPromises=i.filter(a=>a.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class $B{constructor(t){this.batchCount=0,this.context=t}emit(t){const{graph:e}=this.context;e.emit(t.type,t)}startBatch(t=!0){this.batchCount++,this.batchCount===1&&this.emit(new St(Q.BATCH_START,{initiate:t}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new St(Q.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class qB extends Qd{constructor(t){super(t),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=e=>{const{target:n}=e,i=UB(n);if(!i)return;const{graph:a,canvas:s}=this.context,{type:o,element:l}=i;if("destroyed"in l&&(hu(l)||l.destroyed))return;const{type:u,detail:c,button:d}=e,h=Object.assign(Object.assign({},e),{target:l,targetType:o,originalTarget:n});u===V.POINTER_MOVE&&(this.currentTarget!==l&&(this.currentTarget&&a.emit(`${this.currentTargetType}:${V.POINTER_LEAVE}`,Object.assign(Object.assign({},h),{type:V.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),l&&(Object.assign(h,{type:V.POINTER_ENTER}),a.emit(`${o}:${V.POINTER_ENTER}`,h))),this.currentTarget=l,this.currentTargetType=o),u===V.CLICK&&d===2||(a.emit(`${o}:${u}`,h),a.emit(u,h)),u===V.CLICK&&c===2&&(Object.assign(h,{type:V.DBLCLICK}),a.emit(`${o}:${V.DBLCLICK}`,h),a.emit(V.DBLCLICK,h)),u===V.POINTER_DOWN&&d===2&&(Object.assign(h,{type:V.CONTEXT_MENU,preventDefault:()=>{var f;(f=s.getContainer())===null||f===void 0||f.addEventListener(V.CONTEXT_MENU,v=>v.preventDefault(),{once:!0})}}),a.emit(`${o}:${V.CONTEXT_MENU}`,h),a.emit(V.CONTEXT_MENU,h))},this.forwardContainerEvents=e=>{this.context.graph.emit(e.type,e)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(t){this.setExtensions(t)}forwardEvents(){const t=this.context.canvas.getContainer();t&&[Oa.KEY_DOWN,Oa.KEY_UP].forEach(n=>{t.addEventListener(n,this.forwardContainerEvents)});const e=this.context.canvas.document;e&&[V.CLICK,V.DBLCLICK,V.POINTER_OVER,V.POINTER_LEAVE,V.POINTER_ENTER,V.POINTER_MOVE,V.POINTER_OUT,V.POINTER_DOWN,V.POINTER_UP,V.CONTEXT_MENU,V.DRAG_START,V.DRAG,V.DRAG_END,V.DRAG_ENTER,V.DRAG_OVER,V.DRAG_LEAVE,V.DROP,V.WHEEL].forEach(n=>{e.addEventListener(n,this.forwardCanvasEvents)})}destroy(){const t=this.context.canvas.getContainer();t&&[Oa.KEY_DOWN,Oa.KEY_UP].forEach(e=>{t.removeEventListener(e,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}var JB=Y(58029),bo=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function ki(r,t){const{data:e,style:n}=r,i=bo(r,["data","style"]),{data:a,style:s}=t,o=bo(t,["data","style"]),l=Object.assign(Object.assign({},i),o);return(e||a)&&Object.assign(l,{data:Object.assign(Object.assign({},e),a)}),(n||s)&&Object.assign(l,{style:Object.assign(Object.assign({},n),s)}),l}function kv(r){const{data:t,style:e}=r,i=bo(r,["data","style"]);return t&&(i.data=Object.assign({},t)),e&&(i.style=Object.assign({},e)),i}function p5(r){return!get(r,["nodes","length"])&&!get(r,["edges","length"])&&!get(r,["combos","length"])}function ls(r={},t={}){const{states:e=[],data:n={},style:i={},children:a=[]}=r,s=bo(r,["states","data","style","children"]),{states:o=[],data:l={},style:u={},children:c=[]}=t,d=bo(t,["states","data","style","children"]),h=(v,g)=>v.length!==g.length?!1:v.every((p,m)=>p===g[m]),f=(v,g)=>{const p=Object.keys(v),m=Object.keys(g);return p.length!==m.length?!1:p.every(y=>v[y]===g[y])};return!(!f(s,d)||!h(a,c)||!h(e,o)||!f(n,l)||!f(i,u))}var QB=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function _v(r){const{id:t=j(r),style:e,data:n}=r,i=QB(r,["id","style","data"]),a=Object.assign(Object.assign({},r),{style:Object.assign({},e),data:Object.assign({},n)});return ES(r)?Object.assign({id:t,data:a},i):{id:t,data:a}}function Tt(r){return r.data}function e6(r){if(r.hasTreeStructure(Nn))return;r.attachTreeStructure(Nn);const t=r.getAllEdges();for(const e of t){const{source:n,target:i}=e;r.setParent(i,n,Nn)}}class t6{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new Et.k}pushChange(t){if(this.isTraceless)return;const{type:e}=t;if(e===tt.NodeUpdated||e===tt.EdgeUpdated||e===tt.ComboUpdated){const{value:n,original:i}=t;this.changes.push({value:kv(n),original:kv(i),type:e})}else this.changes.push({value:kv(t.value),type:e})}getChanges(){return this.changes}clearChanges(){this.changes=[]}batch(t){this.batchCount++,this.model.batch(t),this.batchCount--}isBatching(){return this.batchCount>0}silence(t){this.isTraceless=!0,t(),this.isTraceless=!1}isCombo(t){return this.comboIds.has(t)||this.latestRemovedComboIds.has(t)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Tt(n);return this.isCombo(j(i))||(t===void 0||t.includes(j(i)))&&e.push(i),e},[])}getEdgeDatum(t){return Tt(this.model.getEdge(t))}getEdgeData(t){return this.model.getAllEdges().reduce((e,n)=>{const i=Tt(n);return(t===void 0||t.includes(j(i)))&&e.push(i),e},[])}getComboData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Tt(n);return this.isCombo(j(i))&&(t===void 0||t.includes(j(i)))&&e.push(i),e},[])}getRootsData(t=Nn){return this.model.getRoots(t).map(Tt)}getAncestorsData(t,e){const{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getAncestors(t,e).map(Tt)}getDescendantsData(t){const e=this.getElementDataById(t),n=[];return ji(e,i=>{i!==e&&n.push(i)},i=>this.getChildrenData(j(i)),"TB"),n}getParentData(t,e){const{model:n}=this;if(!e){en.warn("The hierarchy structure key is not specified");return}if(!n.hasNode(t)||!n.hasTreeStructure(e))return;const i=n.getParent(t,e);return i?Tt(i):void 0}getChildrenData(t){const e=this.getElementType(t)==="node"?Nn:Ve,{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getChildren(t,e).map(Tt)}getElementsDataByType(t){return t==="node"?this.getNodeData():t==="edge"?this.getEdgeData():t==="combo"?this.getComboData():[]}getElementDataById(t){return this.getElementType(t)==="edge"?this.getEdgeDatum(t):this.getNodeLikeDatum(t)}getNodeLikeDatum(t){const e=this.model.getNode(t);return Tt(e)}getNodeLikeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Tt(n);return t?t.includes(j(i))&&e.push(i):e.push(i),e},[])}getElementDataByState(t,e){return this.getElementsDataByType(t).filter(i=>{var a;return(a=i.states)===null||a===void 0?void 0:a.includes(e)})}getElementState(t){var e;return((e=this.getElementDataById(t))===null||e===void 0?void 0:e.states)||[]}hasNode(t){return this.model.hasNode(t)&&!this.isCombo(t)}hasEdge(t){return this.model.hasEdge(t)}hasCombo(t){return this.model.hasNode(t)&&this.isCombo(t)}getRelatedEdgesData(t,e="both"){return this.model.getRelatedEdges(t,e).map(Tt)}getNeighborNodesData(t){return this.model.getNeighbors(t).map(Tt)}setData(t){const{nodes:e=[],edges:n=[],combos:i=[]}=t,{nodes:a,edges:s,combos:o}=this.getData(),l=si(a,e,d=>j(d),ls),u=si(s,n,d=>j(d),ls),c=si(o,i,d=>j(d),ls);this.batch(()=>{const d={nodes:l.enter,edges:u.enter,combos:c.enter};this.addData(d),this.computeZIndex(d,"add",!0);const h={nodes:l.update,edges:u.update,combos:c.update};this.updateData(h),this.computeZIndex(h,"update",!0);const f={nodes:l.exit.map(j),edges:u.exit.map(j),combos:c.exit.map(j)};this.removeData(f)})}addData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.addComboData(i),this.addNodeData(e),this.addEdgeData(n)}),this.computeZIndex(t,"add")}addNodeData(t=[]){t.length&&(this.model.addNodes(t.map(e=>(this.pushChange({value:e,type:tt.NodeAdded}),_v(e)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({nodes:t},"add"))}addEdgeData(t=[]){t.length&&(this.model.addEdges(t.map(e=>(this.pushChange({value:e,type:tt.EdgeAdded}),_v(e)))),this.computeZIndex({edges:t},"add"))}addComboData(t=[]){if(!t.length)return;const{model:e}=this;e.hasTreeStructure(Ve)||e.attachTreeStructure(Ve),e.addNodes(t.map(n=>(this.comboIds.add(j(n)),this.pushChange({value:n,type:tt.ComboAdded}),_v(n)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({combos:t},"add")}addChildrenData(t,e){const n=this.getNodeLikeDatum(t),i=e.map(j);this.addNodeData(e),this.updateNodeData([{id:t,children:[...n.children||[],...i]}]),this.addEdgeData(i.map(a=>({source:t,target:a})))}computeZIndex(t,e,n=!1){!n&&this.isBatching()||this.batch(()=>{const{nodes:i=[],edges:a=[],combos:s=[]}=t;s.forEach(o=>{var l,u,c;const d=j(o);if(e==="add"&&(0,oe.Z)((l=o.style)===null||l===void 0?void 0:l.zIndex)||e==="update"&&!("combo"in o))return;const h=this.getParentData(d,Ve),f=h?((c=(u=h.style)===null||u===void 0?void 0:u.zIndex)!==null&&c!==void 0?c:0)+1:0;this.preventUpdateNodeLikeHierarchy(()=>{this.updateComboData([{id:d,style:{zIndex:f}}])})}),i.forEach(o=>{var l,u,c;const d=j(o);if(e==="add"&&(0,oe.Z)((l=o.style)===null||l===void 0?void 0:l.zIndex)||e==="update"&&!("combo"in o)&&!("children"in o))return;let h=0;const f=this.getParentData(d,Ve);if(f)h=(((u=f.style)===null||u===void 0?void 0:u.zIndex)||0)+1;else{const v=this.getParentData(d,Nn);v&&(h=((c=v==null?void 0:v.style)===null||c===void 0?void 0:c.zIndex)||0)}this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:d,style:{zIndex:h}}])})}),a.forEach(o=>{var l,u,c,d,h;if((0,oe.Z)((l=o.style)===null||l===void 0?void 0:l.zIndex))return;let{id:f,source:v,target:g}=o;if(!f)f=j(o);else{const y=this.getEdgeDatum(f);v=y.source,g=y.target}if(!v||!g)return;const p=((c=(u=this.getNodeLikeDatum(v))===null||u===void 0?void 0:u.style)===null||c===void 0?void 0:c.zIndex)||0,m=((h=(d=this.getNodeLikeDatum(g))===null||d===void 0?void 0:d.style)===null||h===void 0?void 0:h.zIndex)||0;this.updateEdgeData([{id:j(o),style:{zIndex:Math.max(p,m)-1}}])})})}getFrontZIndex(t){var e;const n=this.getElementType(t),i=this.getElementDataById(t),a=this.getData();if(Object.assign(a,{[`${n}s`]:a[`${n}s`].filter(s=>j(s)!==t)}),n==="combo"&&!hn(i)){const s=new Set(this.getAncestorsData(t,Ve).map(j));a.nodes=a.nodes.filter(o=>!s.has(j(o))),a.combos=a.combos.filter(o=>!s.has(j(o))),a.edges=a.edges.filter(({source:o,target:l})=>!s.has(o)&&!s.has(l))}return Math.max(((e=i.style)===null||e===void 0?void 0:e.zIndex)||0,0,...Object.values(a).flat().map(s=>{var o;return(((o=s==null?void 0:s.style)===null||o===void 0?void 0:o.zIndex)||0)+1}))}updateNodeLikeHierarchy(t){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:e}=this;t.forEach(n=>{const i=j(n);Al(n)&&(e.hasTreeStructure(Ve)||e.attachTreeStructure(Ve),this.setParent(i,Al(n),Ve));const s=n.children||[];if(s.length){e.hasTreeStructure(Nn)||e.attachTreeStructure(Nn);const o=s.filter(l=>e.hasNode(l));o.forEach(l=>this.setParent(l,i,Nn)),o.length!==s.length&&this.updateNodeData([{id:i,children:o}])}})}preventUpdateNodeLikeHierarchy(t){this.enableUpdateNodeLikeHierarchy=!1,t(),this.enableUpdateNodeLikeHierarchy=!0}updateData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.updateNodeData(e),this.updateComboData(i),this.updateEdgeData(n)}),this.computeZIndex(t,"update")}updateNodeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{const n=[];t.forEach(i=>{const a=j(i),s=Tt(e.getNode(a));if(ls(s,i))return;const o=ki(s,i);this.pushChange({value:o,original:s,type:tt.NodeUpdated}),e.mergeNodeData(a,o),n.push(o)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({nodes:t},"update")}refreshData(){const{nodes:t,edges:e,combos:n}=this.getData();t.forEach(i=>{this.pushChange({value:i,original:i,type:tt.NodeUpdated})}),e.forEach(i=>{this.pushChange({value:i,original:i,type:tt.EdgeUpdated})}),n.forEach(i=>{this.pushChange({value:i,original:i,type:tt.ComboUpdated})})}syncNodeDatum(t){const{model:e}=this,n=j(t),i=Tt(e.getNode(n)),a=ki(i,t);e.mergeNodeData(n,a)}updateEdgeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{t.forEach(n=>{const i=j(n),a=Tt(e.getEdge(i));if(ls(a,n))return;n.source&&a.source!==n.source&&e.updateEdgeSource(i,n.source),n.target&&a.target!==n.target&&e.updateEdgeTarget(i,n.target);const s=ki(a,n);this.pushChange({value:s,original:a,type:tt.EdgeUpdated}),e.mergeEdgeData(i,s)})}),this.computeZIndex({edges:t},"update")}updateComboData(t=[]){if(!t.length)return;const{model:e}=this;e.batch(()=>{const n=[];t.forEach(i=>{const a=j(i),s=Tt(e.getNode(a));if(ls(s,i))return;const o=ki(s,i);this.pushChange({value:o,original:s,type:tt.ComboUpdated}),e.mergeNodeData(a,o),n.push(o)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({combos:t},"update")}setParent(t,e,n,i=!0){if(t===e)return;const a=this.getNodeLikeDatum(t),s=Al(a);if(s!==e&&n===Ve){const o={id:t,combo:e};this.isCombo(t)?this.syncComboDatum(o):this.syncNodeDatum(o)}this.model.setParent(t,e,n),i&&n===Ve&&(0,JB.Z)([s,e]).forEach(o=>{o!==void 0&&this.refreshComboData(o)})}refreshComboData(t){const e=this.getComboData([t])[0],n=this.getAncestorsData(t,Ve);e&&this.pushChange({value:e,original:e,type:tt.ComboUpdated}),n.forEach(i=>{this.pushChange({value:i,original:i,type:tt.ComboUpdated})})}syncComboDatum(t){const{model:e}=this,n=j(t);if(!e.hasNode(n))return;const i=Tt(e.getNode(n)),a=ki(i,t);e.mergeNodeData(n,a)}getElementPosition(t){const e=this.getElementDataById(t);return Ct(e)}translateNodeLikeBy(t,e){this.isCombo(t)?this.translateComboBy(t,e):this.translateNodeBy(t,e)}translateNodeLikeTo(t,e){this.isCombo(t)?this.translateComboTo(t,e):this.translateNodeTo(t,e)}translateNodeBy(t,e){const n=this.getElementPosition(t),i=Ee(n,[...e,0].slice(0,3));this.translateNodeTo(t,i)}translateNodeTo(t,e){const[n=0,i=0,a=0]=e;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:t,style:{x:n,y:i,z:a}}])})}translateComboBy(t,e){const[n=0,i=0,a=0]=e;if([n,i,a].some(isNaN)||[n,i,a].every(l=>l===0))return;const s=this.getComboData([t])[0];if(!s)return;const o=new Set;ji(s,l=>{const u=j(l);if(o.has(u))return;o.add(u);const[c,d,h]=Ct(l),f=ki(l,{style:{x:c+n,y:d+i,z:h+a}});this.pushChange({value:f,original:l,type:this.isCombo(u)?tt.ComboUpdated:tt.NodeUpdated}),this.model.mergeNodeData(u,f)},l=>this.getChildrenData(j(l)),"BT")}translateComboTo(t,e){var n;if(e.some(isNaN))return;const[i=0,a=0,s=0]=e,o=(n=this.getComboData([t]))===null||n===void 0?void 0:n[0];if(!o)return;const[l,u,c]=Ct(o),d=i-l,h=a-u,f=s-c;ji(o,v=>{const g=j(v),[p,m,y]=Ct(v),b=ki(v,{style:{x:p+d,y:m+h,z:y+f}});this.pushChange({value:b,original:v,type:this.isCombo(g)?tt.ComboUpdated:tt.NodeUpdated}),this.model.mergeNodeData(g,b)},v=>this.getChildrenData(j(v)),"BT")}removeData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.removeEdgeData(n),this.removeNodeData(e),this.removeComboData(i),this.latestRemovedComboIds=new Set(i)})}removeNodeData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.removeEdgeData(this.getRelatedEdgesData(e).map(j)),this.pushChange({value:this.getNodeData([e])[0],type:tt.NodeRemoved}),this.removeNodeLikeHierarchy(e)}),this.model.removeNodes(t)})}removeEdgeData(t=[]){t.length&&(t.forEach(e=>this.pushChange({value:this.getEdgeData([e])[0],type:tt.EdgeRemoved})),this.model.removeEdges(t))}removeComboData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.pushChange({value:this.getComboData([e])[0],type:tt.ComboRemoved}),this.removeNodeLikeHierarchy(e),this.comboIds.delete(e)}),this.model.removeNodes(t)})}removeNodeLikeHierarchy(t){if(this.model.hasTreeStructure(Ve)){const e=Al(this.getNodeLikeDatum(t));this.setParent(t,void 0,Ve,!1),this.model.getChildren(t,Ve).forEach(n=>{const i=Tt(n),a=j(i);this.setParent(j(i),e,Ve,!1);const s=ki(i,{id:j(i),combo:e});this.pushChange({value:s,original:i,type:this.isCombo(a)?tt.ComboUpdated:tt.NodeUpdated}),this.model.mergeNodeData(j(i),s)}),(0,ce.Z)(e)||this.refreshComboData(e)}}getElementType(t){if(this.model.hasNode(t))return this.isCombo(t)?"combo":"node";if(this.model.hasEdge(t))return"edge";throw new Error(Lr(`Unknown element type of id: ${t}`))}destroy(){const{model:t}=this,e=t.getAllNodes(),n=t.getAllEdges();t.removeEdges(n.map(i=>i.id)),t.removeNodes(e.map(i=>i.id)),this.context={}}}var zc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class n6{constructor(t){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=t}init(){if(!this.container){const{canvas:t}=this.context;this.container=t.appendChild(new Sa({className:"elements"}))}}emit(t,e){e.silence||Rt(this.context.graph,t)}forEachElementData(t){Gi.forEach(e=>{const n=this.context.model.getElementsDataByType(e);t(e,n)})}getElementType(t,e){var n;const{options:i,graph:a}=this.context,s=((n=i[t])===null||n===void 0?void 0:n.type)||e.type;return s?typeof s=="string"?s:s.call(a,e):t==="edge"?"line":"circle"}getTheme(t){return wp(this.context.options)[t]||{}}getThemeStyle(t){return this.getTheme(t).style||{}}getThemeStateStyle(t,e){const{state:n={}}=this.getTheme(t);return Object.assign({},...e.map(i=>n[i]||{}))}computePaletteStyle(){const{options:t}=this.context;this.paletteStyle={},this.forEachElementData((e,n)=>{var i,a;const s=Object.assign({},$p((i=this.getTheme(e))===null||i===void 0?void 0:i.palette),$p((a=t[e])===null||a===void 0?void 0:a.palette));s!=null&&s.field&&Object.assign(this.paletteStyle,tT(n,s))})}getPaletteStyle(t,e){const n=this.paletteStyle[e];return n?t==="edge"?{stroke:n}:{fill:n}:{}}computeElementDefaultStyle(t,e){var n;const{options:i}=this.context,a=((n=i[t])===null||n===void 0?void 0:n.style)||{};"transform"in a&&Array.isArray(a.transform)&&(a.transform=[...a.transform]),this.defaultStyle[j(e.datum)]=Xp(a,e)}computeElementsDefaultStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];(t===void 0||t.includes(j(o)))&&this.computeElementDefaultStyle(n,{datum:o,graph:e})}})}getDefaultStyle(t){return this.defaultStyle[t]||{}}getElementState(t){try{const{model:e}=this.context;return e.getElementState(t)}catch(e){return[]}}getElementStateStyle(t,e,n){var i,a;const{options:s}=this.context,o=((a=(i=s[t])===null||i===void 0?void 0:i.state)===null||a===void 0?void 0:a[e])||{};return Xp(o,n)}computeElementStatesStyle(t,e,n){this.stateStyle[j(n.datum)]=Object.assign({},...e.map(i=>this.getElementStateStyle(t,i,n)))}computeElementsStatesStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];if(t===void 0||t.includes(j(o))){const l=this.getElementState(j(o));this.computeElementStatesStyle(n,l,{datum:o,graph:e})}}})}getStateStyle(t){return this.stateStyle[t]||{}}computeStyle(t,e){t&&["translate","zIndex"].includes(t)||(this.computePaletteStyle(),this.computeElementsDefaultStyle(e),this.computeElementsStatesStyle(e))}getElement(t){return this.elementMap[t]}getNodes(){return this.context.model.getNodeData().map(({id:t})=>this.elementMap[t])}getEdges(){return this.context.model.getEdgeData().map(t=>this.elementMap[j(t)])}getCombos(){return this.context.model.getComboData().map(({id:t})=>this.elementMap[t])}getElementComputedStyle(t,e){const n=j(e),i=this.getThemeStyle(t),a=this.getPaletteStyle(t,n),s=e.style||{},o=this.getDefaultStyle(n),l=this.getThemeStateStyle(t,this.getElementState(n)),u=this.getStateStyle(n),c=Object.assign({},i,a,s,o,l,u);if(t==="combo"){const d=this.context.model.getChildrenData(n),f=!!c.collapsed?[]:d.map(j).filter(v=>this.getElement(v));Object.assign(c,{childrenNode:f,childrenData:d})}return c}draw(t={animation:!0}){this.init();const e=this.computeChangesAndDrawData(t);if(!e)return null;const{type:n="draw",stage:i=n,animation:a,silence:s}=t,{dataChanges:o,drawData:l}=e;this.markDestroyElement(l),this.computeStyle(i);const{add:u,update:c,remove:d}=l;return this.destroyElements(d,t),this.createElements(u,t),this.updateElements(c,t),this.context.animation.animate(a,s?{}:{before:()=>this.emit(new St(Q.BEFORE_DRAW,{dataChanges:o,animation:a,stage:i,render:n==="render"}),t),beforeAnimate:h=>this.emit(new jn(Q.BEFORE_ANIMATE,Qt.DRAW,h,l),t),afterAnimate:h=>this.emit(new jn(Q.AFTER_ANIMATE,Qt.DRAW,h,l),t),after:()=>this.emit(new St(Q.AFTER_DRAW,{dataChanges:o,animation:a,stage:i,render:n==="render",firstRender:this.context.graph.rendered===!1}),t)})}computeChangesAndDrawData(t){const{model:e}=this.context,n=e.getChanges(),i=lf(n);if(i.length===0)return null;const{NodeAdded:a=[],NodeUpdated:s=[],NodeRemoved:o=[],EdgeAdded:l=[],EdgeUpdated:u=[],EdgeRemoved:c=[],ComboAdded:d=[],ComboUpdated:h=[],ComboRemoved:f=[]}=(0,Sl.Z)(i,m=>m.type),v=m=>new Map(m.map(y=>{const b=y.value;return[j(b),b]})),g={add:{nodes:v(a),edges:v(l),combos:v(d)},update:{nodes:v(s),edges:v(u),combos:v(h)},remove:{nodes:v(o),edges:v(c),combos:v(f)}},p=this.transformData(g,t);return e.clearChanges(),{dataChanges:n,drawData:p}}transformData(t,e){const n=this.context.transform.getTransformInstance();return Object.values(n).reduce((i,a)=>a.beforeDraw(i,e),t)}createElement(t,e,n){var i;const a=j(e);if(this.getElement(a))return;const o=this.getElementType(t,e),l=this.getElementComputedStyle(t,e),u=Rr(t,o);if(!u)return en.warn(`The element ${o} of ${t} is not registered.`);this.emit(new ss(Q.BEFORE_ELEMENT_CREATE,t,e),n);const c=this.container.appendChild(new u({id:a,context:this.context,style:Object.assign({},l)}));this.shapeTypeMap[a]=o,this.elementMap[a]=c;const{stage:d="enter"}=n;(i=this.context.animation)===null||i===void 0||i.add({element:c,elementType:t,stage:d,originalStyle:Object.assign({},c.attributes),updatedStyle:l},{after:()=>{var h;this.emit(new ss(Q.AFTER_ELEMENT_CREATE,t,e),n),(h=c.onCreate)===null||h===void 0||h.call(c)}})}createElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.createElement(o,u,e))})}getUpdateStageStyle(t,e,n){const{stage:i="update"}=n;if(i==="translate")if(t==="node"||t==="combo"){const{style:{x:a=0,y:s=0,z:o=0}={}}=e;return{x:a,y:s,z:o}}else return{};return this.getElementComputedStyle(t,e)}updateElement(t,e,n){var i;const a=j(e),{stage:s="update"}=n,o=this.getElement(a);if(!o)return()=>null;this.emit(new ss(Q.BEFORE_ELEMENT_UPDATE,t,e),n);const l=this.getElementType(t,e),u=this.getUpdateStageStyle(t,e,n);this.shapeTypeMap[a]!==l&&(o.destroy(),delete this.shapeTypeMap[a],delete this.elementMap[a],this.createElement(t,e,{animation:!1,silence:!0}));const c=s!=="visibility"?s:u.visibility==="hidden"?"hide":"show";c==="hide"&&delete u.visibility,(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:t,stage:c,originalStyle:Object.assign({},o.attributes),updatedStyle:u},{before:()=>{const d=this.elementMap[a];s!=="collapse"&&Ih(d,u),s==="visibility"&&(XB(d,"opacity")||YB(d,"opacity"),this.visibilityCache.set(d,c==="show"?"visible":"hidden"),c==="show"&&Fi(d,"visible"))},after:()=>{var d;const h=this.elementMap[a];s==="collapse"&&Ih(h,u),c==="hide"&&Fi(h,this.visibilityCache.get(h)),this.emit(new ss(Q.AFTER_ELEMENT_UPDATE,t,e),n),(d=h.onUpdate)===null||d===void 0||d.call(h)}})}updateElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.updateElement(o,u,e))})}markDestroyElement(t){Object.values(t.remove).forEach(e=>{e.forEach(n=>{const i=j(n),a=this.getElement(i);a&&GA(a)})})}destroyElement(t,e,n){var i;const{stage:a="exit"}=n,s=j(e),o=this.elementMap[s];if(!o)return()=>null;this.emit(new ss(Q.BEFORE_ELEMENT_DESTROY,t,e),n),(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:t,stage:a,originalStyle:Object.assign({},o.attributes),updatedStyle:{}},{after:()=>{var l;this.clearElement(s),o.destroy(),(l=o.onDestroy)===null||l===void 0||l.call(o),this.emit(new ss(Q.AFTER_ELEMENT_DESTROY,t,e),n)}})}destroyElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["combo",a],["edge",i],["node",n]].forEach(([o,l])=>{l.forEach(u=>this.destroyElement(o,u,e))})}clearElement(t){delete this.paletteStyle[t],delete this.defaultStyle[t],delete this.stateStyle[t],delete this.elementMap[t],delete this.shapeTypeMap[t]}collapseNode(t,e){return zc(this,void 0,void 0,function*(){var n;const{model:i,layout:a}=this.context,s=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!s)return;this.markDestroyElement(s.drawData);const o=yield a.simulate();i.updateData(o);const l=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!l)return;const{drawData:u}=l,{add:c,remove:d,update:h}=u;this.markDestroyElement(u);const f={animation:e,stage:"collapse",data:u};this.destroyElements(d,f),this.createElements(c,f),this.updateElements(h,f),yield(n=this.context.animation.animate(e,{beforeAnimate:v=>this.emit(new jn(Q.BEFORE_ANIMATE,Qt.COLLAPSE,v,u),f),afterAnimate:v=>this.emit(new jn(Q.AFTER_ANIMATE,Qt.COLLAPSE,v,u),f)},{collapse:{target:t,descendants:Array.from(d.nodes).map(([,v])=>j(v)),position:Ct(h.nodes.get(t))}}))===null||n===void 0?void 0:n.finished})}expandNode(t,e){return zc(this,void 0,void 0,function*(){var n;const{model:i,layout:a}=this.context;if(!i.getAncestorsData(t,Ve).every(v=>hn(v)))return;const s=Ct(i.getNodeData([t])[0]),o=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!o)return;const{drawData:{add:l}}=o;this.createElements(l,{animation:!1,stage:"expand",target:t}),this.context.animation.clear();const u=yield a.simulate();i.updateData(u),this.computeStyle("expand");const c=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!c)return;const{drawData:d}=c,{update:h}=d,f={animation:e,stage:"expand",data:d};l.edges.forEach(v=>h.edges.set(j(v),v)),l.nodes.forEach(v=>h.nodes.set(j(v),v)),this.updateElements(h,f),yield(n=this.context.animation.animate(e,{beforeAnimate:v=>this.emit(new jn(Q.BEFORE_ANIMATE,Qt.EXPAND,v,d),f),afterAnimate:v=>this.emit(new jn(Q.AFTER_ANIMATE,Qt.EXPAND,v,d),f)},{expand:{target:t,descendants:Array.from(l.nodes).map(([,v])=>j(v)),position:s}}))===null||n===void 0?void 0:n.finished})}collapseCombo(t,e){return zc(this,void 0,void 0,function*(){var n;const{model:i,element:a}=this.context;if(i.getAncestorsData(t,Ve).some(g=>hn(g)))return;const s=a.getElement(t),o=s.getComboPosition(Object.assign(Object.assign({},s.attributes),{collapsed:!0})),l=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!l)return;const{dataChanges:u,drawData:c}=l;this.markDestroyElement(c);const{update:d,remove:h}=c,f={animation:e,stage:"collapse",data:c};this.destroyElements(h,f),this.updateElements(d,f);const v=g=>Array.from(g).map(([,p])=>j(p));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new St(Q.BEFORE_DRAW,{dataChanges:u,animation:e}),f),beforeAnimate:g=>this.emit(new jn(Q.BEFORE_ANIMATE,Qt.COLLAPSE,g,c),f),afterAnimate:g=>this.emit(new jn(Q.AFTER_ANIMATE,Qt.COLLAPSE,g,c),f),after:()=>this.emit(new St(Q.AFTER_DRAW,{dataChanges:u,animation:e}),f)},{collapse:{target:t,descendants:[...v(h.nodes),...v(h.combos)],position:o}}))===null||n===void 0?void 0:n.finished})}expandCombo(t,e){return zc(this,void 0,void 0,function*(){var n;const{model:i}=this.context,a=Ct(i.getComboData([t])[0]);this.computeStyle("expand");const s=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!s)return;const{dataChanges:o,drawData:l}=s,{add:u,update:c}=l,d={animation:e,stage:"expand",data:l,target:t};this.createElements(u,d),this.updateElements(c,d);const h=f=>Array.from(f).map(([,v])=>j(v));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new St(Q.BEFORE_DRAW,{dataChanges:o,animation:e}),d),beforeAnimate:f=>this.emit(new jn(Q.BEFORE_ANIMATE,Qt.EXPAND,f,l),d),afterAnimate:f=>this.emit(new jn(Q.AFTER_ANIMATE,Qt.EXPAND,f,l),d),after:()=>this.emit(new St(Q.AFTER_DRAW,{dataChanges:o,animation:e}),d)},{expand:{target:t,descendants:[...h(u.nodes),...h(u.combos)],position:a}}))===null||n===void 0?void 0:n.finished})}destroy(){this.container.destroy(),this.elementMap={},this.shapeTypeMap={},this.defaultStyle={},this.stateStyle={},this.paletteStyle={},this.context={}}}var wx=Y(54375);class r6 extends of.Z{constructor(t,e,n){super(),this.graph=t,this.layout=e,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=wx.Ud(new Worker(new URL(Y.p+Y.u(47509),Y.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var t;return we(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const e=this.layout.options,{onTick:n}=e,i=mm(e,["onTick"]),a={};Object.keys(i).forEach(u=>{(0,de.Z)(i[u])||(a[u]=i[u])});const s={layout:{id:this.layout.id,options:a,iterations:(t=this.options)===null||t===void 0?void 0:t.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},o=new Float32Array([0]),[l]=yield this.proxy.calculateLayout(s,[o]);return l})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[wx.Yy]()}isRunning(){return this.running}}var xo=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})},i6=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class a6{get presetOptions(){return{animation:!!kp(this.context.options,!0)}}get options(){const{options:t}=this.context;return t.layout}constructor(t){this.instances=[],this.context=t}getLayoutInstance(){return this.instances}layout(){return xo(this,void 0,void 0,function*(){if(!this.options)return;const t=Array.isArray(this.options)?this.options:[this.options],{graph:e}=this.context;Rt(e,new St(Q.BEFORE_LAYOUT));for(const n of t){const i=t.indexOf(n),a=this.getLayoutData(n),s=Object.assign(Object.assign({},this.presetOptions),n);Rt(e,new St(Q.BEFORE_STAGE_LAYOUT,{options:s,index:i}));const o=yield this.stepLayout(a,s,i);Rt(e,new St(Q.AFTER_STAGE_LAYOUT,{options:s,index:i})),n.animation||this.updateElementPosition(o,!1)}Rt(e,new St(Q.AFTER_LAYOUT)),this.transformDataAfterLayout()})}transformDataAfterLayout(){const t=this.context.transform.getTransformInstance();Object.values(t).forEach(e=>e.afterLayout())}simulate(){return xo(this,void 0,void 0,function*(){if(!this.options)return{};const t=Array.isArray(this.options)?this.options:[this.options];let e={};for(const n of t){const i=t.indexOf(n),a=this.getLayoutData(n);e=yield this.stepLayout(a,Object.assign(Object.assign(Object.assign({},this.presetOptions),n),{animation:!1}),i)}return e})}stepLayout(t,e,n){return xo(this,void 0,void 0,function*(){return UA(e)?yield this.treeLayout(t,e,n):yield this.graphLayout(t,e,n)})}graphLayout(t,e,n){return xo(this,void 0,void 0,function*(){const{animation:i,enableWorker:a,iterations:s=300}=e,o=this.initGraphLayout(e);if(!o)return{};if(this.instances[n]=o,this.instance=o,a){const u=o;return this.supervisor=new r6(u.graphData2LayoutModel(t),u.instance,{iterations:s}),yu(yield this.supervisor.execute())}if(ef(o))return i?yield o.execute(t,{onTick:u=>{this.updateElementPosition(u,!1)}}):(o.execute(t),o.stop(),o.tick(s));const l=yield o.execute(t);if(i){const u=this.updateElementPosition(l,i);yield u==null?void 0:u.finished}return l})}treeLayout(t,e,n){return xo(this,void 0,void 0,function*(){const{type:i,animation:a}=e,s=Rr("layout",i);if(!s)return{};const{nodes:o=[],edges:l=[]}=t,u=new Et.k({nodes:o.map(v=>({id:j(v),data:v.data||{}})),edges:l.map(v=>({id:j(v),source:v.source,target:v.target,data:v.data||{}}))});e6(u);const c={nodes:[],edges:[]},d={nodes:[],edges:[]};u.getRoots(Nn).forEach(v=>{ji(v,b=>{b.children=u.getSuccessors(b.id)},b=>u.getSuccessors(b.id),"TB");const g=s(v,e),{x:p,y:m,z:y=0}=g;ji(g,b=>{const{id:_,x:w,y:x,z:E=0}=b;c.nodes.push({id:_,style:{x:p,y:m,z:y}}),d.nodes.push({id:_,style:{x:w,y:x,z:E}})},b=>b.children,"TB")});const f=this.inferTreeLayoutOffset(d);if(kx(d,f),a){kx(c,f),this.updateElementPosition(c,!1);const v=this.updateElementPosition(d,a);yield v==null?void 0:v.finished}return d})}inferTreeLayoutOffset(t){var e;let[n,i]=[1/0,-1/0],[a,s]=[1/0,-1/0];(e=t.nodes)===null||e===void 0||e.forEach(g=>{const{x:p=0,y:m=0}=g.style||{};n=Math.min(n,p),i=Math.max(i,p),a=Math.min(a,m),s=Math.max(s,m)});const{canvas:o}=this.context,l=o.getSize(),[u,c]=o.getCanvasByViewport([0,0]),[d,h]=o.getCanvasByViewport(l);if(n>=u&&i<=d&&a>=c&&s<=h)return[0,0];const f=(u+d)/2,v=(c+h)/2;return[f-(n+i)/2,v-(a+s)/2]}stopLayout(){this.instance&&ef(this.instance)&&(this.instance.stop(),this.instance=void 0),this.supervisor&&(this.supervisor.stop(),this.supervisor=void 0),this.animationResult&&(this.animationResult.finish(),this.animationResult=void 0)}getLayoutData(t){const{nodeFilter:e=()=>!0}=t,{nodes:n,edges:i,combos:a}=this.context.model.getData(),s=c=>this.context.element.getElement(c),o=n.filter(c=>{const d=j(c),h=s(d);return!h||hu(h)?!1:e(c)}),l=new Map(o.map(c=>[j(c),c])),u=i.filter(c=>{const{source:d,target:h}=c;return!(!l.has(d)||!l.has(h))});return{nodes:o,edges:u,combos:a}}initGraphLayout(t){var e;const{element:n,viewport:i}=this.context,{type:a,enableWorker:s,animation:o,iterations:l}=t,u=i6(t,["type","enableWorker","animation","iterations"]),[c,d]=i.getCanvasSize(),h=[c/2,d/2],f=(e=t==null?void 0:t.nodeSize)!==null&&e!==void 0?e:y=>{const b=n==null?void 0:n.getElement(y.id),{size:_}=(b==null?void 0:b.attributes)||{};return _},v=Rr("layout",a);if(!v)return en.warn(`The layout of ${a} is not registered.`);const g=Object.getPrototypeOf(v.prototype)===Bh.prototype?v:YA(v,this.context),p=new g(this.context),m={nodeSize:f,width:c,height:d,center:h};switch(p.id){case"d3-force":case"d3-force-3d":Object.assign(m,{center:{x:c/2,y:d/2,z:0}});break;default:break}return(0,dn.Z)(p.options,m,u),p}updateElementPosition(t,e){const{model:n,element:i}=this.context;return i?(n.updateData(t),i.draw({animation:e,silence:!0})):null}destroy(){var t;this.stopLayout(),this.context={},(t=this.supervisor)===null||t===void 0||t.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const kx=(r,t)=>{var e;const[n,i]=t;(e=r.nodes)===null||e===void 0||e.forEach(a=>{if(a.style){const{x:s=0,y:o=0}=a.style;a.style.x=s+n,a.style.y=o+i}else a.style={x:n,y:i}})};class s6 extends Qd{constructor(t){super(t),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(t){this.setExtensions(t)}getPluginInstance(t){const e=this.extensionMap[t];if(e)return e;en.warn(`Cannot find the plugin ${t}, will try to find it by type.`);const n=this.extensions.find(i=>i.type===t);if(n)return this.extensionMap[n.key]}}const Gc=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class o6 extends Qd{constructor(t){super(t),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(t){this.setExtensions([...Gc.slice(0,Gc.length-1),...t,Gc[Gc.length-1]])}getTransformInstance(t){return t?this.extensionMap[t]:this.extensionMap}}var Eo=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class l6{get padding(){return mr(this.context.options.padding)}get paddingOffset(){const[t,e,n,i]=this.padding,[a,s,o]=[(i-e)/2,(t-n)/2,0];return[a,s,o]}constructor(t){this.landmarkCounter=0,this.context=t;const[e,n]=this.paddingOffset,{zoom:i,rotation:a,x:s=e,y:o=n}=t.options;this.transform({mode:"absolute",scale:i,translate:[s,o],rotate:a},!1)}get camera(){const{canvas:t}=this.context;return new Proxy(t.getCamera(),{get:(e,n)=>{const a=Object.entries(t.getLayers()).filter(([o])=>!["main"].includes(o)).map(([,o])=>o.getCamera()),s=e[n];if(typeof s=="function")return(...o)=>{const l=s.apply(e,o);return a.forEach(u=>{u[n].apply(u,o)}),l}}})}createLandmark(t){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,t)}getAnimation(t){const e=kp(this.context.options,t);return e?(0,Vi.Z)(Object.assign({},e),["easing","duration"]):!1}getCanvasSize(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e,n]}getCanvasCenter(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e/2,n/2,0]}getViewportCenter(){const[t,e]=this.camera.getPosition();return[t,e,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(t){const{camera:e}=this,{mode:n,translate:i=[]}=t,a=this.getZoom(),s=e.getPosition(),o=e.getFocalPoint(),[l,u]=this.getCanvasCenter(),[c=0,d=0,h=0]=i,f=Xn([-c,-d,-h],a);return n==="relative"?{position:Ee(s,f),focalPoint:Ee(o,f)}:{position:Ee([l,u,s[2]],f),focalPoint:Ee([l,u,o[2]],f)}}getRotateOptions(t){const{mode:e,rotate:n=0}=t;return{roll:e==="relative"?this.camera.getRoll()+n:n}}getZoomOptions(t){const{zoomRange:e}=this.context.options,n=this.camera.getZoom(),{mode:i,scale:a=1}=t;return(0,Ne.Z)(i==="relative"?n*a:a,...e)}transform(t,e){return Eo(this,void 0,void 0,function*(){const{graph:n}=this.context,{translate:i,rotate:a,scale:s,origin:o}=t;this.cancelAnimation();const l=this.getAnimation(e);if(Rt(n,new Bc(Q.BEFORE_TRANSFORM,t)),!a&&s&&!i&&o&&!l){this.camera.setZoomByViewportPoint(this.getZoomOptions(t),o),Rt(n,new Bc(Q.AFTER_TRANSFORM,t));return}const u={};if(i&&Object.assign(u,this.getTranslateOptions(t)),(0,oe.Z)(a)&&Object.assign(u,this.getRotateOptions(t)),(0,oe.Z)(s)&&Object.assign(u,{zoom:this.getZoomOptions(t)}),l)return Rt(n,new jn(Q.BEFORE_ANIMATE,Qt.TRANSFORM,null,t)),new Promise(c=>{this.transformResolver=c,this.camera.gotoLandmark(this.createLandmark(u),Object.assign(Object.assign({},l),{onfinish:()=>{Rt(n,new jn(Q.AFTER_ANIMATE,Qt.TRANSFORM,null,t)),Rt(n,new Bc(Q.AFTER_TRANSFORM,t)),this.transformResolver=void 0,c()}}))});this.camera.gotoLandmark(this.createLandmark(u),{duration:0}),Rt(n,new Bc(Q.AFTER_TRANSFORM,t))})}fitView(t,e){return Eo(this,void 0,void 0,function*(){const[n,i,a,s]=this.padding,{when:o="always",direction:l="both"}=t||{},[u,c]=this.context.canvas.getSize(),d=u-s-i,h=c-n-a,f=this.context.canvas.getBounds(),v=this.getBBoxInViewport(f),[g,p]=ri(v),m=l==="x"&&g>=d||l==="y"&&p>=h||l==="both"&&g>=d&&p>=h;if(o==="overflow"&&!m)return yield this.fitCenter(e);const y=d/g,b=h/p,_=l==="x"?y:l==="y"?b:Math.min(y,b),w=this.getAnimation(e);yield this.transform({mode:"relative",scale:_,translate:Ee(He(this.getCanvasCenter(),this.getBBoxInViewport(f).center),Xn(this.paddingOffset,_))},w)})}fitCenter(t){return Eo(this,void 0,void 0,function*(){const e=this.context.canvas.getBounds();yield this.focus(e,t)})}focusElements(t,e){return Eo(this,void 0,void 0,function*(){const{element:n}=this.context;if(!n)return;const i=Cs(t.map(a=>n.getElement(a).getRenderBounds()));yield this.focus(i,e)})}focus(t,e){return Eo(this,void 0,void 0,function*(){const n=this.context.graph.getViewportByCanvas(t.center),i=this.getCanvasCenter(),a=He(i,n);yield this.transform({mode:"relative",translate:Ee(a,this.paddingOffset)},e)})}getBBoxInViewport(t){const{min:e,max:n}=t,{graph:i}=this.context,[a,s]=i.getViewportByCanvas(e),[o,l]=i.getViewportByCanvas(n),u=new Ke;return u.setMinMax([a,s,0],[o,l,0]),u}isInViewport(t,e=!1,n=0){const{graph:i}=this.context,a=this.getCanvasSize(),[s,o]=i.getCanvasByViewport([0,0]),[l,u]=i.getCanvasByViewport(a);let c=new Ke;return c.setMinMax([s,o,0],[l,u,0]),n&&(c=ai(c,n)),Na(t)?Yn(t,c):e?_S(t,c):c.intersects(t)}cancelAnimation(){var t,e;!((t=this.camera.landmarks)===null||t===void 0)&&t.length&&this.camera.cancelLandmarkAnimation(),(e=this.transformResolver)===null||e===void 0||e.call(this)}}var $e=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class jc extends of.Z{constructor(t){var e;super(),this.rendered=!1,this.destroyed=!1,this.context={model:new t6},this.isCollapsingExpanding=!1,this.onResize=(0,Us.Z)(()=>{this.resize()},300),this.options=Object.assign({},jc.defaultOptions,t),this._setOptions(this.options,!0),this.context.graph=this,this.options.autoResize&&((e=globalThis.addEventListener)===null||e===void 0||e.call(globalThis,"resize",this.onResize))}getOptions(){return this.options}setOptions(t){this._setOptions(t,!1)}_setOptions(t,e){if(this.updateCanvas(t),e){const{data:h}=t;h&&this.addData(h);return}Object.assign(this.options,t);const{behaviors:n,combo:i,data:a,edge:s,layout:o,node:l,plugins:u,theme:c,transforms:d}=t;n&&this.setBehaviors(n),a&&this.setData(a),l&&this.setNode(l),s&&this.setEdge(s),i&&this.setCombo(i),o&&this.setLayout(o),c&&this.setTheme(c),u&&this.setPlugins(u),d&&this.setTransforms(d)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(t,e){t&&(this.options.width=t),e&&(this.options.height=e),this.resize(t,e)}setZoomRange(t){this.options.zoomRange=t}getZoomRange(){return this.options.zoomRange}setNode(t){this.options.node=t,this.context.model.refreshData()}setEdge(t){this.options.edge=t,this.context.model.refreshData()}setCombo(t){this.options.combo=t,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(t){this.options.theme=(0,de.Z)(t)?t(this.getTheme()):t}setLayout(t){this.options.layout=(0,de.Z)(t)?t(this.getLayout()):t}getLayout(){return this.options.layout}setBehaviors(t){var e;this.options.behaviors=(0,de.Z)(t)?t(this.getBehaviors()):t,(e=this.context.behavior)===null||e===void 0||e.setBehaviors(this.options.behaviors)}updateBehavior(t){this.setBehaviors(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getBehaviors(){return this.options.behaviors||[]}setPlugins(t){var e;this.options.plugins=(0,de.Z)(t)?t(this.getPlugins()):t,(e=this.context.plugin)===null||e===void 0||e.setPlugins(this.options.plugins)}updatePlugin(t){this.setPlugins(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getPlugins(){return this.options.plugins||[]}getPluginInstance(t){return this.context.plugin.getPluginInstance(t)}setTransforms(t){var e;this.options.transforms=(0,de.Z)(t)?t(this.getTransforms()):t,(e=this.context.transform)===null||e===void 0||e.setTransforms(this.options.transforms)}updateTransform(t){this.setTransforms(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}getElementData(t){return Array.isArray(t)?t.map(e=>this.context.model.getElementDataById(e)):this.context.model.getElementDataById(t)}getNodeData(t){var e;return t===void 0?this.context.model.getNodeData():Array.isArray(t)?this.context.model.getNodeData(t):(e=this.context.model.getNodeData([t]))===null||e===void 0?void 0:e[0]}getEdgeData(t){var e;return t===void 0?this.context.model.getEdgeData():Array.isArray(t)?this.context.model.getEdgeData(t):(e=this.context.model.getEdgeData([t]))===null||e===void 0?void 0:e[0]}getComboData(t){var e;return t===void 0?this.context.model.getComboData():Array.isArray(t)?this.context.model.getComboData(t):(e=this.context.model.getComboData([t]))===null||e===void 0?void 0:e[0]}setData(t){this.context.model.setData((0,de.Z)(t)?t(this.getData()):t)}addData(t){this.context.model.addData((0,de.Z)(t)?t(this.getData()):t)}addNodeData(t){this.context.model.addNodeData((0,de.Z)(t)?t(this.getNodeData()):t)}addEdgeData(t){this.context.model.addEdgeData((0,de.Z)(t)?t(this.getEdgeData()):t)}addComboData(t){this.context.model.addComboData((0,de.Z)(t)?t(this.getComboData()):t)}addChildrenData(t,e){this.context.model.addChildrenData(t,e)}updateData(t){this.context.model.updateData((0,de.Z)(t)?t(this.getData()):t)}updateNodeData(t){this.context.model.updateNodeData((0,de.Z)(t)?t(this.getNodeData()):t)}updateEdgeData(t){this.context.model.updateEdgeData((0,de.Z)(t)?t(this.getEdgeData()):t)}updateComboData(t){this.context.model.updateComboData((0,de.Z)(t)?t(this.getComboData()):t)}removeData(t){this.context.model.removeData((0,de.Z)(t)?t(this.getData()):t)}removeNodeData(t){this.context.model.removeNodeData((0,de.Z)(t)?t(this.getNodeData()):t)}removeEdgeData(t){this.context.model.removeEdgeData((0,de.Z)(t)?t(this.getEdgeData()):t)}removeComboData(t){this.context.model.removeComboData((0,de.Z)(t)?t(this.getComboData()):t)}getElementType(t){return this.context.model.getElementType(t)}getRelatedEdgesData(t,e="both"){return this.context.model.getRelatedEdgesData(t,e)}getNeighborNodesData(t){return this.context.model.getNeighborNodesData(t)}getAncestorsData(t,e){return this.context.model.getAncestorsData(t,e)}getParentData(t,e){return this.context.model.getParentData(t,e)}getChildrenData(t){return this.context.model.getChildrenData(t)}getDescendantsData(t){return this.context.model.getDescendantsData(t)}getElementDataByState(t,e){return this.context.model.getElementDataByState(t,e)}initCanvas(){return $e(this,void 0,void 0,function*(){var t;if(this.context.canvas)return yield this.context.canvas.ready;const{container:e="container",width:n,height:i,renderer:a,cursor:s,background:o,canvas:l,devicePixelRatio:u=(t=globalThis.devicePixelRatio)!==null&&t!==void 0?t:1}=this.options;if(e instanceof px)this.context.canvas=e,s&&e.setCursor(s),a&&e.setRenderer(a),yield e.ready;else{const c=(0,Se.Z)(e)?document.getElementById(e):e,d=bx(c);this.emit(Q.BEFORE_CANVAS_INIT,{container:c,width:n,height:i});const h=Object.assign(Object.assign({},l),{container:c,width:n||d[0],height:i||d[1],background:o,renderer:a,cursor:s,devicePixelRatio:u}),f=new px(h);this.context.canvas=f,yield f.ready,this.emit(Q.AFTER_CANVAS_INIT,{canvas:f})}})}updateCanvas(t){var e,n;const{renderer:i,cursor:a,height:s,width:o}=t,l=this.context.canvas;l&&(i&&(this.emit(Q.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),l.setRenderer(i),this.emit(Q.AFTER_RENDERER_CHANGE,{renderer:i})),a&&l.setCursor(a),((0,oe.Z)(o)||(0,oe.Z)(s))&&this.setSize((e=o!=null?o:this.options.width)!==null&&e!==void 0?e:0,(n=s!=null?s:this.options.height)!==null&&n!==void 0?n:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new $B(this.context)),this.context.plugin||(this.context.plugin=new s6(this.context)),this.context.viewport||(this.context.viewport=new l6(this.context)),this.context.transform||(this.context.transform=new o6(this.context)),this.context.element||(this.context.element=new n6(this.context)),this.context.animation||(this.context.animation=new KB(this.context)),this.context.layout||(this.context.layout=new a6(this.context)),this.context.behavior||(this.context.behavior=new qB(this.context))}prepare(){return $e(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed)throw new Error(Lr("The graph instance has been destroyed"));yield this.initCanvas(),this.initRuntime()})}render(){return $e(this,void 0,void 0,function*(){yield this.prepare(),Rt(this,new St(Q.BEFORE_RENDER));const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.context.layout.layout()]),yield this.autoFit(),this.rendered=!0,Rt(this,new St(Q.AFTER_RENDER))})}draw(){return $e(this,void 0,void 0,function*(){var t;yield this.prepare(),yield(t=this.context.element.draw())===null||t===void 0?void 0:t.finished})}layout(){return $e(this,void 0,void 0,function*(){yield this.context.layout.layout()})}stopLayout(){this.context.layout.stopLayout()}clear(){return $e(this,void 0,void 0,function*(){this.context.model.setData({}),yield this.draw()})}destroy(){var t;Rt(this,new St(Q.BEFORE_DESTROY));const{layout:e,animation:n,element:i,model:a,canvas:s,behavior:o,plugin:l}=this.context;l==null||l.destroy(),o==null||o.destroy(),e==null||e.destroy(),n==null||n.destroy(),i==null||i.destroy(),a.destroy(),s==null||s.destroy(),this.options={},this.context={},this.off(),(t=globalThis.removeEventListener)===null||t===void 0||t.call(globalThis,"resize",this.onResize),this.destroyed=!0,Rt(this,new St(Q.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(t,e){var n;const i=bx((n=this.context.canvas)===null||n===void 0?void 0:n.getContainer()),a=[t||i[0],e||i[1]];if(!this.context.canvas)return;const s=this.context.canvas.getSize();(0,gt.Z)(a,s)||(Rt(this,new St(Q.BEFORE_SIZE_CHANGE,{size:a})),this.context.canvas.resize(...a),Rt(this,new St(Q.AFTER_SIZE_CHANGE,{size:a})))}fitView(t,e){return $e(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.fitView(t,e)})}fitCenter(t){return $e(this,void 0,void 0,function*(){var e;yield(e=this.context.viewport)===null||e===void 0?void 0:e.fitCenter(t)})}autoFit(){return $e(this,void 0,void 0,function*(){const{autoFit:t}=this.context.options;if(t)if((0,Se.Z)(t))t==="view"?yield this.fitView():t==="center"&&(yield this.fitCenter());else{const{type:e,animation:n}=t;e==="view"?yield this.fitView(t.options,n):e==="center"&&(yield this.fitCenter(n))}})}focusElement(t,e){return $e(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.focusElements(Array.isArray(t)?t:[t],e)})}zoomBy(t,e,n){return $e(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:t,origin:n},e)})}zoomTo(t,e,n){return $e(this,void 0,void 0,function*(){this.context.viewport.transform({mode:"absolute",scale:t,origin:n},e)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(t,e,n){return $e(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:t,origin:n},e)})}rotateTo(t,e,n){return $e(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:t,origin:n},e)})}getRotation(){return this.context.viewport.getRotation()}translateBy(t,e){return $e(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:t},e)})}translateTo(t,e){return $e(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:t},e)})}getPosition(){return He([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(t,e){return $e(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=(0,yt.Z)(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a];Object.entries(l).forEach(([c,d])=>this.context.model.translateNodeLikeBy(c,d)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}translateElementTo(t,e){return $e(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=(0,yt.Z)(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a];Object.entries(l).forEach(([c,d])=>this.context.model.translateNodeLikeTo(c,d)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}getElementPosition(t){return this.context.model.getElementPosition(t)}getElementRenderStyle(t){return(0,af.Z)(this.context.element.getElement(t).attributes,["context"])}setElementVisibility(t,e){return $e(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=(0,yt.Z)(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a],c={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([f,v])=>{const g=this.getElementType(f);c[`${g}s`].push({id:f,style:{visibility:v}})});const{model:d,element:h}=this.context;d.preventUpdateNodeLikeHierarchy(()=>{d.updateData(c)}),yield(o=h.draw({animation:u,stage:"visibility"}))===null||o===void 0?void 0:o.finished})}showElement(t,e){return $e(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"visible"])),e)})}hideElement(t,e){return $e(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"hidden"])),e)})}getElementVisibility(t){var e,n;const i=this.context.element.getElement(t);return(n=(e=i==null?void 0:i.style)===null||e===void 0?void 0:e.visibility)!==null&&n!==void 0?n:"visible"}setElementZIndex(t,e){return $e(this,void 0,void 0,function*(){var n;const i={nodes:[],edges:[],combos:[]},a=(0,yt.Z)(t)?t:{[t]:e};Object.entries(a).forEach(([l,u])=>{const c=this.getElementType(l);i[`${c}s`].push({id:l,style:{zIndex:u}})});const{model:s,element:o}=this.context;s.preventUpdateNodeLikeHierarchy(()=>s.updateData(i)),yield(n=o.draw({animation:!1,stage:"zIndex"}))===null||n===void 0?void 0:n.finished})}frontElement(t){return $e(this,void 0,void 0,function*(){const e=Array.isArray(t)?t:[t],{model:n}=this.context,i={};e.map(a=>{const s=n.getFrontZIndex(a);if(n.getElementType(a)==="combo"){const l=n.getAncestorsData(a,Ve).at(-1)||this.getComboData(a),u=[l,...n.getDescendantsData(j(l))],c=s-xx(l);u.forEach(h=>{i[j(h)]=this.getElementZIndex(j(h))+c});const{internal:d}=Nh(u.map(j),h=>n.getRelatedEdgesData(h));d.forEach(h=>{const f=j(h);i[f]=this.getElementZIndex(f)+c})}else i[a]=s}),yield this.setElementZIndex(i)})}getElementZIndex(t){return xx(this.context.model.getElementDataById(t))}setElementState(t,e){return $e(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=(0,yt.Z)(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a],c=h=>h?Array.isArray(h)?h:[h]:[],d={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([h,f])=>{const v=this.getElementType(h);d[`${v}s`].push({id:h,states:c(f)})}),this.updateData(d),yield(o=this.context.element.draw({animation:u,stage:"state"}))===null||o===void 0?void 0:o.finished})}getElementState(t){return this.context.model.getElementState(t)}getElementRenderBounds(t){return this.context.element.getElement(t).getRenderBounds()}collapseElement(t){return $e(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(hn(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;const s=i.getElementType(e);yield this.frontElement(e),this.isCollapsingExpanding=!0,this.setElementCollapsibility(e,!0),s==="node"?yield a.collapseNode(e,n):s==="combo"&&(yield a.collapseCombo(e,n)),this.isCollapsingExpanding=!1})}expandElement(t){return $e(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(!hn(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;const s=i.getElementType(e);this.isCollapsingExpanding=!0,this.setElementCollapsibility(e,!1),s==="node"?yield a.expandNode(e,n):s==="combo"&&(yield a.expandCombo(e,n)),this.isCollapsingExpanding=!1})}setElementCollapsibility(t,e){const n=this.getElementType(t);n==="node"?this.updateNodeData([{id:t,style:{collapsed:e}}]):n==="combo"&&this.updateComboData([{id:t,style:{collapsed:e}}])}toDataURL(){return $e(this,arguments,void 0,function*(t={}){return this.context.canvas.toDataURL(t)})}getCanvasByViewport(t){return this.context.canvas.getCanvasByViewport(t)}getViewportByCanvas(t){return this.context.canvas.getViewportByCanvas(t)}getClientByCanvas(t){return this.context.canvas.getClientByCanvas(t)}getCanvasByClient(t){return this.context.canvas.getCanvasByClient(t)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(t,e,n){return super.on(t,e,n)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}}jc.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};class _i extends eh{beforeDraw(t,e){return t}afterLayout(){}}class u6 extends _i{beforeDraw(t){const{model:e}=this.context,n=t.add.combos,i=a=>{const s=[];return a.forEach((o,l)=>{const c=e.getAncestorsData(l,"combo").map(d=>j(d)).reverse();s.push([l,o,c.length])}),new Map(s.sort(([,,o],[,,l])=>l-o).map(([o,l])=>[o,l]))};return t.add.combos=i(n),t.update.combos=i(t.update.combos),t}}function kn(r,t,e,n,i){const a=j(n),s=`${e}s`,o=i?n:r.add[s].get(a)||r.update[s].get(a)||r.remove[s].get(a)||n;Object.entries(r).forEach(([l,u])=>{t===l?u[s].set(a,o):u[s].delete(a)})}function Wc(r,t){return Object.keys(r).every(e=>r[e]===t[e])}class c6 extends _i{beforeDraw(t,e){if(e.stage==="visibility"||!this.context.model.model.hasTreeStructure(Ve))return t;const{model:n}=this.context,{add:i,update:a}=t,s=[...t.update.combos.entries(),...t.add.combos.entries()];for(;s.length;){const[o,l]=s.pop();if(hn(l)){const u=n.getDescendantsData(o),c=u.map(j),{internal:d,external:h}=Nh(c,f=>n.getRelatedEdgesData(f));u.forEach(f=>{const v=j(f),g=s.findIndex(([m])=>m===v);g!==-1&&s.splice(g,1);const p=n.getElementType(v);kn(t,"remove",p,f)}),d.forEach(f=>kn(t,"remove","edge",f)),h.forEach(f=>{var v;const g=j(f);((v=this.context.element)===null||v===void 0?void 0:v.getElement(g))?a.edges.set(g,f):i.edges.set(g,f)})}else{const u=n.getChildrenData(o),c=u.map(j),{edges:d}=Nh(c,h=>n.getRelatedEdgesData(h));[...u,...d].forEach(h=>{var f;const v=j(h),g=n.getElementType(v);((f=this.context.element)===null||f===void 0?void 0:f.getElement(v))?kn(t,"update",g,h):kn(t,"add",g,h),g==="combo"&&s.push([v,h])})}}return t}}const _x=(r,t,e,n)=>{const i=`${e}s`,a=j(n);!r.add[i].has(a)&&!r.update[i].has(a)&&r[t][i].set(j(n),n)};class d6 extends _i{getElement(t){return this.context.element.getElement(t)}handleExpand(t,e){if(_x(e,"add","node",t),hn(t))return;const n=j(t);_x(e,"add","node",t),this.context.model.getRelatedEdgesData(n,"out").forEach(s=>{kn(e,"add","edge",s)}),this.context.model.getChildrenData(n).forEach(s=>{this.handleExpand(s,e)})}beforeDraw(t){const{graph:e,model:n}=this.context;if(!n.model.hasTreeStructure(Nn))return t;const{add:{nodes:i,edges:a},update:{nodes:s}}=t,o=new Map,l=new Map;i.forEach((c,d)=>{hn(c)&&o.set(d,c)}),a.forEach(c=>{if(e.getElementType(c.source)!=="node")return;const d=e.getNodeData(c.source);hn(d)&&o.set(c.source,d)}),s.forEach((c,d)=>{const h=this.getElement(d);if(!h)return;const f=h.attributes.collapsed;hn(c)?f||o.set(d,c):f&&l.set(d,c)});const u=new Set;return o.forEach((c,d)=>{n.getDescendantsData(d).forEach(f=>{const v=j(f);if(u.has(v))return;kn(t,"remove","node",f),n.getRelatedEdgesData(v).forEach(p=>{kn(t,"remove","edge",p)}),u.add(v)})}),l.forEach((c,d)=>{if(n.getAncestorsData(d,Nn).some(hn)){kn(t,"remove","node",c);return}this.handleExpand(c,t)}),t}}class h6 extends _i{beforeDraw(t){const{add:e,update:n}=t,{model:i}=this.context;return[...e.edges.entries(),...n.edges.entries()].forEach(([,a])=>{Sx(i,a)}),t}}const Sx=(r,t)=>{const{source:e,target:n}=t,i=r.getElementDataById(e),a=r.getElementDataById(n),s=Q0(i,d=>r.getParentData(d,Ve)),o=Q0(a,d=>r.getParentData(d,Ve)),l=j(s),u=j(o),c={sourceNode:l,targetNode:u};return t.style?Object.assign(t.style,c):t.style=c,t},f6=(r,t,e)=>{const[n,i]=t,[a,s]=e;if(i===n)return a;const o=(r-n)/(i-n);return a+o*(s-a)},v6=(r,t,e)=>{const[n,i]=t,[a,s]=e,o=Math.log(r-n+1)/Math.log(i-n+1);return a+o*(s-a)},g6=(r,t,e,n=2)=>{const[i,a]=t,[s,o]=e,l=Math.pow((r-i)/(a-i),n);return s+l*(o-s)},p6=(r,t,e)=>{const[n,i]=t,[a,s]=e,o=Math.sqrt((r-n)/(i-n));return a+o*(s-a)};class Zc extends _i{constructor(t,e){super(t,(0,dn.Z)({},Zc.defaultOptions,e)),this.assignSizeByCentrality=(n,i,a,s,o,l)=>{const u=[i,a],c=[s[0],o[0]],d=[s[1],o[1]],h=[s[2],o[2]],f=(v,g)=>{if(typeof l=="function")return l(v,u,g);switch(l){case"linear":return f6(v,u,g);case"log":return v6(v,u,g);case"pow":return g6(v,u,g,2);case"sqrt":return p6(v,u,g);default:return g[0]}};return[f(n,c),f(n,d),f(n,h)]}}beforeDraw(t){const{model:e}=this.context,n=e.getNodeData(),i=Mn(this.options.maxSize),a=Mn(this.options.minSize),s=this.getCentralities(this.options.centrality),o=s.size>0?Math.max(...s.values()):0,l=s.size>0?Math.min(...s.values()):0;return n.forEach(u=>{var c;const d=this.assignSizeByCentrality(s.get(j(u))||0,l,o,a,i,this.options.scale),h=(c=this.context.element)===null||c===void 0?void 0:c.getElement(j(u)),f={size:d};this.assignLabelStyle(f,d,u,h),(!h||!Wc(f,h.attributes))&&kn(t,h?"update":"add","node",(0,dn.Z)(u,{style:f}),!0)}),t}assignLabelStyle(t,e,n,i){var a;const s=i?i.config.style:(a=this.context.element)===null||a===void 0?void 0:a.getElementComputedStyle("node",n);if(Object.assign(t,(0,Vi.Z)(s,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const o=this.getLabelSizeByNodeSize(e,1/0,Number(t.labelFontSize));Object.assign(t,{labelFontSize:o,labelLineHeight:o+kS(t.labelPadding)})}return t}getLabelSizeByNodeSize(t,e,n){const i=Math.min(...t)/2,[a,s]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[n,e];return Math.min(s,Math.max(i,a))}getCentralities(t){const{model:e}=this.context,n=e.getData();if(typeof t=="function")return t(n);const i=e.getRelatedEdgesData.bind(e);return Np(n,i,t)}}Zc.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class Vc extends _i{constructor(t,e){super(t,Object.assign({},Vc.defaultOptions,e))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var t;const e=Ct(this.ref),{graph:n,model:i}=this.context;(t=i.getData().nodes)===null||t===void 0||t.forEach(s=>{if(j(s)===j(this.ref))return;const o=Lp(He(Ct(s),e)),l=Math.abs(o)>Math.PI/2,u=!s.children||s.children.length===0,c=Mn(n.getElementRenderStyle(j(s)).size)[0]/2,d=(u?1:-1)*(c+this.options.offset),h=[["translate",d*Math.cos(o),d*Math.sin(o)],["rotate",l?$t(o)+180:$t(o)]];i.updateNodeData([{id:j(s),style:{labelTextAlign:l===u?"right":"left",labelTextBaseline:"middle",labelTransform:h}}])}),n.draw()}}Vc.defaultOptions={offset:5};const m6="quadratic",Tx=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class Hc extends _i{constructor(t,e){super(t,Object.assign({},Hc.defaultOptions,e)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=n=>{const{add:{edges:i},update:{nodes:a,edges:s,combos:o},remove:{edges:l}}=n,{model:u}=this.context,c=new Map,d=(v,g)=>{u.getRelatedEdgesData(g).forEach(m=>!c.has(j(m))&&c.set(j(m),m))};a.forEach(d),o.forEach(d);const h=v=>{const g=u.getEdgeData().map(m=>Sx(u,m));y6(v,g,!0).forEach(m=>!c.has(j(m))&&c.set(j(m),m))};if(l.size&&l.forEach(h),i.size&&i.forEach(h),s.size){const v=wy(lf(u.getChanges())).update.edges;s.forEach(g=>{var p;h(g);const m=(p=v.find(y=>j(y.value)===j(g)))===null||p===void 0?void 0:p.original;m&&!Sv(g,m)&&h(m)})}(0,xr.Z)(this.options.edges)||c.forEach((v,g)=>!this.options.edges.includes(g)&&c.delete(g));const f=u.getEdgeData().map(j);return new Map([...c].sort((v,g)=>f.indexOf(v[0])-f.indexOf(g[0])))},this.applyBundlingStyle=(n,i,a)=>{const{edgeMap:s,reverses:o}=Ax(i);s.forEach(l=>{l.forEach((u,c,d)=>{var h;const f=d.length,v=u.style||{};if(u.source===u.target){const m=Tx.length;v.loopPlacement=Tx[c%m],v.loopDist=Math.floor(c/m)*a+50}else if(f===1)v.curveOffset=0;else{const m=(c%2===0?1:-1)*(o[`${u.source}|${u.target}|${c}`]?-1:1);v.curveOffset=f%2===1?m*Math.ceil(c/2)*a*2:m*(Math.floor(c/2)*a*2+a)}const g=Object.assign(u,{type:m6,style:v}),p=(h=this.context.element)===null||h===void 0?void 0:h.getElement(j(u));(!p||!Wc(g.style,p.attributes))&&kn(n,p?"update":"add","edge",g,!0)})})},this.resetEdgeStyle=n=>{const i=n.style||{},a=this.cacheMergeStyle.get(j(n))||{};return Object.keys(a).forEach(s=>{(0,gt.Z)(i[s],a[s])&&(n[s]?i[s]=n[s]:delete i[s])}),Object.assign(n,{style:i})},this.applyMergingStyle=(n,i)=>{const{edgeMap:a,reverses:s}=Ax(i);a.forEach(o=>{var l;if(o.length===1){const c=o[0],d=(l=this.context.element)===null||l===void 0?void 0:l.getElement(j(c)),h=this.resetEdgeStyle(c);(!d||!Wc(h,d.attributes))&&kn(n,d?"update":"add","edge",h);return}const u=o.map(({source:c,target:d,style:h={}},f)=>{const{startArrow:v,endArrow:g}=h,p={},[m,y]=s[`${c}|${d}|${f}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return(0,ha.Z)(v)&&(p[m]=v),(0,ha.Z)(g)&&(p[y]=g),p}).reduce((c,d)=>Object.assign(Object.assign({},c),d),{});o.forEach((c,d,h)=>{var f;if(d!==0){kn(n,"remove","edge",c);return}const v=Object.assign({},(0,de.Z)(this.options.style)?this.options.style(h):this.options.style,{childrenData:h});this.cacheMergeStyle.set(j(c),v);const g=Object.assign(Object.assign({},c),{type:"line",style:Object.assign(Object.assign(Object.assign({},c.style),u),v)}),p=(f=this.context.element)===null||f===void 0?void 0:f.getElement(j(c));(!p||!Wc(g.style,p.attributes))&&kn(n,p?"update":"add","edge",g,!0)})})}}beforeDraw(t){const e=this.getAffectedParallelEdges(t);return e.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(t,e,this.options.distance):this.applyMergingStyle(t,e)),t}}Hc.defaultOptions={mode:"bundle",distance:15};const Ax=r=>{const t=new Map,e=new Set,n={};for(const[i,a]of r){if(e.has(i))continue;const{source:s,target:o}=a,l=`${s}-${o}`;t.has(l)||t.set(l,[]),t.get(l).push(a),e.add(i);for(const[u,c]of r)e.has(u)||Sv(a,c)&&(t.get(l).push(c),e.add(u),s===c.target&&o===c.source&&(n[`${c.source}|${c.target}|${t.get(l).length-1}`]=!0))}return{edgeMap:t,reverses:n}},y6=(r,t,e)=>t.filter(n=>(e||j(n)!==j(r))&&Sv(n,r)),Sv=(r,t)=>{const{sourceNode:e,targetNode:n}=r.style||{},{sourceNode:i,targetNode:a}=t.style||{};return e===i&&n===a||e===a&&n===i};class b6 extends _i{beforeDraw(t,e){const{stage:n}=e;if(n==="visibility")return t;const{model:i}=this.context,{update:{nodes:a,edges:s,combos:o}}=t,l=(u,c)=>{i.getRelatedEdgesData(c).forEach(h=>!s.has(j(h))&&s.set(j(h),h))};return a.forEach(l),o.forEach(l),t}}var x6=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function E6(r,t){const{getNodeData:e=(o,l)=>{if(o.depth=l,!o.children)return o;const{children:u}=o,c=x6(o,["children"]);return Object.assign(Object.assign({},c),{children:u.map(d=>d.id)})},getEdgeData:n=(o,l)=>({source:o.id,target:l.id}),getChildren:i=o=>o.children||[]}=t||{},a=[],s=[];return ji(r,(o,l)=>{a.push(e(o,l));const u=i(o);for(const c of u)s.push(n(o,c))},o=>i(o),"TB"),{nodes:a,edges:s}}var w6=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(r,t||[])).next())})};class Uc extends Bh{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const t=this.context.model.getRootsData();if(!((0,xr.Z)(t)||t.length>2))return t[0]}formatSize(t){const e=typeof t=="function"?t:()=>t;return n=>Mn(e(n))}doLayout(t,e){const{hGap:n,getRibSep:i,vGap:a,nodeSize:s,height:o}=e,{model:l}=this.context,u=this.formatSize(s);let c=u(t)[0]+i(t);const d=(b,_=0)=>{var w;return _+=n*((b.children||[]).length+1),(w=b.children)===null||w===void 0||w.forEach(x=>{var E;(E=l.getNodeLikeDatum(x).children)===null||E===void 0||E.forEach(O=>{const P=l.getNodeLikeDatum(O);_=d(P,_)})}),_},h=b=>{if(b.depth===1)return c;const _=l.getParentData(b.id,"tree");if(us(b)){const w=l.getParentData(_.id,"tree"),x=g(b)-g(w);return h(_)+x*n/a}else{const w=(_.children||[]).indexOf(b.id),x=l.getNodeData((_.children||[]).slice(w));return f(_)-x.reduce((E,k)=>E+d(k),0)-u(_)[0]/2}},f=(0,rf.Z)(b=>{if(Tv(b))return u(b)[0]/2;const _=l.getParentData(b.id,"tree");if(us(b))return h(b)+d(b)+u(b)[0]/2;{const w=g(b)-g(_),x=n/a;return h(b)+w*x}},b=>b.id),v=b=>g(l.getParentData(b,"tree")),g=(0,rf.Z)(b=>{if(Tv(b))return o/2;if(us(b)){const _=l.getParentData(b.id,"tree"),w=_.children.indexOf(b.id);if(w===0)return v(_.id)+a;const x=l.getNodeLikeDatum(_.children[w-1]);if((0,xr.Z)(x.children))return g(x)+a;const E=l.getDescendantsData(x.id);return Math.max(...E.map(k=>us(k)?v(k.id):g(k)))+a}else{if((0,xr.Z)(b.children))return v(b.id)+a;const _=l.getNodeLikeDatum(b.children.slice(-1)[0]);if((0,xr.Z)(_.children))return g(_)+a;const w=l.getDescendantsData(b.id).slice(-1)[0];return(us(w)?v(w.id):g(w))+a}},b=>b.id);let p=0;const m={nodes:[],edges:[]},y=b=>{var _;(_=b.children)===null||_===void 0||_.forEach(O=>y(l.getNodeLikeDatum(O)));const w=g(b),x=f(b);if(m.nodes.push({id:b.id,x,y:w}),Tv(b))return;const E=l.getRelatedEdgesData(b.id,"in")[0],k=[h(b),us(b)?w:v(b.id)];m.edges.push({id:j(E),controlPoints:[k],relatedNodeId:b.id}),p=Math.max(p,x+i(b)),b.depth===1&&(c=p)};return y(t),m}placeAlterative(t,e){const n=(e.children||[]).filter((o,l)=>l%2!==0);if(n.length===0)return t;const{model:i}=this.context,a=t.nodes.find(o=>o.id===e.id).y,s=o=>{const l=i.getAncestorsData(o,"tree");if((0,xr.Z)(l))return!1;const u=l.length===1?o:l[l.length-2].id;return n.includes(u)};t.nodes.forEach(o=>{s(o.id)&&(o.y=2*a-o.y)}),t.edges.forEach(o=>{s(o.relatedNodeId)&&(o.controlPoints=o.controlPoints.map(l=>[l[0],2*a-l[1]]))})}rightToLeft(t,e){return t.nodes.forEach(n=>n.x=e.width-n.x),t.edges.forEach(n=>{n.controlPoints=n.controlPoints.map(i=>[e.width-i[0],i[1]])}),t}execute(t,e){return w6(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},Uc.defaultOptions),this.options),e),{direction:i,nodeSize:a}=n,s=this.getRoot();if(!s)return t;const o=this.formatSize(a);n.vGap||(n.vGap=Math.max(...(t.nodes||[]).map(h=>o(h)[1]))),n.hGap||(n.hGap=Math.max(...(t.nodes||[]).map(h=>o(h)[0])));let l=this.doLayout(s,n);this.placeAlterative(l,s),i==="RL"&&(l=this.rightToLeft(l,n));const{model:u}=this.context,c=[],d=[];return l.nodes.forEach(h=>{const{id:f,x:v,y:g}=h,p=u.getNodeLikeDatum(f);c.push(Cx(p,{x:v,y:g}))}),l.edges.forEach(h=>{const{id:f,controlPoints:v}=h,g=u.getEdgeDatum(f);d.push(Cx(g,{controlPoints:v}))}),{nodes:c,edges:d}})}}Uc.defaultOptions={direction:"RL",getRibSep:()=>60};const Cx=(r,t)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),t)}),Tv=r=>r.depth===0,us=r=>(r.depth||(r.depth=0))%2===0,k6=["rgb(158, 1, 66)","rgb(213, 62, 79)","rgb(244, 109, 67)","rgb(253, 174, 97)","rgb(254, 224, 139)","rgb(255, 255, 191)","rgb(230, 245, 152)","rgb(171, 221, 164)","rgb(102, 194, 165)","rgb(50, 136, 189)","rgb(94, 79, 162)"],_6=["rgb(78, 121, 167)","rgb(242, 142, 44)","rgb(225, 87, 89)","rgb(118, 183, 178)","rgb(89, 161, 79)","rgb(237, 201, 73)","rgb(175, 122, 161)","rgb(255, 157, 167)","rgb(156, 117, 95)","rgb(186, 176, 171)"],S6=["rgb(255, 245, 235)","rgb(254, 230, 206)","rgb(253, 208, 162)","rgb(253, 174, 107)","rgb(253, 141, 60)","rgb(241, 105, 19)","rgb(217, 72, 1)","rgb(166, 54, 3)","rgb(127, 39, 4)"],T6=["rgb(247, 252, 245)","rgb(229, 245, 224)","rgb(199, 233, 192)","rgb(161, 217, 155)","rgb(116, 196, 118)","rgb(65, 171, 93)","rgb(35, 139, 69)","rgb(0, 109, 44)","rgb(0, 68, 27)"],A6=["rgb(247, 251, 255)","rgb(222, 235, 247)","rgb(198, 219, 239)","rgb(158, 202, 225)","rgb(107, 174, 214)","rgb(66, 146, 198)","rgb(33, 113, 181)","rgb(8, 81, 156)","rgb(8, 48, 107)"],C6=["#7E92B5","#F4664A","#FFBE3A"],O6={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},P6={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function Ox(r){const{bgColor:t,textColor:e,nodeColor:n,nodeColorDisabled:i,nodeStroke:a,nodeHaloStrokeOpacityActive:s=.15,nodeHaloStrokeOpacitySelected:o=.25,nodeOpacityDisabled:l=.06,nodeIconOpacityInactive:u=.85,nodeOpacityInactive:c=.25,nodeBadgePalette:d=C6,nodePaletteOptions:h=O6,edgeColor:f,edgeColorDisabled:v,edgePaletteOptions:g=P6,comboColor:p,comboColorDisabled:m,comboStroke:y,comboStrokeDisabled:b,edgeColorInactive:_}=r;return{background:t,node:{palette:h,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:d,fill:n,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:e,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:n,portLineWidth:1,portStroke:a,portStrokeOpacity:.65,size:32,stroke:a,strokeOpacity:1,zIndex:2},state:{selected:{halo:!0,haloLineWidth:24,haloStrokeOpacity:o,labelFontSize:12,labelFontWeight:"bold",lineWidth:4,stroke:a},active:{halo:!0,haloLineWidth:12,haloStrokeOpacity:s},highlight:{labelFontWeight:"bold",lineWidth:4,stroke:a,strokeOpacity:.85},inactive:{badgeBackgroundOpacity:c,donutOpacity:c,fillOpacity:c,iconOpacity:u,labelFill:e,labelFillOpacity:c,strokeOpacity:c},disabled:{badgeBackgroundOpacity:.25,donutOpacity:l,fill:i,fillOpacity:l,iconFill:i,iconOpacity:.25,labelFill:e,labelFillOpacity:.25,strokeOpacity:l}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"node-expand",collapse:"node-collapse",update:[{fields:["x","y","fill","stroke"]}],translate:[{fields:["x","y"]}]}},edge:{palette:g,style:{badgeBackgroundFill:f,badgeFill:"#fff",badgeFontSize:8,badgeOffsetX:10,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelPlacement:"center",labelTextBaseline:"middle",lineWidth:1,stroke:f,strokeOpacity:1,zIndex:1},state:{selected:{halo:!0,haloStrokeOpacity:.25,labelFontSize:14,labelFontWeight:"bold",lineWidth:3},active:{halo:!0,haloStrokeOpacity:.15},highlight:{labelFontWeight:"bold",lineWidth:3},inactive:{stroke:_,fillOpacity:.08,labelOpacity:.25,strokeOpacity:.08,badgeBackgroundOpacity:.25},disabled:{stroke:v,fillOpacity:.45,strokeOpacity:.45,labelOpacity:.25,badgeBackgroundOpacity:.45}},animation:{enter:"fade",exit:"fade",expand:"path-in",collapse:"path-out",show:"fade",hide:"fade",update:[{fields:["sourceNode","targetNode"]},{fields:["stroke"],shape:"key"}],translate:[{fields:["sourceNode","targetNode"]}]}},combo:{style:{collapsedMarkerFill:t,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:p,halo:!1,haloLineWidth:12,haloStroke:y,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:y},state:{selected:{halo:!0,labelFontSize:14,labelFontWeight:700,lineWidth:4},active:{halo:!0},highlight:{labelFontWeight:700,lineWidth:4},inactive:{fillOpacity:.65,labelOpacity:.25,strokeOpacity:.65},disabled:{fill:m,fillOpacity:.25,labelOpacity:.25,stroke:b,strokeOpacity:.25}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"combo-expand",collapse:"combo-collapse",update:[{fields:["x","y"]},{fields:["fill","stroke","lineWidth"],shape:"key"}],translate:[{fields:["x","y"]}]}}}}const N6=Ox({bgColor:"#000000",comboColor:"#fdfdfd",comboColorDisabled:"#d0e4ff",comboStroke:"#99add1",comboStrokeDisabled:"#969696",edgeColor:"#637088",edgeColorDisabled:"#637088",edgeColorInactive:"#D0E4FF",edgePaletteOptions:{type:"group",color:["#637088","#0F55A6","#008383","#9C5D38","#8B53A6","#4E40A6","#8F6608","#3E801D","#A65383","#175E75","#0F8248"]},nodeColor:"#1783ff",nodeColorDisabled:"#D0E4FF",nodeHaloStrokeOpacityActive:.25,nodeHaloStrokeOpacitySelected:.45,nodeIconOpacityInactive:.45,nodeOpacityDisabled:.25,nodeOpacityInactive:.45,nodeStroke:"#d0e4ff",textColor:"#ffffff"}),M6=Ox({bgColor:"#ffffff",comboColor:"#99ADD1",comboColorDisabled:"#f0f0f0",comboStroke:"#99add1",comboStrokeDisabled:"#d9d9d9",edgeColor:"#99add1",edgeColorDisabled:"#d9d9d9",edgeColorInactive:"#1B324F",nodeColor:"#1783ff",nodeColorDisabled:"#1B324F",nodeHaloStrokeOpacityActive:.15,nodeHaloStrokeOpacitySelected:.25,nodeIconOpacityInactive:.85,nodeOpacityDisabled:.06,nodeOpacityInactive:.25,nodeStroke:"#000000",textColor:"#000000"}),R6={animation:{"combo-collapse":Ap,"combo-expand":xS,"node-collapse":Sp,"node-expand":yS,"path-in":Tp,"path-out":bS,fade:pS,translate:mS},behavior:{"brush-select":Rs,"click-select":Ll,"collapse-expand":fu,"create-edge":pu,"drag-canvas":mu,"drag-element-force":KA,"drag-element":Ys,"fix-element-size":bu,"focus-element":xu,"hover-activate":Eu,"lasso-select":qA,"auto-adapt-label":Cl,"optimize-viewport-transform":wu,"scroll-canvas":ku,"zoom-canvas":_u},combo:{circle:J2,rect:Q2},edge:{cubic:Hi,line:uu,polyline:cu,quadratic:du,"cubic-horizontal":su,"cubic-radial":ou,"cubic-vertical":lu},layout:{"antv-dagre":FO,"combo-combined":lP,"compact-box":Su.compactBox,"d3-force":mP,"force-atlas2":xP,circular:jO,concentric:$h,dagre:Au,dendrogram:Su.dendrogram,fishbone:Uc,force:iy,fruchterman:kP,grid:SP,indented:Su.indented,mds:cy,mindmap:Su.mindmap,radial:LP,random:jP},node:{circle:Wi,diamond:hT,ellipse:zl,hexagon:mT,html:tu,image:nu,rect:$2,star:q2,donut:Bl,triangle:ru},palette:{spectral:k6,tableau:_6,oranges:S6,greens:T6,blues:A6},theme:{dark:N6,light:M6},plugin:{"bubble-sets":Nu,"edge-bundling":Ru,"edge-filter-lens":Lu,"grid-line":Bu,background:Pu,contextmenu:Mu,fisheye:Du,fullscreen:Iu,history:Fu,hull:zu,legend:wc,minimap:kc,snapline:_c,timebar:Mc,toolbar:Rc,tooltip:Lc,watermark:Dc},transform:{"arrange-draw-order":u6,"collapse-expand-combo":c6,"collapse-expand-node":d6,"get-edge-actual-ends":h6,"map-node-size":Zc,"place-radial-labels":Vc,"process-parallel-edges":Hc,"update-related-edges":b6},shape:{circle:_a,ellipse:nl,group:Sa,html:rl,image:uh,line:ks,path:Pr,polygon:Ta,polyline:Rd,rect:Un,text:Aa,label:ui,badge:Ra}};function L6(){Object.entries(R6).forEach(([r,t])=>{Object.entries(t).forEach(([e,n])=>{WB(r,e,n)})})}U.enableMassiveParsedStyleAssignOptimization=!0,L6();const x5={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"}},62309:function(on,Yc,Y){var Cr=Y(67294),lr=Y(50976),Xc=Y(43085),Kc=Y.n(Xc),ke=Object.defineProperty,Po=Object.defineProperties,De=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,oa=(be,ut,rt)=>ut in be?ke(be,ut,{enumerable:!0,configurable:!0,writable:!0,value:rt}):be[ut]=rt,cs=(be,ut)=>{for(var rt in ut||(ut={}))No.call(ut,rt)&&oa(be,rt,ut[rt]);if(ae)for(var rt of ae(ut))se.call(ut,rt)&&oa(be,rt,ut[rt]);return be},$c=(be,ut)=>Po(be,De(ut));function ds(be,ut,rt=1/3,ur){let _e=be*Math.PI*2,Lt=ut*Math.PI*2;return{u:{min:-Math.PI,max:Math.PI*3,step:Math.PI/32},v:{min:0,max:Math.PI*2,step:Math.PI/20},x:function(ye,wt){return ye<_e?Math.cos(_e)*(1+Math.cos(wt)*rt):ye>Lt?Math.cos(Lt)*(1+Math.cos(wt)*rt):Math.cos(ye)*(1+Math.cos(wt)*rt)},y:function(ye,wt){return ye<_e?Math.sin(_e)*(1+Math.cos(wt)*rt):ye>Lt?Math.sin(Lt)*(1+Math.cos(wt)*rt):Math.sin(ye)*(1+Math.cos(wt)*rt)},z:function(ye,wt){return ye<-Math.PI*.5?Math.sin(ye):ye>Math.PI*2.5?Math.sin(ye)*ur*.1:Math.sin(wt)>0?1*ur*.1:-1}}}function qc({pieData:be=[],internalDiameterRatio:ut=1/3}){var rt,ur,_e,Lt;const ye=[],wt=be==null?void 0:be.reduce((R,ge)=>(R||0)+((ge==null?void 0:ge.value)||0),0);let Kr=0,Si=0;const Pe=[];for(let R=0;R<(be==null?void 0:be.length);R++){Si=Kr+(wt==0?1:((rt=be==null?void 0:be[R])==null?void 0:rt.value)||0);const ge={itemStyle:((ur=be==null?void 0:be[R])==null?void 0:ur.itemStyle)||{},name:((_e=be==null?void 0:be[R])==null?void 0:_e.name)||`name${R}`,type:"surface",parametric:!0,parametricEquation:ds(Kr/(wt||(be==null?void 0:be.length)),Si/(wt||(be==null?void 0:be.length)),ut,((Lt=be==null?void 0:be[R])==null?void 0:Lt.value)||(wt==0?25:0)),wireframe:{show:!1},pieData:be==null?void 0:be[R]};Pe.push(ge.name),ye.push(ge),Kr=Si}return ye.push({name:"pie2d",type:"pie",showEmptyCircle:!0,label:{show:!0,formatter:R=>`${R.value}
|
|
|
|
${R.name}`},startAngle:-35,radius:["49%","50%"],center:["50%","40%"],data:[...be||[]].reverse(),itemStyle:{opacity:0}}),{legend:{left:"50%",top:"center",textStyle:{fontSize:12},data:Pe},xAxis3D:{},yAxis3D:{},zAxis3D:{},grid3D:{viewControl:{alpha:45,rotateSensitivity:0,zoomSensitivity:0,panSensitivity:0,autoRotate:!1},left:"center",top:"-10%",show:!1,boxHeight:25},series:ye}}const Qe=({dataSource:be=[{name:"\u638C\u63E1\u738780%~100%",value:0,itemStyle:{color:"rgb(223,209,38)"}},{name:"\u638C\u63D0\u738760%~79%",value:0,itemStyle:{color:"rgb(6,234,230)"}},{name:"\u638C\u63A8\u738759%\u4EE5\u4E0B",value:0,itemStyle:{color:"rgb(6,110,247)"}}],className:ut="",style:rt={},legend:ur={},internalDiameterRatio:_e=1/3})=>{const[Lt,ye]=(0,Cr.useState)([]),wt=(0,Cr.useCallback)(Pe=>{const cr=Pe.selected||{},R=be.map(ge=>ge.name).filter(ge=>cr[ge]===!1);ye(R)},[be]),Kr=(0,Cr.useMemo)(()=>be.filter(Pe=>!Lt.includes(Pe.name)),[be,Lt]),Si=(0,Cr.useMemo)(()=>{const Pe=qc({pieData:Kr,internalDiameterRatio:_e}),cr=be.map(ge=>ge.name),R=be.reduce((ge,G)=>(ge[G.name]=!Lt.includes(G.name),ge),{});return Pe.legend=$c(cs(cs({},Pe.legend),ur),{data:cr,selected:R}),Pe},[Kr,ur,_e,be,Lt]);return Cr.createElement(lr.Z,{onEvents:{legendselectchanged:wt},className:`w-full h-full ${ut}`,option:Si,style:cs({height:"100%"},rt)})};Yc.Z=Qe},99755:function(on){on.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABSCAYAAADKMvPcAAAAAXNSR0IArs4c6QAAFkdJREFUeF7NXXlsHNd5/2Z3Z3e5S3J5LClREklJlGxZtmzJUVo0boEICdI2BYICrQQ0PaJaV2JZSOO6NtC/+EfbFC36T902QBpFllxbDYXayFH1MArXQRugKIIojmQ7kSlKpMX7Wh6z3B3uvuJ7b76ZNzNvDl6ulqZI7szOfO/3ft/93lgDz+vP2ZuFHsh37YSOhkZIJ7zHN+NvHQAMMKEOrD4O8+YirCw0wNj9E9qJ2lqv389YoqP8/Z3bkoXmgpZPt+q6loa0Rtcxwy4YcBDl87/wXRMqwOr3K/OVCbN8/1zb0ZL3PPvGjDHtCvzX/r3Q1WQAfpmA9xP/bu4LRdOtrxzogN8MUuxOZXyxmimP/L52bCXqjv1sIN0De3b1mvkWTU9rhomSkrRRUqshs+8pDdk5E+UE0HUdCpDjv9+oTc3+XsMTQ7KsHFAE8zL898ECNGenoQQlG1BZyKghxjsuBEQ4gQOJoqGA+F3Ed0yAH+oj989rx8aDrvg37H/aHzGbesu6ppVMw5ZXkECgYWOi5EMEoNIFhKQosZA6ZwGKsnbpObhZG536QsPRYZKVA/rX7D/62iHfMgYlwG8EFL8/CoaK2dahCAUOaJf1832YmD+pPTXoBfVvjbe7e1OtndNgAH1zAkgMVWIYqGhRbBWQyoCinEU9Bz1QgHZoYO/lpn9yTjvK76D1s+/mdkPLI8NQgmGYBsFQ0+IozfRmqr0koCkU32aoLgDtgSL/OVKdXP585hPvE6hfK7+1e3uyvR1lxYnnspqmzVBOLElU+lUJGT8YBqb7mA2oJS+yEwHt04tQWl1c+O3Ckdsc0L9g1/tqUG8ZhGkOqGCnV3U2D1BSIT4cDigOC1VeAItAclB1AeoNY2TsxfxnRr86/73Wnlxx7xgYXE78KdQdJ9/kSMpSqsG0QPINxwMsHhc+yAU6gYqyFnUEU3x3QzP75dy+H2maxrQ/Zf/y+ATM6ggoqbsDZzy7uK6zLDDJopJzEmovwMTvJkixm0sjg9sbO/YsQjXJzZKJ7HQmnkMp/pNefoYhe2UnEyi3Gcxcbke5iUIbKgA9oBdhyJj52Ysdv7io/XH1n568q89qpO7k3dcFUpwP2aP2Dk14UbSo3EZZgCJrESqUC0EkMPFvLmsMp8PJZoEpyBcAWEwzQHKi2vdBkQNaSlTvPd98dFr7QzbwsfdhzGancEVb+FIA6iiWmP2cqUNBF8Di3wgBykUenUwSv1QMQPGcWMzEs2I4Lx6hmKj2OejRC3BIL0K+3lA53fbETe08e+XJ2zChOer+UYAZ7BBIpdC+oq0iNuE4bVZScLRmMEMcURx2WrYVQzuUiwBFtd9RbxaAnmXffPI2zHJARTi/Ra8AZvqGaNkvglJWTwrj7EtFORfu+Gg8ER49dODSZ63zUHMKus7tPKp8MZmtfLnt4ze1U+zykTswldhSQF3CKpwF2TVuEGXl9IOgtpkK5ln3JGcdaDdD1dy6rsvrSzEp6NwxHdALsCvbtvJs0+Fb2in2jSN3YH7rAF0jM4P1Iyjk8Yc29rREsjPMZkrX9U2OlTVZgKLK70w0rjzX/nO3tDPs0uEPYIaHI5uu8hFg0mHOnjgqF8Nh8AmJ64RCwiMxsX5VlxmPNp57er3oAHqyeunwPX2LALW9sNvHuhSb/xEEqCLgDok1bQgiHQyCHpFyEpghpkMAKmJRm6FPs4tPDMFcatMZGoOdwmHETP/W7NHX64TCWOl2cP8PgPoH5aiMZPCVhtM/MPdpfvZuPNZ0201ZVqFV7jtglCxUXmLoaXb58UGY0jeVoQp2knBC5Cib6XcI8cCMUOO4GuHRBnFVf3SiBrTy948PpkubA2iEV3XNbxwn5MuEFIC5HFCECQm1m/4owg+hM608W+J1hxz05SSGnmWXDt2GmXQchgbPf1hIExwj+jU9Ss39IZK3IqSyHsEaEcfpuWNjOYrI8XKj5eUzTSvPtR++pZ2sXDp0L60GlG4nV6194YSPRWr1sAdqMVMmKP1uvxfDAZFDQxm9KqlSUQJCKb93FmzT4JQEXSJZWqEE9BS78tgdmMx4GSoEFV+5atLMpFMzddBW8d6NSieCb+YDj8Cy/9ASANShqtVqtUYjBQUhtKqC5Fc+ki1T1eq5ZOO0vlqr8o+jCPxeIbJYotCp3jP5x/GfPMCyUWkwNdZW1WqanKVRO8TH0FOVbzx2Jz3vApTAxHy10dTrVX3bzR9q50KtXjCS8Y583Pir7pVqtdNQNgbd3hULJ9jbQRvWZiZ+9p2OU4vx7rK+sz7509eK5SzrdcqFpiCaHNiTyp9hLz/6AUxnZYaSwRWNs6zxz9pX3lufKPE/9bmpi00TubmHsKWBMyf+VYRdJgCqGsaAbSxf/07rF34U/y7rO7Of9SfeHj54hPfZrEK2wEjKlGxAKy8/ei8tAKXGHFXPsZKyHVrqZWi+dU07IVRqi16fW764YxYqXVjzVBW5KezCOiSykxp6zbXG2y+1f3Zhi8Tilz07+2bh/uLSPixwi2agmGoBqJUpEaDn2DcPDsFsgxdQwU5smGEronk1CdkZHUxTh5Tdyw8eBNa0Q17cSCFsGbacX4aFFS03Xy+13odFbToAUMrPHVWzZGON9Tqk5nS9oaxDWYtjO72S2bYU7U0O7SaAmauz5WWAWm0xs5hibaPl5ST2sdyASoE9AXqaXXlkGCZzKoYKQIsWqKLNKyzHWl7q2BHnWW5r2J3MmIBikwwdgmjmWdV93SlI+yRcgwfAU0WHwIQx04BhE/tYom29LkBlGyqaZYKt6AQIToV1i6gYuYfoCC0E5W1hC0xZ5bmqe6pHvLhr9capj4/FXvqiOyknPkbFSkw2gMFBFKCibMK+yyqvYOhZdunAXZjJywyVvTyt6PDBSYZEEjAss/AyRhh37KmLvjr110lgb0zqzqOFnvDWM3dQwkl5c233PaOCeOds4RQRUEs+q12NMlNPA69Gk8pzea1p5bkuEdgfGE27AcVLC1sl0ita3ZExswwrbdyeBZbcQvghgU+evGLWNEMX6kVmAK/AT7WZqY5Dian4M6MnGYc0Iv1VG6u0eFtyuyZUOUsrqzWN1F9ur7vDJgnQp9nFhz+EuUZvkw6FxC8EMw/J+XYwRq5p/Zvu6XFd1a8sXGydqRu9Fa2acHW1AsAh1UZWZrWM0VrO3r3WfaK8Fsse99zjkwONE4uwp8LMtB0jW006NDPYqHMx9Ay7/NA9mGpSqTyC2W5ma0/pf/ROv6bV4wqxnvOemnppR1mvd4ng2Un5VL0gco1c1Yu5d69pWwMmjePXh95oma6ZfRTY22ETb9JZxREnsPcD6qziKEAnFIxvaWc+ksB+Vq88JBZ+kdKrXB/ZzxxsSzXW/7H1Nz+SwP4Hw08cQbMke3nOUAKUbOg5dmn/ECw0j/F1TcJKcNtkiqUmPdBhfk37/DvrYd1aPnO8NNBWYqU9TmgSkCmRh+chUwG2FfI/7teO8RrDVr0u3L6eGUnXHyNPT/dRAnpy5dL+0Ywf0KJZEC1S6IIE1Ef/TPuNsa0SGO3omaVvHRirreRwqU3YciC+AMJapYe2qwFS83/S8infssfNlPXZ8bf3TFQW25zQSVxdLBpDlS/CTi0rvPwp9sq+cZgtiJV3FkNNEYZgUI9rdzB4zkCqnKhoq5lMGjJKadXvuk6tAOCHK/gTKrgknC1ABeZWzYYJbVEXAXQIoLYzcOqQyNJmlqqa9VQFJcikQ+SI5VLR41dhoVKBMmOsnNTSU5XFLAX3aI7IwtNyIV5gJkDPspf77kOpxQbUFCovqtEivaOlhRQ+BS8aCFpr5J8BVGgeg2ImgmtTEUwpuPd/QrRNeNJh2S6eFqNZ0gt2aBdYC42gLFlrCizQVoqgXmRJ7uBeyOGKQ9MWQ8+uvNx3P1NqwQFRcYQSf8rnaTUcBc+hgAYKLjkYa5YpsEdVotXIOBDlgiCr6EtJh2CHtfJZFxmcCPW8r7UlyrQskk+4FdBz+SyHROZIhJRC5Q/kCtBJDP0Se3XvMEy3IkvwAuQKKHB1gmchdHQ13BlQGPA8sLfA44EzpnuujQcSMJ5ekCvp4HVRAtMrXQCYvvTTfR7JJuf0fKGavVRIoOQsdChAJzH0NLuyZwzm2mSG4lCICQSs/XdgoytYeCq94bXksVC2RHGncqGvxUyZdwQbTbA3i49nksKZS3VPOxW267TutU2coXoAoGI7jXiR0DKwtIxPrdVulQ42WfJARLuDcmf/ZpjgdjNl7k4G74XRuo+iGCImWAG7JzXGMcjAyrqHQvPVd1am1JnGXP7RW9oX2dXdIzDZ7rWh1NYX+bEOmWRiKccS1Xolqh7q97Led4SXB0hkdFYGU6vVodGsmbqLoQpm0oAICmJoBjJG3VytZALiD/fkZn1zzd+xZKINUsm0zmpVUyuvmrmalsgQ0fiHJefoA/Q8e7X3LpSKY6YIm9BWyNUmtJwNK3DvP5ufn45wlOs+/Mm3+lPLB4oPr6RqWTIDYWuPZPuey2Qm/739t0bWffOID2KMfOzda33lhGgiykUbjDZ8gJ4qv9o7niwV5UxJ7MsQhZF2lqlez1z4yVYJTNf91MLl9qXK8m5h/MMMhuOEeMG7C25cW8eWxrWM5/jIQMP0kn5Qlo3CNwJ0V7pp5VlU+bPscs+kudzBvbwVsNgxFhSgg2XLr2aefnctAqznXGzSLULSyuWDthYKZefhCuRge6q1frHzs1ufy/f3J278zi8csdszcl9e13m1ybahz7Cr3aPmXKcLUBP4PhwM7Luhtf5Lev2d9WxsXQuwJ5cGtk+VzZ28++rZcyQ7A6zR2gE1FKDM0j/9u85j2OLfsteF29ebx7XkfpF6ikyJmx1ebdL5Uhyboc8YV7tHU25AaRcG3ykGRWhmueW76buDX9+i3vyFmevNtVpl7z3NSPL9R1Y86kZIsJMCarE5rAA7k9kqtMIHz2mf2JJ6aP/QUHYpObpvtFrJYLZEsnkBtRl6mv3DrmlzYZsd2OtihxuygNJOBBXrfllIsbxVeCYzt8Y8hJwkD0cqepXNmGVtAsraoDltN8IowfCGKbaztOqQCCiuHkY7ljVTLM/7SmGveNJiXFzRdVaqGjC5Wk4MG6JRh9mSC1BsI+eEytsM/SIb2DlulrbzXN7OlNy7xbBIItJPquOj0PGECxoe9WfQblNnUbBTxMK+hQ7WDJIERe5hRQMRf6JdRRX0QRri4AJlk/pJqOY8lzesbZBeledxaM6xoc+yqzs+NJe6BKAiEnRUy9l2jbkzDYZDGbmk2iuuJ72z7KTcoPOnn/7A3snlnU23GGCvr84QHPxTqimah4KZos4gXtzLc4YKQG2GPr18dces7gZUfEB8UZ7sgBmiVpEg+0GlYgMVRew4NGDDAA2HPwyA5LPy+cBNhyFJAoEjsnNMjZGC4ifP5a2Jp5+kOTag6OWxOEKZ0tnlV7om9ZUdVDqTAxZyA2IdiOMUYu3YIIJGFSKsJW1i5t13tw2uRHZKiZ1Jp8mnk5xJc2oIqrKiwmSFpJ6OdE7iKnt5KWwa2D5llnZyo+uqlbsFo4WtfjE879hChdhYhV1zv+VWRfeVFBIoNGPjBRJhbny23Jpl0g5SeRvQL7PXto2ay7vCAI3aoMrnLKCH7jf8UevrreMWvYhljhsMmsAQR6mYZOUkKR2YLIFjIILDpqXXtpXSXkCl20WorD2M2MwMYq7/ni6VVUUVLtkCrhtgP51rh43Va0aEpaValeyUnGrT4uudM5mF7mETH48h1coDZ8vDOes8j4HwEzPCMXBBPfeMd82IEC4EUNtfB4ZW8pQ6YJL9VtrQC2ygY9w0ehBQ53ETqghNbT1jq3qcHRjC8tthCf2ptIeRE2QBrQDLNVGhYEoCWcyUV/QrAT3LvlucM2Z6qUlnczSOqtureaMcUMhxgk8JpId9bpKEJxdxVT3UbnoZGsOGnmevt88ZC7sH6XlNyv3TG2Bn3NhUGpi4W5hN3AQ1l8nnU0i6N82goyviVHmNvScOPb/wevtc0gLUWp/pvr7fq0baNrrAGsD0WysFoFGOz2awW0IZlvh2U3ZIXtUQRsgpMEup51dKA20TKWMPFkeo3ucA6g8uYj9ZJnT7odqzBjIzhvmxiBPIbN+1I22nzQrrFzdrAwH9Evtea8koYSs5EtD4+9AjVFKxdTpUK1zqGWav1abJvnYsx+hFWgbSY0P5pgWPyv8Be6Nl0jD6/IAGsTO+g1HFCrZt9NhMRy39Jsbt99VX9W5RVEIbGR4FEUFWeSkOlQrMdhz6InuzMGJM7iNA8aOqOYql6pGhjF/VQ+2xy2b6LaHDvGCNsFU9EMwwWxl0zLKhUj3UBvQCu968YMztxwIvX0ooEcB2FJsZHknqGw/MGOYjTkIQGB7JtlJ2jWHvSy0Qbz30Bfbtpglj6aFBqTjiunecHD0uMwOD7CA1lxmiUHXPff3WLqpu4NhEd5hGghLA8nnid+6UpHqozdAXpr7dNJFzAJUXanEB44Qqa3zMhd9fSmC5QA+z12GrSiRWhzJTBZwKZH88agPqdUrPTA40LufhYVR550GscZ8sE8UAtc2MdkBrY6baKMSVTRW8e4H2MzWw2vQ8+7f8lFE64AU0cntKXDW3WK6yTi41i83M4PaLzyYHslM+oFJrWTNUzlDKlKwWiK3y/eyt7JAx9ShVm2ing7ASIZ418rkh7rqmn3PrCI8CJtGR1LpmqEf3jssbEpGdk8/zT4DNUMspFSFdfr73yXc13Lo8ahw6fNuc1cSGAff6O2XUt0Z2ulVSYRfjslNx33is9NpFFYiyw/CC6bb63nooLmdsyqbnX9h2aJDvLD658NqB0fpynnbbBoTO4u24YEog+Rgk38DHpgBHpPDosqVT1VOd26jY5o0JvDrkBV3+21pwIS0WSzYnBvtbj8xzQH93/Ep+Lrv68BSs8Kduh2pMnPTNuoBbucKACok1Q6KM+OwM89xes+aeJifMcdMC/8LFtrjIYlcmV+rv/tgHeBd77/vxyUvbp9OrO90LDaRZ8zw5Uc1iqxQch3UbUHM//GGPenMzi1oYjkNUHZftqHukCCQPmaxtibu0bLUwXHmv/5jYK+V6mMDx2YHCXHWuZzFZS+NtnI6fNIsK+op+tqeCGQcwF/toiYV4k/+rUHNnimV++sOzULO1zoOcLjp/RgFfWNGebZ6Z+d+RkWsnnP9DhO/pDOikfry4p3VxFfIsUUuximmdE3MfkktY/2ph5Vis/UtGHdJstZbjk2mB7fWvYu2qsGGJVKKerIGhJeurfPVy5P+fYZ1ISh9r1JN10FLV1qbC3Nd3HHUtbPYxdOO32/gVfvX29cxKcmm3gcvEPY8col44bi3Pa5mpo3s//eFWb+pd64hiPD9krZfc+Pm4DPvXhl7vmanXinJHhq+q1nVIm9m7bzzy6ZmN32nzr/BAAorDRNPzg8HHDxqwmhGlQwFmkTXMX96/tXs7NwLzAwsoDur4rX9tMzKre2jFMIYpzT3dN1/S9lt7NjYy9K357AMNKP6/koaG3zpCgHYmM7W/3PXUja2BYnOu+kADikO8MPb9DnM5qWUSZS2Xblr96q6ffyBtJ03H/wHu5An4eGwyKAAAAABJRU5ErkJggg=="},92691:function(on){on.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABUCAYAAAB9czKDAAAAAXNSR0IArs4c6QAAD9VJREFUeF7tXWtsHFcVPrO7s4/Zlx9rx27IuiUkTeqEqk8VQYQqVYgfBYlSWS0tFQikAEKV2n8gEP7Bjz6iSK1KRalQW0RbCBIqlUBFqOIHCUIlTR8kbY1jx02J7cRO7F17Z707uzvo3MfszO7szJ19WdHuJI7t7J07957vnsc995wzErR46bouLbz7YjIg+aL+YCyglbb8LXbZ4dvDALAFAPjd/mr8CUAoKOuqulGRwaddVtWNfV/4zkYrA5aavfmTfx6N+IZ2p6PD10YBJAk0DfAP4Bd+6+Ald7Bv566rT5Zl/FkG0AuV7KWza2N/mjkvTU9XvA6tKQBmTj6X2jF+S1qTSpKmZgA0FTRQAUGwUL/DQDSerIlQbETtBU0GAoCsgCwrAHISCvk1bfT9K2ekqamyFxA8A3Dm77+Ije69ea+Wz0qaugqahl8q+aIA4OWB8tiUU6fmNisZvUxLrG1zoNC7zADISgrwq5RfV1MH7/lQ7Om0lWcAzp/944EASCE1swSaugQq4YAMaLWrn4+CExXHLYhLc4QhZGm43h37tFsEjcYry2y9IAcgJyRBVpIgJ8dBSY5DZmlufuLQD9ZEQfAEwEfHH48nxib3qpnzgF8GAETu14gfpxHUThjZmdxfT6bmwaADMNOxcV/s+USuuy8U0orpAOQEzgFyKg1ywL85cuM3ZzoCwNzJ59KBYGgkk5ljAKxS+W+IHjZpQlDRIYhIcufV7eVJrpxg6cydbZEfCAegGEqmIRDfWdl52/3viI7JEwfMv/fr6yv5tRgCoGWWQNVQ/FBK+wO+YiAQUIuaLIVCIdHnAxQAgDfHn/HC3/nPNj156L2mQ96xtx64WYrGKxQK4K8UQmVJD/O5oyKmAIyDktoH48PZ09Kehx1mUJ2UJwBmT/3yhlLuUoQDQBQvV0igrB164M/z4pS/elueevW+awKFrXHO/UQMoS4gAOyGnCzN7rnj4azIDD0B8MG/nzpQ2lgKqcgBxAKiqx9ZMCLH1m/92u/nRB56tbeZOfa9nRUtO6apKH4zKIQAFOQCCkBC8s8N3vnIusg8vQFw4skDpcJyiChhFeW/Rswxwn6RkcwtX372rMhDr/Y2Z197dJem50e1DNIAxTBZhSAnU6Ak0wCKPD9x6EdClpAnAGbfOjqZXVsIawiAhg9HY0ABRRkHX3Q0e9OXnpy92okrMv65v/0srRc2R1AP0o0oIQRZiMgBoMnzE3d3BIDHJvNri2GDA4j8TxL7NxIfy97wxZ/3BACL/3gsrWZyI7gQURR3HYBM5jyAmiG+HwpAGpTkjo39h6b/K7KCrvY2828emfCXMil11Q6ANICmdJ4DCOshAMQGToMS3rGx/64+AF0TQQgAcoDCAeghDlh888iE1pADuqQDKAeg8kclnAa55zhATamr1Bzvug6gfqDeBYByQD0ACprj3bKCDADQDE32FgdsHwDHH5vM56gZ2gcAOYB6hC0b0j4HdN7IrXIAmuNLxCVDPQLjgC7pzm3E+hxA0OUAaIwD+gB0ftFbnmAFgB7JGi7pPgd0Hg17DkBvaLLDVlBfBNmIoBoOQG8odMoZ1wegHoDMEjtEpu7oDivho5P53EKNGUq9ob20E7aIIDwTwJgoYAB0lgP6ANRbQTQwgRzIsIP5DoqgPgAGAHk1Rc4DajgAvQJa53RAH4A6DthOEUQDlHpUB2wnB5CYIHTDmo4ke04JbycA6IQi0QAMAIyH6W0AaFglj4rorA5YXwijB5AcRPQBoEqYW0EsLGUbAMDzgLGN/Xf9uCcO5RfffGYC8ldSxC1PlHA3OSC3ENZW0QVr5oBeA+DIBOTVKgA8LqgbHFDCnXAdAKgDdvUQB9gDoKArotP7gNI6uiKsHEDC8XpKBG0rABeoL4iHJpKwlHGQ470TF4S+IC6CIEODlI0Y2VSHd8IWDsCQSBYVHI6NqaFwdFkNxn1xiAMkyF9yZR0CtfWYphsefGrZGlc8Fql+xv43w9okYgr7rBqEzH9KlqN19/FO14DGzA6U6ttcYY0GSgXL/anBuL6Cn11agUpR1SV/YEd548qgcTbeLQA+Pn50Ul2v4QDmhCIeURKiOE6cUiQ5iKf8NDgjaZzR5XSo0mrSUpMHNpiGi7lwuOJRBPOwRAxQ6xYAs8ePTpY4AGwfwBPVSEwMIX6SxIvyHCo3UtpnhjVJpLrbvIPV6A6SC4HpWEhwND0xP4J8qTSzjYfpd1IEWTiAAMDsX5IvmwQgxGe5s2xQjqRkeWSEUURyylw4SqgPNqCmuI9wgUoDk9ETQBI0WJLK9gFAKM0SljFXBBOX6f81uuw/MZOkEV+YcnTtOie0sEGyJomQ3spG4QK+dVQsG5RxQ7U6AM2TIOcBXecAg1Y4VJZD6wIAmT/NaaCX7eo3wYTqBGSoyHK5DJCNyrES3lbQykaCSUj268Vy0Sdr/phWyYdoyQQRtrJfJgxq0wB5Ki0dMO262v/2AGDkBrusdiMP2Jkz7EhBICVlAWSIKvLZ3VN/qLGVrHdh8ZAPXvrGDT4tH+bJ48Yi56DzRdM8PtWH8j67zwG0RgTXA25q07s65IKC12RIwrAyMDM69eym27NmXvnWvkouF63mMJtWahtHTObEwewmACRHjIdlu1HDURu43UzSoNl5axJ8keFSJJZYiUnh3EZY9/n8IUlSg5LPvyXl8kUpoBf9uq+UrGxkY8Rby0zEWhnnvBhqlUJ9awtHcabmJQu6pwM4BzQmYrOrvtqjFQB66E0LY9AqJVTv8DIJxERE0xBtdQ6ASReIj8dZpDLfm3Xi3eeADgNAWJsrdWrmGiUBFNxncAC4LkQbHSu2sM0SL6PD9JQY8WutgupdtnqEQ0DWAStXQDgAOpMjxvcBZCeIZWpU+wIdlGytb7EMS4RkoiPBORBK/U6bb5QMO71av4isWDdpJ/C5E1+Q8RlmaIcAOHviqQOwuUoStXmSnpipV5WrvNiLwHyNJoYlxPUBFz2WBcsULatbZJTPqdsb2C+O1gCiC4TGhqbRPzY/IFiyxlOi9rm3nhgrr2XkcvFyRa8UdRVZvoUL17H4RVvjv3l/0H7ceYBIMKBjpJplZGSceCf/Lv7U2paNxiwFgpIUS0iR2A5JzUiru6YezYs8xRMAIh3223ijQB8Ab/Rqe+s+AG0nqbcO+wB4o1fbW/cBaDtJvXXoGYBzb70wlhz+9EgwFPZpuRzocqXh8Z+3odi0LuL/BV27cW/h2kXrDYJBgGIRSsXs5sBn7xauHOYJgMVTL08kd92cMmrkGO5YJ7eih01ZO72UgiT1MDrnHk2FXDfOv31x+I4H/ycyBGEAZv/128TI+Gf2UOKjz4VWS+Eu99Y2MiJDdZm/py48kJ2vrUZnF+SsAq+q01ALRPQLp5dPT05NER52uoQAQB/72swbB8v6lsyrRJEjObL9N69+syfRwyRtRtgWQM3eEGOYdFzN7MidCEkr6VJ/FSRToFW0zZHbplzrhwoBsHjypbQcHR6hsZAsMBfPQ0m9aPthuRPQvKTcW/OniLc0jcvl4KVV3xUZExdB3GOLEXLqeVeXhCsAs395OjRw7bWTWvaiVAUAD6X5YYzpeLEtMtzKOe0guHMf7k8Q42VWypgDkEpDQBnUojd/9T+SJDU0VFwBWHz/lX0AehTjYHg0sCF+LIu/3vtJptaGYz8ricTIYceXRj9ucr3u5uozHZ/OvbYsRhQdc6Gythr5/AMfNxJfjgAsnnwuJUd3TpDCRKReNK8SaFr9doPloRptdUu7qTOmCBs0sxDfrKpEunWsQV3DQdwrynKG5cSn9MzS0kfXfOWwreeyIQC6fsy/8kH0YGlrxc8BoCdO/EzcLvyDzoYopDaII3fh4K4ZCK1rIzCaAMAKr5P+wqopeDZAK+liAadyKLQ1fPu9Z+ywbgjApXde3iP55QQSv1702MkVk3XRBrHjvJ7NhG988GMhfgtj8iwCjVLGKYBUGpRUGvTs+oXYnd9ergXBFoC1d14YKIVHdhOxQ8QPFT28VnSdYGc0QGuCxEkSm7h5+S++8jlMDfQP10HmBSsocszN6O1edA97w4bBBWnQ46OVuVPLp289fNiyFOoAQJv/0unXD5aLazKpCMWKk5LzVv6OmJpJbB/h66lZt+qbXAj1atdd3FlAM5mlkKKFnHyafyNx6D5LGlcdAMTmDyZGSIFuYvlgSa4Gb8ggstW0Xltkc7FTZPeVaFhfTRK/ntTeeNK4n59jE12QpmGLamZ+4NADRl1pCwCzs0+HBjRm8xuih5ZjMcSOWdywNya1Y1cpNkUX4ruGO4rJn/qxiI2utndzTBMgCOP1ewMLAItv/24/QFnR8A0ZmAdGwq+pz8cq92ksjmHtiM3LwboW6cCZCHU2vllsi3RfF0DmZOm4d1jVG3gcjRYRC99PpaGoly8Pfu7+BezFAGD5xG9G/UNDu8w2P40ss5qvjmvQ1vfS2J5xFybuE3W1llh8UdVr6Px6lebWenWctgobxTRXyFjic2yXrsClGenGh3IEgDPHpoMjk7dPljYu+KjJycJOzFEPpGfBVWhHN04IYpkwWdHgxT31FogYEPatqmOuG715RyygvzyDY4TEMDeFiQsqodBW/PZ7zxAAVt47dj1IEKuufpb9zXZTEoAq++IZLSKVo2SW9N/tujr+9JxpZvgw8++Ck5aKJUnSKwmtXIqbE1kgieIoTfRBOZv/mALw4V9voXKfeztR7qPokUGqyOsHD7/WE68mEaStp2bLz3/3uoqqDhnyw7Q3qMQTBQLApXdfvSl/ZYGJH/ZaDnKHAnJo4PL++18kCqN/eafA8vM/vM6vbQ1ZXnjEnHX+wR0UgMUTz0xom+baB3T187yvYDixEvAN0LeGJpP0m/ex9MYdzFUmqVtSRS4kSmpmGI0ZHipv+IlSadgqRj8hAODu99wbP91b2Lgc47WQCQPwiF8eEs6jkquHcFclUd1NCbEtoe3k2SkhcdlnaLg8JnPTN46wjauSgkB8cHXw6z+hOoCCMO079/ransLmSoy6HXjjJGAKKs2ArKaferYI2gaV1UnQtm4FrCCRZ1FXCE1pJUQneQr4MzPnMbE9FL0y8NCRc9ifZSNGXs782vcnttTscNVu5q9s5d9rSe9g5omM2K2Ni6nY3oXQuDezV8P1mSSdlYOAx7aM+LIMvkj84vCDTxgRE7be0E+OPTK0CbmdoBWMkBsS/075wrodMCW+1R40Ge0tuQJ2uzXXKbUW3+9xdbe+pPhLratBCz5/IC/FlAtDU49bkgwbngdMT0/77tlzMRkJa1FtS7e8ppy+WzFM/haKNFWUv2+x4A9I+HORpZCStzaG+e8h9trI6gskeTs3RuCfN/c2SNHeWTvHt0BW30PpNpZg0F/WpNKWpqqZaw7/yvZE7P8Vipiu8V4ihQAAAABJRU5ErkJggg=="},46016:function(on){on.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAAAXNSR0IArs4c6QAAIABJREFUeF7tfXuwJFd53+/0Y3p65r53V8vu6slDKAghg4SE3kgCSwjjOCSlKuwKxIaUE7tC4nJRJtiFbxWOE5yKqxLsuMDBGMlAkHAcwBAS7AjbvFYsK7FiV4+VWImVFkm7e++dVz/Oo7/U1z09t6enZ6Z3JcgfydRu3ZmefpzzO7/v933nO48R+P+vWggcJfLC57FvEGCXA/i2Az828C2AKEHfBn545UV4TAhBfENR664/gZOOETV3DbASGCwqwqLvoZ0YNKSBIxzYQsKBDUoIyrKhJEHZAbSyEDVdbIaEzQtX0Mkr9mIU+b5j1GxbeJlN2J0YrCY2ElJIDIAk/Ze9yMCCA+EQQtPA/TdcIDb/rwFLRN5WhJfoBLsswk4Q2lqDwIXnsnLpkX4mrYfvAZicDAaCT3FESg4hDIQGSNjoJ4QNO8EzF52D588G6MPHaS3SuNh2sCfWIKWRCAuGy8fvidIGToHlolkCFv/3GnBAiJ5/Bf73TxRYIrIj4Fylcb6KcA5x4RhIg0TzewM2I1I2EhMBNkAMFtnpcQzBTi3NmAxQB4BkYAUsh48LWImBxYALCzqx8SxCnHjlefjRPJAfPE77jMErAaxECobBlBpGJUiMgpGERCRIlAJx40sbZBkI14GADdu14DRtuK0mvv8TAfZ5ooWGwiVWgr1Gwo6BxLZTBjA7UyZYNkykQQ6lhU6iFNEMUMXMzVg7ehkNoQWEw2gCgsEUTspcSySwLAcWg50I2CnoCZS28ITcgyeuFEIV73XgBO1EgsuExopUMIpgtIBOFEygkOgYxthIkgSJVClb0/9FKbA9WC0bTtNFo+3h9I8VWCJa6ir8vSTGPrApZSCmYNoEE+oM4CEDUhNjs2dmjABlc1egIhKRznwDA5qaI7NTQzTclMmWcCFS8zQZsA0LduLAshM4FrPOwpOnNY76Gg3LxattYHcOaGygKYGOE5hIwuRgMlOZoTmYatjQsQRZAsITEG4TdqsBz3cR/liAZf0MFF4jNc4zGsayoTXBEJsVYIhSMBPbQRKwWRESBi9MRTUrvGRGDNGUw2P8mQ+JTFdHJGZQNSBcF/xGRALCNrBcF4IS2JYLyxOwVZKBLACL9ZmZnfqeBCZMYLSEJgM9ICSxRGIlSLS1raWCWSvRtRrouAmCTY0FinEus5fBbdgpsI2VNuIXFVgiEp0YL1UGl7KFEqAVGzEDSjDMCtvJGMqsTEHM3qeaVQa0yFJV+DB6OwQ6Za+A0Gob9MSC5TpAEsOymb0WLKsBhslpZBLBoHIhWDMTEtB9CcOAMjuTITtTYgr0mg6ef8cV2BBCjKKBj/4t7bEMLuglGfhNC5bfgrvURvSiAXuCqOVHuBoJlhlQTdCkoROCDhUMV4CZmrKPgcwdQEGrcvCmATqUh4y2mfaOXmXgmUF8QqrDFizHBVLGssMj2Hl0kUYgFpJBkAGaWgq/mBkSGzvbeOZtV4pgXOGzT587RJec3MIOI6ClBDUaqdW4q8DGiwJsENA+beG1UsLmOJMIipmaAEbKzPRTL5qBm4I6BkoBpSo2ngmgIw0sPIBBZmfHrOb3+d/UQtgZ2SD+OwLPwcYS8Myd1wpWp6mvP/8OXddNYIUB1IBALgDfhbu0gKdfELBs+psSlwngpcxOxYBqaGJQKW3F2YBWmTczccxnD5lZg6U5jWc1GgObsrnwnNzDG3ZCDYgG4cl3XieenwXqVw/QctfC63shZF9BhTESvpaBXW7i0FkDy6B2Fa5OFHZHGZiK2cqAxir9zGY1Yug80y1WdMS6wpsz0du6DC8/hyWj5cD2mnB8G0//g9eKJ6eB+z8fp1d3etjTDRBHYRrKJZTAai9B/NPX41tnBex9RM4VEa6RCmsJQeagyiFLWU8LzmmmFk5l2RCduZJRxfBpllBu3ZJO58A6LlyOR1sOnr/jMny/3LFYJ7Ku+j7e1FEw3QHiWEPHBGoQ7MU2tn7pDeLIGQPLoL62jxsVYYEsSKmhpMyYmrBzOhMdnWH2JTUYk4cz1eGZ1lCgJLFXt2E1Xbg+B/pNNDwHp2+9GAeK4H7pIF1gHLyqFyDaCCCjYeTXdOD4Dh5+z7XizJwXm38vwvWxwiqDGkZQJoE0zNQM0GQYvoxZ0LxQqa7pvhiAVpA2syiV9vlFw4HdsmEza9tNuJ4Lr+ni+JsuEYf4NMbgS9/DG0MNdzNAPJCQLAN8bctD8s+uwXe4EWozNtXUEFdJjd2JhZhBTRKoFNRkGE6Vvf2c2LMuoMXzpknDGGCF+HZCrwtNXnaS6VfMWA+WTXCWm3AcN2Vtw7Pw6O2Xisf/1yO0N5K4vBtBdmLE7F/SDgLBbrVw4p9fk+lybWA3+nSZSXCRIkipIBnUKElDqyRRhfgv160z8OJ1HFve6xoDas4zpoFaBWjeYMw824JgcInBdeB4rLmcuTI4pAUuijT8QQgVKigpYBIB0UxgbZ7GgfU7hawN7GBAe3oGV5GGlGz6CWTMmsp96cxRbfehK5xObVAKCL8YZl/W6SqtnSYNbgLLZ+YCTtuB02jC4U4D96Olhu5oaGlgDMevMaxGC6f+5U3iaN6Ycxl74gS1nGW80cSAsRAHMjV/xaDGQ0dVLvDM0KiKZVMALVa6CPSE2XNkXhX7Fs2+gr4TDrKEsmtn4AqC7TRg2RYsNvuYe2gGJg5AnF3zBRz7Ihx47ytEXBvYjZBuiCWWJCGWCkpLqDhJdSWNUXPhn2XOdbX0x8HS1OxLwFcyuVSB/BwGl8MwDv6TLAcMxfnjYXaLv1tZxMavXC8eLbTjbI3dDOnCQOEyoxAzW+MgTadpk4VVo+zTNIa+mIDWarhizSpCuWlmP4/tNneJLQh7mK5k82ddZbAXbVi2xMH33rHN1pkae/gwNdbOxa2cb45DSC0QG5mFVZwBmrCskieeyuQqsy+BMNPsy+CVPtfV0XKjTwW98AU7tfyja8FqO7DdFp59303iWLkYUzX2mU16LWnsjQWiiGO1JJUAkwxBrdPFnMWyMwW+CrB5GlkFVhWgdUAtnsMAew7sBVeZi7bcB+68Mx1+G3tVAstDKeEmbuawClYKrIolDCeEixFAbW8/rYtZPl7h2MrPmArWHOdVF9D55ynOnAuvCXvVAf3aLVmHoBawT27R6yDxkjhBrGPEQ7YmHAWMJKBG8F9mWRVLp5r98EGVma5CLYr3nJCnGefVcWDTmMwObdFR9oLnNnwnPParN7WOzwWWw6ukiZs5+A0lYm0goyRja3pxWUurWFbQzLEK1NThOmZfRyPr6m25cfN7s8mbZDSgOYzpXLiJshZ92E1PNHZ4oPdc53y9zNoJKXh6ky6PFPZqBlUg7kloBpVkjeT0DCc0pskFKkzoZAWVzuacOo1TbnS+JmH9tEGxwWOWjYuRwOLMlUkUpXEbD//Yymo1XWvR042dbXhtzzn6C68TTxVZOwYs5wOePInbeCS1ZxArk/ayTBQP2VqMw6v642X2lj6XzXYsbq0b5NfR0jrnVOmGDYvNfMnBsffdJp5f/zKda2zsiwNFyrgJg8u3Tru8Duy1lnAWPXhtH9EvXeV+cyqwx0/RPqlweWQQSQ6vBtA9Zuv2+H6t8aZKyTgDllZ6+5LgTdXIOedNM3sGlP8v+Nj6jVuyYJ/zrt5X1BVBAqsbuQnHrxlzgaYLu+kIe7WNxkoTzRU4f1scyhlj7A9O0VWxxGpoEIVRxladpEPWLwzQCm0+I/2ry8Ap0ccEOUuWlIdPyz70+TfjwTt52sfw9R/+hs4bDHB+SEr3wtTXpKxt2LBaTVgrlnBX2vCabfPUe65oPp5fNwKWE9jnP4uf7hvEWqYJbMnj64aHdqc4rDFyTEvVzZCMounU8dKV5/DBgoycKZMZVA72PUfbCTmH1+8Q3WK5PnqA3F4PV3f62mxpMjzizN/zdY0E1oIn3KUW3F0LjnrPNeIbE8A+eZL2DDR+SsWIujrtEGieWjMWt9Z1TjVDsZLVjuozK603xr45TK5yTmXg2fyb7OGBE+9/s/hhEdT8/Ue+SZds9vWO0wHpiFlrg7iMzNrFFuwlT6ROTCjnW796s+jzdSPGPvEsXRZIcHowlhGkNtDRcCJC2WzHnE6hJNMko46HHoFcx+zrnFOy//FLhjRnc/Zgtdvo/8Z1ODJt0twf7KeLN3p6d7dPkuUgGoZgzFoOu1Y84bY8eEu+88REovvICboxSuCqAeRAQIZx5rQqh1WqmDtF3+YF+HW1tgr4s5aP3LOTshcWXaUsHFq/mWcpTb7uPkB7eqG+9NQA8ZYk1QtgpMk6SgyssGEtN4TDTuycVef0L18pHhoxloich57Gm8MY8UCnYZZmp8WzO6qEv1ihOsBP3GN4oI7J12VyOZSbKjNDQFhXFywlfMf9/vtuE4MqUD/+CC1aA31dL4DeGiA+HZEMojQXm+QYsBysNISz2ERjxYP69VuzsCuVAp5oqwivDw3iIIIMYmhtMpF+Mcy+qpK1gXjBZp9Blt0m6+dzz4klAL77+PrN4lQVqOv3kXPpMm7ajE2jE1DcjRFvBJROl8qlIGWtgfBbsHc0RWNt0XEH9+Fr6+siSYE9coIuCDReyRebADHPvONoYF6YVRlv1gGizjkVrVH5vNJ5U88Zao5ru1ajqSzPcp9bf8v0CRn3HFTXBEqs9RVJHuLu9iE3NaUykHZzh9EOy4Hvwt7ZEs6Kj+aq7xz8lRuGU+UPPkWvijlFGCGOAdmL07Gs0cVjplyKAUffzfPQVYI4OaIyGoousmg2WEVGjnNPpXfjbmh2B9ZDjj09z+399q14eJqzuufb8asiy37ZICK5lTIVqqMytqZxbKlADOxSU7hrbTTW2s4T/+oG8cOUsYeeoisijZWORjyIoHSUjmdNDBDO09tZujYvSz8k1BgydZzTVJkptTjnALgbutR25SWbOFSVQ+VL/vwI7QkG5vUDlUYAcktCbsWkBqyt0WhC9Fg5XRc26+xyG+45i+b4r93Q/EEK7LeO09VygHasU43VoRkydlqWanjbeR6/jo5WnTMTrCnRR3bNkKGFVuIjaSfAhrXaBCVN96H1m0VUpav3HKYFE5qb+hq0EVDcZ1AlKXZYDGye6SoTzHMyB7bURGN11fnRB24Qj6XA3v8MXRv04HVCyFhDKTO9G1sn8Vw1gDcVrHkSUqEJU5lcApRlwLZUCuqyD8Bzj6wPA/gysPcQ2eY7+o1dEs1AUtwJILcGUBthQVcLFxXLwMD6Puwdjmgse8npD97uHU6B/cZjdGNgYA0iyAFPx+SIoNwVreia1mHWbBC2S3o2jmmMpSPzcQsRQMZUlxdeWOFj67cvb1QxlY996kG6Ko7NOf2hrvZ60Kfktq5OlTmVWcRyC/ZOXzRWm9T94O2N72WMPUY3dSKIrQhShhmw02LVCZ3NZaHiyXU08myBH4GaWn/moIr34srySOqCD7tF7pPrbxXPTgP17u9Er9TkXBxpkhtd1lRIdlaprupqXS36hCKwOxedwW/eKg6mwP7NY3TjIILoh5CsrzwZoXhhhTWOlXGe1o4wr2v2tXU0K8a2tm5fOIoAYJ79N2/1x5LQxcJ/+iHaLSNzdaRInuxB9mPIriLdDdM1XvnqnTHTKpOBLIilFuw1T7gvWaTBB9/ceCAD9nG6dhDAZWBZCnS2SGziVcmuOmDNOefMgC+GUGz2k6XKQXXs5PS/u307lVeu0KcO0WpicO1gYKgjKd7ieDWA7qlMV4sdgZGlVtTFGcayuxeEe47vdNffIrIZ3X99mK7iBbcMbJczWnp7xKBSR3PnO4NZVYyvY/ZV52wDv/1gVZ7eMoyJ0zwpZ6xsd+NDP4PHp8Wqf/ZtWhKeub4fQHQlxd0QaqMPyaAO8k5AoSVmES0HdseCcHe3ks0P5c7rr4/S6wY9LHYiKJ6dnAP749TI0b3nNc7Q2KHypOskS/NbMKguwVp0k60P/aw3WoldZuoXD1BrS+DGQBu7F5LkCKAzgOKeVTDsBExjaBXRRsA2hXvOonPyd94iHk0Z+9WH6bIowo6tLNzSgxJj6+ptHbDqnLNd+DwUqTb5YsPnoHpN6n74rY1HpjH1E/dR013UNw6McAd9Upsx4l4I3SHSHK/Gua7WkMKcxQwsa+yOpnD3rpkT628adhD+7mG6eCPGPl6o0C8wtq72na3ZV8pMmV4lb191DWfyhQNrqeX2fvct07uqPBrQTlKm+v2QZFdCDiTUKVUAtU5YWTqHgW21tL3Ldxurrfjov3/rwrMpY79yhPYMJC7hLhzPJ9AmnZ81MbujjjTMBKuW2W9392Zq8vBBzNQcVO9+PMKZpUm3C3AHIH4QN4ShWQgiUhsy9SdpWDWLqeUyVGmt5ShrueXau3zR2LPmHOROSAosa452cc1AIhpEmRQkJWDPJiKoYvxsB5Z/O11HR6Cl4/uwGkOmem/BI+uF5ZhFcHlY/zPfxXWBMqvM1BzUvibT68JoGxTF40SqQ6I8IvEc11pb0M7OpmjsPtT8u1HaMAX3IXrjRgwe01GDsJArqGj+OqFYWUtnevtCC0wwpPj84Zf8h5nKoLYt6rYONR6dxlQG9VP71dURWbvyFCCbf87U/owcwMiBlcxwvIwK7YZrr3rC2eEr84f/qLWfTx+NeX3+IbqyG8CPePmigWE5mFrJGSY9dk0BiAnpHC2Izbz9XLMfVm4MVNfd+vDPbu/DUiUBd+2XV6rE2ttTFG+FUL2h+Xf6maMqJlYq61s6uP0xe8f6apGwdvpwz9lhn/6Dt3mPjAH7pQfp4k6APaHkhG7arR2fAzv1AVl16gOan51N16nqNY2xfRhlFUOq1Pz9ZPN37/COzto149Pfpdf0pbkw1CQ3A8iBgtqMSc0DtXoW+LZMZbXN5MoxEO2GsHe14exc9B//j39fPDcG7F88QCuRxk/1AkiODOJhyHU2Zl/lwMaODW860+wLDM2ZmE+SsJru6d+/DU/MAvVP748vVYn98mDIVE4BnuZeVUgmZ2o9v5GBuE2fgv4roMly5AtrzReN2G7uv7dq1cxnv0PX9TTQD6H7JQdWR8xnRwR5AXOzH5+sNcv7cpKDp6s3mrBalJz6vZ/zfjAL1LsPyssjaV0YaciNXjoKIDtyNqjp8yutcrvc6Smlc2wH1toC66sjP3ln47s5CcamGH3xAF3yrMGudJl4BJPLwUz9m6u3bO/bLX6mLC2C2m64z/zeHeLpKi3lY+yo7n5AXRFLax+D2pUkN3ps/lA5U+v1/8ssZcy3h3jyNmB99Rxh7fLh7myJ4x+70x9N+BgD9i8P0epGH6/psh5pGGbtpNMZb9kq0LMHDws3FKwq91TW5fK98nH7lg8s2O6xf3uHODkL1LsewBukNOcwqCd7lAb/DGoQUdJV6Ty0sdi8zNKxEYhRVregAqW3DOxKW6Q9Lu00789lYExj8xb/zP14QyeGtRlmOQOeYTeuj9tVm+vJp4A65pwmy50e4TEq1lTfQ9JuuUc//GbRmQZqGvwf1NeGUqymieoIahaos5cobTspVeFginVmfV1aEM6uRbt399u97xfLNzHx+E/up/MiiQu5B5bLQRmI6YBus3T7nG0trRs55KAuLrl6ReGR9bdVbx3CFbnnMDXCUF8XK7GYg5qGVBK6E1HCI6tFplY746KOuigDWlVfzsFyNLDmwVlZ8h+56+3i9Exg19fJOvc2XDMIQJsKWsU1Yr0xVc+95pkDyhXIx+kXPETKdh/5SGn9VLHwnFBpLOvrewPhc/CfM5VBTceqNJIc1PpmP6mlxWfmIDeJ59IK65wWqc/+4/bBsjVVrpq5az9dtCGxLxg6sXxOaLXeqtHQSB7bVRUkPTYs1TQHlvamiHcCcrdOxHj83oplPvm9eUS139fXSSkaOai8IntLw3QLoFbLzrinH5V7hiMuyiHHrk1HWGsLcNZW/MfvfvvkNieVwN53HzkPC1wzCKFPM2sLnYWJqKSOc5oCaH6v1PNzoN3kPQLdZz7yD6d7fr7mowdouUm4NlDG7gxIcTJli7upkvQgzsapmKmTLM2bZRvYOktCy43D2sps3bng6Ht+3j1YeznSpw/QzkGIV58OIHlxR5RGB+wzt5PNeUD3wkKx7Qm87KRMHDzxR7+wsjnNSfHxT+6nHQbmmtgA00ANSwmVsSil0GuaN4mkyidwJJCzdYetH73rXUtj2pqXfYKxHAve8yCu3RqgkWbWYyjeNDHKV40M9TR7aLFHcqbd2iGoPJTiuPGOVTw6bSJFXtiPf532km2ukAmSTkQqHfuXUOlwypCpZVC3wanv7adFQXyc2er5wtrn293PvtN7eBoJJoD9wmE6vx/hVZ0AERd8QyodaXe4xuvMkiWVmjx0UGz6nPZbqqGn3Nif/IZ8lXLsl4cSelOSDEMoBnWLzT9Cwmm/Me8/mhVTALRitslUiyvIV04fZitHAqttiAt3+w/McqwTy5E+/xBu3QpgbfBoQpoJglaRGg4DF6SgnJGao6M5yAwod035Tlbb/eF/njHeP9RT1yNcpYzZGcRQmyoL/Dd60IOE9FYvi1q2vX+un9vNOqJDHedUhfTwVgsNYS+3YS86+OG972o9M0uyxoD90hG6YBDg1d0E0amBjgeBo4JIJbzGqczVOjFpuYw5S5d9N45dHP3YjPiUC80jqdrRb5CRaHY1FHdRexF4zF9vJRlTTYGpk2Y/2befcL6lOcBVVsYkqCsBExrL5va5Q7ilF2lnIJ240+FurTIBb3oAGL65Jlij0KtO6w+fknt9Nv2FZnJqx895x6Zl+/OC/fG36VyLzOt4T9meIh5G0cxUHvfnGJUzVKOBv+JkuJFHmh/oV4di254jL0suAcsLpAdPtr73tfXqafXFRhkx9s++F5xrK//yQYJoo6tlRzoqiDMJ0Ik+YVt+30BdzMAamW4NOrY/YTGQGT1gWHIek+JllL7nHvvDUg+lzBBu4Lv2y8uUsF8aaKhekIZQsqehTwXQ3O+vBnW6c5oWN6fPnmH6/JU/jAIWFxzRpM6RL7x7V2+WBEww9r89SNf3Y90+HaTDwSok0hzj+Z6b2E08wIsfPvBXtFtLdRHvhRLobC5+8SFleeDP6XooG1Z72T36Rz8jZoZS64epcUGkr9ZKrHVjqL4ilTupzZAMmz6DOopRx5jKZj+JUiWoM8As1icPrdo+rNVl/7F77xRTJ9WVwU4Ze9f3qN1U5o1bimJeHTKQxPsTkMUbKCI5+Tt3NJ/IL/zNL9EFcaz3hknWDx9Lw1XIQzou1YTVEMLZueacXjsXx4qb0uT3/cQDtAKFN4TSNJipuZ5udKH7uZ4moHC45LK4aq7cETgTHS26uuJ7BpX/L7d5dMA/9pmfz0YG6r5SYD/3IF3akzivG+h0XmiXeM9xwCNh77ac75b3O/mtL0avUMbexTNH8unjuVmVycB7ZfP09GVXOEseGqtt3onNec5J8OS7rxepWf2Xb9AFwsLlIZmkH6U9Kd3hnlQ3m0eVZ/zDsbRfBsO8hEmVk50HDidYWAK4d7W45B//wjvEiXnXVDL2Mwfp1n6grdMxGFilLErcWFjLK073/beIw1U3/e2v0vm9gT63H2bglhPIeYVYClou7GVLOIuLcBYaaCy4wvVtOLZjb8RKhRDWPt4WJTf9Uxz0RzCZnqqkr91kWwzHh0YqtX14sMzkyUAsH73armFu/k0PYsU3x/7inYsztzudBrj4+Ndp0fXMDZshxZ0IEY+185wCX/DUb+coLy+fdvEHPk+7exoXdSKV6u34pgnZVekCYILV8GAt8XRyF47nw/Et3uxOpNs5x4p49w6dh1J97klFSPqF7FRxAK92V3SOlpaBzkFdajlYWnI5CVRbUycY+18fopd1A/3yToB4qwMZs8PnuUi8K9r97v3TxuvzG/36F2lnINXLeT7pYDjvafSQwpIdnk7e5p3XhLAXmrB93jN7uEFuyF3mGAmzNCQyW5EaBv3uMOOfITRvHm5V+JTr7fhw4CRVGFTbEdaOBdJLCy12VOma2LN9iT/9Ll0RhXotdVoDqIBlIBHW2pLT+cCbxJFpN07X8n8N58dS793oAjytPC5NfywCwcxl7eIIoZnuKix4Q/J0w3IepVCCkkiCWE9ZVsZ6UhXMO9sQqlyf3Enx2NWqqzvN1cWjs9KVdYEWn9ivbhjEaJwcIO4p4m1KqCWE015wnvytW8VEt40z9lEXL1NCn9cZACdZlwdQveEUyPJUnbIGckV4xzXHy1KFvFmgSRxix5R1TbONFuowNGdjdvJ2lXMTL5t6+XjO0uUmkee2jn/5F6dPp68LaH6e+MS36c2nBtps9BEHw2igxVq46Bz51zdkcScH7X/yAPZ4hPOFZXZHESgwWUjEE3Z5dQmPgrImTluyUyxYcfpjjsk2oGfvnOpWvshSr2FtNqLjT/2P975itC9h3fvMOk98/Bvqp5/Plt7IPv/ODwB2MqvLzrMLFDu27a00LbMLFmz+6RJtwYQx8cQ53Y94rJ5DI9JsxkVQyabQsYWjNBp8vJx9ygAd51B5JWGJiKN6VMWtVZUsx6gcQuVD1m3fiXzLfeq//6LYejGALN9D/PF+uuVkR5tTARRHBPyjDCwFTRfOkg+3acO2LWEREYUKFAOal9zHhgFGwh48BZVAPKnCst2YBJ7+9DuQJoDvvLe/00oW9mqpmtzpYO3k3K5OcseUm/38XtMI6CmamzuoWTq64CUhifbTX3k3Nuf9qM8LAVz8p2/Kq7b6wt8aAsskshsQS65weFtl3m2SBASvreWENy/8YEA5OaMMpYtAeDUQ/+yJsd0Td78dz5YLzFLyrrt6a+R5e7rStJV2wPFpzvDpyelx3ZzVry+DkAf5ZAleRIw2WZ2m7z3342LoBGM/sp8u2urqCza3stXNXNl0+6MGBPuXdDNaTsRoIElYWyndzSe/UcOFJOU+17PxXB0L1Ju/AAABOklEQVRv+i++fNTbPL13bUDOjlibNkcFzGKTUOrA8vtOG10d0+rhGAabNx/nv1niRKS7FrsNu++76nTwVPtUnYzUC2HoBLAcNvl/pa7aCIWzKUnlXp1bnH9GZFTRgvmxydugvorjH33ynYv8+ysTs7/rFPKKj5J7sTVYi22nHQnRTqCbscw6DXlPTsf8MzRDuSgMBjn8o1LD13DGDDUoiVqu3ZNCdpaWljp1GrpOOc/mnLRwv/9N8jcH8uW9rrXEixyYRflruHty+tG23cCR4aa17G/MS1KfTWFYMu68F030+wtd13KsSNjkCIeMcITk300DqAHjpD/mQEaJRDWarXCXRPiJf4L4bBv4bMo675qxEYT3/+XWahA1d1LLc2VfIkoodnUS+w0/jjex9bFfHv+BsXk3/3/5+/8DKIf6sstcS3AAAAAASUVORK5CYII="},37426:function(on){on.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAEKNJREFUeF7tnAuQFdWZx/+nH/c1M84MyAzOIBpjBYRgNujWqMFE86AUNYpbRGMqmlTMEtmEGC2yZrfUcTdhw6KbJyYQNUIFycbEVMgTDBoRMwQzBAyia5AFBKI4w7zuq1/nbJ1+3Nu3b9/b3ffeGZDNqbIGb58+ffp3/v2d7/vO6SaIWD71ezYpl0OLoCJhyIgzBtFsQrMasv+Ut+o64FvH82PFdvg1qh10rqxa/7D/lPbHOV+ErgGaQDHa1YKBxz9CfKtHRFS1Ognb2CeeZglqYLouoCUK4EYMQM1teBRQbaANAiomcWDbx8hQWCa11AsFfNGPmChNwmwiQHZLuC6lcmlV63HQE2HDDNNGlAETxrC37w6SqwVmmHNCAb95C+vWCaZOmNlooHmKKgoiYXD7J8mBMPBqqRMInDFGbtyEd4sxkKrAgyCFsfMRTEAU1ZaBqdJXQsHObMee8bLngcC57VZVzA6cp6oBDzMhBpmQeo/7zOiV7kmn2Ne/mIzUouCgcwKBL3qStcoU53o7J4sYeuyDZH/QBU7m4z2PsFkwkCz00b5JXcTB/sVkYDz6Hgx8K5uCHKZ7L35KAP8umwURSe/srYs42r+Y/PWEAP/4JtaRB870XtzQMPTE1W9xhXPg1KVwO46IE7zedxs5cvIA1wADpxZwt8k8uYDb/rPwN+A1PQCBNnzhJtYhaUWT4ijhVAGueUwKp2gQvL77RJmUvwGvScgVTwqtcK9beEoq3L5JI3aCFc5cJsUZulMOuEtRJxb4E6yDxcrdwvECzhhLAJgKoBmADCDwKaz1odeqtC0DrNZ2AegAMgCOEULG3O0E3sxCP+AaIMiNdQt5zgZAB4BuTQMbHIRycEjRaK6uGy9llohHZ5hXop2TALraidx1eiwmy5A4dABHCCGUNxQNuDufIWPolw0MfBhjnQCmvXJAzaz8njY0eDxdg8KainD482EXQ8sG3mclqqKcKvYj7a7FBexfJLmJ6VqGLPt022kXz42fBuA4IVYGMrAjBYV7E1ANBG6bkVmvHFCzd60YOh5NUu7aJw9wp1eLb5ZbPnBhvB3Aq4SQ4XDAiWXDS5hTDP3yHxoT2jPGztY0tC/pzRytTdm8d42H7UArqDyCwt0yWH1fbGp7e0wnhLx0sgCfc+h1GLff90aNGToXbH6nzUA9ZsT7hNUL/K7PNLfOnYVWALtCAVdthZd0pLEKn/uHl5SxFd8cjpCD9kC2QTfCbjca+I1XSKnrFyROB/DiSQO8b6cyuvJ7w6OV7bcPYA/kYNgV2jA9uMqlXoUv+pCUXHRNYgqAvdGBF7cYNNKGzzWBb9CqAA8/lRbNSSXA1doqh3/igLtnTbGhk2ZdwP3tdRG2bruF83taYgveJzR1dcXiMYD8dRDqM8+PZH/+rJTLZLLmKEgFN7AI/sQA96wp8hWfBnopkYBXnhDLIU9qayI3XSWmLnpXvKm9yYxcy4qmwfjDXiW7/ql05tA+anihTzxwvTw9ezID54q+5MJm+cOXJ5tmdiMly8HxhjMK+w6p+Wf20PTGzUa+ODKW2kXFFQRVsfs88HGPanQbbgN3W5SGA9+rjH51zUhJ3iGc1S5V9Y1XxJLz57U2d7YjFu58/1oZDfq2PyqZB/9bH7PSIlZ2RJQc6NUjzZqBz3+CdcCl8IInIGJoS+MCn7l9ezH61TXHIgJ3wY7x8D2F1XfKU6Z1xuqC7dxjVgP93PKBNwaGkoYDvajyiQTO1zQTJwp4qefhTIhoSsHQcoTqIB9+b3P8ip5E6tzp4JnHyOWNIai/2a5kN242snmVMUnmCTSvWZlo4MDQlo81LLSPoHAf4DZsrnAaAzE0QnSSE5YsnJS8vgfNGQ2sLQWhGnmeoeT//eUo1DsezA2LMmOCCsb/IpOFxP+WmJWJAu6sijQY+NZdytgDj45U8MPL/emisjkFrm5CaCxrwqZyylT6LR8SUtdfGk9e25sfuepSErtqjpCY/TaZp0wL5cgwjCd3qfkntlDlnpuEJsbAvrjWGBE0MFHLMEECE02VTzRwj1sYoxg5LY5D7s63n2PnrvvLteT9qeUdxTz305fhfAu4Hjrw8QdeVLehp8glc4n8lVvibV/bqKR/3geNGiBnT4HwnllxKZlQSf9+pu/eD13QGbtgJhHv+Wi85ck/KdkHN9LMiQO+jnVALHcLS5CG2TvIT6iwRXn7rcDWXcroisdGI06ajrpz5oTpNieGnCJxHWTpIqHp2p5Y8s1h0J0HoW7fqxpHjjOqKMD0DpDzz4qLl8yA3N0B6eXDUJd9Oz+SZoyWA+feScblqYyXSXEBD9r6W+uO1nqBc+xFk9JEqAyi5fMCk5Pk7GlEXH+7mY8OLKt+pYxt2JTNy4kEFbQsEzXG5GSSTqwNt4HXCjPMnvLtt9Wq8JQJkXsnlsJLbbhOFCEmJ8jmf0tMln1jzNIx+NL3laHf76GaoOWYnExQc9IseCnWjFka/NizqGco6wp85q9jHZrLpBTaDto+bJsQp37ZgLl+ePY2oC/QpFhw/YoFHOATpSETQnU+cfJ/pwjTQX7wBbHtbd2lk6W3HU3TsOBu4029mjkpizYnCngQbNdecS4sX9j2AX6MK7wUeGW4XlAObOv3oh3nwPkA6IQI738nif37J8y1xYrlJ33IfPPHuYwg5ZjATQlLUq5ugLuElv02cyolqz4TATwkbI/AS2/UNSD8QBE4D6OjF8ekmCq3/XAO21I5IbKSF5be0JZceBF8R/LP+1X1jjV0RNUYkxio5YNnTXPC2yy4hBOq8CDQQSbEx7Y4TTrAl68dK9NPNPwuO64T0nVWSlxypdD8251MeWo3M3pmE+nG95HkOZ0xkadnXzsO/amdirLu6Zzyzu4E+ex1QurxZ2h6xytprWi/be/E7sjE2HAa4BZ6YEadYC3gGF2+dqAO4ClQPUuQskL8ZTc1N3/gwniTDBD+XuePn0Pm4U2KWrLLRAEEkbGr302kf7pOaEmlZHMu+NM+Nfef6/Xh0WMZcy/JxCuc4syoEAvK9ObRfWx6/cAtS8HNSVwmZMU/Jttm+eRRshrYtt2quuJnLKfqYJ+9Mh5///lITGkrD/uHMtD+5eu5wUNH0yX58QlTeCN8cF+7rgHblwJbdyhjKzeMRbThNmhT2ZYvvvafJ0+a1lk9NfuNjUg/96pi/OgLcb6SXrFkNBhLv5Y99vrBDHUmztIU7ThMmpetYs1Cs7nEX1J83xy1VqlCF6f685/B1OjAS2FzD2Xp9ammq3tQ1Rvh5mXhcmVoZCSPH97Telp3m/3qeoVe7z2k5pat0I5bGUPuimdcOfFxAB6aXh0VGWNzt+xQ0is3GJEUbtlsS9kc+Ia7k5M72v2X0ZzuDWdBr703P8z//9ufTzTPmVb9aeADdM0Xs0eLAZA7vP9/AtwBzW/Xgc1dwM1fTnaGiSgXfHlkeHAkTn/xr4k2P/vt1c5da/Jv7noprbmzhtWW2+qKNOsQbuhToyrcBM6L7ZFQM7pMkmceSPLdt4HlvnXK2PP/C/0X94bLsXzl4fzAs3uo6lZ5lPXNSGuagb1vQIVqwAtwvdexYXNTwhcbeDp22zfMzTaBZf0WNbdzP9Mf+HTc+jJGQLnv0fzgc/1pVaZJWlj9ibC+GRn4NatZalDEFEGAqBowk/KFPrrWtiv1u6yK54cdt2Py1t3K2MpHy224L3BzvrSX1OzFBp6oeu7+Nr6dLLD0vQx132HoH/+gf+TpbcABXlyMSLHSybN6qjYS8PnrWNNoDjMkAaRaAop3slbXsZ+7hbuVsRUPhYw0U06W0EpSOTmT392fOD1EUhB8lefV11TjvXPCLTZ/6bv5wf4XqWoBzzDTRSzxVhoEvLeXCZunYZbB4P/qQMhwPyho6r/TBv5YAHDHj3SZEyv3TQQmgzxye6J1xrTqXoojjOFhGFMCXEJel3s1N9x9fIBJCcMK98cR+HseZl06xRllz2gQ6KDjnsehUcCnnk7Ezy2Ip7omQyTQyvZNSrLMeNfMRKUGuD0aXbPq8zpm9zRgNA9j7a/zmT2vMU0Gs/PjfsD5Gf4q5x5LKJNy5a9YfOg1zGaCz66lal/ziQibV3/BV+HVU7SFRQfX6o654GAkCJVg5sG9zyUx/N8XMuvy10GkOAMUCCIYX+dU9TwTaYLKZo48y+QET9mOE/CLH2LnUuaKMCOC9LXpFdY+OfBtf1TS//F4+MDHDdyy4YpAbdgxiRC+YOw3e3KY/He+pskHhNvKnJEncSSgiXEWVxSoImOCDsbrSibsHJNZggqSlbItt+HVFR64P3zeetauZXFOSYcjAA+y2d7jT90KZEaQX7IqG+kDX+Y6pivvzZXKQZsKNxQTYkHldmYw2KlSIOhxEzbhoM31Te+WCe+kWRk4P2K/XMXTI7vLVHBZL5OyUzGbiOYrb2WuRzVPpSJoVzt+de6/Crh8OugNywePKVoy1NtrBYXrOYJksrC85pgHU+GV9l1VoO6oH8hDYnHKvRILNivsT6m8AlTZU/lOb3tHZ2eMEULK34C45CF2lsFQ9GeDlN2A4zPPAH56C9D3ZzVz7w/C703xha7nCfgnUJKAA7/4pFqkiZQoDqonCydK1ioPB23FG1mYwLmHYh/zX3LzB37zDa2p6y5LTAZwgBAyWKJwnhnMxTDDrewwqo1iryt5PEvnAbfNA55+QUn/16PptCJXV3pxLdPJGjpK5wvKxa8qVY6CXKRtxQvN1jU5bAs0//8sOHhFTbJUYX3TMiGla5zlwD/50damKy4W22VZHiWE7DMH2+kQfxP44ocwk/EQrl7VekYgyKY7fbjzcuDWHmA4A2P/UVU5PBDTRkejvQms2EZb1xQft5B7Ie5SuW2JFj2alpjbu8lDlr3tFNvkk3BnB5Gnd8bj7daWaZ6ZPEgI4a+DF4Ff+gibouaL37YKA6mmOj4nuX+aewbA1d4zvdRPrqxU60ihjRArTJXacnYYFKJV+x9holefNp137Ute9DVVcMFqJgsEswW9mIwPghkUxvuaGc/k6buFwlWHR/DemzWvW83OBX3x0yYT6vu1Pt+57ZyEIzuWIeh9UoMQ4jv5O8DfLhloq3ovDTQzYeaFege0UfdS1g4DPU/Bnv415amloKfQNCnzHmTtGnCO3w0yHbooIc8/URz42WGPOQxlecO0y3sZtW1XZ8P2u6y/BoggIaXR8gCKGhjIryIHwwD21iEXrWLnMYKUF7jIcGzHEhyu9GjUcrG32jnc1L68B7MYgeQ1Y+f9HV7oXxxd5eSCb7GZTHR/GcDCQsbx65RvFfDcc2v5PGZTHq96TGp3J1480EuCA1fPzZILVrNWZuDckt/5OzwEVBBwXNMRudFKb9RVf8Ha07MQlUNUKW20ygneQ4xAEIA2qpQvUhgGhpU15NVahONMmmcwA13exyZo4go6HmbiCvKGwrQRxiPyhRPkCPg0rEvIXXsp/ufxjxCjZuD8xL9fxaYaOrrrukGP21fWoQAfvFA/CEQDjzvXrJYjcuroFLk5DH+p1UMxTbUbCjcvqorpoBX2ati9qlnZQaA8o13tOmGejCDlhznu8KEy3rxrEg739lrfrqq1lIW/vYwJP/kOWomOJqr555TN3xOlySHmqlueNOL5NxSSd4GTgsdHC6zP796nUuB5FSoULs9AJQHZGQqG61G1e3D+Dy50RqLE9NSOAAAAAElFTkSuQmCC"},19150:function(on){on.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABGCAYAAAA3mEEuAAAAAXNSR0IArs4c6QAAEaRJREFUeF7dnHuQHMV5wL+v57Fv3UvHoUMCvYUNBpMirsiOsMSpXEiOcABLgAAXkkicwoQ4xFUJdipWGYfghMTP2I4jYqPEIUiAFQEWyIV0Fc4KihzAkiPkQgJ0Euhxx2n3HvuYR3+pnt3Zm92d3Z2ZnQ0i84dutTvzdff36+/7ur/uHoSQL9q7WYZz+7oBzE6QIApIMpiEoRSjA4DikCT+H9ZlyxZ/mcQBmQ6mmQVFTsPa584hIoVVlJuccBQEAESEsH1FHyjKhQCGFHqlnYoKXXhJYD2wJhWAxYbx9l3j7So6FBC0ba0EkZF5wLGjXRWFdoHwY1UavY0bBk+3o40tg7AsYeeKBW2D4EdRQTXkpwxMHsf1T48GLarec62D+PeBPuB8dtgVq5DnR1HNKtKqLI4EBj+MGwbzzYry83tLIGjvchnScDkAhhsT2umG7GDfChAJ03jLnmN+FN3s3tZAPPWJCwD1Oc0KCfR7K4qqV2BYMoWcyxcdxKt/EJZEaBHEwGJAngqk6HYrq1q+rTJhEWGorxAdxo27RsJqe4sgVlwJCHJYlQlFQW6VCUPx1XKZchZv3X0irLYHBmGNlnZc+xuhVMQ5UQtbaWHLsxusYxrvDC9OBAch5g7K6IdDASGEtENh7ZBp11WiDN4xeDSs9r83IISCZKUAnAqA3ASTK8CkOHCThdUwS06YIKpHcu9rEKbI4RgjEIuN4OpdBafSafNmBosOdICSnwXAYy0BCRNA2RWV8ly27PctCBPy0EPHcEXjiVAxZzXQD0AX+oLRDuU7IVRXxqAM3vV+c03IcqB1/xrXbTe9KpfEjL3gc8YeNoxGE8v3HQjhjnqM15pZghsgenJgPpi8qym8sGfiXuYcPkDQtrUqnBuZAUoMoVeewjVPZ6vb1P5greNpXLfn7abKdLmBfroqAuOFy4A1WM8I2woauSNnHT2AsABMjfSDgT3WOopdV6QMzOh90+kh2gtCFJyM/qo6MPuBQtuWLwSok15vBwSvMhuAsBbH3tw3C8DoLXeiarkc0/jZ6XlIm0GwHK574bAfxVffS9tW9QLkL6743quy/BTs1725gLDWZSbSfUDUB3LVUNytzh0zD+O67TlRzfaBsBqGabyhtdkn/cuqGaDmF5XnBWFkT+sB8gPYAcIaes/fNxN0fRZIpZSPF7CcjuNnB621jfaCkHAUb9pz3E/HrLGIrZ9IQFS/NPQJmj3hCwrWoAxs2nsMtq7sBo79gKbqarUNk4zsJP7eC2fCB1HdC5g8jp/+2estgdi2sgN0c2FFsGtFYPWzfqygMlgXQLY2FERrquPFGqyHPIAgIrHYIyi7px1GRxkc+ovFDXUiqzos+0ZrCyhDX+uB7PFeX7rXswCZU/VzHJ4V5avU4s2+ZDcAQURxABCLPckA1Th/HhEwhvcCvLwFQM/U1iuoJbi10Fa+DcKzFuqAIKJZANCvT6WN9JkDWeP0QS2XHXHfzxMFEAmhvGZUxZmoi60Wa1bQTPeYVGvcdWUU5VSXWdny+Mx5UqznciV5ydIYZDMIQw8BjL4coMd61mjABKMLCCLqBoB5E28PTRze9ZmMmc5STiOERLEyTvMQ35e+Bvt38YGJ++tcwszA+mf6ymvc82Bh+tE45PU65VSlClM9V0qzV/5dp5rsVmDHnQDZ0DdfBARg66AKBBGJ2H6ZNnZU+8U//Xa5tqGBiE8z8KN8J7QiiOK/XkFYHahzLltw0096YfQQwu77fXRxj7e25OJqQfQBwOxX/u1Tp3In9xt2FQSIZLnrT1fMt0W0G0SDpLn4qXvpVxIzr7w5BTtuKwVxj0pudltLEITwWhDzdH2q48A3F7zjLDunELpF7DIIB6QEJMCyoKrL6ZJaswZhCTF3V9YEhDp3tTL3uq/3wNADAMf2NlNv4999jYqaFVULYtHkuWORg4987GzoIErOPQiEypDiPTY42yAYMbkLF971Uh/s/xbAkR3NtFP/91AhuFvEYm1yWPnF9z9SsT3Ej0UwLe7aW+NxMbLyHpRr44IdE6oifbW266gvdBDBMbo8WWsRLYAo+ie3EZNQXV6uhFCrzmJPjyq58jDZTtZbz5dHSHVA1HFLzq9bsginFYS1J6qMpN0gSsHZtoSiQmOYnDWXpWZ/VInGZzOMdzPKjvF89iQffWPIkLPD1uqdlYrMFVFEOxKUzzQ5W/F/ASJUK3AKazMIVrICAaAQ7WL9v/kn8RkLr42qidnOYyYVzdOmTuqFEz/Pnxl6MMuNvGUdFpSKDy4aaRcIL6t0QQGVZbcIouyGLK9U6ZpsCEyPYf/H/yjWeen6lBLv9LxNRs+mefrQ1snMf33bsouowsgViAcAtp4Cu6aWh6d1SLULhA1GQBBWgHIM+1dv6UhevCzwthht+MXciWfunpgy8+QKo10gQh8ZNUgEKiFahD1ackKYe/OOLrXrA5Gglms/p505pJ14cn2azDzVWEeDUVL1T74tot2WYFcwbBDCCgSIAkXY/Ou+l0ouWtlgrNkYjz7yuqn0Liqft5g8uit3ZvcfTpCJZRiNwoaboXgG0S5rqNfksEAwRYxoEhaEhBzDzsXrohdc+0BnUEvQDv1Y006+YiZXPVyhz5HB+zPjh58pkJqnbK4qbjgKq+cHm4JohwV4SY2HAiIh5g5xZBpHpsQwkeK48NbBHkhcFGibvn54h0kvPqTBkuuZuvyLFW5NT79lntj2yTEyGAk3xRVWMapqFojeUxCNIIcGQo5jUiu6pFlXb4r2Lv2zYKdKR18j7ak/0DVukHrZDUxd9oWaYe74f3x1fPTIY4WsUSBuYkUAP29BNHMNLYNQCC1rEC5Jj6EUMVnfmq0dyTkfDRagf7LJmDr9OimqyWHuJ5k68MUaENqJfYW3d941kTOQVKZxO3g3a6s163fLNbXDHYnC/MhtBYSVeS25paTMUaIIYxGVzd9wYCYo7vmmhso6vJNr+x42gSPpoIPStQTUtT+s3BFhNTBLpx/52FiWaZyMAongbbuoZjBqQPhRVjPh9u9BJoCtg0hAUiPUohGW5CZLphbIfXc8L1b4/F3ZDMATt+haPksgGcVc00XLmXrdX7rOwE88OpA2Jk8ZHCXuHNI2K7QCxKEWsq/1Cgo62vIMwmVhyJq8JRIgc5OJkZJckKXUvKVq7/VbmscHsVQZnzndnAPfNbVXHjet2CAh4dUbZeWqjXWD/fgzG8bHTr6q84LGs8p0rHhPQQSxBN/ziDogmFKMDymKMIkpUmretZGZq7/T+HTp8H7QX/gqKWv+BmHmpQDZDGjbPq0VrQFJvfR3Jbcg7VTyxHOfnxw7ulfjqHOOGvfqntpiEUGtwNmgVi1CgLDiQzTCEgVFkrs+qPauf2JG3Z753z8kePVHBJyRvmQNKtfcx+DwdlP7+Td14AZB/xWorvn7aOWrZ2qlTTx+y0R24jU9WxAgiu7JS5z4fw1CpghLRlQmaYaUSHXJvZv2ubomXSxNDj7ILYVzgygWIfXWnYr21MaCln6Hq1KEcO2jMaWjv+mOjvEffXw8nztnmlw2s6i/NyDCDPQtWURp6CqTyZKRCEuwlCRxJneufTyl9C6ssyvwKOnP/bFJ2XFuBeVF16H22rOm5ZKW3a+oS66vmx4vD0pGjvL0U7dPEudmtjDBs8i412Fs2SKGQlgqFRUStTWoIOoPRsMtWI3DVztAdCy7L6Z+6LbaYaddlew7pD15jwbGKNdMnUATI6QrMfmp7zebj1kSpl7eqpsHvpvLl0BwZJx7nE+EAqI6JhBl4O69x+AHK3rAlPoBeNPOVEOlJRAaoYgRRYvoZAkmWxYR61mkJG/+53hDP58+yief2JQnrltD1ei6x2JK5yUe1ip00B6/I5tJv2UIizD5pHmuNLHzFSNasQgXEPi54mFGa1v+RS/2gmbOAvT4ghghL6G+iXc9PyZkWH6ZiNzXrBuMmkSwlpkqSVpKiscliZkozxz4chQW/07DXJP+5l5j/GdfKkQW3ygnl3/B00xc5KHyQ3+dz1POzHHTNLlhBgrWQUDUiwlEGRuE3dPLB1U06gNqcmZcyMXor/De4jHnlkCIWbUYvgqriMkxGeM9cnLdY1FQOhoG3snBBwuRq+5UvQRoPTsKhe0b85Q9ZeSJm5wbVqCuC6K8nDftCFiqtJ0mCAghxg2GC4gykH/4fQWMty4Echzdqp6Bi7Mj90yfHQkMQswjBIjeiMqYJktMYXIUYxLr+5CSWP0dFZRGLtOZI24Qz3QdtJ/eo2kjBw0ibubINHOazk3VMEWaY6qU/CtLcIEgfvMNwsscoQGIMpBvrYoATvUDl7rL5zuEWgr0Lnx++TDiZm7fGwiEc2ZtFAypOzKDiTgRRSYhkyR14YCsXvMlBZTA60MitwT6nq8YheEhC4KwBnvEJAK168w6LBD1rMDZZzyAcLgsFc6OFSe8CXPK7e1nvkFYPUzMrDWyArawikREtYJ2lMUlFDCQSWr3AglXPqQoHWKnv88rcwr0PX9uFM4cMUUuxbYG0nTudEtWBtYork00unxZhNd5gg8QzeoXKEYUQUynwQWIJFdZXLgoJkkxlIogSGJAEsOrbpeUD98mebIOcbjkl1u59uoTJmCOa4bJiZtmnhmcuFKMDdV5pjpW4Gy8ZxBeIRRHODXB2ovC690T0CKKIMR2Sm0qwiQyLauIRxQrXlguSpEtEKo4rC7FES9ZypQ51zDoXYSgdCLEO6x8E+hp0keOgHLyJa6/8Z+kFbLWuoRmSJzQ4JZb0gyeswL0dJAur0eEAcLLsma1Bs8LEKUDLPbikOWeJEJJUyQBI6oqDLVpGOJNyMgIldJrjHWTsCaWy0i6poOCjItsLCErQhAwmM5FfokMpIrY4AGCp2DtxxLKjv98sAgnCHvNWhYhVGWMuGUZqCosyotWgcQZMBnFtFtjZP2tuIQiJCSNMwJTJ2EJeVayCK1oCTkFyV4Q8mMNDUF4GR3V8yXnjUVYI4DSBgIBQY9hwoYR4YyRwjokFZFkpnGTRSQF0RBuSuz8UEEFzcpyWJeEROJ9qjKjgqmTygyeN5FEcLYgGEikFFfl/EJoCiKoYzcwjfe2dpjfWbQdIxZOnTsZ++UjV1uHr+2r6YmhEgirsaUtNUwvWkZMJtRIYTEpgihmmZKCUUZYMDjWTKdlVgKhkwAApkZiwpYzC0QtWEKZszi+teH5C2DobwGOPOtvXbkeKIPO4L2DJ4NyrH7OBnEJgN6z7+E5FYKbnqFzgLDPQdiWgRJhXI5gQUAxOIr/g7AQYRVVF4mD4yajPORB9HoyNAuAsIRItSWIZz3GBruYzivWRy4Y+HIXPHs/wKn94YDIq2/ifcU8URiXDUK8E2n+G0NfGzn90tfLr1r2A8K2Cmvvqx6zVvBQJ0RhETKhOMErPguLsE7zlo705kulkbAKYQ0ChuWKxObjHEQDuiOncvpv2tKRnPVbMXj0Bmui2PKF4h1UXQf9vAisWZk2CPF3ia5PRV/9x4+c1rPvWlNvLyCqz87Ze2DFAZNYLA7CVVmfozFAnaM4nC0AOSsmer/o5YJJpAqAxUxsKPNpBbb86BU3Ri4e+Ksu2L8F4OV/baYPb7+TchY/F947X0WhZYUQkeijH9D1NB/e+8DYmYM/LgQB4TwlVPwcQ+tgvF7cKV6EUtleoWPR88W3zv5qAQjgiqxnYqXTpB+8MQWjxwCevTscl2SAAWP0P7h5sHz61hu9xndV9kwiobO51oFmfcqYfPe4TpQrJ6bcRKGmT8uosyxkDVt1x31h1LyuDBXUVK+kJi8UuS60gvPQ98JxSWJkN0P+NX5m91TYTagNnOItkwA9ACA2E9d/KUp1TfQpCbLjDdYivMya/C9yuSpEvHtjdBjg2G6A4dKrH1rVnLCEXOoN/NOdE62Kcu3QYQqlbWuTkDk3BxTTW9rVC5sgFQxbrkhbZ3rfwc3by1OfINVq9EzTnRNBCqSn18ThbL4TkEeBuAJiyGr5pyDSWnwmSJmKYgLpOkRiU5BMZnBd+wDYrftf5H4s7DrfhR4AAAAASUVORK5CYII="},55303:function(on){on.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAFIpJREFUeF7VnHt0HNV9x3/33pnZl6SVJXltyw9kGyMjBztgNwk05diFHmJIk7QElYQmYBxIUx9oCOSc0D8a9eQP2rTp6Ukf5NGWJqchB7vlD5pwTpwmuAnBGGJjbPzCdg0SRpK1eqz2OXNn7u25Mzs7M7szOyN5ZZT5w5K1d+7M/dzffO/v97u/WQS/wccAH2rLlUudhJAOpKO4zoHJTKkgrE1vS70/uw8NGotteGix3VDY/QzxIfydfL5LQtIyGkNxmcq+p2CNGIYOl9b3wKUDaEgP6/dKff4bA3wrf1DOQk+PXjQyTEGShVkGoEGorBZIAyYxnI116eMn0ZB2pcAGXWfRA+/lQ0mlUsmoxOiSgSDBt2bTAdbtalGbEASEA7DpnpIxfrh3qPRegV+UwDnnaC38ZVpTS8s4xm1uOAI2pQKpv5T4wXbOt86REJnFenz8XPfDs1ca/KICvp0PSW+D1k01I2MgXXHDM0HXrDtcShqlxpkge9IULJclWRs/1f74FEKIXwn4iwJ4Hx+Ka1DOANBuThH2WKlbQgQRU7Pnat117c0nxD5kYIxTjvilvhOl7IEdC7vAvmfAhWysh690aMAyBrAOc/i1BbARaNRF0tuPA7XGtw6226oRR4wTyKIp+dK5DQ+rC2HxVxz4XXwv+QW80g0AGQw85gZh/e6F7RUC96TU46i2bPBaGnpoOrH2hGFCphO8e/zY8s8WWwn+igG/mn8zVoK3MkChh8tCNlyHB1IjcFO75+CR1C+S9ZMavOA2ShYBXIxRMn5szRdmWqHzCw78av5QRwWkjAE4HWgpAVJSWyjnBdv7tJjT2ESyHCnyXx8UXVE1DS59Zv2fZIcQYvO1+gUBLqLBb4HaDVDJIMDxpjcXsAh6hCAkuAnTbceV9NF0+08RF2OscgNJeKJ9Fb50GH0+8M6CxtxS4AN8SMlBKQOg9TAgJJIV1A3U6/5VrdR3WC5LDJGksAU5kufjuoa4MuKEc86mlkN87MDaXZVIYxXnRW3YrJ1IIuXV4jIds85Aj62+gyi6HSF09w/taz6NGSRZ0xbgSkax7DrYnngAAAhFOd7RMXYyM1gI4zlv4MKtWwV/3sVM/5kkwy7U8LnPQD3WHajbdZ5MmHWH6XbESW0IvHwMiBGpmAQYe63vvlzQAjtn4EKfvwfaUgraMgN4UAQSzr+ZlMzR6mwbdl/U1u1WW3fDtXzcUMyhwhJo7NTKzzZEsHMCvpI/3g2grmKApHCiTVo0te5mYXs0Tfcukk1sIsz7qcmRNRZLSnz6CzAQBFiVSuTi8c33TNs0IgNfwR+9CgB6Lgu0fdcBemoOpum6HxTcNMqMT7jjvfUoklUHvCGl0ETOahejAHGITb628e63hcxEAt7Hv9ipAlnfGtheOA1hTpgL2CSStHtunk2cXz4m2LLrJtsDyTEgrMgTJ9cPDkcC3ssf7eEAwsLnfzTxt2uPapj7V3tC6tXa9f9armSeXkndPQQ+KWGLcf0ahVHxeP+nT0cCfhe/i/wS1vQjgMS8iAfcnAdJRD31Xt8n79J0wRXWHaTp/nLlOJjeSfVbqD335roO4kTtbMfnD64eLEcCLjrayr8tj8L5dRwMz4ZApAlo4pGYj78cpN0uCLZfZl7QJ9/i0Vs/qOIajgftO3G+1l3XV5huu8aKOONxLI19vP/uMTsdEBm4uEHhe/fBI8s1CitAJtHObSIlNSsJ0+0GKWmE4GuJbqqtWCQ99xEuWYizd08NfGbUfRuh0ATkeiu+Hf5BeUMdWYVirDPYwiN4FE00uzacMIuqQWjm/oUsbPYgqvrvPAfR0gc1BnXGhZl88eSmwbGmwKuAlwFAFwiPpkXhfyTpaVEjMe5hmoP99DQ8WToCJTu+b+jfaxQ+K4JzRrNF0vyMawCK4r5EKHDOuVgU1wJAYqQwrb6dm9YuieoOsdZoavOnwdlKcCZc07znxKzEoU9ToPVt7V48Q4g2I104gTd0ZOQ1bW2xLC3BY7n9cIh6nmzvOtCg3dF0W2g0wiSrsdx4u7G0u8zZisjAOecietw0Q4vwxK9+Mfm9068E1HCkAFKNA+dSHdxqEy7RKnQn3cKJ/be6fux+VfF5sENU+yTEZ/pQ11rp7zbe2rkstUT+aPZpOE+zrgs2Sl5UjwRznUnAJ+QcGz+8zUrRXn/6h71zBb4OANIfefY/xl7PjdQqlbhaDzIAuGjnOxELCDyCwXe1daADv7N76QjkyGB2H1B7799l1bYD1Bw4AMFYZ1i5tOzC+Yn6zeb+0z/sRS4LF30ZQRrOORfP+qZnh89O7/nZf+bd42gEDgCpRrJmu4jARTte8bFyz/lJgIbJdu5sLgHBvf0fin2t/+auB7I/hhfosNWJy430XSRdbTg2vffxT6793ETQbo9t4c7kyWAw8F80OeciR3LV7p8+N/r8Oyc8inbZwIU8mCBdGdwq2AboCwQ8gWV05qOPLP+X0hH4q9yhhnxNkGUjQKqRTI59esWbU0NoqOm2mltS7P6aARdiv2L5t/72HRSjnoKYKwrcNmB7gppYuN00qqUf3rkn8ys6Qh7LvlB7TILCdgKkDJiNvbFq93TUjWMBXK9JitVzM+C9FGD5mqeeGKmXxdYBt3uuWnqQrIhmcwAumkeBfnDnnqVH6Zj0Z9n9ZpzqjTktQIyxYjuD0cPrP5+LsDx4mjiSUo2a5SsB3GOh1n94TVLmAVyc0iIrdwMX3bqtG2FplhXZ2JmNuz3r11ygOxbueD8GCdbwy7ZwC66zcHJVttxBty6L34sA9W5hqqrvLMC1dA+8HIGCn8XbwB/L7q/1oCMyk1QSY60o9rGAkxXufH7rgAuKdR6J44enYHWM4xWdK7EYuIG9buUFqrKp/Ky1TqQAWNWC13d04TRucwIlF7VT46OsHJM5lJ0q4yjg3XNz1CUpEpenukh+7ODqL821m8Dp9gMeJ3DxVb/QnnMeaOHuKzh6XqVtexumZafMOfjHm29L375yY3szQ3ynWNS+dPD53OuVd4xd/b8Ve6jvgx0pWQ4sqygBZY++/OPpn2cvUDf4udASwEd5wfiUcuTsOXR7pLrBG1/amyi00bh7iyxoXCZwjXgizRYCr142larJSFKV0Y5118j/dvPHMxGeepihReOZkTeK96++ocNMz4Ycpwrj6t2/3DtTMXQu7Bwxy5uKCv3ELXt6MqlUHiF0Iexa2y88FR9VyQrEWRdmaOLkpnurznvwmX7A5yUp/hbuBZ5KpSAhyeiBjZuTX7zuw0vCBjSfz4WVb9//3axqGNwNvZXAB07sVRgu9gKgbntVxWo48J1nn4+NVEr9iDOP5SgSeffwwJ2N6dm5S4oDPCnJiEsy6iYS2n3dDYkvbNi2UMD57/38+5NUV5kNvcxkDlCKZOXNLHw7f0GaunhxOS1rGY6wJ+EWBlxMEjGgHwBcaTbL8SRENhI5eubgTYM1uzA7nx/wFIiFUlh33OBYicXx7ms3xx96301NcuTzsW3rHAqUf+zAD6byOmY5VuCVqqULaYli5X7AhzjHz5z6zjKUUJYxA/msITJgVQ+UlK2//rZM5XQ/R9gvAVp1PpGmaKtOH962zYzgLxu4sPBERxp1KnF817oNiUcGbgyukp0/bxP4H7y4b6aMwcgLKy8K6DovzwO4yPlvOPdUDyHGCsSaLCBUBsz8gW9/4QVpIjNxDTb84i5bWazwilO19Mkb/uiMyMPMH7i5YMoomZbRkhjDaXkJ/tg16+KPrLeAf/fc65Xj+Xe5hDEiCHke011rrpcHOpfWasS/f+ENejz/LgPZ9VRSDQzO+eeuukG0JRSAD770TK6CuZEvzLI8xaxi5OcMfPPw0zM6La/ktZcBmm+VBQG/7tgPlgDIIsPqc3hjWcS52jW15PSBHTv0ywJuWrcko1gsjpfGEbl19UD8y9d+0Hx9JEcpLwLllHqzguJWlibTyD3MHC3BDPXmcOxR9FbbCuD3HNw3W6EVY1LX2KyuMk3DrMyqPn3I0/Prj+zpeZ1O4Icn/4eE14k7dxcEXFxuy9G9KxmG5d5Le63bMKiR6Vx6+sDaHWaFbUuApxOYtCud+NbVa2vAT85MGCNawXTdMBIT6wziA50Zkpad7OGxXJaPa4W6bBwFqgH8dqYPp2VZvJ/J7zny3GxFV43JwqwFXMKsXNDNhTPsqEWao07yyvflrIZ9yWANF9K05di+Po7kLic7YydbrSoBhcO5w9sGa7mZ1gLP9Ma//P6bTQv/1/PH1BOFUW7KiawA0XXzp6FTdP/qLdK16Z6azPz7W0eNs+ok0ygAkWQuSIvtJiJJfNeaTdJAypKU+w79Vz5HVaOsCR2fYdOGIVI1bO7Am204ez9rZuFinKK49dljAxs4gjZnAi3tRpyPHNvyh5fcxtAy4CmeJLes36B8ZcEWzVYBfzH4YagrpbB2bYIt3O5ILKBTXdMbOdKr3ooMksSyrw3c+Xb9xVoGXEjKTT3LY1+9Ybu5aJYo5TVddhsNpUjosvtGcpTCDC3V8vCyLPxr6+iVk+biKiz8/iPPzU6XCsyycJVNGwVeKei8PofvR9SRlADgLilxL3kGkydObhoMjTRF8DOsVjZipkuIQ+H1zXe96ZdLXzDg3zh5qPyWkWOMYiSKBwxKkRJTgAFG9/b2K1s6e2teypMXjtD/y2eZUZUTXZY4qNYe9q61W+XrOzOSreGleuCGzu0wv5mONwXuU6xk20hU4OLaAyf2tskUX7VkS/eZA2iH7zdYtBT4B3ozytfe97tm4DNBS+ySpjHk9lLMUciwQUkRd/4kS0v8YrHIZRksy3Zt8vWlOklSlk0LF4tm64E3ltnV7UtGsnB7ssVC2myXqKXAt3RnlK9vtYC3+vAAF8FPoSopl2PhATWPllnUtsnmBDxs3C0Gnla+vnXnggGveSmBwINfNTq4c5e5xfbYqEvDm0iJ7XEYDBYhcMCkPd2J+9vSyjdvWnjgRV1j+bzGcpLKRHjvaPgcgIdZd1XWDLJYgEMKRFgvIs30FQAu6gMfOPKT2RzRjKII7XWN5agN3PFqgh5py8InpcdE4NPUsi1BsdeR9xS4ezB2HuWKAj/xk9lSqchmtLIhgFOxXWda+FyBe4MbbzDubAKL8S4u4CKXknYsfH2yXf7nD9+xYPnw+1/5UUHVNSMIuFkhEHC8/IkHe0wLHxahvbcixVN5VVfYaWgwcXJbuB8etljan89p0Wyw8CpwK3mVJOk4kf5p2x2dS5NWsNLK4+jMhPE3bx0q5nRHUmwLj7IDYQIvCUnxBj4e9D716osKuNjp6Uk72cKkkiBrEt3yHX3rYjLCIo2CMIjUrAwi66zrlgUKH3xzeilKgiyyinCqNCGyirX5Eb9JEnChoww4n+Uq++n429pUKW+IXIq5aLo0fL7AfYVlMVu42PFJSp1oSZzhdHoJTsYSpB2w1NGmEFniJEaSGLBhklfMxJWOzIy3LMO6VBe6b+UA+fu3XjWmNLUWymtV8AZnXOTDxU8dY6NSKbE8BaNkFNi0Vjaojq3Q3tD5fIB7M9Ze3XaeTBkMjS4eSbGAOzs+3XEgCSVBYnKMtMsKQVjCiThCSDdwLWNoArc2GnpiMTRetL4PwMwSVg+NakCqwHXGuMoMljMoE/pd0jVWKGhs1nQJrQ1lE3hIvdvLt3klxaviQd80tMiAi0IU9yZEexyRNimNOxUgmEg4QSRs7fhgxJD4KSSluqsTA5CotQEiDpE5wa4cisFlrsuM67zCixWDM0NnJYMyW07Uos4ryvyAu0N38+I+2m0trBQWkYZbxT+iHoWnrV17RYnjdkXBkqTglGRgLMlYRhgJ6OI9E1kTwGNgYAt0rArfqcqxElZCj1RVBZ3LnMqM00qZU2ZwAVtIib2JjA2Zm3v2c7Rwy7qDZMQ2ARk4MmhPNv/mgR3Rvw8lzFG4DC/FAi6qsey6lFiM4TjuQLJi4A7chhimSMEYyZggoeTmMLEFXRzMtHjnwNySFRWsKaCmf10BAVtjBhewxU9RJiFAm3IS8bAl5XHbSwl5jZBTg/Z0db9pb41FvExoMxt4YH14UA9W2ZtVY2gGQULPUymIGQwzIqE4kVAikQBGNKRUYTMsIfGqBTPrDa0XrMS/jV+nUzH/hpnCK1AGEdiIv6hM59hQTNg16w4dotXg5dseXPpqaZL8hQm82Yu4FCQdymoMzp3cNNjy76q1gQe+AdEcuPP6iZAWAV9EnpxoKAlJENWwTJWQWNCSyWStcDNGnJdqjWqwQmIyF79romjTNQvlqmRgRVg1mKDFPUUr/7HuXkz+yZ0PLXs6exq+kT0SALxavGPIkxvO0pF9gwvzVdg2cOsdn7PHp/e8+KNINdKews5aUaeMxOs/TtlyChLErp61JsAEYMqK41ZwjQq/kbt/io9LZQCsON7LXCC7DeWPr9oce+K6W5b86fCL8GJp1HeRFFVSFOjwiU2DUxEfmnk1q2ko53w9Bej4xPP7Ro+Mnwv9ovPmlbT2vYhFta5m3JXQi4t3M5NJKEEJxBNhWa71NpC9Dy/CdRSTOcfVnzPUfGKiLJSivy7Sjv731k/1jFGdDA5Xa8PrvBJJIllcyr5rvwI4L5IRT3IDF8/UwLSm8a++9LOpfReONi3pbQDuMDZ/q31eqyN3Km3tP5m5j6QzA0zTEFYULn6638FyxmK1reVMQnzvGztXkb++/tbOVakl8uD5/XC+5H2ThEh4lpRiFw9v+/3wOouIQMOaebwEzrkYkXgTOT5cmKqcmZnRJqaLRnV9C+vL//OYeIu5/l1PVyleDECv+9xTqFf9j65hJCkKr2/rd9GueAL3JTrlq9u6YiWg8PjoIThUyppSYhAwMFMme9rSE632QKIAasiucc5F4sl+114MNzADF+UC71WbUVqC/blheDJ7HPJMrwBIeWIk83ded0fucr5Z83LH0xRm9YsOFg3wfQDov8f3x0fYZAJUSSrrREK6JiGZSFQHwiQwFGroZUwoJxLlpTJVtP6CXbl6ubBacf7/A7kxJfsyNujOAAAAAElFTkSuQmCC"}}]);
|